fleet-commander-ai 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-BbrDeQ1K.css +1 -0
- package/dist/client/assets/index-DLivu-L6.js +181 -0
- package/dist/client/assets/{index-TQX9jvlS.js.map → index-DLivu-L6.js.map} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/db.d.ts +6 -0
- package/dist/server/db.d.ts.map +1 -1
- package/dist/server/db.js +60 -19
- package/dist/server/db.js.map +1 -1
- package/dist/server/index.js +6 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/projects.d.ts.map +1 -1
- package/dist/server/routes/projects.js +27 -0
- package/dist/server/routes/projects.js.map +1 -1
- package/dist/server/schema.sql +8 -2
- package/dist/server/services/cc-query.d.ts.map +1 -1
- package/dist/server/services/cc-query.js +88 -143
- package/dist/server/services/cc-query.js.map +1 -1
- package/dist/server/services/project-service.d.ts +29 -1
- package/dist/server/services/project-service.d.ts.map +1 -1
- package/dist/server/services/project-service.js +306 -5
- package/dist/server/services/project-service.js.map +1 -1
- package/dist/server/services/stuck-detector.d.ts.map +1 -1
- package/dist/server/services/stuck-detector.js +22 -0
- package/dist/server/services/stuck-detector.js.map +1 -1
- package/dist/server/services/team-manager.d.ts +15 -38
- package/dist/server/services/team-manager.d.ts.map +1 -1
- package/dist/server/services/team-manager.js +140 -184
- package/dist/server/services/team-manager.js.map +1 -1
- package/dist/server/services/usage-tracker.d.ts.map +1 -1
- package/dist/server/services/usage-tracker.js +11 -17
- package/dist/server/services/usage-tracker.js.map +1 -1
- package/dist/server/utils/cc-spawn.d.ts +293 -0
- package/dist/server/utils/cc-spawn.d.ts.map +1 -0
- package/dist/server/utils/cc-spawn.js +447 -0
- package/dist/server/utils/cc-spawn.js.map +1 -0
- package/dist/shared/types.d.ts +28 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/hooks/on_notification.sh +1 -1
- package/hooks/on_post_tool_use.sh +1 -1
- package/hooks/on_pre_compact.sh +1 -1
- package/hooks/on_session_end.sh +1 -1
- package/hooks/on_session_start.sh +1 -1
- package/hooks/on_stop.sh +1 -1
- package/hooks/on_stop_failure.sh +1 -1
- package/hooks/on_subagent_start.sh +1 -1
- package/hooks/on_subagent_stop.sh +1 -1
- package/hooks/on_teammate_idle.sh +1 -1
- package/hooks/on_tool_error.sh +1 -1
- package/hooks/send_event.sh +1 -1
- package/package.json +2 -1
- package/prompts/default-prompt.md +1 -1
- package/scripts/install.sh +26 -7
- package/scripts/verify-version-stamps.sh +14 -1
- package/templates/agents/fleet-dev.md +1 -1
- package/templates/agents/fleet-planner.md +1 -1
- package/templates/agents/fleet-reviewer.md +1 -1
- package/templates/guides/api-design.md +1 -1
- package/templates/guides/csharp-conventions.md +1 -1
- package/templates/guides/devops-conventions.md +1 -1
- package/templates/guides/fsharp-conventions.md +1 -1
- package/templates/guides/python-conventions.md +1 -1
- package/templates/guides/sql-database.md +1 -1
- package/templates/guides/testing-strategies.md +1 -1
- package/templates/guides/typescript-conventions.md +1 -1
- package/templates/workflow.md +1 -1
- package/dist/client/assets/index-BPER_w-n.css +0 -1
- package/dist/client/assets/index-TQX9jvlS.js +0 -181
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
var PH=Object.defineProperty;var RH=(e,r,n)=>r in e?PH(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var Fg=(e,r,n)=>RH(e,typeof r!="symbol"?r+"":r,n);function DH(e,r){for(var n=0;n<r.length;n++){const a=r[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var yd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ug={exports:{}},gu={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var XO;function LH(){if(XO)return gu;XO=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:a,key:s,ref:i!==void 0?i:null,props:o}}return gu.Fragment=r,gu.jsx=n,gu.jsxs=n,gu}var WO;function IH(){return WO||(WO=1,Ug.exports=LH()),Ug.exports}var b=IH(),Hg={exports:{}},Me={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ZO;function zH(){if(ZO)return Me;ZO=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function y(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function x(U,J,le){this.props=U,this.context=J,this.refs=w,this.updater=le||_}x.prototype.isReactComponent={},x.prototype.setState=function(U,J){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,J,"setState")},x.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function j(){}j.prototype=x.prototype;function C(U,J,le){this.props=U,this.context=J,this.refs=w,this.updater=le||_}var T=C.prototype=new j;T.constructor=C,E(T,x.prototype),T.isPureReactComponent=!0;var O=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function L(U,J,le){var $=le.ref;return{$$typeof:e,type:U,key:J,ref:$!==void 0?$:null,props:le}}function D(U,J){return L(U.type,J,U.props)}function q(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function z(U){var J={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(le){return J[le]})}var H=/\/+/g;function F(U,J){return typeof U=="object"&&U!==null&&U.key!=null?z(""+U.key):J.toString(36)}function X(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(N,N):(U.status="pending",U.then(function(J){U.status==="pending"&&(U.status="fulfilled",U.value=J)},function(J){U.status==="pending"&&(U.status="rejected",U.reason=J)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function B(U,J,le,$,Y){var G=typeof U;(G==="undefined"||G==="boolean")&&(U=null);var he=!1;if(U===null)he=!0;else switch(G){case"bigint":case"string":case"number":he=!0;break;case"object":switch(U.$$typeof){case e:case r:he=!0;break;case h:return he=U._init,B(he(U._payload),J,le,$,Y)}}if(he)return Y=Y(U),he=$===""?"."+F(U,0):$,O(Y)?(le="",he!=null&&(le=he.replace(H,"$&/")+"/"),B(Y,J,le,"",function(se){return se})):Y!=null&&(q(Y)&&(Y=D(Y,le+(Y.key==null||U&&U.key===Y.key?"":(""+Y.key).replace(H,"$&/")+"/")+he)),J.push(Y)),1;he=0;var xe=$===""?".":$+":";if(O(U))for(var Z=0;Z<U.length;Z++)$=U[Z],G=xe+F($,Z),he+=B($,J,le,G,Y);else if(Z=y(U),typeof Z=="function")for(U=Z.call(U),Z=0;!($=U.next()).done;)$=$.value,G=xe+F($,Z++),he+=B($,J,le,G,Y);else if(G==="object"){if(typeof U.then=="function")return B(X(U),J,le,$,Y);throw J=String(U),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return he}function Q(U,J,le){if(U==null)return U;var $=[],Y=0;return B(U,$,"","",function(G){return J.call(le,G,Y++)}),$}function te(U){if(U._status===-1){var J=U._result;J=J(),J.then(function(le){(U._status===0||U._status===-1)&&(U._status=1,U._result=le)},function(le){(U._status===0||U._status===-1)&&(U._status=2,U._result=le)}),U._status===-1&&(U._status=0,U._result=J)}if(U._status===1)return U._result.default;throw U._result}var K=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},de={map:Q,forEach:function(U,J,le){Q(U,function(){J.apply(this,arguments)},le)},count:function(U){var J=0;return Q(U,function(){J++}),J},toArray:function(U){return Q(U,function(J){return J})||[]},only:function(U){if(!q(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Me.Activity=m,Me.Children=de,Me.Component=x,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=C,Me.StrictMode=a,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Me.__COMPILER_RUNTIME={__proto__:null,c:function(U){return M.H.useMemoCache(U)}},Me.cache=function(U){return function(){return U.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(U,J,le){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var $=E({},U.props),Y=U.key;if(J!=null)for(G in J.key!==void 0&&(Y=""+J.key),J)!R.call(J,G)||G==="key"||G==="__self"||G==="__source"||G==="ref"&&J.ref===void 0||($[G]=J[G]);var G=arguments.length-2;if(G===1)$.children=le;else if(1<G){for(var he=Array(G),xe=0;xe<G;xe++)he[xe]=arguments[xe+2];$.children=he}return L(U.type,Y,$)},Me.createContext=function(U){return U={$$typeof:s,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:o,_context:U},U},Me.createElement=function(U,J,le){var $,Y={},G=null;if(J!=null)for($ in J.key!==void 0&&(G=""+J.key),J)R.call(J,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(Y[$]=J[$]);var he=arguments.length-2;if(he===1)Y.children=le;else if(1<he){for(var xe=Array(he),Z=0;Z<he;Z++)xe[Z]=arguments[Z+2];Y.children=xe}if(U&&U.defaultProps)for($ in he=U.defaultProps,he)Y[$]===void 0&&(Y[$]=he[$]);return L(U,G,Y)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(U){return{$$typeof:c,render:U}},Me.isValidElement=q,Me.lazy=function(U){return{$$typeof:h,_payload:{_status:-1,_result:U},_init:te}},Me.memo=function(U,J){return{$$typeof:d,type:U,compare:J===void 0?null:J}},Me.startTransition=function(U){var J=M.T,le={};M.T=le;try{var $=U(),Y=M.S;Y!==null&&Y(le,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(N,K)}catch(G){K(G)}finally{J!==null&&le.types!==null&&(J.types=le.types),M.T=J}},Me.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Me.use=function(U){return M.H.use(U)},Me.useActionState=function(U,J,le){return M.H.useActionState(U,J,le)},Me.useCallback=function(U,J){return M.H.useCallback(U,J)},Me.useContext=function(U){return M.H.useContext(U)},Me.useDebugValue=function(){},Me.useDeferredValue=function(U,J){return M.H.useDeferredValue(U,J)},Me.useEffect=function(U,J){return M.H.useEffect(U,J)},Me.useEffectEvent=function(U){return M.H.useEffectEvent(U)},Me.useId=function(){return M.H.useId()},Me.useImperativeHandle=function(U,J,le){return M.H.useImperativeHandle(U,J,le)},Me.useInsertionEffect=function(U,J){return M.H.useInsertionEffect(U,J)},Me.useLayoutEffect=function(U,J){return M.H.useLayoutEffect(U,J)},Me.useMemo=function(U,J){return M.H.useMemo(U,J)},Me.useOptimistic=function(U,J){return M.H.useOptimistic(U,J)},Me.useReducer=function(U,J,le){return M.H.useReducer(U,J,le)},Me.useRef=function(U){return M.H.useRef(U)},Me.useState=function(U){return M.H.useState(U)},Me.useSyncExternalStore=function(U,J,le){return M.H.useSyncExternalStore(U,J,le)},Me.useTransition=function(){return M.H.useTransition()},Me.version="19.2.4",Me}var QO;function is(){return QO||(QO=1,Hg.exports=zH()),Hg.exports}var k=is();const vp=Dn(k),qH=DH({__proto__:null,default:vp},[k]);var Gg={exports:{}},yu={},Vg={exports:{}},Kg={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var JO;function BH(){return JO||(JO=1,(function(e){function r(B,Q){var te=B.length;B.push(Q);e:for(;0<te;){var K=te-1>>>1,de=B[K];if(0<i(de,Q))B[K]=Q,B[te]=de,te=K;else break e}}function n(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Q=B[0],te=B.pop();if(te!==Q){B[0]=te;e:for(var K=0,de=B.length,U=de>>>1;K<U;){var J=2*(K+1)-1,le=B[J],$=J+1,Y=B[$];if(0>i(le,te))$<de&&0>i(Y,le)?(B[K]=Y,B[$]=te,K=$):(B[K]=le,B[J]=te,K=J);else if($<de&&0>i(Y,te))B[K]=Y,B[$]=te,K=$;else break e}}return Q}function i(B,Q){var te=B.sortIndex-Q.sortIndex;return te!==0?te:B.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var f=[],d=[],h=1,m=null,g=3,y=!1,_=!1,E=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var Q=n(d);Q!==null;){if(Q.callback===null)a(d);else if(Q.startTime<=B)a(d),Q.sortIndex=Q.expirationTime,r(f,Q);else break;Q=n(d)}}function O(B){if(E=!1,T(B),!_)if(n(f)!==null)_=!0,N||(N=!0,z());else{var Q=n(d);Q!==null&&X(O,Q.startTime-B)}}var N=!1,M=-1,R=5,L=-1;function D(){return w?!0:!(e.unstable_now()-L<R)}function q(){if(w=!1,N){var B=e.unstable_now();L=B;var Q=!0;try{e:{_=!1,E&&(E=!1,j(M),M=-1),y=!0;var te=g;try{t:{for(T(B),m=n(f);m!==null&&!(m.expirationTime>B&&D());){var K=m.callback;if(typeof K=="function"){m.callback=null,g=m.priorityLevel;var de=K(m.expirationTime<=B);if(B=e.unstable_now(),typeof de=="function"){m.callback=de,T(B),Q=!0;break t}m===n(f)&&a(f),T(B)}else a(f);m=n(f)}if(m!==null)Q=!0;else{var U=n(d);U!==null&&X(O,U.startTime-B),Q=!1}}break e}finally{m=null,g=te,y=!1}Q=void 0}}finally{Q?z():N=!1}}}var z;if(typeof C=="function")z=function(){C(q)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,F=H.port2;H.port1.onmessage=q,z=function(){F.postMessage(null)}}else z=function(){x(q,0)};function X(B,Q){M=x(function(){B(e.unstable_now())},Q)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var te=g;g=Q;try{return B()}finally{g=te}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var te=g;g=B;try{return Q()}finally{g=te}},e.unstable_scheduleCallback=function(B,Q,te){var K=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?K+te:K):te=K,B){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=te+de,B={id:h++,callback:Q,priorityLevel:B,startTime:te,expirationTime:de,sortIndex:-1},te>K?(B.sortIndex=te,r(d,B),n(f)===null&&B===n(d)&&(E?(j(M),M=-1):E=!0,X(O,te-K))):(B.sortIndex=de,r(f,B),_||y||(_=!0,N||(N=!0,z()))),B},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(B){var Q=g;return function(){var te=g;g=Q;try{return B.apply(this,arguments)}finally{g=te}}}})(Kg)),Kg}var e5;function $H(){return e5||(e5=1,Vg.exports=BH()),Vg.exports}var Yg={exports:{}},ar={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var t5;function FH(){if(t5)return ar;t5=1;var e=is();function r(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,ar.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(r(299));return o(f,d,null,h)},ar.flushSync=function(f){var d=s.T,h=a.p;try{if(s.T=null,a.p=2,f)return f()}finally{s.T=d,a.p=h,a.d.f()}},ar.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(f,d))},ar.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},ar.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?a.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&a.d.X(f,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ar.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);a.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(f)},ar.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);a.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ar.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);a.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(f)},ar.requestFormReset=function(f){a.d.r(f)},ar.unstable_batchedUpdates=function(f,d){return f(d)},ar.useFormState=function(f,d,h){return s.H.useFormState(f,d,h)},ar.useFormStatus=function(){return s.H.useHostTransitionStatus()},ar.version="19.2.4",ar}var r5;function A6(){if(r5)return Yg.exports;r5=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(r){console.error(r)}}return e(),Yg.exports=FH(),Yg.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var n5;function UH(){if(n5)return yu;n5=1;var e=$H(),r=is(),n=A6();function a(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function o(l){var u=l,p=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(p=u.return),l=u.return;while(l)}return u.tag===3?p:null}function s(l){if(l.tag===13){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function c(l){if(l.tag===31){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function f(l){if(o(l)!==l)throw Error(a(188))}function d(l){var u=l.alternate;if(!u){if(u=o(l),u===null)throw Error(a(188));return u!==l?null:l}for(var p=l,v=u;;){var S=p.return;if(S===null)break;var A=S.alternate;if(A===null){if(v=S.return,v!==null){p=v;continue}break}if(S.child===A.child){for(A=S.child;A;){if(A===p)return f(S),l;if(A===v)return f(S),u;A=A.sibling}throw Error(a(188))}if(p.return!==v.return)p=S,v=A;else{for(var P=!1,I=S.child;I;){if(I===p){P=!0,p=S,v=A;break}if(I===v){P=!0,v=S,p=A;break}I=I.sibling}if(!P){for(I=A.child;I;){if(I===p){P=!0,p=A,v=S;break}if(I===v){P=!0,v=A,p=S;break}I=I.sibling}if(!P)throw Error(a(189))}}if(p.alternate!==v)throw Error(a(190))}if(p.tag!==3)throw Error(a(188));return p.stateNode.current===p?l:u}function h(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=h(l),u!==null)return u;l=l.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function z(l){return l===null||typeof l!="object"?null:(l=q&&l[q]||l["@@iterator"],typeof l=="function"?l:null)}var H=Symbol.for("react.client.reference");function F(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===H?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case E:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case O:return"Suspense";case N:return"SuspenseList";case L:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case _:return"Portal";case C:return l.displayName||"Context";case j:return(l._context.displayName||"Context")+".Consumer";case T:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case M:return u=l.displayName||null,u!==null?u:F(l.type)||"Memo";case R:u=l._payload,l=l._init;try{return F(l(u))}catch{}}return null}var X=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},K=[],de=-1;function U(l){return{current:l}}function J(l){0>de||(l.current=K[de],K[de]=null,de--)}function le(l,u){de++,K[de]=l.current,l.current=u}var $=U(null),Y=U(null),G=U(null),he=U(null);function xe(l,u){switch(le(G,u),le(Y,l),le($,null),u.nodeType){case 9:case 11:l=(l=u.documentElement)&&(l=l.namespaceURI)?yO(l):0;break;default:if(l=u.tagName,u=u.namespaceURI)u=yO(u),l=bO(u,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}J($),le($,l)}function Z(){J($),J(Y),J(G)}function se(l){l.memoizedState!==null&&le(he,l);var u=$.current,p=bO(u,l.type);u!==p&&(le(Y,l),le($,p))}function ge(l){Y.current===l&&(J($),J(Y)),he.current===l&&(J(he),hu._currentValue=te)}var ee,be;function ce(l){if(ee===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ee=u&&u[1]||"",be=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ee+l+be}var ye=!1;function we(l,u){if(!l||ye)return"";ye=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(u){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(fe){var oe=fe}Reflect.construct(l,[],ve)}else{try{ve.call()}catch(fe){oe=fe}l.call(ve.prototype)}}else{try{throw Error()}catch(fe){oe=fe}(ve=l())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(fe){if(fe&&oe&&typeof fe.stack=="string")return[fe.stack,oe.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var A=v.DetermineComponentFrameRoot(),P=A[0],I=A[1];if(P&&I){var V=P.split(`
|
|
44
|
+
`),ie=I.split(`
|
|
45
|
+
`);for(S=v=0;v<V.length&&!V[v].includes("DetermineComponentFrameRoot");)v++;for(;S<ie.length&&!ie[S].includes("DetermineComponentFrameRoot");)S++;if(v===V.length||S===ie.length)for(v=V.length-1,S=ie.length-1;1<=v&&0<=S&&V[v]!==ie[S];)S--;for(;1<=v&&0<=S;v--,S--)if(V[v]!==ie[S]){if(v!==1||S!==1)do if(v--,S--,0>S||V[v]!==ie[S]){var pe=`
|
|
46
|
+
`+V[v].replace(" at new "," at ");return l.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",l.displayName)),pe}while(1<=v&&0<=S);break}}}finally{ye=!1,Error.prepareStackTrace=p}return(p=l?l.displayName||l.name:"")?ce(p):""}function ke(l,u){switch(l.tag){case 26:case 27:case 5:return ce(l.type);case 16:return ce("Lazy");case 13:return l.child!==u&&u!==null?ce("Suspense Fallback"):ce("Suspense");case 19:return ce("SuspenseList");case 0:case 15:return we(l.type,!1);case 11:return we(l.type.render,!1);case 1:return we(l.type,!0);case 31:return ce("Activity");default:return""}}function Ke(l){try{var u="",p=null;do u+=ke(l,p),p=l,l=l.return;while(l);return u}catch(v){return`
|
|
47
|
+
Error generating stack: `+v.message+`
|
|
48
|
+
`+v.stack}}var Yr=Object.prototype.hasOwnProperty,Ss=e.unstable_scheduleCallback,li=e.unstable_cancelCallback,qn=e.unstable_shouldYield,nr=e.unstable_requestPaint,It=e.unstable_now,Yo=e.unstable_getCurrentPriorityLevel,Qc=e.unstable_ImmediatePriority,Es=e.unstable_UserBlockingPriority,Sn=e.unstable_NormalPriority,Jc=e.unstable_LowPriority,ks=e.unstable_IdlePriority,Om=e.log,ef=e.unstable_setDisableYieldValue,xr=null,_t=null;function si(l){if(typeof Om=="function"&&ef(l),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(xr,l)}catch{}}var Pr=Math.clz32?Math.clz32:bF,gF=Math.log,yF=Math.LN2;function bF(l){return l>>>=0,l===0?32:31-(gF(l)/yF|0)|0}var tf=256,rf=262144,nf=4194304;function Xi(l){var u=l&42;if(u!==0)return u;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function af(l,u,p){var v=l.pendingLanes;if(v===0)return 0;var S=0,A=l.suspendedLanes,P=l.pingedLanes;l=l.warmLanes;var I=v&134217727;return I!==0?(v=I&~A,v!==0?S=Xi(v):(P&=I,P!==0?S=Xi(P):p||(p=I&~l,p!==0&&(S=Xi(p))))):(I=v&~A,I!==0?S=Xi(I):P!==0?S=Xi(P):p||(p=v&~l,p!==0&&(S=Xi(p)))),S===0?0:u!==0&&u!==S&&(u&A)===0&&(A=S&-S,p=u&-u,A>=p||A===32&&(p&4194048)!==0)?u:S}function As(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function xF(l,u){switch(l){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jk(){var l=nf;return nf<<=1,(nf&62914560)===0&&(nf=4194304),l}function Tm(l){for(var u=[],p=0;31>p;p++)u.push(l);return u}function js(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _F(l,u,p,v,S,A){var P=l.pendingLanes;l.pendingLanes=p,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=p,l.entangledLanes&=p,l.errorRecoveryDisabledLanes&=p,l.shellSuspendCounter=0;var I=l.entanglements,V=l.expirationTimes,ie=l.hiddenUpdates;for(p=P&~p;0<p;){var pe=31-Pr(p),ve=1<<pe;I[pe]=0,V[pe]=-1;var oe=ie[pe];if(oe!==null)for(ie[pe]=null,pe=0;pe<oe.length;pe++){var fe=oe[pe];fe!==null&&(fe.lane&=-536870913)}p&=~ve}v!==0&&eA(l,v,0),A!==0&&S===0&&l.tag!==0&&(l.suspendedLanes|=A&~(P&~u))}function eA(l,u,p){l.pendingLanes|=u,l.suspendedLanes&=~u;var v=31-Pr(u);l.entangledLanes|=u,l.entanglements[v]=l.entanglements[v]|1073741824|p&261930}function tA(l,u){var p=l.entangledLanes|=u;for(l=l.entanglements;p;){var v=31-Pr(p),S=1<<v;S&u|l[v]&u&&(l[v]|=u),p&=~S}}function rA(l,u){var p=u&-u;return p=(p&42)!==0?1:Nm(p),(p&(l.suspendedLanes|u))!==0?0:p}function Nm(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function Mm(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function nA(){var l=Q.p;return l!==0?l:(l=window.event,l===void 0?32:FO(l.type))}function aA(l,u){var p=Q.p;try{return Q.p=l,u()}finally{Q.p=p}}var ui=Math.random().toString(36).slice(2),Vt="__reactFiber$"+ui,_r="__reactProps$"+ui,Xo="__reactContainer$"+ui,Pm="__reactEvents$"+ui,wF="__reactListeners$"+ui,SF="__reactHandles$"+ui,iA="__reactResources$"+ui,Cs="__reactMarker$"+ui;function Rm(l){delete l[Vt],delete l[_r],delete l[Pm],delete l[wF],delete l[SF]}function Wo(l){var u=l[Vt];if(u)return u;for(var p=l.parentNode;p;){if(u=p[Xo]||p[Vt]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(l=AO(l);l!==null;){if(p=l[Vt])return p;l=AO(l)}return u}l=p,p=l.parentNode}return null}function Zo(l){if(l=l[Vt]||l[Xo]){var u=l.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return l}return null}function Os(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l.stateNode;throw Error(a(33))}function Qo(l){var u=l[iA];return u||(u=l[iA]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function zt(l){l[Cs]=!0}var oA=new Set,lA={};function Wi(l,u){Jo(l,u),Jo(l+"Capture",u)}function Jo(l,u){for(lA[l]=u,l=0;l<u.length;l++)oA.add(u[l])}var EF=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sA={},uA={};function kF(l){return Yr.call(uA,l)?!0:Yr.call(sA,l)?!1:EF.test(l)?uA[l]=!0:(sA[l]=!0,!1)}function of(l,u,p){if(kF(u))if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":l.removeAttribute(u);return;case"boolean":var v=u.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){l.removeAttribute(u);return}}l.setAttribute(u,""+p)}}function lf(l,u,p){if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(u);return}l.setAttribute(u,""+p)}}function pa(l,u,p,v){if(v===null)l.removeAttribute(p);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(p);return}l.setAttributeNS(u,p,""+v)}}function Xr(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function cA(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function AF(l,u,p){var v=Object.getOwnPropertyDescriptor(l.constructor.prototype,u);if(!l.hasOwnProperty(u)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var S=v.get,A=v.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return S.call(this)},set:function(P){p=""+P,A.call(this,P)}}),Object.defineProperty(l,u,{enumerable:v.enumerable}),{getValue:function(){return p},setValue:function(P){p=""+P},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function Dm(l){if(!l._valueTracker){var u=cA(l)?"checked":"value";l._valueTracker=AF(l,u,""+l[u])}}function fA(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var p=u.getValue(),v="";return l&&(v=cA(l)?l.checked?"true":"false":l.value),l=v,l!==p?(u.setValue(l),!0):!1}function sf(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}}var jF=/[\n"\\]/g;function Wr(l){return l.replace(jF,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Lm(l,u,p,v,S,A,P,I){l.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?l.type=P:l.removeAttribute("type"),u!=null?P==="number"?(u===0&&l.value===""||l.value!=u)&&(l.value=""+Xr(u)):l.value!==""+Xr(u)&&(l.value=""+Xr(u)):P!=="submit"&&P!=="reset"||l.removeAttribute("value"),u!=null?Im(l,P,Xr(u)):p!=null?Im(l,P,Xr(p)):v!=null&&l.removeAttribute("value"),S==null&&A!=null&&(l.defaultChecked=!!A),S!=null&&(l.checked=S&&typeof S!="function"&&typeof S!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?l.name=""+Xr(I):l.removeAttribute("name")}function dA(l,u,p,v,S,A,P,I){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(l.type=A),u!=null||p!=null){if(!(A!=="submit"&&A!=="reset"||u!=null)){Dm(l);return}p=p!=null?""+Xr(p):"",u=u!=null?""+Xr(u):p,I||u===l.value||(l.value=u),l.defaultValue=u}v=v??S,v=typeof v!="function"&&typeof v!="symbol"&&!!v,l.checked=I?l.checked:!!v,l.defaultChecked=!!v,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(l.name=P),Dm(l)}function Im(l,u,p){u==="number"&&sf(l.ownerDocument)===l||l.defaultValue===""+p||(l.defaultValue=""+p)}function el(l,u,p,v){if(l=l.options,u){u={};for(var S=0;S<p.length;S++)u["$"+p[S]]=!0;for(p=0;p<l.length;p++)S=u.hasOwnProperty("$"+l[p].value),l[p].selected!==S&&(l[p].selected=S),S&&v&&(l[p].defaultSelected=!0)}else{for(p=""+Xr(p),u=null,S=0;S<l.length;S++){if(l[S].value===p){l[S].selected=!0,v&&(l[S].defaultSelected=!0);return}u!==null||l[S].disabled||(u=l[S])}u!==null&&(u.selected=!0)}}function hA(l,u,p){if(u!=null&&(u=""+Xr(u),u!==l.value&&(l.value=u),p==null)){l.defaultValue!==u&&(l.defaultValue=u);return}l.defaultValue=p!=null?""+Xr(p):""}function pA(l,u,p,v){if(u==null){if(v!=null){if(p!=null)throw Error(a(92));if(X(v)){if(1<v.length)throw Error(a(93));v=v[0]}p=v}p==null&&(p=""),u=p}p=Xr(u),l.defaultValue=p,v=l.textContent,v===p&&v!==""&&v!==null&&(l.value=v),Dm(l)}function tl(l,u){if(u){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=u;return}}l.textContent=u}var CF=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function mA(l,u,p){var v=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?v?l.setProperty(u,""):u==="float"?l.cssFloat="":l[u]="":v?l.setProperty(u,p):typeof p!="number"||p===0||CF.has(u)?u==="float"?l.cssFloat=p:l[u]=(""+p).trim():l[u]=p+"px"}function vA(l,u,p){if(u!=null&&typeof u!="object")throw Error(a(62));if(l=l.style,p!=null){for(var v in p)!p.hasOwnProperty(v)||u!=null&&u.hasOwnProperty(v)||(v.indexOf("--")===0?l.setProperty(v,""):v==="float"?l.cssFloat="":l[v]="");for(var S in u)v=u[S],u.hasOwnProperty(S)&&p[S]!==v&&mA(l,S,v)}else for(var A in u)u.hasOwnProperty(A)&&mA(l,A,u[A])}function zm(l){if(l.indexOf("-")===-1)return!1;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 OF=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),TF=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function uf(l){return TF.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}function ma(){}var qm=null;function Bm(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var rl=null,nl=null;function gA(l){var u=Zo(l);if(u&&(l=u.stateNode)){var p=l[_r]||null;e:switch(l=u.stateNode,u.type){case"input":if(Lm(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=l;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Wr(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var v=p[u];if(v!==l&&v.form===l.form){var S=v[_r]||null;if(!S)throw Error(a(90));Lm(v,S.value,S.defaultValue,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name)}}for(u=0;u<p.length;u++)v=p[u],v.form===l.form&&fA(v)}break e;case"textarea":hA(l,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&el(l,!!p.multiple,u,!1)}}}var $m=!1;function yA(l,u,p){if($m)return l(u,p);$m=!0;try{var v=l(u);return v}finally{if($m=!1,(rl!==null||nl!==null)&&(Wf(),rl&&(u=rl,l=nl,nl=rl=null,gA(u),l)))for(u=0;u<l.length;u++)gA(l[u])}}function Ts(l,u){var p=l.stateNode;if(p===null)return null;var v=p[_r]||null;if(v===null)return null;p=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(l=l.type,v=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!v;break e;default:l=!1}if(l)return null;if(p&&typeof p!="function")throw Error(a(231,u,typeof p));return p}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fm=!1;if(va)try{var Ns={};Object.defineProperty(Ns,"passive",{get:function(){Fm=!0}}),window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch{Fm=!1}var ci=null,Um=null,cf=null;function bA(){if(cf)return cf;var l,u=Um,p=u.length,v,S="value"in ci?ci.value:ci.textContent,A=S.length;for(l=0;l<p&&u[l]===S[l];l++);var P=p-l;for(v=1;v<=P&&u[p-v]===S[A-v];v++);return cf=S.slice(l,1<v?1-v:void 0)}function ff(l){var u=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&u===13&&(l=13)):l=u,l===10&&(l=13),32<=l||l===13?l:0}function df(){return!0}function xA(){return!1}function wr(l){function u(p,v,S,A,P){this._reactName=p,this._targetInst=S,this.type=v,this.nativeEvent=A,this.target=P,this.currentTarget=null;for(var I in l)l.hasOwnProperty(I)&&(p=l[I],this[I]=p?p(A):A[I]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?df:xA,this.isPropagationStopped=xA,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=df)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=df)},persist:function(){},isPersistent:df}),u}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hf=wr(Zi),Ms=m({},Zi,{view:0,detail:0}),NF=wr(Ms),Hm,Gm,Ps,pf=m({},Ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Km,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!==Ps&&(Ps&&l.type==="mousemove"?(Hm=l.screenX-Ps.screenX,Gm=l.screenY-Ps.screenY):Gm=Hm=0,Ps=l),Hm)},movementY:function(l){return"movementY"in l?l.movementY:Gm}}),_A=wr(pf),MF=m({},pf,{dataTransfer:0}),PF=wr(MF),RF=m({},Ms,{relatedTarget:0}),Vm=wr(RF),DF=m({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),LF=wr(DF),IF=m({},Zi,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),zF=wr(IF),qF=m({},Zi,{data:0}),wA=wr(qF),BF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$F={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"},FF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UF(l){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(l):(l=FF[l])?!!u[l]:!1}function Km(){return UF}var HF=m({},Ms,{key:function(l){if(l.key){var u=BF[l.key]||l.key;if(u!=="Unidentified")return u}return l.type==="keypress"?(l=ff(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?$F[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Km,charCode:function(l){return l.type==="keypress"?ff(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?ff(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),GF=wr(HF),VF=m({},pf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SA=wr(VF),KF=m({},Ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Km}),YF=wr(KF),XF=m({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),WF=wr(XF),ZF=m({},pf,{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}),QF=wr(ZF),JF=m({},Zi,{newState:0,oldState:0}),eU=wr(JF),tU=[9,13,27,32],Ym=va&&"CompositionEvent"in window,Rs=null;va&&"documentMode"in document&&(Rs=document.documentMode);var rU=va&&"TextEvent"in window&&!Rs,EA=va&&(!Ym||Rs&&8<Rs&&11>=Rs),kA=" ",AA=!1;function jA(l,u){switch(l){case"keyup":return tU.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CA(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var al=!1;function nU(l,u){switch(l){case"compositionend":return CA(u);case"keypress":return u.which!==32?null:(AA=!0,kA);case"textInput":return l=u.data,l===kA&&AA?null:l;default:return null}}function aU(l,u){if(al)return l==="compositionend"||!Ym&&jA(l,u)?(l=bA(),cf=Um=ci=null,al=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return EA&&u.locale!=="ko"?null:u.data;default:return null}}var iU={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 OA(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u==="input"?!!iU[l.type]:u==="textarea"}function TA(l,u,p,v){rl?nl?nl.push(v):nl=[v]:rl=v,u=nd(u,"onChange"),0<u.length&&(p=new hf("onChange","change",null,p,v),l.push({event:p,listeners:u}))}var Ds=null,Ls=null;function oU(l){dO(l,0)}function mf(l){var u=Os(l);if(fA(u))return l}function NA(l,u){if(l==="change")return u}var MA=!1;if(va){var Xm;if(va){var Wm="oninput"in document;if(!Wm){var PA=document.createElement("div");PA.setAttribute("oninput","return;"),Wm=typeof PA.oninput=="function"}Xm=Wm}else Xm=!1;MA=Xm&&(!document.documentMode||9<document.documentMode)}function RA(){Ds&&(Ds.detachEvent("onpropertychange",DA),Ls=Ds=null)}function DA(l){if(l.propertyName==="value"&&mf(Ls)){var u=[];TA(u,Ls,l,Bm(l)),yA(oU,u)}}function lU(l,u,p){l==="focusin"?(RA(),Ds=u,Ls=p,Ds.attachEvent("onpropertychange",DA)):l==="focusout"&&RA()}function sU(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return mf(Ls)}function uU(l,u){if(l==="click")return mf(u)}function cU(l,u){if(l==="input"||l==="change")return mf(u)}function fU(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var Rr=typeof Object.is=="function"?Object.is:fU;function Is(l,u){if(Rr(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var p=Object.keys(l),v=Object.keys(u);if(p.length!==v.length)return!1;for(v=0;v<p.length;v++){var S=p[v];if(!Yr.call(u,S)||!Rr(l[S],u[S]))return!1}return!0}function LA(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function IA(l,u){var p=LA(l);l=0;for(var v;p;){if(p.nodeType===3){if(v=l+p.textContent.length,l<=u&&v>=u)return{node:p,offset:u-l};l=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=LA(p)}}function zA(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?zA(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function qA(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var u=sf(l.document);u instanceof l.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)l=u.contentWindow;else break;u=sf(l.document)}return u}function Zm(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}var dU=va&&"documentMode"in document&&11>=document.documentMode,il=null,Qm=null,zs=null,Jm=!1;function BA(l,u,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Jm||il==null||il!==sf(v)||(v=il,"selectionStart"in v&&Zm(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),zs&&Is(zs,v)||(zs=v,v=nd(Qm,"onSelect"),0<v.length&&(u=new hf("onSelect","select",null,u,p),l.push({event:u,listeners:v}),u.target=il)))}function Qi(l,u){var p={};return p[l.toLowerCase()]=u.toLowerCase(),p["Webkit"+l]="webkit"+u,p["Moz"+l]="moz"+u,p}var ol={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},ev={},$A={};va&&($A=document.createElement("div").style,"AnimationEvent"in window||(delete ol.animationend.animation,delete ol.animationiteration.animation,delete ol.animationstart.animation),"TransitionEvent"in window||delete ol.transitionend.transition);function Ji(l){if(ev[l])return ev[l];if(!ol[l])return l;var u=ol[l],p;for(p in u)if(u.hasOwnProperty(p)&&p in $A)return ev[l]=u[p];return l}var FA=Ji("animationend"),UA=Ji("animationiteration"),HA=Ji("animationstart"),hU=Ji("transitionrun"),pU=Ji("transitionstart"),mU=Ji("transitioncancel"),GA=Ji("transitionend"),VA=new Map,tv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tv.push("scrollEnd");function En(l,u){VA.set(l,u),Wi(u,[l])}var vf=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Zr=[],ll=0,rv=0;function gf(){for(var l=ll,u=rv=ll=0;u<l;){var p=Zr[u];Zr[u++]=null;var v=Zr[u];Zr[u++]=null;var S=Zr[u];Zr[u++]=null;var A=Zr[u];if(Zr[u++]=null,v!==null&&S!==null){var P=v.pending;P===null?S.next=S:(S.next=P.next,P.next=S),v.pending=S}A!==0&&KA(p,S,A)}}function yf(l,u,p,v){Zr[ll++]=l,Zr[ll++]=u,Zr[ll++]=p,Zr[ll++]=v,rv|=v,l.lanes|=v,l=l.alternate,l!==null&&(l.lanes|=v)}function nv(l,u,p,v){return yf(l,u,p,v),bf(l)}function eo(l,u){return yf(l,null,null,u),bf(l)}function KA(l,u,p){l.lanes|=p;var v=l.alternate;v!==null&&(v.lanes|=p);for(var S=!1,A=l.return;A!==null;)A.childLanes|=p,v=A.alternate,v!==null&&(v.childLanes|=p),A.tag===22&&(l=A.stateNode,l===null||l._visibility&1||(S=!0)),l=A,A=A.return;return l.tag===3?(A=l.stateNode,S&&u!==null&&(S=31-Pr(p),l=A.hiddenUpdates,v=l[S],v===null?l[S]=[u]:v.push(u),u.lane=p|536870912),A):null}function bf(l){if(50<ou)throw ou=0,dg=null,Error(a(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}var sl={};function vU(l,u,p,v){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dr(l,u,p,v){return new vU(l,u,p,v)}function av(l){return l=l.prototype,!(!l||!l.isReactComponent)}function ga(l,u){var p=l.alternate;return p===null?(p=Dr(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&65011712,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p.refCleanup=l.refCleanup,p}function YA(l,u){l.flags&=65011714;var p=l.alternate;return p===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=p.childLanes,l.lanes=p.lanes,l.child=p.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=p.memoizedProps,l.memoizedState=p.memoizedState,l.updateQueue=p.updateQueue,l.type=p.type,u=p.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function xf(l,u,p,v,S,A){var P=0;if(v=l,typeof l=="function")av(l)&&(P=1);else if(typeof l=="string")P=_H(l,p,$.current)?26:l==="html"||l==="head"||l==="body"?27:5;else e:switch(l){case L:return l=Dr(31,p,u,S),l.elementType=L,l.lanes=A,l;case E:return to(p.children,S,A,u);case w:P=8,S|=24;break;case x:return l=Dr(12,p,u,S|2),l.elementType=x,l.lanes=A,l;case O:return l=Dr(13,p,u,S),l.elementType=O,l.lanes=A,l;case N:return l=Dr(19,p,u,S),l.elementType=N,l.lanes=A,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case C:P=10;break e;case j:P=9;break e;case T:P=11;break e;case M:P=14;break e;case R:P=16,v=null;break e}P=29,p=Error(a(130,l===null?"null":typeof l,"")),v=null}return u=Dr(P,p,u,S),u.elementType=l,u.type=v,u.lanes=A,u}function to(l,u,p,v){return l=Dr(7,l,v,u),l.lanes=p,l}function iv(l,u,p){return l=Dr(6,l,null,u),l.lanes=p,l}function XA(l){var u=Dr(18,null,null,0);return u.stateNode=l,u}function ov(l,u,p){return u=Dr(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}var WA=new WeakMap;function Qr(l,u){if(typeof l=="object"&&l!==null){var p=WA.get(l);return p!==void 0?p:(u={value:l,source:u,stack:Ke(u)},WA.set(l,u),u)}return{value:l,source:u,stack:Ke(u)}}var ul=[],cl=0,_f=null,qs=0,Jr=[],en=0,fi=null,Bn=1,$n="";function ya(l,u){ul[cl++]=qs,ul[cl++]=_f,_f=l,qs=u}function ZA(l,u,p){Jr[en++]=Bn,Jr[en++]=$n,Jr[en++]=fi,fi=l;var v=Bn;l=$n;var S=32-Pr(v)-1;v&=~(1<<S),p+=1;var A=32-Pr(u)+S;if(30<A){var P=S-S%5;A=(v&(1<<P)-1).toString(32),v>>=P,S-=P,Bn=1<<32-Pr(u)+S|p<<S|v,$n=A+l}else Bn=1<<A|p<<S|v,$n=l}function lv(l){l.return!==null&&(ya(l,1),ZA(l,1,0))}function sv(l){for(;l===_f;)_f=ul[--cl],ul[cl]=null,qs=ul[--cl],ul[cl]=null;for(;l===fi;)fi=Jr[--en],Jr[en]=null,$n=Jr[--en],Jr[en]=null,Bn=Jr[--en],Jr[en]=null}function QA(l,u){Jr[en++]=Bn,Jr[en++]=$n,Jr[en++]=fi,Bn=u.id,$n=u.overflow,fi=l}var Kt=null,it=null,Be=!1,di=null,tn=!1,uv=Error(a(519));function hi(l){var u=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bs(Qr(u,l)),uv}function JA(l){var u=l.stateNode,p=l.type,v=l.memoizedProps;switch(u[Vt]=l,u[_r]=v,p){case"dialog":Ie("cancel",u),Ie("close",u);break;case"iframe":case"object":case"embed":Ie("load",u);break;case"video":case"audio":for(p=0;p<su.length;p++)Ie(su[p],u);break;case"source":Ie("error",u);break;case"img":case"image":case"link":Ie("error",u),Ie("load",u);break;case"details":Ie("toggle",u);break;case"input":Ie("invalid",u),dA(u,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Ie("invalid",u);break;case"textarea":Ie("invalid",u),pA(u,v.value,v.defaultValue,v.children)}p=v.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||v.suppressHydrationWarning===!0||vO(u.textContent,p)?(v.popover!=null&&(Ie("beforetoggle",u),Ie("toggle",u)),v.onScroll!=null&&Ie("scroll",u),v.onScrollEnd!=null&&Ie("scrollend",u),v.onClick!=null&&(u.onclick=ma),u=!0):u=!1,u||hi(l,!0)}function ej(l){for(Kt=l.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:tn=!1;return;case 27:case 3:tn=!0;return;default:Kt=Kt.return}}function fl(l){if(l!==Kt)return!1;if(!Be)return ej(l),Be=!0,!1;var u=l.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=l.type,p=!(p!=="form"&&p!=="button")||jg(l.type,l.memoizedProps)),p=!p),p&&it&&hi(l),ej(l),u===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));it=kO(l)}else if(u===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));it=kO(l)}else u===27?(u=it,ji(l.type)?(l=Mg,Mg=null,it=l):it=u):it=Kt?nn(l.stateNode.nextSibling):null;return!0}function ro(){it=Kt=null,Be=!1}function cv(){var l=di;return l!==null&&(Ar===null?Ar=l:Ar.push.apply(Ar,l),di=null),l}function Bs(l){di===null?di=[l]:di.push(l)}var fv=U(null),no=null,ba=null;function pi(l,u,p){le(fv,u._currentValue),u._currentValue=p}function xa(l){l._currentValue=fv.current,J(fv)}function dv(l,u,p){for(;l!==null;){var v=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),l===p)break;l=l.return}}function hv(l,u,p,v){var S=l.child;for(S!==null&&(S.return=l);S!==null;){var A=S.dependencies;if(A!==null){var P=S.child;A=A.firstContext;e:for(;A!==null;){var I=A;A=S;for(var V=0;V<u.length;V++)if(I.context===u[V]){A.lanes|=p,I=A.alternate,I!==null&&(I.lanes|=p),dv(A.return,p,l),v||(P=null);break e}A=I.next}}else if(S.tag===18){if(P=S.return,P===null)throw Error(a(341));P.lanes|=p,A=P.alternate,A!==null&&(A.lanes|=p),dv(P,p,l),P=null}else P=S.child;if(P!==null)P.return=S;else for(P=S;P!==null;){if(P===l){P=null;break}if(S=P.sibling,S!==null){S.return=P.return,P=S;break}P=P.return}S=P}}function dl(l,u,p,v){l=null;for(var S=u,A=!1;S!==null;){if(!A){if((S.flags&524288)!==0)A=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var P=S.alternate;if(P===null)throw Error(a(387));if(P=P.memoizedProps,P!==null){var I=S.type;Rr(S.pendingProps.value,P.value)||(l!==null?l.push(I):l=[I])}}else if(S===he.current){if(P=S.alternate,P===null)throw Error(a(387));P.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(l!==null?l.push(hu):l=[hu])}S=S.return}l!==null&&hv(u,l,p,v),u.flags|=262144}function wf(l){for(l=l.firstContext;l!==null;){if(!Rr(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function ao(l){no=l,ba=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Yt(l){return tj(no,l)}function Sf(l,u){return no===null&&ao(l),tj(l,u)}function tj(l,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},ba===null){if(l===null)throw Error(a(308));ba=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else ba=ba.next=u;return p}var gU=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(p,v){l.push(v)}};this.abort=function(){u.aborted=!0,l.forEach(function(p){return p()})}},yU=e.unstable_scheduleCallback,bU=e.unstable_NormalPriority,kt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pv(){return{controller:new gU,data:new Map,refCount:0}}function $s(l){l.refCount--,l.refCount===0&&yU(bU,function(){l.controller.abort()})}var Fs=null,mv=0,hl=0,pl=null;function xU(l,u){if(Fs===null){var p=Fs=[];mv=0,hl=yg(),pl={status:"pending",value:void 0,then:function(v){p.push(v)}}}return mv++,u.then(rj,rj),u}function rj(){if(--mv===0&&Fs!==null){pl!==null&&(pl.status="fulfilled");var l=Fs;Fs=null,hl=0,pl=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function _U(l,u){var p=[],v={status:"pending",value:null,reason:null,then:function(S){p.push(S)}};return l.then(function(){v.status="fulfilled",v.value=u;for(var S=0;S<p.length;S++)(0,p[S])(u)},function(S){for(v.status="rejected",v.reason=S,S=0;S<p.length;S++)(0,p[S])(void 0)}),v}var nj=B.S;B.S=function(l,u){BC=It(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&xU(l,u),nj!==null&&nj(l,u)};var io=U(null);function vv(){var l=io.current;return l!==null?l:tt.pooledCache}function Ef(l,u){u===null?le(io,io.current):le(io,u.pool)}function aj(){var l=vv();return l===null?null:{parent:kt._currentValue,pool:l}}var ml=Error(a(460)),gv=Error(a(474)),kf=Error(a(542)),Af={then:function(){}};function ij(l){return l=l.status,l==="fulfilled"||l==="rejected"}function oj(l,u,p){switch(p=l[p],p===void 0?l.push(u):p!==u&&(u.then(ma,ma),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,sj(l),l;default:if(typeof u.status=="string")u.then(ma,ma);else{if(l=tt,l!==null&&100<l.shellSuspendCounter)throw Error(a(482));l=u,l.status="pending",l.then(function(v){if(u.status==="pending"){var S=u;S.status="fulfilled",S.value=v}},function(v){if(u.status==="pending"){var S=u;S.status="rejected",S.reason=v}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,sj(l),l}throw lo=u,ml}}function oo(l){try{var u=l._init;return u(l._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(lo=p,ml):p}}var lo=null;function lj(){if(lo===null)throw Error(a(459));var l=lo;return lo=null,l}function sj(l){if(l===ml||l===kf)throw Error(a(483))}var vl=null,Us=0;function jf(l){var u=Us;return Us+=1,vl===null&&(vl=[]),oj(vl,l,u)}function Hs(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Cf(l,u){throw u.$$typeof===g?Error(a(525)):(l=Object.prototype.toString.call(u),Error(a(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function uj(l){function u(ne,W){if(l){var ae=ne.deletions;ae===null?(ne.deletions=[W],ne.flags|=16):ae.push(W)}}function p(ne,W){if(!l)return null;for(;W!==null;)u(ne,W),W=W.sibling;return null}function v(ne){for(var W=new Map;ne!==null;)ne.key!==null?W.set(ne.key,ne):W.set(ne.index,ne),ne=ne.sibling;return W}function S(ne,W){return ne=ga(ne,W),ne.index=0,ne.sibling=null,ne}function A(ne,W,ae){return ne.index=ae,l?(ae=ne.alternate,ae!==null?(ae=ae.index,ae<W?(ne.flags|=67108866,W):ae):(ne.flags|=67108866,W)):(ne.flags|=1048576,W)}function P(ne){return l&&ne.alternate===null&&(ne.flags|=67108866),ne}function I(ne,W,ae,me){return W===null||W.tag!==6?(W=iv(ae,ne.mode,me),W.return=ne,W):(W=S(W,ae),W.return=ne,W)}function V(ne,W,ae,me){var Te=ae.type;return Te===E?pe(ne,W,ae.props.children,me,ae.key):W!==null&&(W.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===R&&oo(Te)===W.type)?(W=S(W,ae.props),Hs(W,ae),W.return=ne,W):(W=xf(ae.type,ae.key,ae.props,null,ne.mode,me),Hs(W,ae),W.return=ne,W)}function ie(ne,W,ae,me){return W===null||W.tag!==4||W.stateNode.containerInfo!==ae.containerInfo||W.stateNode.implementation!==ae.implementation?(W=ov(ae,ne.mode,me),W.return=ne,W):(W=S(W,ae.children||[]),W.return=ne,W)}function pe(ne,W,ae,me,Te){return W===null||W.tag!==7?(W=to(ae,ne.mode,me,Te),W.return=ne,W):(W=S(W,ae),W.return=ne,W)}function ve(ne,W,ae){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=iv(""+W,ne.mode,ae),W.return=ne,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return ae=xf(W.type,W.key,W.props,null,ne.mode,ae),Hs(ae,W),ae.return=ne,ae;case _:return W=ov(W,ne.mode,ae),W.return=ne,W;case R:return W=oo(W),ve(ne,W,ae)}if(X(W)||z(W))return W=to(W,ne.mode,ae,null),W.return=ne,W;if(typeof W.then=="function")return ve(ne,jf(W),ae);if(W.$$typeof===C)return ve(ne,Sf(ne,W),ae);Cf(ne,W)}return null}function oe(ne,W,ae,me){var Te=W!==null?W.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Te!==null?null:I(ne,W,""+ae,me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case y:return ae.key===Te?V(ne,W,ae,me):null;case _:return ae.key===Te?ie(ne,W,ae,me):null;case R:return ae=oo(ae),oe(ne,W,ae,me)}if(X(ae)||z(ae))return Te!==null?null:pe(ne,W,ae,me,null);if(typeof ae.then=="function")return oe(ne,W,jf(ae),me);if(ae.$$typeof===C)return oe(ne,W,Sf(ne,ae),me);Cf(ne,ae)}return null}function fe(ne,W,ae,me,Te){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ne=ne.get(ae)||null,I(W,ne,""+me,Te);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case y:return ne=ne.get(me.key===null?ae:me.key)||null,V(W,ne,me,Te);case _:return ne=ne.get(me.key===null?ae:me.key)||null,ie(W,ne,me,Te);case R:return me=oo(me),fe(ne,W,ae,me,Te)}if(X(me)||z(me))return ne=ne.get(ae)||null,pe(W,ne,me,Te,null);if(typeof me.then=="function")return fe(ne,W,ae,jf(me),Te);if(me.$$typeof===C)return fe(ne,W,ae,Sf(W,me),Te);Cf(W,me)}return null}function Ee(ne,W,ae,me){for(var Te=null,Fe=null,Ae=W,Re=W=0,qe=null;Ae!==null&&Re<ae.length;Re++){Ae.index>Re?(qe=Ae,Ae=null):qe=Ae.sibling;var Ue=oe(ne,Ae,ae[Re],me);if(Ue===null){Ae===null&&(Ae=qe);break}l&&Ae&&Ue.alternate===null&&u(ne,Ae),W=A(Ue,W,Re),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue,Ae=qe}if(Re===ae.length)return p(ne,Ae),Be&&ya(ne,Re),Te;if(Ae===null){for(;Re<ae.length;Re++)Ae=ve(ne,ae[Re],me),Ae!==null&&(W=A(Ae,W,Re),Fe===null?Te=Ae:Fe.sibling=Ae,Fe=Ae);return Be&&ya(ne,Re),Te}for(Ae=v(Ae);Re<ae.length;Re++)qe=fe(Ae,ne,Re,ae[Re],me),qe!==null&&(l&&qe.alternate!==null&&Ae.delete(qe.key===null?Re:qe.key),W=A(qe,W,Re),Fe===null?Te=qe:Fe.sibling=qe,Fe=qe);return l&&Ae.forEach(function(Mi){return u(ne,Mi)}),Be&&ya(ne,Re),Te}function Ne(ne,W,ae,me){if(ae==null)throw Error(a(151));for(var Te=null,Fe=null,Ae=W,Re=W=0,qe=null,Ue=ae.next();Ae!==null&&!Ue.done;Re++,Ue=ae.next()){Ae.index>Re?(qe=Ae,Ae=null):qe=Ae.sibling;var Mi=oe(ne,Ae,Ue.value,me);if(Mi===null){Ae===null&&(Ae=qe);break}l&&Ae&&Mi.alternate===null&&u(ne,Ae),W=A(Mi,W,Re),Fe===null?Te=Mi:Fe.sibling=Mi,Fe=Mi,Ae=qe}if(Ue.done)return p(ne,Ae),Be&&ya(ne,Re),Te;if(Ae===null){for(;!Ue.done;Re++,Ue=ae.next())Ue=ve(ne,Ue.value,me),Ue!==null&&(W=A(Ue,W,Re),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue);return Be&&ya(ne,Re),Te}for(Ae=v(Ae);!Ue.done;Re++,Ue=ae.next())Ue=fe(Ae,ne,Re,Ue.value,me),Ue!==null&&(l&&Ue.alternate!==null&&Ae.delete(Ue.key===null?Re:Ue.key),W=A(Ue,W,Re),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue);return l&&Ae.forEach(function(MH){return u(ne,MH)}),Be&&ya(ne,Re),Te}function Qe(ne,W,ae,me){if(typeof ae=="object"&&ae!==null&&ae.type===E&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case y:e:{for(var Te=ae.key;W!==null;){if(W.key===Te){if(Te=ae.type,Te===E){if(W.tag===7){p(ne,W.sibling),me=S(W,ae.props.children),me.return=ne,ne=me;break e}}else if(W.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===R&&oo(Te)===W.type){p(ne,W.sibling),me=S(W,ae.props),Hs(me,ae),me.return=ne,ne=me;break e}p(ne,W);break}else u(ne,W);W=W.sibling}ae.type===E?(me=to(ae.props.children,ne.mode,me,ae.key),me.return=ne,ne=me):(me=xf(ae.type,ae.key,ae.props,null,ne.mode,me),Hs(me,ae),me.return=ne,ne=me)}return P(ne);case _:e:{for(Te=ae.key;W!==null;){if(W.key===Te)if(W.tag===4&&W.stateNode.containerInfo===ae.containerInfo&&W.stateNode.implementation===ae.implementation){p(ne,W.sibling),me=S(W,ae.children||[]),me.return=ne,ne=me;break e}else{p(ne,W);break}else u(ne,W);W=W.sibling}me=ov(ae,ne.mode,me),me.return=ne,ne=me}return P(ne);case R:return ae=oo(ae),Qe(ne,W,ae,me)}if(X(ae))return Ee(ne,W,ae,me);if(z(ae)){if(Te=z(ae),typeof Te!="function")throw Error(a(150));return ae=Te.call(ae),Ne(ne,W,ae,me)}if(typeof ae.then=="function")return Qe(ne,W,jf(ae),me);if(ae.$$typeof===C)return Qe(ne,W,Sf(ne,ae),me);Cf(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,W!==null&&W.tag===6?(p(ne,W.sibling),me=S(W,ae),me.return=ne,ne=me):(p(ne,W),me=iv(ae,ne.mode,me),me.return=ne,ne=me),P(ne)):p(ne,W)}return function(ne,W,ae,me){try{Us=0;var Te=Qe(ne,W,ae,me);return vl=null,Te}catch(Ae){if(Ae===ml||Ae===kf)throw Ae;var Fe=Dr(29,Ae,null,ne.mode);return Fe.lanes=me,Fe.return=ne,Fe}finally{}}}var so=uj(!0),cj=uj(!1),mi=!1;function yv(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bv(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function vi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function gi(l,u,p){var v=l.updateQueue;if(v===null)return null;if(v=v.shared,(Ge&2)!==0){var S=v.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),v.pending=u,u=bf(l),KA(l,null,p),u}return yf(l,v,u,p),bf(l)}function Gs(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var v=u.lanes;v&=l.pendingLanes,p|=v,u.lanes=p,tA(l,p)}}function xv(l,u){var p=l.updateQueue,v=l.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var S=null,A=null;if(p=p.firstBaseUpdate,p!==null){do{var P={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};A===null?S=A=P:A=A.next=P,p=p.next}while(p!==null);A===null?S=A=u:A=A.next=u}else S=A=u;p={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:A,shared:v.shared,callbacks:v.callbacks},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}var _v=!1;function Vs(){if(_v){var l=pl;if(l!==null)throw l}}function Ks(l,u,p,v){_v=!1;var S=l.updateQueue;mi=!1;var A=S.firstBaseUpdate,P=S.lastBaseUpdate,I=S.shared.pending;if(I!==null){S.shared.pending=null;var V=I,ie=V.next;V.next=null,P===null?A=ie:P.next=ie,P=V;var pe=l.alternate;pe!==null&&(pe=pe.updateQueue,I=pe.lastBaseUpdate,I!==P&&(I===null?pe.firstBaseUpdate=ie:I.next=ie,pe.lastBaseUpdate=V))}if(A!==null){var ve=S.baseState;P=0,pe=ie=V=null,I=A;do{var oe=I.lane&-536870913,fe=oe!==I.lane;if(fe?(ze&oe)===oe:(v&oe)===oe){oe!==0&&oe===hl&&(_v=!0),pe!==null&&(pe=pe.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var Ee=l,Ne=I;oe=u;var Qe=p;switch(Ne.tag){case 1:if(Ee=Ne.payload,typeof Ee=="function"){ve=Ee.call(Qe,ve,oe);break e}ve=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Ne.payload,oe=typeof Ee=="function"?Ee.call(Qe,ve,oe):Ee,oe==null)break e;ve=m({},ve,oe);break e;case 2:mi=!0}}oe=I.callback,oe!==null&&(l.flags|=64,fe&&(l.flags|=8192),fe=S.callbacks,fe===null?S.callbacks=[oe]:fe.push(oe))}else fe={lane:oe,tag:I.tag,payload:I.payload,callback:I.callback,next:null},pe===null?(ie=pe=fe,V=ve):pe=pe.next=fe,P|=oe;if(I=I.next,I===null){if(I=S.shared.pending,I===null)break;fe=I,I=fe.next,fe.next=null,S.lastBaseUpdate=fe,S.shared.pending=null}}while(!0);pe===null&&(V=ve),S.baseState=V,S.firstBaseUpdate=ie,S.lastBaseUpdate=pe,A===null&&(S.shared.lanes=0),wi|=P,l.lanes=P,l.memoizedState=ve}}function fj(l,u){if(typeof l!="function")throw Error(a(191,l));l.call(u)}function dj(l,u){var p=l.callbacks;if(p!==null)for(l.callbacks=null,l=0;l<p.length;l++)fj(p[l],u)}var gl=U(null),Of=U(0);function hj(l,u){l=Oa,le(Of,l),le(gl,u),Oa=l|u.baseLanes}function wv(){le(Of,Oa),le(gl,gl.current)}function Sv(){Oa=Of.current,J(gl),J(Of)}var Lr=U(null),rn=null;function yi(l){var u=l.alternate;le(wt,wt.current&1),le(Lr,l),rn===null&&(u===null||gl.current!==null||u.memoizedState!==null)&&(rn=l)}function Ev(l){le(wt,wt.current),le(Lr,l),rn===null&&(rn=l)}function pj(l){l.tag===22?(le(wt,wt.current),le(Lr,l),rn===null&&(rn=l)):bi()}function bi(){le(wt,wt.current),le(Lr,Lr.current)}function Ir(l){J(Lr),rn===l&&(rn=null),J(wt)}var wt=U(0);function Tf(l){for(var u=l;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Tg(p)||Ng(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var _a=0,Pe=null,We=null,At=null,Nf=!1,yl=!1,uo=!1,Mf=0,Ys=0,bl=null,wU=0;function gt(){throw Error(a(321))}function kv(l,u){if(u===null)return!1;for(var p=0;p<u.length&&p<l.length;p++)if(!Rr(l[p],u[p]))return!1;return!0}function Av(l,u,p,v,S,A){return _a=A,Pe=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,B.H=l===null||l.memoizedState===null?Zj:$v,uo=!1,A=p(v,S),uo=!1,yl&&(A=vj(u,p,v,S)),mj(l),A}function mj(l){B.H=Zs;var u=We!==null&&We.next!==null;if(_a=0,At=We=Pe=null,Nf=!1,Ys=0,bl=null,u)throw Error(a(300));l===null||jt||(l=l.dependencies,l!==null&&wf(l)&&(jt=!0))}function vj(l,u,p,v){Pe=l;var S=0;do{if(yl&&(bl=null),Ys=0,yl=!1,25<=S)throw Error(a(301));if(S+=1,At=We=null,l.updateQueue!=null){var A=l.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}B.H=Qj,A=u(p,v)}while(yl);return A}function SU(){var l=B.H,u=l.useState()[0];return u=typeof u.then=="function"?Xs(u):u,l=l.useState()[0],(We!==null?We.memoizedState:null)!==l&&(Pe.flags|=1024),u}function jv(){var l=Mf!==0;return Mf=0,l}function Cv(l,u,p){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~p}function Ov(l){if(Nf){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}Nf=!1}_a=0,At=We=Pe=null,yl=!1,Ys=Mf=0,bl=null}function fr(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Pe.memoizedState=At=l:At=At.next=l,At}function St(){if(We===null){var l=Pe.alternate;l=l!==null?l.memoizedState:null}else l=We.next;var u=At===null?Pe.memoizedState:At.next;if(u!==null)At=u,We=l;else{if(l===null)throw Pe.alternate===null?Error(a(467)):Error(a(310));We=l,l={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},At===null?Pe.memoizedState=At=l:At=At.next=l}return At}function Pf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(l){var u=Ys;return Ys+=1,bl===null&&(bl=[]),l=oj(bl,l,u),u=Pe,(At===null?u.memoizedState:At.next)===null&&(u=u.alternate,B.H=u===null||u.memoizedState===null?Zj:$v),l}function Rf(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Xs(l);if(l.$$typeof===C)return Yt(l)}throw Error(a(438,String(l)))}function Tv(l){var u=null,p=Pe.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var v=Pe.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(u={data:v.data.map(function(S){return S.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=Pf(),Pe.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(l),v=0;v<l;v++)p[v]=D;return u.index++,p}function wa(l,u){return typeof u=="function"?u(l):u}function Df(l){var u=St();return Nv(u,We,l)}function Nv(l,u,p){var v=l.queue;if(v===null)throw Error(a(311));v.lastRenderedReducer=p;var S=l.baseQueue,A=v.pending;if(A!==null){if(S!==null){var P=S.next;S.next=A.next,A.next=P}u.baseQueue=S=A,v.pending=null}if(A=l.baseState,S===null)l.memoizedState=A;else{u=S.next;var I=P=null,V=null,ie=u,pe=!1;do{var ve=ie.lane&-536870913;if(ve!==ie.lane?(ze&ve)===ve:(_a&ve)===ve){var oe=ie.revertLane;if(oe===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ve===hl&&(pe=!0);else if((_a&oe)===oe){ie=ie.next,oe===hl&&(pe=!0);continue}else ve={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},V===null?(I=V=ve,P=A):V=V.next=ve,Pe.lanes|=oe,wi|=oe;ve=ie.action,uo&&p(A,ve),A=ie.hasEagerState?ie.eagerState:p(A,ve)}else oe={lane:ve,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},V===null?(I=V=oe,P=A):V=V.next=oe,Pe.lanes|=ve,wi|=ve;ie=ie.next}while(ie!==null&&ie!==u);if(V===null?P=A:V.next=I,!Rr(A,l.memoizedState)&&(jt=!0,pe&&(p=pl,p!==null)))throw p;l.memoizedState=A,l.baseState=P,l.baseQueue=V,v.lastRenderedState=A}return S===null&&(v.lanes=0),[l.memoizedState,v.dispatch]}function Mv(l){var u=St(),p=u.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=l;var v=p.dispatch,S=p.pending,A=u.memoizedState;if(S!==null){p.pending=null;var P=S=S.next;do A=l(A,P.action),P=P.next;while(P!==S);Rr(A,u.memoizedState)||(jt=!0),u.memoizedState=A,u.baseQueue===null&&(u.baseState=A),p.lastRenderedState=A}return[A,v]}function gj(l,u,p){var v=Pe,S=St(),A=Be;if(A){if(p===void 0)throw Error(a(407));p=p()}else p=u();var P=!Rr((We||S).memoizedState,p);if(P&&(S.memoizedState=p,jt=!0),S=S.queue,Dv(xj.bind(null,v,S,l),[l]),S.getSnapshot!==u||P||At!==null&&At.memoizedState.tag&1){if(v.flags|=2048,xl(9,{destroy:void 0},bj.bind(null,v,S,p,u),null),tt===null)throw Error(a(349));A||(_a&127)!==0||yj(v,u,p)}return p}function yj(l,u,p){l.flags|=16384,l={getSnapshot:u,value:p},u=Pe.updateQueue,u===null?(u=Pf(),Pe.updateQueue=u,u.stores=[l]):(p=u.stores,p===null?u.stores=[l]:p.push(l))}function bj(l,u,p,v){u.value=p,u.getSnapshot=v,_j(u)&&wj(l)}function xj(l,u,p){return p(function(){_j(u)&&wj(l)})}function _j(l){var u=l.getSnapshot;l=l.value;try{var p=u();return!Rr(l,p)}catch{return!0}}function wj(l){var u=eo(l,2);u!==null&&jr(u,l,2)}function Pv(l){var u=fr();if(typeof l=="function"){var p=l;if(l=p(),uo){si(!0);try{p()}finally{si(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:l},u}function Sj(l,u,p,v){return l.baseState=p,Nv(l,We,typeof v=="function"?v:wa)}function EU(l,u,p,v,S){if(zf(l))throw Error(a(485));if(l=u.action,l!==null){var A={payload:S,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){A.listeners.push(P)}};B.T!==null?p(!0):A.isTransition=!1,v(A),p=u.pending,p===null?(A.next=u.pending=A,Ej(u,A)):(A.next=p.next,u.pending=p.next=A)}}function Ej(l,u){var p=u.action,v=u.payload,S=l.state;if(u.isTransition){var A=B.T,P={};B.T=P;try{var I=p(S,v),V=B.S;V!==null&&V(P,I),kj(l,u,I)}catch(ie){Rv(l,u,ie)}finally{A!==null&&P.types!==null&&(A.types=P.types),B.T=A}}else try{A=p(S,v),kj(l,u,A)}catch(ie){Rv(l,u,ie)}}function kj(l,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){Aj(l,u,v)},function(v){return Rv(l,u,v)}):Aj(l,u,p)}function Aj(l,u,p){u.status="fulfilled",u.value=p,jj(u),l.state=p,u=l.pending,u!==null&&(p=u.next,p===u?l.pending=null:(p=p.next,u.next=p,Ej(l,p)))}function Rv(l,u,p){var v=l.pending;if(l.pending=null,v!==null){v=v.next;do u.status="rejected",u.reason=p,jj(u),u=u.next;while(u!==v)}l.action=null}function jj(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function Cj(l,u){return u}function Oj(l,u){if(Be){var p=tt.formState;if(p!==null){e:{var v=Pe;if(Be){if(it){t:{for(var S=it,A=tn;S.nodeType!==8;){if(!A){S=null;break t}if(S=nn(S.nextSibling),S===null){S=null;break t}}A=S.data,S=A==="F!"||A==="F"?S:null}if(S){it=nn(S.nextSibling),v=S.data==="F!";break e}}hi(v)}v=!1}v&&(u=p[0])}}return p=fr(),p.memoizedState=p.baseState=u,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cj,lastRenderedState:u},p.queue=v,p=Yj.bind(null,Pe,v),v.dispatch=p,v=Pv(!1),A=Bv.bind(null,Pe,!1,v.queue),v=fr(),S={state:u,dispatch:null,action:l,pending:null},v.queue=S,p=EU.bind(null,Pe,S,A,p),S.dispatch=p,v.memoizedState=l,[u,p,!1]}function Tj(l){var u=St();return Nj(u,We,l)}function Nj(l,u,p){if(u=Nv(l,u,Cj)[0],l=Df(wa)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var v=Xs(u)}catch(P){throw P===ml?kf:P}else v=u;u=St();var S=u.queue,A=S.dispatch;return p!==u.memoizedState&&(Pe.flags|=2048,xl(9,{destroy:void 0},kU.bind(null,S,p),null)),[v,A,l]}function kU(l,u){l.action=u}function Mj(l){var u=St(),p=We;if(p!==null)return Nj(u,p,l);St(),u=u.memoizedState,p=St();var v=p.queue.dispatch;return p.memoizedState=l,[u,v,!1]}function xl(l,u,p,v){return l={tag:l,create:p,deps:v,inst:u,next:null},u=Pe.updateQueue,u===null&&(u=Pf(),Pe.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=l.next=l:(v=p.next,p.next=l,l.next=v,u.lastEffect=l),l}function Pj(){return St().memoizedState}function Lf(l,u,p,v){var S=fr();Pe.flags|=l,S.memoizedState=xl(1|u,{destroy:void 0},p,v===void 0?null:v)}function If(l,u,p,v){var S=St();v=v===void 0?null:v;var A=S.memoizedState.inst;We!==null&&v!==null&&kv(v,We.memoizedState.deps)?S.memoizedState=xl(u,A,p,v):(Pe.flags|=l,S.memoizedState=xl(1|u,A,p,v))}function Rj(l,u){Lf(8390656,8,l,u)}function Dv(l,u){If(2048,8,l,u)}function AU(l){Pe.flags|=4;var u=Pe.updateQueue;if(u===null)u=Pf(),Pe.updateQueue=u,u.events=[l];else{var p=u.events;p===null?u.events=[l]:p.push(l)}}function Dj(l){var u=St().memoizedState;return AU({ref:u,nextImpl:l}),function(){if((Ge&2)!==0)throw Error(a(440));return u.impl.apply(void 0,arguments)}}function Lj(l,u){return If(4,2,l,u)}function Ij(l,u){return If(4,4,l,u)}function zj(l,u){if(typeof u=="function"){l=l();var p=u(l);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function qj(l,u,p){p=p!=null?p.concat([l]):null,If(4,4,zj.bind(null,u,l),p)}function Lv(){}function Bj(l,u){var p=St();u=u===void 0?null:u;var v=p.memoizedState;return u!==null&&kv(u,v[1])?v[0]:(p.memoizedState=[l,u],l)}function $j(l,u){var p=St();u=u===void 0?null:u;var v=p.memoizedState;if(u!==null&&kv(u,v[1]))return v[0];if(v=l(),uo){si(!0);try{l()}finally{si(!1)}}return p.memoizedState=[v,u],v}function Iv(l,u,p){return p===void 0||(_a&1073741824)!==0&&(ze&261930)===0?l.memoizedState=u:(l.memoizedState=p,l=FC(),Pe.lanes|=l,wi|=l,p)}function Fj(l,u,p,v){return Rr(p,u)?p:gl.current!==null?(l=Iv(l,p,v),Rr(l,u)||(jt=!0),l):(_a&42)===0||(_a&1073741824)!==0&&(ze&261930)===0?(jt=!0,l.memoizedState=p):(l=FC(),Pe.lanes|=l,wi|=l,u)}function Uj(l,u,p,v,S){var A=Q.p;Q.p=A!==0&&8>A?A:8;var P=B.T,I={};B.T=I,Bv(l,!1,u,p);try{var V=S(),ie=B.S;if(ie!==null&&ie(I,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var pe=_U(V,v);Ws(l,u,pe,Br(l))}else Ws(l,u,v,Br(l))}catch(ve){Ws(l,u,{then:function(){},status:"rejected",reason:ve},Br())}finally{Q.p=A,P!==null&&I.types!==null&&(P.types=I.types),B.T=P}}function jU(){}function zv(l,u,p,v){if(l.tag!==5)throw Error(a(476));var S=Hj(l).queue;Uj(l,S,u,te,p===null?jU:function(){return Gj(l),p(v)})}function Hj(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:te},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:p},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function Gj(l){var u=Hj(l);u.next===null&&(u=l.alternate.memoizedState),Ws(l,u.next.queue,{},Br())}function qv(){return Yt(hu)}function Vj(){return St().memoizedState}function Kj(){return St().memoizedState}function CU(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var p=Br();l=vi(p);var v=gi(u,l,p);v!==null&&(jr(v,u,p),Gs(v,u,p)),u={cache:pv()},l.payload=u;return}u=u.return}}function OU(l,u,p){var v=Br();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},zf(l)?Xj(u,p):(p=nv(l,u,p,v),p!==null&&(jr(p,l,v),Wj(p,u,v)))}function Yj(l,u,p){var v=Br();Ws(l,u,p,v)}function Ws(l,u,p,v){var S={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(zf(l))Xj(u,S);else{var A=l.alternate;if(l.lanes===0&&(A===null||A.lanes===0)&&(A=u.lastRenderedReducer,A!==null))try{var P=u.lastRenderedState,I=A(P,p);if(S.hasEagerState=!0,S.eagerState=I,Rr(I,P))return yf(l,u,S,0),tt===null&&gf(),!1}catch{}finally{}if(p=nv(l,u,S,v),p!==null)return jr(p,l,v),Wj(p,u,v),!0}return!1}function Bv(l,u,p,v){if(v={lane:2,revertLane:yg(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},zf(l)){if(u)throw Error(a(479))}else u=nv(l,p,v,2),u!==null&&jr(u,l,2)}function zf(l){var u=l.alternate;return l===Pe||u!==null&&u===Pe}function Xj(l,u){yl=Nf=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function Wj(l,u,p){if((p&4194048)!==0){var v=u.lanes;v&=l.pendingLanes,p|=v,u.lanes=p,tA(l,p)}}var Zs={readContext:Yt,use:Rf,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Zs.useEffectEvent=gt;var Zj={readContext:Yt,use:Rf,useCallback:function(l,u){return fr().memoizedState=[l,u===void 0?null:u],l},useContext:Yt,useEffect:Rj,useImperativeHandle:function(l,u,p){p=p!=null?p.concat([l]):null,Lf(4194308,4,zj.bind(null,u,l),p)},useLayoutEffect:function(l,u){return Lf(4194308,4,l,u)},useInsertionEffect:function(l,u){Lf(4,2,l,u)},useMemo:function(l,u){var p=fr();u=u===void 0?null:u;var v=l();if(uo){si(!0);try{l()}finally{si(!1)}}return p.memoizedState=[v,u],v},useReducer:function(l,u,p){var v=fr();if(p!==void 0){var S=p(u);if(uo){si(!0);try{p(u)}finally{si(!1)}}}else S=u;return v.memoizedState=v.baseState=S,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:S},v.queue=l,l=l.dispatch=OU.bind(null,Pe,l),[v.memoizedState,l]},useRef:function(l){var u=fr();return l={current:l},u.memoizedState=l},useState:function(l){l=Pv(l);var u=l.queue,p=Yj.bind(null,Pe,u);return u.dispatch=p,[l.memoizedState,p]},useDebugValue:Lv,useDeferredValue:function(l,u){var p=fr();return Iv(p,l,u)},useTransition:function(){var l=Pv(!1);return l=Uj.bind(null,Pe,l.queue,!0,!1),fr().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,p){var v=Pe,S=fr();if(Be){if(p===void 0)throw Error(a(407));p=p()}else{if(p=u(),tt===null)throw Error(a(349));(ze&127)!==0||yj(v,u,p)}S.memoizedState=p;var A={value:p,getSnapshot:u};return S.queue=A,Rj(xj.bind(null,v,A,l),[l]),v.flags|=2048,xl(9,{destroy:void 0},bj.bind(null,v,A,p,u),null),p},useId:function(){var l=fr(),u=tt.identifierPrefix;if(Be){var p=$n,v=Bn;p=(v&~(1<<32-Pr(v)-1)).toString(32)+p,u="_"+u+"R_"+p,p=Mf++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=wU++,u="_"+u+"r_"+p.toString(32)+"_";return l.memoizedState=u},useHostTransitionStatus:qv,useFormState:Oj,useActionState:Oj,useOptimistic:function(l){var u=fr();u.memoizedState=u.baseState=l;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=Bv.bind(null,Pe,!0,p),p.dispatch=u,[l,u]},useMemoCache:Tv,useCacheRefresh:function(){return fr().memoizedState=CU.bind(null,Pe)},useEffectEvent:function(l){var u=fr(),p={impl:l};return u.memoizedState=p,function(){if((Ge&2)!==0)throw Error(a(440));return p.impl.apply(void 0,arguments)}}},$v={readContext:Yt,use:Rf,useCallback:Bj,useContext:Yt,useEffect:Dv,useImperativeHandle:qj,useInsertionEffect:Lj,useLayoutEffect:Ij,useMemo:$j,useReducer:Df,useRef:Pj,useState:function(){return Df(wa)},useDebugValue:Lv,useDeferredValue:function(l,u){var p=St();return Fj(p,We.memoizedState,l,u)},useTransition:function(){var l=Df(wa)[0],u=St().memoizedState;return[typeof l=="boolean"?l:Xs(l),u]},useSyncExternalStore:gj,useId:Vj,useHostTransitionStatus:qv,useFormState:Tj,useActionState:Tj,useOptimistic:function(l,u){var p=St();return Sj(p,We,l,u)},useMemoCache:Tv,useCacheRefresh:Kj};$v.useEffectEvent=Dj;var Qj={readContext:Yt,use:Rf,useCallback:Bj,useContext:Yt,useEffect:Dv,useImperativeHandle:qj,useInsertionEffect:Lj,useLayoutEffect:Ij,useMemo:$j,useReducer:Mv,useRef:Pj,useState:function(){return Mv(wa)},useDebugValue:Lv,useDeferredValue:function(l,u){var p=St();return We===null?Iv(p,l,u):Fj(p,We.memoizedState,l,u)},useTransition:function(){var l=Mv(wa)[0],u=St().memoizedState;return[typeof l=="boolean"?l:Xs(l),u]},useSyncExternalStore:gj,useId:Vj,useHostTransitionStatus:qv,useFormState:Mj,useActionState:Mj,useOptimistic:function(l,u){var p=St();return We!==null?Sj(p,We,l,u):(p.baseState=l,[l,p.queue.dispatch])},useMemoCache:Tv,useCacheRefresh:Kj};Qj.useEffectEvent=Dj;function Fv(l,u,p,v){u=l.memoizedState,p=p(v,u),p=p==null?u:m({},u,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var Uv={enqueueSetState:function(l,u,p){l=l._reactInternals;var v=Br(),S=vi(v);S.payload=u,p!=null&&(S.callback=p),u=gi(l,S,v),u!==null&&(jr(u,l,v),Gs(u,l,v))},enqueueReplaceState:function(l,u,p){l=l._reactInternals;var v=Br(),S=vi(v);S.tag=1,S.payload=u,p!=null&&(S.callback=p),u=gi(l,S,v),u!==null&&(jr(u,l,v),Gs(u,l,v))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var p=Br(),v=vi(p);v.tag=2,u!=null&&(v.callback=u),u=gi(l,v,p),u!==null&&(jr(u,l,p),Gs(u,l,p))}};function Jj(l,u,p,v,S,A,P){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(v,A,P):u.prototype&&u.prototype.isPureReactComponent?!Is(p,v)||!Is(S,A):!0}function eC(l,u,p,v){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,v),u.state!==l&&Uv.enqueueReplaceState(u,u.state,null)}function co(l,u){var p=u;if("ref"in u){p={};for(var v in u)v!=="ref"&&(p[v]=u[v])}if(l=l.defaultProps){p===u&&(p=m({},p));for(var S in l)p[S]===void 0&&(p[S]=l[S])}return p}function tC(l){vf(l)}function rC(l){console.error(l)}function nC(l){vf(l)}function qf(l,u){try{var p=l.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(v){setTimeout(function(){throw v})}}function aC(l,u,p){try{var v=l.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function Hv(l,u,p){return p=vi(p),p.tag=3,p.payload={element:null},p.callback=function(){qf(l,u)},p}function iC(l){return l=vi(l),l.tag=3,l}function oC(l,u,p,v){var S=p.type.getDerivedStateFromError;if(typeof S=="function"){var A=v.value;l.payload=function(){return S(A)},l.callback=function(){aC(u,p,v)}}var P=p.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(l.callback=function(){aC(u,p,v),typeof S!="function"&&(Si===null?Si=new Set([this]):Si.add(this));var I=v.stack;this.componentDidCatch(v.value,{componentStack:I!==null?I:""})})}function TU(l,u,p,v,S){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(u=p.alternate,u!==null&&dl(u,p,S,!0),p=Lr.current,p!==null){switch(p.tag){case 31:case 13:return rn===null?Zf():p.alternate===null&&yt===0&&(yt=3),p.flags&=-257,p.flags|=65536,p.lanes=S,v===Af?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([v]):u.add(v),mg(l,v,S)),!1;case 22:return p.flags|=65536,v===Af?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([v])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([v]):p.add(v)),mg(l,v,S)),!1}throw Error(a(435,p.tag))}return mg(l,v,S),Zf(),!1}if(Be)return u=Lr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=S,v!==uv&&(l=Error(a(422),{cause:v}),Bs(Qr(l,p)))):(v!==uv&&(u=Error(a(423),{cause:v}),Bs(Qr(u,p))),l=l.current.alternate,l.flags|=65536,S&=-S,l.lanes|=S,v=Qr(v,p),S=Hv(l.stateNode,v,S),xv(l,S),yt!==4&&(yt=2)),!1;var A=Error(a(520),{cause:v});if(A=Qr(A,p),iu===null?iu=[A]:iu.push(A),yt!==4&&(yt=2),u===null)return!0;v=Qr(v,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,l=S&-S,p.lanes|=l,l=Hv(p.stateNode,v,l),xv(p,l),!1;case 1:if(u=p.type,A=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Si===null||!Si.has(A))))return p.flags|=65536,S&=-S,p.lanes|=S,S=iC(S),oC(S,l,p,v),xv(p,S),!1}p=p.return}while(p!==null);return!1}var Gv=Error(a(461)),jt=!1;function Xt(l,u,p,v){u.child=l===null?cj(u,null,p,v):so(u,l.child,p,v)}function lC(l,u,p,v,S){p=p.render;var A=u.ref;if("ref"in v){var P={};for(var I in v)I!=="ref"&&(P[I]=v[I])}else P=v;return ao(u),v=Av(l,u,p,P,A,S),I=jv(),l!==null&&!jt?(Cv(l,u,S),Sa(l,u,S)):(Be&&I&&lv(u),u.flags|=1,Xt(l,u,v,S),u.child)}function sC(l,u,p,v,S){if(l===null){var A=p.type;return typeof A=="function"&&!av(A)&&A.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=A,uC(l,u,A,v,S)):(l=xf(p.type,null,v,u,u.mode,S),l.ref=u.ref,l.return=u,u.child=l)}if(A=l.child,!Jv(l,S)){var P=A.memoizedProps;if(p=p.compare,p=p!==null?p:Is,p(P,v)&&l.ref===u.ref)return Sa(l,u,S)}return u.flags|=1,l=ga(A,v),l.ref=u.ref,l.return=u,u.child=l}function uC(l,u,p,v,S){if(l!==null){var A=l.memoizedProps;if(Is(A,v)&&l.ref===u.ref)if(jt=!1,u.pendingProps=v=A,Jv(l,S))(l.flags&131072)!==0&&(jt=!0);else return u.lanes=l.lanes,Sa(l,u,S)}return Vv(l,u,p,v,S)}function cC(l,u,p,v){var S=v.children,A=l!==null?l.memoizedState:null;if(l===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((u.flags&128)!==0){if(A=A!==null?A.baseLanes|p:p,l!==null){for(v=u.child=l.child,S=0;v!==null;)S=S|v.lanes|v.childLanes,v=v.sibling;v=S&~A}else v=0,u.child=null;return fC(l,u,A,p,v)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&Ef(u,A!==null?A.cachePool:null),A!==null?hj(u,A):wv(),pj(u);else return v=u.lanes=536870912,fC(l,u,A!==null?A.baseLanes|p:p,p,v)}else A!==null?(Ef(u,A.cachePool),hj(u,A),bi(),u.memoizedState=null):(l!==null&&Ef(u,null),wv(),bi());return Xt(l,u,S,p),u.child}function Qs(l,u){return l!==null&&l.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function fC(l,u,p,v,S){var A=vv();return A=A===null?null:{parent:kt._currentValue,pool:A},u.memoizedState={baseLanes:p,cachePool:A},l!==null&&Ef(u,null),wv(),pj(u),l!==null&&dl(l,u,v,!0),u.childLanes=S,null}function Bf(l,u){return u=Ff({mode:u.mode,children:u.children},l.mode),u.ref=l.ref,l.child=u,u.return=l,u}function dC(l,u,p){return so(u,l.child,null,p),l=Bf(u,u.pendingProps),l.flags|=2,Ir(u),u.memoizedState=null,l}function NU(l,u,p){var v=u.pendingProps,S=(u.flags&128)!==0;if(u.flags&=-129,l===null){if(Be){if(v.mode==="hidden")return l=Bf(u,v),u.lanes=536870912,Qs(null,l);if(Ev(u),(l=it)?(l=EO(l,tn),l=l!==null&&l.data==="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:fi!==null?{id:Bn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},p=XA(l),p.return=u,u.child=p,Kt=u,it=null)):l=null,l===null)throw hi(u);return u.lanes=536870912,null}return Bf(u,v)}var A=l.memoizedState;if(A!==null){var P=A.dehydrated;if(Ev(u),S)if(u.flags&256)u.flags&=-257,u=dC(l,u,p);else if(u.memoizedState!==null)u.child=l.child,u.flags|=128,u=null;else throw Error(a(558));else if(jt||dl(l,u,p,!1),S=(p&l.childLanes)!==0,jt||S){if(v=tt,v!==null&&(P=rA(v,p),P!==0&&P!==A.retryLane))throw A.retryLane=P,eo(l,P),jr(v,l,P),Gv;Zf(),u=dC(l,u,p)}else l=A.treeContext,it=nn(P.nextSibling),Kt=u,Be=!0,di=null,tn=!1,l!==null&&QA(u,l),u=Bf(u,v),u.flags|=4096;return u}return l=ga(l.child,{mode:v.mode,children:v.children}),l.ref=u.ref,u.child=l,l.return=u,l}function $f(l,u){var p=u.ref;if(p===null)l!==null&&l.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(a(284));(l===null||l.ref!==p)&&(u.flags|=4194816)}}function Vv(l,u,p,v,S){return ao(u),p=Av(l,u,p,v,void 0,S),v=jv(),l!==null&&!jt?(Cv(l,u,S),Sa(l,u,S)):(Be&&v&&lv(u),u.flags|=1,Xt(l,u,p,S),u.child)}function hC(l,u,p,v,S,A){return ao(u),u.updateQueue=null,p=vj(u,v,p,S),mj(l),v=jv(),l!==null&&!jt?(Cv(l,u,A),Sa(l,u,A)):(Be&&v&&lv(u),u.flags|=1,Xt(l,u,p,A),u.child)}function pC(l,u,p,v,S){if(ao(u),u.stateNode===null){var A=sl,P=p.contextType;typeof P=="object"&&P!==null&&(A=Yt(P)),A=new p(v,A),u.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Uv,u.stateNode=A,A._reactInternals=u,A=u.stateNode,A.props=v,A.state=u.memoizedState,A.refs={},yv(u),P=p.contextType,A.context=typeof P=="object"&&P!==null?Yt(P):sl,A.state=u.memoizedState,P=p.getDerivedStateFromProps,typeof P=="function"&&(Fv(u,p,P,v),A.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(P=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),P!==A.state&&Uv.enqueueReplaceState(A,A.state,null),Ks(u,v,A,S),Vs(),A.state=u.memoizedState),typeof A.componentDidMount=="function"&&(u.flags|=4194308),v=!0}else if(l===null){A=u.stateNode;var I=u.memoizedProps,V=co(p,I);A.props=V;var ie=A.context,pe=p.contextType;P=sl,typeof pe=="object"&&pe!==null&&(P=Yt(pe));var ve=p.getDerivedStateFromProps;pe=typeof ve=="function"||typeof A.getSnapshotBeforeUpdate=="function",I=u.pendingProps!==I,pe||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(I||ie!==P)&&eC(u,A,v,P),mi=!1;var oe=u.memoizedState;A.state=oe,Ks(u,v,A,S),Vs(),ie=u.memoizedState,I||oe!==ie||mi?(typeof ve=="function"&&(Fv(u,p,ve,v),ie=u.memoizedState),(V=mi||Jj(u,p,V,v,oe,ie,P))?(pe||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(u.flags|=4194308)):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=ie),A.props=v,A.state=ie,A.context=P,v=V):(typeof A.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{A=u.stateNode,bv(l,u),P=u.memoizedProps,pe=co(p,P),A.props=pe,ve=u.pendingProps,oe=A.context,ie=p.contextType,V=sl,typeof ie=="object"&&ie!==null&&(V=Yt(ie)),I=p.getDerivedStateFromProps,(ie=typeof I=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(P!==ve||oe!==V)&&eC(u,A,v,V),mi=!1,oe=u.memoizedState,A.state=oe,Ks(u,v,A,S),Vs();var fe=u.memoizedState;P!==ve||oe!==fe||mi||l!==null&&l.dependencies!==null&&wf(l.dependencies)?(typeof I=="function"&&(Fv(u,p,I,v),fe=u.memoizedState),(pe=mi||Jj(u,p,pe,v,oe,fe,V)||l!==null&&l.dependencies!==null&&wf(l.dependencies))?(ie||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(v,fe,V),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(v,fe,V)),typeof A.componentDidUpdate=="function"&&(u.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof A.componentDidUpdate!="function"||P===l.memoizedProps&&oe===l.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||P===l.memoizedProps&&oe===l.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=fe),A.props=v,A.state=fe,A.context=V,v=pe):(typeof A.componentDidUpdate!="function"||P===l.memoizedProps&&oe===l.memoizedState||(u.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||P===l.memoizedProps&&oe===l.memoizedState||(u.flags|=1024),v=!1)}return A=v,$f(l,u),v=(u.flags&128)!==0,A||v?(A=u.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:A.render(),u.flags|=1,l!==null&&v?(u.child=so(u,l.child,null,S),u.child=so(u,null,p,S)):Xt(l,u,p,S),u.memoizedState=A.state,l=u.child):l=Sa(l,u,S),l}function mC(l,u,p,v){return ro(),u.flags|=256,Xt(l,u,p,v),u.child}var Kv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yv(l){return{baseLanes:l,cachePool:aj()}}function Xv(l,u,p){return l=l!==null?l.childLanes&~p:0,u&&(l|=qr),l}function vC(l,u,p){var v=u.pendingProps,S=!1,A=(u.flags&128)!==0,P;if((P=A)||(P=l!==null&&l.memoizedState===null?!1:(wt.current&2)!==0),P&&(S=!0,u.flags&=-129),P=(u.flags&32)!==0,u.flags&=-33,l===null){if(Be){if(S?yi(u):bi(),(l=it)?(l=EO(l,tn),l=l!==null&&l.data!=="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:fi!==null?{id:Bn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},p=XA(l),p.return=u,u.child=p,Kt=u,it=null)):l=null,l===null)throw hi(u);return Ng(l)?u.lanes=32:u.lanes=536870912,null}var I=v.children;return v=v.fallback,S?(bi(),S=u.mode,I=Ff({mode:"hidden",children:I},S),v=to(v,S,p,null),I.return=u,v.return=u,I.sibling=v,u.child=I,v=u.child,v.memoizedState=Yv(p),v.childLanes=Xv(l,P,p),u.memoizedState=Kv,Qs(null,v)):(yi(u),Wv(u,I))}var V=l.memoizedState;if(V!==null&&(I=V.dehydrated,I!==null)){if(A)u.flags&256?(yi(u),u.flags&=-257,u=Zv(l,u,p)):u.memoizedState!==null?(bi(),u.child=l.child,u.flags|=128,u=null):(bi(),I=v.fallback,S=u.mode,v=Ff({mode:"visible",children:v.children},S),I=to(I,S,p,null),I.flags|=2,v.return=u,I.return=u,v.sibling=I,u.child=v,so(u,l.child,null,p),v=u.child,v.memoizedState=Yv(p),v.childLanes=Xv(l,P,p),u.memoizedState=Kv,u=Qs(null,v));else if(yi(u),Ng(I)){if(P=I.nextSibling&&I.nextSibling.dataset,P)var ie=P.dgst;P=ie,v=Error(a(419)),v.stack="",v.digest=P,Bs({value:v,source:null,stack:null}),u=Zv(l,u,p)}else if(jt||dl(l,u,p,!1),P=(p&l.childLanes)!==0,jt||P){if(P=tt,P!==null&&(v=rA(P,p),v!==0&&v!==V.retryLane))throw V.retryLane=v,eo(l,v),jr(P,l,v),Gv;Tg(I)||Zf(),u=Zv(l,u,p)}else Tg(I)?(u.flags|=192,u.child=l.child,u=null):(l=V.treeContext,it=nn(I.nextSibling),Kt=u,Be=!0,di=null,tn=!1,l!==null&&QA(u,l),u=Wv(u,v.children),u.flags|=4096);return u}return S?(bi(),I=v.fallback,S=u.mode,V=l.child,ie=V.sibling,v=ga(V,{mode:"hidden",children:v.children}),v.subtreeFlags=V.subtreeFlags&65011712,ie!==null?I=ga(ie,I):(I=to(I,S,p,null),I.flags|=2),I.return=u,v.return=u,v.sibling=I,u.child=v,Qs(null,v),v=u.child,I=l.child.memoizedState,I===null?I=Yv(p):(S=I.cachePool,S!==null?(V=kt._currentValue,S=S.parent!==V?{parent:V,pool:V}:S):S=aj(),I={baseLanes:I.baseLanes|p,cachePool:S}),v.memoizedState=I,v.childLanes=Xv(l,P,p),u.memoizedState=Kv,Qs(l.child,v)):(yi(u),p=l.child,l=p.sibling,p=ga(p,{mode:"visible",children:v.children}),p.return=u,p.sibling=null,l!==null&&(P=u.deletions,P===null?(u.deletions=[l],u.flags|=16):P.push(l)),u.child=p,u.memoizedState=null,p)}function Wv(l,u){return u=Ff({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Ff(l,u){return l=Dr(22,l,null,u),l.lanes=0,l}function Zv(l,u,p){return so(u,l.child,null,p),l=Wv(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function gC(l,u,p){l.lanes|=u;var v=l.alternate;v!==null&&(v.lanes|=u),dv(l.return,u,p)}function Qv(l,u,p,v,S,A){var P=l.memoizedState;P===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:S,treeForkCount:A}:(P.isBackwards=u,P.rendering=null,P.renderingStartTime=0,P.last=v,P.tail=p,P.tailMode=S,P.treeForkCount=A)}function yC(l,u,p){var v=u.pendingProps,S=v.revealOrder,A=v.tail;v=v.children;var P=wt.current,I=(P&2)!==0;if(I?(P=P&1|2,u.flags|=128):P&=1,le(wt,P),Xt(l,u,v,p),v=Be?qs:0,!I&&l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&gC(l,p,u);else if(l.tag===19)gC(l,p,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(S){case"forwards":for(p=u.child,S=null;p!==null;)l=p.alternate,l!==null&&Tf(l)===null&&(S=p),p=p.sibling;p=S,p===null?(S=u.child,u.child=null):(S=p.sibling,p.sibling=null),Qv(u,!1,S,p,A,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,S=u.child,u.child=null;S!==null;){if(l=S.alternate,l!==null&&Tf(l)===null){u.child=S;break}l=S.sibling,S.sibling=p,p=S,S=l}Qv(u,!0,p,null,A,v);break;case"together":Qv(u,!1,null,null,void 0,v);break;default:u.memoizedState=null}return u.child}function Sa(l,u,p){if(l!==null&&(u.dependencies=l.dependencies),wi|=u.lanes,(p&u.childLanes)===0)if(l!==null){if(dl(l,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(a(153));if(u.child!==null){for(l=u.child,p=ga(l,l.pendingProps),u.child=p,p.return=u;l.sibling!==null;)l=l.sibling,p=p.sibling=ga(l,l.pendingProps),p.return=u;p.sibling=null}return u.child}function Jv(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&wf(l)))}function MU(l,u,p){switch(u.tag){case 3:xe(u,u.stateNode.containerInfo),pi(u,kt,l.memoizedState.cache),ro();break;case 27:case 5:se(u);break;case 4:xe(u,u.stateNode.containerInfo);break;case 10:pi(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Ev(u),null;break;case 13:var v=u.memoizedState;if(v!==null)return v.dehydrated!==null?(yi(u),u.flags|=128,null):(p&u.child.childLanes)!==0?vC(l,u,p):(yi(u),l=Sa(l,u,p),l!==null?l.sibling:null);yi(u);break;case 19:var S=(l.flags&128)!==0;if(v=(p&u.childLanes)!==0,v||(dl(l,u,p,!1),v=(p&u.childLanes)!==0),S){if(v)return yC(l,u,p);u.flags|=128}if(S=u.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),le(wt,wt.current),v)break;return null;case 22:return u.lanes=0,cC(l,u,p,u.pendingProps);case 24:pi(u,kt,l.memoizedState.cache)}return Sa(l,u,p)}function bC(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps)jt=!0;else{if(!Jv(l,p)&&(u.flags&128)===0)return jt=!1,MU(l,u,p);jt=(l.flags&131072)!==0}else jt=!1,Be&&(u.flags&1048576)!==0&&ZA(u,qs,u.index);switch(u.lanes=0,u.tag){case 16:e:{var v=u.pendingProps;if(l=oo(u.elementType),u.type=l,typeof l=="function")av(l)?(v=co(l,v),u.tag=1,u=pC(null,u,l,v,p)):(u.tag=0,u=Vv(null,u,l,v,p));else{if(l!=null){var S=l.$$typeof;if(S===T){u.tag=11,u=lC(null,u,l,v,p);break e}else if(S===M){u.tag=14,u=sC(null,u,l,v,p);break e}}throw u=F(l)||l,Error(a(306,u,""))}}return u;case 0:return Vv(l,u,u.type,u.pendingProps,p);case 1:return v=u.type,S=co(v,u.pendingProps),pC(l,u,v,S,p);case 3:e:{if(xe(u,u.stateNode.containerInfo),l===null)throw Error(a(387));v=u.pendingProps;var A=u.memoizedState;S=A.element,bv(l,u),Ks(u,v,null,p);var P=u.memoizedState;if(v=P.cache,pi(u,kt,v),v!==A.cache&&hv(u,[kt],p,!0),Vs(),v=P.element,A.isDehydrated)if(A={element:v,isDehydrated:!1,cache:P.cache},u.updateQueue.baseState=A,u.memoizedState=A,u.flags&256){u=mC(l,u,v,p);break e}else if(v!==S){S=Qr(Error(a(424)),u),Bs(S),u=mC(l,u,v,p);break e}else{switch(l=u.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(it=nn(l.firstChild),Kt=u,Be=!0,di=null,tn=!0,p=cj(u,null,v,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(ro(),v===S){u=Sa(l,u,p);break e}Xt(l,u,v,p)}u=u.child}return u;case 26:return $f(l,u),l===null?(p=TO(u.type,null,u.pendingProps,null))?u.memoizedState=p:Be||(p=u.type,l=u.pendingProps,v=ad(G.current).createElement(p),v[Vt]=u,v[_r]=l,Wt(v,p,l),zt(v),u.stateNode=v):u.memoizedState=TO(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:return se(u),l===null&&Be&&(v=u.stateNode=jO(u.type,u.pendingProps,G.current),Kt=u,tn=!0,S=it,ji(u.type)?(Mg=S,it=nn(v.firstChild)):it=S),Xt(l,u,u.pendingProps.children,p),$f(l,u),l===null&&(u.flags|=4194304),u.child;case 5:return l===null&&Be&&((S=v=it)&&(v=sH(v,u.type,u.pendingProps,tn),v!==null?(u.stateNode=v,Kt=u,it=nn(v.firstChild),tn=!1,S=!0):S=!1),S||hi(u)),se(u),S=u.type,A=u.pendingProps,P=l!==null?l.memoizedProps:null,v=A.children,jg(S,A)?v=null:P!==null&&jg(S,P)&&(u.flags|=32),u.memoizedState!==null&&(S=Av(l,u,SU,null,null,p),hu._currentValue=S),$f(l,u),Xt(l,u,v,p),u.child;case 6:return l===null&&Be&&((l=p=it)&&(p=uH(p,u.pendingProps,tn),p!==null?(u.stateNode=p,Kt=u,it=null,l=!0):l=!1),l||hi(u)),null;case 13:return vC(l,u,p);case 4:return xe(u,u.stateNode.containerInfo),v=u.pendingProps,l===null?u.child=so(u,null,v,p):Xt(l,u,v,p),u.child;case 11:return lC(l,u,u.type,u.pendingProps,p);case 7:return Xt(l,u,u.pendingProps,p),u.child;case 8:return Xt(l,u,u.pendingProps.children,p),u.child;case 12:return Xt(l,u,u.pendingProps.children,p),u.child;case 10:return v=u.pendingProps,pi(u,u.type,v.value),Xt(l,u,v.children,p),u.child;case 9:return S=u.type._context,v=u.pendingProps.children,ao(u),S=Yt(S),v=v(S),u.flags|=1,Xt(l,u,v,p),u.child;case 14:return sC(l,u,u.type,u.pendingProps,p);case 15:return uC(l,u,u.type,u.pendingProps,p);case 19:return yC(l,u,p);case 31:return NU(l,u,p);case 22:return cC(l,u,p,u.pendingProps);case 24:return ao(u),v=Yt(kt),l===null?(S=vv(),S===null&&(S=tt,A=pv(),S.pooledCache=A,A.refCount++,A!==null&&(S.pooledCacheLanes|=p),S=A),u.memoizedState={parent:v,cache:S},yv(u),pi(u,kt,S)):((l.lanes&p)!==0&&(bv(l,u),Ks(u,null,null,p),Vs()),S=l.memoizedState,A=u.memoizedState,S.parent!==v?(S={parent:v,cache:v},u.memoizedState=S,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=S),pi(u,kt,v)):(v=A.cache,pi(u,kt,v),v!==S.cache&&hv(u,[kt],p,!0))),Xt(l,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(a(156,u.tag))}function Ea(l){l.flags|=4}function eg(l,u,p,v,S){if((u=(l.mode&32)!==0)&&(u=!1),u){if(l.flags|=16777216,(S&335544128)===S)if(l.stateNode.complete)l.flags|=8192;else if(VC())l.flags|=8192;else throw lo=Af,gv}else l.flags&=-16777217}function xC(l,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!DO(u))if(VC())l.flags|=8192;else throw lo=Af,gv}function Uf(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?Jk():536870912,l.lanes|=u,El|=u)}function Js(l,u){if(!Be)switch(l.tailMode){case"hidden":u=l.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:v.sibling=null}}function ot(l){var u=l.alternate!==null&&l.alternate.child===l.child,p=0,v=0;if(u)for(var S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags&65011712,v|=S.flags&65011712,S.return=l,S=S.sibling;else for(S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=l,S=S.sibling;return l.subtreeFlags|=v,l.childLanes=p,u}function PU(l,u,p){var v=u.pendingProps;switch(sv(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(u),null;case 1:return ot(u),null;case 3:return p=u.stateNode,v=null,l!==null&&(v=l.memoizedState.cache),u.memoizedState.cache!==v&&(u.flags|=2048),xa(kt),Z(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(l===null||l.child===null)&&(fl(u)?Ea(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,cv())),ot(u),null;case 26:var S=u.type,A=u.memoizedState;return l===null?(Ea(u),A!==null?(ot(u),xC(u,A)):(ot(u),eg(u,S,null,v,p))):A?A!==l.memoizedState?(Ea(u),ot(u),xC(u,A)):(ot(u),u.flags&=-16777217):(l=l.memoizedProps,l!==v&&Ea(u),ot(u),eg(u,S,l,v,p)),null;case 27:if(ge(u),p=G.current,S=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==v&&Ea(u);else{if(!v){if(u.stateNode===null)throw Error(a(166));return ot(u),null}l=$.current,fl(u)?JA(u):(l=jO(S,v,p),u.stateNode=l,Ea(u))}return ot(u),null;case 5:if(ge(u),S=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==v&&Ea(u);else{if(!v){if(u.stateNode===null)throw Error(a(166));return ot(u),null}if(A=$.current,fl(u))JA(u);else{var P=ad(G.current);switch(A){case 1:A=P.createElementNS("http://www.w3.org/2000/svg",S);break;case 2:A=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;default:switch(S){case"svg":A=P.createElementNS("http://www.w3.org/2000/svg",S);break;case"math":A=P.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;case"script":A=P.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof v.is=="string"?P.createElement("select",{is:v.is}):P.createElement("select"),v.multiple?A.multiple=!0:v.size&&(A.size=v.size);break;default:A=typeof v.is=="string"?P.createElement(S,{is:v.is}):P.createElement(S)}}A[Vt]=u,A[_r]=v;e:for(P=u.child;P!==null;){if(P.tag===5||P.tag===6)A.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===u)break e;for(;P.sibling===null;){if(P.return===null||P.return===u)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}u.stateNode=A;e:switch(Wt(A,S,v),S){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Ea(u)}}return ot(u),eg(u,u.type,l===null?null:l.memoizedProps,u.pendingProps,p),null;case 6:if(l&&u.stateNode!=null)l.memoizedProps!==v&&Ea(u);else{if(typeof v!="string"&&u.stateNode===null)throw Error(a(166));if(l=G.current,fl(u)){if(l=u.stateNode,p=u.memoizedProps,v=null,S=Kt,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}l[Vt]=u,l=!!(l.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||vO(l.nodeValue,p)),l||hi(u,!0)}else l=ad(l).createTextNode(v),l[Vt]=u,u.stateNode=l}return ot(u),null;case 31:if(p=u.memoizedState,l===null||l.memoizedState!==null){if(v=fl(u),p!==null){if(l===null){if(!v)throw Error(a(318));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(557));l[Vt]=u}else ro(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;ot(u),l=!1}else p=cv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=p),l=!0;if(!l)return u.flags&256?(Ir(u),u):(Ir(u),null);if((u.flags&128)!==0)throw Error(a(558))}return ot(u),null;case 13:if(v=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(S=fl(u),v!==null&&v.dehydrated!==null){if(l===null){if(!S)throw Error(a(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(a(317));S[Vt]=u}else ro(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;ot(u),S=!1}else S=cv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?(Ir(u),u):(Ir(u),null)}return Ir(u),(u.flags&128)!==0?(u.lanes=p,u):(p=v!==null,l=l!==null&&l.memoizedState!==null,p&&(v=u.child,S=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(S=v.alternate.memoizedState.cachePool.pool),A=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(A=v.memoizedState.cachePool.pool),A!==S&&(v.flags|=2048)),p!==l&&p&&(u.child.flags|=8192),Uf(u,u.updateQueue),ot(u),null);case 4:return Z(),l===null&&wg(u.stateNode.containerInfo),ot(u),null;case 10:return xa(u.type),ot(u),null;case 19:if(J(wt),v=u.memoizedState,v===null)return ot(u),null;if(S=(u.flags&128)!==0,A=v.rendering,A===null)if(S)Js(v,!1);else{if(yt!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(A=Tf(l),A!==null){for(u.flags|=128,Js(v,!1),l=A.updateQueue,u.updateQueue=l,Uf(u,l),u.subtreeFlags=0,l=p,p=u.child;p!==null;)YA(p,l),p=p.sibling;return le(wt,wt.current&1|2),Be&&ya(u,v.treeForkCount),u.child}l=l.sibling}v.tail!==null&&It()>Yf&&(u.flags|=128,S=!0,Js(v,!1),u.lanes=4194304)}else{if(!S)if(l=Tf(A),l!==null){if(u.flags|=128,S=!0,l=l.updateQueue,u.updateQueue=l,Uf(u,l),Js(v,!0),v.tail===null&&v.tailMode==="hidden"&&!A.alternate&&!Be)return ot(u),null}else 2*It()-v.renderingStartTime>Yf&&p!==536870912&&(u.flags|=128,S=!0,Js(v,!1),u.lanes=4194304);v.isBackwards?(A.sibling=u.child,u.child=A):(l=v.last,l!==null?l.sibling=A:u.child=A,v.last=A)}return v.tail!==null?(l=v.tail,v.rendering=l,v.tail=l.sibling,v.renderingStartTime=It(),l.sibling=null,p=wt.current,le(wt,S?p&1|2:p&1),Be&&ya(u,v.treeForkCount),l):(ot(u),null);case 22:case 23:return Ir(u),Sv(),v=u.memoizedState!==null,l!==null?l.memoizedState!==null!==v&&(u.flags|=8192):v&&(u.flags|=8192),v?(p&536870912)!==0&&(u.flags&128)===0&&(ot(u),u.subtreeFlags&6&&(u.flags|=8192)):ot(u),p=u.updateQueue,p!==null&&Uf(u,p.retryQueue),p=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==p&&(u.flags|=2048),l!==null&&J(io),null;case 24:return p=null,l!==null&&(p=l.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),xa(kt),ot(u),null;case 25:return null;case 30:return null}throw Error(a(156,u.tag))}function RU(l,u){switch(sv(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return xa(kt),Z(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return ge(u),null;case 31:if(u.memoizedState!==null){if(Ir(u),u.alternate===null)throw Error(a(340));ro()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 13:if(Ir(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(a(340));ro()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return J(wt),null;case 4:return Z(),null;case 10:return xa(u.type),null;case 22:case 23:return Ir(u),Sv(),l!==null&&J(io),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return xa(kt),null;case 25:return null;default:return null}}function _C(l,u){switch(sv(u),u.tag){case 3:xa(kt),Z();break;case 26:case 27:case 5:ge(u);break;case 4:Z();break;case 31:u.memoizedState!==null&&Ir(u);break;case 13:Ir(u);break;case 19:J(wt);break;case 10:xa(u.type);break;case 22:case 23:Ir(u),Sv(),l!==null&&J(io);break;case 24:xa(kt)}}function eu(l,u){try{var p=u.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var S=v.next;p=S;do{if((p.tag&l)===l){v=void 0;var A=p.create,P=p.inst;v=A(),P.destroy=v}p=p.next}while(p!==S)}}catch(I){Xe(u,u.return,I)}}function xi(l,u,p){try{var v=u.updateQueue,S=v!==null?v.lastEffect:null;if(S!==null){var A=S.next;v=A;do{if((v.tag&l)===l){var P=v.inst,I=P.destroy;if(I!==void 0){P.destroy=void 0,S=u;var V=p,ie=I;try{ie()}catch(pe){Xe(S,V,pe)}}}v=v.next}while(v!==A)}}catch(pe){Xe(u,u.return,pe)}}function wC(l){var u=l.updateQueue;if(u!==null){var p=l.stateNode;try{dj(u,p)}catch(v){Xe(l,l.return,v)}}}function SC(l,u,p){p.props=co(l.type,l.memoizedProps),p.state=l.memoizedState;try{p.componentWillUnmount()}catch(v){Xe(l,u,v)}}function tu(l,u){try{var p=l.ref;if(p!==null){switch(l.tag){case 26:case 27:case 5:var v=l.stateNode;break;case 30:v=l.stateNode;break;default:v=l.stateNode}typeof p=="function"?l.refCleanup=p(v):p.current=v}}catch(S){Xe(l,u,S)}}function Fn(l,u){var p=l.ref,v=l.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(S){Xe(l,u,S)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(S){Xe(l,u,S)}else p.current=null}function EC(l){var u=l.type,p=l.memoizedProps,v=l.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&v.focus();break e;case"img":p.src?v.src=p.src:p.srcSet&&(v.srcset=p.srcSet)}}catch(S){Xe(l,l.return,S)}}function tg(l,u,p){try{var v=l.stateNode;rH(v,l.type,p,u),v[_r]=u}catch(S){Xe(l,l.return,S)}}function kC(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ji(l.type)||l.tag===4}function rg(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||kC(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.tag===27&&ji(l.type)||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 ng(l,u,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(l,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(l),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=ma));else if(v!==4&&(v===27&&ji(l.type)&&(p=l.stateNode,u=null),l=l.child,l!==null))for(ng(l,u,p),l=l.sibling;l!==null;)ng(l,u,p),l=l.sibling}function Hf(l,u,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,u?p.insertBefore(l,u):p.appendChild(l);else if(v!==4&&(v===27&&ji(l.type)&&(p=l.stateNode),l=l.child,l!==null))for(Hf(l,u,p),l=l.sibling;l!==null;)Hf(l,u,p),l=l.sibling}function AC(l){var u=l.stateNode,p=l.memoizedProps;try{for(var v=l.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);Wt(u,v,p),u[Vt]=l,u[_r]=p}catch(A){Xe(l,l.return,A)}}var ka=!1,Ct=!1,ag=!1,jC=typeof WeakSet=="function"?WeakSet:Set,qt=null;function DU(l,u){if(l=l.containerInfo,kg=fd,l=qA(l),Zm(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var S=v.anchorOffset,A=v.focusNode;v=v.focusOffset;try{p.nodeType,A.nodeType}catch{p=null;break e}var P=0,I=-1,V=-1,ie=0,pe=0,ve=l,oe=null;t:for(;;){for(var fe;ve!==p||S!==0&&ve.nodeType!==3||(I=P+S),ve!==A||v!==0&&ve.nodeType!==3||(V=P+v),ve.nodeType===3&&(P+=ve.nodeValue.length),(fe=ve.firstChild)!==null;)oe=ve,ve=fe;for(;;){if(ve===l)break t;if(oe===p&&++ie===S&&(I=P),oe===A&&++pe===v&&(V=P),(fe=ve.nextSibling)!==null)break;ve=oe,oe=ve.parentNode}ve=fe}p=I===-1||V===-1?null:{start:I,end:V}}else p=null}p=p||{start:0,end:0}}else p=null;for(Ag={focusedElem:l,selectionRange:p},fd=!1,qt=u;qt!==null;)if(u=qt,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,qt=l;else for(;qt!==null;){switch(u=qt,A=u.alternate,l=u.flags,u.tag){case 0:if((l&4)!==0&&(l=u.updateQueue,l=l!==null?l.events:null,l!==null))for(p=0;p<l.length;p++)S=l[p],S.ref.impl=S.nextImpl;break;case 11:case 15:break;case 1:if((l&1024)!==0&&A!==null){l=void 0,p=u,S=A.memoizedProps,A=A.memoizedState,v=p.stateNode;try{var Ee=co(p.type,S);l=v.getSnapshotBeforeUpdate(Ee,A),v.__reactInternalSnapshotBeforeUpdate=l}catch(Ne){Xe(p,p.return,Ne)}}break;case 3:if((l&1024)!==0){if(l=u.stateNode.containerInfo,p=l.nodeType,p===9)Og(l);else if(p===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Og(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(a(163))}if(l=u.sibling,l!==null){l.return=u.return,qt=l;break}qt=u.return}}function CC(l,u,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:ja(l,p),v&4&&eu(5,p);break;case 1:if(ja(l,p),v&4)if(l=p.stateNode,u===null)try{l.componentDidMount()}catch(P){Xe(p,p.return,P)}else{var S=co(p.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(S,u,l.__reactInternalSnapshotBeforeUpdate)}catch(P){Xe(p,p.return,P)}}v&64&&wC(p),v&512&&tu(p,p.return);break;case 3:if(ja(l,p),v&64&&(l=p.updateQueue,l!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{dj(l,u)}catch(P){Xe(p,p.return,P)}}break;case 27:u===null&&v&4&&AC(p);case 26:case 5:ja(l,p),u===null&&v&4&&EC(p),v&512&&tu(p,p.return);break;case 12:ja(l,p);break;case 31:ja(l,p),v&4&&NC(l,p);break;case 13:ja(l,p),v&4&&MC(l,p),v&64&&(l=p.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(p=HU.bind(null,p),cH(l,p))));break;case 22:if(v=p.memoizedState!==null||ka,!v){u=u!==null&&u.memoizedState!==null||Ct,S=ka;var A=Ct;ka=v,(Ct=u)&&!A?Ca(l,p,(p.subtreeFlags&8772)!==0):ja(l,p),ka=S,Ct=A}break;case 30:break;default:ja(l,p)}}function OC(l){var u=l.alternate;u!==null&&(l.alternate=null,OC(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Rm(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var ct=null,Sr=!1;function Aa(l,u,p){for(p=p.child;p!==null;)TC(l,u,p),p=p.sibling}function TC(l,u,p){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(xr,p)}catch{}switch(p.tag){case 26:Ct||Fn(p,u),Aa(l,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Ct||Fn(p,u);var v=ct,S=Sr;ji(p.type)&&(ct=p.stateNode,Sr=!1),Aa(l,u,p),cu(p.stateNode),ct=v,Sr=S;break;case 5:Ct||Fn(p,u);case 6:if(v=ct,S=Sr,ct=null,Aa(l,u,p),ct=v,Sr=S,ct!==null)if(Sr)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(p.stateNode)}catch(A){Xe(p,u,A)}else try{ct.removeChild(p.stateNode)}catch(A){Xe(p,u,A)}break;case 18:ct!==null&&(Sr?(l=ct,wO(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,p.stateNode),Ml(l)):wO(ct,p.stateNode));break;case 4:v=ct,S=Sr,ct=p.stateNode.containerInfo,Sr=!0,Aa(l,u,p),ct=v,Sr=S;break;case 0:case 11:case 14:case 15:xi(2,p,u),Ct||xi(4,p,u),Aa(l,u,p);break;case 1:Ct||(Fn(p,u),v=p.stateNode,typeof v.componentWillUnmount=="function"&&SC(p,u,v)),Aa(l,u,p);break;case 21:Aa(l,u,p);break;case 22:Ct=(v=Ct)||p.memoizedState!==null,Aa(l,u,p),Ct=v;break;default:Aa(l,u,p)}}function NC(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Ml(l)}catch(p){Xe(u,u.return,p)}}}function MC(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Ml(l)}catch(p){Xe(u,u.return,p)}}function LU(l){switch(l.tag){case 31:case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new jC),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new jC),u;default:throw Error(a(435,l.tag))}}function Gf(l,u){var p=LU(l);u.forEach(function(v){if(!p.has(v)){p.add(v);var S=GU.bind(null,l,v);v.then(S,S)}})}function Er(l,u){var p=u.deletions;if(p!==null)for(var v=0;v<p.length;v++){var S=p[v],A=l,P=u,I=P;e:for(;I!==null;){switch(I.tag){case 27:if(ji(I.type)){ct=I.stateNode,Sr=!1;break e}break;case 5:ct=I.stateNode,Sr=!1;break e;case 3:case 4:ct=I.stateNode.containerInfo,Sr=!0;break e}I=I.return}if(ct===null)throw Error(a(160));TC(A,P,S),ct=null,Sr=!1,A=S.alternate,A!==null&&(A.return=null),S.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)PC(u,l),u=u.sibling}var kn=null;function PC(l,u){var p=l.alternate,v=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Er(u,l),kr(l),v&4&&(xi(3,l,l.return),eu(3,l),xi(5,l,l.return));break;case 1:Er(u,l),kr(l),v&512&&(Ct||p===null||Fn(p,p.return)),v&64&&ka&&(l=l.updateQueue,l!==null&&(v=l.callbacks,v!==null&&(p=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=p===null?v:p.concat(v))));break;case 26:var S=kn;if(Er(u,l),kr(l),v&512&&(Ct||p===null||Fn(p,p.return)),v&4){var A=p!==null?p.memoizedState:null;if(v=l.memoizedState,p===null)if(v===null)if(l.stateNode===null){e:{v=l.type,p=l.memoizedProps,S=S.ownerDocument||S;t:switch(v){case"title":A=S.getElementsByTagName("title")[0],(!A||A[Cs]||A[Vt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=S.createElement(v),S.head.insertBefore(A,S.querySelector("head > title"))),Wt(A,v,p),A[Vt]=l,zt(A),v=A;break e;case"link":var P=PO("link","href",S).get(v+(p.href||""));if(P){for(var I=0;I<P.length;I++)if(A=P[I],A.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&A.getAttribute("rel")===(p.rel==null?null:p.rel)&&A.getAttribute("title")===(p.title==null?null:p.title)&&A.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){P.splice(I,1);break t}}A=S.createElement(v),Wt(A,v,p),S.head.appendChild(A);break;case"meta":if(P=PO("meta","content",S).get(v+(p.content||""))){for(I=0;I<P.length;I++)if(A=P[I],A.getAttribute("content")===(p.content==null?null:""+p.content)&&A.getAttribute("name")===(p.name==null?null:p.name)&&A.getAttribute("property")===(p.property==null?null:p.property)&&A.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&A.getAttribute("charset")===(p.charSet==null?null:p.charSet)){P.splice(I,1);break t}}A=S.createElement(v),Wt(A,v,p),S.head.appendChild(A);break;default:throw Error(a(468,v))}A[Vt]=l,zt(A),v=A}l.stateNode=v}else RO(S,l.type,l.stateNode);else l.stateNode=MO(S,v,l.memoizedProps);else A!==v?(A===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):A.count--,v===null?RO(S,l.type,l.stateNode):MO(S,v,l.memoizedProps)):v===null&&l.stateNode!==null&&tg(l,l.memoizedProps,p.memoizedProps)}break;case 27:Er(u,l),kr(l),v&512&&(Ct||p===null||Fn(p,p.return)),p!==null&&v&4&&tg(l,l.memoizedProps,p.memoizedProps);break;case 5:if(Er(u,l),kr(l),v&512&&(Ct||p===null||Fn(p,p.return)),l.flags&32){S=l.stateNode;try{tl(S,"")}catch(Ee){Xe(l,l.return,Ee)}}v&4&&l.stateNode!=null&&(S=l.memoizedProps,tg(l,S,p!==null?p.memoizedProps:S)),v&1024&&(ag=!0);break;case 6:if(Er(u,l),kr(l),v&4){if(l.stateNode===null)throw Error(a(162));v=l.memoizedProps,p=l.stateNode;try{p.nodeValue=v}catch(Ee){Xe(l,l.return,Ee)}}break;case 3:if(ld=null,S=kn,kn=id(u.containerInfo),Er(u,l),kn=S,kr(l),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Ml(u.containerInfo)}catch(Ee){Xe(l,l.return,Ee)}ag&&(ag=!1,RC(l));break;case 4:v=kn,kn=id(l.stateNode.containerInfo),Er(u,l),kr(l),kn=v;break;case 12:Er(u,l),kr(l);break;case 31:Er(u,l),kr(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 13:Er(u,l),kr(l),l.child.flags&8192&&l.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Kf=It()),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 22:S=l.memoizedState!==null;var V=p!==null&&p.memoizedState!==null,ie=ka,pe=Ct;if(ka=ie||S,Ct=pe||V,Er(u,l),Ct=pe,ka=ie,kr(l),v&8192)e:for(u=l.stateNode,u._visibility=S?u._visibility&-2:u._visibility|1,S&&(p===null||V||ka||Ct||fo(l)),p=null,u=l;;){if(u.tag===5||u.tag===26){if(p===null){V=p=u;try{if(A=V.stateNode,S)P=A.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{I=V.stateNode;var ve=V.memoizedProps.style,oe=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;I.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Ee){Xe(V,V.return,Ee)}}}else if(u.tag===6){if(p===null){V=u;try{V.stateNode.nodeValue=S?"":V.memoizedProps}catch(Ee){Xe(V,V.return,Ee)}}}else if(u.tag===18){if(p===null){V=u;try{var fe=V.stateNode;S?SO(fe,!0):SO(V.stateNode,!1)}catch(Ee){Xe(V,V.return,Ee)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}v&4&&(v=l.updateQueue,v!==null&&(p=v.retryQueue,p!==null&&(v.retryQueue=null,Gf(l,p))));break;case 19:Er(u,l),kr(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Gf(l,v)));break;case 30:break;case 21:break;default:Er(u,l),kr(l)}}function kr(l){var u=l.flags;if(u&2){try{for(var p,v=l.return;v!==null;){if(kC(v)){p=v;break}v=v.return}if(p==null)throw Error(a(160));switch(p.tag){case 27:var S=p.stateNode,A=rg(l);Hf(l,A,S);break;case 5:var P=p.stateNode;p.flags&32&&(tl(P,""),p.flags&=-33);var I=rg(l);Hf(l,I,P);break;case 3:case 4:var V=p.stateNode.containerInfo,ie=rg(l);ng(l,ie,V);break;default:throw Error(a(161))}}catch(pe){Xe(l,l.return,pe)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function RC(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;RC(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),l=l.sibling}}function ja(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)CC(l,u.alternate,u),u=u.sibling}function fo(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:xi(4,u,u.return),fo(u);break;case 1:Fn(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&SC(u,u.return,p),fo(u);break;case 27:cu(u.stateNode);case 26:case 5:Fn(u,u.return),fo(u);break;case 22:u.memoizedState===null&&fo(u);break;case 30:fo(u);break;default:fo(u)}l=l.sibling}}function Ca(l,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var v=u.alternate,S=l,A=u,P=A.flags;switch(A.tag){case 0:case 11:case 15:Ca(S,A,p),eu(4,A);break;case 1:if(Ca(S,A,p),v=A,S=v.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ie){Xe(v,v.return,ie)}if(v=A,S=v.updateQueue,S!==null){var I=v.stateNode;try{var V=S.shared.hiddenCallbacks;if(V!==null)for(S.shared.hiddenCallbacks=null,S=0;S<V.length;S++)fj(V[S],I)}catch(ie){Xe(v,v.return,ie)}}p&&P&64&&wC(A),tu(A,A.return);break;case 27:AC(A);case 26:case 5:Ca(S,A,p),p&&v===null&&P&4&&EC(A),tu(A,A.return);break;case 12:Ca(S,A,p);break;case 31:Ca(S,A,p),p&&P&4&&NC(S,A);break;case 13:Ca(S,A,p),p&&P&4&&MC(S,A);break;case 22:A.memoizedState===null&&Ca(S,A,p),tu(A,A.return);break;case 30:break;default:Ca(S,A,p)}u=u.sibling}}function ig(l,u){var p=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==p&&(l!=null&&l.refCount++,p!=null&&$s(p))}function og(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&$s(l))}function An(l,u,p,v){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)DC(l,u,p,v),u=u.sibling}function DC(l,u,p,v){var S=u.flags;switch(u.tag){case 0:case 11:case 15:An(l,u,p,v),S&2048&&eu(9,u);break;case 1:An(l,u,p,v);break;case 3:An(l,u,p,v),S&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&$s(l)));break;case 12:if(S&2048){An(l,u,p,v),l=u.stateNode;try{var A=u.memoizedProps,P=A.id,I=A.onPostCommit;typeof I=="function"&&I(P,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(V){Xe(u,u.return,V)}}else An(l,u,p,v);break;case 31:An(l,u,p,v);break;case 13:An(l,u,p,v);break;case 23:break;case 22:A=u.stateNode,P=u.alternate,u.memoizedState!==null?A._visibility&2?An(l,u,p,v):ru(l,u):A._visibility&2?An(l,u,p,v):(A._visibility|=2,_l(l,u,p,v,(u.subtreeFlags&10256)!==0||!1)),S&2048&&ig(P,u);break;case 24:An(l,u,p,v),S&2048&&og(u.alternate,u);break;default:An(l,u,p,v)}}function _l(l,u,p,v,S){for(S=S&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var A=l,P=u,I=p,V=v,ie=P.flags;switch(P.tag){case 0:case 11:case 15:_l(A,P,I,V,S),eu(8,P);break;case 23:break;case 22:var pe=P.stateNode;P.memoizedState!==null?pe._visibility&2?_l(A,P,I,V,S):ru(A,P):(pe._visibility|=2,_l(A,P,I,V,S)),S&&ie&2048&&ig(P.alternate,P);break;case 24:_l(A,P,I,V,S),S&&ie&2048&&og(P.alternate,P);break;default:_l(A,P,I,V,S)}u=u.sibling}}function ru(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=l,v=u,S=v.flags;switch(v.tag){case 22:ru(p,v),S&2048&&ig(v.alternate,v);break;case 24:ru(p,v),S&2048&&og(v.alternate,v);break;default:ru(p,v)}u=u.sibling}}var nu=8192;function wl(l,u,p){if(l.subtreeFlags&nu)for(l=l.child;l!==null;)LC(l,u,p),l=l.sibling}function LC(l,u,p){switch(l.tag){case 26:wl(l,u,p),l.flags&nu&&l.memoizedState!==null&&wH(p,kn,l.memoizedState,l.memoizedProps);break;case 5:wl(l,u,p);break;case 3:case 4:var v=kn;kn=id(l.stateNode.containerInfo),wl(l,u,p),kn=v;break;case 22:l.memoizedState===null&&(v=l.alternate,v!==null&&v.memoizedState!==null?(v=nu,nu=16777216,wl(l,u,p),nu=v):wl(l,u,p));break;default:wl(l,u,p)}}function IC(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function au(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var v=u[p];qt=v,qC(v,l)}IC(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)zC(l),l=l.sibling}function zC(l){switch(l.tag){case 0:case 11:case 15:au(l),l.flags&2048&&xi(9,l,l.return);break;case 3:au(l);break;case 12:au(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&2&&(l.return===null||l.return.tag!==13)?(u._visibility&=-3,Vf(l)):au(l);break;default:au(l)}}function Vf(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var v=u[p];qt=v,qC(v,l)}IC(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:xi(8,u,u.return),Vf(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Vf(u));break;default:Vf(u)}l=l.sibling}}function qC(l,u){for(;qt!==null;){var p=qt;switch(p.tag){case 0:case 11:case 15:xi(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var v=p.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:$s(p.memoizedState.cache)}if(v=p.child,v!==null)v.return=p,qt=v;else e:for(p=l;qt!==null;){v=qt;var S=v.sibling,A=v.return;if(OC(v),v===p){qt=null;break e}if(S!==null){S.return=A,qt=S;break e}qt=A}}}var IU={getCacheForType:function(l){var u=Yt(kt),p=u.data.get(l);return p===void 0&&(p=l(),u.data.set(l,p)),p},cacheSignal:function(){return Yt(kt).controller.signal}},zU=typeof WeakMap=="function"?WeakMap:Map,Ge=0,tt=null,Le=null,ze=0,Ye=0,zr=null,_i=!1,Sl=!1,lg=!1,Oa=0,yt=0,wi=0,ho=0,sg=0,qr=0,El=0,iu=null,Ar=null,ug=!1,Kf=0,BC=0,Yf=1/0,Xf=null,Si=null,Nt=0,Ei=null,kl=null,Ta=0,cg=0,fg=null,$C=null,ou=0,dg=null;function Br(){return(Ge&2)!==0&&ze!==0?ze&-ze:B.T!==null?yg():nA()}function FC(){if(qr===0)if((ze&536870912)===0||Be){var l=rf;rf<<=1,(rf&3932160)===0&&(rf=262144),qr=l}else qr=536870912;return l=Lr.current,l!==null&&(l.flags|=32),qr}function jr(l,u,p){(l===tt&&(Ye===2||Ye===9)||l.cancelPendingCommit!==null)&&(Al(l,0),ki(l,ze,qr,!1)),js(l,p),((Ge&2)===0||l!==tt)&&(l===tt&&((Ge&2)===0&&(ho|=p),yt===4&&ki(l,ze,qr,!1)),Un(l))}function UC(l,u,p){if((Ge&6)!==0)throw Error(a(327));var v=!p&&(u&127)===0&&(u&l.expiredLanes)===0||As(l,u),S=v?$U(l,u):pg(l,u,!0),A=v;do{if(S===0){Sl&&!v&&ki(l,u,0,!1);break}else{if(p=l.current.alternate,A&&!qU(p)){S=pg(l,u,!1),A=!1;continue}if(S===2){if(A=u,l.errorRecoveryDisabledLanes&A)var P=0;else P=l.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){u=P;e:{var I=l;S=iu;var V=I.current.memoizedState.isDehydrated;if(V&&(Al(I,P).flags|=256),P=pg(I,P,!1),P!==2){if(lg&&!V){I.errorRecoveryDisabledLanes|=A,ho|=A,S=4;break e}A=Ar,Ar=S,A!==null&&(Ar===null?Ar=A:Ar.push.apply(Ar,A))}S=P}if(A=!1,S!==2)continue}}if(S===1){Al(l,0),ki(l,u,0,!0);break}e:{switch(v=l,A=S,A){case 0:case 1:throw Error(a(345));case 4:if((u&4194048)!==u)break;case 6:ki(v,u,qr,!_i);break e;case 2:Ar=null;break;case 3:case 5:break;default:throw Error(a(329))}if((u&62914560)===u&&(S=Kf+300-It(),10<S)){if(ki(v,u,qr,!_i),af(v,0,!0)!==0)break e;Ta=u,v.timeoutHandle=xO(HC.bind(null,v,p,Ar,Xf,ug,u,qr,ho,El,_i,A,"Throttled",-0,0),S);break e}HC(v,p,Ar,Xf,ug,u,qr,ho,El,_i,A,null,-0,0)}}break}while(!0);Un(l)}function HC(l,u,p,v,S,A,P,I,V,ie,pe,ve,oe,fe){if(l.timeoutHandle=-1,ve=u.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},LC(u,A,ve);var Ee=(A&62914560)===A?Kf-It():(A&4194048)===A?BC-It():0;if(Ee=SH(ve,Ee),Ee!==null){Ta=A,l.cancelPendingCommit=Ee(QC.bind(null,l,u,A,p,v,S,P,I,V,pe,ve,null,oe,fe)),ki(l,A,P,!ie);return}}QC(l,u,A,p,v,S,P,I,V)}function qU(l){for(var u=l;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var v=0;v<p.length;v++){var S=p[v],A=S.getSnapshot;S=S.value;try{if(!Rr(A(),S))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ki(l,u,p,v){u&=~sg,u&=~ho,l.suspendedLanes|=u,l.pingedLanes&=~u,v&&(l.warmLanes|=u),v=l.expirationTimes;for(var S=u;0<S;){var A=31-Pr(S),P=1<<A;v[A]=-1,S&=~P}p!==0&&eA(l,p,u)}function Wf(){return(Ge&6)===0?(lu(0),!1):!0}function hg(){if(Le!==null){if(Ye===0)var l=Le.return;else l=Le,ba=no=null,Ov(l),vl=null,Us=0,l=Le;for(;l!==null;)_C(l.alternate,l),l=l.return;Le=null}}function Al(l,u){var p=l.timeoutHandle;p!==-1&&(l.timeoutHandle=-1,iH(p)),p=l.cancelPendingCommit,p!==null&&(l.cancelPendingCommit=null,p()),Ta=0,hg(),tt=l,Le=p=ga(l.current,null),ze=u,Ye=0,zr=null,_i=!1,Sl=As(l,u),lg=!1,El=qr=sg=ho=wi=yt=0,Ar=iu=null,ug=!1,(u&8)!==0&&(u|=u&32);var v=l.entangledLanes;if(v!==0)for(l=l.entanglements,v&=u;0<v;){var S=31-Pr(v),A=1<<S;u|=l[S],v&=~A}return Oa=u,gf(),p}function GC(l,u){Pe=null,B.H=Zs,u===ml||u===kf?(u=lj(),Ye=3):u===gv?(u=lj(),Ye=4):Ye=u===Gv?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,zr=u,Le===null&&(yt=1,qf(l,Qr(u,l.current)))}function VC(){var l=Lr.current;return l===null?!0:(ze&4194048)===ze?rn===null:(ze&62914560)===ze||(ze&536870912)!==0?l===rn:!1}function KC(){var l=B.H;return B.H=Zs,l===null?Zs:l}function YC(){var l=B.A;return B.A=IU,l}function Zf(){yt=4,_i||(ze&4194048)!==ze&&Lr.current!==null||(Sl=!0),(wi&134217727)===0&&(ho&134217727)===0||tt===null||ki(tt,ze,qr,!1)}function pg(l,u,p){var v=Ge;Ge|=2;var S=KC(),A=YC();(tt!==l||ze!==u)&&(Xf=null,Al(l,u)),u=!1;var P=yt;e:do try{if(Ye!==0&&Le!==null){var I=Le,V=zr;switch(Ye){case 8:hg(),P=6;break e;case 3:case 2:case 9:case 6:Lr.current===null&&(u=!0);var ie=Ye;if(Ye=0,zr=null,jl(l,I,V,ie),p&&Sl){P=0;break e}break;default:ie=Ye,Ye=0,zr=null,jl(l,I,V,ie)}}BU(),P=yt;break}catch(pe){GC(l,pe)}while(!0);return u&&l.shellSuspendCounter++,ba=no=null,Ge=v,B.H=S,B.A=A,Le===null&&(tt=null,ze=0,gf()),P}function BU(){for(;Le!==null;)XC(Le)}function $U(l,u){var p=Ge;Ge|=2;var v=KC(),S=YC();tt!==l||ze!==u?(Xf=null,Yf=It()+500,Al(l,u)):Sl=As(l,u);e:do try{if(Ye!==0&&Le!==null){u=Le;var A=zr;t:switch(Ye){case 1:Ye=0,zr=null,jl(l,u,A,1);break;case 2:case 9:if(ij(A)){Ye=0,zr=null,WC(u);break}u=function(){Ye!==2&&Ye!==9||tt!==l||(Ye=7),Un(l)},A.then(u,u);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:ij(A)?(Ye=0,zr=null,WC(u)):(Ye=0,zr=null,jl(l,u,A,7));break;case 5:var P=null;switch(Le.tag){case 26:P=Le.memoizedState;case 5:case 27:var I=Le;if(P?DO(P):I.stateNode.complete){Ye=0,zr=null;var V=I.sibling;if(V!==null)Le=V;else{var ie=I.return;ie!==null?(Le=ie,Qf(ie)):Le=null}break t}}Ye=0,zr=null,jl(l,u,A,5);break;case 6:Ye=0,zr=null,jl(l,u,A,6);break;case 8:hg(),yt=6;break e;default:throw Error(a(462))}}FU();break}catch(pe){GC(l,pe)}while(!0);return ba=no=null,B.H=v,B.A=S,Ge=p,Le!==null?0:(tt=null,ze=0,gf(),yt)}function FU(){for(;Le!==null&&!qn();)XC(Le)}function XC(l){var u=bC(l.alternate,l,Oa);l.memoizedProps=l.pendingProps,u===null?Qf(l):Le=u}function WC(l){var u=l,p=u.alternate;switch(u.tag){case 15:case 0:u=hC(p,u,u.pendingProps,u.type,void 0,ze);break;case 11:u=hC(p,u,u.pendingProps,u.type.render,u.ref,ze);break;case 5:Ov(u);default:_C(p,u),u=Le=YA(u,Oa),u=bC(p,u,Oa)}l.memoizedProps=l.pendingProps,u===null?Qf(l):Le=u}function jl(l,u,p,v){ba=no=null,Ov(u),vl=null,Us=0;var S=u.return;try{if(TU(l,S,u,p,ze)){yt=1,qf(l,Qr(p,l.current)),Le=null;return}}catch(A){if(S!==null)throw Le=S,A;yt=1,qf(l,Qr(p,l.current)),Le=null;return}u.flags&32768?(Be||v===1?l=!0:Sl||(ze&536870912)!==0?l=!1:(_i=l=!0,(v===2||v===9||v===3||v===6)&&(v=Lr.current,v!==null&&v.tag===13&&(v.flags|=16384))),ZC(u,l)):Qf(u)}function Qf(l){var u=l;do{if((u.flags&32768)!==0){ZC(u,_i);return}l=u.return;var p=PU(u.alternate,u,Oa);if(p!==null){Le=p;return}if(u=u.sibling,u!==null){Le=u;return}Le=u=l}while(u!==null);yt===0&&(yt=5)}function ZC(l,u){do{var p=RU(l.alternate,l);if(p!==null){p.flags&=32767,Le=p;return}if(p=l.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(l=l.sibling,l!==null)){Le=l;return}Le=l=p}while(l!==null);yt=6,Le=null}function QC(l,u,p,v,S,A,P,I,V){l.cancelPendingCommit=null;do Jf();while(Nt!==0);if((Ge&6)!==0)throw Error(a(327));if(u!==null){if(u===l.current)throw Error(a(177));if(A=u.lanes|u.childLanes,A|=rv,_F(l,p,A,P,I,V),l===tt&&(Le=tt=null,ze=0),kl=u,Ei=l,Ta=p,cg=A,fg=S,$C=v,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,VU(Sn,function(){return nO(),null})):(l.callbackNode=null,l.callbackPriority=0),v=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||v){v=B.T,B.T=null,S=Q.p,Q.p=2,P=Ge,Ge|=4;try{DU(l,u,p)}finally{Ge=P,Q.p=S,B.T=v}}Nt=1,JC(),eO(),tO()}}function JC(){if(Nt===1){Nt=0;var l=Ei,u=kl,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=B.T,B.T=null;var v=Q.p;Q.p=2;var S=Ge;Ge|=4;try{PC(u,l);var A=Ag,P=qA(l.containerInfo),I=A.focusedElem,V=A.selectionRange;if(P!==I&&I&&I.ownerDocument&&zA(I.ownerDocument.documentElement,I)){if(V!==null&&Zm(I)){var ie=V.start,pe=V.end;if(pe===void 0&&(pe=ie),"selectionStart"in I)I.selectionStart=ie,I.selectionEnd=Math.min(pe,I.value.length);else{var ve=I.ownerDocument||document,oe=ve&&ve.defaultView||window;if(oe.getSelection){var fe=oe.getSelection(),Ee=I.textContent.length,Ne=Math.min(V.start,Ee),Qe=V.end===void 0?Ne:Math.min(V.end,Ee);!fe.extend&&Ne>Qe&&(P=Qe,Qe=Ne,Ne=P);var ne=IA(I,Ne),W=IA(I,Qe);if(ne&&W&&(fe.rangeCount!==1||fe.anchorNode!==ne.node||fe.anchorOffset!==ne.offset||fe.focusNode!==W.node||fe.focusOffset!==W.offset)){var ae=ve.createRange();ae.setStart(ne.node,ne.offset),fe.removeAllRanges(),Ne>Qe?(fe.addRange(ae),fe.extend(W.node,W.offset)):(ae.setEnd(W.node,W.offset),fe.addRange(ae))}}}}for(ve=[],fe=I;fe=fe.parentNode;)fe.nodeType===1&&ve.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<ve.length;I++){var me=ve[I];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}fd=!!kg,Ag=kg=null}finally{Ge=S,Q.p=v,B.T=p}}l.current=u,Nt=2}}function eO(){if(Nt===2){Nt=0;var l=Ei,u=kl,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=B.T,B.T=null;var v=Q.p;Q.p=2;var S=Ge;Ge|=4;try{CC(l,u.alternate,u)}finally{Ge=S,Q.p=v,B.T=p}}Nt=3}}function tO(){if(Nt===4||Nt===3){Nt=0,nr();var l=Ei,u=kl,p=Ta,v=$C;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Nt=5:(Nt=0,kl=Ei=null,rO(l,l.pendingLanes));var S=l.pendingLanes;if(S===0&&(Si=null),Mm(p),u=u.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(xr,u,void 0,(u.current.flags&128)===128)}catch{}if(v!==null){u=B.T,S=Q.p,Q.p=2,B.T=null;try{for(var A=l.onRecoverableError,P=0;P<v.length;P++){var I=v[P];A(I.value,{componentStack:I.stack})}}finally{B.T=u,Q.p=S}}(Ta&3)!==0&&Jf(),Un(l),S=l.pendingLanes,(p&261930)!==0&&(S&42)!==0?l===dg?ou++:(ou=0,dg=l):ou=0,lu(0)}}function rO(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,$s(u)))}function Jf(){return JC(),eO(),tO(),nO()}function nO(){if(Nt!==5)return!1;var l=Ei,u=cg;cg=0;var p=Mm(Ta),v=B.T,S=Q.p;try{Q.p=32>p?32:p,B.T=null,p=fg,fg=null;var A=Ei,P=Ta;if(Nt=0,kl=Ei=null,Ta=0,(Ge&6)!==0)throw Error(a(331));var I=Ge;if(Ge|=4,zC(A.current),DC(A,A.current,P,p),Ge=I,lu(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(xr,A)}catch{}return!0}finally{Q.p=S,B.T=v,rO(l,u)}}function aO(l,u,p){u=Qr(p,u),u=Hv(l.stateNode,u,2),l=gi(l,u,2),l!==null&&(js(l,2),Un(l))}function Xe(l,u,p){if(l.tag===3)aO(l,l,p);else for(;u!==null;){if(u.tag===3){aO(u,l,p);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Si===null||!Si.has(v))){l=Qr(p,l),p=iC(2),v=gi(u,p,2),v!==null&&(oC(p,v,u,l),js(v,2),Un(v));break}}u=u.return}}function mg(l,u,p){var v=l.pingCache;if(v===null){v=l.pingCache=new zU;var S=new Set;v.set(u,S)}else S=v.get(u),S===void 0&&(S=new Set,v.set(u,S));S.has(p)||(lg=!0,S.add(p),l=UU.bind(null,l,u,p),u.then(l,l))}function UU(l,u,p){var v=l.pingCache;v!==null&&v.delete(u),l.pingedLanes|=l.suspendedLanes&p,l.warmLanes&=~p,tt===l&&(ze&p)===p&&(yt===4||yt===3&&(ze&62914560)===ze&&300>It()-Kf?(Ge&2)===0&&Al(l,0):sg|=p,El===ze&&(El=0)),Un(l)}function iO(l,u){u===0&&(u=Jk()),l=eo(l,u),l!==null&&(js(l,u),Un(l))}function HU(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),iO(l,p)}function GU(l,u){var p=0;switch(l.tag){case 31:case 13:var v=l.stateNode,S=l.memoizedState;S!==null&&(p=S.retryLane);break;case 19:v=l.stateNode;break;case 22:v=l.stateNode._retryCache;break;default:throw Error(a(314))}v!==null&&v.delete(u),iO(l,p)}function VU(l,u){return Ss(l,u)}var ed=null,Cl=null,vg=!1,td=!1,gg=!1,Ai=0;function Un(l){l!==Cl&&l.next===null&&(Cl===null?ed=Cl=l:Cl=Cl.next=l),td=!0,vg||(vg=!0,YU())}function lu(l,u){if(!gg&&td){gg=!0;do for(var p=!1,v=ed;v!==null;){if(l!==0){var S=v.pendingLanes;if(S===0)var A=0;else{var P=v.suspendedLanes,I=v.pingedLanes;A=(1<<31-Pr(42|l)+1)-1,A&=S&~(P&~I),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(p=!0,uO(v,A))}else A=ze,A=af(v,v===tt?A:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(A&3)===0||As(v,A)||(p=!0,uO(v,A));v=v.next}while(p);gg=!1}}function KU(){oO()}function oO(){td=vg=!1;var l=0;Ai!==0&&aH()&&(l=Ai);for(var u=It(),p=null,v=ed;v!==null;){var S=v.next,A=lO(v,u);A===0?(v.next=null,p===null?ed=S:p.next=S,S===null&&(Cl=p)):(p=v,(l!==0||(A&3)!==0)&&(td=!0)),v=S}Nt!==0&&Nt!==5||lu(l),Ai!==0&&(Ai=0)}function lO(l,u){for(var p=l.suspendedLanes,v=l.pingedLanes,S=l.expirationTimes,A=l.pendingLanes&-62914561;0<A;){var P=31-Pr(A),I=1<<P,V=S[P];V===-1?((I&p)===0||(I&v)!==0)&&(S[P]=xF(I,u)):V<=u&&(l.expiredLanes|=I),A&=~I}if(u=tt,p=ze,p=af(l,l===u?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v=l.callbackNode,p===0||l===u&&(Ye===2||Ye===9)||l.cancelPendingCommit!==null)return v!==null&&v!==null&&li(v),l.callbackNode=null,l.callbackPriority=0;if((p&3)===0||As(l,p)){if(u=p&-p,u===l.callbackPriority)return u;switch(v!==null&&li(v),Mm(p)){case 2:case 8:p=Es;break;case 32:p=Sn;break;case 268435456:p=ks;break;default:p=Sn}return v=sO.bind(null,l),p=Ss(p,v),l.callbackPriority=u,l.callbackNode=p,u}return v!==null&&v!==null&&li(v),l.callbackPriority=2,l.callbackNode=null,2}function sO(l,u){if(Nt!==0&&Nt!==5)return l.callbackNode=null,l.callbackPriority=0,null;var p=l.callbackNode;if(Jf()&&l.callbackNode!==p)return null;var v=ze;return v=af(l,l===tt?v:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v===0?null:(UC(l,v,u),lO(l,It()),l.callbackNode!=null&&l.callbackNode===p?sO.bind(null,l):null)}function uO(l,u){if(Jf())return null;UC(l,u,!0)}function YU(){oH(function(){(Ge&6)!==0?Ss(Qc,KU):oO()})}function yg(){if(Ai===0){var l=hl;l===0&&(l=tf,tf<<=1,(tf&261888)===0&&(tf=256)),Ai=l}return Ai}function cO(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:uf(""+l)}function fO(l,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,l.id&&p.setAttribute("form",l.id),u.parentNode.insertBefore(p,u),l=new FormData(l),p.parentNode.removeChild(p),l}function XU(l,u,p,v,S){if(u==="submit"&&p&&p.stateNode===S){var A=cO((S[_r]||null).action),P=v.submitter;P&&(u=(u=P[_r]||null)?cO(u.formAction):P.getAttribute("formAction"),u!==null&&(A=u,P=null));var I=new hf("action","action",null,v,S);l.push({event:I,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(Ai!==0){var V=P?fO(S,P):new FormData(S);zv(p,{pending:!0,data:V,method:S.method,action:A},null,V)}}else typeof A=="function"&&(I.preventDefault(),V=P?fO(S,P):new FormData(S),zv(p,{pending:!0,data:V,method:S.method,action:A},A,V))},currentTarget:S}]})}}for(var bg=0;bg<tv.length;bg++){var xg=tv[bg],WU=xg.toLowerCase(),ZU=xg[0].toUpperCase()+xg.slice(1);En(WU,"on"+ZU)}En(FA,"onAnimationEnd"),En(UA,"onAnimationIteration"),En(HA,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(hU,"onTransitionRun"),En(pU,"onTransitionStart"),En(mU,"onTransitionCancel"),En(GA,"onTransitionEnd"),Jo("onMouseEnter",["mouseout","mouseover"]),Jo("onMouseLeave",["mouseout","mouseover"]),Jo("onPointerEnter",["pointerout","pointerover"]),Jo("onPointerLeave",["pointerout","pointerover"]),Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),QU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(su));function dO(l,u){u=(u&4)!==0;for(var p=0;p<l.length;p++){var v=l[p],S=v.event;v=v.listeners;e:{var A=void 0;if(u)for(var P=v.length-1;0<=P;P--){var I=v[P],V=I.instance,ie=I.currentTarget;if(I=I.listener,V!==A&&S.isPropagationStopped())break e;A=I,S.currentTarget=ie;try{A(S)}catch(pe){vf(pe)}S.currentTarget=null,A=V}else for(P=0;P<v.length;P++){if(I=v[P],V=I.instance,ie=I.currentTarget,I=I.listener,V!==A&&S.isPropagationStopped())break e;A=I,S.currentTarget=ie;try{A(S)}catch(pe){vf(pe)}S.currentTarget=null,A=V}}}}function Ie(l,u){var p=u[Pm];p===void 0&&(p=u[Pm]=new Set);var v=l+"__bubble";p.has(v)||(hO(u,l,2,!1),p.add(v))}function _g(l,u,p){var v=0;u&&(v|=4),hO(p,l,v,u)}var rd="_reactListening"+Math.random().toString(36).slice(2);function wg(l){if(!l[rd]){l[rd]=!0,oA.forEach(function(p){p!=="selectionchange"&&(QU.has(p)||_g(p,!1,l),_g(p,!0,l))});var u=l.nodeType===9?l:l.ownerDocument;u===null||u[rd]||(u[rd]=!0,_g("selectionchange",!1,u))}}function hO(l,u,p,v){switch(FO(u)){case 2:var S=AH;break;case 8:S=jH;break;default:S=Ig}p=S.bind(null,u,p,l),S=void 0,!Fm||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(S=!0),v?S!==void 0?l.addEventListener(u,p,{capture:!0,passive:S}):l.addEventListener(u,p,!0):S!==void 0?l.addEventListener(u,p,{passive:S}):l.addEventListener(u,p,!1)}function Sg(l,u,p,v,S){var A=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var P=v.tag;if(P===3||P===4){var I=v.stateNode.containerInfo;if(I===S)break;if(P===4)for(P=v.return;P!==null;){var V=P.tag;if((V===3||V===4)&&P.stateNode.containerInfo===S)return;P=P.return}for(;I!==null;){if(P=Wo(I),P===null)return;if(V=P.tag,V===5||V===6||V===26||V===27){v=A=P;continue e}I=I.parentNode}}v=v.return}yA(function(){var ie=A,pe=Bm(p),ve=[];e:{var oe=VA.get(l);if(oe!==void 0){var fe=hf,Ee=l;switch(l){case"keypress":if(ff(p)===0)break e;case"keydown":case"keyup":fe=GF;break;case"focusin":Ee="focus",fe=Vm;break;case"focusout":Ee="blur",fe=Vm;break;case"beforeblur":case"afterblur":fe=Vm;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=_A;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=PF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=YF;break;case FA:case UA:case HA:fe=LF;break;case GA:fe=WF;break;case"scroll":case"scrollend":fe=NF;break;case"wheel":fe=QF;break;case"copy":case"cut":case"paste":fe=zF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=SA;break;case"toggle":case"beforetoggle":fe=eU}var Ne=(u&4)!==0,Qe=!Ne&&(l==="scroll"||l==="scrollend"),ne=Ne?oe!==null?oe+"Capture":null:oe;Ne=[];for(var W=ie,ae;W!==null;){var me=W;if(ae=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ae===null||ne===null||(me=Ts(W,ne),me!=null&&Ne.push(uu(W,me,ae))),Qe)break;W=W.return}0<Ne.length&&(oe=new fe(oe,Ee,null,p,pe),ve.push({event:oe,listeners:Ne}))}}if((u&7)===0){e:{if(oe=l==="mouseover"||l==="pointerover",fe=l==="mouseout"||l==="pointerout",oe&&p!==qm&&(Ee=p.relatedTarget||p.fromElement)&&(Wo(Ee)||Ee[Xo]))break e;if((fe||oe)&&(oe=pe.window===pe?pe:(oe=pe.ownerDocument)?oe.defaultView||oe.parentWindow:window,fe?(Ee=p.relatedTarget||p.toElement,fe=ie,Ee=Ee?Wo(Ee):null,Ee!==null&&(Qe=o(Ee),Ne=Ee.tag,Ee!==Qe||Ne!==5&&Ne!==27&&Ne!==6)&&(Ee=null)):(fe=null,Ee=ie),fe!==Ee)){if(Ne=_A,me="onMouseLeave",ne="onMouseEnter",W="mouse",(l==="pointerout"||l==="pointerover")&&(Ne=SA,me="onPointerLeave",ne="onPointerEnter",W="pointer"),Qe=fe==null?oe:Os(fe),ae=Ee==null?oe:Os(Ee),oe=new Ne(me,W+"leave",fe,p,pe),oe.target=Qe,oe.relatedTarget=ae,me=null,Wo(pe)===ie&&(Ne=new Ne(ne,W+"enter",Ee,p,pe),Ne.target=ae,Ne.relatedTarget=Qe,me=Ne),Qe=me,fe&&Ee)t:{for(Ne=JU,ne=fe,W=Ee,ae=0,me=ne;me;me=Ne(me))ae++;me=0;for(var Te=W;Te;Te=Ne(Te))me++;for(;0<ae-me;)ne=Ne(ne),ae--;for(;0<me-ae;)W=Ne(W),me--;for(;ae--;){if(ne===W||W!==null&&ne===W.alternate){Ne=ne;break t}ne=Ne(ne),W=Ne(W)}Ne=null}else Ne=null;fe!==null&&pO(ve,oe,fe,Ne,!1),Ee!==null&&Qe!==null&&pO(ve,Qe,Ee,Ne,!0)}}e:{if(oe=ie?Os(ie):window,fe=oe.nodeName&&oe.nodeName.toLowerCase(),fe==="select"||fe==="input"&&oe.type==="file")var Fe=NA;else if(OA(oe))if(MA)Fe=cU;else{Fe=sU;var Ae=lU}else fe=oe.nodeName,!fe||fe.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ie&&zm(ie.elementType)&&(Fe=NA):Fe=uU;if(Fe&&(Fe=Fe(l,ie))){TA(ve,Fe,p,pe);break e}Ae&&Ae(l,oe,ie),l==="focusout"&&ie&&oe.type==="number"&&ie.memoizedProps.value!=null&&Im(oe,"number",oe.value)}switch(Ae=ie?Os(ie):window,l){case"focusin":(OA(Ae)||Ae.contentEditable==="true")&&(il=Ae,Qm=ie,zs=null);break;case"focusout":zs=Qm=il=null;break;case"mousedown":Jm=!0;break;case"contextmenu":case"mouseup":case"dragend":Jm=!1,BA(ve,p,pe);break;case"selectionchange":if(dU)break;case"keydown":case"keyup":BA(ve,p,pe)}var Re;if(Ym)e:{switch(l){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else al?jA(l,p)&&(qe="onCompositionEnd"):l==="keydown"&&p.keyCode===229&&(qe="onCompositionStart");qe&&(EA&&p.locale!=="ko"&&(al||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&al&&(Re=bA()):(ci=pe,Um="value"in ci?ci.value:ci.textContent,al=!0)),Ae=nd(ie,qe),0<Ae.length&&(qe=new wA(qe,l,null,p,pe),ve.push({event:qe,listeners:Ae}),Re?qe.data=Re:(Re=CA(p),Re!==null&&(qe.data=Re)))),(Re=rU?nU(l,p):aU(l,p))&&(qe=nd(ie,"onBeforeInput"),0<qe.length&&(Ae=new wA("onBeforeInput","beforeinput",null,p,pe),ve.push({event:Ae,listeners:qe}),Ae.data=Re)),XU(ve,l,ie,p,pe)}dO(ve,u)})}function uu(l,u,p){return{instance:l,listener:u,currentTarget:p}}function nd(l,u){for(var p=u+"Capture",v=[];l!==null;){var S=l,A=S.stateNode;if(S=S.tag,S!==5&&S!==26&&S!==27||A===null||(S=Ts(l,p),S!=null&&v.unshift(uu(l,S,A)),S=Ts(l,u),S!=null&&v.push(uu(l,S,A))),l.tag===3)return v;l=l.return}return[]}function JU(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function pO(l,u,p,v,S){for(var A=u._reactName,P=[];p!==null&&p!==v;){var I=p,V=I.alternate,ie=I.stateNode;if(I=I.tag,V!==null&&V===v)break;I!==5&&I!==26&&I!==27||ie===null||(V=ie,S?(ie=Ts(p,A),ie!=null&&P.unshift(uu(p,ie,V))):S||(ie=Ts(p,A),ie!=null&&P.push(uu(p,ie,V)))),p=p.return}P.length!==0&&l.push({event:u,listeners:P})}var eH=/\r\n?/g,tH=/\u0000|\uFFFD/g;function mO(l){return(typeof l=="string"?l:""+l).replace(eH,`
|
|
49
|
+
`).replace(tH,"")}function vO(l,u){return u=mO(u),mO(l)===u}function Ze(l,u,p,v,S,A){switch(p){case"children":typeof v=="string"?u==="body"||u==="textarea"&&v===""||tl(l,v):(typeof v=="number"||typeof v=="bigint")&&u!=="body"&&tl(l,""+v);break;case"className":lf(l,"class",v);break;case"tabIndex":lf(l,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":lf(l,p,v);break;case"style":vA(l,v,A);break;case"data":if(u!=="object"){lf(l,"data",v);break}case"src":case"href":if(v===""&&(u!=="a"||p!=="href")){l.removeAttribute(p);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=uf(""+v),l.setAttribute(p,v);break;case"action":case"formAction":if(typeof v=="function"){l.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof A=="function"&&(p==="formAction"?(u!=="input"&&Ze(l,u,"name",S.name,S,null),Ze(l,u,"formEncType",S.formEncType,S,null),Ze(l,u,"formMethod",S.formMethod,S,null),Ze(l,u,"formTarget",S.formTarget,S,null)):(Ze(l,u,"encType",S.encType,S,null),Ze(l,u,"method",S.method,S,null),Ze(l,u,"target",S.target,S,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=uf(""+v),l.setAttribute(p,v);break;case"onClick":v!=null&&(l.onclick=ma);break;case"onScroll":v!=null&&Ie("scroll",l);break;case"onScrollEnd":v!=null&&Ie("scrollend",l);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"multiple":l.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":l.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){l.removeAttribute("xlink:href");break}p=uf(""+v),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""+v):l.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""):l.removeAttribute(p);break;case"capture":case"download":v===!0?l.setAttribute(p,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,v):l.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?l.setAttribute(p,v):l.removeAttribute(p);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?l.removeAttribute(p):l.setAttribute(p,v);break;case"popover":Ie("beforetoggle",l),Ie("toggle",l),of(l,"popover",v);break;case"xlinkActuate":pa(l,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":pa(l,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":pa(l,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":pa(l,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":pa(l,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":pa(l,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":pa(l,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":pa(l,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":pa(l,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":of(l,"is",v);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=OF.get(p)||p,of(l,p,v))}}function Eg(l,u,p,v,S,A){switch(p){case"style":vA(l,v,A);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"children":typeof v=="string"?tl(l,v):(typeof v=="number"||typeof v=="bigint")&&tl(l,""+v);break;case"onScroll":v!=null&&Ie("scroll",l);break;case"onScrollEnd":v!=null&&Ie("scrollend",l);break;case"onClick":v!=null&&(l.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lA.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(S=p.endsWith("Capture"),u=p.slice(2,S?p.length-7:void 0),A=l[_r]||null,A=A!=null?A[p]:null,typeof A=="function"&&l.removeEventListener(u,A,S),typeof v=="function")){typeof A!="function"&&A!==null&&(p in l?l[p]=null:l.hasAttribute(p)&&l.removeAttribute(p)),l.addEventListener(u,v,S);break e}p in l?l[p]=v:v===!0?l.setAttribute(p,""):of(l,p,v)}}}function Wt(l,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",l),Ie("load",l);var v=!1,S=!1,A;for(A in p)if(p.hasOwnProperty(A)){var P=p[A];if(P!=null)switch(A){case"src":v=!0;break;case"srcSet":S=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,u));default:Ze(l,u,A,P,p,null)}}S&&Ze(l,u,"srcSet",p.srcSet,p,null),v&&Ze(l,u,"src",p.src,p,null);return;case"input":Ie("invalid",l);var I=A=P=S=null,V=null,ie=null;for(v in p)if(p.hasOwnProperty(v)){var pe=p[v];if(pe!=null)switch(v){case"name":S=pe;break;case"type":P=pe;break;case"checked":V=pe;break;case"defaultChecked":ie=pe;break;case"value":A=pe;break;case"defaultValue":I=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,u));break;default:Ze(l,u,v,pe,p,null)}}dA(l,A,I,V,ie,P,S,!1);return;case"select":Ie("invalid",l),v=P=A=null;for(S in p)if(p.hasOwnProperty(S)&&(I=p[S],I!=null))switch(S){case"value":A=I;break;case"defaultValue":P=I;break;case"multiple":v=I;default:Ze(l,u,S,I,p,null)}u=A,p=P,l.multiple=!!v,u!=null?el(l,!!v,u,!1):p!=null&&el(l,!!v,p,!0);return;case"textarea":Ie("invalid",l),A=S=v=null;for(P in p)if(p.hasOwnProperty(P)&&(I=p[P],I!=null))switch(P){case"value":v=I;break;case"defaultValue":S=I;break;case"children":A=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:Ze(l,u,P,I,p,null)}pA(l,v,S,A);return;case"option":for(V in p)if(p.hasOwnProperty(V)&&(v=p[V],v!=null))switch(V){case"selected":l.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Ze(l,u,V,v,p,null)}return;case"dialog":Ie("beforetoggle",l),Ie("toggle",l),Ie("cancel",l),Ie("close",l);break;case"iframe":case"object":Ie("load",l);break;case"video":case"audio":for(v=0;v<su.length;v++)Ie(su[v],l);break;case"image":Ie("error",l),Ie("load",l);break;case"details":Ie("toggle",l);break;case"embed":case"source":case"link":Ie("error",l),Ie("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in p)if(p.hasOwnProperty(ie)&&(v=p[ie],v!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,u));default:Ze(l,u,ie,v,p,null)}return;default:if(zm(u)){for(pe in p)p.hasOwnProperty(pe)&&(v=p[pe],v!==void 0&&Eg(l,u,pe,v,p,void 0));return}}for(I in p)p.hasOwnProperty(I)&&(v=p[I],v!=null&&Ze(l,u,I,v,p,null))}function rH(l,u,p,v){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var S=null,A=null,P=null,I=null,V=null,ie=null,pe=null;for(fe in p){var ve=p[fe];if(p.hasOwnProperty(fe)&&ve!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":V=ve;default:v.hasOwnProperty(fe)||Ze(l,u,fe,null,v,ve)}}for(var oe in v){var fe=v[oe];if(ve=p[oe],v.hasOwnProperty(oe)&&(fe!=null||ve!=null))switch(oe){case"type":A=fe;break;case"name":S=fe;break;case"checked":ie=fe;break;case"defaultChecked":pe=fe;break;case"value":P=fe;break;case"defaultValue":I=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,u));break;default:fe!==ve&&Ze(l,u,oe,fe,v,ve)}}Lm(l,P,I,V,ie,pe,A,S);return;case"select":fe=P=I=oe=null;for(A in p)if(V=p[A],p.hasOwnProperty(A)&&V!=null)switch(A){case"value":break;case"multiple":fe=V;default:v.hasOwnProperty(A)||Ze(l,u,A,null,v,V)}for(S in v)if(A=v[S],V=p[S],v.hasOwnProperty(S)&&(A!=null||V!=null))switch(S){case"value":oe=A;break;case"defaultValue":I=A;break;case"multiple":P=A;default:A!==V&&Ze(l,u,S,A,v,V)}u=I,p=P,v=fe,oe!=null?el(l,!!p,oe,!1):!!v!=!!p&&(u!=null?el(l,!!p,u,!0):el(l,!!p,p?[]:"",!1));return;case"textarea":fe=oe=null;for(I in p)if(S=p[I],p.hasOwnProperty(I)&&S!=null&&!v.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:Ze(l,u,I,null,v,S)}for(P in v)if(S=v[P],A=p[P],v.hasOwnProperty(P)&&(S!=null||A!=null))switch(P){case"value":oe=S;break;case"defaultValue":fe=S;break;case"children":break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:S!==A&&Ze(l,u,P,S,v,A)}hA(l,oe,fe);return;case"option":for(var Ee in p)if(oe=p[Ee],p.hasOwnProperty(Ee)&&oe!=null&&!v.hasOwnProperty(Ee))switch(Ee){case"selected":l.selected=!1;break;default:Ze(l,u,Ee,null,v,oe)}for(V in v)if(oe=v[V],fe=p[V],v.hasOwnProperty(V)&&oe!==fe&&(oe!=null||fe!=null))switch(V){case"selected":l.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Ze(l,u,V,oe,v,fe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in p)oe=p[Ne],p.hasOwnProperty(Ne)&&oe!=null&&!v.hasOwnProperty(Ne)&&Ze(l,u,Ne,null,v,oe);for(ie in v)if(oe=v[ie],fe=p[ie],v.hasOwnProperty(ie)&&oe!==fe&&(oe!=null||fe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,u));break;default:Ze(l,u,ie,oe,v,fe)}return;default:if(zm(u)){for(var Qe in p)oe=p[Qe],p.hasOwnProperty(Qe)&&oe!==void 0&&!v.hasOwnProperty(Qe)&&Eg(l,u,Qe,void 0,v,oe);for(pe in v)oe=v[pe],fe=p[pe],!v.hasOwnProperty(pe)||oe===fe||oe===void 0&&fe===void 0||Eg(l,u,pe,oe,v,fe);return}}for(var ne in p)oe=p[ne],p.hasOwnProperty(ne)&&oe!=null&&!v.hasOwnProperty(ne)&&Ze(l,u,ne,null,v,oe);for(ve in v)oe=v[ve],fe=p[ve],!v.hasOwnProperty(ve)||oe===fe||oe==null&&fe==null||Ze(l,u,ve,oe,v,fe)}function gO(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nH(){if(typeof performance.getEntriesByType=="function"){for(var l=0,u=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var S=p[v],A=S.transferSize,P=S.initiatorType,I=S.duration;if(A&&I&&gO(P)){for(P=0,I=S.responseEnd,v+=1;v<p.length;v++){var V=p[v],ie=V.startTime;if(ie>I)break;var pe=V.transferSize,ve=V.initiatorType;pe&&gO(ve)&&(V=V.responseEnd,P+=pe*(V<I?1:(I-ie)/(V-ie)))}if(--v,u+=8*(A+P)/(S.duration/1e3),l++,10<l)break}}if(0<l)return u/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var kg=null,Ag=null;function ad(l){return l.nodeType===9?l:l.ownerDocument}function yO(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bO(l,u){if(l===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&u==="foreignObject"?0:l}function jg(l,u){return l==="textarea"||l==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Cg=null;function aH(){var l=window.event;return l&&l.type==="popstate"?l===Cg?!1:(Cg=l,!0):(Cg=null,!1)}var xO=typeof setTimeout=="function"?setTimeout:void 0,iH=typeof clearTimeout=="function"?clearTimeout:void 0,_O=typeof Promise=="function"?Promise:void 0,oH=typeof queueMicrotask=="function"?queueMicrotask:typeof _O<"u"?function(l){return _O.resolve(null).then(l).catch(lH)}:xO;function lH(l){setTimeout(function(){throw l})}function ji(l){return l==="head"}function wO(l,u){var p=u,v=0;do{var S=p.nextSibling;if(l.removeChild(p),S&&S.nodeType===8)if(p=S.data,p==="/$"||p==="/&"){if(v===0){l.removeChild(S),Ml(u);return}v--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")v++;else if(p==="html")cu(l.ownerDocument.documentElement);else if(p==="head"){p=l.ownerDocument.head,cu(p);for(var A=p.firstChild;A;){var P=A.nextSibling,I=A.nodeName;A[Cs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&A.rel.toLowerCase()==="stylesheet"||p.removeChild(A),A=P}}else p==="body"&&cu(l.ownerDocument.body);p=S}while(p);Ml(u)}function SO(l,u){var p=l;l=0;do{var v=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),v&&v.nodeType===8)if(p=v.data,p==="/$"){if(l===0)break;l--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||l++;p=v}while(p)}function Og(l){var u=l.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Og(p),Rm(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}l.removeChild(p)}}function sH(l,u,p,v){for(;l.nodeType===1;){var S=p;if(l.nodeName.toLowerCase()!==u.toLowerCase()){if(!v&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(v){if(!l[Cs])switch(u){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(A=l.getAttribute("rel"),A==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(A!==S.rel||l.getAttribute("href")!==(S.href==null||S.href===""?null:S.href)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin)||l.getAttribute("title")!==(S.title==null?null:S.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(A=l.getAttribute("src"),(A!==(S.src==null?null:S.src)||l.getAttribute("type")!==(S.type==null?null:S.type)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin))&&A&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(u==="input"&&l.type==="hidden"){var A=S.name==null?null:""+S.name;if(S.type==="hidden"&&l.getAttribute("name")===A)return l}else return l;if(l=nn(l.nextSibling),l===null)break}return null}function uH(l,u,p){if(u==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!p||(l=nn(l.nextSibling),l===null))return null;return l}function EO(l,u){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!u||(l=nn(l.nextSibling),l===null))return null;return l}function Tg(l){return l.data==="$?"||l.data==="$~"}function Ng(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function cH(l,u){var p=l.ownerDocument;if(l.data==="$~")l._reactRetry=u;else if(l.data!=="$?"||p.readyState!=="loading")u();else{var v=function(){u(),p.removeEventListener("DOMContentLoaded",v)};p.addEventListener("DOMContentLoaded",v),l._reactRetry=v}}function nn(l){for(;l!=null;l=l.nextSibling){var u=l.nodeType;if(u===1||u===3)break;if(u===8){if(u=l.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return l}var Mg=null;function kO(l){l=l.nextSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="/$"||p==="/&"){if(u===0)return nn(l.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}l=l.nextSibling}return null}function AO(l){l=l.previousSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return l;u--}else p!=="/$"&&p!=="/&"||u++}l=l.previousSibling}return null}function jO(l,u,p){switch(u=ad(p),l){case"html":if(l=u.documentElement,!l)throw Error(a(452));return l;case"head":if(l=u.head,!l)throw Error(a(453));return l;case"body":if(l=u.body,!l)throw Error(a(454));return l;default:throw Error(a(451))}}function cu(l){for(var u=l.attributes;u.length;)l.removeAttributeNode(u[0]);Rm(l)}var an=new Map,CO=new Set;function id(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var Na=Q.d;Q.d={f:fH,r:dH,D:hH,C:pH,L:mH,m:vH,X:yH,S:gH,M:bH};function fH(){var l=Na.f(),u=Wf();return l||u}function dH(l){var u=Zo(l);u!==null&&u.tag===5&&u.type==="form"?Gj(u):Na.r(l)}var Ol=typeof document>"u"?null:document;function OO(l,u,p){var v=Ol;if(v&&typeof u=="string"&&u){var S=Wr(u);S='link[rel="'+l+'"][href="'+S+'"]',typeof p=="string"&&(S+='[crossorigin="'+p+'"]'),CO.has(S)||(CO.add(S),l={rel:l,crossOrigin:p,href:u},v.querySelector(S)===null&&(u=v.createElement("link"),Wt(u,"link",l),zt(u),v.head.appendChild(u)))}}function hH(l){Na.D(l),OO("dns-prefetch",l,null)}function pH(l,u){Na.C(l,u),OO("preconnect",l,u)}function mH(l,u,p){Na.L(l,u,p);var v=Ol;if(v&&l&&u){var S='link[rel="preload"][as="'+Wr(u)+'"]';u==="image"&&p&&p.imageSrcSet?(S+='[imagesrcset="'+Wr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(S+='[imagesizes="'+Wr(p.imageSizes)+'"]')):S+='[href="'+Wr(l)+'"]';var A=S;switch(u){case"style":A=Tl(l);break;case"script":A=Nl(l)}an.has(A)||(l=m({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:l,as:u},p),an.set(A,l),v.querySelector(S)!==null||u==="style"&&v.querySelector(fu(A))||u==="script"&&v.querySelector(du(A))||(u=v.createElement("link"),Wt(u,"link",l),zt(u),v.head.appendChild(u)))}}function vH(l,u){Na.m(l,u);var p=Ol;if(p&&l){var v=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+Wr(v)+'"][href="'+Wr(l)+'"]',A=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Nl(l)}if(!an.has(A)&&(l=m({rel:"modulepreload",href:l},u),an.set(A,l),p.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(du(A)))return}v=p.createElement("link"),Wt(v,"link",l),zt(v),p.head.appendChild(v)}}}function gH(l,u,p){Na.S(l,u,p);var v=Ol;if(v&&l){var S=Qo(v).hoistableStyles,A=Tl(l);u=u||"default";var P=S.get(A);if(!P){var I={loading:0,preload:null};if(P=v.querySelector(fu(A)))I.loading=5;else{l=m({rel:"stylesheet",href:l,"data-precedence":u},p),(p=an.get(A))&&Pg(l,p);var V=P=v.createElement("link");zt(V),Wt(V,"link",l),V._p=new Promise(function(ie,pe){V.onload=ie,V.onerror=pe}),V.addEventListener("load",function(){I.loading|=1}),V.addEventListener("error",function(){I.loading|=2}),I.loading|=4,od(P,u,v)}P={type:"stylesheet",instance:P,count:1,state:I},S.set(A,P)}}}function yH(l,u){Na.X(l,u);var p=Ol;if(p&&l){var v=Qo(p).hoistableScripts,S=Nl(l),A=v.get(S);A||(A=p.querySelector(du(S)),A||(l=m({src:l,async:!0},u),(u=an.get(S))&&Rg(l,u),A=p.createElement("script"),zt(A),Wt(A,"link",l),p.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(S,A))}}function bH(l,u){Na.M(l,u);var p=Ol;if(p&&l){var v=Qo(p).hoistableScripts,S=Nl(l),A=v.get(S);A||(A=p.querySelector(du(S)),A||(l=m({src:l,async:!0,type:"module"},u),(u=an.get(S))&&Rg(l,u),A=p.createElement("script"),zt(A),Wt(A,"link",l),p.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},v.set(S,A))}}function TO(l,u,p,v){var S=(S=G.current)?id(S):null;if(!S)throw Error(a(446));switch(l){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=Tl(p.href),p=Qo(S).hoistableStyles,v=p.get(u),v||(v={type:"style",instance:null,count:0,state:null},p.set(u,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){l=Tl(p.href);var A=Qo(S).hoistableStyles,P=A.get(l);if(P||(S=S.ownerDocument||S,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(l,P),(A=S.querySelector(fu(l)))&&!A._p&&(P.instance=A,P.state.loading=5),an.has(l)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},an.set(l,p),A||xH(S,l,p,P.state))),u&&v===null)throw Error(a(528,""));return P}if(u&&v!==null)throw Error(a(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Nl(p),p=Qo(S).hoistableScripts,v=p.get(u),v||(v={type:"script",instance:null,count:0,state:null},p.set(u,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,l))}}function Tl(l){return'href="'+Wr(l)+'"'}function fu(l){return'link[rel="stylesheet"]['+l+"]"}function NO(l){return m({},l,{"data-precedence":l.precedence,precedence:null})}function xH(l,u,p,v){l.querySelector('link[rel="preload"][as="style"]['+u+"]")?v.loading=1:(u=l.createElement("link"),v.preload=u,u.addEventListener("load",function(){return v.loading|=1}),u.addEventListener("error",function(){return v.loading|=2}),Wt(u,"link",p),zt(u),l.head.appendChild(u))}function Nl(l){return'[src="'+Wr(l)+'"]'}function du(l){return"script[async]"+l}function MO(l,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var v=l.querySelector('style[data-href~="'+Wr(p.href)+'"]');if(v)return u.instance=v,zt(v),v;var S=m({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(l.ownerDocument||l).createElement("style"),zt(v),Wt(v,"style",S),od(v,p.precedence,l),u.instance=v;case"stylesheet":S=Tl(p.href);var A=l.querySelector(fu(S));if(A)return u.state.loading|=4,u.instance=A,zt(A),A;v=NO(p),(S=an.get(S))&&Pg(v,S),A=(l.ownerDocument||l).createElement("link"),zt(A);var P=A;return P._p=new Promise(function(I,V){P.onload=I,P.onerror=V}),Wt(A,"link",v),u.state.loading|=4,od(A,p.precedence,l),u.instance=A;case"script":return A=Nl(p.src),(S=l.querySelector(du(A)))?(u.instance=S,zt(S),S):(v=p,(S=an.get(A))&&(v=m({},p),Rg(v,S)),l=l.ownerDocument||l,S=l.createElement("script"),zt(S),Wt(S,"link",v),l.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(a(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(v=u.instance,u.state.loading|=4,od(v,p.precedence,l));return u.instance}function od(l,u,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=v.length?v[v.length-1]:null,A=S,P=0;P<v.length;P++){var I=v[P];if(I.dataset.precedence===u)A=I;else if(A!==S)break}A?A.parentNode.insertBefore(l,A.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(l,u.firstChild))}function Pg(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.title==null&&(l.title=u.title)}function Rg(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.integrity==null&&(l.integrity=u.integrity)}var ld=null;function PO(l,u,p){if(ld===null){var v=new Map,S=ld=new Map;S.set(p,v)}else S=ld,v=S.get(p),v||(v=new Map,S.set(p,v));if(v.has(l))return v;for(v.set(l,null),p=p.getElementsByTagName(l),S=0;S<p.length;S++){var A=p[S];if(!(A[Cs]||A[Vt]||l==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var P=A.getAttribute(u)||"";P=l+P;var I=v.get(P);I?I.push(A):v.set(P,[A])}}return v}function RO(l,u,p){l=l.ownerDocument||l,l.head.insertBefore(p,u==="title"?l.querySelector("head > title"):null)}function _H(l,u,p){if(p===1||u.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return l=u.disabled,typeof u.precedence=="string"&&l==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function DO(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function wH(l,u,p,v){if(p.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var S=Tl(v.href),A=u.querySelector(fu(S));if(A){u=A._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(l.count++,l=sd.bind(l),u.then(l,l)),p.state.loading|=4,p.instance=A,zt(A);return}A=u.ownerDocument||u,v=NO(v),(S=an.get(S))&&Pg(v,S),A=A.createElement("link"),zt(A);var P=A;P._p=new Promise(function(I,V){P.onload=I,P.onerror=V}),Wt(A,"link",v),p.instance=A}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(l.count++,p=sd.bind(l),u.addEventListener("load",p),u.addEventListener("error",p))}}var Dg=0;function SH(l,u){return l.stylesheets&&l.count===0&&cd(l,l.stylesheets),0<l.count||0<l.imgCount?function(p){var v=setTimeout(function(){if(l.stylesheets&&cd(l,l.stylesheets),l.unsuspend){var A=l.unsuspend;l.unsuspend=null,A()}},6e4+u);0<l.imgBytes&&Dg===0&&(Dg=62500*nH());var S=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&cd(l,l.stylesheets),l.unsuspend)){var A=l.unsuspend;l.unsuspend=null,A()}},(l.imgBytes>Dg?50:800)+u);return l.unsuspend=p,function(){l.unsuspend=null,clearTimeout(v),clearTimeout(S)}}:null}function sd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cd(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var ud=null;function cd(l,u){l.stylesheets=null,l.unsuspend!==null&&(l.count++,ud=new Map,u.forEach(EH,l),ud=null,sd.call(l))}function EH(l,u){if(!(u.state.loading&4)){var p=ud.get(l);if(p)var v=p.get(null);else{p=new Map,ud.set(l,p);for(var S=l.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<S.length;A++){var P=S[A];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(p.set(P.dataset.precedence,P),v=P)}v&&p.set(null,v)}S=u.instance,P=S.getAttribute("data-precedence"),A=p.get(P)||v,A===v&&p.set(null,S),p.set(P,S),this.count++,v=sd.bind(this),S.addEventListener("load",v),S.addEventListener("error",v),A?A.parentNode.insertBefore(S,A.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(S,l.firstChild)),u.state.loading|=4}}var hu={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function kH(l,u,p,v,S,A,P,I,V){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Tm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tm(0),this.hiddenUpdates=Tm(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=A,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function LO(l,u,p,v,S,A,P,I,V,ie,pe,ve){return l=new kH(l,u,p,P,V,ie,pe,ve,I),u=1,A===!0&&(u|=24),A=Dr(3,null,null,u),l.current=A,A.stateNode=l,u=pv(),u.refCount++,l.pooledCache=u,u.refCount++,A.memoizedState={element:v,isDehydrated:p,cache:u},yv(A),l}function IO(l){return l?(l=sl,l):sl}function zO(l,u,p,v,S,A){S=IO(S),v.context===null?v.context=S:v.pendingContext=S,v=vi(u),v.payload={element:p},A=A===void 0?null:A,A!==null&&(v.callback=A),p=gi(l,v,u),p!==null&&(jr(p,l,u),Gs(p,l,u))}function qO(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<u?p:u}}function Lg(l,u){qO(l,u),(l=l.alternate)&&qO(l,u)}function BO(l){if(l.tag===13||l.tag===31){var u=eo(l,67108864);u!==null&&jr(u,l,67108864),Lg(l,67108864)}}function $O(l){if(l.tag===13||l.tag===31){var u=Br();u=Nm(u);var p=eo(l,u);p!==null&&jr(p,l,u),Lg(l,u)}}var fd=!0;function AH(l,u,p,v){var S=B.T;B.T=null;var A=Q.p;try{Q.p=2,Ig(l,u,p,v)}finally{Q.p=A,B.T=S}}function jH(l,u,p,v){var S=B.T;B.T=null;var A=Q.p;try{Q.p=8,Ig(l,u,p,v)}finally{Q.p=A,B.T=S}}function Ig(l,u,p,v){if(fd){var S=zg(v);if(S===null)Sg(l,u,v,dd,p),UO(l,v);else if(OH(S,l,u,p,v))v.stopPropagation();else if(UO(l,v),u&4&&-1<CH.indexOf(l)){for(;S!==null;){var A=Zo(S);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var P=Xi(A.pendingLanes);if(P!==0){var I=A;for(I.pendingLanes|=2,I.entangledLanes|=2;P;){var V=1<<31-Pr(P);I.entanglements[1]|=V,P&=~V}Un(A),(Ge&6)===0&&(Yf=It()+500,lu(0))}}break;case 31:case 13:I=eo(A,2),I!==null&&jr(I,A,2),Wf(),Lg(A,2)}if(A=zg(v),A===null&&Sg(l,u,v,dd,p),A===S)break;S=A}S!==null&&v.stopPropagation()}else Sg(l,u,v,null,p)}}function zg(l){return l=Bm(l),qg(l)}var dd=null;function qg(l){if(dd=null,l=Wo(l),l!==null){var u=o(l);if(u===null)l=null;else{var p=u.tag;if(p===13){if(l=s(u),l!==null)return l;l=null}else if(p===31){if(l=c(u),l!==null)return l;l=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;l=null}else u!==l&&(l=null)}}return dd=l,null}function FO(l){switch(l){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yo()){case Qc:return 2;case Es:return 8;case Sn:case Jc:return 32;case ks:return 268435456;default:return 32}default:return 32}}var Bg=!1,Ci=null,Oi=null,Ti=null,pu=new Map,mu=new Map,Ni=[],CH="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function UO(l,u){switch(l){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ti=null;break;case"pointerover":case"pointerout":pu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(u.pointerId)}}function vu(l,u,p,v,S,A){return l===null||l.nativeEvent!==A?(l={blockedOn:u,domEventName:p,eventSystemFlags:v,nativeEvent:A,targetContainers:[S]},u!==null&&(u=Zo(u),u!==null&&BO(u)),l):(l.eventSystemFlags|=v,u=l.targetContainers,S!==null&&u.indexOf(S)===-1&&u.push(S),l)}function OH(l,u,p,v,S){switch(u){case"focusin":return Ci=vu(Ci,l,u,p,v,S),!0;case"dragenter":return Oi=vu(Oi,l,u,p,v,S),!0;case"mouseover":return Ti=vu(Ti,l,u,p,v,S),!0;case"pointerover":var A=S.pointerId;return pu.set(A,vu(pu.get(A)||null,l,u,p,v,S)),!0;case"gotpointercapture":return A=S.pointerId,mu.set(A,vu(mu.get(A)||null,l,u,p,v,S)),!0}return!1}function HO(l){var u=Wo(l.target);if(u!==null){var p=o(u);if(p!==null){if(u=p.tag,u===13){if(u=s(p),u!==null){l.blockedOn=u,aA(l.priority,function(){$O(p)});return}}else if(u===31){if(u=c(p),u!==null){l.blockedOn=u,aA(l.priority,function(){$O(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){l.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}l.blockedOn=null}function hd(l){if(l.blockedOn!==null)return!1;for(var u=l.targetContainers;0<u.length;){var p=zg(l.nativeEvent);if(p===null){p=l.nativeEvent;var v=new p.constructor(p.type,p);qm=v,p.target.dispatchEvent(v),qm=null}else return u=Zo(p),u!==null&&BO(u),l.blockedOn=p,!1;u.shift()}return!0}function GO(l,u,p){hd(l)&&p.delete(u)}function TH(){Bg=!1,Ci!==null&&hd(Ci)&&(Ci=null),Oi!==null&&hd(Oi)&&(Oi=null),Ti!==null&&hd(Ti)&&(Ti=null),pu.forEach(GO),mu.forEach(GO)}function pd(l,u){l.blockedOn===u&&(l.blockedOn=null,Bg||(Bg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,TH)))}var md=null;function VO(l){md!==l&&(md=l,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){md===l&&(md=null);for(var u=0;u<l.length;u+=3){var p=l[u],v=l[u+1],S=l[u+2];if(typeof v!="function"){if(qg(v||p)===null)continue;break}var A=Zo(p);A!==null&&(l.splice(u,3),u-=3,zv(A,{pending:!0,data:S,method:p.method,action:v},v,S))}}))}function Ml(l){function u(V){return pd(V,l)}Ci!==null&&pd(Ci,l),Oi!==null&&pd(Oi,l),Ti!==null&&pd(Ti,l),pu.forEach(u),mu.forEach(u);for(var p=0;p<Ni.length;p++){var v=Ni[p];v.blockedOn===l&&(v.blockedOn=null)}for(;0<Ni.length&&(p=Ni[0],p.blockedOn===null);)HO(p),p.blockedOn===null&&Ni.shift();if(p=(l.ownerDocument||l).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var S=p[v],A=p[v+1],P=S[_r]||null;if(typeof A=="function")P||VO(p);else if(P){var I=null;if(A&&A.hasAttribute("formAction")){if(S=A,P=A[_r]||null)I=P.formAction;else if(qg(S)!==null)continue}else I=P.action;typeof I=="function"?p[v+1]=I:(p.splice(v,3),v-=3),VO(p)}}}function KO(){function l(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(P){return S=P})},focusReset:"manual",scroll:"manual"})}function u(){S!==null&&(S(),S=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,S=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){v=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),S!==null&&(S(),S=null)}}}function $g(l){this._internalRoot=l}vd.prototype.render=$g.prototype.render=function(l){var u=this._internalRoot;if(u===null)throw Error(a(409));var p=u.current,v=Br();zO(p,v,l,u,null,null)},vd.prototype.unmount=$g.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var u=l.containerInfo;zO(l.current,2,null,l,null,null),Wf(),u[Xo]=null}};function vd(l){this._internalRoot=l}vd.prototype.unstable_scheduleHydration=function(l){if(l){var u=nA();l={blockedOn:null,target:l,priority:u};for(var p=0;p<Ni.length&&u!==0&&u<Ni[p].priority;p++);Ni.splice(p,0,l),p===0&&HO(l)}};var YO=r.version;if(YO!=="19.2.4")throw Error(a(527,YO,"19.2.4"));Q.findDOMNode=function(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=d(u),l=l!==null?h(l):null,l=l===null?null:l.stateNode,l};var NH={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gd.isDisabled&&gd.supportsFiber)try{xr=gd.inject(NH),_t=gd}catch{}}return yu.createRoot=function(l,u){if(!i(l))throw Error(a(299));var p=!1,v="",S=tC,A=rC,P=nC;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError)),u=LO(l,1,!1,null,null,p,v,null,S,A,P,KO),l[Xo]=u.current,wg(l),new $g(u)},yu.hydrateRoot=function(l,u,p){if(!i(l))throw Error(a(299));var v=!1,S="",A=tC,P=rC,I=nC,V=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onUncaughtError!==void 0&&(A=p.onUncaughtError),p.onCaughtError!==void 0&&(P=p.onCaughtError),p.onRecoverableError!==void 0&&(I=p.onRecoverableError),p.formState!==void 0&&(V=p.formState)),u=LO(l,1,!0,u,p??null,v,S,V,A,P,I,KO),u.context=IO(null),p=u.current,v=Br(),v=Nm(v),S=vi(v),S.callback=null,gi(p,S,v),p=v,u.current.lanes=p,js(u,p),Un(u),l[Xo]=u.current,wg(l),new vd(u)},yu.version="19.2.4",yu}var a5;function HH(){if(a5)return Gg.exports;a5=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(r){console.error(r)}}return e(),Gg.exports=UH(),Gg.exports}var GH=HH();const VH=Dn(GH);/**
|
|
50
|
+
* react-router v7.13.1
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var i5="popstate";function o5(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function KH(e={}){function r(a,i){var d;let o=(d=i.state)==null?void 0:d.masked,{pathname:s,search:c,hash:f}=o||a.location;return o2("",{pathname:s,search:c,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,i){return typeof i=="string"?i:ec(i)}return XH(r,n,null,e)}function mt(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function na(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function YH(){return Math.random().toString(36).substring(2,10)}function l5(e,r){return{usr:e.state,key:e.key,idx:r,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function o2(e,r,n=null,a,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?os(r):r,state:n,key:r&&r.key||a||YH(),unstable_mask:i}}function ec({pathname:e="/",search:r="",hash:n=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function os(e){let r={};if(e){let n=e.indexOf("#");n>=0&&(r.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(r.search=e.substring(a),e=e.substring(0,a)),e&&(r.pathname=e)}return r}function XH(e,r,n,a={}){let{window:i=document.defaultView,v5Compat:o=!1}=a,s=i.history,c="POP",f=null,d=h();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function h(){return(s.state||{idx:null}).idx}function m(){c="POP";let w=h(),x=w==null?null:w-d;d=w,f&&f({action:c,location:E.location,delta:x})}function g(w,x){c="PUSH";let j=o5(w)?w:o2(E.location,w,x);d=h()+1;let C=l5(j,d),T=E.createHref(j.unstable_mask||j);try{s.pushState(C,"",T)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(T)}o&&f&&f({action:c,location:E.location,delta:1})}function y(w,x){c="REPLACE";let j=o5(w)?w:o2(E.location,w,x);d=h();let C=l5(j,d),T=E.createHref(j.unstable_mask||j);s.replaceState(C,"",T),o&&f&&f({action:c,location:E.location,delta:0})}function _(w){return WH(w)}let E={get action(){return c},get location(){return e(i,s)},listen(w){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(i5,m),f=w,()=>{i.removeEventListener(i5,m),f=null}},createHref(w){return r(i,w)},createURL:_,encodeLocation(w){let x=_(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:y,go(w){return s.go(w)}};return E}function WH(e,r=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ec(e);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function j6(e,r,n="/"){return ZH(e,r,n,!1)}function ZH(e,r,n,a){let i=typeof r=="string"?os(r):r,o=Ga(i.pathname||"/",n);if(o==null)return null;let s=C6(e);QH(s);let c=null;for(let f=0;c==null&&f<s.length;++f){let d=uG(o);c=lG(s[f],d,a)}return c}function C6(e,r=[],n=[],a="",i=!1){let o=(s,c,f=i,d)=>{let h={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:c,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&f)return;mt(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let m=ea([a,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(mt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),C6(s.children,r,g,m,f)),!(s.path==null&&!s.index)&&r.push({path:m,score:iG(m,s.index),routesMeta:g})};return e.forEach((s,c)=>{var f;if(s.path===""||!((f=s.path)!=null&&f.includes("?")))o(s,c);else for(let d of O6(s.path))o(s,c,!0,d)}),r}function O6(e){let r=e.split("/");if(r.length===0)return[];let[n,...a]=r,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return i?[o,""]:[o];let s=O6(a.join("/")),c=[];return c.push(...s.map(f=>f===""?o:[o,f].join("/"))),i&&c.push(...s),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function QH(e){e.sort((r,n)=>r.score!==n.score?n.score-r.score:oG(r.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var JH=/^:[\w-]+$/,eG=3,tG=2,rG=1,nG=10,aG=-2,s5=e=>e==="*";function iG(e,r){let n=e.split("/"),a=n.length;return n.some(s5)&&(a+=aG),r&&(a+=tG),n.filter(i=>!s5(i)).reduce((i,o)=>i+(JH.test(o)?eG:o===""?rG:nG),a)}function oG(e,r){return e.length===r.length&&e.slice(0,-1).every((a,i)=>a===r[i])?e[e.length-1]-r[r.length-1]:0}function lG(e,r,n=!1){let{routesMeta:a}=e,i={},o="/",s=[];for(let c=0;c<a.length;++c){let f=a[c],d=c===a.length-1,h=o==="/"?r:r.slice(o.length)||"/",m=nh({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},h),g=f.route;if(!m&&d&&n&&!a[a.length-1].route.index&&(m=nh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},h)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:ea([o,m.pathname]),pathnameBase:hG(ea([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=ea([o,m.pathnameBase]))}return s}function nh(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=sG(e.path,e.caseSensitive,e.end),i=r.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:a.reduce((d,{paramName:h,isOptional:m},g)=>{if(h==="*"){let _=c[g]||"";s=o.slice(0,o.length-_.length).replace(/(.)\/+$/,"$1")}const y=c[g];return m&&!y?d[h]=void 0:d[h]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function sG(e,r=!1,n=!0){na(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 a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,f,d,h)=>{if(a.push({paramName:c,isOptional:f!=null}),f){let m=h.charAt(d+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,r?void 0:"i"),a]}function uG(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return na(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function Ga(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let n=r.endsWith("/")?r.length-1:r.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var cG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fG(e,r="/"){let{pathname:n,search:a="",hash:i=""}=typeof e=="string"?os(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=u5(n.substring(1),"/"):o=u5(n,r)):o=r,{pathname:o,search:pG(a),hash:mG(i)}}function u5(e,r){let n=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xg(e,r,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. 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 dG(e){return e.filter((r,n)=>n===0||r.route.path&&r.route.path.length>0)}function T6(e){let r=dG(e);return r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase)}function AS(e,r,n,a=!1){let i;typeof e=="string"?i=os(e):(i={...e},mt(!i.pathname||!i.pathname.includes("?"),Xg("?","pathname","search",i)),mt(!i.pathname||!i.pathname.includes("#"),Xg("#","pathname","hash",i)),mt(!i.search||!i.search.includes("#"),Xg("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,c;if(s==null)c=n;else{let m=r.length-1;if(!a&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}c=m>=0?r[m]:"/"}let f=fG(i,c),d=s&&s!=="/"&&s.endsWith("/"),h=(o||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||h)&&(f.pathname+="/"),f}var ea=e=>e.join("/").replace(/\/\/+/g,"/"),hG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mG=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vG=class{constructor(e,r,n,a=!1){this.status=e,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function gG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yG(e){return e.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var N6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function M6(e,r){let n=e;if(typeof n!="string"||!cG.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,i=!1;if(N6)try{let o=new URL(window.location.href),s=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Ga(s.pathname,r);s.origin===o.origin&&c!=null?n=c+s.search+s.hash:i=!0}catch{na(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var P6=["POST","PUT","PATCH","DELETE"];new Set(P6);var bG=["GET",...P6];new Set(bG);var ls=k.createContext(null);ls.displayName="DataRouter";var gp=k.createContext(null);gp.displayName="DataRouterState";var xG=k.createContext(!1),R6=k.createContext({isTransitioning:!1});R6.displayName="ViewTransition";var _G=k.createContext(new Map);_G.displayName="Fetchers";var wG=k.createContext(null);wG.displayName="Await";var bn=k.createContext(null);bn.displayName="Navigation";var xc=k.createContext(null);xc.displayName="Location";var Ja=k.createContext({outlet:null,matches:[],isDataRoute:!1});Ja.displayName="Route";var jS=k.createContext(null);jS.displayName="RouteError";var D6="REACT_ROUTER_ERROR",SG="REDIRECT",EG="ROUTE_ERROR_RESPONSE";function kG(e){if(e.startsWith(`${D6}:${SG}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function AG(e){if(e.startsWith(`${D6}:${EG}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new vG(r.status,r.statusText,r.data)}catch{}}function jG(e,{relative:r}={}){mt(_c(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=k.useContext(bn),{hash:i,pathname:o,search:s}=wc(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:ea([n,o])),a.createHref({pathname:c,search:s,hash:i})}function _c(){return k.useContext(xc)!=null}function Hi(){return mt(_c(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(xc).location}var L6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function I6(e){k.useContext(bn).static||k.useLayoutEffect(e)}function CG(){let{isDataRoute:e}=k.useContext(Ja);return e?$G():OG()}function OG(){mt(_c(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(ls),{basename:r,navigator:n}=k.useContext(bn),{matches:a}=k.useContext(Ja),{pathname:i}=Hi(),o=JSON.stringify(T6(a)),s=k.useRef(!1);return I6(()=>{s.current=!0}),k.useCallback((f,d={})=>{if(na(s.current,L6),!s.current)return;if(typeof f=="number"){n.go(f);return}let h=AS(f,JSON.parse(o),i,d.relative==="path");e==null&&r!=="/"&&(h.pathname=h.pathname==="/"?r:ea([r,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[r,n,o,i,e])}k.createContext(null);function wc(e,{relative:r}={}){let{matches:n}=k.useContext(Ja),{pathname:a}=Hi(),i=JSON.stringify(T6(n));return k.useMemo(()=>AS(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function TG(e,r){return z6(e,r)}function z6(e,r,n){var w;mt(_c(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=k.useContext(bn),{matches:i}=k.useContext(Ja),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let x=d&&d.path||"";B6(c,!d||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let h=Hi(),m;if(r){let x=typeof r=="string"?os(r):r;mt(f==="/"||((w=x.pathname)==null?void 0:w.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),m=x}else m=h;let g=m.pathname||"/",y=g;if(f!=="/"){let x=f.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(x.length).join("/")}let _=j6(e,{pathname:y});na(d||_!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),na(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=DG(_&&_.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:ea([f,a.encodeLocation?a.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:ea([f,a.encodeLocation?a.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),i,n);return r&&E?k.createElement(xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},E):E}function NG(){let e=BG(),r=gG(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},r),n?k.createElement("pre",{style:i},n):null,s)}var MG=k.createElement(NG,null),q6=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=AG(e.digest);n&&(e=n)}let r=e!==void 0?k.createElement(Ja.Provider,{value:this.props.routeContext},k.createElement(jS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(PG,{error:e},r):r}};q6.contextType=xG;var Wg=new WeakMap;function PG({children:e,error:r}){let{basename:n}=k.useContext(bn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=kG(r.digest);if(a){let i=Wg.get(r);if(i)throw i;let o=M6(a.location,n);if(N6&&!Wg.get(r))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Wg.set(r,s),s}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function RG({routeContext:e,match:r,children:n}){let a=k.useContext(ls);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(Ja.Provider,{value:e},n)}function DG(e,r=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let i=e,o=a==null?void 0:a.errors;if(o!=null){let h=i.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);mt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let s=!1,c=-1;if(n&&a){s=a.renderFallback;for(let h=0;h<i.length;h++){let m=i[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=h),m.route.id){let{loaderData:g,errors:y}=a,_=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!y||y[m.route.id]===void 0);if(m.route.lazy||_){n.isStatic&&(s=!0),c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,d=a&&f?(h,m)=>{var g,y;f(h,{location:a.location,params:((y=(g=a.matches)==null?void 0:g[0])==null?void 0:y.params)??{},unstable_pattern:yG(a.matches),errorInfo:m})}:void 0;return i.reduceRight((h,m,g)=>{let y,_=!1,E=null,w=null;a&&(y=o&&m.route.id?o[m.route.id]:void 0,E=m.route.errorElement||MG,s&&(c<0&&g===0?(B6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,w=null):c===g&&(_=!0,w=m.route.hydrateFallbackElement||null)));let x=r.concat(i.slice(0,g+1)),j=()=>{let C;return y?C=E:_?C=w:m.route.Component?C=k.createElement(m.route.Component,null):m.route.element?C=m.route.element:C=h,k.createElement(RG,{match:m,routeContext:{outlet:h,matches:x,isDataRoute:a!=null},children:C})};return a&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?k.createElement(q6,{location:a.location,revalidation:a.revalidation,component:E,error:y,children:j(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:d}):j()},null)}function CS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LG(e){let r=k.useContext(ls);return mt(r,CS(e)),r}function IG(e){let r=k.useContext(gp);return mt(r,CS(e)),r}function zG(e){let r=k.useContext(Ja);return mt(r,CS(e)),r}function OS(e){let r=zG(e),n=r.matches[r.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qG(){return OS("useRouteId")}function BG(){var a;let e=k.useContext(jS),r=IG("useRouteError"),n=OS("useRouteError");return e!==void 0?e:(a=r.errors)==null?void 0:a[n]}function $G(){let{router:e}=LG("useNavigate"),r=OS("useNavigate"),n=k.useRef(!1);return I6(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{na(n.current,L6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:r,...o}))},[e,r])}var c5={};function B6(e,r,n){!r&&!c5[e]&&(c5[e]=!0,na(!1,n))}k.memo(FG);function FG({routes:e,future:r,state:n,isStatic:a,onError:i}){return z6(e,void 0,{state:n,isStatic:a,onError:i})}function bo(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function UG({basename:e="/",children:r=null,location:n,navigationType:a="POP",navigator:i,static:o=!1,unstable_useTransitions:s}){mt(!_c(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:c,navigator:i,static:o,unstable_useTransitions:s,future:{}}),[c,i,o,s]);typeof n=="string"&&(n=os(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:y="default",unstable_mask:_}=n,E=k.useMemo(()=>{let w=Ga(d,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:g,key:y,unstable_mask:_},navigationType:a}},[c,d,h,m,g,y,a,_]);return na(E!=null,`<Router basename="${c}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(bn.Provider,{value:f},k.createElement(xc.Provider,{children:r,value:E}))}function HG({children:e,location:r}){return TG(l2(e),r)}function l2(e,r=[]){let n=[];return k.Children.forEach(e,(a,i)=>{if(!k.isValidElement(a))return;let o=[...r,i];if(a.type===k.Fragment){n.push.apply(n,l2(a.props.children,o));return}mt(a.type===bo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let s={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(s.children=l2(a.props.children,o)),n.push(s)}),n}var Gd="get",Vd="application/x-www-form-urlencoded";function yp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function GG(e){return yp(e)&&e.tagName.toLowerCase()==="button"}function VG(e){return yp(e)&&e.tagName.toLowerCase()==="form"}function KG(e){return yp(e)&&e.tagName.toLowerCase()==="input"}function YG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function XG(e,r){return e.button===0&&(!r||r==="_self")&&!YG(e)}var bd=null;function WG(){if(bd===null)try{new FormData(document.createElement("form"),0),bd=!1}catch{bd=!0}return bd}var ZG=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zg(e){return e!=null&&!ZG.has(e)?(na(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vd}"`),null):e}function QG(e,r){let n,a,i,o,s;if(VG(e)){let c=e.getAttribute("action");a=c?Ga(c,r):null,n=e.getAttribute("method")||Gd,i=Zg(e.getAttribute("enctype"))||Vd,o=new FormData(e)}else if(GG(e)||KG(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(a=f?Ga(f,r):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Gd,i=Zg(e.getAttribute("formenctype"))||Zg(c.getAttribute("enctype"))||Vd,o=new FormData(c,e),!WG()){let{name:d,type:h,value:m}=e;if(h==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,m)}}else{if(yp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Gd,a=null,i=Vd,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:a,method:n.toLowerCase(),encType:i,formData:o,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function TS(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function JG(e,r,n,a){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${a}`:i.pathname=`${i.pathname}.${a}`:i.pathname==="/"?i.pathname=`_root.${a}`:r&&Ga(i.pathname,r)==="/"?i.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${a}`,i}async function eV(e,r){if(e.id in r)return r[e.id];try{let n=await import(e.module);return r[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tV(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function rV(e,r,n){let a=await Promise.all(e.map(async i=>{let o=r.routes[i.route.id];if(o){let s=await eV(o,n);return s.links?s.links():[]}return[]}));return oV(a.flat(1).filter(tV).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function f5(e,r,n,a,i,o){let s=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var h;return n[d].pathname!==f.pathname||((h=n[d].route.path)==null?void 0:h.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?r.filter((f,d)=>s(f,d)||c(f,d)):o==="data"?r.filter((f,d)=>{var m;let h=a.routes[f.route.id];if(!h||!h.hasLoader)return!1;if(s(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function nV(e,r,{includeHydrateFallback:n}={}){return aV(e.map(a=>{let i=r.routes[a.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function aV(e){return[...new Set(e)]}function iV(e){let r={},n=Object.keys(e).sort();for(let a of n)r[a]=e[a];return r}function oV(e,r){let n=new Set;return new Set(r),e.reduce((a,i)=>{let o=JSON.stringify(iV(i));return n.has(o)||(n.add(o),a.push({key:o,link:i})),a},[])}function $6(){let e=k.useContext(ls);return TS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function lV(){let e=k.useContext(gp);return TS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var NS=k.createContext(void 0);NS.displayName="FrameworkContext";function F6(){let e=k.useContext(NS);return TS(e,"You must render this element inside a <HydratedRouter> element"),e}function sV(e,r){let n=k.useContext(NS),[a,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:h,onTouchStart:m}=r,g=k.useRef(null);k.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let E=x=>{x.forEach(j=>{s(j.isIntersecting)})},w=new IntersectionObserver(E,{threshold:.5});return g.current&&w.observe(g.current),()=>{w.disconnect()}}},[e]),k.useEffect(()=>{if(a){let E=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(E)}}},[a]);let y=()=>{i(!0)},_=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:bu(c,y),onBlur:bu(f,_),onMouseEnter:bu(d,y),onMouseLeave:bu(h,_),onTouchStart:bu(m,y)}]:[!1,g,{}]}function bu(e,r){return n=>{e&&e(n),n.defaultPrevented||r(n)}}function uV({page:e,...r}){let{router:n}=$6(),a=k.useMemo(()=>j6(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?k.createElement(fV,{page:e,matches:a,...r}):null}function cV(e){let{manifest:r,routeModules:n}=F6(),[a,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return rV(e,r,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,r,n]),a}function fV({page:e,matches:r,...n}){let a=Hi(),{future:i,manifest:o,routeModules:s}=F6(),{basename:c}=$6(),{loaderData:f,matches:d}=lV(),h=k.useMemo(()=>f5(e,r,d,o,a,"data"),[e,r,d,o,a]),m=k.useMemo(()=>f5(e,r,d,o,a,"assets"),[e,r,d,o,a]),g=k.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,w=!1;if(r.forEach(j=>{var T;let C=o.routes[j.route.id];!C||!C.hasLoader||(!h.some(O=>O.route.id===j.route.id)&&j.route.id in f&&((T=s[j.route.id])!=null&&T.shouldRevalidate)||C.hasClientLoader?w=!0:E.add(j.route.id))}),E.size===0)return[];let x=JG(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return w&&E.size>0&&x.searchParams.set("_routes",r.filter(j=>E.has(j.route.id)).map(j=>j.route.id).join(",")),[x.pathname+x.search]},[c,i.unstable_trailingSlashAwareDataRequests,f,a,o,h,r,e,s]),y=k.useMemo(()=>nV(m,o),[m,o]),_=cV(m);return k.createElement(k.Fragment,null,g.map(E=>k.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...n})),y.map(E=>k.createElement("link",{key:E,rel:"modulepreload",href:E,...n})),_.map(({key:E,link:w})=>k.createElement("link",{key:E,nonce:n.nonce,...w,crossOrigin:w.crossOrigin??n.crossOrigin})))}function dV(...e){return r=>{e.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r)})}}var hV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hV&&(window.__reactRouterVersion="7.13.1")}catch{}function pV({basename:e,children:r,unstable_useTransitions:n,window:a}){let i=k.useRef();i.current==null&&(i.current=KH({window:a,v5Compat:!0}));let o=i.current,[s,c]=k.useState({action:o.action,location:o.location}),f=k.useCallback(d=>{n===!1?c(d):k.startTransition(()=>c(d))},[n]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.createElement(UG,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:n})}var U6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,H6=k.forwardRef(function({onClick:r,discover:n="render",prefetch:a="none",relative:i,reloadDocument:o,replace:s,unstable_mask:c,state:f,target:d,to:h,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:y,..._},E){let{basename:w,navigator:x,unstable_useTransitions:j}=k.useContext(bn),C=typeof h=="string"&&U6.test(h),T=M6(h,w);h=T.to;let O=jG(h,{relative:i}),N=Hi(),M=null;if(c){let X=AS(c,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);w!=="/"&&(X.pathname=X.pathname==="/"?w:ea([w,X.pathname])),M=x.createHref(X)}let[R,L,D]=sV(a,_),q=gV(h,{replace:s,unstable_mask:c,state:f,target:d,preventScrollReset:m,relative:i,viewTransition:g,unstable_defaultShouldRevalidate:y,unstable_useTransitions:j});function z(X){r&&r(X),X.defaultPrevented||q(X)}let H=!(T.isExternal||o),F=k.createElement("a",{..._,...D,href:(H?M:void 0)||T.absoluteURL||O,onClick:H?z:r,ref:dV(E,L),target:d,"data-discover":!C&&n==="render"?"true":void 0});return R&&!C?k.createElement(k.Fragment,null,F,k.createElement(uV,{page:O})):F});H6.displayName="Link";var G6=k.forwardRef(function({"aria-current":r="page",caseSensitive:n=!1,className:a="",end:i=!1,style:o,to:s,viewTransition:c,children:f,...d},h){let m=wc(s,{relative:d.relative}),g=Hi(),y=k.useContext(gp),{navigator:_,basename:E}=k.useContext(bn),w=y!=null&&wV(m)&&c===!0,x=_.encodeLocation?_.encodeLocation(m).pathname:m.pathname,j=g.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(j=j.toLowerCase(),C=C?C.toLowerCase():null,x=x.toLowerCase()),C&&E&&(C=Ga(C,E)||C);const T=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let O=j===x||!i&&j.startsWith(x)&&j.charAt(T)==="/",N=C!=null&&(C===x||!i&&C.startsWith(x)&&C.charAt(x.length)==="/"),M={isActive:O,isPending:N,isTransitioning:w},R=O?r:void 0,L;typeof a=="function"?L=a(M):L=[a,O?"active":null,N?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(M):o;return k.createElement(H6,{...d,"aria-current":R,className:L,ref:h,style:D,to:s,viewTransition:c},typeof f=="function"?f(M):f)});G6.displayName="NavLink";var mV=k.forwardRef(({discover:e="render",fetcherKey:r,navigate:n,reloadDocument:a,replace:i,state:o,method:s=Gd,action:c,onSubmit:f,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,...y},_)=>{let{unstable_useTransitions:E}=k.useContext(bn),w=xV(),x=_V(c,{relative:d}),j=s.toLowerCase()==="get"?"get":"post",C=typeof c=="string"&&U6.test(c),T=O=>{if(f&&f(O),O.defaultPrevented)return;O.preventDefault();let N=O.nativeEvent.submitter,M=(N==null?void 0:N.getAttribute("formmethod"))||s,R=()=>w(N||O.currentTarget,{fetcherKey:r,method:M,navigate:n,replace:i,state:o,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g});E&&n!==!1?k.startTransition(()=>R()):R()};return k.createElement("form",{ref:_,method:j,action:x,onSubmit:a?f:T,...y,"data-discover":!C&&e==="render"?"true":void 0})});mV.displayName="Form";function vV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function V6(e){let r=k.useContext(ls);return mt(r,vV(e)),r}function gV(e,{target:r,replace:n,unstable_mask:a,state:i,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=CG(),m=Hi(),g=wc(e,{relative:s});return k.useCallback(y=>{if(XG(y,r)){y.preventDefault();let _=n!==void 0?n:ec(m)===ec(g),E=()=>h(e,{replace:_,unstable_mask:a,state:i,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f});d?k.startTransition(()=>E()):E()}},[m,h,g,n,a,i,r,e,o,s,c,f,d])}var yV=0,bV=()=>`__${String(++yV)}__`;function xV(){let{router:e}=V6("useSubmit"),{basename:r}=k.useContext(bn),n=qG(),a=e.fetch,i=e.navigate;return k.useCallback(async(o,s={})=>{let{action:c,method:f,encType:d,formData:h,body:m}=QG(o,r);if(s.navigate===!1){let g=s.fetcherKey||bV();await a(g,n,s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||f,formEncType:s.encType||d,flushSync:s.flushSync})}else await i(s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||f,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[a,i,r,n])}function _V(e,{relative:r}={}){let{basename:n}=k.useContext(bn),a=k.useContext(Ja);mt(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),o={...wc(e||".",{relative:r})},s=Hi();if(e==null){o.search=s.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(h=>h==="")){c.delete("index"),f.filter(m=>m).forEach(m=>c.append("index",m));let h=c.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ea([n,o.pathname])),ec(o)}function wV(e,{relative:r}={}){let n=k.useContext(R6);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=V6("useViewTransitionState"),i=wc(e,{relative:r});if(!n.isTransitioning)return!1;let o=Ga(n.currentLocation.pathname,a)||n.currentLocation.pathname,s=Ga(n.nextLocation.pathname,a)||n.nextLocation.pathname;return nh(i.pathname,s)!=null||nh(i.pathname,o)!=null}var MS=A6();function PS(e={}){const[r,n]=k.useState(!1),[a,i]=k.useState(null),[o,s]=k.useState(null),c=k.useRef(e.onEvent),f=k.useRef(1e3),d=k.useRef(null),h=k.useRef(null),m=k.useRef(!0),g=k.useRef(0);c.current=e.onEvent;const y=k.useCallback(()=>{if(!m.current)return;const _=new EventSource("/api/stream");h.current=_,_.onopen=()=>{m.current&&(n(!0),f.current=1e3)};const E=["snapshot","team_status_changed","team_event","team_output","pr_updated","team_launched","team_stopped","usage_updated","project_added","project_updated","project_removed","project_cleanup","dependency_resolved","heartbeat","team_thinking_start","team_thinking_stop"],w=x=>{var T,O;if(!m.current)return;let j="message",C=null;try{const N=JSON.parse(x.data);j=N.type??x.type??"message",typeof N.team_id=="number"&&(C=N.team_id),(T=c.current)==null||T.call(c,j,N)}catch{(O=c.current)==null||O.call(c,"message",x.data)}if(j!=="team_output"&&j!=="team_thinking_start"&&j!=="team_thinking_stop"){const N=Date.now();N-g.current>1e3&&(g.current=N,i(new Date(N)),s(C))}};for(const x of E)_.addEventListener(x,w);_.onmessage=w,_.onerror=()=>{if(!m.current)return;n(!1),_.close(),h.current=null;const x=f.current;d.current=setTimeout(()=>{m.current&&y()},x),f.current=Math.min(x*2,3e4)}},[]);return k.useEffect(()=>(m.current=!0,y(),()=>{m.current=!1,h.current&&(h.current.close(),h.current=null),d.current&&(clearTimeout(d.current),d.current=null)}),[y]),{connected:r,lastEvent:a,lastEventTeamId:o}}const K6=k.createContext(null),SV=45e3;function EV({children:e}){const[r,n]=k.useState([]),[a,i]=k.useState(null),o=k.useRef(null),s=k.useRef(new Set),[c,f]=k.useState(0),d=k.useCallback(async()=>{try{const x=await fetch("/api/teams");if(x.ok){const j=await x.json();n(j)}}catch{}},[]),h=k.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,d()},500)},[d]),m=k.useCallback((x,j)=>{if(x==="snapshot"){const C=j;Array.isArray(C.teams)&&n(C.teams)}else if(x==="team_status_changed"||x==="team_launched"||x==="team_stopped"){if(h(),x==="team_stopped"){const C=j;typeof C.team_id=="number"&&s.current.has(C.team_id)&&(s.current.delete(C.team_id),f(T=>T+1))}}else if(x==="usage_updated"||x==="pr_updated")h();else if(x==="team_thinking_start"){const C=j;typeof C.team_id=="number"&&(s.current.add(C.team_id),f(T=>T+1))}else if(x==="team_thinking_stop"){const C=j;typeof C.team_id=="number"&&(s.current.delete(C.team_id),f(T=>T+1))}},[h]),{connected:g,lastEvent:y,lastEventTeamId:_}=PS({onEvent:m});k.useEffect(()=>{d()},[d]),k.useEffect(()=>{const x=setInterval(d,SV);return()=>clearInterval(x)},[d]),k.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const E=k.useCallback(x=>s.current.has(x),[]),w=k.useMemo(()=>({teams:r,selectedTeamId:a,setSelectedTeamId:i,connected:g,lastEvent:y,lastEventTeamId:_,isThinking:E}),[r,a,g,y,_,E,c]);return b.jsx(K6.Provider,{value:w,children:e})}function Sc(){const e=k.useContext(K6);if(!e)throw new Error("useFleet must be used within a FleetProvider");return e}class Y6 extends Error{constructor(r,n,a){super(a??`API error: ${r} ${n}`),this.status=r,this.statusText=n,this.name="ApiError"}}async function xd(e,r,n){const a=`/api/${r.replace(/^\//,"")}`,i={method:e};n!==void 0?(i.headers={"Content-Type":"application/json"},i.body=JSON.stringify(n)):(e==="POST"||e==="PUT")&&(i.headers={"Content-Type":"application/json"},i.body="{}");const o=await fetch(a,i);if(!o.ok){let s;try{const c=await o.json();s=c.message??c.error??void 0}catch{}throw new Y6(o.status,o.statusText,s)}return o.json()}function Ft(){const e=k.useCallback(i=>xd("GET",i),[]),r=k.useCallback((i,o)=>xd("POST",i,o),[]),n=k.useCallback((i,o)=>xd("PUT",i,o),[]),a=k.useCallback(i=>xd("DELETE",i),[]);return k.useMemo(()=>({get:e,post:r,put:n,del:a}),[e,r,n,a])}function kV(e){const r=[],n=a=>{for(const i of a)r.push({number:i.number,title:i.title,state:i.state,labels:i.labels,activeTeam:i.activeTeam}),i.children.length>0&&n(i.children)};return n(e),r}function AV({message:e,onDone:r}){return k.useEffect(()=>{const n=setTimeout(r,2500);return()=>clearTimeout(n)},[r]),b.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[60] px-4 py-2 rounded bg-[#3FB950]/20 border border-[#3FB950]/40 text-[#3FB950] text-sm font-medium shadow-lg animate-fade-in",children:e})}function jV(e){switch(e){case"queued":return"Creating worktree...";case"launching":return"Starting Claude Code...";case"running":return"Team running";case"idle":return"Team idle";case"done":return"Completed";case"failed":return"Failed";case"stuck":return"Stuck";default:return e}}function CV(e){switch(e){case"assistant":return"text-[#58A6FF]";case"tool_use":return"text-[#D29922]";case"tool_result":return"text-[#A371F7]";case"result":return"text-[#3FB950]";default:return"text-[#8B949E]"}}function OV(e){var r,n,a;switch(e.type){case"assistant":{const i=(r=e.message)==null?void 0:r.content;if(Array.isArray(i)){const o=((n=i.find(s=>s.type==="text"))==null?void 0:n.text)??"";return o.substring(0,100)+(o.length>100?"...":"")}return""}case"tool_use":return((a=e.tool)==null?void 0:a.name)??"unknown";case"tool_result":return"completed";case"result":return"session complete";default:return""}}function TV({teamId:e,issueNumber:r,onClose:n}){const a=Ft(),[i,o]=k.useState("queued"),[s,c]=k.useState([]),[f,d]=k.useState([]),[h,m]=k.useState(null),g=k.useRef(null),y=k.useRef(null);k.useEffect(()=>{let x=!1;async function j(){if(!x)try{const T=await a.get(`teams/${e}`);if(x)return;o(T.status),T.status==="failed"&&m(`Team failed${T.stoppedAt?` at ${new Date(T.stoppedAt).toLocaleTimeString()}`:""}`);const O=await a.get(`teams/${e}/output?lines=50`);if(x)return;c(O.lines);const N=await a.get(`teams/${e}/stream-events`);if(x)return;d(N)}catch{}}j();const C=setInterval(j,2e3);return()=>{x=!0,clearInterval(C)}},[a,e]),k.useEffect(()=>{var x;(x=g.current)==null||x.scrollIntoView({behavior:"smooth"})},[s]),k.useEffect(()=>{var x;(x=g.current)==null||x.scrollIntoView({behavior:"smooth"})},[f]);const _=k.useRef(n);k.useEffect(()=>{_.current=n},[n]),k.useEffect(()=>{i==="running"&&!y.current&&(y.current=setTimeout(()=>_.current(),3e3))},[i]),k.useEffect(()=>()=>{y.current&&(clearTimeout(y.current),y.current=null)},[]);const E=(()=>{switch(i){case"queued":case"launching":return"text-[#D29922]";case"running":return"text-[#3FB950]";case"failed":return"text-[#F85149]";default:return"text-dark-muted"}})(),w=i==="queued"||i==="launching";return b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[w&&b.jsxs("svg",{className:"animate-spin h-4 w-4 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),i==="running"&&b.jsx("svg",{className:"h-4 w-4 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),i==="failed"&&b.jsx("svg",{className:"h-4 w-4 text-[#F85149]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),b.jsx("span",{className:`text-sm font-medium ${E}`,children:jV(i)}),b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["Issue #",r," · Team #",e]})]}),b.jsxs("div",{className:"space-y-1",children:[b.jsx(_d,{label:"Team queued",done:!0}),b.jsx(_d,{label:"Creating worktree...",done:i!=="queued",active:i==="queued"}),b.jsx(_d,{label:"Starting Claude Code...",done:i==="running"||i==="done"||i==="idle",active:i==="launching"}),b.jsx(_d,{label:"Team running",done:i==="running"||i==="done"||i==="idle",active:!1})]}),h&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:h}),f.length>0&&b.jsxs("div",{className:"bg-[#0D1117] border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs",children:[f.slice(-30).map((x,j)=>{var C;return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:((C=x.timestamp)==null?void 0:C.substring(11,19))??"--:--:--"})," ",b.jsx("span",{className:CV(x.type),children:x.type})," ",b.jsx("span",{className:"text-dark-text",children:OV(x)})]},j)}),b.jsx("div",{ref:g})]}),f.length===0&&s.length>0&&b.jsxs("div",{className:"bg-dark-base border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs text-dark-muted",children:[s.map((x,j)=>b.jsx("div",{className:"whitespace-pre-wrap break-all leading-relaxed",children:x},j)),b.jsx("div",{ref:g})]}),i==="running"&&b.jsx("p",{className:"text-xs text-[#3FB950]/70",children:"Auto-closing in 3 seconds..."})]})}function _d({label:e,done:r,active:n}){return b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[r?b.jsx("svg",{className:"h-3 w-3 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):n?b.jsxs("svg",{className:"animate-spin h-3 w-3 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):b.jsx("div",{className:"h-3 w-3 rounded-full border border-dark-border"}),b.jsx("span",{className:r?"text-dark-text":n?"text-[#D29922]":"text-dark-muted",children:e})]})}function NV({open:e,onClose:r}){const n=Ft(),[a,i]=k.useState(!1),[o,s]=k.useState(!0),[c,f]=k.useState(""),[d,h]=k.useState(""),[m,g]=k.useState(""),[y,_]=k.useState("15000"),[E,w]=k.useState(!1),[x,j]=k.useState(null),[C,T]=k.useState(null),[O,N]=k.useState([]),[M,R]=k.useState(""),[L,D]=k.useState([]),[q,z]=k.useState(!1),[H,F]=k.useState(null),[X,B]=k.useState(""),[Q,te]=k.useState("green"),[K,de]=k.useState(null),[U,J]=k.useState(null),le=k.useRef(null),$=k.useRef(null);k.useEffect(()=>{if(e&&!K){const ee=setTimeout(()=>{var be;return(be=le.current)==null?void 0:be.focus()},50);return()=>clearTimeout(ee)}},[e,a,K]),k.useEffect(()=>{e&&(n.get("projects").then(ee=>{N(ee),ee.length===1&&R(String(ee[0].id))}).catch(()=>{N([])}),n.get("usage").then(ee=>{const be=Math.max(ee.dailyPercent,ee.weeklyPercent,ee.sonnetPercent,ee.extraPercent);be>80?te("red"):be>=50?te("yellow"):te("green")}).catch(()=>{te("green")}))},[e,n]),k.useEffect(()=>{if(!M){D([]),F(null);return}let ee=!1;return z(!0),F(null),n.get(`projects/${M}/issues`).then(be=>{if(ee)return;const ce=kV(be.tree);D(ce)}).catch(be=>{if(ee)return;const ce=be instanceof Error?be.message:String(be);F(ce||"Failed to fetch issues"),D([])}).finally(()=>{ee||z(!1)}),()=>{ee=!0}},[M,n]),k.useEffect(()=>{e&&(f(""),h(""),g(""),_("15000"),j(null),i(!1),s(!0),R(""),de(null),J(null),te("green"),D([]),F(null),B(""))},[e]),k.useEffect(()=>{if(!e)return;function ee(be){be.key==="Escape"&&r()}return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[e,r]);const Y=k.useCallback(ee=>{$.current&&!$.current.contains(ee.target)&&r()},[r]),G=k.useMemo(()=>{if(!X.trim())return L;const ee=X.toLowerCase().trim(),be=ee.startsWith("#")?parseInt(ee.slice(1),10):/^\d+$/.test(ee)?parseInt(ee,10):NaN;return L.filter(ce=>!isNaN(be)&&ce.number===be||ce.title.toLowerCase().includes(ee)||String(ce.number).includes(ee))},[L,X]),he=k.useCallback(ee=>{f(String(ee.number)),B("")},[]),xe=k.useCallback(async ee=>{if(j(null),O.length>0&&!M){j("Please select a project");return}const be=parseInt(c.trim(),10);if(isNaN(be)||be<1){j("Issue number must be a positive integer");return}const ce=m.trim()||void 0,ye=M?parseInt(M,10):void 0;w(!0);try{const we=await n.post("teams/launch",{issueNumber:be,prompt:ce,projectId:ye,headless:o,...ee?{force:!0}:{}});de(we.id),J(be)}catch(we){const ke=we instanceof Error?we.message:String(we);j(ke||"Failed to launch team")}finally{w(!1)}},[c,m,n,O,M,o]),Z=k.useCallback(async()=>{j(null);const ee=d.trim();if(!ee){j("Enter at least one issue number");return}const be=ee.split(/[,\s]+/).map(Ke=>Ke.trim()).filter(Boolean).map(Ke=>parseInt(Ke,10));if(be.some(Ke=>isNaN(Ke)||Ke<1)){j("All issue numbers must be positive integers");return}if(be.length===0){j("Enter at least one issue number");return}const ce=parseInt(y.trim(),10);if(isNaN(ce)||ce<0){j("Stagger delay must be a non-negative number (ms)");return}if(O.length>0&&!M){j("Please select a project");return}const ye=be.map(Ke=>({number:Ke})),we=m.trim()||void 0,ke=M?parseInt(M,10):void 0;w(!0);try{await n.post("teams/launch-batch",{issues:ye,prompt:we,delayMs:ce,projectId:ke,headless:o}),T(`Launched ${be.length} team${be.length>1?"s":""}`),r()}catch(Ke){const Yr=Ke instanceof Error?Ke.message:String(Ke);j(Yr||"Failed to launch batch")}finally{w(!1)}},[d,y,m,n,r,O,M,o]),se=k.useCallback(ee=>{ee.key==="Enter"&&!E&&(a?Z():xe())},[a,E,xe,Z]);if(!e&&!C)return null;const ge=K!==null&&U!==null;return b.jsxs(b.Fragment,{children:[C&&b.jsx(AV,{message:C,onDone:()=>T(null)}),e&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:Y,children:b.jsxs("div",{ref:$,className:"w-[480px] max-w-[95vw] max-h-[90vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":ge?"Launch Progress":"Launch Team",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:ge?"Launch Progress":"Launch Team"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),ge?b.jsx(TV,{teamId:K,issueNumber:U,onClose:r}):b.jsxs("div",{className:"px-5 py-4 space-y-4 overflow-y-auto",children:[O.length>0?b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("select",{value:M,onChange:ee=>R(ee.target.value),className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E,children:[b.jsx("option",{value:"",children:"Select a project..."}),O.map(ee=>b.jsx("option",{value:ee.id,children:ee.name},ee.id))]})]}):b.jsx("div",{className:"px-3 py-2 rounded border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922] text-sm",children:"Add a project first"}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[b.jsx("input",{type:"checkbox",checked:a,onChange:ee=>i(ee.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Batch mode"})]}),b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",title:o?"Runs Claude Code in the background with no visible window":"Opens Claude Code in a visible terminal window",children:[b.jsx("input",{type:"checkbox",checked:o,onChange:ee=>s(ee.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Run headless (background)"}),!o&&b.jsx("span",{className:"text-xs text-dark-muted/60",children:"— opens in a visible terminal window"})]})]}),a?b.jsxs(b.Fragment,{children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue numbers ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:le,type:"text",value:d,onChange:ee=>h(ee.target.value),onKeyDown:se,placeholder:"e.g. 763, 812, 756",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsx("p",{className:"text-xs text-dark-muted mt-1",children:"Comma or space separated"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Stagger delay (ms)"}),b.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:y,onChange:ee=>_(ee.target.value),placeholder:"15000",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}):b.jsxs("div",{className:"space-y-2",children:[M&&b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Select issue"}),q&&b.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-dark-muted",children:[b.jsxs("svg",{className:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading issues..."]}),H&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-xs",children:H}),!q&&!H&&L.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"relative mb-1",children:[b.jsx("input",{type:"text",value:X,onChange:ee=>B(ee.target.value),placeholder:"Filter issues... (#number or title)",className:"w-full px-3 py-1.5 text-xs rounded border border-dark-border bg-[#0D1117] text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),X&&b.jsx("button",{onClick:()=>B(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-dark-muted hover:text-dark-text transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto border border-dark-border rounded bg-[#0D1117]",children:G.length===0?b.jsxs("div",{className:"px-3 py-2 text-xs text-dark-muted",children:["No issues match “",X,"”"]}):G.map(ee=>{const be=c===String(ee.number),ce=!!ee.activeTeam;return b.jsxs("button",{onClick:()=>he(ee),disabled:E,className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 transition-colors border-b border-dark-border/30 last:border-b-0 ${be?"bg-dark-accent/15 text-dark-accent":"hover:bg-dark-surface text-dark-text"}`,children:[ee.state==="open"?b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}):b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#A371F7] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted shrink-0",children:["#",ee.number]}),b.jsx("span",{className:"truncate",children:ee.title}),ce&&b.jsx("span",{className:"ml-auto shrink-0 px-1.5 py-0.5 rounded text-[10px] font-medium bg-[#D29922]/15 text-[#D29922] border border-[#D29922]/30",children:ee.activeTeam.status}),be&&b.jsx("svg",{className:"w-3.5 h-3.5 text-dark-accent ml-auto shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},ee.number)})}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:[L.length," issue",L.length!==1?"s":""," found",X&&G.length!==L.length&&` (${G.length} matching)`]})]}),!q&&!H&&L.length===0&&b.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:"No issues found for this project"})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue number ",b.jsx("span",{className:"text-[#F85149]",children:"*"}),M&&L.length>0&&b.jsx("span",{className:"text-dark-muted/50 text-xs ml-1",children:"(or type manually)"})]}),b.jsx("input",{ref:le,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:c,onChange:ee=>f(ee.target.value),onKeyDown:se,placeholder:"e.g. 763",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Prompt ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:m,onChange:ee=>g(ee.target.value),onKeyDown:se,placeholder:"Custom prompt (default: project prompt file)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:["Leave empty to use the project's prompt file (with ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," replaced automatically)."]})]}),Q==="red"&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:'Usage is in the red zone (>80%). New launches will be queued instead of started immediately. Use "Force Launch" to override.'}),x&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:x})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:ge?"Close":"Cancel"}),!ge&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:()=>a?Z():void xe(),disabled:E||O.length===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:E?"Launching...":Q==="red"?a?"Queue All":"Queue":a?"Launch All":"Launch"}),Q==="red"&&!a&&b.jsx("button",{onClick:()=>void xe(!0),disabled:E||O.length===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"Force launch ignoring red zone usage limits",children:"Force Launch"})]})]})]})})]})}function MV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]})}function PV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("line",{x1:"6",x2:"6",y1:"3",y2:"15"}),b.jsx("circle",{cx:"18",cy:"6",r:"3"}),b.jsx("circle",{cx:"6",cy:"18",r:"3"}),b.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]})}function RV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 3v18h18"}),b.jsx("path",{d:"M18 17V9"}),b.jsx("path",{d:"M13 17V5"}),b.jsx("path",{d:"M8 17v-3"})]})}function DV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5"}),b.jsx("circle",{cx:"13",cy:"12",r:"2"}),b.jsx("path",{d:"M18 19c-2.8 0-5-2.2-5-5v8"}),b.jsx("circle",{cx:"20",cy:"19",r:"2"})]})}function LV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("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"}),b.jsx("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"}),b.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),b.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})}function IV({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}function RS({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("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"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function zV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]})}function qV({size:e=20,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function BV({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})})}function $V({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function FV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]})}function d5({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("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"})})}function UV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"1"}),b.jsx("circle",{cx:"19",cy:"12",r:"1"}),b.jsx("circle",{cx:"5",cy:"12",r:"1"})]})}function HV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),b.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function GV({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"m9 18 6-6-6-6"})})}const Wn={queued:"#8B949E",launching:"#D29922",running:"#3FB950",idle:"#D29922",stuck:"#F85149",done:"#A371F7",failed:"#F85149"};function X6(e,r){const n=Math.max(0,r-10);return e>=r?"#F85149":e>=n?"#D29922":"#3FB950"}const h5={"team-lead":"#58A6FF",coordinator:"#58A6FF",tl:"#58A6FF",analyst:"#D29922",dev:"#3FB950",developer:"#3FB950",reviewer:"#A371F7"},p5=["#58A6FF","#3FB950","#D29922","#A371F7","#F778BA","#79C0FF","#7EE787","#E3B341","#D2A8FF","#FF7B72"];function Ec(e,r){if(r){const i=h5[r.toLowerCase()];if(i)return i}const n=h5[e.toLowerCase()];if(n)return n;let a=0;for(let i=0;i<e.length;i++)a=(a<<5)-a+e.charCodeAt(i)|0;return p5[Math.abs(a)%p5.length]}function s2(e){if(!e)return null;const r=new Date(e).getTime()-Date.now();if(r<=0)return null;const n=Math.floor(r/36e5),a=Math.floor(r%36e5/6e4);return n>0?`Resets in ${n}h ${a}m`:`Resets in ${a}m`}const VV={daily:85,weekly:95,sonnet:95,extra:95};function KV(){const{teams:e}=Sc(),r=Ft(),[n,a]=k.useState(!1),[i,o]=k.useState(null),s=k.useCallback(async()=>{try{const g=await r.get("usage");o(g)}catch{}},[r]);k.useEffect(()=>{s();const g=setInterval(s,3e4);return()=>clearInterval(g)},[s]);const c=e.reduce((g,y)=>(g[y.status]=(g[y.status]||0)+1,g),{}),f=(i==null?void 0:i.redThresholds)??VV,d=i?[{key:"daily",label:"Daily",percent:i.dailyPercent,redThreshold:f.daily,resetLabel:s2(i.dailyResetsAt)},{key:"weekly",label:"Weekly",percent:i.weeklyPercent,redThreshold:f.weekly,resetLabel:s2(i.weeklyResetsAt)},{key:"sonnet",label:"Sonnet",percent:i.sonnetPercent,redThreshold:f.sonnet,resetLabel:null},{key:"extra",label:"Extra",percent:i.extraPercent,redThreshold:f.extra,resetLabel:null}]:[],h=[{label:"running",count:c.running||0,color:Wn.running},{label:"queued",count:c.queued||0,color:Wn.queued},{label:"launching",count:c.launching||0,color:Wn.launching},{label:"idle",count:c.idle||0,color:Wn.idle},{label:"stuck",count:c.stuck||0,color:Wn.stuck}].filter(g=>g.count>0),m=(i==null?void 0:i.zone)==="red";return b.jsxs(b.Fragment,{children:[b.jsxs("header",{className:"h-12 min-h-[48px] bg-dark-surface border-b border-dark-border flex items-center px-4 justify-between shrink-0",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("img",{src:"/logo.svg",alt:"Fleet Commander logo",width:20,height:20}),b.jsx("h1",{className:"text-sm font-semibold text-dark-text tracking-wide",children:"Fleet Commander"})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[h.map((g,y)=>b.jsxs("span",{className:"text-xs font-medium",children:[b.jsx("span",{style:{color:g.color},children:g.count}),b.jsx("span",{className:"text-dark-muted ml-1",children:g.label}),y<h.length-1&&b.jsx("span",{className:"text-dark-muted ml-3",children:"·"})]},g.label)),d.length>0&&h.length>0&&b.jsx("span",{className:"text-dark-muted mx-1",children:"|"}),d.map(g=>b.jsxs("span",{className:"text-xs font-medium",title:g.resetLabel??void 0,children:[b.jsx("span",{className:"text-dark-muted",children:g.label})," ",b.jsxs("span",{style:{color:X6(g.percent,g.redThreshold)},children:[g.percent.toFixed(0),"%"]})]},g.key)),m&&b.jsx("span",{className:"text-xs font-bold animate-pulse",style:{color:"#F85149"},children:"PAUSED"}),b.jsxs("button",{type:"button",onClick:g=>{g.stopPropagation(),g.preventDefault(),a(!0)},className:"ml-2 px-3 py-1 text-xs font-medium rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors inline-flex items-center gap-1.5",title:"Launch a new team",children:[b.jsx(LV,{size:14}),"Launch Team"]})]})]}),MS.createPortal(b.jsx(NV,{open:n,onClose:()=>a(!1)}),document.body)]})}const YV=[{to:"/",label:"Fleet Grid",icon:b.jsx(MV,{})},{to:"/issues",label:"Issue Tree",icon:b.jsx(PV,{})},{to:"/usage",label:"Usage View",icon:b.jsx(RV,{})},{to:"/projects",label:"Projects",icon:b.jsx(DV,{})},{to:"/lifecycle",label:"Lifecycle",icon:b.jsx(qV,{size:20})},{to:"/settings",label:"Settings",icon:b.jsx(RS,{size:20})}];function XV(){return b.jsx("nav",{className:"w-14 min-w-[56px] bg-dark-surface border-r border-dark-border flex flex-col items-center pt-2 gap-1",children:YV.map(e=>b.jsx(G6,{to:e.to,end:e.to==="/",title:e.label,className:({isActive:r})=>`w-10 h-10 flex items-center justify-center rounded-md text-lg transition-colors ${r?"text-dark-accent bg-dark-accent/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/50"}`,children:e.icon},e.to))})}function WV(){const{connected:e,lastEvent:r}=Sc(),[n,a]=k.useState(null),[i,o]=k.useState(null);return k.useEffect(()=>{fetch("/api/health").then(s=>s.json()).then(s=>{s.version&&o(s.version)}).catch(()=>{})},[]),k.useEffect(()=>{if(!r){a(null);return}const s=()=>{a(Math.floor((Date.now()-r.getTime())/1e3))};s();const c=setInterval(s,1e3);return()=>clearInterval(c)},[r]),b.jsxs("footer",{className:"h-6 min-h-[24px] bg-dark-base border-t border-dark-border flex items-center px-3 text-xs text-dark-muted select-none",children:[b.jsx("span",{className:`inline-block w-2 h-2 rounded-full mr-2 ${e?"bg-green-500":"bg-red-500"}`}),b.jsx("span",{children:e?"Connected":"Disconnected"}),n!==null&&b.jsxs("span",{className:"ml-4",children:["Last update: ",n,"s ago"]}),i&&b.jsxs("span",{className:"ml-auto",children:["v",i]})]})}const ZV={queued:"Queued",running:"Running",stuck:"Stuck",idle:"Idle",done:"Done",failed:"Failed",launching:"Launching"};function DS({status:e}){const r=Wn[e]??"#8B949E",n=ZV[e]??e;let a="";return e==="stuck"?a="animate-pulse-stuck":e==="launching"&&(a="animate-blink"),b.jsxs("span",{className:"inline-flex items-center gap-2",children:[b.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full shrink-0 ${a}`,style:{backgroundColor:r}}),b.jsx("span",{className:"text-sm font-medium",style:{color:r},children:n})]})}function QV(e,r){return e==="success"?{icon:"✓",color:"#3FB950"}:e==="failure"?{icon:"✕",color:"#F85149"}:e==="cancelled"?{icon:"―",color:"#8B949E"}:r==="in_progress"||r==="queued"||r==="pending"?{icon:"○",color:"#D29922"}:{icon:"○",color:"#8B949E"}}function W6({checks:e}){return e.length===0?b.jsx("p",{className:"text-dark-muted text-sm",children:"No CI checks available"}):b.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map((r,n)=>{const{icon:a,color:i}=QV(r.conclusion,r.status),o=r.conclusion==="success"?"rgba(63, 185, 80, 0.15)":r.conclusion==="failure"?"rgba(248, 81, 73, 0.15)":r.conclusion==="cancelled"?"rgba(139, 148, 158, 0.15)":"rgba(210, 153, 34, 0.15)";return b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full max-w-[10rem]",style:{backgroundColor:o},title:r.name,children:[b.jsx("span",{className:"font-bold leading-none shrink-0",style:{color:i},children:a}),b.jsx("span",{className:"truncate",style:{color:i},children:r.name})]},`${r.name}-${n}`)})})}const LS="__pm__",IS="__fc__";function JV(e){return e===LS?"You":e===IS?"FC":e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const eK={[LS]:"#3FB950",[IS]:"#D29922"};function tK({roster:e,activeFilters:r,onFiltersChange:n,hasUserEntries:a,hasFcEntries:i}){const o=k.useMemo(()=>{const d=new Set;d.add("team-lead");for(const m of e)d.add(m.name.toLowerCase());const h=Array.from(d).sort((m,g)=>m==="team-lead"?-1:g==="team-lead"?1:m.localeCompare(g));return a&&h.push(LS),i&&h.push(IS),h},[e,a,i]);if(o.length<=1)return null;const s=r.size===0||r.size===o.length,c=()=>{n(new Set)},f=d=>{const h=new Set(r);if(s){n(new Set([d]));return}if(h.has(d)){if(h.delete(d),h.size===0){n(new Set);return}}else if(h.add(d),h.size===o.length){n(new Set);return}n(h)};return b.jsxs("div",{className:"flex items-center gap-1 mb-2 flex-wrap",children:[b.jsx("button",{onClick:c,className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150",style:s?{color:"#C9D1D9",borderColor:"#C9D1D960",backgroundColor:"#C9D1D918"}:{color:"#484F58",borderColor:"#484F5840",opacity:.7},children:"All"}),o.map(d=>{const h=eK[d]??Ec(d,d),m=!s&&r.has(d);return b.jsxs("button",{onClick:()=>f(d),className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150 flex items-center gap-1",style:m?{color:h,borderColor:h+"60",backgroundColor:h+"18"}:{color:"#484F58",borderColor:"#484F5840",opacity:.5},children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:m?h:"#484F58"}}),JV(d)]},d)})]})}function So(e){return!e||e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const rK={assistant:{color:"#58A6FF",label:"TL"},user:{color:"#3FB950",label:"You"},fc:{color:"#D29922",label:"FC"},system:{color:"#8B949E",label:"system"},tool_use:{color:"#D29922",label:"tool"},tool_result:{color:"#A371F7",label:"result"},result:{color:"#3FB950",label:"done"},rate_limit_event:{color:"#D29922",label:"rate-limit"}};function ah(e){return rK[e]??{color:"#8B949E",label:e}}const nK={initial_prompt:"prompt",origin_sync:"sync",idle_nudge:"idle",stuck_nudge:"nudge",ci_green:"CI pass",ci_red:"CI fail",ci_blocked:"CI blocked",pr_merged_shutdown:"shutdown",subagent_crash:"crash"};function Z6(e){return e?nK[e]??e:null}const Q6=new Set(["assistant","user","fc"]);function J6(e){var n;if(!Q6.has(e.streamType))return"";const r=(n=e.message)==null?void 0:n.content;return Array.isArray(r)?r.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
61
|
+
`):""}const aK=new Set(["SessionStart","SessionEnd","Stop","SubagentStart","SubagentStop"]),iK=new Set(["ToolError","StopFailure"]);function oK(e){if(!e)return null;try{const r=JSON.parse(e);if(typeof r=="object"&&r!==null&&"error"in r&&typeof r.error=="string")return r.error}catch{}return null}function Ia(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function m5(e){if(e.streamType==="user")return{label:"You",color:"#3FB950"};if(e.streamType==="fc")return{label:"FC",color:"#D29922"};if(e.agentName&&(e.streamType==="assistant"||e.streamType==="tool_use")){const r=So(e.agentName),n=Ec(e.agentName,e.agentName);return{label:r,color:n}}return ah(e.streamType)}function lK(e){if(e.agentName){const r=So(e.agentName),n=Ec(e.agentName,e.agentName);return{label:r,color:n}}return{label:"System",color:"#8B949E"}}const sK=120;function Pl(e,r=sK){return e.length<=r?e:e.slice(0,r)+"..."}function eL(e){var a;if(e.streamType!=="tool_use"||!((a=e.tool)!=null&&a.name)||!e.tool.input)return null;const r=e.tool.input;switch(e.tool.name){case"Bash":{const i=r.command;return typeof i=="string"?Pl(i):null}case"Read":{const i=r.file_path;return typeof i=="string"?i:null}case"Write":{const i=r.file_path;return typeof i=="string"?i:null}case"Edit":{const i=r.file_path,o=r.old_string,s=r.new_string,c=[];return typeof i=="string"&&c.push(i),typeof o=="string"&&typeof s=="string"&&c.push(Pl(o,50)+" -> "+Pl(s,50)),c.length>0?c.join(" "):null}case"Grep":{const i=r.pattern,o=r.path,s=[];return typeof i=="string"&&s.push(`/${i}/`),typeof o=="string"&&s.push(o),s.length>0?s.join(" in "):null}case"Glob":{const i=r.pattern;return typeof i=="string"?i:null}case"SendMessage":{const i=r.to,o=r.message,s=[];return typeof i=="string"&&s.push(`to ${i}`),typeof o=="string"&&s.push(Pl(o,80)),s.length>0?s.join(": "):null}case"Agent":{const i=r.name,o=r.message,s=[];return typeof i=="string"&&s.push(i),typeof o=="string"&&s.push(Pl(o,80)),s.length>0?s.join(": "):null}default:{try{const i=JSON.stringify(r);if(i.length>2)return Pl(i)}catch{}return null}}}function uK({entry:e}){var s,c;const[r,n]=k.useState(!1),a=J6(e),i=a.includes(`
|
|
62
|
+
`),o=eL(e);if(e.streamType==="system"&&(e.subtype==="task_progress"||e.subtype==="task_notification")){const f=So(e.agentName),d=e.agentName?Ec(e.agentName,e.agentName):"#8B949E",h=e.lastToolName??((s=e.tool)==null?void 0:s.name),m=e.description;return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-medium",children:f}),h&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-dark-muted",children:b.jsx(RS,{size:10})}),b.jsx("span",{className:"text-dark-muted",children:h})]}),m&&b.jsx("span",{className:"text-dark-muted truncate",children:m})]})}if(Q6.has(e.streamType)&&a){const{label:f,color:d}=m5(e);return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full mr-0.5 align-middle",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),e.streamType==="fc"&&e.subtype&&b.jsxs("span",{className:"text-dark-muted text-[10px] ml-1",children:["[",Z6(e.subtype),"]"]})," ",i?b.jsx("span",{className:"text-dark-text whitespace-pre-wrap",children:a}):b.jsx("span",{className:"text-dark-text",children:a})]})}if(e.streamType==="tool_use"&&((c=e.tool)!=null&&c.name)){const{label:f,color:d}=m5(e),h=o!==null;return b.jsxs("div",{children:[b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),b.jsx("span",{className:`text-dark-muted bg-dark-border/30 px-1.5 py-0.5 rounded${h?" cursor-pointer border-b border-dotted border-dark-border hover:bg-dark-border/50":""}`,onClick:h?()=>n(m=>!m):void 0,onKeyDown:h?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n(g=>!g))}:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-expanded":h?r:void 0,children:e.tool.name})]}),r&&o&&b.jsx("div",{className:"text-dark-muted pl-6 pb-0.5 font-mono truncate",title:o,children:o})]})}if(e.streamType==="result"||e.streamType==="tool_result"){const{color:f,label:d}=ah(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})]})}if(a){const{color:f,label:d}=ah(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:Ia(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})," ",b.jsx("span",{className:"text-dark-text",children:a})]})}return null}function cK({entry:e}){const r=aK.has(e.eventType),n=iK.has(e.eventType),a=n?oK(e.payload):null,{label:i,color:o}=lK(e),[s,c]=k.useState(!1);if(r){const f=e.eventType==="SessionStart"||e.eventType==="SubagentStart"?"#3FB950":"#8B949E";return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"font-normal px-1.5 rounded",style:{color:f,backgroundColor:f+"18"},children:e.eventType})]})}if(n){const f=a!==null;return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:`font-normal bg-red-500/20 text-red-400 px-1.5 py-0.5 rounded${f?" cursor-pointer border-b border-dotted border-red-400/40 hover:bg-red-500/30":""}`,onClick:f?()=>c(d=>!d):void 0,onKeyDown:f?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c(h=>!h))}:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,"aria-expanded":f?s:void 0,children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]}),s&&a&&b.jsx("div",{className:"ml-[52px] text-[#F85149] mt-0.5 line-clamp-2",children:a})]})}return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:Ia(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"text-dark-text font-normal",children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]})}function fK(e){return e.source==="stream"?e.streamType==="user"?"__pm__":e.streamType==="fc"?"__fc__":e.agentName:e.agentName}function dK({teamId:e,teamStatus:r,isThinking:n,roster:a,agentFilters:i,onAgentFiltersChange:o}){const s=Ft(),[c,f]=k.useState([]),[d,h]=k.useState(!1),[m,g]=k.useState(!1),y=k.useRef(null),_=k.useRef(null),E=k.useRef(!0),w=k.useCallback(()=>{const O=y.current;if(!O)return;const N=O.scrollHeight-O.scrollTop-O.clientHeight<40;E.current=N},[]);k.useEffect(()=>{let O=!1;async function N(){if(!O)try{const R=await s.get(`teams/${e}/timeline?limit=500`);O||f(R)}catch{}}if(N(),r==="done"||r==="failed")return()=>{O=!0};const M=setInterval(N,2e3);return()=>{O=!0,clearInterval(M)}},[s,e,r]);const x=k.useMemo(()=>!i||i.size===0?c:c.filter(O=>{const N=fK(O);return N?i.has(N):!0}),[c,i]);k.useEffect(()=>{var O;E.current&&((O=_.current)==null||O.scrollIntoView({behavior:"smooth"}))},[x.length]);const j=k.useCallback(()=>{var N;const O=[];for(const M of x){const R=Ia(M.timestamp);if(M.source==="stream"){const L=J6(M);if(L){const D=M.agentName?So(M.agentName):ah(M.streamType).label,q=M.streamType==="fc"&&M.subtype?` [${Z6(M.subtype)}]`:"";O.push(`[${R}] ${D}${q}: ${L}`)}else if(M.streamType==="tool_use"&&((N=M.tool)!=null&&N.name)){const D=M.agentName?So(M.agentName):"tool",q=eL(M),z=q?` — ${q}`:"";O.push(`[${R}] ${D}: ${M.tool.name}${z}`)}else if(M.streamType==="system"&&M.description){const D=M.agentName?So(M.agentName):"system";O.push(`[${R}] ${D}: ${M.lastToolName??""} ${M.description}`)}}else{const L=M,D=L.agentName?So(L.agentName):"System";let q=L.eventType;L.toolName&&(q+=` (${L.toolName})`),O.push(`[${R}] ${D}: ${q}`)}}navigator.clipboard.writeText(O.join(`
|
|
63
|
+
`)).then(()=>{h(!0),setTimeout(()=>h(!1),2e3)}).catch(()=>{g(!0),setTimeout(()=>g(!1),2e3)})},[x]),C=k.useMemo(()=>c.some(O=>O.source==="stream"&&O.streamType==="user"),[c]),T=k.useMemo(()=>c.some(O=>O.source==="stream"&&O.streamType==="fc"),[c]);if(c.length===0){const O=r==="done"||r==="failed";return b.jsx("div",{className:"text-[11px] text-dark-muted italic py-2",children:O?"No session log captured.":"No events yet. Events appear when Claude Code is running."})}return b.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[a&&o&&b.jsx(tK,{roster:a,activeFilters:i??new Set,onFiltersChange:o,hasUserEntries:C,hasFcEntries:T}),b.jsx("button",{onClick:j,className:"absolute top-1.5 right-1.5 z-10 px-2 py-0.5 text-[10px] rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted bg-[#0D1117] transition-colors",title:"Copy full log to clipboard",children:d?"Copied!":m?"Failed":"Copy"}),b.jsxs("div",{ref:y,onScroll:w,className:`flex-1 min-h-0 font-mono text-[11px] overflow-y-auto bg-[#0D1117] p-2 rounded border border-dark-border custom-scrollbar${n?" thinking-glow":""}`,children:[x.map(O=>O.source==="stream"?b.jsx(uK,{entry:O},O.id):b.jsx(cK,{entry:O},O.id)),n&&b.jsxs("div",{className:"py-1 flex items-center gap-1.5",children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#E8976C] animate-thinking-dot"}),b.jsx("span",{className:"text-[#E8976C] text-[10px] italic",children:"thinking..."})]}),b.jsx("div",{ref:_})]})]})}function hK({teamId:e,disabled:r=!1}){const n=Ft(),[a,i]=k.useState(""),[o,s]=k.useState(!1),[c,f]=k.useState(null),d=k.useRef(null),h=k.useRef(null);k.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const m=y=>{f(y),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{f(null),h.current=null},3e3)},g=async y=>{var E;y.preventDefault();const _=a.trim();if(!(!_||o)){s(!0),f(null);try{await n.post(`teams/${e}/send-message`,{message:_}),i(""),m({type:"success",message:"Message sent"}),(E=d.current)==null||E.focus()}catch(w){if(w instanceof Y6&&w.status===422)m({type:"warning",message:"Team is not running — message not delivered"});else{const x=w instanceof Error?w.message:"Failed to send message";m({type:"error",message:x})}}finally{s(!1)}}};return b.jsxs("div",{children:[b.jsxs("form",{onSubmit:g,className:"flex items-center gap-2",children:[b.jsx("input",{ref:d,type:"text",value:a,onChange:y=>i(y.target.value),disabled:r||o,placeholder:r?"Team is not running":"Send message to team...",className:"flex-1 bg-dark-base border border-dark-border rounded px-3 py-2 text-sm text-dark-text placeholder-dark-muted focus:outline-none focus:border-dark-accent transition-colors disabled:opacity-50"}),b.jsx("button",{type:"submit",disabled:r||o||!a.trim(),className:"px-4 py-2 text-sm font-medium rounded bg-dark-accent text-white hover:bg-dark-accent/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:o?"Sending...":"Send"})]}),c&&b.jsx("div",{className:`mt-2 text-xs px-2 py-1 rounded ${c.type==="success"?"text-[#3FB950] bg-[#3FB950]/10":c.type==="warning"?"text-[#D29922] bg-[#D29922]/10":"text-[#F85149] bg-[#F85149]/10"}`,children:c.message})]})}function pK(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function mK(e,r,n){return r=SK(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v5(e,r){return yK(e)||pK(e,r)||tL(e,r)||_K()}function vK(e){return gK(e)||bK(e)||tL(e)||xK()}function gK(e){if(Array.isArray(e))return u2(e)}function yK(e){if(Array.isArray(e))return e}function bK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tL(e,r){if(e){if(typeof e=="string")return u2(e,r);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 u2(e,r)}}function u2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function xK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wK(e,r){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function SK(e){var r=wK(e,"string");return typeof r=="symbol"?r:String(r)}var EK=function(r,n){var a=new Set(n);return Object.assign.apply(Object,[{}].concat(vK(Object.entries(r).filter(function(i){var o=v5(i,1),s=o[0];return!a.has(s)}).map(function(i){var o=v5(i,2),s=o[0],c=o[1];return mK({},s,c)}))))};function c2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function kK(e){if(Array.isArray(e))return e}function AK(e){if(Array.isArray(e))return c2(e)}function jK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CK(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function OK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
67
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NK(e,r){return kK(e)||CK(e,r)||rL(e,r)||OK()}function g5(e){return AK(e)||jK(e)||rL(e)||TK()}function rL(e,r){if(e){if(typeof e=="string")return c2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c2(e,r):void 0}}function MK(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.wrapperElementType,a=n===void 0?"div":n,i=r.nodeMapper,o=i===void 0?function(h){return h}:i,s=r.methodNames,c=s===void 0?[]:s,f=r.initPropNames,d=f===void 0?[]:f;return k.forwardRef(function(h,m){var g=k.useRef(),y=k.useMemo(function(){var w=Object.fromEntries(d.filter(function(x){return h.hasOwnProperty(x)}).map(function(x){return[x,h[x]]}));return e(w)},[]);y5(function(){y(o(g.current))},k.useLayoutEffect),y5(function(){return y._destructor instanceof Function?y._destructor:void 0});var _=k.useCallback(function(w){for(var x=arguments.length,j=new Array(x>1?x-1:0),C=1;C<x;C++)j[C-1]=arguments[C];return y[w]instanceof Function?y[w].apply(y,j):void 0},[y]),E=k.useRef({});return Object.keys(EK(h,[].concat(g5(c),g5(d)))).filter(function(w){return E.current[w]!==h[w]}).forEach(function(w){return _(w,h[w])}),E.current=h,k.useImperativeHandle(m,function(){return Object.fromEntries(c.map(function(w){return[w,function(){for(var x=arguments.length,j=new Array(x),C=0;C<x;C++)j[C]=arguments[C];return _.apply(void 0,[w].concat(j))}]}))},[_]),vp.createElement(a,{ref:g})})}function y5(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.useEffect,n=k.useRef(),a=k.useRef(!1),i=k.useRef(!1),o=k.useState(0),s=NK(o,2);s[0];var c=s[1];a.current&&(i.current=!0),r(function(){return a.current||(n.current=e(),a.current=!0),c(function(f){return f+1}),function(){i.current&&n.current&&n.current()}},[])}var f2="http://www.w3.org/1999/xhtml";const b5={svg:"http://www.w3.org/2000/svg",xhtml:f2,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bp(e){var r=e+="",n=r.indexOf(":");return n>=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),b5.hasOwnProperty(r)?{space:b5[r],local:e}:e}function PK(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===f2&&r.documentElement.namespaceURI===f2?r.createElement(e):r.createElementNS(n,e)}}function RK(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nL(e){var r=bp(e);return(r.local?RK:PK)(r)}function DK(){}function zS(e){return e==null?DK:function(){return this.querySelector(e)}}function LK(e){typeof e!="function"&&(e=zS(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=new Array(s),f,d,h=0;h<s;++h)(f=o[h])&&(d=e.call(f,f.__data__,h,o))&&("__data__"in f&&(d.__data__=f.__data__),c[h]=d);return new Gr(a,this._parents)}function IK(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function zK(){return[]}function aL(e){return e==null?zK:function(){return this.querySelectorAll(e)}}function qK(e){return function(){return IK(e.apply(this,arguments))}}function BK(e){typeof e=="function"?e=qK(e):e=aL(e);for(var r=this._groups,n=r.length,a=[],i=[],o=0;o<n;++o)for(var s=r[o],c=s.length,f,d=0;d<c;++d)(f=s[d])&&(a.push(e.call(f,f.__data__,d,s)),i.push(f));return new Gr(a,i)}function iL(e){return function(){return this.matches(e)}}function oL(e){return function(r){return r.matches(e)}}var $K=Array.prototype.find;function FK(e){return function(){return $K.call(this.children,e)}}function UK(){return this.firstElementChild}function HK(e){return this.select(e==null?UK:FK(typeof e=="function"?e:oL(e)))}var GK=Array.prototype.filter;function VK(){return Array.from(this.children)}function KK(e){return function(){return GK.call(this.children,e)}}function YK(e){return this.selectAll(e==null?VK:KK(typeof e=="function"?e:oL(e)))}function XK(e){typeof e!="function"&&(e=iL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=[],f,d=0;d<s;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Gr(a,this._parents)}function lL(e){return new Array(e.length)}function WK(){return new Gr(this._enter||this._groups.map(lL),this._parents)}function ih(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}ih.prototype={constructor:ih,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ZK(e){return function(){return e}}function QK(e,r,n,a,i,o){for(var s=0,c,f=r.length,d=o.length;s<d;++s)(c=r[s])?(c.__data__=o[s],a[s]=c):n[s]=new ih(e,o[s]);for(;s<f;++s)(c=r[s])&&(i[s]=c)}function JK(e,r,n,a,i,o,s){var c,f,d=new Map,h=r.length,m=o.length,g=new Array(h),y;for(c=0;c<h;++c)(f=r[c])&&(g[c]=y=s.call(f,f.__data__,c,r)+"",d.has(y)?i[c]=f:d.set(y,f));for(c=0;c<m;++c)y=s.call(e,o[c],c,o)+"",(f=d.get(y))?(a[c]=f,f.__data__=o[c],d.delete(y)):n[c]=new ih(e,o[c]);for(c=0;c<h;++c)(f=r[c])&&d.get(g[c])===f&&(i[c]=f)}function eY(e){return e.__data__}function tY(e,r){if(!arguments.length)return Array.from(this,eY);var n=r?JK:QK,a=this._parents,i=this._groups;typeof e!="function"&&(e=ZK(e));for(var o=i.length,s=new Array(o),c=new Array(o),f=new Array(o),d=0;d<o;++d){var h=a[d],m=i[d],g=m.length,y=rY(e.call(h,h&&h.__data__,d,a)),_=y.length,E=c[d]=new Array(_),w=s[d]=new Array(_),x=f[d]=new Array(g);n(h,m,E,w,x,y,r);for(var j=0,C=0,T,O;j<_;++j)if(T=E[j]){for(j>=C&&(C=j+1);!(O=w[C])&&++C<_;);T._next=O||null}}return s=new Gr(s,a),s._enter=c,s._exit=f,s}function rY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function nY(){return new Gr(this._exit||this._groups.map(lL),this._parents)}function aY(e,r,n){var a=this.enter(),i=this,o=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),r!=null&&(i=r(i),i&&(i=i.selection())),n==null?o.remove():n(o),a&&i?a.merge(i).order():i}function iY(e){for(var r=e.selection?e.selection():e,n=this._groups,a=r._groups,i=n.length,o=a.length,s=Math.min(i,o),c=new Array(i),f=0;f<s;++f)for(var d=n[f],h=a[f],m=d.length,g=c[f]=new Array(m),y,_=0;_<m;++_)(y=d[_]||h[_])&&(g[_]=y);for(;f<i;++f)c[f]=n[f];return new Gr(c,this._parents)}function oY(){for(var e=this._groups,r=-1,n=e.length;++r<n;)for(var a=e[r],i=a.length-1,o=a[i],s;--i>=0;)(s=a[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function lY(e){e||(e=sY);function r(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,a=n.length,i=new Array(a),o=0;o<a;++o){for(var s=n[o],c=s.length,f=i[o]=new Array(c),d,h=0;h<c;++h)(d=s[h])&&(f[h]=d);f.sort(r)}return new Gr(i,this._parents).order()}function sY(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function uY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cY(){return Array.from(this)}function fY(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;++i){var s=a[i];if(s)return s}return null}function dY(){let e=0;for(const r of this)++e;return e}function hY(){return!this.node()}function pY(e){for(var r=this._groups,n=0,a=r.length;n<a;++n)for(var i=r[n],o=0,s=i.length,c;o<s;++o)(c=i[o])&&e.call(c,c.__data__,o,i);return this}function mY(e){return function(){this.removeAttribute(e)}}function vY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gY(e,r){return function(){this.setAttribute(e,r)}}function yY(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function bY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function xY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function _Y(e,r){var n=bp(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((r==null?n.local?vY:mY:typeof r=="function"?n.local?xY:bY:n.local?yY:gY)(n,r))}function sL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wY(e){return function(){this.style.removeProperty(e)}}function SY(e,r,n){return function(){this.style.setProperty(e,r,n)}}function EY(e,r,n){return function(){var a=r.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function kY(e,r,n){return arguments.length>1?this.each((r==null?wY:typeof r=="function"?EY:SY)(e,r,n??"")):Wl(this.node(),e)}function Wl(e,r){return e.style.getPropertyValue(r)||sL(e).getComputedStyle(e,null).getPropertyValue(r)}function AY(e){return function(){delete this[e]}}function jY(e,r){return function(){this[e]=r}}function CY(e,r){return function(){var n=r.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function OY(e,r){return arguments.length>1?this.each((r==null?AY:typeof r=="function"?CY:jY)(e,r)):this.node()[e]}function uL(e){return e.trim().split(/^|\s+/)}function qS(e){return e.classList||new cL(e)}function cL(e){this._node=e,this._names=uL(e.getAttribute("class")||"")}cL.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function fL(e,r){for(var n=qS(e),a=-1,i=r.length;++a<i;)n.add(r[a])}function dL(e,r){for(var n=qS(e),a=-1,i=r.length;++a<i;)n.remove(r[a])}function TY(e){return function(){fL(this,e)}}function NY(e){return function(){dL(this,e)}}function MY(e,r){return function(){(r.apply(this,arguments)?fL:dL)(this,e)}}function PY(e,r){var n=uL(e+"");if(arguments.length<2){for(var a=qS(this.node()),i=-1,o=n.length;++i<o;)if(!a.contains(n[i]))return!1;return!0}return this.each((typeof r=="function"?MY:r?TY:NY)(n,r))}function RY(){this.textContent=""}function DY(e){return function(){this.textContent=e}}function LY(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function IY(e){return arguments.length?this.each(e==null?RY:(typeof e=="function"?LY:DY)(e)):this.node().textContent}function zY(){this.innerHTML=""}function qY(e){return function(){this.innerHTML=e}}function BY(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function $Y(e){return arguments.length?this.each(e==null?zY:(typeof e=="function"?BY:qY)(e)):this.node().innerHTML}function FY(){this.nextSibling&&this.parentNode.appendChild(this)}function UY(){return this.each(FY)}function HY(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function GY(){return this.each(HY)}function VY(e){var r=typeof e=="function"?e:nL(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function KY(){return null}function YY(e,r){var n=typeof e=="function"?e:nL(e),a=r==null?KY:typeof r=="function"?r:zS(r);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function XY(){var e=this.parentNode;e&&e.removeChild(this)}function WY(){return this.each(XY)}function ZY(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function QY(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function JY(e){return this.select(e?QY:ZY)}function eX(e){return arguments.length?this.property("__data__",e):this.node().__data__}function tX(e){return function(r){e.call(this,r,this.__data__)}}function rX(e){return e.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");return a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),{type:r,name:n}})}function nX(e){return function(){var r=this.__on;if(r){for(var n=0,a=-1,i=r.length,o;n<i;++n)o=r[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):r[++a]=o;++a?r.length=a:delete this.__on}}}function aX(e,r,n){return function(){var a=this.__on,i,o=tX(r);if(a){for(var s=0,c=a.length;s<c;++s)if((i=a[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=r;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:r,listener:o,options:n},a?a.push(i):this.__on=[i]}}function iX(e,r,n){var a=rX(e+""),i,o=a.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,h;f<d;++f)for(i=0,h=c[f];i<o;++i)if((s=a[i]).type===h.type&&s.name===h.name)return h.value}return}for(c=r?aX:nX,i=0;i<o;++i)this.each(c(a[i],r,n));return this}function hL(e,r,n){var a=sL(e),i=a.CustomEvent;typeof i=="function"?i=new i(r,n):(i=a.document.createEvent("Event"),n?(i.initEvent(r,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(r,!1,!1)),e.dispatchEvent(i)}function oX(e,r){return function(){return hL(this,e,r)}}function lX(e,r){return function(){return hL(this,e,r.apply(this,arguments))}}function sX(e,r){return this.each((typeof r=="function"?lX:oX)(e,r))}function*uX(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length,s;i<o;++i)(s=a[i])&&(yield s)}var pL=[null];function Gr(e,r){this._groups=e,this._parents=r}function kc(){return new Gr([[document.documentElement]],pL)}function cX(){return this}Gr.prototype=kc.prototype={constructor:Gr,select:LK,selectAll:BK,selectChild:HK,selectChildren:YK,filter:XK,data:tY,enter:WK,exit:nY,join:aY,merge:iY,selection:cX,order:oY,sort:lY,call:uY,nodes:cY,node:fY,size:dY,empty:hY,each:pY,attr:_Y,style:kY,property:OY,classed:PY,text:IY,html:$Y,raise:UY,lower:GY,append:VY,insert:YY,remove:WY,clone:JY,datum:eX,on:iX,dispatch:sX,[Symbol.iterator]:uX};function dn(e){return typeof e=="string"?new Gr([[document.querySelector(e)]],[document.documentElement]):new Gr([[e]],pL)}function fX(e){let r;for(;r=e.sourceEvent;)e=r;return e}function Yn(e,r){if(e=fX(e),r===void 0&&(r=e.currentTarget),r){var n=r.ownerSVGElement||r;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(r.getScreenCTM().inverse()),[a.x,a.y]}if(r.getBoundingClientRect){var i=r.getBoundingClientRect();return[e.clientX-i.left-r.clientLeft,e.clientY-i.top-r.clientTop]}}return[e.pageX,e.pageY]}var dX={value:()=>{}};function Ac(){for(var e=0,r=arguments.length,n={},a;e<r;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new Kd(n)}function Kd(e){this._=e}function hX(e,r){return e.trim().split(/^|\s+/).map(function(n){var a="",i=n.indexOf(".");if(i>=0&&(a=n.slice(i+1),n=n.slice(0,i)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}Kd.prototype=Ac.prototype={constructor:Kd,on:function(e,r){var n=this._,a=hX(e+"",n),i,o=-1,s=a.length;if(arguments.length<2){for(;++o<s;)if((i=(e=a[o]).type)&&(i=pX(n[i],e.name)))return i;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++o<s;)if(i=(e=a[o]).type)n[i]=x5(n[i],e.name,r);else if(r==null)for(i in n)n[i]=x5(n[i],e.name,null);return this},copy:function(){var e={},r=this._;for(var n in r)e[n]=r[n].slice();return new Kd(e)},call:function(e,r){if((i=arguments.length-2)>0)for(var n=new Array(i),a=0,i,o;a<i;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],a=0,i=o.length;a<i;++a)o[a].value.apply(r,n)},apply:function(e,r,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(r,n)}};function pX(e,r){for(var n=0,a=e.length,i;n<a;++n)if((i=e[n]).name===r)return i.value}function x5(e,r,n){for(var a=0,i=e.length;a<i;++a)if(e[a].name===r){e[a]=dX,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:r,value:n}),e}const mX={passive:!1},tc={capture:!0,passive:!1};function Qg(e){e.stopImmediatePropagation()}function Vl(e){e.preventDefault(),e.stopImmediatePropagation()}function mL(e){var r=e.document.documentElement,n=dn(e).on("dragstart.drag",Vl,tc);"onselectstart"in r?n.on("selectstart.drag",Vl,tc):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function vL(e,r){var n=e.document.documentElement,a=dn(e).on("dragstart.drag",null);r&&(a.on("click.drag",Vl,tc),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const wd=e=>()=>e;function d2(e,{sourceEvent:r,subject:n,target:a,identifier:i,active:o,x:s,y:c,dx:f,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}d2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function vX(e){return!e.ctrlKey&&!e.button}function gX(){return this.parentNode}function yX(e,r){return r??{x:e.x,y:e.y}}function bX(){return navigator.maxTouchPoints||"ontouchstart"in this}function xX(){var e=vX,r=gX,n=yX,a=bX,i={},o=Ac("start","drag","end"),s=0,c,f,d,h,m=0;function g(T){T.on("mousedown.drag",y).filter(a).on("touchstart.drag",w).on("touchmove.drag",x,mX).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(T,O){if(!(h||!e.call(this,T,O))){var N=C(this,r.call(this,T,O),T,O,"mouse");N&&(dn(T.view).on("mousemove.drag",_,tc).on("mouseup.drag",E,tc),mL(T.view),Qg(T),d=!1,c=T.clientX,f=T.clientY,N("start",T))}}function _(T){if(Vl(T),!d){var O=T.clientX-c,N=T.clientY-f;d=O*O+N*N>m}i.mouse("drag",T)}function E(T){dn(T.view).on("mousemove.drag mouseup.drag",null),vL(T.view,d),Vl(T),i.mouse("end",T)}function w(T,O){if(e.call(this,T,O)){var N=T.changedTouches,M=r.call(this,T,O),R=N.length,L,D;for(L=0;L<R;++L)(D=C(this,M,T,O,N[L].identifier,N[L]))&&(Qg(T),D("start",T,N[L]))}}function x(T){var O=T.changedTouches,N=O.length,M,R;for(M=0;M<N;++M)(R=i[O[M].identifier])&&(Vl(T),R("drag",T,O[M]))}function j(T){var O=T.changedTouches,N=O.length,M,R;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),M=0;M<N;++M)(R=i[O[M].identifier])&&(Qg(T),R("end",T,O[M]))}function C(T,O,N,M,R,L){var D=o.copy(),q=Yn(L||N,O),z,H,F;if((F=n.call(T,new d2("beforestart",{sourceEvent:N,target:g,identifier:R,active:s,x:q[0],y:q[1],dx:0,dy:0,dispatch:D}),M))!=null)return z=F.x-q[0]||0,H=F.y-q[1]||0,function X(B,Q,te){var K=q,de;switch(B){case"start":i[R]=X,de=s++;break;case"end":delete i[R],--s;case"drag":q=Yn(te||Q,O),de=s;break}D.call(B,T,new d2(B,{sourceEvent:Q,subject:F,target:g,identifier:R,active:de,x:q[0]+z,y:q[1]+H,dx:q[0]-K[0],dy:q[1]-K[1],dispatch:D}),M)}}return g.filter=function(T){return arguments.length?(e=typeof T=="function"?T:wd(!!T),g):e},g.container=function(T){return arguments.length?(r=typeof T=="function"?T:wd(T),g):r},g.subject=function(T){return arguments.length?(n=typeof T=="function"?T:wd(T),g):n},g.touchable=function(T){return arguments.length?(a=typeof T=="function"?T:wd(!!T),g):a},g.on=function(){var T=o.on.apply(o,arguments);return T===o?g:T},g.clickDistance=function(T){return arguments.length?(m=(T=+T)*T,g):Math.sqrt(m)},g}function BS(e,r,n){e.prototype=r.prototype=n,n.constructor=e}function gL(e,r){var n=Object.create(e.prototype);for(var a in r)n[a]=r[a];return n}function jc(){}var rc=.7,oh=1/rc,Kl="\\s*([+-]?\\d+)\\s*",nc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_X=/^#([0-9a-f]{3,8})$/,wX=new RegExp(`^rgb\\(${Kl},${Kl},${Kl}\\)$`),SX=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),EX=new RegExp(`^rgba\\(${Kl},${Kl},${Kl},${nc}\\)$`),kX=new RegExp(`^rgba\\(${ta},${ta},${ta},${nc}\\)$`),AX=new RegExp(`^hsl\\(${nc},${ta},${ta}\\)$`),jX=new RegExp(`^hsla\\(${nc},${ta},${ta},${nc}\\)$`),_5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};BS(jc,Mo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:w5,formatHex:w5,formatHex8:CX,formatHsl:OX,formatRgb:S5,toString:S5});function w5(){return this.rgb().formatHex()}function CX(){return this.rgb().formatHex8()}function OX(){return yL(this).formatHsl()}function S5(){return this.rgb().formatRgb()}function Mo(e){var r,n;return e=(e+"").trim().toLowerCase(),(r=_X.exec(e))?(n=r[1].length,r=parseInt(r[1],16),n===6?E5(r):n===3?new Or(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?Sd(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?Sd(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=wX.exec(e))?new Or(r[1],r[2],r[3],1):(r=SX.exec(e))?new Or(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=EX.exec(e))?Sd(r[1],r[2],r[3],r[4]):(r=kX.exec(e))?Sd(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=AX.exec(e))?j5(r[1],r[2]/100,r[3]/100,1):(r=jX.exec(e))?j5(r[1],r[2]/100,r[3]/100,r[4]):_5.hasOwnProperty(e)?E5(_5[e]):e==="transparent"?new Or(NaN,NaN,NaN,0):null}function E5(e){return new Or(e>>16&255,e>>8&255,e&255,1)}function Sd(e,r,n,a){return a<=0&&(e=r=n=NaN),new Or(e,r,n,a)}function TX(e){return e instanceof jc||(e=Mo(e)),e?(e=e.rgb(),new Or(e.r,e.g,e.b,e.opacity)):new Or}function h2(e,r,n,a){return arguments.length===1?TX(e):new Or(e,r,n,a??1)}function Or(e,r,n,a){this.r=+e,this.g=+r,this.b=+n,this.opacity=+a}BS(Or,h2,gL(jc,{brighter(e){return e=e==null?oh:Math.pow(oh,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Or(Co(this.r),Co(this.g),Co(this.b),lh(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:k5,formatHex:k5,formatHex8:NX,formatRgb:A5,toString:A5}));function k5(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}`}function NX(){return`#${Eo(this.r)}${Eo(this.g)}${Eo(this.b)}${Eo((isNaN(this.opacity)?1:this.opacity)*255)}`}function A5(){const e=lh(this.opacity);return`${e===1?"rgb(":"rgba("}${Co(this.r)}, ${Co(this.g)}, ${Co(this.b)}${e===1?")":`, ${e})`}`}function lh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Co(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Eo(e){return e=Co(e),(e<16?"0":"")+e.toString(16)}function j5(e,r,n,a){return a<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new On(e,r,n,a)}function yL(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof jc||(e=Mo(e)),!e)return new On;if(e instanceof On)return e;e=e.rgb();var r=e.r/255,n=e.g/255,a=e.b/255,i=Math.min(r,n,a),o=Math.max(r,n,a),s=NaN,c=o-i,f=(o+i)/2;return c?(r===o?s=(n-a)/c+(n<a)*6:n===o?s=(a-r)/c+2:s=(r-n)/c+4,c/=f<.5?o+i:2-o-i,s*=60):c=f>0&&f<1?0:s,new On(s,c,f,e.opacity)}function MX(e,r,n,a){return arguments.length===1?yL(e):new On(e,r,n,a??1)}function On(e,r,n,a){this.h=+e,this.s=+r,this.l=+n,this.opacity=+a}BS(On,MX,gL(jc,{brighter(e){return e=e==null?oh:Math.pow(oh,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new On(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*r,i=2*n-a;return new Or(Jg(e>=240?e-240:e+120,i,a),Jg(e,i,a),Jg(e<120?e+240:e-120,i,a),this.opacity)},clamp(){return new On(C5(this.h),Ed(this.s),Ed(this.l),lh(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=lh(this.opacity);return`${e===1?"hsl(":"hsla("}${C5(this.h)}, ${Ed(this.s)*100}%, ${Ed(this.l)*100}%${e===1?")":`, ${e})`}`}}));function C5(e){return e=(e||0)%360,e<0?e+360:e}function Ed(e){return Math.max(0,Math.min(1,e||0))}function Jg(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}const $S=e=>()=>e;function PX(e,r){return function(n){return e+n*r}}function RX(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(a){return Math.pow(e+a*r,n)}}function DX(e){return(e=+e)==1?bL:function(r,n){return n-r?RX(r,n,e):$S(isNaN(r)?n:r)}}function bL(e,r){var n=r-e;return n?PX(e,n):$S(isNaN(e)?r:e)}const sh=(function e(r){var n=DX(r);function a(i,o){var s=n((i=h2(i)).r,(o=h2(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),d=bL(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=c(h),i.b=f(h),i.opacity=d(h),i+""}}return a.gamma=e,a})(1);function LX(e,r){r||(r=[]);var n=e?Math.min(r.length,e.length):0,a=r.slice(),i;return function(o){for(i=0;i<n;++i)a[i]=e[i]*(1-o)+r[i]*o;return a}}function IX(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zX(e,r){var n=r?r.length:0,a=e?Math.min(n,e.length):0,i=new Array(a),o=new Array(n),s;for(s=0;s<a;++s)i[s]=ss(e[s],r[s]);for(;s<n;++s)o[s]=r[s];return function(c){for(s=0;s<a;++s)o[s]=i[s](c);return o}}function qX(e,r){var n=new Date;return e=+e,r=+r,function(a){return n.setTime(e*(1-a)+r*a),n}}function Cn(e,r){return e=+e,r=+r,function(n){return e*(1-n)+r*n}}function BX(e,r){var n={},a={},i;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in e?n[i]=ss(e[i],r[i]):a[i]=r[i];return function(o){for(i in n)a[i]=n[i](o);return a}}var p2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ey=new RegExp(p2.source,"g");function $X(e){return function(){return e}}function FX(e){return function(r){return e(r)+""}}function xL(e,r){var n=p2.lastIndex=ey.lastIndex=0,a,i,o,s=-1,c=[],f=[];for(e=e+"",r=r+"";(a=p2.exec(e))&&(i=ey.exec(r));)(o=i.index)>n&&(o=r.slice(n,o),c[s]?c[s]+=o:c[++s]=o),(a=a[0])===(i=i[0])?c[s]?c[s]+=i:c[++s]=i:(c[++s]=null,f.push({i:s,x:Cn(a,i)})),n=ey.lastIndex;return n<r.length&&(o=r.slice(n),c[s]?c[s]+=o:c[++s]=o),c.length<2?f[0]?FX(f[0].x):$X(r):(r=f.length,function(d){for(var h=0,m;h<r;++h)c[(m=f[h]).i]=m.x(d);return c.join("")})}function ss(e,r){var n=typeof r,a;return r==null||n==="boolean"?$S(r):(n==="number"?Cn:n==="string"?(a=Mo(r))?(r=a,sh):xL:r instanceof Mo?sh:r instanceof Date?qX:IX(r)?LX:Array.isArray(r)?zX:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?BX:Cn)(e,r)}function FS(e,r){return e=+e,r=+r,function(n){return Math.round(e*(1-n)+r*n)}}var O5=180/Math.PI,m2={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _L(e,r,n,a,i,o){var s,c,f;return(s=Math.sqrt(e*e+r*r))&&(e/=s,r/=s),(f=e*n+r*a)&&(n-=e*f,a-=r*f),(c=Math.sqrt(n*n+a*a))&&(n/=c,a/=c,f/=c),e*a<r*n&&(e=-e,r=-r,f=-f,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(r,e)*O5,skewX:Math.atan(f)*O5,scaleX:s,scaleY:c}}var kd;function UX(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?m2:_L(r.a,r.b,r.c,r.d,r.e,r.f)}function HX(e){return e==null||(kd||(kd=document.createElementNS("http://www.w3.org/2000/svg","g")),kd.setAttribute("transform",e),!(e=kd.transform.baseVal.consolidate()))?m2:(e=e.matrix,_L(e.a,e.b,e.c,e.d,e.e,e.f))}function wL(e,r,n,a){function i(d){return d.length?d.pop()+" ":""}function o(d,h,m,g,y,_){if(d!==m||h!==g){var E=y.push("translate(",null,r,null,n);_.push({i:E-4,x:Cn(d,m)},{i:E-2,x:Cn(h,g)})}else(m||g)&&y.push("translate("+m+r+g+n)}function s(d,h,m,g){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),g.push({i:m.push(i(m)+"rotate(",null,a)-2,x:Cn(d,h)})):h&&m.push(i(m)+"rotate("+h+a)}function c(d,h,m,g){d!==h?g.push({i:m.push(i(m)+"skewX(",null,a)-2,x:Cn(d,h)}):h&&m.push(i(m)+"skewX("+h+a)}function f(d,h,m,g,y,_){if(d!==m||h!==g){var E=y.push(i(y)+"scale(",null,",",null,")");_.push({i:E-4,x:Cn(d,m)},{i:E-2,x:Cn(h,g)})}else(m!==1||g!==1)&&y.push(i(y)+"scale("+m+","+g+")")}return function(d,h){var m=[],g=[];return d=e(d),h=e(h),o(d.translateX,d.translateY,h.translateX,h.translateY,m,g),s(d.rotate,h.rotate,m,g),c(d.skewX,h.skewX,m,g),f(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,g),d=h=null,function(y){for(var _=-1,E=g.length,w;++_<E;)m[(w=g[_]).i]=w.x(y);return m.join("")}}}var GX=wL(UX,"px, ","px)","deg)"),VX=wL(HX,", ",")",")"),KX=1e-12;function T5(e){return((e=Math.exp(e))+1/e)/2}function YX(e){return((e=Math.exp(e))-1/e)/2}function XX(e){return((e=Math.exp(2*e))-1)/(e+1)}const WX=(function e(r,n,a){function i(o,s){var c=o[0],f=o[1],d=o[2],h=s[0],m=s[1],g=s[2],y=h-c,_=m-f,E=y*y+_*_,w,x;if(E<KX)x=Math.log(g/d)/r,w=function(M){return[c+M*y,f+M*_,d*Math.exp(r*M*x)]};else{var j=Math.sqrt(E),C=(g*g-d*d+a*E)/(2*d*n*j),T=(g*g-d*d-a*E)/(2*g*n*j),O=Math.log(Math.sqrt(C*C+1)-C),N=Math.log(Math.sqrt(T*T+1)-T);x=(N-O)/r,w=function(M){var R=M*x,L=T5(O),D=d/(n*j)*(L*XX(r*R+O)-YX(O));return[c+D*y,f+D*_,d*L/T5(r*R+O)]}}return w.duration=x*1e3*r/Math.SQRT2,w}return i.rho=function(o){var s=Math.max(.001,+o),c=s*s,f=c*c;return e(s,c,f)},i})(Math.SQRT2,2,4);function ZX(e,r){r===void 0&&(r=e,e=ss);for(var n=0,a=r.length-1,i=r[0],o=new Array(a<0?0:a);n<a;)o[n]=e(i,i=r[++n]);return function(s){var c=Math.max(0,Math.min(a-1,Math.floor(s*=a)));return o[c](s-c)}}var Zl=0,Bu=0,xu=0,SL=1e3,uh,$u,ch=0,Po=0,xp=0,ac=typeof performance=="object"&&performance.now?performance:Date,EL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function US(){return Po||(EL(QX),Po=ac.now()+xp)}function QX(){Po=0}function fh(){this._call=this._time=this._next=null}fh.prototype=HS.prototype={constructor:fh,restart:function(e,r,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?US():+n)+(r==null?0:+r),!this._next&&$u!==this&&($u?$u._next=this:uh=this,$u=this),this._call=e,this._time=n,v2()},stop:function(){this._call&&(this._call=null,this._time=1/0,v2())}};function HS(e,r,n){var a=new fh;return a.restart(e,r,n),a}function JX(){US(),++Zl;for(var e=uh,r;e;)(r=Po-e._time)>=0&&e._call.call(void 0,r),e=e._next;--Zl}function N5(){Po=(ch=ac.now())+xp,Zl=Bu=0;try{JX()}finally{Zl=0,tW(),Po=0}}function eW(){var e=ac.now(),r=e-ch;r>SL&&(xp-=r,ch=e)}function tW(){for(var e,r=uh,n,a=1/0;r;)r._call?(a>r._time&&(a=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:uh=n);$u=e,v2(a)}function v2(e){if(!Zl){Bu&&(Bu=clearTimeout(Bu));var r=e-Po;r>24?(e<1/0&&(Bu=setTimeout(N5,e-ac.now()-xp)),xu&&(xu=clearInterval(xu))):(xu||(ch=ac.now(),xu=setInterval(eW,SL)),Zl=1,EL(N5))}}function M5(e,r,n){var a=new fh;return r=r==null?0:+r,a.restart(i=>{a.stop(),e(i+r)},r,n),a}var rW=Ac("start","end","cancel","interrupt"),nW=[],kL=0,P5=1,g2=2,Yd=3,R5=4,y2=5,Xd=6;function _p(e,r,n,a,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;aW(e,n,{name:r,index:a,group:i,on:rW,tween:nW,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:kL})}function GS(e,r){var n=Ln(e,r);if(n.state>kL)throw new Error("too late; already scheduled");return n}function ua(e,r){var n=Ln(e,r);if(n.state>Yd)throw new Error("too late; already running");return n}function Ln(e,r){var n=e.__transition;if(!n||!(n=n[r]))throw new Error("transition not found");return n}function aW(e,r,n){var a=e.__transition,i;a[r]=n,n.timer=HS(o,0,n.time);function o(d){n.state=P5,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var h,m,g,y;if(n.state!==P5)return f();for(h in a)if(y=a[h],y.name===n.name){if(y.state===Yd)return M5(s);y.state===R5?(y.state=Xd,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[h]):+h<r&&(y.state=Xd,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[h])}if(M5(function(){n.state===Yd&&(n.state=R5,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=g2,n.on.call("start",e,e.__data__,n.index,n.group),n.state===g2){for(n.state=Yd,i=new Array(g=n.tween.length),h=0,m=-1;h<g;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++m]=y);i.length=m+1}}function c(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=y2,1),m=-1,g=i.length;++m<g;)i[m].call(e,h);n.state===y2&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Xd,n.timer.stop(),delete a[r];for(var d in a)return;delete e.__transition}}function Wd(e,r){var n=e.__transition,a,i,o=!0,s;if(n){r=r==null?null:r+"";for(s in n){if((a=n[s]).name!==r){o=!1;continue}i=a.state>g2&&a.state<y2,a.state=Xd,a.timer.stop(),a.on.call(i?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[s]}o&&delete e.__transition}}function iW(e){return this.each(function(){Wd(this,e)})}function oW(e,r){var n,a;return function(){var i=ua(this,e),o=i.tween;if(o!==n){a=n=o;for(var s=0,c=a.length;s<c;++s)if(a[s].name===r){a=a.slice(),a.splice(s,1);break}}i.tween=a}}function lW(e,r,n){var a,i;if(typeof n!="function")throw new Error;return function(){var o=ua(this,e),s=o.tween;if(s!==a){i=(a=s).slice();for(var c={name:r,value:n},f=0,d=i.length;f<d;++f)if(i[f].name===r){i[f]=c;break}f===d&&i.push(c)}o.tween=i}}function sW(e,r){var n=this._id;if(e+="",arguments.length<2){for(var a=Ln(this.node(),n).tween,i=0,o=a.length,s;i<o;++i)if((s=a[i]).name===e)return s.value;return null}return this.each((r==null?oW:lW)(n,e,r))}function VS(e,r,n){var a=e._id;return e.each(function(){var i=ua(this,a);(i.value||(i.value={}))[r]=n.apply(this,arguments)}),function(i){return Ln(i,a).value[r]}}function AL(e,r){var n;return(typeof r=="number"?Cn:r instanceof Mo?sh:(n=Mo(r))?(r=n,sh):xL)(e,r)}function uW(e){return function(){this.removeAttribute(e)}}function cW(e){return function(){this.removeAttributeNS(e.space,e.local)}}function fW(e,r,n){var a,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===a?o:o=r(a=s,n)}}function dW(e,r,n){var a,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===a?o:o=r(a=s,n)}}function hW(e,r,n){var a,i,o;return function(){var s,c=n(this),f;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=c+"",s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c)))}}function pW(e,r,n){var a,i,o;return function(){var s,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=c+"",s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c)))}}function mW(e,r){var n=bp(e),a=n==="transform"?VX:AL;return this.attrTween(e,typeof r=="function"?(n.local?pW:hW)(n,a,VS(this,"attr."+e,r)):r==null?(n.local?cW:uW)(n):(n.local?dW:fW)(n,a,r))}function vW(e,r){return function(n){this.setAttribute(e,r.call(this,n))}}function gW(e,r){return function(n){this.setAttributeNS(e.space,e.local,r.call(this,n))}}function yW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&gW(e,o)),n}return i._value=r,i}function bW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&vW(e,o)),n}return i._value=r,i}function xW(e,r){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(r==null)return this.tween(n,null);if(typeof r!="function")throw new Error;var a=bp(e);return this.tween(n,(a.local?yW:bW)(a,r))}function _W(e,r){return function(){GS(this,e).delay=+r.apply(this,arguments)}}function wW(e,r){return r=+r,function(){GS(this,e).delay=r}}function SW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?_W:wW)(r,e)):Ln(this.node(),r).delay}function EW(e,r){return function(){ua(this,e).duration=+r.apply(this,arguments)}}function kW(e,r){return r=+r,function(){ua(this,e).duration=r}}function AW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?EW:kW)(r,e)):Ln(this.node(),r).duration}function jW(e,r){if(typeof r!="function")throw new Error;return function(){ua(this,e).ease=r}}function CW(e){var r=this._id;return arguments.length?this.each(jW(r,e)):Ln(this.node(),r).ease}function OW(e,r){return function(){var n=r.apply(this,arguments);if(typeof n!="function")throw new Error;ua(this,e).ease=n}}function TW(e){if(typeof e!="function")throw new Error;return this.each(OW(this._id,e))}function NW(e){typeof e!="function"&&(e=iL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=[],f,d=0;d<s;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Va(a,this._parents,this._name,this._id)}function MW(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,n=e._groups,a=r.length,i=n.length,o=Math.min(a,i),s=new Array(a),c=0;c<o;++c)for(var f=r[c],d=n[c],h=f.length,m=s[c]=new Array(h),g,y=0;y<h;++y)(g=f[y]||d[y])&&(m[y]=g);for(;c<a;++c)s[c]=r[c];return new Va(s,this._parents,this._name,this._id)}function PW(e){return(e+"").trim().split(/^|\s+/).every(function(r){var n=r.indexOf(".");return n>=0&&(r=r.slice(0,n)),!r||r==="start"})}function RW(e,r,n){var a,i,o=PW(r)?GS:ua;return function(){var s=o(this,e),c=s.on;c!==a&&(i=(a=c).copy()).on(r,n),s.on=i}}function DW(e,r){var n=this._id;return arguments.length<2?Ln(this.node(),n).on.on(e):this.each(RW(n,e,r))}function LW(e){return function(){var r=this.parentNode;for(var n in this.__transition)if(+n!==e)return;r&&r.removeChild(this)}}function IW(){return this.on("end.remove",LW(this._id))}function zW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=zS(e));for(var a=this._groups,i=a.length,o=new Array(i),s=0;s<i;++s)for(var c=a[s],f=c.length,d=o[s]=new Array(f),h,m,g=0;g<f;++g)(h=c[g])&&(m=e.call(h,h.__data__,g,c))&&("__data__"in h&&(m.__data__=h.__data__),d[g]=m,_p(d[g],r,n,g,d,Ln(h,n)));return new Va(o,this._parents,r,n)}function qW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=aL(e));for(var a=this._groups,i=a.length,o=[],s=[],c=0;c<i;++c)for(var f=a[c],d=f.length,h,m=0;m<d;++m)if(h=f[m]){for(var g=e.call(h,h.__data__,m,f),y,_=Ln(h,n),E=0,w=g.length;E<w;++E)(y=g[E])&&_p(y,r,n,E,g,_);o.push(g),s.push(h)}return new Va(o,s,r,n)}var BW=kc.prototype.constructor;function $W(){return new BW(this._groups,this._parents)}function FW(e,r){var n,a,i;return function(){var o=Wl(this,e),s=(this.style.removeProperty(e),Wl(this,e));return o===s?null:o===n&&s===a?i:i=r(n=o,a=s)}}function jL(e){return function(){this.style.removeProperty(e)}}function UW(e,r,n){var a,i=n+"",o;return function(){var s=Wl(this,e);return s===i?null:s===a?o:o=r(a=s,n)}}function HW(e,r,n){var a,i,o;return function(){var s=Wl(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Wl(this,e))),s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c))}}function GW(e,r){var n,a,i,o="style."+r,s="end."+o,c;return function(){var f=ua(this,e),d=f.on,h=f.value[o]==null?c||(c=jL(r)):void 0;(d!==n||i!==h)&&(a=(n=d).copy()).on(s,i=h),f.on=a}}function VW(e,r,n){var a=(e+="")=="transform"?GX:AL;return r==null?this.styleTween(e,FW(e,a)).on("end.style."+e,jL(e)):typeof r=="function"?this.styleTween(e,HW(e,a,VS(this,"style."+e,r))).each(GW(this._id,e)):this.styleTween(e,UW(e,a,r),n).on("end.style."+e,null)}function KW(e,r,n){return function(a){this.style.setProperty(e,r.call(this,a),n)}}function YW(e,r,n){var a,i;function o(){var s=r.apply(this,arguments);return s!==i&&(a=(i=s)&&KW(e,s,n)),a}return o._value=r,o}function XW(e,r,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(r==null)return this.tween(a,null);if(typeof r!="function")throw new Error;return this.tween(a,YW(e,r,n??""))}function WW(e){return function(){this.textContent=e}}function ZW(e){return function(){var r=e(this);this.textContent=r??""}}function QW(e){return this.tween("text",typeof e=="function"?ZW(VS(this,"text",e)):WW(e==null?"":e+""))}function JW(e){return function(r){this.textContent=e.call(this,r)}}function eZ(e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&JW(i)),r}return a._value=e,a}function tZ(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,eZ(e))}function rZ(){for(var e=this._name,r=this._id,n=CL(),a=this._groups,i=a.length,o=0;o<i;++o)for(var s=a[o],c=s.length,f,d=0;d<c;++d)if(f=s[d]){var h=Ln(f,r);_p(f,e,n,d,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Va(a,this._parents,e,n)}function nZ(){var e,r,n=this,a=n._id,i=n.size();return new Promise(function(o,s){var c={value:s},f={value:function(){--i===0&&o()}};n.each(function(){var d=ua(this,a),h=d.on;h!==e&&(r=(e=h).copy(),r._.cancel.push(c),r._.interrupt.push(c),r._.end.push(f)),d.on=r}),i===0&&o()})}var aZ=0;function Va(e,r,n,a){this._groups=e,this._parents=r,this._name=n,this._id=a}function CL(){return++aZ}var Ma=kc.prototype;Va.prototype={constructor:Va,select:zW,selectAll:qW,selectChild:Ma.selectChild,selectChildren:Ma.selectChildren,filter:NW,merge:MW,selection:$W,transition:rZ,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:DW,attr:mW,attrTween:xW,style:VW,styleTween:XW,text:QW,textTween:tZ,remove:IW,tween:sW,delay:SW,duration:AW,ease:CW,easeVarying:TW,end:nZ,[Symbol.iterator]:Ma[Symbol.iterator]};function iZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oZ={time:null,delay:0,duration:250,ease:iZ};function lZ(e,r){for(var n;!(n=e.__transition)||!(n=n[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return n}function sZ(e){var r,n;e instanceof Va?(r=e._id,e=e._name):(r=CL(),(n=oZ).time=US(),e=e==null?null:e+"");for(var a=this._groups,i=a.length,o=0;o<i;++o)for(var s=a[o],c=s.length,f,d=0;d<c;++d)(f=s[d])&&_p(f,e,r,d,s,n||lZ(f,r));return new Va(a,this._parents,e,r)}kc.prototype.interrupt=iW;kc.prototype.transition=sZ;const Ad=e=>()=>e;function uZ(e,{sourceEvent:r,target:n,transform:a,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:i}})}function qa(e,r,n){this.k=e,this.x=r,this.y=n}qa.prototype={constructor:qa,scale:function(e){return e===1?this:new qa(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new qa(this.k,this.x+this.k*e,this.y+this.k*r)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var KS=new qa(1,0,0);Kn.prototype=qa.prototype;function Kn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return KS;return e.__zoom}function ty(e){e.stopImmediatePropagation()}function _u(e){e.preventDefault(),e.stopImmediatePropagation()}function cZ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function fZ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function D5(){return this.__zoom||KS}function dZ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function hZ(){return navigator.maxTouchPoints||"ontouchstart"in this}function pZ(e,r,n){var a=e.invertX(r[0][0])-n[0][0],i=e.invertX(r[1][0])-n[1][0],o=e.invertY(r[0][1])-n[0][1],s=e.invertY(r[1][1])-n[1][1];return e.translate(i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function mZ(){var e=cZ,r=fZ,n=pZ,a=dZ,i=hZ,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,f=WX,d=Ac("start","zoom","end"),h,m,g,y=500,_=150,E=0,w=10;function x(F){F.property("__zoom",D5).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",q).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(F,X,B,Q){var te=F.selection?F.selection():F;te.property("__zoom",D5),F!==te?O(F,X,B,Q):te.interrupt().each(function(){N(this,arguments).event(Q).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},x.scaleBy=function(F,X,B,Q){x.scaleTo(F,function(){var te=this.__zoom.k,K=typeof X=="function"?X.apply(this,arguments):X;return te*K},B,Q)},x.scaleTo=function(F,X,B,Q){x.transform(F,function(){var te=r.apply(this,arguments),K=this.__zoom,de=B==null?T(te):typeof B=="function"?B.apply(this,arguments):B,U=K.invert(de),J=typeof X=="function"?X.apply(this,arguments):X;return n(C(j(K,J),de,U),te,s)},B,Q)},x.translateBy=function(F,X,B,Q){x.transform(F,function(){return n(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof B=="function"?B.apply(this,arguments):B),r.apply(this,arguments),s)},null,Q)},x.translateTo=function(F,X,B,Q,te){x.transform(F,function(){var K=r.apply(this,arguments),de=this.__zoom,U=Q==null?T(K):typeof Q=="function"?Q.apply(this,arguments):Q;return n(KS.translate(U[0],U[1]).scale(de.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof B=="function"?-B.apply(this,arguments):-B),K,s)},Q,te)};function j(F,X){return X=Math.max(o[0],Math.min(o[1],X)),X===F.k?F:new qa(X,F.x,F.y)}function C(F,X,B){var Q=X[0]-B[0]*F.k,te=X[1]-B[1]*F.k;return Q===F.x&&te===F.y?F:new qa(F.k,Q,te)}function T(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function O(F,X,B,Q){F.on("start.zoom",function(){N(this,arguments).event(Q).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(Q).end()}).tween("zoom",function(){var te=this,K=arguments,de=N(te,K).event(Q),U=r.apply(te,K),J=B==null?T(U):typeof B=="function"?B.apply(te,K):B,le=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),$=te.__zoom,Y=typeof X=="function"?X.apply(te,K):X,G=f($.invert(J).concat(le/$.k),Y.invert(J).concat(le/Y.k));return function(he){if(he===1)he=Y;else{var xe=G(he),Z=le/xe[2];he=new qa(Z,J[0]-xe[0]*Z,J[1]-xe[1]*Z)}de.zoom(null,he)}})}function N(F,X,B){return!B&&F.__zooming||new M(F,X)}function M(F,X){this.that=F,this.args=X,this.active=0,this.sourceEvent=null,this.extent=r.apply(F,X),this.taps=0}M.prototype={event:function(F){return F&&(this.sourceEvent=F),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(F,X){return this.mouse&&F!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(F){var X=dn(this.that).datum();d.call(F,this.that,new uZ(F,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:d}),X)}};function R(F,...X){if(!e.apply(this,arguments))return;var B=N(this,X).event(F),Q=this.__zoom,te=Math.max(o[0],Math.min(o[1],Q.k*Math.pow(2,a.apply(this,arguments)))),K=Yn(F);if(B.wheel)(B.mouse[0][0]!==K[0]||B.mouse[0][1]!==K[1])&&(B.mouse[1]=Q.invert(B.mouse[0]=K)),clearTimeout(B.wheel);else{if(Q.k===te)return;B.mouse=[K,Q.invert(K)],Wd(this),B.start()}_u(F),B.wheel=setTimeout(de,_),B.zoom("mouse",n(C(j(Q,te),B.mouse[0],B.mouse[1]),B.extent,s));function de(){B.wheel=null,B.end()}}function L(F,...X){if(g||!e.apply(this,arguments))return;var B=F.currentTarget,Q=N(this,X,!0).event(F),te=dn(F.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",le,!0),K=Yn(F,B),de=F.clientX,U=F.clientY;mL(F.view),ty(F),Q.mouse=[K,this.__zoom.invert(K)],Wd(this),Q.start();function J($){if(_u($),!Q.moved){var Y=$.clientX-de,G=$.clientY-U;Q.moved=Y*Y+G*G>E}Q.event($).zoom("mouse",n(C(Q.that.__zoom,Q.mouse[0]=Yn($,B),Q.mouse[1]),Q.extent,s))}function le($){te.on("mousemove.zoom mouseup.zoom",null),vL($.view,Q.moved),_u($),Q.event($).end()}}function D(F,...X){if(e.apply(this,arguments)){var B=this.__zoom,Q=Yn(F.changedTouches?F.changedTouches[0]:F,this),te=B.invert(Q),K=B.k*(F.shiftKey?.5:2),de=n(C(j(B,K),Q,te),r.apply(this,X),s);_u(F),c>0?dn(this).transition().duration(c).call(O,de,Q,F):dn(this).call(x.transform,de,Q,F)}}function q(F,...X){if(e.apply(this,arguments)){var B=F.touches,Q=B.length,te=N(this,X,F.changedTouches.length===Q).event(F),K,de,U,J;for(ty(F),de=0;de<Q;++de)U=B[de],J=Yn(U,this),J=[J,this.__zoom.invert(J),U.identifier],te.touch0?!te.touch1&&te.touch0[2]!==J[2]&&(te.touch1=J,te.taps=0):(te.touch0=J,K=!0,te.taps=1+!!h);h&&(h=clearTimeout(h)),K&&(te.taps<2&&(m=J[0],h=setTimeout(function(){h=null},y)),Wd(this),te.start())}}function z(F,...X){if(this.__zooming){var B=N(this,X).event(F),Q=F.changedTouches,te=Q.length,K,de,U,J;for(_u(F),K=0;K<te;++K)de=Q[K],U=Yn(de,this),B.touch0&&B.touch0[2]===de.identifier?B.touch0[0]=U:B.touch1&&B.touch1[2]===de.identifier&&(B.touch1[0]=U);if(de=B.that.__zoom,B.touch1){var le=B.touch0[0],$=B.touch0[1],Y=B.touch1[0],G=B.touch1[1],he=(he=Y[0]-le[0])*he+(he=Y[1]-le[1])*he,xe=(xe=G[0]-$[0])*xe+(xe=G[1]-$[1])*xe;de=j(de,Math.sqrt(he/xe)),U=[(le[0]+Y[0])/2,(le[1]+Y[1])/2],J=[($[0]+G[0])/2,($[1]+G[1])/2]}else if(B.touch0)U=B.touch0[0],J=B.touch0[1];else return;B.zoom("touch",n(C(de,U,J),B.extent,s))}}function H(F,...X){if(this.__zooming){var B=N(this,X).event(F),Q=F.changedTouches,te=Q.length,K,de;for(ty(F),g&&clearTimeout(g),g=setTimeout(function(){g=null},y),K=0;K<te;++K)de=Q[K],B.touch0&&B.touch0[2]===de.identifier?delete B.touch0:B.touch1&&B.touch1[2]===de.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(de=Yn(de,this),Math.hypot(m[0]-de[0],m[1]-de[1])<w)){var U=dn(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return x.wheelDelta=function(F){return arguments.length?(a=typeof F=="function"?F:Ad(+F),x):a},x.filter=function(F){return arguments.length?(e=typeof F=="function"?F:Ad(!!F),x):e},x.touchable=function(F){return arguments.length?(i=typeof F=="function"?F:Ad(!!F),x):i},x.extent=function(F){return arguments.length?(r=typeof F=="function"?F:Ad([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),x):r},x.scaleExtent=function(F){return arguments.length?(o[0]=+F[0],o[1]=+F[1],x):[o[0],o[1]]},x.translateExtent=function(F){return arguments.length?(s[0][0]=+F[0][0],s[1][0]=+F[1][0],s[0][1]=+F[0][1],s[1][1]=+F[1][1],x):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},x.constrain=function(F){return arguments.length?(n=F,x):n},x.duration=function(F){return arguments.length?(c=+F,x):c},x.interpolate=function(F){return arguments.length?(f=F,x):f},x.on=function(){var F=d.on.apply(d,arguments);return F===d?x:F},x.clickDistance=function(F){return arguments.length?(E=(F=+F)*F,x):Math.sqrt(E)},x.tapDistance=function(F){return arguments.length?(w=+F,x):w},x}function $i(e,r){return e==null||r==null?NaN:e<r?-1:e>r?1:e>=r?0:NaN}function vZ(e,r){return e==null||r==null?NaN:r<e?-1:r>e?1:r>=e?0:NaN}function YS(e){let r,n,a;e.length!==2?(r=$i,n=(c,f)=>$i(e(c),f),a=(c,f)=>e(c)-f):(r=e===$i||e===vZ?e:gZ,n=e,a=e);function i(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<0?d=m+1:h=m}while(d<h)}return d}function o(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<=0?d=m+1:h=m}while(d<h)}return d}function s(c,f,d=0,h=c.length){const m=i(c,f,d,h-1);return m>d&&a(c[m-1],f)>-a(c[m],f)?m-1:m}return{left:i,center:s,right:o}}function gZ(){return 0}function OL(e){return e===null?NaN:+e}function*yZ(e,r){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const bZ=YS($i),Cc=bZ.right;YS(OL).center;class L5 extends Map{constructor(r,n=wZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),r!=null)for(const[a,i]of r)this.set(a,i)}get(r){return super.get(I5(this,r))}has(r){return super.has(I5(this,r))}set(r,n){return super.set(xZ(this,r),n)}delete(r){return super.delete(_Z(this,r))}}function I5({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):n}function xZ({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):(e.set(a,n),n)}function _Z({_intern:e,_key:r},n){const a=r(n);return e.has(a)&&(n=e.get(a),e.delete(a)),n}function wZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SZ(e=$i){if(e===$i)return TL;if(typeof e!="function")throw new TypeError("compare is not a function");return(r,n)=>{const a=e(r,n);return a||a===0?a:(e(n,n)===0)-(e(r,r)===0)}}function TL(e,r){return(e==null||!(e>=e))-(r==null||!(r>=r))||(e<r?-1:e>r?1:0)}const EZ=Math.sqrt(50),kZ=Math.sqrt(10),AZ=Math.sqrt(2);function dh(e,r,n){const a=(r-e)/Math.max(0,n),i=Math.floor(Math.log10(a)),o=a/Math.pow(10,i),s=o>=EZ?10:o>=kZ?5:o>=AZ?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/s,c=Math.round(e*d),f=Math.round(r*d),c/d<e&&++c,f/d>r&&--f,d=-d):(d=Math.pow(10,i)*s,c=Math.round(e/d),f=Math.round(r/d),c*d<e&&++c,f*d>r&&--f),f<c&&.5<=n&&n<2?dh(e,r,n*2):[c,f,d]}function b2(e,r,n){if(r=+r,e=+e,n=+n,!(n>0))return[];if(e===r)return[e];const a=r<e,[i,o,s]=a?dh(r,e,n):dh(e,r,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(a)if(s<0)for(let d=0;d<c;++d)f[d]=(o-d)/-s;else for(let d=0;d<c;++d)f[d]=(o-d)*s;else if(s<0)for(let d=0;d<c;++d)f[d]=(i+d)/-s;else for(let d=0;d<c;++d)f[d]=(i+d)*s;return f}function x2(e,r,n){return r=+r,e=+e,n=+n,dh(e,r,n)[2]}function _2(e,r,n){r=+r,e=+e,n=+n;const a=r<e,i=a?x2(r,e,n):x2(e,r,n);return(a?-1:1)*(i<0?1/-i:i)}function hh(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n<a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function ph(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n>a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function NL(e,r,n=0,a=1/0,i){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),a=Math.floor(Math.min(e.length-1,a)),!(n<=r&&r<=a))return e;for(i=i===void 0?TL:SZ(i);a>n;){if(a-n>600){const f=a-n+1,d=r-n+1,h=Math.log(f),m=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*m*(f-m)/f)*(d-f/2<0?-1:1),y=Math.max(n,Math.floor(r-d*m/f+g)),_=Math.min(a,Math.floor(r+(f-d)*m/f+g));NL(e,r,y,_,i)}const o=e[r];let s=n,c=a;for(wu(e,n,r),i(e[a],o)>0&&wu(e,n,a);s<c;){for(wu(e,s,c),++s,--c;i(e[s],o)<0;)++s;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?wu(e,n,c):(++c,wu(e,c,a)),c<=r&&(n=c+1),r<=c&&(a=c-1)}return e}function wu(e,r,n){const a=e[r];e[r]=e[n],e[n]=a}function jZ(e,r,n){if(e=Float64Array.from(yZ(e)),!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return ph(e);if(r>=1)return hh(e);var a,i=(a-1)*r,o=Math.floor(i),s=hh(NL(e,o).subarray(0,o+1)),c=ph(e.subarray(o+1));return s+(c-s)*(i-o)}}function CZ(e,r,n=OL){if(!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return+n(e[0],0,e);if(r>=1)return+n(e[a-1],a-1,e);var a,i=(a-1)*r,o=Math.floor(i),s=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return s+(c-s)*(i-o)}}function OZ(e,r,n){e=+e,r=+r,n=(i=arguments.length)<2?(r=e,e=0,1):i<3?1:+n;for(var a=-1,i=Math.max(0,Math.ceil((r-e)/n))|0,o=new Array(i);++a<i;)o[a]=e+a*n;return o}function TZ(e,r){let n=0;for(let a of e)(a=+a)&&(n+=a);return n}var NZ=typeof global=="object"&&global&&global.Object===Object&&global,MZ=typeof self=="object"&&self&&self.Object===Object&&self,ML=NZ||MZ||Function("return this")(),mh=ML.Symbol,PL=Object.prototype,PZ=PL.hasOwnProperty,RZ=PL.toString,Su=mh?mh.toStringTag:void 0;function DZ(e){var r=PZ.call(e,Su),n=e[Su];try{e[Su]=void 0;var a=!0}catch{}var i=RZ.call(e);return a&&(r?e[Su]=n:delete e[Su]),i}var LZ=Object.prototype,IZ=LZ.toString;function zZ(e){return IZ.call(e)}var qZ="[object Null]",BZ="[object Undefined]",z5=mh?mh.toStringTag:void 0;function $Z(e){return e==null?e===void 0?BZ:qZ:z5&&z5 in Object(e)?DZ(e):zZ(e)}function FZ(e){return e!=null&&typeof e=="object"}var UZ="[object Symbol]";function HZ(e){return typeof e=="symbol"||FZ(e)&&$Z(e)==UZ}var GZ=/\s/;function VZ(e){for(var r=e.length;r--&&GZ.test(e.charAt(r)););return r}var KZ=/^\s+/;function YZ(e){return e&&e.slice(0,VZ(e)+1).replace(KZ,"")}function vh(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var q5=NaN,XZ=/^[-+]0x[0-9a-f]+$/i,WZ=/^0b[01]+$/i,ZZ=/^0o[0-7]+$/i,QZ=parseInt;function B5(e){if(typeof e=="number")return e;if(HZ(e))return q5;if(vh(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=vh(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=YZ(e);var n=WZ.test(e);return n||ZZ.test(e)?QZ(e.slice(2),n?2:8):XZ.test(e)?q5:+e}var ry=function(){return ML.Date.now()},JZ="Expected a function",eQ=Math.max,tQ=Math.min;function RL(e,r,n){var a,i,o,s,c,f,d=0,h=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(JZ);r=B5(r)||0,vh(n)&&(h=!!n.leading,m="maxWait"in n,o=m?eQ(B5(n.maxWait)||0,r):o,g="trailing"in n?!!n.trailing:g);function y(N){var M=a,R=i;return a=i=void 0,d=N,s=e.apply(R,M),s}function _(N){return d=N,c=setTimeout(x,r),h?y(N):s}function E(N){var M=N-f,R=N-d,L=r-M;return m?tQ(L,o-R):L}function w(N){var M=N-f,R=N-d;return f===void 0||M>=r||M<0||m&&R>=o}function x(){var N=ry();if(w(N))return j(N);c=setTimeout(x,E(N))}function j(N){return c=void 0,g&&a?y(N):(a=i=void 0,s)}function C(){c!==void 0&&clearTimeout(c),d=0,a=f=i=c=void 0}function T(){return c===void 0?s:j(ry())}function O(){var N=ry(),M=w(N);if(a=arguments,i=this,f=N,M){if(c===void 0)return _(f);if(m)return clearTimeout(c),c=setTimeout(x,r),y(f)}return c===void 0&&(c=setTimeout(x,r)),s}return O.cancel=C,O.flush=T,O}var rQ="Expected a function";function nQ(e,r,n){var a=!0,i=!0;if(typeof e!="function")throw new TypeError(rQ);return vh(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),RL(e,r,{leading:a,maxWait:r,trailing:i})}var Oo=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1},InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-Oo.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?Oo.Bounce.In(e*2)*.5:Oo.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),Fu=function(){return performance.now()},DL=(function(){function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(n){return r._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];for(var i=0,o=n;i<o.length;i++){var s=o[i];(r=s._group)===null||r===void 0||r.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,i=r;a<i.length;a++){var o=i[a];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,n){r===void 0&&(r=Fu()),n===void 0&&(n=!0);var a=Object.keys(this._tweens);if(a.length!==0)for(;a.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<a.length;i++){var o=this._tweens[a[i]],s=!n;o&&o.update(r,s)===!1&&!n&&this.remove(o)}a=Object.keys(this._tweensAddedDuringUpdate)}},e})(),w2={Linear:function(e,r){var n=e.length-1,a=n*r,i=Math.floor(a),o=w2.Utils.Linear;return r<0?o(e[0],e[1],a):r>1?o(e[n],e[n-1],n-a):o(e[i],e[i+1>n?n:i+1],a-i)},Utils:{Linear:function(e,r,n){return(r-e)*n+e}}},LL=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),S2=new DL,$5=(function(){function e(r,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Oo.Linear.None,this._interpolationFunction=w2.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=LL.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=S2,S2.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(r,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=r,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,n){if(r===void 0&&(r=Fu()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var a in this._valuesStartRepeat)this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=r,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var o in this._valuesEnd)i[o]=this._valuesEnd[o];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,n,a,i,o){for(var s in a){var c=r[s],f=Array.isArray(c),d=f?"array":typeof c,h=!f&&Array.isArray(a[s]);if(!(d==="undefined"||d==="function")){if(h){var m=a[s];if(m.length===0)continue;for(var g=[c],y=0,_=m.length;y<_;y+=1){var E=this._handleRelativeValue(c,m[y]);if(isNaN(E)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}g.push(E)}h&&(a[s]=g)}if((d==="object"||f)&&c&&!h){n[s]=f?[]:{};var w=c;for(var x in w)n[s][x]=w[x];i[s]=f?[]:{};var m=a[s];if(!this._isDynamic){var j={};for(var x in m)j[x]=m[x];a[s]=m=j}this._setupProperties(w,n[s],m,i[s],o)}else(typeof n[s]>"u"||o)&&(n[s]=c),f||(n[s]*=1),h?i[s]=a[s].slice().reverse():i[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(r){return r===void 0&&(r=Fu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=Fu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,n=this._chainedTweens.length;r<n;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=Oo.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=w2.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,n){var a=this,i;if(r===void 0&&(r=Fu()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=r-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(a._duration===0||s>f)return 1;var E=Math.trunc(s/c),w=s-E*c,x=Math.min(w/a._duration,1);return x===0&&s===a._duration?1:x},h=d(),m=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,m),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var g=Math.min(Math.trunc((s-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=g);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*g,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,_=this._chainedTweens.length;y<_;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,n,a,i){for(var o in a)if(n[o]!==void 0){var s=n[o]||0,c=a[o],f=Array.isArray(r[o]),d=Array.isArray(c),h=!f&&d;h?r[o]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(r[o],s,c,i):(c=this._handleRelativeValue(s,c),typeof c=="number"&&(r[o]=s+(c-s)*i))}},e.prototype._handleRelativeValue=function(r,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?r+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(r){var n=this._valuesStartRepeat[r],a=this._valuesEnd[r];typeof a=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(a):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=n},e.autoStartOnUpdate=!1,e})();LL.nextId;var aa=S2;aa.getAll.bind(aa);aa.removeAll.bind(aa);aa.add.bind(aa);aa.remove.bind(aa);aa.update.bind(aa);function F5(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function aQ(e){if(Array.isArray(e))return e}function iQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function oQ(e,r,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function lQ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function sQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uQ(e,r){return aQ(e)||lQ(e,r)||cQ(e,r)||sQ()}function cQ(e,r){if(e){if(typeof e=="string")return F5(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F5(e,r):void 0}}var fQ=oQ(function e(r,n){var a=n.default,i=a===void 0?null:a,o=n.triggerUpdate,s=o===void 0?!0:o,c=n.onChange,f=c===void 0?function(d,h){}:c;iQ(this,e),this.name=r,this.defaultVal=i,this.triggerUpdate=s,this.onChange=f});function XS(e){var r=e.stateInit,n=r===void 0?function(){return{}}:r,a=e.props,i=a===void 0?{}:a,o=e.methods,s=o===void 0?{}:o,c=e.aliases,f=c===void 0?{}:c,d=e.init,h=d===void 0?function(){}:d,m=e.update,g=m===void 0?function(){}:m,y=Object.keys(i).map(function(_){return new fQ(_,i[_])});return function _(){for(var E=arguments.length,w=new Array(E),x=0;x<E;x++)w[x]=arguments[x];var j=!!(this instanceof _&&this.constructor),C=j?w.shift():void 0,T=w[0],O=T===void 0?{}:T,N=Object.assign({},n instanceof Function?n(O):n,{initialised:!1}),M={};function R(q){return L(q,O),D(),R}var L=function(z,H){h.call(R,z,N,H),N.initialised=!0},D=RL(function(){N.initialised&&(g.call(R,N,M),M={})},1);return y.forEach(function(q){R[q.name]=z(q);function z(H){var F=H.name,X=H.triggerUpdate,B=X===void 0?!1:X,Q=H.onChange,te=Q===void 0?function(U,J){}:Q,K=H.defaultVal,de=K===void 0?null:K;return function(U){var J=N[F];if(!arguments.length)return J;var le=U===void 0?de:U;return N[F]=le,te.call(R,le,N,J),!M.hasOwnProperty(F)&&(M[F]=J),B&&D(),R}}}),Object.keys(s).forEach(function(q){R[q]=function(){for(var z,H=arguments.length,F=new Array(H),X=0;X<H;X++)F[X]=arguments[X];return(z=s[q]).call.apply(z,[R,N].concat(F))}}),Object.entries(f).forEach(function(q){var z=uQ(q,2),H=z[0],F=z[1];return R[H]=R[F]}),R.resetProps=function(){return y.forEach(function(q){R[q.name](q.defaultVal)}),R},R.resetProps(),N._rerender=D,j&&C&&R(C),R}}var Ve=(function(e){return typeof e=="function"?e:typeof e=="string"?function(r){return r[e]}:function(r){return e}});function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gh(e)}var dQ=/^\s+/,hQ=/\s+$/;function Oe(e,r){if(e=e||"",r=r||{},e instanceof Oe)return e;if(!(this instanceof Oe))return new Oe(e,r);var n=pQ(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Oe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,a,i,o,s,c;return n=r.r/255,a=r.g/255,i=r.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),i<=.03928?c=i/12.92:c=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*c},setAlpha:function(r){return this._a=IL(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=H5(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=H5(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+a+"%, "+i+"%)":"hsva("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var r=U5(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=U5(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+a+"%, "+i+"%)":"hsla("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(r){return G5(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return yQ(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ft(this._r,255)*100)+"%",g:Math.round(ft(this._g,255)*100)+"%",b:Math.round(ft(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%)":"rgba("+Math.round(ft(this._r,255)*100)+"%, "+Math.round(ft(this._g,255)*100)+"%, "+Math.round(ft(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:TQ[G5(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+V5(this._r,this._g,this._b,this._a),a=n,i=this._gradientType?"GradientType = 1, ":"";if(r){var o=Oe(r);a="#"+V5(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+a+")"},toString:function(r){var n=!!r;r=r||this._format;var a=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return o?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(a=this.toRgbString()),r==="prgb"&&(a=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(a=this.toHexString()),r==="hex3"&&(a=this.toHexString(!0)),r==="hex4"&&(a=this.toHex8String(!0)),r==="hex8"&&(a=this.toHex8String()),r==="name"&&(a=this.toName()),r==="hsl"&&(a=this.toHslString()),r==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return Oe(this.toString())},_applyModification:function(r,n){var a=r.apply(null,[this].concat([].slice.call(n)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(wQ,arguments)},brighten:function(){return this._applyModification(SQ,arguments)},darken:function(){return this._applyModification(EQ,arguments)},desaturate:function(){return this._applyModification(bQ,arguments)},saturate:function(){return this._applyModification(xQ,arguments)},greyscale:function(){return this._applyModification(_Q,arguments)},spin:function(){return this._applyModification(kQ,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(CQ,arguments)},complement:function(){return this._applyCombination(AQ,arguments)},monochromatic:function(){return this._applyCombination(OQ,arguments)},splitcomplement:function(){return this._applyCombination(jQ,arguments)},triad:function(){return this._applyCombination(K5,[3])},tetrad:function(){return this._applyCombination(K5,[4])}};Oe.fromRatio=function(e,r){if(gh(e)=="object"){var n={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?n[a]=e[a]:n[a]=Uu(e[a]));e=n}return Oe(e,r)};function pQ(e){var r={r:0,g:0,b:0},n=1,a=null,i=null,o=null,s=!1,c=!1;return typeof e=="string"&&(e=RQ(e)),gh(e)=="object"&&(Pa(e.r)&&Pa(e.g)&&Pa(e.b)?(r=mQ(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Pa(e.h)&&Pa(e.s)&&Pa(e.v)?(a=Uu(e.s),i=Uu(e.v),r=gQ(e.h,a,i),s=!0,c="hsv"):Pa(e.h)&&Pa(e.s)&&Pa(e.l)&&(a=Uu(e.s),o=Uu(e.l),r=vQ(e.h,a,o),s=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=IL(n),{ok:s,format:e.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function mQ(e,r,n){return{r:ft(e,255)*255,g:ft(r,255)*255,b:ft(n,255)*255}}function U5(e,r,n){e=ft(e,255),r=ft(r,255),n=ft(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,s,c=(a+i)/2;if(a==i)o=s=0;else{var f=a-i;switch(s=c>.5?f/(2-a-i):f/(a+i),a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s,l:c}}function vQ(e,r,n){var a,i,o;e=ft(e,360),r=ft(r,100),n=ft(n,100);function s(d,h,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?d+(h-d)*6*m:m<1/2?h:m<2/3?d+(h-d)*(2/3-m)*6:d}if(r===0)a=i=o=n;else{var c=n<.5?n*(1+r):n+r-n*r,f=2*n-c;a=s(f,c,e+1/3),i=s(f,c,e),o=s(f,c,e-1/3)}return{r:a*255,g:i*255,b:o*255}}function H5(e,r,n){e=ft(e,255),r=ft(r,255),n=ft(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,s,c=a,f=a-i;if(s=a===0?0:f/a,a==i)o=0;else{switch(a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s,v:c}}function gQ(e,r,n){e=ft(e,360)*6,r=ft(r,100),n=ft(n,100);var a=Math.floor(e),i=e-a,o=n*(1-r),s=n*(1-i*r),c=n*(1-(1-i)*r),f=a%6,d=[n,s,o,o,c,n][f],h=[c,n,n,s,o,o][f],m=[o,o,c,n,n,s][f];return{r:d*255,g:h*255,b:m*255}}function G5(e,r,n,a){var i=[Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function yQ(e,r,n,a,i){var o=[Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16)),Mn(zL(a))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function V5(e,r,n,a){var i=[Mn(zL(a)),Mn(Math.round(e).toString(16)),Mn(Math.round(r).toString(16)),Mn(Math.round(n).toString(16))];return i.join("")}Oe.equals=function(e,r){return!e||!r?!1:Oe(e).toRgbString()==Oe(r).toRgbString()};Oe.random=function(){return Oe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function bQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.s-=r/100,n.s=wp(n.s),Oe(n)}function xQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.s+=r/100,n.s=wp(n.s),Oe(n)}function _Q(e){return Oe(e).desaturate(100)}function wQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.l+=r/100,n.l=wp(n.l),Oe(n)}function SQ(e,r){r=r===0?0:r||10;var n=Oe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),Oe(n)}function EQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.l-=r/100,n.l=wp(n.l),Oe(n)}function kQ(e,r){var n=Oe(e).toHsl(),a=(n.h+r)%360;return n.h=a<0?360+a:a,Oe(n)}function AQ(e){var r=Oe(e).toHsl();return r.h=(r.h+180)%360,Oe(r)}function K5(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Oe(e).toHsl(),a=[Oe(e)],i=360/r,o=1;o<r;o++)a.push(Oe({h:(n.h+o*i)%360,s:n.s,l:n.l}));return a}function jQ(e){var r=Oe(e).toHsl(),n=r.h;return[Oe(e),Oe({h:(n+72)%360,s:r.s,l:r.l}),Oe({h:(n+216)%360,s:r.s,l:r.l})]}function CQ(e,r,n){r=r||6,n=n||30;var a=Oe(e).toHsl(),i=360/n,o=[Oe(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(Oe(a));return o}function OQ(e,r){r=r||6;for(var n=Oe(e).toHsv(),a=n.h,i=n.s,o=n.v,s=[],c=1/r;r--;)s.push(Oe({h:a,s:i,v:o})),o=(o+c)%1;return s}Oe.mix=function(e,r,n){n=n===0?0:n||50;var a=Oe(e).toRgb(),i=Oe(r).toRgb(),o=n/100,s={r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a};return Oe(s)};Oe.readability=function(e,r){var n=Oe(e),a=Oe(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)};Oe.isReadable=function(e,r,n){var a=Oe.readability(e,r),i,o;switch(o=!1,i=DQ(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7;break}return o};Oe.mostReadable=function(e,r,n){var a=null,i=0,o,s,c,f;n=n||{},s=n.includeFallbackColors,c=n.level,f=n.size;for(var d=0;d<r.length;d++)o=Oe.readability(e,r[d]),o>i&&(i=o,a=Oe(r[d]));return Oe.isReadable(e,a,{level:c,size:f})||!s?a:(n.includeFallbackColors=!1,Oe.mostReadable(e,["#fff","#000"],n))};var E2=Oe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},TQ=Oe.hexNames=NQ(E2);function NQ(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[e[n]]=n);return r}function IL(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ft(e,r){MQ(e)&&(e="100%");var n=PQ(e);return e=Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function wp(e){return Math.min(1,Math.max(0,e))}function $r(e){return parseInt(e,16)}function MQ(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function PQ(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Mn(e){return e.length==1?"0"+e:""+e}function Uu(e){return e<=1&&(e=e*100+"%"),e}function zL(e){return Math.round(parseFloat(e)*255).toString(16)}function Y5(e){return $r(e)/255}var jn=(function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+e+")",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Pa(e){return!!jn.CSS_UNIT.exec(e)}function RQ(e){e=e.replace(dQ,"").replace(hQ,"").toLowerCase();var r=!1;if(E2[e])e=E2[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=jn.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=jn.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=jn.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=jn.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=jn.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=jn.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=jn.hex8.exec(e))?{r:$r(n[1]),g:$r(n[2]),b:$r(n[3]),a:Y5(n[4]),format:r?"name":"hex8"}:(n=jn.hex6.exec(e))?{r:$r(n[1]),g:$r(n[2]),b:$r(n[3]),format:r?"name":"hex"}:(n=jn.hex4.exec(e))?{r:$r(n[1]+""+n[1]),g:$r(n[2]+""+n[2]),b:$r(n[3]+""+n[3]),a:Y5(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=jn.hex3.exec(e))?{r:$r(n[1]+""+n[1]),g:$r(n[2]+""+n[2]),b:$r(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function DQ(e){var r,n;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function k2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function LQ(e){if(Array.isArray(e))return k2(e)}function qL(e,r,n){if(typeof e=="function"?e===r:e.has(r))return arguments.length<3?r:n;throw new TypeError("Private element is not present on this object")}function IQ(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function on(e,r){return e.get(qL(e,r))}function X5(e,r,n){IQ(e,r),r.set(e,n)}function W5(e,r,n){return e.set(qL(e,r),n),n}function qQ(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,GQ(a.key),a)}}function BQ(e,r,n){return r&&qQ(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Q(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UQ(e){return LQ(e)||$Q(e)||VQ(e)||FQ()}function HQ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GQ(e){var r=HQ(e,"string");return typeof r=="symbol"?r:r+""}function VQ(e,r){if(e){if(typeof e=="string")return k2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k2(e,r):void 0}}var KQ=123,YQ=function(r){return"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0"))},BL=function(r,n,a){return(r<<16)+(n<<8)+a},XQ=function(r){var n=Oe(r).toRgb(),a=n.r,i=n.g,o=n.b;return BL(a,i,o)},Z5=function(r,n){return r*KQ%Math.pow(2,n)},po=new WeakMap,Ra=new WeakMap,WQ=(function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;zQ(this,e),X5(this,po,void 0),X5(this,Ra,void 0),W5(Ra,this,r),this.reset()}return BQ(e,[{key:"reset",value:function(){W5(po,this,["__reserved for background__"])}},{key:"register",value:function(n){if(on(po,this).length>=Math.pow(2,24-on(Ra,this)))return null;var a=on(po,this).length,i=Z5(a,on(Ra,this)),o=YQ(a+(i<<24-on(Ra,this)));return on(po,this).push(n),o}},{key:"lookup",value:function(n){if(!n)return null;var a=typeof n=="string"?XQ(n):BL.apply(void 0,UQ(n));if(!a)return null;var i=a&Math.pow(2,24-on(Ra,this))-1,o=a>>24-on(Ra,this)&Math.pow(2,on(Ra,this))-1;return Z5(i,on(Ra,this))!==o||i>=on(po,this).length?null:on(po,this)[i]}}])})(),Oc,dt,$L,FL,Li,Q5,UL,HL,GL,WS,A2,j2,yh={},bh=[],ZQ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Sp=Array.isArray;function Zn(e,r){for(var n in r)e[n]=r[n];return e}function ZS(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function QQ(e,r,n){var a,i,o,s={};for(o in r)o=="key"?a=r[o]:o=="ref"?i=r[o]:s[o]=r[o];if(arguments.length>2&&(s.children=arguments.length>3?Oc.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Wu(e,s,a,i,null)}function Wu(e,r,n,a,i){var o={type:e,props:r,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++$L,__i:-1,__u:0};return i==null&&dt.vnode!=null&&dt.vnode(o),o}function Ep(e){return e.children}function Zd(e,r){this.props=e,this.context=r}function Ql(e,r){if(r==null)return e.__?Ql(e.__,e.__i+1):null;for(var n;r<e.__k.length;r++)if((n=e.__k[r])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ql(e):null}function JQ(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,a=[],i=[],o=Zn({},r);o.__v=r.__v+1,dt.vnode&&dt.vnode(o),QS(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,a,n??Ql(r),!!(32&r.__u),i),o.__v=r.__v,o.__.__k[o.__i]=o,XL(a,o,i),r.__e=r.__=null,o.__e!=n&&VL(o)}}function VL(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(r){if(r!=null&&r.__e!=null)return e.__e=e.__c.base=r.__e}),VL(e)}function J5(e){(!e.__d&&(e.__d=!0)&&Li.push(e)&&!xh.__r++||Q5!=dt.debounceRendering)&&((Q5=dt.debounceRendering)||UL)(xh)}function xh(){try{for(var e,r=1;Li.length;)Li.length>r&&Li.sort(HL),e=Li.shift(),r=Li.length,JQ(e)}finally{Li.length=xh.__r=0}}function KL(e,r,n,a,i,o,s,c,f,d,h){var m,g,y,_,E,w,x,j=a&&a.__k||bh,C=r.length;for(f=eJ(n,r,j,f,C),m=0;m<C;m++)(y=n.__k[m])!=null&&(g=y.__i!=-1&&j[y.__i]||yh,y.__i=m,w=QS(e,y,g,i,o,s,c,f,d,h),_=y.__e,y.ref&&g.ref!=y.ref&&(g.ref&&JS(g.ref,null,y),h.push(y.ref,y.__c||_,y)),E==null&&_!=null&&(E=_),(x=!!(4&y.__u))||g.__k===y.__k?f=YL(y,f,e,x):typeof y.type=="function"&&w!==void 0?f=w:_&&(f=_.nextSibling),y.__u&=-7);return n.__e=E,f}function eJ(e,r,n,a,i){var o,s,c,f,d,h=n.length,m=h,g=0;for(e.__k=new Array(i),o=0;o<i;o++)(s=r[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[o]=Wu(null,s,null,null,null):Sp(s)?s=e.__k[o]=Wu(Ep,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=Wu(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,f=o+g,s.__=e,s.__b=e.__b+1,c=null,(d=s.__i=tJ(s,n,f,m))!=-1&&(m--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>h?g--:i<h&&g++),typeof s.type!="function"&&(s.__u|=4)):d!=f&&(d==f-1?g--:d==f+1?g++:(d>f?g--:g++,s.__u|=4))):e.__k[o]=null;if(m)for(o=0;o<h;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==a&&(a=Ql(c)),ZL(c,c));return a}function YL(e,r,n,a){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,r=YL(i[o],r,n,a));return r}e.__e!=r&&(a&&(r&&e.type&&!r.parentNode&&(r=Ql(e)),n.insertBefore(e.__e,r||null)),r=e.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function tJ(e,r,n,a){var i,o,s,c=e.key,f=e.type,d=r[n],h=d!=null&&(2&d.__u)==0;if(d===null&&c==null||h&&c==d.key&&f==d.type)return n;if(a>(h?1:0)){for(i=n-1,o=n+1;i>=0||o<r.length;)if((d=r[s=i>=0?i--:o++])!=null&&(2&d.__u)==0&&c==d.key&&f==d.type)return s}return-1}function eT(e,r,n){r[0]=="-"?e.setProperty(r,n??""):e[r]=n==null?"":typeof n!="number"||ZQ.test(r)?n:n+"px"}function jd(e,r,n,a,i){var o,s;e:if(r=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(r in a)n&&r in n||eT(e.style,r,"");if(n)for(r in n)a&&n[r]==a[r]||eT(e.style,r,n[r])}else if(r[0]=="o"&&r[1]=="n")o=r!=(r=r.replace(GL,"$1")),s=r.toLowerCase(),r=s in e||r=="onFocusOut"||r=="onFocusIn"?s.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=n,n?a?n.u=a.u:(n.u=WS,e.addEventListener(r,o?j2:A2,o)):e.removeEventListener(r,o?j2:A2,o);else{if(i=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in e)try{e[r]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&r[4]!="-"?e.removeAttribute(r):e.setAttribute(r,r=="popover"&&n==1?"":n))}}function tT(e){return function(r){if(this.l){var n=this.l[r.type+e];if(r.t==null)r.t=WS++;else if(r.t<n.u)return;return n(dt.event?dt.event(r):r)}}}function QS(e,r,n,a,i,o,s,c,f,d){var h,m,g,y,_,E,w,x,j,C,T,O,N,M,R,L=r.type;if(r.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),o=[c=r.__e=n.__e]),(h=dt.__b)&&h(r);e:if(typeof L=="function")try{if(x=r.props,j=L.prototype&&L.prototype.render,C=(h=L.contextType)&&a[h.__c],T=h?C?C.props.value:h.__:a,n.__c?w=(m=r.__c=n.__c).__=m.__E:(j?r.__c=m=new L(x,T):(r.__c=m=new Zd(x,T),m.constructor=L,m.render=nJ),C&&C.sub(m),m.state||(m.state={}),m.__n=a,g=m.__d=!0,m.__h=[],m._sb=[]),j&&m.__s==null&&(m.__s=m.state),j&&L.getDerivedStateFromProps!=null&&(m.__s==m.state&&(m.__s=Zn({},m.__s)),Zn(m.__s,L.getDerivedStateFromProps(x,m.__s))),y=m.props,_=m.state,m.__v=r,g)j&&L.getDerivedStateFromProps==null&&m.componentWillMount!=null&&m.componentWillMount(),j&&m.componentDidMount!=null&&m.__h.push(m.componentDidMount);else{if(j&&L.getDerivedStateFromProps==null&&x!==y&&m.componentWillReceiveProps!=null&&m.componentWillReceiveProps(x,T),r.__v==n.__v||!m.__e&&m.shouldComponentUpdate!=null&&m.shouldComponentUpdate(x,m.__s,T)===!1){r.__v!=n.__v&&(m.props=x,m.state=m.__s,m.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(D){D&&(D.__=r)}),bh.push.apply(m.__h,m._sb),m._sb=[],m.__h.length&&s.push(m);break e}m.componentWillUpdate!=null&&m.componentWillUpdate(x,m.__s,T),j&&m.componentDidUpdate!=null&&m.__h.push(function(){m.componentDidUpdate(y,_,E)})}if(m.context=T,m.props=x,m.__P=e,m.__e=!1,O=dt.__r,N=0,j)m.state=m.__s,m.__d=!1,O&&O(r),h=m.render(m.props,m.state,m.context),bh.push.apply(m.__h,m._sb),m._sb=[];else do m.__d=!1,O&&O(r),h=m.render(m.props,m.state,m.context),m.state=m.__s;while(m.__d&&++N<25);m.state=m.__s,m.getChildContext!=null&&(a=Zn(Zn({},a),m.getChildContext())),j&&!g&&m.getSnapshotBeforeUpdate!=null&&(E=m.getSnapshotBeforeUpdate(y,_)),M=h!=null&&h.type===Ep&&h.key==null?WL(h.props.children):h,c=KL(e,Sp(M)?M:[M],r,n,a,i,o,s,c,f,d),m.base=r.__e,r.__u&=-161,m.__h.length&&s.push(m),w&&(m.__E=m.__=null)}catch(D){if(r.__v=null,f||o!=null)if(D.then){for(r.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,r.__e=c}else{for(R=o.length;R--;)ZS(o[R]);C2(r)}else r.__e=n.__e,r.__k=n.__k,D.then||C2(r);dt.__e(D,r,n)}else o==null&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):c=r.__e=rJ(n.__e,r,n,a,i,o,s,f,d);return(h=dt.diffed)&&h(r),128&r.__u?void 0:c}function C2(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(C2))}function XL(e,r,n){for(var a=0;a<n.length;a++)JS(n[a],n[++a],n[++a]);dt.__c&&dt.__c(r,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){dt.__e(o,i.__v)}})}function WL(e){return typeof e!="object"||e==null||e.__b>0?e:Sp(e)?e.map(WL):Zn({},e)}function rJ(e,r,n,a,i,o,s,c,f){var d,h,m,g,y,_,E,w=n.props||yh,x=r.props,j=r.type;if(j=="svg"?i="http://www.w3.org/2000/svg":j=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!j&&(j?y.localName==j:y.nodeType==3)){e=y,o[d]=null;break}}if(e==null){if(j==null)return document.createTextNode(x);e=document.createElementNS(i,j,x.is&&x),c&&(dt.__m&&dt.__m(r,o),c=!1),o=null}if(j==null)w===x||c&&e.data==x||(e.data=x);else{if(o=o&&Oc.call(e.childNodes),!c&&o!=null)for(w={},d=0;d<e.attributes.length;d++)w[(y=e.attributes[d]).name]=y.value;for(d in w)y=w[d],d=="dangerouslySetInnerHTML"?m=y:d=="children"||d in x||d=="value"&&"defaultValue"in x||d=="checked"&&"defaultChecked"in x||jd(e,d,null,y,i);for(d in x)y=x[d],d=="children"?g=y:d=="dangerouslySetInnerHTML"?h=y:d=="value"?_=y:d=="checked"?E=y:c&&typeof y!="function"||w[d]===y||jd(e,d,y,w[d],i);if(h)c||m&&(h.__html==m.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(m&&(e.innerHTML=""),KL(r.type=="template"?e.content:e,Sp(g)?g:[g],r,n,a,j=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ql(n,0),c,f),o!=null)for(d=o.length;d--;)ZS(o[d]);c||(d="value",j=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[d]||j=="progress"&&!_||j=="option"&&_!=w[d])&&jd(e,d,_,w[d],i),d="checked",E!=null&&E!=e[d]&&jd(e,d,E,w[d],i))}return e}function JS(e,r,n){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&r==null||(e.__u=e(r))}else e.current=r}catch(i){dt.__e(i,n)}}function ZL(e,r,n){var a,i;if(dt.unmount&&dt.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||JS(a,null,r)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(o){dt.__e(o,r)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&ZL(a[i],r,n||typeof e.type!="function");n||ZS(e.__e),e.__c=e.__=e.__e=void 0}function nJ(e,r,n){return this.constructor(e,n)}function aJ(e,r,n){var a,i,o,s;r==document&&(r=document.documentElement),dt.__&&dt.__(e,r),i=(a=!1)?null:r.__k,o=[],s=[],QS(r,e=r.__k=QQ(Ep,null,[e]),i||yh,yh,r.namespaceURI,i?null:r.firstChild?Oc.call(r.childNodes):null,o,i?i.__e:r.firstChild,a,s),XL(o,e,s)}function QL(e,r,n){var a,i,o,s,c=Zn({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),r)o=="key"?a=r[o]:o=="ref"?i=r[o]:c[o]=r[o]===void 0&&s!=null?s[o]:r[o];return arguments.length>2&&(c.children=arguments.length>3?Oc.call(arguments,2):n),Wu(e.type,c,a||e.key,i||e.ref,null)}Oc=bh.slice,dt={__e:function(e,r,n,a){for(var i,o,s;r=r.__;)if((i=r.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,a||{}),s=i.__d),s)return i.__E=i}catch(c){e=c}throw e}},$L=0,FL=function(e){return e!=null&&e.constructor===void 0},Zd.prototype.setState=function(e,r){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Zn({},this.state),typeof e=="function"&&(e=e(Zn({},n),this.props)),e&&Zn(n,e),e!=null&&this.__v&&(r&&this._sb.push(r),J5(this))},Zd.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),J5(this))},Zd.prototype.render=Ep,Li=[],UL=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,HL=function(e,r){return e.__v.__b-r.__v.__b},xh.__r=0,GL=/(PointerCapture)$|Capture$/i,WS=0,A2=tT(!1),j2=tT(!0);function rT(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function iJ(e){if(Array.isArray(e))return e}function oJ(e,r,n){return(r=dJ(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function lJ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function sJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
70
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nT(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function uJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?nT(Object(n),!0).forEach(function(a){oJ(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nT(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function cJ(e,r){return iJ(e)||lJ(e,r)||hJ(e,r)||sJ()}function fJ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dJ(e){var r=fJ(e,"string");return typeof r=="symbol"?r:r+""}function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_h(e)}function hJ(e,r){if(e){if(typeof e=="string")return rT(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rT(e,r):void 0}}var O2=function(r){if(_h(r)!=="object")return r;var n=QL(r);if(n.props){var a;n.props=uJ({},n.props),n!=null&&(a=n.props)!==null&&a!==void 0&&a.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(O2):O2(n.props.children))}return n},pJ=function(r){return FL(QL(r))},mJ=function(r,n){delete n.__k,aJ(O2(r),n)};function vJ(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var gJ=`.float-tooltip-kap {
|
|
71
|
+
position: absolute;
|
|
72
|
+
width: max-content; /* prevent shrinking near right edge */
|
|
73
|
+
max-width: max(50%, 150px);
|
|
74
|
+
padding: 3px 5px;
|
|
75
|
+
border-radius: 3px;
|
|
76
|
+
font: 12px sans-serif;
|
|
77
|
+
color: #eee;
|
|
78
|
+
background: rgba(0,0,0,0.6);
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
`;vJ(gJ);var yJ=XS({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=a.style,o=i===void 0?{}:i,s=!!r&&_h(r)==="object"&&!!r.node&&typeof r.node=="function",c=dn(s?r.node():r);c.style("position")==="static"&&c.style("position","relative"),n.tooltipEl=c.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var h=cJ(d,2),m=h[0],g=h[1];return n.tooltipEl.style(m,g)}),n.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));n.mouseInside=!1,c.on("mousemove.".concat(f),function(d){n.mouseInside=!0;var h=Yn(d),m=c.node(),g=m.offsetWidth,y=m.offsetHeight,_=[n.offsetX===null||n.offsetX===void 0?"-".concat(h[0]/g*100,"%"):typeof n.offsetX=="number"?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,n.offsetY===null||n.offsetY===void 0?y>130&&y-h[1]<100?"calc(-100% - 6px)":"21px":typeof n.offsetY=="number"?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(_.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseover.".concat(f),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseout.".concat(f),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(r){r.tooltipEl.style("display",r.content&&r.mouseInside?"inline":"none"),r.content?r.content instanceof HTMLElement?(r.tooltipEl.text(""),r.tooltipEl.append(function(){return r.content})):typeof r.content=="string"?r.tooltipEl.html(r.content):pJ(r.content)?(r.tooltipEl.text(""),mJ(r.content,r.tooltipEl.node())):(r.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",r.content,r.content.toString())):r.tooltipEl.text("")}});function bJ(e,r,n){var a,i=1;e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function o(){var s,c=a.length,f,d=0,h=0,m=0;for(s=0;s<c;++s)f=a[s],d+=f.x||0,h+=f.y||0,m+=f.z||0;for(d=(d/c-e)*i,h=(h/c-r)*i,m=(m/c-n)*i,s=0;s<c;++s)f=a[s],d&&(f.x-=d),h&&(f.y-=h),m&&(f.z-=m)}return o.initialize=function(s){a=s},o.x=function(s){return arguments.length?(e=+s,o):e},o.y=function(s){return arguments.length?(r=+s,o):r},o.z=function(s){return arguments.length?(n=+s,o):n},o.strength=function(s){return arguments.length?(i=+s,o):i},o}function xJ(e){const r=+this._x.call(null,e);return JL(this.cover(r),r,e)}function JL(e,r,n){if(isNaN(r))return e;var a,i=e._root,o={data:n},s=e._x0,c=e._x1,f,d,h,m,g;if(!i)return e._root=o,e;for(;i.length;)if((h=r>=(f=(s+c)/2))?s=f:c=f,a=i,!(i=i[m=+h]))return a[m]=o,e;if(d=+e._x.call(null,i.data),r===d)return o.next=i,a?a[m]=o:e._root=o,e;do a=a?a[m]=new Array(2):e._root=new Array(2),(h=r>=(f=(s+c)/2))?s=f:c=f;while((m=+h)==(g=+(d>=f)));return a[g]=i,a[m]=o,e}function _J(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r);let a=1/0,i=-1/0;for(let o=0,s;o<r;++o)isNaN(s=+this._x.call(null,e[o]))||(n[o]=s,s<a&&(a=s),s>i&&(i=s));if(a>i)return this;this.cover(a).cover(i);for(let o=0;o<r;++o)JL(this,n[o],e[o]);return this}function wJ(e){if(isNaN(e=+e))return this;var r=this._x0,n=this._x1;if(isNaN(r))n=(r=Math.floor(e))+1;else{for(var a=n-r||1,i=this._root,o,s;r>e||e>=n;)switch(s=+(e<r),o=new Array(2),o[s]=i,i=o,a*=2,s){case 0:n=r+a;break;case 1:r=n-a;break}this._root&&this._root.length&&(this._root=i)}return this._x0=r,this._x1=n,this}function SJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function EJ(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Fa(e,r,n){this.node=e,this.x0=r,this.x1=n}function kJ(e,r){var n,a=this._x0,i,o,s=this._x1,c=[],f=this._root,d,h;for(f&&c.push(new Fa(f,a,s)),r==null?r=1/0:(a=e-r,s=e+r);d=c.pop();)if(!(!(f=d.node)||(i=d.x0)>s||(o=d.x1)<a))if(f.length){var m=(i+o)/2;c.push(new Fa(f[1],m,o),new Fa(f[0],i,m)),(h=+(e>=m))&&(d=c[c.length-1],c[c.length-1]=c[c.length-1-h],c[c.length-1-h]=d)}else{var g=Math.abs(e-+this._x.call(null,f.data));g<r&&(r=g,a=e-g,s=e+g,n=f.data)}return n}function AJ(e){if(isNaN(f=+this._x.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._x1,f,d,h,m,g;if(!n)return this;if(n.length)for(;;){if((h=f>=(d=(s+c)/2))?s=d:c=d,r=n,!(n=n[m=+h]))return this;if(!n.length)break;r[m+1&1]&&(a=r,g=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[m]=o:delete r[m],(n=r[0]||r[1])&&n===(r[1]||r[0])&&!n.length&&(a?a[g]=n:this._root=n),this):(this._root=o,this)}function jJ(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function CJ(){return this._root}function OJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function TJ(e){var r=[],n,a=this._root,i,o,s;for(a&&r.push(new Fa(a,this._x0,this._x1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.x1)&&a.length){var c=(o+s)/2;(i=a[1])&&r.push(new Fa(i,c,s)),(i=a[0])&&r.push(new Fa(i,o,c))}return this}function NJ(e){var r=[],n=[],a;for(this._root&&r.push(new Fa(this._root,this._x0,this._x1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.x1,f=(s+c)/2;(o=i[0])&&r.push(new Fa(o,s,f)),(o=i[1])&&r.push(new Fa(o,f,c))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.x1);return this}function MJ(e){return e[0]}function PJ(e){return arguments.length?(this._x=e,this):this._x}function eE(e,r){var n=new tE(r??MJ,NaN,NaN);return e==null?n:n.addAll(e)}function tE(e,r,n){this._x=e,this._x0=r,this._x1=n,this._root=void 0}function aT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var Mr=eE.prototype=tE.prototype;Mr.copy=function(){var e=new tE(this._x,this._x0,this._x1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=aT(r),e;for(n=[{source:r,target:e._root=new Array(2)}];r=n.pop();)for(var i=0;i<2;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(2)}):r.target[i]=aT(a));return e};Mr.add=xJ;Mr.addAll=_J;Mr.cover=wJ;Mr.data=SJ;Mr.extent=EJ;Mr.find=kJ;Mr.remove=AJ;Mr.removeAll=jJ;Mr.root=CJ;Mr.size=OJ;Mr.visit=TJ;Mr.visitAfter=NJ;Mr.x=PJ;function RJ(e){const r=+this._x.call(null,e),n=+this._y.call(null,e);return eI(this.cover(r,n),r,n,e)}function eI(e,r,n,a){if(isNaN(r)||isNaN(n))return e;var i,o=e._root,s={data:a},c=e._x0,f=e._y0,d=e._x1,h=e._y1,m,g,y,_,E,w,x,j;if(!o)return e._root=s,e;for(;o.length;)if((E=r>=(m=(c+d)/2))?c=m:d=m,(w=n>=(g=(f+h)/2))?f=g:h=g,i=o,!(o=o[x=w<<1|E]))return i[x]=s,e;if(y=+e._x.call(null,o.data),_=+e._y.call(null,o.data),r===y&&n===_)return s.next=o,i?i[x]=s:e._root=s,e;do i=i?i[x]=new Array(4):e._root=new Array(4),(E=r>=(m=(c+d)/2))?c=m:d=m,(w=n>=(g=(f+h)/2))?f=g:h=g;while((x=w<<1|E)===(j=(_>=g)<<1|y>=m));return i[j]=o,i[x]=s,e}function DJ(e){var r,n,a=e.length,i,o,s=new Array(a),c=new Array(a),f=1/0,d=1/0,h=-1/0,m=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,r=e[n]))||isNaN(o=+this._y.call(null,r))||(s[n]=i,c[n]=o,i<f&&(f=i),i>h&&(h=i),o<d&&(d=o),o>m&&(m=o));if(f>h||d>m)return this;for(this.cover(f,d).cover(h,m),n=0;n<a;++n)eI(this,s[n],c[n],e[n]);return this}function LJ(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(a=Math.floor(r))+1;else{for(var s=i-n||1,c=this._root,f,d;n>e||e>=i||a>r||r>=o;)switch(d=(r<a)<<1|e<n,f=new Array(4),f[d]=c,c=f,s*=2,d){case 0:i=n+s,o=a+s;break;case 1:n=i-s,o=a+s;break;case 2:i=n+s,a=o-s;break;case 3:n=i-s,a=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=a,this._x1=i,this._y1=o,this}function IJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function zJ(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function dr(e,r,n,a,i){this.node=e,this.x0=r,this.y0=n,this.x1=a,this.y1=i}function qJ(e,r,n){var a,i=this._x0,o=this._y0,s,c,f,d,h=this._x1,m=this._y1,g=[],y=this._root,_,E;for(y&&g.push(new dr(y,i,o,h,m)),n==null?n=1/0:(i=e-n,o=r-n,h=e+n,m=r+n,n*=n);_=g.pop();)if(!(!(y=_.node)||(s=_.x0)>h||(c=_.y0)>m||(f=_.x1)<i||(d=_.y1)<o))if(y.length){var w=(s+f)/2,x=(c+d)/2;g.push(new dr(y[3],w,x,f,d),new dr(y[2],s,x,w,d),new dr(y[1],w,c,f,x),new dr(y[0],s,c,w,x)),(E=(r>=x)<<1|e>=w)&&(_=g[g.length-1],g[g.length-1]=g[g.length-1-E],g[g.length-1-E]=_)}else{var j=e-+this._x.call(null,y.data),C=r-+this._y.call(null,y.data),T=j*j+C*C;if(T<n){var O=Math.sqrt(n=T);i=e-O,o=r-O,h=e+O,m=r+O,a=y.data}}return a}function BJ(e){if(isNaN(h=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._y0,f=this._x1,d=this._y1,h,m,g,y,_,E,w,x;if(!n)return this;if(n.length)for(;;){if((_=h>=(g=(s+f)/2))?s=g:f=g,(E=m>=(y=(c+d)/2))?c=y:d=y,r=n,!(n=n[w=E<<1|_]))return this;if(!n.length)break;(r[w+1&3]||r[w+2&3]||r[w+3&3])&&(a=r,x=w)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[w]=o:delete r[w],(n=r[0]||r[1]||r[2]||r[3])&&n===(r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[x]=n:this._root=n),this):(this._root=o,this)}function $J(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function FJ(){return this._root}function UJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function HJ(e){var r=[],n,a=this._root,i,o,s,c,f;for(a&&r.push(new dr(a,this._x0,this._y0,this._x1,this._y1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.y0,c=n.x1,f=n.y1)&&a.length){var d=(o+c)/2,h=(s+f)/2;(i=a[3])&&r.push(new dr(i,d,h,c,f)),(i=a[2])&&r.push(new dr(i,o,h,d,f)),(i=a[1])&&r.push(new dr(i,d,s,c,h)),(i=a[0])&&r.push(new dr(i,o,s,d,h))}return this}function GJ(e){var r=[],n=[],a;for(this._root&&r.push(new dr(this._root,this._x0,this._y0,this._x1,this._y1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.y0,f=a.x1,d=a.y1,h=(s+f)/2,m=(c+d)/2;(o=i[0])&&r.push(new dr(o,s,c,h,m)),(o=i[1])&&r.push(new dr(o,h,c,f,m)),(o=i[2])&&r.push(new dr(o,s,m,h,d)),(o=i[3])&&r.push(new dr(o,h,m,f,d))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.x1,a.y1);return this}function VJ(e){return e[0]}function KJ(e){return arguments.length?(this._x=e,this):this._x}function YJ(e){return e[1]}function XJ(e){return arguments.length?(this._y=e,this):this._y}function rE(e,r,n){var a=new nE(r??VJ,n??YJ,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function nE(e,r,n,a,i,o){this._x=e,this._y=r,this._x0=n,this._y0=a,this._x1=i,this._y1=o,this._root=void 0}function iT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var vr=rE.prototype=nE.prototype;vr.copy=function(){var e=new nE(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=iT(r),e;for(n=[{source:r,target:e._root=new Array(4)}];r=n.pop();)for(var i=0;i<4;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(4)}):r.target[i]=iT(a));return e};vr.add=RJ;vr.addAll=DJ;vr.cover=LJ;vr.data=IJ;vr.extent=zJ;vr.find=qJ;vr.remove=BJ;vr.removeAll=$J;vr.root=FJ;vr.size=UJ;vr.visit=HJ;vr.visitAfter=GJ;vr.x=KJ;vr.y=XJ;function WJ(e){const r=+this._x.call(null,e),n=+this._y.call(null,e),a=+this._z.call(null,e);return tI(this.cover(r,n,a),r,n,a,e)}function tI(e,r,n,a,i){if(isNaN(r)||isNaN(n)||isNaN(a))return e;var o,s=e._root,c={data:i},f=e._x0,d=e._y0,h=e._z0,m=e._x1,g=e._y1,y=e._z1,_,E,w,x,j,C,T,O,N,M,R;if(!s)return e._root=c,e;for(;s.length;)if((T=r>=(_=(f+m)/2))?f=_:m=_,(O=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(w=(h+y)/2))?h=w:y=w,o=s,!(s=s[M=N<<2|O<<1|T]))return o[M]=c,e;if(x=+e._x.call(null,s.data),j=+e._y.call(null,s.data),C=+e._z.call(null,s.data),r===x&&n===j&&a===C)return c.next=s,o?o[M]=c:e._root=c,e;do o=o?o[M]=new Array(8):e._root=new Array(8),(T=r>=(_=(f+m)/2))?f=_:m=_,(O=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(w=(h+y)/2))?h=w:y=w;while((M=N<<2|O<<1|T)===(R=(C>=w)<<2|(j>=E)<<1|x>=_));return o[R]=s,o[M]=c,e}function ZJ(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r),a=new Float64Array(r),i=new Float64Array(r);let o=1/0,s=1/0,c=1/0,f=-1/0,d=-1/0,h=-1/0;for(let m=0,g,y,_,E;m<r;++m)isNaN(y=+this._x.call(null,g=e[m]))||isNaN(_=+this._y.call(null,g))||isNaN(E=+this._z.call(null,g))||(n[m]=y,a[m]=_,i[m]=E,y<o&&(o=y),y>f&&(f=y),_<s&&(s=_),_>d&&(d=_),E<c&&(c=E),E>h&&(h=E));if(o>f||s>d||c>h)return this;this.cover(o,s,c).cover(f,d,h);for(let m=0;m<r;++m)tI(this,n[m],a[m],i[m],e[m]);return this}function QJ(e,r,n){if(isNaN(e=+e)||isNaN(r=+r)||isNaN(n=+n))return this;var a=this._x0,i=this._y0,o=this._z0,s=this._x1,c=this._y1,f=this._z1;if(isNaN(a))s=(a=Math.floor(e))+1,c=(i=Math.floor(r))+1,f=(o=Math.floor(n))+1;else{for(var d=s-a||1,h=this._root,m,g;a>e||e>=s||i>r||r>=c||o>n||n>=f;)switch(g=(n<o)<<2|(r<i)<<1|e<a,m=new Array(8),m[g]=h,h=m,d*=2,g){case 0:s=a+d,c=i+d,f=o+d;break;case 1:a=s-d,c=i+d,f=o+d;break;case 2:s=a+d,i=c-d,f=o+d;break;case 3:a=s-d,i=c-d,f=o+d;break;case 4:s=a+d,c=i+d,o=f-d;break;case 5:a=s-d,c=i+d,o=f-d;break;case 6:s=a+d,i=c-d,o=f-d;break;case 7:a=s-d,i=c-d,o=f-d;break}this._root&&this._root.length&&(this._root=h)}return this._x0=a,this._y0=i,this._z0=o,this._x1=s,this._y1=c,this._z1=f,this}function JJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function eee(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function rt(e,r,n,a,i,o,s){this.node=e,this.x0=r,this.y0=n,this.z0=a,this.x1=i,this.y1=o,this.z1=s}function tee(e,r,n,a){var i,o=this._x0,s=this._y0,c=this._z0,f,d,h,m,g,y,_=this._x1,E=this._y1,w=this._z1,x=[],j=this._root,C,T;for(j&&x.push(new rt(j,o,s,c,_,E,w)),a==null?a=1/0:(o=e-a,s=r-a,c=n-a,_=e+a,E=r+a,w=n+a,a*=a);C=x.pop();)if(!(!(j=C.node)||(f=C.x0)>_||(d=C.y0)>E||(h=C.z0)>w||(m=C.x1)<o||(g=C.y1)<s||(y=C.z1)<c))if(j.length){var O=(f+m)/2,N=(d+g)/2,M=(h+y)/2;x.push(new rt(j[7],O,N,M,m,g,y),new rt(j[6],f,N,M,O,g,y),new rt(j[5],O,d,M,m,N,y),new rt(j[4],f,d,M,O,N,y),new rt(j[3],O,N,h,m,g,M),new rt(j[2],f,N,h,O,g,M),new rt(j[1],O,d,h,m,N,M),new rt(j[0],f,d,h,O,N,M)),(T=(n>=M)<<2|(r>=N)<<1|e>=O)&&(C=x[x.length-1],x[x.length-1]=x[x.length-1-T],x[x.length-1-T]=C)}else{var R=e-+this._x.call(null,j.data),L=r-+this._y.call(null,j.data),D=n-+this._z.call(null,j.data),q=R*R+L*L+D*D;if(q<a){var z=Math.sqrt(a=q);o=e-z,s=r-z,c=n-z,_=e+z,E=r+z,w=n+z,i=j.data}}return i}const ree=(e,r,n,a,i,o)=>Math.sqrt((e-a)**2+(r-i)**2+(n-o)**2);function nee(e,r,n,a){const i=[],o=e-a,s=r-a,c=n-a,f=e+a,d=r+a,h=n+a;return this.visit((m,g,y,_,E,w,x)=>{if(!m.length)do{const j=m.data;ree(e,r,n,this._x(j),this._y(j),this._z(j))<=a&&i.push(j)}while(m=m.next);return g>f||y>d||_>h||E<o||w<s||x<c}),i}function aee(e){if(isNaN(g=+this._x.call(null,e))||isNaN(y=+this._y.call(null,e))||isNaN(_=+this._z.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._y0,f=this._z0,d=this._x1,h=this._y1,m=this._z1,g,y,_,E,w,x,j,C,T,O,N;if(!n)return this;if(n.length)for(;;){if((j=g>=(E=(s+d)/2))?s=E:d=E,(C=y>=(w=(c+h)/2))?c=w:h=w,(T=_>=(x=(f+m)/2))?f=x:m=x,r=n,!(n=n[O=T<<2|C<<1|j]))return this;if(!n.length)break;(r[O+1&7]||r[O+2&7]||r[O+3&7]||r[O+4&7]||r[O+5&7]||r[O+6&7]||r[O+7&7])&&(a=r,N=O)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[O]=o:delete r[O],(n=r[0]||r[1]||r[2]||r[3]||r[4]||r[5]||r[6]||r[7])&&n===(r[7]||r[6]||r[5]||r[4]||r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[N]=n:this._root=n),this):(this._root=o,this)}function iee(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function oee(){return this._root}function lee(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function see(e){var r=[],n,a=this._root,i,o,s,c,f,d,h;for(a&&r.push(new rt(a,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.y0,c=n.z0,f=n.x1,d=n.y1,h=n.z1)&&a.length){var m=(o+f)/2,g=(s+d)/2,y=(c+h)/2;(i=a[7])&&r.push(new rt(i,m,g,y,f,d,h)),(i=a[6])&&r.push(new rt(i,o,g,y,m,d,h)),(i=a[5])&&r.push(new rt(i,m,s,y,f,g,h)),(i=a[4])&&r.push(new rt(i,o,s,y,m,g,h)),(i=a[3])&&r.push(new rt(i,m,g,c,f,d,y)),(i=a[2])&&r.push(new rt(i,o,g,c,m,d,y)),(i=a[1])&&r.push(new rt(i,m,s,c,f,g,y)),(i=a[0])&&r.push(new rt(i,o,s,c,m,g,y))}return this}function uee(e){var r=[],n=[],a;for(this._root&&r.push(new rt(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.y0,f=a.z0,d=a.x1,h=a.y1,m=a.z1,g=(s+d)/2,y=(c+h)/2,_=(f+m)/2;(o=i[0])&&r.push(new rt(o,s,c,f,g,y,_)),(o=i[1])&&r.push(new rt(o,g,c,f,d,y,_)),(o=i[2])&&r.push(new rt(o,s,y,f,g,h,_)),(o=i[3])&&r.push(new rt(o,g,y,f,d,h,_)),(o=i[4])&&r.push(new rt(o,s,c,_,g,y,m)),(o=i[5])&&r.push(new rt(o,g,c,_,d,y,m)),(o=i[6])&&r.push(new rt(o,s,y,_,g,h,m)),(o=i[7])&&r.push(new rt(o,g,y,_,d,h,m))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.z0,a.x1,a.y1,a.z1);return this}function cee(e){return e[0]}function fee(e){return arguments.length?(this._x=e,this):this._x}function dee(e){return e[1]}function hee(e){return arguments.length?(this._y=e,this):this._y}function pee(e){return e[2]}function mee(e){return arguments.length?(this._z=e,this):this._z}function aE(e,r,n,a){var i=new iE(r??cee,n??dee,a??pee,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function iE(e,r,n,a,i,o,s,c,f){this._x=e,this._y=r,this._z=n,this._x0=a,this._y0=i,this._z0=o,this._x1=s,this._y1=c,this._z1=f,this._root=void 0}function oT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var tr=aE.prototype=iE.prototype;tr.copy=function(){var e=new iE(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=oT(r),e;for(n=[{source:r,target:e._root=new Array(8)}];r=n.pop();)for(var i=0;i<8;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(8)}):r.target[i]=oT(a));return e};tr.add=WJ;tr.addAll=ZJ;tr.cover=QJ;tr.data=JJ;tr.extent=eee;tr.find=tee;tr.findAllWithinRadius=nee;tr.remove=aee;tr.removeAll=iee;tr.root=oee;tr.size=lee;tr.visit=see;tr.visitAfter=uee;tr.x=fee;tr.y=hee;tr.z=mee;function hr(e){return function(){return e}}function fn(e){return(e()-.5)*1e-6}function ny(e){return e.x+e.vx}function lT(e){return e.y+e.vy}function vee(e){return e.z+e.vz}function gee(e){var r,n,a,i,o=1,s=1;typeof e!="function"&&(e=hr(e==null?1:+e));function c(){for(var h,m=r.length,g,y,_,E,w,x,j,C=0;C<s;++C)for(g=(n===1?eE(r,ny):n===2?rE(r,ny,lT):n===3?aE(r,ny,lT,vee):null).visitAfter(f),h=0;h<m;++h)y=r[h],x=a[y.index],j=x*x,_=y.x+y.vx,n>1&&(E=y.y+y.vy),n>2&&(w=y.z+y.vz),g.visit(T);function T(O,N,M,R,L,D,q){var z=[N,M,R,L,D,q],H=z[0],F=z[1],X=z[2],B=z[n],Q=z[n+1],te=z[n+2],K=O.data,de=O.r,U=x+de;if(K){if(K.index>y.index){var J=_-K.x-K.vx,le=n>1?E-K.y-K.vy:0,$=n>2?w-K.z-K.vz:0,Y=J*J+le*le+$*$;Y<U*U&&(J===0&&(J=fn(i),Y+=J*J),n>1&&le===0&&(le=fn(i),Y+=le*le),n>2&&$===0&&($=fn(i),Y+=$*$),Y=(U-(Y=Math.sqrt(Y)))/Y*o,y.vx+=(J*=Y)*(U=(de*=de)/(j+de)),n>1&&(y.vy+=(le*=Y)*U),n>2&&(y.vz+=($*=Y)*U),K.vx-=J*(U=1-U),n>1&&(K.vy-=le*U),n>2&&(K.vz-=$*U))}return}return H>_+U||B<_-U||n>1&&(F>E+U||Q<E-U)||n>2&&(X>w+U||te<w-U)}}function f(h){if(h.data)return h.r=a[h.data.index];for(var m=h.r=0;m<Math.pow(2,n);++m)h[m]&&h[m].r>h.r&&(h.r=h[m].r)}function d(){if(r){var h,m=r.length,g;for(a=new Array(m),h=0;h<m;++h)g=r[h],a[g.index]=+e(g,h,r)}}return c.initialize=function(h,...m){r=h,i=m.find(g=>typeof g=="function")||Math.random,n=m.find(g=>[1,2,3].includes(g))||2,d()},c.iterations=function(h){return arguments.length?(s=+h,c):s},c.strength=function(h){return arguments.length?(o=+h,c):o},c.radius=function(h){return arguments.length?(e=typeof h=="function"?h:hr(+h),d(),c):e},c}function yee(e){return e.index}function sT(e,r){var n=e.get(r);if(!n)throw new Error("node not found: "+r);return n}function bee(e){var r=yee,n=g,a,i=hr(30),o,s,c,f,d,h,m=1;e==null&&(e=[]);function g(x){return 1/Math.min(f[x.source.index],f[x.target.index])}function y(x){for(var j=0,C=e.length;j<m;++j)for(var T=0,O,N,M,R=0,L=0,D=0,q,z;T<C;++T)O=e[T],N=O.source,M=O.target,R=M.x+M.vx-N.x-N.vx||fn(h),c>1&&(L=M.y+M.vy-N.y-N.vy||fn(h)),c>2&&(D=M.z+M.vz-N.z-N.vz||fn(h)),q=Math.sqrt(R*R+L*L+D*D),q=(q-o[T])/q*x*a[T],R*=q,L*=q,D*=q,M.vx-=R*(z=d[T]),c>1&&(M.vy-=L*z),c>2&&(M.vz-=D*z),N.vx+=R*(z=1-z),c>1&&(N.vy+=L*z),c>2&&(N.vz+=D*z)}function _(){if(s){var x,j=s.length,C=e.length,T=new Map(s.map((N,M)=>[r(N,M,s),N])),O;for(x=0,f=new Array(j);x<C;++x)O=e[x],O.index=x,typeof O.source!="object"&&(O.source=sT(T,O.source)),typeof O.target!="object"&&(O.target=sT(T,O.target)),f[O.source.index]=(f[O.source.index]||0)+1,f[O.target.index]=(f[O.target.index]||0)+1;for(x=0,d=new Array(C);x<C;++x)O=e[x],d[x]=f[O.source.index]/(f[O.source.index]+f[O.target.index]);a=new Array(C),E(),o=new Array(C),w()}}function E(){if(s)for(var x=0,j=e.length;x<j;++x)a[x]=+n(e[x],x,e)}function w(){if(s)for(var x=0,j=e.length;x<j;++x)o[x]=+i(e[x],x,e)}return y.initialize=function(x,...j){s=x,h=j.find(C=>typeof C=="function")||Math.random,c=j.find(C=>[1,2,3].includes(C))||2,_()},y.links=function(x){return arguments.length?(e=x,_(),y):e},y.id=function(x){return arguments.length?(r=x,y):r},y.iterations=function(x){return arguments.length?(m=+x,y):m},y.strength=function(x){return arguments.length?(n=typeof x=="function"?x:hr(+x),E(),y):n},y.distance=function(x){return arguments.length?(i=typeof x=="function"?x:hr(+x),w(),y):i},y}const xee=1664525,_ee=1013904223,uT=4294967296;function wee(){let e=1;return()=>(e=(xee*e+_ee)%uT)/uT}var cT=3;function ay(e){return e.x}function fT(e){return e.y}function See(e){return e.z}var Eee=10,kee=Math.PI*(3-Math.sqrt(5)),Aee=Math.PI*20/(9+Math.sqrt(221));function jee(e,r){r=r||2;var n=Math.min(cT,Math.max(1,Math.round(r))),a,i=1,o=.001,s=1-Math.pow(o,1/300),c=0,f=.6,d=new Map,h=HS(y),m=Ac("tick","end"),g=wee();e==null&&(e=[]);function y(){_(),m.call("tick",a),i<o&&(h.stop(),m.call("end",a))}function _(x){var j,C=e.length,T;x===void 0&&(x=1);for(var O=0;O<x;++O)for(i+=(c-i)*s,d.forEach(function(N){N(i)}),j=0;j<C;++j)T=e[j],T.fx==null?T.x+=T.vx*=f:(T.x=T.fx,T.vx=0),n>1&&(T.fy==null?T.y+=T.vy*=f:(T.y=T.fy,T.vy=0)),n>2&&(T.fz==null?T.z+=T.vz*=f:(T.z=T.fz,T.vz=0));return a}function E(){for(var x=0,j=e.length,C;x<j;++x){if(C=e[x],C.index=x,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),C.fz!=null&&(C.z=C.fz),isNaN(C.x)||n>1&&isNaN(C.y)||n>2&&isNaN(C.z)){var T=Eee*(n>2?Math.cbrt(.5+x):n>1?Math.sqrt(.5+x):x),O=x*kee,N=x*Aee;n===1?C.x=T:n===2?(C.x=T*Math.cos(O),C.y=T*Math.sin(O)):(C.x=T*Math.sin(O)*Math.cos(N),C.y=T*Math.cos(O),C.z=T*Math.sin(O)*Math.sin(N))}(isNaN(C.vx)||n>1&&isNaN(C.vy)||n>2&&isNaN(C.vz))&&(C.vx=0,n>1&&(C.vy=0),n>2&&(C.vz=0))}}function w(x){return x.initialize&&x.initialize(e,g,n),x}return E(),a={tick:_,restart:function(){return h.restart(y),a},stop:function(){return h.stop(),a},numDimensions:function(x){return arguments.length?(n=Math.min(cT,Math.max(1,Math.round(x))),d.forEach(w),a):n},nodes:function(x){return arguments.length?(e=x,E(),d.forEach(w),a):e},alpha:function(x){return arguments.length?(i=+x,a):i},alphaMin:function(x){return arguments.length?(o=+x,a):o},alphaDecay:function(x){return arguments.length?(s=+x,a):+s},alphaTarget:function(x){return arguments.length?(c=+x,a):c},velocityDecay:function(x){return arguments.length?(f=1-x,a):1-f},randomSource:function(x){return arguments.length?(g=x,d.forEach(w),a):g},force:function(x,j){return arguments.length>1?(j==null?d.delete(x):d.set(x,w(j)),a):d.get(x)},find:function(){var x=Array.prototype.slice.call(arguments),j=x.shift()||0,C=(n>1?x.shift():null)||0,T=(n>2?x.shift():null)||0,O=x.shift()||1/0,N=0,M=e.length,R,L,D,q,z,H;for(O*=O,N=0;N<M;++N)z=e[N],R=j-z.x,L=C-(z.y||0),D=T-(z.z||0),q=R*R+L*L+D*D,q<O&&(H=z,O=q);return H},on:function(x,j){return arguments.length>1?(m.on(x,j),a):m.on(x)}}}function Cee(){var e,r,n,a,i,o=hr(-30),s,c=1,f=1/0,d=.81;function h(_){var E,w=e.length,x=(r===1?eE(e,ay):r===2?rE(e,ay,fT):r===3?aE(e,ay,fT,See):null).visitAfter(g);for(i=_,E=0;E<w;++E)n=e[E],x.visit(y)}function m(){if(e){var _,E=e.length,w;for(s=new Array(E),_=0;_<E;++_)w=e[_],s[w.index]=+o(w,_,e)}}function g(_){var E=0,w,x,j=0,C,T,O,N,M=_.length;if(M){for(C=T=O=N=0;N<M;++N)(w=_[N])&&(x=Math.abs(w.value))&&(E+=w.value,j+=x,C+=x*(w.x||0),T+=x*(w.y||0),O+=x*(w.z||0));E*=Math.sqrt(4/M),_.x=C/j,r>1&&(_.y=T/j),r>2&&(_.z=O/j)}else{w=_,w.x=w.data.x,r>1&&(w.y=w.data.y),r>2&&(w.z=w.data.z);do E+=s[w.data.index];while(w=w.next)}_.value=E}function y(_,E,w,x,j){if(!_.value)return!0;var C=[w,x,j][r-1],T=_.x-n.x,O=r>1?_.y-n.y:0,N=r>2?_.z-n.z:0,M=C-E,R=T*T+O*O+N*N;if(M*M/d<R)return R<f&&(T===0&&(T=fn(a),R+=T*T),r>1&&O===0&&(O=fn(a),R+=O*O),r>2&&N===0&&(N=fn(a),R+=N*N),R<c&&(R=Math.sqrt(c*R)),n.vx+=T*_.value*i/R,r>1&&(n.vy+=O*_.value*i/R),r>2&&(n.vz+=N*_.value*i/R)),!0;if(_.length||R>=f)return;(_.data!==n||_.next)&&(T===0&&(T=fn(a),R+=T*T),r>1&&O===0&&(O=fn(a),R+=O*O),r>2&&N===0&&(N=fn(a),R+=N*N),R<c&&(R=Math.sqrt(c*R)));do _.data!==n&&(M=s[_.data.index]*i/R,n.vx+=T*M,r>1&&(n.vy+=O*M),r>2&&(n.vz+=N*M));while(_=_.next)}return h.initialize=function(_,...E){e=_,a=E.find(w=>typeof w=="function")||Math.random,r=E.find(w=>[1,2,3].includes(w))||2,m()},h.strength=function(_){return arguments.length?(o=typeof _=="function"?_:hr(+_),m(),h):o},h.distanceMin=function(_){return arguments.length?(c=_*_,h):Math.sqrt(c)},h.distanceMax=function(_){return arguments.length?(f=_*_,h):Math.sqrt(f)},h.theta=function(_){return arguments.length?(d=_*_,h):Math.sqrt(d)},h}function Oee(e,r,n,a){var i,o,s=hr(.1),c,f;typeof e!="function"&&(e=hr(+e)),r==null&&(r=0),n==null&&(n=0),a==null&&(a=0);function d(m){for(var g=0,y=i.length;g<y;++g){var _=i[g],E=_.x-r||1e-6,w=(_.y||0)-n||1e-6,x=(_.z||0)-a||1e-6,j=Math.sqrt(E*E+w*w+x*x),C=(f[g]-j)*c[g]*m/j;_.vx+=E*C,o>1&&(_.vy+=w*C),o>2&&(_.vz+=x*C)}}function h(){if(i){var m,g=i.length;for(c=new Array(g),f=new Array(g),m=0;m<g;++m)f[m]=+e(i[m],m,i),c[m]=isNaN(f[m])?0:+s(i[m],m,i)}}return d.initialize=function(m,...g){i=m,o=g.find(y=>[1,2,3].includes(y))||2,h()},d.strength=function(m){return arguments.length?(s=typeof m=="function"?m:hr(+m),h(),d):s},d.radius=function(m){return arguments.length?(e=typeof m=="function"?m:hr(+m),h(),d):e},d.x=function(m){return arguments.length?(r=+m,d):r},d.y=function(m){return arguments.length?(n=+m,d):n},d.z=function(m){return arguments.length?(a=+m,d):a},d}function Tee(e){var r=hr(.1),n,a,i;typeof e!="function"&&(e=hr(e==null?0:+e));function o(c){for(var f=0,d=n.length,h;f<d;++f)h=n[f],h.vy+=(i[f]-h.y)*a[f]*c}function s(){if(n){var c,f=n.length;for(a=new Array(f),i=new Array(f),c=0;c<f;++c)a[c]=isNaN(i[c]=+e(n[c],c,n))?0:+r(n[c],c,n)}}return o.initialize=function(c){n=c,s()},o.strength=function(c){return arguments.length?(r=typeof c=="function"?c:hr(+c),s(),o):r},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:hr(+c),s(),o):e},o}const{abs:Eu,cos:Da,sin:Rl,acos:Nee,atan2:ku,sqrt:Pi,pow:cn}=Math;function Au(e){return e<0?-cn(-e,1/3):cn(e,1/3)}const rI=Math.PI,Cd=2*rI,Ri=rI/2,Mee=1e-6,iy=Number.MAX_SAFE_INTEGER||9007199254740991,oy=Number.MIN_SAFE_INTEGER||-9007199254740991,Pee={x:0,y:0,z:0},_e={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,r){const n=r(e);let a=n.x*n.x+n.y*n.y;return typeof n.z<"u"&&(a+=n.z*n.z),Pi(a)},compute:function(e,r,n){if(e===0)return r[0].t=0,r[0];const a=r.length-1;if(e===1)return r[a].t=1,r[a];const i=1-e;let o=r;if(a===0)return r[0].t=e,r[0];if(a===1){const c={x:i*o[0].x+e*o[1].x,y:i*o[0].y+e*o[1].y,t:e};return n&&(c.z=i*o[0].z+e*o[1].z),c}if(a<4){let c=i*i,f=e*e,d,h,m,g=0;a===2?(o=[o[0],o[1],o[2],Pee],d=c,h=i*e*2,m=f):a===3&&(d=c*i,h=c*e*3,m=i*f*3,g=e*f);const y={x:d*o[0].x+h*o[1].x+m*o[2].x+g*o[3].x,y:d*o[0].y+h*o[1].y+m*o[2].y+g*o[3].y,t:e};return n&&(y.z=d*o[0].z+h*o[1].z+m*o[2].z+g*o[3].z),y}const s=JSON.parse(JSON.stringify(r));for(;s.length>1;){for(let c=0;c<s.length-1;c++)s[c]={x:s[c].x+(s[c+1].x-s[c].x)*e,y:s[c].y+(s[c+1].y-s[c].y)*e},typeof s[c].z<"u"&&(s[c].z=s[c].z+(s[c+1].z-s[c].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,r,n,a){const i=1-e,o=n,s=r;let c=o[0],f=o[1],d=o[2],h=o[3],m;if(c*=i,f*=e,s.length===2)return m=c+f,{x:(c*s[0].x+f*s[1].x)/m,y:(c*s[0].y+f*s[1].y)/m,z:a?(c*s[0].z+f*s[1].z)/m:!1,t:e};if(c*=i,f*=2*i,d*=e*e,s.length===3)return m=c+f+d,{x:(c*s[0].x+f*s[1].x+d*s[2].x)/m,y:(c*s[0].y+f*s[1].y+d*s[2].y)/m,z:a?(c*s[0].z+f*s[1].z+d*s[2].z)/m:!1,t:e};if(c*=i,f*=1.5*i,d*=3*i,h*=e*e*e,s.length===4)return m=c+f+d+h,{x:(c*s[0].x+f*s[1].x+d*s[2].x+h*s[3].x)/m,y:(c*s[0].y+f*s[1].y+d*s[2].y+h*s[3].y)/m,z:a?(c*s[0].z+f*s[1].z+d*s[2].z+h*s[3].z)/m:!1,t:e}},derive:function(e,r){const n=[];for(let a=e,i=a.length,o=i-1;i>1;i--,o--){const s=[];for(let c=0,f;c<o;c++)f={x:o*(a[c+1].x-a[c].x),y:o*(a[c+1].y-a[c].y)},r&&(f.z=o*(a[c+1].z-a[c].z)),s.push(f);n.push(s),a=s}return n},between:function(e,r,n){return r<=e&&e<=n||_e.approximately(e,r)||_e.approximately(e,n)},approximately:function(e,r,n){return Eu(e-r)<=(n||Mee)},length:function(e){const n=_e.Tvalues.length;let a=0;for(let i=0,o;i<n;i++)o=.5*_e.Tvalues[i]+.5,a+=_e.Cvalues[i]*_e.arcfn(o,e);return .5*a},map:function(e,r,n,a,i){const o=n-r,s=i-a,c=e-r,f=c/o;return a+s*f},lerp:function(e,r,n){const a={x:r.x+e*(n.x-r.x),y:r.y+e*(n.y-r.y)};return r.z!==void 0&&n.z!==void 0&&(a.z=r.z+e*(n.z-r.z)),a},pointToString:function(e){let r=e.x+"/"+e.y;return typeof e.z<"u"&&(r+="/"+e.z),r},pointsToString:function(e){return"["+e.map(_e.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-e.x,s=n.y-e.y,c=a*s-i*o,f=a*o+i*s;return ku(c,f)},round:function(e,r){const n=""+e,a=n.indexOf(".");return parseFloat(n.substring(0,a+1+r))},dist:function(e,r){const n=e.x-r.x,a=e.y-r.y;return Pi(n*n+a*a)},closest:function(e,r){let n=cn(2,63),a,i;return e.forEach(function(o,s){i=_e.dist(r,o),i<n&&(n=i,a=s)}),{mdist:n,mpos:a}},abcratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=cn(e,r)+cn(1-e,r),a=n-1;return Eu(a/n)},projectionratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=cn(1-e,r),a=cn(e,r)+n;return n/a},lli8:function(e,r,n,a,i,o,s,c){const f=(e*a-r*n)*(i-s)-(e-n)*(i*c-o*s),d=(e*a-r*n)*(o-c)-(r-a)*(i*c-o*s),h=(e-n)*(o-c)-(r-a)*(i-s);return h==0?!1:{x:f/h,y:d/h}},lli4:function(e,r,n,a){const i=e.x,o=e.y,s=r.x,c=r.y,f=n.x,d=n.y,h=a.x,m=a.y;return _e.lli8(i,o,s,c,f,d,h,m)},lli:function(e,r){return _e.lli4(e,e.c,r,r.c)},makeline:function(e,r){return new lt(e.x,e.y,(e.x+r.x)/2,(e.y+r.y)/2,r.x,r.y)},findbbox:function(e){let r=iy,n=iy,a=oy,i=oy;return e.forEach(function(o){const s=o.bbox();r>s.x.min&&(r=s.x.min),n>s.y.min&&(n=s.y.min),a<s.x.max&&(a=s.x.max),i<s.y.max&&(i=s.y.max)}),{x:{min:r,mid:(r+a)/2,max:a,size:a-r},y:{min:n,mid:(n+i)/2,max:i,size:i-n}}},shapeintersections:function(e,r,n,a,i){if(!_e.bboxoverlap(r,a))return[];const o=[],s=[e.startcap,e.forward,e.back,e.endcap],c=[n.startcap,n.forward,n.back,n.endcap];return s.forEach(function(f){f.virtual||c.forEach(function(d){if(d.virtual)return;const h=f.intersects(d,i);h.length>0&&(h.c1=f,h.c2=d,h.s1=e,h.s2=n,o.push(h))})}),o},makeshape:function(e,r,n){const a=r.points.length,i=e.points.length,o=_e.makeline(r.points[a-1],e.points[0]),s=_e.makeline(e.points[i-1],r.points[0]),c={startcap:o,forward:e,back:r,endcap:s,bbox:_e.findbbox([o,e,r,s])};return c.intersections=function(f){return _e.shapeintersections(c,c.bbox,f,f.bbox,n)},c},getminmax:function(e,r,n){if(!n)return{min:0,max:0};let a=iy,i=oy,o,s;n.indexOf(0)===-1&&(n=[0].concat(n)),n.indexOf(1)===-1&&n.push(1);for(let c=0,f=n.length;c<f;c++)o=n[c],s=e.get(o),s[r]<a&&(a=s[r]),s[r]>i&&(i=s[r]);return{min:a,mid:(a+i)/2,max:i,size:i-a}},align:function(e,r){const n=r.p1.x,a=r.p1.y,i=-ku(r.p2.y-a,r.p2.x-n),o=function(s){return{x:(s.x-n)*Da(i)-(s.y-a)*Rl(i),y:(s.x-n)*Rl(i)+(s.y-a)*Da(i)}};return e.map(o)},roots:function(e,r){r=r||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,a=_e.align(e,r),i=function(M){return 0<=M&&M<=1};if(n===2){const M=a[0].y,R=a[1].y,L=a[2].y,D=M-2*R+L;if(D!==0){const q=-Pi(R*R-M*L),z=-M+R,H=-(q+z)/D,F=-(-q+z)/D;return[H,F].filter(i)}else if(R!==L&&D===0)return[(2*R-L)/(2*R-2*L)].filter(i);return[]}const o=a[0].y,s=a[1].y,c=a[2].y,f=a[3].y;let d=-o+3*s-3*c+f,h=3*o-6*s+3*c,m=-3*o+3*s,g=o;if(_e.approximately(d,0)){if(_e.approximately(h,0))return _e.approximately(m,0)?[]:[-g/m].filter(i);const M=Pi(m*m-4*h*g),R=2*h;return[(M-m)/R,(-m-M)/R].filter(i)}h/=d,m/=d,g/=d;const y=(3*m-h*h)/3,_=y/3,E=(2*h*h*h-9*h*m+27*g)/27,w=E/2,x=w*w+_*_*_;let j,C,T,O,N;if(x<0){const M=-y/3,R=M*M*M,L=Pi(R),D=-E/(2*L),q=D<-1?-1:D>1?1:D,z=Nee(q),H=Au(L),F=2*H;return T=F*Da(z/3)-h/3,O=F*Da((z+Cd)/3)-h/3,N=F*Da((z+2*Cd)/3)-h/3,[T,O,N].filter(i)}else{if(x===0)return j=w<0?Au(-w):-Au(w),T=2*j-h/3,O=-j-h/3,[T,O].filter(i);{const M=Pi(x);return j=Au(-w+M),C=Au(w+M),[j-C-h/3].filter(i)}}},droots:function(e){if(e.length===3){const r=e[0],n=e[1],a=e[2],i=r-2*n+a;if(i!==0){const o=-Pi(n*n-r*a),s=-r+n,c=-(o+s)/i,f=-(-o+s)/i;return[c,f]}else if(n!==a&&i===0)return[(2*n-a)/(2*(n-a))];return[]}if(e.length===2){const r=e[0],n=e[1];return r!==n?[r/(r-n)]:[]}return[]},curvature:function(e,r,n,a,i){let o,s,c,f,d=0,h=0;const m=_e.compute(e,r),g=_e.compute(e,n),y=m.x*m.x+m.y*m.y;if(a?(o=Pi(cn(m.y*g.z-g.y*m.z,2)+cn(m.z*g.x-g.z*m.x,2)+cn(m.x*g.y-g.x*m.y,2)),s=cn(y+m.z*m.z,3/2)):(o=m.x*g.y-m.y*g.x,s=cn(y,3/2)),o===0||s===0)return{k:0,r:0};if(d=o/s,h=s/o,!i){const _=_e.curvature(e-.001,r,n,a,!0).k,E=_e.curvature(e+.001,r,n,a,!0).k;f=(E-d+(d-_))/2,c=(Eu(E-d)+Eu(d-_))/2}return{k:d,r:h,dk:f,adk:c}},inflections:function(e){if(e.length<4)return[];const r=_e.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=r[2].x*r[1].y,a=r[3].x*r[1].y,i=r[1].x*r[2].y,o=r[3].x*r[2].y,s=18*(-3*n+2*a+3*i-o),c=18*(3*n-a-3*i),f=18*(i-n);if(_e.approximately(s,0)){if(!_e.approximately(c,0)){let g=-f/c;if(0<=g&&g<=1)return[g]}return[]}const d=2*s;if(_e.approximately(d,0))return[];const h=c*c-4*s*f;if(h<0)return[];const m=Math.sqrt(h);return[(m-c)/d,-(c+m)/d].filter(function(g){return 0<=g&&g<=1})},bboxoverlap:function(e,r){const n=["x","y"],a=n.length;for(let i=0,o,s,c,f;i<a;i++)if(o=n[i],s=e[o].mid,c=r[o].mid,f=(e[o].size+r[o].size)/2,Eu(s-c)>=f)return!1;return!0},expandbox:function(e,r){r.x.min<e.x.min&&(e.x.min=r.x.min),r.y.min<e.y.min&&(e.y.min=r.y.min),r.z&&r.z.min<e.z.min&&(e.z.min=r.z.min),r.x.max>e.x.max&&(e.x.max=r.x.max),r.y.max>e.y.max&&(e.y.max=r.y.max),r.z&&r.z.max>e.z.max&&(e.z.max=r.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,r,n){const a=e.bbox(),i=r.bbox(),o=1e5,s=n||.5;if(a.x.size+a.y.size<s&&i.x.size+i.y.size<s)return[(o*(e._t1+e._t2)/2|0)/o+"/"+(o*(r._t1+r._t2)/2|0)/o];let c=e.split(.5),f=r.split(.5),d=[{left:c.left,right:f.left},{left:c.left,right:f.right},{left:c.right,right:f.right},{left:c.right,right:f.left}];d=d.filter(function(m){return _e.bboxoverlap(m.left.bbox(),m.right.bbox())});let h=[];return d.length===0||(d.forEach(function(m){h=h.concat(_e.pairiteration(m.left,m.right,s))}),h=h.filter(function(m,g){return h.indexOf(m)===g})),h},getccenter:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-r.x,s=n.y-r.y,c=a*Da(Ri)-i*Rl(Ri),f=a*Rl(Ri)+i*Da(Ri),d=o*Da(Ri)-s*Rl(Ri),h=o*Rl(Ri)+s*Da(Ri),m=(e.x+r.x)/2,g=(e.y+r.y)/2,y=(r.x+n.x)/2,_=(r.y+n.y)/2,E=m+c,w=g+f,x=y+d,j=_+h,C=_e.lli8(m,g,E,w,y,_,x,j),T=_e.dist(C,e);let O=ku(e.y-C.y,e.x-C.x),N=ku(r.y-C.y,r.x-C.x),M=ku(n.y-C.y,n.x-C.x),R;return O<M?((O>N||N>M)&&(O+=Cd),O>M&&(R=M,M=O,O=R)):M<N&&N<O?(R=M,M=O,O=R):M+=Cd,C.s=O,C.e=M,C.r=T,C},numberSort:function(e,r){return e-r}};class Zu{constructor(r){this.curves=[],this._3d=!1,r&&(this.curves=r,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(r){return _e.pointsToString(r.points)}).join(", ")+"]"}addCurve(r){this.curves.push(r),this._3d=this._3d||r._3d}length(){return this.curves.map(function(r){return r.length()}).reduce(function(r,n){return r+n})}curve(r){return this.curves[r]}bbox(){const r=this.curves;for(var n=r[0].bbox(),a=1;a<r.length;a++)_e.expandbox(n,r[a].bbox());return n}offset(r){const n=[];return this.curves.forEach(function(a){n.push(...a.offset(r))}),new Zu(n)}}const{abs:ju,min:dT,max:hT,cos:Ree,sin:Dee,acos:Lee,sqrt:Cu}=Math,Iee=Math.PI;class lt{constructor(r){let n=r&&r.forEach?r:Array.from(arguments).slice(),a=!1;if(typeof n[0]=="object"){a=n.length;const y=[];n.forEach(function(_){["x","y","z"].forEach(function(E){typeof _[E]<"u"&&y.push(_[E])})}),n=y}let i=!1;const o=n.length;if(a){if(a>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!i&&(o===9||o===12)||r&&r[0]&&typeof r[0].z<"u",c=this.points=[];for(let y=0,_=s?3:2;y<o;y+=_){var f={x:n[y],y:n[y+1]};s&&(f.z=n[y+2]),c.push(f)}const d=this.order=c.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const m=_e.align(c,{p1:c[0],p2:c[d]}),g=_e.dist(c[0],c[d]);this._linear=m.reduce((y,_)=>y+ju(_.y),0)<g/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(r,n,a,i){if(typeof i>"u"&&(i=.5),i===0)return new lt(n,n,a);if(i===1)return new lt(r,n,n);const o=lt.getABC(2,r,n,a,i);return new lt(r,o.A,a)}static cubicFromPoints(r,n,a,i,o){typeof i>"u"&&(i=.5);const s=lt.getABC(3,r,n,a,i);typeof o>"u"&&(o=_e.dist(n,s.C));const c=o*(1-i)/i,f=_e.dist(r,a),d=(a.x-r.x)/f,h=(a.y-r.y)/f,m=o*d,g=o*h,y=c*d,_=c*h,E={x:n.x-m,y:n.y-g},w={x:n.x+y,y:n.y+_},x=s.A,j={x:x.x+(E.x-x.x)/(1-i),y:x.y+(E.y-x.y)/(1-i)},C={x:x.x+(w.x-x.x)/i,y:x.y+(w.y-x.y)/i},T={x:r.x+(j.x-r.x)/i,y:r.y+(j.y-r.y)/i},O={x:a.x+(C.x-a.x)/(1-i),y:a.y+(C.y-a.y)/(1-i)};return new lt(r,T,O,a)}static getUtils(){return _e}getUtils(){return lt.getUtils()}static get PolyBezier(){return Zu}valueOf(){return this.toString()}toString(){return _e.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const r=this.points,n=r[0].x,a=r[0].y,i=["M",n,a,this.order===2?"Q":"C"];for(let o=1,s=r.length;o<s;o++)i.push(r[o].x),i.push(r[o].y);return i.join(" ")}setRatios(r){if(r.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=r,this._lut=[]}verify(){const r=this.coordDigest();r!==this._print&&(this._print=r,this.update())}coordDigest(){return this.points.map(function(r,n){return""+n+r.x+r.y+(r.z?r.z:0)}).join("")}update(){this._lut=[],this.dpoints=_e.derive(this.points,this._3d),this.computedirection()}computedirection(){const r=this.points,n=_e.angle(r[0],r[this.order],r[1]);this.clockwise=n>0}length(){return _e.length(this.derivative.bind(this))}static getABC(r=2,n,a,i,o=.5){const s=_e.projectionratio(o,r),c=1-s,f={x:s*n.x+c*i.x,y:s*n.y+c*i.y},d=_e.abcratio(o,r);return{A:{x:a.x+(a.x-f.x)/d,y:a.y+(a.y-f.y)/d},B:a,C:f,S:n,E:i}}getABC(r,n){n=n||this.get(r);let a=this.points[0],i=this.points[this.order];return lt.getABC(this.order,a,n,i,r)}getLUT(r){if(this.verify(),r=r||100,this._lut.length===r+1)return this._lut;this._lut=[],r++,this._lut=[];for(let n=0,a,i;n<r;n++)i=n/(r-1),a=this.compute(i),a.t=i,this._lut.push(a);return this._lut}on(r,n){n=n||5;const a=this.getLUT(),i=[];for(let o=0,s,c=0;o<a.length;o++)s=a[o],_e.dist(s,r)<n&&(i.push(s),c+=o/a.length);return i.length?t/=i.length:!1}project(r){const n=this.getLUT(),a=n.length-1,i=_e.closest(n,r),o=i.mpos,s=(o-1)/a,c=(o+1)/a,f=.1/a;let d=i.mdist,h=s,m=h,g;d+=1;for(let y;h<c+f;h+=f)g=this.compute(h),y=_e.dist(r,g),y<d&&(d=y,m=h);return m=m<0?0:m>1?1:m,g=this.compute(m),g.t=m,g.d=d,g}get(r){return this.compute(r)}point(r){return this.points[r]}compute(r){return this.ratios?_e.computeWithRatios(r,this.points,this.ratios,this._3d):_e.compute(r,this.points,this._3d,this.ratios)}raise(){const r=this.points,n=[r[0]],a=r.length;for(let i=1,o,s;i<a;i++)o=r[i],s=r[i-1],n[i]={x:(a-i)/a*o.x+i/a*s.x,y:(a-i)/a*o.y+i/a*s.y};return n[a]=r[a-1],new lt(n)}derivative(r){return _e.compute(r,this.dpoints[0],this._3d)}dderivative(r){return _e.compute(r,this.dpoints[1],this._3d)}align(){let r=this.points;return new lt(_e.align(r,{p1:r[0],p2:r[r.length-1]}))}curvature(r){return _e.curvature(r,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return _e.inflections(this.points)}normal(r){return this._3d?this.__normal3(r):this.__normal2(r)}__normal2(r){const n=this.derivative(r),a=Cu(n.x*n.x+n.y*n.y);return{t:r,x:-n.y/a,y:n.x/a}}__normal3(r){const n=this.derivative(r),a=this.derivative(r+.01),i=Cu(n.x*n.x+n.y*n.y+n.z*n.z),o=Cu(a.x*a.x+a.y*a.y+a.z*a.z);n.x/=i,n.y/=i,n.z/=i,a.x/=o,a.y/=o,a.z/=o;const s={x:a.y*n.z-a.z*n.y,y:a.z*n.x-a.x*n.z,z:a.x*n.y-a.y*n.x},c=Cu(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=c,s.y/=c,s.z/=c;const f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:r,x:f[0]*n.x+f[1]*n.y+f[2]*n.z,y:f[3]*n.x+f[4]*n.y+f[5]*n.z,z:f[6]*n.x+f[7]*n.y+f[8]*n.z}}hull(r){let n=this.points,a=[],i=[],o=0;for(i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],this.order===3&&(i[o++]=n[3]);n.length>1;){a=[];for(let s=0,c,f=n.length-1;s<f;s++)c=_e.lerp(r,n[s],n[s+1]),i[o++]=c,a.push(c);n=a}return i}split(r,n){if(r===0&&n)return this.split(n).left;if(n===1)return this.split(r).right;const a=this.hull(r),i={left:this.order===2?new lt([a[0],a[3],a[5]]):new lt([a[0],a[4],a[7],a[9]]),right:this.order===2?new lt([a[5],a[4],a[2]]):new lt([a[9],a[8],a[6],a[3]]),span:a};return i.left._t1=_e.map(0,0,1,this._t1,this._t2),i.left._t2=_e.map(r,0,1,this._t1,this._t2),i.right._t1=_e.map(r,0,1,this._t1,this._t2),i.right._t2=_e.map(1,0,1,this._t1,this._t2),n?(n=_e.map(n,r,1,0,1),i.right.split(n).left):i}extrema(){const r={};let n=[];return this.dims.forEach((function(a){let i=function(s){return s[a]},o=this.dpoints[0].map(i);r[a]=_e.droots(o),this.order===3&&(o=this.dpoints[1].map(i),r[a]=r[a].concat(_e.droots(o))),r[a]=r[a].filter(function(s){return s>=0&&s<=1}),n=n.concat(r[a].sort(_e.numberSort))}).bind(this)),r.values=n.sort(_e.numberSort).filter(function(a,i){return n.indexOf(a)===i}),r}bbox(){const r=this.extrema(),n={};return this.dims.forEach((function(a){n[a]=_e.getminmax(this,a,r[a])}).bind(this)),n}overlaps(r){const n=this.bbox(),a=r.bbox();return _e.bboxoverlap(n,a)}offset(r,n){if(typeof n<"u"){const a=this.get(r),i=this.normal(r),o={c:a,n:i,x:a.x+i.x*n,y:a.y+i.y*n};return this._3d&&(o.z=a.z+i.z*n),o}if(this._linear){const a=this.normal(0),i=this.points.map(function(o){const s={x:o.x+r*a.x,y:o.y+r*a.y};return o.z&&a.z&&(s.z=o.z+r*a.z),s});return[new lt(i)]}return this.reduce().map(function(a){return a._linear?a.offset(r)[0]:a.scale(r)})}simple(){if(this.order===3){const i=_e.angle(this.points[0],this.points[3],this.points[1]),o=_e.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&o<0||i<0&&o>0)return!1}const r=this.normal(0),n=this.normal(1);let a=r.x*n.x+r.y*n.y;return this._3d&&(a+=r.z*n.z),ju(Lee(a))<Iee/3}reduce(){let r,n=0,a=0,i=.01,o,s=[],c=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),n=f[0],r=1;r<f.length;r++)a=f[r],o=this.split(n,a),o._t1=n,o._t2=a,s.push(o),n=a;return s.forEach(function(d){for(n=0,a=0;a<=1;)for(a=n+i;a<=1+i;a+=i)if(o=d.split(n,a),!o.simple()){if(a-=i,ju(n-a)<i)return[];o=d.split(n,a),o._t1=_e.map(n,0,1,d._t1,d._t2),o._t2=_e.map(a,0,1,d._t1,d._t2),c.push(o),n=a;break}n<1&&(o=d.split(n,1),o._t1=_e.map(n,0,1,d._t1,d._t2),o._t2=d._t2,c.push(o))}),c}translate(r,n,a){a=typeof a=="number"?a:n;const i=this.order;let o=this.points.map((s,c)=>(1-c/i)*n+c/i*a);return new lt(this.points.map((s,c)=>({x:s.x+r.x*o[c],y:s.y+r.y*o[c]})))}scale(r){const n=this.order;let a=!1;if(typeof r=="function"&&(a=r),a&&n===2)return this.raise().scale(a);const i=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),a?a(0):r,a?a(1):r);const s=a?a(0):r,c=a?a(1):r,f=[this.offset(0,10),this.offset(1,10)],d=[],h=_e.lli4(f[0],f[0].c,f[1],f[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(m){const g=d[m*n]=_e.copy(o[m*n]);g.x+=(m?c:s)*f[m].n.x,g.y+=(m?c:s)*f[m].n.y}),a?([0,1].forEach(function(m){if(!(n===2&&m)){var g=o[m+1],y={x:g.x-h.x,y:g.y-h.y},_=a?a((m+1)/n):r;a&&!i&&(_=-_);var E=Cu(y.x*y.x+y.y*y.y);y.x/=E,y.y/=E,d[m+1]={x:g.x+_*y.x,y:g.y+_*y.y}}}),new lt(d)):([0,1].forEach(m=>{if(n===2&&m)return;const g=d[m*n],y=this.derivative(m),_={x:g.x+y.x,y:g.y+y.y};d[m+1]=_e.lli4(g,_,h,o[m+1])}),new lt(d))}outline(r,n,a,i){if(n=n===void 0?r:n,this._linear){const O=this.normal(0),N=this.points[0],M=this.points[this.points.length-1];let R,L,D;a===void 0&&(a=r,i=n),R={x:N.x+O.x*r,y:N.y+O.y*r},D={x:M.x+O.x*a,y:M.y+O.y*a},L={x:(R.x+D.x)/2,y:(R.y+D.y)/2};const q=[R,L,D];R={x:N.x-O.x*n,y:N.y-O.y*n},D={x:M.x-O.x*i,y:M.y-O.y*i},L={x:(R.x+D.x)/2,y:(R.y+D.y)/2};const z=[D,L,R],H=_e.makeline(z[2],q[0]),F=_e.makeline(q[2],z[0]),X=[H,new lt(q),F,new lt(z)];return new Zu(X)}const o=this.reduce(),s=o.length,c=[];let f=[],d,h=0,m=this.length();const g=typeof a<"u"&&typeof i<"u";function y(O,N,M,R,L){return function(D){const q=R/M,z=(R+L)/M,H=N-O;return _e.map(D,0,1,O+q*H,O+z*H)}}o.forEach(function(O){const N=O.length();g?(c.push(O.scale(y(r,a,m,h,N))),f.push(O.scale(y(-n,-i,m,h,N)))):(c.push(O.scale(r)),f.push(O.scale(-n))),h+=N}),f=f.map(function(O){return d=O.points,d[3]?O.points=[d[3],d[2],d[1],d[0]]:O.points=[d[2],d[1],d[0]],O}).reverse();const _=c[0].points[0],E=c[s-1].points[c[s-1].points.length-1],w=f[s-1].points[f[s-1].points.length-1],x=f[0].points[0],j=_e.makeline(w,_),C=_e.makeline(E,x),T=[j].concat(c).concat([C]).concat(f);return new Zu(T)}outlineshapes(r,n,a){n=n||r;const i=this.outline(r,n).curves,o=[];for(let s=1,c=i.length;s<c/2;s++){const f=_e.makeshape(i[s],i[c-s],a);f.startcap.virtual=s>1,f.endcap.virtual=s<c/2-1,o.push(f)}return o}intersects(r,n){return r?r.p1&&r.p2?this.lineIntersects(r):(r instanceof lt&&(r=r.reduce()),this.curveintersects(this.reduce(),r,n)):this.selfintersects(n)}lineIntersects(r){const n=dT(r.p1.x,r.p2.x),a=dT(r.p1.y,r.p2.y),i=hT(r.p1.x,r.p2.x),o=hT(r.p1.y,r.p2.y);return _e.roots(this.points,r).filter(s=>{var c=this.get(s);return _e.between(c.x,n,i)&&_e.between(c.y,a,o)})}selfintersects(r){const n=this.reduce(),a=n.length-2,i=[];for(let o=0,s,c,f;o<a;o++)c=n.slice(o,o+1),f=n.slice(o+2),s=this.curveintersects(c,f,r),i.push(...s);return i}curveintersects(r,n,a){const i=[];r.forEach(function(s){n.forEach(function(c){s.overlaps(c)&&i.push({left:s,right:c})})});let o=[];return i.forEach(function(s){const c=_e.pairiteration(s.left,s.right,a);c.length>0&&(o=o.concat(c))}),o}arcs(r){return r=r||.5,this._iterate(r,[])}_error(r,n,a,i){const o=(i-a)/4,s=this.get(a+o),c=this.get(i-o),f=_e.dist(r,n),d=_e.dist(r,s),h=_e.dist(r,c);return ju(d-f)+ju(h-f)}_iterate(r,n){let a=0,i=1,o;do{o=0,i=1;let s=this.get(a),c,f,d,h,m=!1,g=!1,y,_=i,E=1;do if(g=m,h=d,_=(a+i)/2,c=this.get(_),f=this.get(i),d=_e.getccenter(s,c,f),d.interval={start:a,end:i},m=this._error(d,s,a,i)<=r,y=g&&!m,y||(E=i),m){if(i>=1){if(d.interval.end=E=1,h=d,i>1){let x={x:d.x+d.r*Ree(d.e),y:d.y+d.r*Dee(d.e)};d.e+=_e.angle({x:d.x,y:d.y},x,this.get(1))}break}i=i+(i-a)/2}else i=_;while(!y&&o++<100);if(o>=100)break;h=h||d,n.push(h),a=E}while(i<1);return n}}function T2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function zee(e){if(Array.isArray(e))return e}function qee(e){if(Array.isArray(e))return T2(e)}function Bee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $ee(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Fee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
82
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hee(e,r){if(e==null)return{};var n,a,i=Gee(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gee(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.includes(a))continue;n[a]=e[a]}return n}function Vee(e,r){return zee(e)||$ee(e,r)||nI(e,r)||Fee()}function Kee(e){return qee(e)||Bee(e)||nI(e)||Uee()}function Yee(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Xee(e){var r=Yee(e,"string");return typeof r=="symbol"?r:r+""}function nI(e,r){if(e){if(typeof e=="string")return T2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T2(e,r):void 0}}var Wee=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(r instanceof Array?r.length?r:[void 0]:[r]).map(function(c){return{keyAccessor:c,isProp:!(c instanceof Function)}}),o=e.reduce(function(c,f){var d=c,h=f;return i.forEach(function(m,g){var y=m.keyAccessor,_=m.isProp,E;if(_){var w=h,x=w[y],j=Hee(w,[y].map(Xee));E=x,h=j}else E=y(h,g);g+1<i.length?(d.hasOwnProperty(E)||(d[E]={}),d=d[E]):n?(d.hasOwnProperty(E)||(d[E]=[]),d[E].push(h)):d[E]=h}),c},{});n instanceof Function&&(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===i.length?Object.keys(f).forEach(function(h){return f[h]=n(f[h])}):Object.values(f).forEach(function(h){return c(h,d+1)})})(o);var s=o;return a&&(s=[],(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===i.length?s.push({keys:d,vals:f}):Object.entries(f).forEach(function(h){var m=Vee(h,2),g=m[0],y=m[1];return c(y,[].concat(Kee(d),[g]))})})(o),r instanceof Array&&r.length===0&&s.length===1&&(s[0].keys=[])),s});function xn(e,r){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(r).domain(e);break}return this}function ei(e,r){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof r=="function"?this.interpolator(r):this.range(r);break}}return this}const N2=Symbol("implicit");function kp(){var e=new L5,r=[],n=[],a=N2;function i(o){let s=e.get(o);if(s===void 0){if(a!==N2)return a;e.set(o,s=r.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return r.slice();r=[],e=new L5;for(const s of o)e.has(s)||e.set(s,r.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return kp(r,n).unknown(a)},xn.apply(i,arguments),i}function oE(){var e=kp().unknown(void 0),r=e.domain,n=e.range,a=0,i=1,o,s,c=!1,f=0,d=0,h=.5;delete e.unknown;function m(){var g=r().length,y=i<a,_=y?i:a,E=y?a:i;o=(E-_)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),_+=(E-_-o*(g-f))*h,s=o*(1-f),c&&(_=Math.round(_),s=Math.round(s));var w=OZ(g).map(function(x){return _+o*x});return n(y?w.reverse():w)}return e.domain=function(g){return arguments.length?(r(g),m()):r()},e.range=function(g){return arguments.length?([a,i]=g,a=+a,i=+i,m()):[a,i]},e.rangeRound=function(g){return[a,i]=g,a=+a,i=+i,c=!0,m()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,m()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),m()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),m()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,m()):d},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),m()):h},e.copy=function(){return oE(r(),[a,i]).round(c).paddingInner(f).paddingOuter(d).align(h)},xn.apply(m(),arguments)}function aI(e){var r=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return aI(r())},e}function Zee(){return aI(oE.apply(null,arguments).paddingInner(1))}function Qee(e){return function(){return e}}function wh(e){return+e}var pT=[0,1];function pr(e){return e}function M2(e,r){return(r-=e=+e)?function(n){return(n-e)/r}:Qee(isNaN(r)?NaN:.5)}function Jee(e,r){var n;return e>r&&(n=e,e=r,r=n),function(a){return Math.max(e,Math.min(r,a))}}function ete(e,r,n){var a=e[0],i=e[1],o=r[0],s=r[1];return i<a?(a=M2(i,a),o=n(s,o)):(a=M2(a,i),o=n(o,s)),function(c){return o(a(c))}}function tte(e,r,n){var a=Math.min(e.length,r.length)-1,i=new Array(a),o=new Array(a),s=-1;for(e[a]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++s<a;)i[s]=M2(e[s],e[s+1]),o[s]=n(r[s],r[s+1]);return function(c){var f=Cc(e,c,1,a)-1;return o[f](i[f](c))}}function Tc(e,r){return r.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ap(){var e=pT,r=pT,n=ss,a,i,o,s=pr,c,f,d;function h(){var g=Math.min(e.length,r.length);return s!==pr&&(s=Jee(e[0],e[g-1])),c=g>2?tte:ete,f=d=null,m}function m(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(a),r,n)))(a(s(g)))}return m.invert=function(g){return s(i((d||(d=c(r,e.map(a),Cn)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,wh),h()):e.slice()},m.range=function(g){return arguments.length?(r=Array.from(g),h()):r.slice()},m.rangeRound=function(g){return r=Array.from(g),n=FS,h()},m.clamp=function(g){return arguments.length?(s=g?!0:pr,h()):s!==pr},m.interpolate=function(g){return arguments.length?(n=g,h()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,y){return a=g,i=y,h()}}function lE(){return Ap()(pr,pr)}function rte(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Sh(e,r){if(!isFinite(e)||e===0)return null;var n=(e=r?e.toExponential(r-1):e.toExponential()).indexOf("e"),a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function Jl(e){return e=Sh(Math.abs(e)),e?e[1]:NaN}function nte(e,r){return function(n,a){for(var i=n.length,o=[],s=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>a&&(c=Math.max(1,a-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>a));)c=e[s=(s+1)%e.length];return o.reverse().join(r)}}function ate(e){return function(r){return r.replace(/[0-9]/g,function(n){return e[+n]})}}var ite=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ic(e){if(!(r=ite.exec(e)))throw new Error("invalid format: "+e);var r;return new sE({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}ic.prototype=sE.prototype;function sE(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+""}sE.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 ote(e){e:for(var r=e.length,n=1,a=-1,i;n<r;++n)switch(e[n]){case".":a=i=n;break;case"0":a===0&&(a=n),i=n;break;default:if(!+e[n])break e;a>0&&(a=0);break}return a>0?e.slice(0,a)+e.slice(i+1):e}var Eh;function lte(e,r){var n=Sh(e,r);if(!n)return Eh=void 0,e.toPrecision(r);var a=n[0],i=n[1],o=i-(Eh=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=a.length;return o===s?a:o>s?a+new Array(o-s+1).join("0"):o>0?a.slice(0,o)+"."+a.slice(o):"0."+new Array(1-o).join("0")+Sh(e,Math.max(0,r+o-1))[0]}function mT(e,r){var n=Sh(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}const vT={"%":(e,r)=>(e*100).toFixed(r),b:e=>Math.round(e).toString(2),c:e=>e+"",d:rte,e:(e,r)=>e.toExponential(r),f:(e,r)=>e.toFixed(r),g:(e,r)=>e.toPrecision(r),o:e=>Math.round(e).toString(8),p:(e,r)=>mT(e*100,r),r:mT,s:lte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function gT(e){return e}var yT=Array.prototype.map,bT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ste(e){var r=e.grouping===void 0||e.thousands===void 0?gT:nte(yT.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",a=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?gT:ate(yT.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(m,g){m=ic(m);var y=m.fill,_=m.align,E=m.sign,w=m.symbol,x=m.zero,j=m.width,C=m.comma,T=m.precision,O=m.trim,N=m.type;N==="n"?(C=!0,N="g"):vT[N]||(T===void 0&&(T=12),O=!0,N="g"),(x||y==="0"&&_==="=")&&(x=!0,y="0",_="=");var M=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?n:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?a:/[%p]/.test(N)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),L=vT[N],D=/[defgprs%]/.test(N);T=T===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function q(z){var H=M,F=R,X,B,Q;if(N==="c")F=L(z)+F,z="";else{z=+z;var te=z<0||1/z<0;if(z=isNaN(z)?f:L(Math.abs(z),T),O&&(z=ote(z)),te&&+z==0&&E!=="+"&&(te=!1),H=(te?E==="("?E:c:E==="-"||E==="("?"":E)+H,F=(N==="s"&&!isNaN(z)&&Eh!==void 0?bT[8+Eh/3]:"")+F+(te&&E==="("?")":""),D){for(X=-1,B=z.length;++X<B;)if(Q=z.charCodeAt(X),48>Q||Q>57){F=(Q===46?i+z.slice(X+1):z.slice(X))+F,z=z.slice(0,X);break}}}C&&!x&&(z=r(z,1/0));var K=H.length+z.length+F.length,de=K<j?new Array(j-K+1).join(y):"";switch(C&&x&&(z=r(de+z,de.length?j-F.length:1/0),de=""),_){case"<":z=H+z+F+de;break;case"=":z=H+de+z+F;break;case"^":z=de.slice(0,K=de.length>>1)+H+z+F+de.slice(K);break;default:z=de+H+z+F;break}return o(z)}return q.toString=function(){return m+""},q}function h(m,g){var y=Math.max(-8,Math.min(8,Math.floor(Jl(g)/3)))*3,_=Math.pow(10,-y),E=d((m=ic(m),m.type="f",m),{suffix:bT[8+y/3]});return function(w){return E(_*w)}}return{format:d,formatPrefix:h}}var Od,uE,iI;ute({thousands:",",grouping:[3],currency:["$",""]});function ute(e){return Od=ste(e),uE=Od.format,iI=Od.formatPrefix,Od}function cte(e){return Math.max(0,-Jl(Math.abs(e)))}function fte(e,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jl(r)/3)))*3-Jl(Math.abs(e)))}function dte(e,r){return e=Math.abs(e),r=Math.abs(r)-e,Math.max(0,Jl(r)-Jl(e))+1}function oI(e,r,n,a){var i=_2(e,r,n),o;switch(a=ic(a??",f"),a.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(r));return a.precision==null&&!isNaN(o=fte(i,s))&&(a.precision=o),iI(a,s)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(o=dte(i,Math.max(Math.abs(e),Math.abs(r))))&&(a.precision=o-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(o=cte(i))&&(a.precision=o-(a.type==="%")*2);break}}return uE(a)}function Gi(e){var r=e.domain;return e.ticks=function(n){var a=r();return b2(a[0],a[a.length-1],n??10)},e.tickFormat=function(n,a){var i=r();return oI(i[0],i[i.length-1],n??10,a)},e.nice=function(n){n==null&&(n=10);var a=r(),i=0,o=a.length-1,s=a[i],c=a[o],f,d,h=10;for(c<s&&(d=s,s=c,c=d,d=i,i=o,o=d);h-- >0;){if(d=x2(s,c,n),d===f)return a[i]=s,a[o]=c,r(a);if(d>0)s=Math.floor(s/d)*d,c=Math.ceil(c/d)*d;else if(d<0)s=Math.ceil(s*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function lI(){var e=lE();return e.copy=function(){return Tc(e,lI())},xn.apply(e,arguments),Gi(e)}function sI(e){var r;function n(a){return a==null||isNaN(a=+a)?r:a}return n.invert=n,n.domain=n.range=function(a){return arguments.length?(e=Array.from(a,wh),n):e.slice()},n.unknown=function(a){return arguments.length?(r=a,n):r},n.copy=function(){return sI(e).unknown(r)},e=arguments.length?Array.from(e,wh):[0,1],Gi(n)}function uI(e,r){e=e.slice();var n=0,a=e.length-1,i=e[n],o=e[a],s;return o<i&&(s=n,n=a,a=s,s=i,i=o,o=s),e[n]=r.floor(i),e[a]=r.ceil(o),e}function xT(e){return Math.log(e)}function _T(e){return Math.exp(e)}function hte(e){return-Math.log(-e)}function pte(e){return-Math.exp(-e)}function mte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function vte(e){return e===10?mte:e===Math.E?Math.exp:r=>Math.pow(e,r)}function gte(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),r=>Math.log(r)/e)}function wT(e){return(r,n)=>-e(-r,n)}function cE(e){const r=e(xT,_T),n=r.domain;let a=10,i,o;function s(){return i=gte(a),o=vte(a),n()[0]<0?(i=wT(i),o=wT(o),e(hte,pte)):e(xT,_T),r}return r.base=function(c){return arguments.length?(a=+c,s()):a},r.domain=function(c){return arguments.length?(n(c),s()):n()},r.ticks=c=>{const f=n();let d=f[0],h=f[f.length-1];const m=h<d;m&&([d,h]=[h,d]);let g=i(d),y=i(h),_,E;const w=c==null?10:+c;let x=[];if(!(a%1)&&y-g<w){if(g=Math.floor(g),y=Math.ceil(y),d>0){for(;g<=y;++g)for(_=1;_<a;++_)if(E=g<0?_/o(-g):_*o(g),!(E<d)){if(E>h)break;x.push(E)}}else for(;g<=y;++g)for(_=a-1;_>=1;--_)if(E=g>0?_/o(-g):_*o(g),!(E<d)){if(E>h)break;x.push(E)}x.length*2<w&&(x=b2(d,h,w))}else x=b2(g,y,Math.min(y-g,w)).map(o);return m?x.reverse():x},r.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=a===10?"s":","),typeof f!="function"&&(!(a%1)&&(f=ic(f)).precision==null&&(f.trim=!0),f=uE(f)),c===1/0)return f;const d=Math.max(1,a*c/r.ticks().length);return h=>{let m=h/o(Math.round(i(h)));return m*a<a-.5&&(m*=a),m<=d?f(h):""}},r.nice=()=>n(uI(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),r}function cI(){const e=cE(Ap()).domain([1,10]);return e.copy=()=>Tc(e,cI()).base(e.base()),xn.apply(e,arguments),e}function ST(e){return function(r){return Math.sign(r)*Math.log1p(Math.abs(r/e))}}function ET(e){return function(r){return Math.sign(r)*Math.expm1(Math.abs(r))*e}}function fE(e){var r=1,n=e(ST(r),ET(r));return n.constant=function(a){return arguments.length?e(ST(r=+a),ET(r)):r},Gi(n)}function fI(){var e=fE(Ap());return e.copy=function(){return Tc(e,fI()).constant(e.constant())},xn.apply(e,arguments)}function kT(e){return function(r){return r<0?-Math.pow(-r,e):Math.pow(r,e)}}function yte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function bte(e){return e<0?-e*e:e*e}function dE(e){var r=e(pr,pr),n=1;function a(){return n===1?e(pr,pr):n===.5?e(yte,bte):e(kT(n),kT(1/n))}return r.exponent=function(i){return arguments.length?(n=+i,a()):n},Gi(r)}function hE(){var e=dE(Ap());return e.copy=function(){return Tc(e,hE()).exponent(e.exponent())},xn.apply(e,arguments),e}function xte(){return hE.apply(null,arguments).exponent(.5)}function AT(e){return Math.sign(e)*e*e}function _te(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function dI(){var e=lE(),r=[0,1],n=!1,a;function i(o){var s=_te(e(o));return isNaN(s)?a:n?Math.round(s):s}return i.invert=function(o){return e.invert(AT(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((r=Array.from(o,wh)).map(AT)),i):r.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return dI(e.domain(),r).round(n).clamp(e.clamp()).unknown(a)},xn.apply(i,arguments),Gi(i)}function hI(){var e=[],r=[],n=[],a;function i(){var s=0,c=Math.max(1,r.length);for(n=new Array(c-1);++s<c;)n[s-1]=CZ(e,s/c);return o}function o(s){return s==null||isNaN(s=+s)?a:r[Cc(n,s)]}return o.invertExtent=function(s){var c=r.indexOf(s);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let c of s)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort($i),i()},o.range=function(s){return arguments.length?(r=Array.from(s),i()):r.slice()},o.unknown=function(s){return arguments.length?(a=s,o):a},o.quantiles=function(){return n.slice()},o.copy=function(){return hI().domain(e).range(r).unknown(a)},xn.apply(o,arguments)}function pI(){var e=0,r=1,n=1,a=[.5],i=[0,1],o;function s(f){return f!=null&&f<=f?i[Cc(a,f,0,n)]:o}function c(){var f=-1;for(a=new Array(n);++f<n;)a[f]=((f+1)*r-(f-n)*e)/(n+1);return s}return s.domain=function(f){return arguments.length?([e,r]=f,e=+e,r=+r,c()):[e,r]},s.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},s.invertExtent=function(f){var d=i.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,a[0]]:d>=n?[a[n-1],r]:[a[d-1],a[d]]},s.unknown=function(f){return arguments.length&&(o=f),s},s.thresholds=function(){return a.slice()},s.copy=function(){return pI().domain([e,r]).range(i).unknown(o)},xn.apply(Gi(s),arguments)}function mI(){var e=[.5],r=[0,1],n,a=1;function i(o){return o!=null&&o<=o?r[Cc(e,o,0,a)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),a=Math.min(e.length,r.length-1),i):e.slice()},i.range=function(o){return arguments.length?(r=Array.from(o),a=Math.min(e.length,r.length-1),i):r.slice()},i.invertExtent=function(o){var s=r.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return mI().domain(e).range(r).unknown(n)},xn.apply(i,arguments)}const ly=new Date,sy=new Date;function Dt(e,r,n,a){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),r(o,1),e(o),o),i.round=o=>{const s=i(o),c=i.ceil(o);return o-s<c-o?s:c},i.offset=(o,s)=>(r(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<s)||!(c>0))return f;let d;do f.push(d=new Date(+o)),r(o,c),e(o);while(d<o&&o<s);return f},i.filter=o=>Dt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,c)=>{if(s>=s)if(c<0)for(;++c<=0;)for(;r(s,-1),!o(s););else for(;--c>=0;)for(;r(s,1),!o(s););}),n&&(i.count=(o,s)=>(ly.setTime(+o),sy.setTime(+s),e(ly),e(sy),Math.floor(n(ly,sy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(a?s=>a(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const kh=Dt(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);kh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Dt(r=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e):kh);kh.range;const Ba=1e3,pn=Ba*60,$a=pn*60,Ka=$a*24,pE=Ka*7,jT=Ka*30,uy=Ka*365,ko=Dt(e=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Ba)},(e,r)=>(r-e)/Ba,e=>e.getUTCSeconds());ko.range;const mE=Dt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba)},(e,r)=>{e.setTime(+e+r*pn)},(e,r)=>(r-e)/pn,e=>e.getMinutes());mE.range;const vE=Dt(e=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*pn)},(e,r)=>(r-e)/pn,e=>e.getUTCMinutes());vE.range;const gE=Dt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba-e.getMinutes()*pn)},(e,r)=>{e.setTime(+e+r*$a)},(e,r)=>(r-e)/$a,e=>e.getHours());gE.range;const yE=Dt(e=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*$a)},(e,r)=>(r-e)/$a,e=>e.getUTCHours());yE.range;const Nc=Dt(e=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*pn)/Ka,e=>e.getDate()-1);Nc.range;const jp=Dt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ka,e=>e.getUTCDate()-1);jp.range;const vI=Dt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Ka,e=>Math.floor(e/Ka));vI.range;function $o(e){return Dt(r=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*pn)/pE)}const Cp=$o(0),Ah=$o(1),wte=$o(2),Ste=$o(3),es=$o(4),Ete=$o(5),kte=$o(6);Cp.range;Ah.range;wte.range;Ste.range;es.range;Ete.range;kte.range;function Fo(e){return Dt(r=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/pE)}const Op=Fo(0),jh=Fo(1),Ate=Fo(2),jte=Fo(3),ts=Fo(4),Cte=Fo(5),Ote=Fo(6);Op.range;jh.range;Ate.range;jte.range;ts.range;Cte.range;Ote.range;const bE=Dt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,e=>e.getMonth());bE.range;const xE=Dt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xE.range;const Ya=Dt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ya.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dt(r=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});Ya.range;const Xa=Dt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Xa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dt(r=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});Xa.range;function gI(e,r,n,a,i,o){const s=[[ko,1,Ba],[ko,5,5*Ba],[ko,15,15*Ba],[ko,30,30*Ba],[o,1,pn],[o,5,5*pn],[o,15,15*pn],[o,30,30*pn],[i,1,$a],[i,3,3*$a],[i,6,6*$a],[i,12,12*$a],[a,1,Ka],[a,2,2*Ka],[n,1,pE],[r,1,jT],[r,3,3*jT],[e,1,uy]];function c(d,h,m){const g=h<d;g&&([d,h]=[h,d]);const y=m&&typeof m.range=="function"?m:f(d,h,m),_=y?y.range(d,+h+1):[];return g?_.reverse():_}function f(d,h,m){const g=Math.abs(h-d)/m,y=YS(([,,w])=>w).right(s,g);if(y===s.length)return e.every(_2(d/uy,h/uy,m));if(y===0)return kh.every(Math.max(_2(d,h,m),1));const[_,E]=s[g/s[y-1][2]<s[y][2]/g?y-1:y];return _.every(E)}return[c,f]}const[Tte,Nte]=gI(Xa,xE,Op,vI,yE,vE),[Mte,Pte]=gI(Ya,bE,Cp,Nc,gE,mE);function cy(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function fy(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ou(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function Rte(e){var r=e.dateTime,n=e.date,a=e.time,i=e.periods,o=e.days,s=e.shortDays,c=e.months,f=e.shortMonths,d=Tu(i),h=Nu(i),m=Tu(o),g=Nu(o),y=Tu(s),_=Nu(s),E=Tu(c),w=Nu(c),x=Tu(f),j=Nu(f),C={a:Q,A:te,b:K,B:de,c:null,d:PT,e:PT,f:nre,g:hre,G:mre,H:ere,I:tre,j:rre,L:yI,m:are,M:ire,p:U,q:J,Q:LT,s:IT,S:ore,u:lre,U:sre,V:ure,w:cre,W:fre,x:null,X:null,y:dre,Y:pre,Z:vre,"%":DT},T={a:le,A:$,b:Y,B:G,c:null,d:RT,e:RT,f:xre,g:Tre,G:Mre,H:gre,I:yre,j:bre,L:xI,m:_re,M:wre,p:he,q:xe,Q:LT,s:IT,S:Sre,u:Ere,U:kre,V:Are,w:jre,W:Cre,x:null,X:null,y:Ore,Y:Nre,Z:Pre,"%":DT},O={a:D,A:q,b:z,B:H,c:F,d:NT,e:NT,f:Wte,g:TT,G:OT,H:MT,I:MT,j:Vte,L:Xte,m:Gte,M:Kte,p:L,q:Hte,Q:Qte,s:Jte,S:Yte,u:qte,U:Bte,V:$te,w:zte,W:Fte,x:X,X:B,y:TT,Y:OT,Z:Ute,"%":Zte};C.x=N(n,C),C.X=N(a,C),C.c=N(r,C),T.x=N(n,T),T.X=N(a,T),T.c=N(r,T);function N(Z,se){return function(ge){var ee=[],be=-1,ce=0,ye=Z.length,we,ke,Ke;for(ge instanceof Date||(ge=new Date(+ge));++be<ye;)Z.charCodeAt(be)===37&&(ee.push(Z.slice(ce,be)),(ke=CT[we=Z.charAt(++be)])!=null?we=Z.charAt(++be):ke=we==="e"?" ":"0",(Ke=se[we])&&(we=Ke(ge,ke)),ee.push(we),ce=be+1);return ee.push(Z.slice(ce,be)),ee.join("")}}function M(Z,se){return function(ge){var ee=Ou(1900,void 0,1),be=R(ee,Z,ge+="",0),ce,ye;if(be!=ge.length)return null;if("Q"in ee)return new Date(ee.Q);if("s"in ee)return new Date(ee.s*1e3+("L"in ee?ee.L:0));if(se&&!("Z"in ee)&&(ee.Z=0),"p"in ee&&(ee.H=ee.H%12+ee.p*12),ee.m===void 0&&(ee.m="q"in ee?ee.q:0),"V"in ee){if(ee.V<1||ee.V>53)return null;"w"in ee||(ee.w=1),"Z"in ee?(ce=fy(Ou(ee.y,0,1)),ye=ce.getUTCDay(),ce=ye>4||ye===0?jh.ceil(ce):jh(ce),ce=jp.offset(ce,(ee.V-1)*7),ee.y=ce.getUTCFullYear(),ee.m=ce.getUTCMonth(),ee.d=ce.getUTCDate()+(ee.w+6)%7):(ce=cy(Ou(ee.y,0,1)),ye=ce.getDay(),ce=ye>4||ye===0?Ah.ceil(ce):Ah(ce),ce=Nc.offset(ce,(ee.V-1)*7),ee.y=ce.getFullYear(),ee.m=ce.getMonth(),ee.d=ce.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),ye="Z"in ee?fy(Ou(ee.y,0,1)).getUTCDay():cy(Ou(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(ye+5)%7:ee.w+ee.U*7-(ye+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,fy(ee)):cy(ee)}}function R(Z,se,ge,ee){for(var be=0,ce=se.length,ye=ge.length,we,ke;be<ce;){if(ee>=ye)return-1;if(we=se.charCodeAt(be++),we===37){if(we=se.charAt(be++),ke=O[we in CT?se.charAt(be++):we],!ke||(ee=ke(Z,ge,ee))<0)return-1}else if(we!=ge.charCodeAt(ee++))return-1}return ee}function L(Z,se,ge){var ee=d.exec(se.slice(ge));return ee?(Z.p=h.get(ee[0].toLowerCase()),ge+ee[0].length):-1}function D(Z,se,ge){var ee=y.exec(se.slice(ge));return ee?(Z.w=_.get(ee[0].toLowerCase()),ge+ee[0].length):-1}function q(Z,se,ge){var ee=m.exec(se.slice(ge));return ee?(Z.w=g.get(ee[0].toLowerCase()),ge+ee[0].length):-1}function z(Z,se,ge){var ee=x.exec(se.slice(ge));return ee?(Z.m=j.get(ee[0].toLowerCase()),ge+ee[0].length):-1}function H(Z,se,ge){var ee=E.exec(se.slice(ge));return ee?(Z.m=w.get(ee[0].toLowerCase()),ge+ee[0].length):-1}function F(Z,se,ge){return R(Z,r,se,ge)}function X(Z,se,ge){return R(Z,n,se,ge)}function B(Z,se,ge){return R(Z,a,se,ge)}function Q(Z){return s[Z.getDay()]}function te(Z){return o[Z.getDay()]}function K(Z){return f[Z.getMonth()]}function de(Z){return c[Z.getMonth()]}function U(Z){return i[+(Z.getHours()>=12)]}function J(Z){return 1+~~(Z.getMonth()/3)}function le(Z){return s[Z.getUTCDay()]}function $(Z){return o[Z.getUTCDay()]}function Y(Z){return f[Z.getUTCMonth()]}function G(Z){return c[Z.getUTCMonth()]}function he(Z){return i[+(Z.getUTCHours()>=12)]}function xe(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var se=N(Z+="",C);return se.toString=function(){return Z},se},parse:function(Z){var se=M(Z+="",!1);return se.toString=function(){return Z},se},utcFormat:function(Z){var se=N(Z+="",T);return se.toString=function(){return Z},se},utcParse:function(Z){var se=M(Z+="",!0);return se.toString=function(){return Z},se}}}var CT={"-":"",_:" ",0:"0"},Ut=/^\s*\d+/,Dte=/^%/,Lte=/[\\^$*+?|[\]().{}]/g;function He(e,r,n){var a=e<0?"-":"",i=(a?-e:e)+"",o=i.length;return a+(o<n?new Array(n-o+1).join(r)+i:i)}function Ite(e){return e.replace(Lte,"\\$&")}function Tu(e){return new RegExp("^(?:"+e.map(Ite).join("|")+")","i")}function Nu(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function zte(e,r,n){var a=Ut.exec(r.slice(n,n+1));return a?(e.w=+a[0],n+a[0].length):-1}function qte(e,r,n){var a=Ut.exec(r.slice(n,n+1));return a?(e.u=+a[0],n+a[0].length):-1}function Bte(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.U=+a[0],n+a[0].length):-1}function $te(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.V=+a[0],n+a[0].length):-1}function Fte(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.W=+a[0],n+a[0].length):-1}function OT(e,r,n){var a=Ut.exec(r.slice(n,n+4));return a?(e.y=+a[0],n+a[0].length):-1}function TT(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function Ute(e,r,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return a?(e.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function Hte(e,r,n){var a=Ut.exec(r.slice(n,n+1));return a?(e.q=a[0]*3-3,n+a[0].length):-1}function Gte(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function NT(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function Vte(e,r,n){var a=Ut.exec(r.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function MT(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function Kte(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function Yte(e,r,n){var a=Ut.exec(r.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function Xte(e,r,n){var a=Ut.exec(r.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function Wte(e,r,n){var a=Ut.exec(r.slice(n,n+6));return a?(e.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function Zte(e,r,n){var a=Dte.exec(r.slice(n,n+1));return a?n+a[0].length:-1}function Qte(e,r,n){var a=Ut.exec(r.slice(n));return a?(e.Q=+a[0],n+a[0].length):-1}function Jte(e,r,n){var a=Ut.exec(r.slice(n));return a?(e.s=+a[0],n+a[0].length):-1}function PT(e,r){return He(e.getDate(),r,2)}function ere(e,r){return He(e.getHours(),r,2)}function tre(e,r){return He(e.getHours()%12||12,r,2)}function rre(e,r){return He(1+Nc.count(Ya(e),e),r,3)}function yI(e,r){return He(e.getMilliseconds(),r,3)}function nre(e,r){return yI(e,r)+"000"}function are(e,r){return He(e.getMonth()+1,r,2)}function ire(e,r){return He(e.getMinutes(),r,2)}function ore(e,r){return He(e.getSeconds(),r,2)}function lre(e){var r=e.getDay();return r===0?7:r}function sre(e,r){return He(Cp.count(Ya(e)-1,e),r,2)}function bI(e){var r=e.getDay();return r>=4||r===0?es(e):es.ceil(e)}function ure(e,r){return e=bI(e),He(es.count(Ya(e),e)+(Ya(e).getDay()===4),r,2)}function cre(e){return e.getDay()}function fre(e,r){return He(Ah.count(Ya(e)-1,e),r,2)}function dre(e,r){return He(e.getFullYear()%100,r,2)}function hre(e,r){return e=bI(e),He(e.getFullYear()%100,r,2)}function pre(e,r){return He(e.getFullYear()%1e4,r,4)}function mre(e,r){var n=e.getDay();return e=n>=4||n===0?es(e):es.ceil(e),He(e.getFullYear()%1e4,r,4)}function vre(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+He(r/60|0,"0",2)+He(r%60,"0",2)}function RT(e,r){return He(e.getUTCDate(),r,2)}function gre(e,r){return He(e.getUTCHours(),r,2)}function yre(e,r){return He(e.getUTCHours()%12||12,r,2)}function bre(e,r){return He(1+jp.count(Xa(e),e),r,3)}function xI(e,r){return He(e.getUTCMilliseconds(),r,3)}function xre(e,r){return xI(e,r)+"000"}function _re(e,r){return He(e.getUTCMonth()+1,r,2)}function wre(e,r){return He(e.getUTCMinutes(),r,2)}function Sre(e,r){return He(e.getUTCSeconds(),r,2)}function Ere(e){var r=e.getUTCDay();return r===0?7:r}function kre(e,r){return He(Op.count(Xa(e)-1,e),r,2)}function _I(e){var r=e.getUTCDay();return r>=4||r===0?ts(e):ts.ceil(e)}function Are(e,r){return e=_I(e),He(ts.count(Xa(e),e)+(Xa(e).getUTCDay()===4),r,2)}function jre(e){return e.getUTCDay()}function Cre(e,r){return He(jh.count(Xa(e)-1,e),r,2)}function Ore(e,r){return He(e.getUTCFullYear()%100,r,2)}function Tre(e,r){return e=_I(e),He(e.getUTCFullYear()%100,r,2)}function Nre(e,r){return He(e.getUTCFullYear()%1e4,r,4)}function Mre(e,r){var n=e.getUTCDay();return e=n>=4||n===0?ts(e):ts.ceil(e),He(e.getUTCFullYear()%1e4,r,4)}function Pre(){return"+0000"}function DT(){return"%"}function LT(e){return+e}function IT(e){return Math.floor(+e/1e3)}var Dl,wI,SI;Rre({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Rre(e){return Dl=Rte(e),wI=Dl.format,Dl.parse,SI=Dl.utcFormat,Dl.utcParse,Dl}function Dre(e){return new Date(e)}function Lre(e){return e instanceof Date?+e:+new Date(+e)}function _E(e,r,n,a,i,o,s,c,f,d){var h=lE(),m=h.invert,g=h.domain,y=d(".%L"),_=d(":%S"),E=d("%I:%M"),w=d("%I %p"),x=d("%a %d"),j=d("%b %d"),C=d("%B"),T=d("%Y");function O(N){return(f(N)<N?y:c(N)<N?_:s(N)<N?E:o(N)<N?w:a(N)<N?i(N)<N?x:j:n(N)<N?C:T)(N)}return h.invert=function(N){return new Date(m(N))},h.domain=function(N){return arguments.length?g(Array.from(N,Lre)):g().map(Dre)},h.ticks=function(N){var M=g();return e(M[0],M[M.length-1],N??10)},h.tickFormat=function(N,M){return M==null?O:d(M)},h.nice=function(N){var M=g();return(!N||typeof N.range!="function")&&(N=r(M[0],M[M.length-1],N??10)),N?g(uI(M,N)):h},h.copy=function(){return Tc(h,_E(e,r,n,a,i,o,s,c,f,d))},h}function Ire(){return xn.apply(_E(Mte,Pte,Ya,bE,Cp,Nc,gE,mE,ko,wI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zre(){return xn.apply(_E(Tte,Nte,Xa,xE,Op,jp,yE,vE,ko,SI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Tp(){var e=0,r=1,n,a,i,o,s=pr,c=!1,f;function d(m){return m==null||isNaN(m=+m)?f:s(i===0?.5:(m=(o(m)-n)*i,c?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,r]=m,n=o(e=+e),a=o(r=+r),i=n===a?0:1/(a-n),d):[e,r]},d.clamp=function(m){return arguments.length?(c=!!m,d):c},d.interpolator=function(m){return arguments.length?(s=m,d):s};function h(m){return function(g){var y,_;return arguments.length?([y,_]=g,s=m(y,_),d):[s(0),s(1)]}}return d.range=h(ss),d.rangeRound=h(FS),d.unknown=function(m){return arguments.length?(f=m,d):f},function(m){return o=m,n=m(e),a=m(r),i=n===a?0:1/(a-n),d}}function Vi(e,r){return r.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function EI(){var e=Gi(Tp()(pr));return e.copy=function(){return Vi(e,EI())},ei.apply(e,arguments)}function kI(){var e=cE(Tp()).domain([1,10]);return e.copy=function(){return Vi(e,kI()).base(e.base())},ei.apply(e,arguments)}function AI(){var e=fE(Tp());return e.copy=function(){return Vi(e,AI()).constant(e.constant())},ei.apply(e,arguments)}function wE(){var e=dE(Tp());return e.copy=function(){return Vi(e,wE()).exponent(e.exponent())},ei.apply(e,arguments)}function qre(){return wE.apply(null,arguments).exponent(.5)}function jI(){var e=[],r=pr;function n(a){if(a!=null&&!isNaN(a=+a))return r((Cc(e,a,1)-1)/(e.length-1))}return n.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let i of a)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($i),n},n.interpolator=function(a){return arguments.length?(r=a,n):r},n.range=function(){return e.map((a,i)=>r(i/(e.length-1)))},n.quantiles=function(a){return Array.from({length:a+1},(i,o)=>jZ(e,o/a))},n.copy=function(){return jI(r).domain(e)},ei.apply(n,arguments)}function Np(){var e=0,r=.5,n=1,a=1,i,o,s,c,f,d=pr,h,m=!1,g;function y(E){return isNaN(E=+E)?g:(E=.5+((E=+h(E))-o)*(a*E<a*o?c:f),d(m?Math.max(0,Math.min(1,E)):E))}y.domain=function(E){return arguments.length?([e,r,n]=E,i=h(e=+e),o=h(r=+r),s=h(n=+n),c=i===o?0:.5/(o-i),f=o===s?0:.5/(s-o),a=o<i?-1:1,y):[e,r,n]},y.clamp=function(E){return arguments.length?(m=!!E,y):m},y.interpolator=function(E){return arguments.length?(d=E,y):d};function _(E){return function(w){var x,j,C;return arguments.length?([x,j,C]=w,d=ZX(E,[x,j,C]),y):[d(0),d(.5),d(1)]}}return y.range=_(ss),y.rangeRound=_(FS),y.unknown=function(E){return arguments.length?(g=E,y):g},function(E){return h=E,i=E(e),o=E(r),s=E(n),c=i===o?0:.5/(o-i),f=o===s?0:.5/(s-o),a=o<i?-1:1,y}}function CI(){var e=Gi(Np()(pr));return e.copy=function(){return Vi(e,CI())},ei.apply(e,arguments)}function OI(){var e=cE(Np()).domain([.1,1,10]);return e.copy=function(){return Vi(e,OI()).base(e.base())},ei.apply(e,arguments)}function TI(){var e=fE(Np());return e.copy=function(){return Vi(e,TI()).constant(e.constant())},ei.apply(e,arguments)}function SE(){var e=dE(Np());return e.copy=function(){return Vi(e,SE()).exponent(e.exponent())},ei.apply(e,arguments)}function Bre(){return SE.apply(null,arguments).exponent(.5)}function $re(e){for(var r=e.length/6|0,n=new Array(r),a=0;a<r;)n[a]="#"+e.slice(a*6,++a*6);return n}const Fre=$re("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Ure(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Hre=`.force-graph-container canvas {
|
|
84
|
+
display: block;
|
|
85
|
+
user-select: none;
|
|
86
|
+
outline: none;
|
|
87
|
+
-webkit-tap-highlight-color: transparent;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.force-graph-container .clickable {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.force-graph-container .grabbable {
|
|
95
|
+
cursor: move;
|
|
96
|
+
cursor: grab;
|
|
97
|
+
cursor: -moz-grab;
|
|
98
|
+
cursor: -webkit-grab;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.force-graph-container .grabbable:active {
|
|
102
|
+
cursor: grabbing;
|
|
103
|
+
cursor: -moz-grabbing;
|
|
104
|
+
cursor: -webkit-grabbing;
|
|
105
|
+
}
|
|
106
|
+
`;Ure(Hre);function P2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function Gre(e){if(Array.isArray(e))return e}function Vre(e){if(Array.isArray(e))return P2(e)}function zT(e,r,n){if(NI())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var i=new(e.bind.apply(e,a));return i}function oc(e,r,n){return(r=Qre(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function NI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NI=function(){return!!e})()}function Kre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yre(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Xre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
107
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
108
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qT(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ll(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qT(Object(n),!0).forEach(function(a){oc(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Qu(e,r){return Gre(e)||Yre(e,r)||MI(e,r)||Xre()}function hn(e){return Vre(e)||Kre(e)||MI(e)||Wre()}function Zre(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Qre(e){var r=Zre(e,"string");return typeof r=="symbol"?r:r+""}function R2(e){"@babel/helpers - typeof";return R2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R2(e)}function MI(e,r){if(e){if(typeof e=="string")return P2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P2(e,r):void 0}}var Jre=kp(Fre);function BT(e,r,n){!r||typeof n!="string"||e.filter(function(a){return!a[n]}).forEach(function(a){a[n]=Jre(r(a))})}function ene(e,r){var n=e.nodes,a=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.nodeFilter,s=o===void 0?function(){return!0}:o,c=i.onLoopError,f=c===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:c,d={};n.forEach(function(y){return d[r(y)]={data:y,out:[],depth:-1,skip:!s(y)}}),a.forEach(function(y){var _=y.source,E=y.target,w=T(_),x=T(E);if(!d.hasOwnProperty(w))throw"Missing source node with id: ".concat(w);if(!d.hasOwnProperty(x))throw"Missing target node with id: ".concat(x);var j=d[w],C=d[x];j.out.push(C);function T(O){return R2(O)==="object"?r(O):O}});var h=[];g(Object.values(d));var m=Object.assign.apply(Object,[{}].concat(hn(Object.entries(d).filter(function(y){var _=Qu(y,2),E=_[1];return!E.skip}).map(function(y){var _=Qu(y,2),E=_[0],w=_[1];return oc({},E,w.depth)}))));return m;function g(y){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=function(){var T=y[x];if(_.indexOf(T)!==-1){var O=[].concat(hn(_.slice(_.indexOf(T))),[T]).map(function(N){return r(N.data)});return h.some(function(N){return N.length===O.length&&N.every(function(M,R){return M===O[R]})})||(h.push(O),f(O)),1}E>T.depth&&(T.depth=E,g(T.out,[].concat(hn(_),[T]),E+(T.skip?0:1)))},x=0,j=y.length;x<j;x++)w()}}var tne=2,ir=function(r,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},$T=function(r,n){if(!n.isShadow){var a=Ve(n.linkDirectionalParticles);n.graphData.links.forEach(function(i){var o=Math.round(Math.abs(a(i)));o?i.__photons=hn(Array(o)).map(function(){return{}}):delete i.__photons})}},Ch=XS({props:{graphData:{default:{nodes:[],links:[]},onChange:function(r,n){n.engineRunning=!1,$T(r,n)}},dagMode:{onChange:function(r,n){!r&&(n.graphData.nodes||[]).forEach(function(a){return a.fx=a.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(r){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:ir},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:ir},nodeColor:{default:"color",triggerUpdate:!1,onChange:ir},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:ir},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:ir},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:ir},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:ir},linkColor:{default:"color",triggerUpdate:!1,onChange:ir},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:ir},linkWidth:{default:1,triggerUpdate:!1,onChange:ir},linkCurvature:{default:0,triggerUpdate:!1,onChange:ir},linkCanvasObject:{triggerUpdate:!1,onChange:ir},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:ir},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:ir},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:ir},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:ir},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:$T},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaDecay(r)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaTarget(r)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.velocityDecay(r)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(r,n,a){return a===void 0?r.forceLayout.force(n):(r.forceLayout.force(n,a),this)},d3ReheatSimulation:function(r){return r.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(r){return r.cntTicks=0,r.startTickTime=new Date,r.engineRunning=!0,this},isEngineRunning:function(r){return!!r.engineRunning},tickFrame:function(r){return!r.isShadow&&n(),i(),!r.isShadow&&o(),!r.isShadow&&s(),a(),this;function n(){r.engineRunning&&(++r.cntTicks>r.cooldownTicks||new Date-r.startTickTime>r.cooldownTime||r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin?(r.engineRunning=!1,r.onEngineStop()):(r.forceLayout.tick(),r.onEngineTick()))}function a(){var c=Ve(r.nodeVisibility),f=Ve(r.nodeVal),d=Ve(r.nodeColor),h=Ve(r.nodeCanvasObjectMode),m=r.ctx,g=r.isShadow/r.globalScale,y=r.graphData.nodes.filter(c);m.save(),y.forEach(function(_){var E=h(_);if(r.nodeCanvasObject&&(E==="before"||E==="replace")&&(r.nodeCanvasObject(_,m,r.globalScale),E==="replace")){m.restore();return}var w=Math.sqrt(Math.max(0,f(_)||1))*r.nodeRelSize+g;m.beginPath(),m.arc(_.x,_.y,w,0,2*Math.PI,!1),m.fillStyle=d(_)||"rgba(31, 120, 180, 0.92)",m.fill(),r.nodeCanvasObject&&E==="after"&&r.nodeCanvasObject(_,r.ctx,r.globalScale)}),m.restore()}function i(){var c=Ve(r.linkVisibility),f=Ve(r.linkColor),d=Ve(r.linkWidth),h=Ve(r.linkLineDash),m=Ve(r.linkCurvature),g=Ve(r.linkCanvasObjectMode),y=r.ctx,_=r.isShadow*2,E=r.graphData.links.filter(c);E.forEach(N);var w=[],x=[],j=E;if(r.linkCanvasObject){var C=[],T=[];E.forEach(function(M){return({before:w,after:x,replace:C}[g(M)]||T).push(M)}),j=[].concat(hn(w),x,T),w=w.concat(C)}y.save(),w.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();var O=Wee(j,[f,d,h]);y.save(),Object.entries(O).forEach(function(M){var R=Qu(M,2),L=R[0],D=R[1],q=!L||L==="undefined"?"rgba(0,0,0,0.15)":L;Object.entries(D).forEach(function(z){var H=Qu(z,2),F=H[0],X=H[1],B=(F||1)/r.globalScale+_;Object.entries(X).forEach(function(Q){var te=Qu(Q,2);te[0];var K=te[1],de=h(K[0]);y.beginPath(),K.forEach(function(U){var J=U.source,le=U.target;if(!(!J||!le||!J.hasOwnProperty("x")||!le.hasOwnProperty("x"))){y.moveTo(J.x,J.y);var $=U.__controlPoints;$?y[$.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,hn($).concat([le.x,le.y])):y.lineTo(le.x,le.y)}}),y.strokeStyle=q,y.lineWidth=B,y.setLineDash(de||[]),y.stroke()})})}),y.restore(),y.save(),x.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();function N(M){var R=m(M);if(!R){M.__controlPoints=null;return}var L=M.source,D=M.target;if(!(!L||!D||!L.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var q=Math.sqrt(Math.pow(D.x-L.x,2)+Math.pow(D.y-L.y,2));if(q>0){var z=Math.atan2(D.y-L.y,D.x-L.x),H=q*R,F={x:(L.x+D.x)/2+H*Math.cos(z-Math.PI/2),y:(L.y+D.y)/2+H*Math.sin(z-Math.PI/2)};M.__controlPoints=[F.x,F.y]}else{var X=R*70;M.__controlPoints=[D.x,D.y-X,D.x+X,D.y]}}}}function o(){var c=1.6,f=.2,d=Ve(r.linkDirectionalArrowLength),h=Ve(r.linkDirectionalArrowRelPos),m=Ve(r.linkVisibility),g=Ve(r.linkDirectionalArrowColor||r.linkColor),y=Ve(r.nodeVal),_=r.ctx;_.save(),r.graphData.links.filter(m).forEach(function(E){var w=d(E);if(!(!w||w<0)){var x=E.source,j=E.target;if(!(!x||!j||!x.hasOwnProperty("x")||!j.hasOwnProperty("x"))){var C=Math.sqrt(Math.max(0,y(x)||1))*r.nodeRelSize,T=Math.sqrt(Math.max(0,y(j)||1))*r.nodeRelSize,O=Math.min(1,Math.max(0,h(E))),N=g(E)||"rgba(0,0,0,0.28)",M=w/c/2,R=E.__controlPoints&&zT(lt,[x.x,x.y].concat(hn(E.__controlPoints),[j.x,j.y])),L=R?function(B){return R.get(B)}:function(B){return{x:x.x+(j.x-x.x)*B||0,y:x.y+(j.y-x.y)*B||0}},D=R?R.length():Math.sqrt(Math.pow(j.x-x.x,2)+Math.pow(j.y-x.y,2)),q=C+w+(D-C-T-w)*O,z=L(q/D),H=L((q-w)/D),F=L((q-w*(1-f))/D),X=Math.atan2(z.y-H.y,z.x-H.x)-Math.PI/2;_.beginPath(),_.moveTo(z.x,z.y),_.lineTo(H.x+M*Math.cos(X),H.y+M*Math.sin(X)),_.lineTo(F.x,F.y),_.lineTo(H.x-M*Math.cos(X),H.y-M*Math.sin(X)),_.fillStyle=N,_.fill()}}}),_.restore()}function s(){var c=Ve(r.linkDirectionalParticles),f=Ve(r.linkDirectionalParticleSpeed),d=Ve(r.linkDirectionalParticleOffset),h=Ve(r.linkDirectionalParticleWidth),m=Ve(r.linkVisibility),g=Ve(r.linkDirectionalParticleColor||r.linkColor),y=r.ctx;y.save(),r.graphData.links.filter(m).forEach(function(_){var E=c(_);if(!(!_.hasOwnProperty("__photons")||!_.__photons.length)){var w=_.source,x=_.target;if(!(!w||!x||!w.hasOwnProperty("x")||!x.hasOwnProperty("x"))){var j=f(_),C=Math.abs(d(_)),T=_.__photons||[],O=Math.max(0,h(_)/2)/Math.sqrt(r.globalScale),N=g(_)||"rgba(0,0,0,0.28)";y.fillStyle=N;var M=_.__controlPoints?zT(lt,[w.x,w.y].concat(hn(_.__controlPoints),[x.x,x.y])):null,R=0,L=!1;T.forEach(function(D){var q=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=q?0:(R+C)/E),!q&&R++,D.__progressRatio+=j,D.__progressRatio>=1)if(!q)D.__progressRatio=D.__progressRatio%1;else{L=!0;return}var z=D.__progressRatio,H=M?M.get(z):{x:w.x+(x.x-w.x)*z||0,y:w.y+(x.y-w.y)*z||0};r.linkDirectionalParticleCanvasObject?r.linkDirectionalParticleCanvasObject(H.x,H.y,_,y,r.globalScale):(y.beginPath(),y.arc(H.x,H.y,O,0,2*Math.PI,!1),y.fill())}),L&&(_.__photons=_.__photons.filter(function(D){return!D.__singleHop||D.__progressRatio<=1}))}}}),y.restore()}},emitParticle:function(r,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:jee().force("link",bee()).force("charge",Cee()).force("center",bJ()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(r,n){n.ctx=r},update:function(r,n){r.engineRunning=!1,r.onUpdate(),r.nodeAutoColorBy!==null&&BT(r.graphData.nodes,Ve(r.nodeAutoColorBy),r.nodeColor),r.linkAutoColorBy!==null&&BT(r.graphData.links,Ve(r.linkAutoColorBy),r.linkColor),r.graphData.links.forEach(function(g){g.source=g[r.linkSource],g.target=g[r.linkTarget]}),r.forceLayout.stop().alpha(1).nodes(r.graphData.nodes);var a=r.forceLayout.force("link");a&&a.id(function(g){return g[r.nodeId]}).links(r.graphData.links);var i=r.dagMode&&ene(r.graphData,function(g){return g[r.nodeId]},{nodeFilter:r.dagNodeFilter,onLoopError:r.onDagError||void 0}),o=Math.max.apply(Math,hn(Object.values(i||[]))),s=r.dagLevelDistance||r.graphData.nodes.length/(o||1)*tne*(["radialin","radialout"].indexOf(r.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["lr","rl"].includes(n.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return delete g[c]})}if(["lr","rl","td","bu"].includes(r.dagMode)){var f=["rl","bu"].includes(r.dagMode),d=function(y){return(i[y[r.nodeId]]-o/2)*s*(f?-1:1)},h=["lr","rl"].includes(r.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return g[h]=d(g)})}r.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(r.dagMode)!==-1?Oee(function(g){var y=i[g[r.nodeId]]||-1;return(r.dagMode==="radialin"?o-y:y)*s}).strength(function(g){return r.dagNodeFilter(g)?1:0}):null);for(var m=0;m<r.warmupTicks&&!(r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin);m++)r.forceLayout.tick();this.resetCountdown(),r.onFinishUpdate()}});function PI(e,r){var n=e instanceof Array?e:[e],a=new r;return a._destructor&&a._destructor(),{linkProp:function(o){return{default:a[o](),onChange:function(c,f){n.forEach(function(d){return f[d][o](c)})},triggerUpdate:!1}},linkMethod:function(o){return function(s){for(var c=arguments.length,f=new Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];var h=[];return n.forEach(function(m){var g=s[m],y=g[o].apply(g,f);y!==g&&h.push(y)}),h.length?h[0]:this}}}}var rne=800,nne=4,ane=5,RI=PI("forceGraph",Ch),ine=PI(["forceGraph","shadowGraph"],Ch),one=Object.assign.apply(Object,hn(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return oc({},e,RI.linkProp(e))})).concat(hn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return oc({},e,ine.linkProp(e))})))),lne=Object.assign.apply(Object,hn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return oc({},e,RI.linkMethod(e))})));function dy(e){if(e.canvas){var r=e.canvas.width,n=e.canvas.height;r===300&&n===150&&(r=n=0);var a=window.devicePixelRatio;r/=a,n/=a,[e.canvas,e.shadowCanvas].forEach(function(o){o.style.width="".concat(e.width,"px"),o.style.height="".concat(e.height,"px"),o.width=e.width*a,o.height=e.height*a,!r&&!n&&o.getContext("2d").scale(a,a)});var i=Kn(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-r)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function DI(e){var r=window.devicePixelRatio;e.setTransform(r,0,0,r,0,0)}function FT(e,r,n){e.save(),DI(e),e.clearRect(0,0,r,n),e.restore()}var sne=XS({props:Ll({width:{default:window.innerWidth,onChange:function(r,n){return dy(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(r,n){return dy(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(r,n){[r.nodes,r.links].every(function(i){return(i||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&n.colorTracker.reset(),[{type:"Node",objs:r.nodes},{type:"Link",objs:r.links}].forEach(a),n.forceGraph.graphData(r),n.shadowGraph.graphData(r);function a(i){var o=i.type,s=i.objs;s.filter(function(c){if(!c.hasOwnProperty("__indexColor"))return!0;var f=n.colorTracker.lookup(c.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==c}).forEach(function(c){c.__indexColor=n.colorTracker.register({type:o,d:c})})}},triggerUpdate:!1},backgroundColor:{onChange:function(r,n){n.canvas&&r&&(n.canvas.style.background=r)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(r,n){n.shadowGraph.nodeCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(r,n){n.shadowGraph.linkCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(r,n){n.zoom.scaleExtent([r,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(r,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],r])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(r,n){n.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},one),aliases:{stopAnimation:"pauseAnimation"},methods:Ll({graph2ScreenCoords:function(r,n,a){var i=Kn(r.canvas);return{x:n*i.k+i.x,y:a*i.k+i.y}},screen2GraphCoords:function(r,n,a){var i=Kn(r.canvas);return{x:(n-i.x)/i.k,y:(a-i.y)/i.k}},centerAt:function(r,n,a,i){if(!r.canvas)return null;if(n!==void 0||a!==void 0){var o=Object.assign({},n!==void 0?{x:n}:{},a!==void 0?{y:a}:{});return i?r.tweenGroup.add(new $5(s()).to(o,i).easing(Oo.Quadratic.Out).onUpdate(c).onComplete(function(){r.tweenGroup.remove(this)}).start()):c(o),this}return s();function s(){var f=Kn(r.canvas);return{x:(r.width/2-f.x)/f.k,y:(r.height/2-f.y)/f.k}}function c(f){var d=f.x,h=f.y;r.zoom.translateTo(r.zoom.__baseElem,d===void 0?s().x:d,h===void 0?s().y:h),r.needsRedraw=!0}},zoom:function(r,n,a){if(!r.canvas)return null;if(n!==void 0)return a?r.tweenGroup.add(new $5({k:i()}).to({k:n},a).easing(Oo.Quadratic.Out).onUpdate(function(s){var c=s.k;return o(c)}).onComplete(function(){r.tweenGroup.remove(this)}).start()):o(n),this;return i();function i(){return Kn(r.canvas).k}function o(s){r.zoom.scaleTo(r.zoom.__baseElem,s),r.needsRedraw=!0}},zoomToFit:function(r){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,o=new Array(i>3?i-3:0),s=3;s<i;s++)o[s-3]=arguments[s];var c=this.getGraphBbox.apply(this,o);if(c){var f={x:(c.x[0]+c.x[1])/2,y:(c.y[0]+c.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(r.width-a*2)/(c.x[1]-c.x[0]),(r.height-a*2)/(c.y[1]-c.y[0])));this.centerAt(f.x,f.y,n),this.zoom(d,n)}return this},getGraphBbox:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},a=Ve(r.nodeVal),i=function(c){return Math.sqrt(Math.max(0,a(c)||1))*r.nodeRelSize},o=r.graphData.nodes.filter(n).map(function(s){return{x:s.x,y:s.y,r:i(s)}});return o.length?{x:[ph(o,function(s){return s.x-s.r}),hh(o,function(s){return s.x+s.r})],y:[ph(o,function(s){return s.y-s.r}),hh(o,function(s){return s.y+s.r})]}:null},pauseAnimation:function(r){return r.animationFrameRequestId&&(cancelAnimationFrame(r.animationFrameRequestId),r.animationFrameRequestId=null),this},resumeAnimation:function(r){return r.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},lne),stateInit:function(){return{lastSetZoom:1,zoom:mZ(),forceGraph:new Ch,shadowGraph:new Ch().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new WQ,tweenGroup:new DL}},init:function(r,n){var a=this;r.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",r.appendChild(i),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),i.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var o=n.canvas.getContext("2d"),s=n.shadowCanvas.getContext("2d",{willReadFrequently:!0}),c={x:-1e12,y:-1e12},f=function(){var m=null,g=window.devicePixelRatio,y=c.x>0&&c.y>0?s.getImageData(c.x*g,c.y*g,1,1):null;return y&&(m=n.colorTracker.lookup(y.data)),m};dn(n.canvas).call(xX().subject(function(){if(!n.enableNodeDrag)return null;var h=f();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var m=h.subject;m.__initialDragPos={x:m.x,y:m.y,fx:m.fx,fy:m.fy},h.active||(m.fx=m.x,m.fy=m.y),n.canvas.classList.add("grabbable")}).on("drag",function(h){var m=h.subject,g=m.__initialDragPos,y=h,_=Kn(n.canvas).k,E={x:g.x+(y.x-g.x)/_-m.x,y:g.y+(y.y-g.y)/_-m.y};["x","y"].forEach(function(w){return m["f".concat(w)]=m[w]=g[w]+(y[w]-g[w])/_}),!(!m.__dragged&&ane>=Math.sqrt(TZ(["x","y"].map(function(w){return Math.pow(h[w]-g[w],2)}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,m.__dragged=!0,n.onNodeDrag(m,E))}).on("end",function(h){var m=h.subject,g=m.__initialDragPos,y={x:m.x-g.x,y:m.y-g.y};g.fx===void 0&&(m.fx=void 0),g.fy===void 0&&(m.fy=void 0),delete m.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),n.isPointerDragging=!1,m.__dragged&&(delete m.__dragged,n.onNodeDragEnd(m,y))})),n.zoom(n.zoom.__baseElem=dn(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter(function(h){return!h.button&&n.enableZoomPanInteraction&&(h.type!=="wheel"||Ve(n.enableZoomInteraction)(h))&&(h.type==="wheel"||Ve(n.enablePanInteraction)(h))}).on("zoom",function(h){var m=h.transform;[o,s].forEach(function(g){DI(g),g.translate(m.x,m.y),g.scale(m.k,m.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(Ll(Ll({},m),a.centerAt())),n.needsRedraw=!0}).on("end",function(h){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(Ll(Ll({},h.transform),a.centerAt()))}),dy(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){Kn(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=nne/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new yJ(i),["pointermove","pointerdown"].forEach(function(h){return i.addEventListener(h,function(m){h==="pointerdown"&&(n.isPointerPressed=!0,n.pointerDownEvent=m),!n.isPointerDragging&&m.type==="pointermove"&&n.onBackgroundClick&&(m.pressure>0||n.isPointerPressed)&&(m.pointerType==="mouse"||m.movementX===void 0||[m.movementX,m.movementY].some(function(_){return Math.abs(_)>1}))&&(n.isPointerDragging=!0);var g=y(i);c.x=m.pageX-g.left,c.y=m.pageY-g.top;function y(_){var E=_.getBoundingClientRect(),w=window.pageXOffset||document.documentElement.scrollLeft,x=window.pageYOffset||document.documentElement.scrollTop;return{top:E.top+x,left:E.left+w}}},{passive:!0})}),i.addEventListener("pointerup",function(h){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var m=[h,n.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(n.hoverObj){var g=n["on".concat(n.hoverObj.type,"Click")];g&&g.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,m);if(h.button===2)if(n.hoverObj){var y=n["on".concat(n.hoverObj.type,"RightClick")];y&&y.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,m)})}},{passive:!0}),i.addEventListener("contextmenu",function(h){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(h.preventDefault(),!1)}),n.forceGraph(o),n.shadowGraph(s);var d=nQ(function(){FT(s,n.width,n.height),n.shadowGraph.linkWidth(function(m){return Ve(n.linkWidth)(m)+n.linkHoverPrecision});var h=Kn(n.canvas);n.shadowGraph.globalScale(h.k).tickFrame()},rne);n.flushShadowCanvas=d.flush,(this._animationCycle=function h(){var m=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(C){return C.__photons&&C.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var g=n.isPointerDragging?null:f();if(g!==n.hoverObj){var y=n.hoverObj,_=y?y.type:null,E=g?g.type:null;if(_&&_!==E){var w=n["on".concat(_,"Hover")];w&&w(null,y.d)}if(E){var x=n["on".concat(E,"Hover")];x&&x(g.d,_===E?y.d:null)}n.tooltip.content(g&&Ve(n["".concat(g.type.toLowerCase(),"Label")])(g.d)||null),n.canvas.classList[(g&&n["on".concat(E,"Click")]||!g&&n.onBackgroundClick)&&Ve(n.showPointerCursor)(g==null?void 0:g.d)?"add":"remove"]("clickable"),n.hoverObj=g}m&&d()}if(m){FT(o,n.width,n.height);var j=Kn(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(o,j),n.forceGraph.globalScale(j).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(o,j)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(r){}}),hy={exports:{}},py,UT;function une(){if(UT)return py;UT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return py=e,py}var my,HT;function cne(){if(HT)return my;HT=1;var e=une();function r(){}function n(){}return n.resetWarningCache=r,my=function(){function a(s,c,f,d,h,m){if(m!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}a.isRequired=a;function i(){return a}var o={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:r};return o.PropTypes=o,o},my}var GT;function fne(){return GT||(GT=1,hy.exports=cne()()),hy.exports}var dne=fne();const re=Dn(dne),Mp={width:re.number,height:re.number,graphData:re.shape({nodes:re.arrayOf(re.object).isRequired,links:re.arrayOf(re.object).isRequired}),backgroundColor:re.string,nodeRelSize:re.number,nodeId:re.string,nodeLabel:re.oneOfType([re.string,re.func]),nodeVal:re.oneOfType([re.number,re.string,re.func]),nodeVisibility:re.oneOfType([re.bool,re.string,re.func]),nodeColor:re.oneOfType([re.string,re.func]),nodeAutoColorBy:re.oneOfType([re.string,re.func]),onNodeHover:re.func,onNodeClick:re.func,linkSource:re.string,linkTarget:re.string,linkLabel:re.oneOfType([re.string,re.func]),linkVisibility:re.oneOfType([re.bool,re.string,re.func]),linkColor:re.oneOfType([re.string,re.func]),linkAutoColorBy:re.oneOfType([re.string,re.func]),linkWidth:re.oneOfType([re.number,re.string,re.func]),linkCurvature:re.oneOfType([re.number,re.string,re.func]),linkDirectionalArrowLength:re.oneOfType([re.number,re.string,re.func]),linkDirectionalArrowColor:re.oneOfType([re.string,re.func]),linkDirectionalArrowRelPos:re.oneOfType([re.number,re.string,re.func]),linkDirectionalParticles:re.oneOfType([re.number,re.string,re.func]),linkDirectionalParticleSpeed:re.oneOfType([re.number,re.string,re.func]),linkDirectionalParticleOffset:re.oneOfType([re.number,re.string,re.func]),linkDirectionalParticleWidth:re.oneOfType([re.number,re.string,re.func]),linkDirectionalParticleColor:re.oneOfType([re.string,re.func]),onLinkHover:re.func,onLinkClick:re.func,dagMode:re.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:re.number,dagNodeFilter:re.func,onDagError:re.func,d3AlphaMin:re.number,d3AlphaDecay:re.number,d3VelocityDecay:re.number,warmupTicks:re.number,cooldownTicks:re.number,cooldownTime:re.number,onEngineTick:re.func,onEngineStop:re.func,getGraphBbox:re.func},LI={zoomToFit:re.func,onNodeRightClick:re.func,onNodeDrag:re.func,onNodeDragEnd:re.func,onLinkRightClick:re.func,linkHoverPrecision:re.number,onBackgroundClick:re.func,onBackgroundRightClick:re.func,showPointerCursor:re.oneOfType([re.bool,re.func]),enablePointerInteraction:re.bool,enableNodeDrag:re.bool},EE={showNavInfo:re.bool,nodeOpacity:re.number,nodeResolution:re.number,nodeThreeObject:re.oneOfType([re.object,re.string,re.func]),nodeThreeObjectExtend:re.oneOfType([re.bool,re.string,re.func]),nodePositionUpdate:re.func,linkOpacity:re.number,linkResolution:re.number,linkCurveRotation:re.oneOfType([re.number,re.string,re.func]),linkMaterial:re.oneOfType([re.object,re.string,re.func]),linkThreeObject:re.oneOfType([re.object,re.string,re.func]),linkThreeObjectExtend:re.oneOfType([re.bool,re.string,re.func]),linkPositionUpdate:re.func,linkDirectionalArrowResolution:re.number,linkDirectionalParticleResolution:re.number,linkDirectionalParticleThreeObject:re.oneOfType([re.object,re.string,re.func]),forceEngine:re.oneOf(["d3","ngraph"]),ngraphPhysics:re.object,numDimensions:re.oneOf([1,2,3])},hne=Object.assign({},Mp,LI,{linkLineDash:re.oneOfType([re.arrayOf(re.number),re.string,re.func]),nodeCanvasObjectMode:re.oneOfType([re.string,re.func]),nodeCanvasObject:re.func,nodePointerAreaPaint:re.func,linkCanvasObjectMode:re.oneOfType([re.string,re.func]),linkCanvasObject:re.func,linkPointerAreaPaint:re.func,linkDirectionalParticleCanvasObject:re.func,autoPauseRedraw:re.bool,minZoom:re.number,maxZoom:re.number,enableZoomInteraction:re.oneOfType([re.bool,re.func]),enablePanInteraction:re.oneOfType([re.bool,re.func]),onZoom:re.func,onZoomEnd:re.func,onRenderFramePre:re.func,onRenderFramePost:re.func});Object.assign({},Mp,LI,EE,{enableNavigationControls:re.bool,controlType:re.oneOf(["trackball","orbit","fly"]),rendererConfig:re.object,extraRenderers:re.arrayOf(re.shape({render:re.func.isRequired}))});Object.assign({},Mp,EE,{nodeDesc:re.oneOfType([re.string,re.func]),linkDesc:re.oneOfType([re.string,re.func])});Object.assign({},Mp,EE,{markerAttrs:re.object,yOffset:re.number,glScale:re.number});const kE=MK(sne,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});kE.displayName="ForceGraph2D";kE.propTypes=hne;function Td(e){let r=e.trim().toLowerCase();return r.startsWith("fleet-")&&(r=r.slice(6)),r}const vy=16,pne=4,mne=14,vne=10;function gne({edges:e,agents:r}){const n=k.useRef(void 0),a=k.useRef(null),[i,o]=k.useState({width:500,height:380}),s=k.useRef([]);k.useEffect(()=>{const x=a.current;if(!x)return;const j=new ResizeObserver(T=>{for(const O of T){const{width:N,height:M}=O.contentRect;N>0&&M>0&&o({width:Math.floor(N),height:Math.floor(M)})}});j.observe(x);const C=x.getBoundingClientRect();return C.width>0&&C.height>0&&o({width:Math.floor(C.width),height:Math.floor(C.height)}),()=>j.disconnect()},[]);const c=k.useMemo(()=>{const x=r.find(j=>{const C=Td(j.name);return C==="team-lead"||C==="coordinator"||C==="tl"});return(x==null?void 0:x.name)??(r.length>0?r[0].name:null)},[r]),f=k.useMemo(()=>{const x=r.map(T=>{const O=T.name===c;return{id:T.name,name:T.name,role:T.role,color:Ec(T.name,T.role),isActive:T.isActive,isTL:O,...O?{fx:0,fy:-40}:{}}}),j=[],C=new Map;for(const T of r)C.set(Td(T.name),T.name);for(const T of e){const O=C.get(Td(T.sender))??T.sender,N=C.get(Td(T.recipient))??T.recipient,M=r.some(L=>L.name===O),R=r.some(L=>L.name===N);!M||!R||j.push({source:O,target:N,count:T.count,lastSummary:T.lastSummary})}return{nodes:x,links:j}},[r,e,c]);k.useEffect(()=>{const x=n.current;if(!x||!e.length)return;const j=s.current,C=new Map;for(const T of j)C.set(`${T.sender}->${T.recipient}`,T.count);for(const T of e){const O=`${T.sender}->${T.recipient}`,N=C.get(O)??0;if(T.count>N){const M=f.links.find(R=>{const L=typeof R.source=="object"?R.source.id:R.source,D=typeof R.target=="object"?R.target.id:R.target;return L===T.sender&&D===T.recipient});if(M)try{x.emitParticle(M)}catch{}}}s.current=e},[e,f.links]),k.useEffect(()=>{const x=n.current;if(!x||r.length===0)return;const j=x.d3Force("charge");j&&typeof j.strength=="function"&&j.strength(-200),x.d3Force("collide",gee(vy+20)),x.d3Force("y",Tee(60).strength(.1)),x.d3ReheatSimulation()},[r.length]),k.useEffect(()=>{const x=n.current;if(!x||r.length===0)return;const j=setTimeout(()=>{x.zoomToFit(400,60)},500);return()=>clearTimeout(j)},[r.length]);const d=k.useCallback((x,j,C)=>{const T=x.x??0,O=x.y??0,N=vy,M=mne/C,R=vne/C;j.beginPath(),j.arc(T,O,N,0,2*Math.PI),j.fillStyle=x.color+"66",j.fill(),j.strokeStyle=x.isActive?x.color:"#484F58",j.lineWidth=2/C,j.stroke();const L=T+N*.65,D=O-N*.65,q=pne/C;j.beginPath(),j.arc(L,D,q,0,2*Math.PI),j.fillStyle=x.isActive?"#3FB950":"#484F58",j.fill(),j.strokeStyle="#0D1117",j.lineWidth=1.5/C,j.stroke(),j.font=`bold ${M}px sans-serif`,j.textAlign="center",j.textBaseline="middle",j.fillStyle=x.isActive?x.color:"#484F58",j.fillText(x.name.charAt(0).toUpperCase(),T,O),j.font=`${R}px sans-serif`,j.fillStyle="#8B949E",j.fillText(x.name,T,O+N+10/C),x.role&&(j.font=`${R*.85}px sans-serif`,j.fillStyle="#484F58",j.fillText(x.role,T,O+N+20/C))},[]),h=k.useCallback((x,j,C)=>{const T=x.x??0,O=x.y??0;C.beginPath(),C.arc(T,O,vy+4,0,2*Math.PI),C.fillStyle=j,C.fill()},[]),m=k.useCallback(x=>x.count>=9?3.5:x.count>=4?2:1,[]),g=k.useCallback(x=>"#8B949E",[]),y=k.useCallback(x=>null,[]),_=k.useCallback(x=>{const j=x.lastSummary?`<br/><i>${x.lastSummary}</i>`:"";return`<div style="padding:4px 8px;background:#161B22;border:1px solid #30363D;border-radius:4px;font-size:11px;color:#E6EDF3;">
|
|
109
|
+
<b>${typeof x.source=="object"?x.source.id:x.source}</b>
|
|
110
|
+
→
|
|
111
|
+
<b>${typeof x.target=="object"?x.target.id:x.target}</b>
|
|
112
|
+
<br/>${x.count} message${x.count!==1?"s":""}${j}
|
|
113
|
+
</div>`},[]),E=k.useCallback(x=>x.count>=6?3:x.count>=3?2:x.count>0?1:0,[]),w=k.useCallback(x=>6,[]);return r.length===0?b.jsx("div",{className:"flex items-center justify-center h-full text-dark-muted text-sm",children:"Waiting for agents to join the team..."}):b.jsx("div",{ref:a,className:"relative w-full h-full min-h-[300px]",children:b.jsx(kE,{ref:n,graphData:f,width:i.width,height:i.height,backgroundColor:"transparent",nodeCanvasObject:d,nodeCanvasObjectMode:()=>"replace",nodePointerAreaPaint:h,linkWidth:m,linkColor:g,linkLineDash:y,linkLabel:_,linkDirectionalParticles:E,linkDirectionalParticleWidth:3,linkDirectionalParticleSpeed:.005,linkDirectionalArrowLength:w,linkDirectionalArrowRelPos:1,linkDirectionalArrowColor:g,linkCurvature:.15,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:100,enableZoomInteraction:!0,enablePanInteraction:!0,enableNodeDrag:!0,minZoom:.5,maxZoom:4})})}function yne(e){if(e==null||e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function bne(){var xe;const{selectedTeamId:e,setSelectedTeamId:r,lastEvent:n,lastEventTeamId:a,isThinking:i}=Sc(),o=Ft(),[s,c]=k.useState(null),[f,d]=k.useState(!1),[h,m]=k.useState(null),[g,y]=k.useState(null),[_,E]=k.useState(null),[w,x]=k.useState(null),[j,C]=k.useState(0),[T,O]=k.useState([]),[N,M]=k.useState([]),[R,L]=k.useState("session-log"),[D,q]=k.useState([]),[z,H]=k.useState(!1),[F,X]=k.useState(new Set),B=k.useRef(null),Q=k.useRef(null),te=k.useRef(null),K=k.useRef(e),de=e!==null;k.useEffect(()=>{K.current=e},[e]),k.useEffect(()=>{if(e==null){O([]);return}let Z=!1;async function se(){try{const ge=await o.get(`teams/${e}/transitions`);Z||O(ge)}catch{}}return se(),()=>{Z=!0}},[e,j,o]),k.useEffect(()=>{if(e==null){M([]);return}let Z=!1;async function se(){try{const ge=await o.get(`teams/${e}/roster`);Z||M(ge)}catch{}}return se(),()=>{Z=!0}},[e,j,o]),k.useEffect(()=>{if(e==null){q([]);return}let Z=!1;async function se(){try{const ge=await o.get(`teams/${e}/messages/summary`);Z||q(ge)}catch{}}return se(),()=>{Z=!0}},[e,j,o]),k.useEffect(()=>{L("session-log"),H(!1),X(new Set)},[e]),k.useEffect(()=>{((s==null?void 0:s.status)==="done"||(s==null?void 0:s.status)==="failed")&&H(!0)},[s==null?void 0:s.status]),k.useEffect(()=>{if(e==null){c(null);return}let Z=!1;async function se(){d(!0),m(null);try{const ge=await o.get(`teams/${e}`);Z||c(ge)}catch(ge){Z||m(ge instanceof Error?ge.message:"Failed to load team detail")}finally{Z||d(!1)}}return se(),()=>{Z=!0}},[e,o]),k.useEffect(()=>{if(e==null||!n||a!==e)return;te.current&&clearTimeout(te.current);const Z=e;return te.current=setTimeout(async()=>{try{const se=await o.get(`teams/${Z}`);K.current===Z&&(c(se),C(ge=>ge+1))}catch{}},2e3),()=>{te.current&&(clearTimeout(te.current),te.current=null)}},[n,a,e,o]);const U=k.useCallback(()=>{r(null)},[r]);k.useEffect(()=>{function Z(se){se.key==="Escape"&&de&&U()}return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[de,U]);const J=k.useCallback(Z=>{Q.current&&!Q.current.contains(Z.target)&&U()},[U]),le=k.useCallback(async Z=>{if(!e||g)return;const se=e;y(Z);try{if(await o.post(`teams/${se}/${Z}`),K.current!==se)return;const ge=await o.get(`teams/${se}`);if(K.current!==se)return;c(ge),C(ee=>ee+1)}catch{}finally{y(null)}},[e,g,o]),$=k.useCallback(async Z=>{if(!(!e||!s||_)){E(Z);try{let ge;const ee=B.current;ee&&Date.now()-ee.fetchedAt<6e4?ge=ee.data:(ge=await o.get("message-templates"),B.current={data:ge,fetchedAt:Date.now()});const be=ge.find(ye=>ye.id===Z);if(!be||!be.enabled)return;let ce=be.template;ce=ce.replace(/\{\{ISSUE_NUMBER\}\}/g,String(s.issueNumber)),s.prNumber&&(ce=ce.replace(/\{\{PR_NUMBER\}\}/g,String(s.prNumber))),await o.post(`teams/${e}/send-message`,{message:ce}),x(Z),setTimeout(()=>x(ye=>ye===Z?null:ye),1500)}catch{}finally{E(null)}}},[e,s,_,o]),Y=(s==null?void 0:s.status)==="running"||(s==null?void 0:s.status)==="idle"||(s==null?void 0:s.status)==="stuck"||(s==null?void 0:s.status)==="launching",G=(s==null?void 0:s.status)==="failed",he=s!=null&&s.pr&&s.pr.state!=="merged"&&s.pr.state!=="closed"?s.pr.mergeStatus??null:null;return b.jsxs(b.Fragment,{children:[de&&b.jsx("div",{className:"fixed inset-0 bg-black/40 z-40 transition-opacity",onClick:J,"aria-hidden":"true"}),b.jsxs("div",{ref:Q,className:`fixed top-0 right-0 h-full w-[960px] max-w-full bg-dark-surface border-l border-dark-border z-50 flex flex-col shadow-2xl transition-transform duration-300 ease-in-out ${de?"translate-x-0":"translate-x-full"}`,children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text truncate",children:"Team Detail"}),b.jsx("button",{onClick:U,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close panel (Esc)",children:b.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[f&&!s&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-dark-muted",children:"Loading..."})}),h&&!s&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-[#F85149]",children:h})}),s&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"shrink-0",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>H(Z=>!Z),children:[b.jsxs("h3",{className:"text-base font-semibold text-dark-text",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",s.issueNumber]}),s.issueTitle??"Untitled"]}),b.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[b.jsx(DS,{status:s.status}),b.jsx("svg",{className:`w-4 h-4 text-dark-muted transition-transform duration-200 ${z?"":"rotate-180"}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),b.jsx("div",{className:`overflow-y-auto custom-scrollbar transition-all duration-200 ${z?"max-h-0 overflow-hidden":"max-h-[2000px]"}`,children:b.jsxs("div",{className:"px-5 pb-4 space-y-4",children:[b.jsxs("section",{children:[b.jsxs("div",{className:"flex items-center gap-4 mt-3 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Duration: ",b.jsx("span",{className:"text-dark-text",children:yne(s.durationMin)})]}),s.lastEventAt&&!G&&b.jsxs("span",{className:"text-dark-muted",children:["Last activity: ",b.jsx("span",{className:"text-dark-text",children:(()=>{const Z=Math.floor((Date.now()-new Date(s.lastEventAt).getTime())/6e4);return Z<1?"just now":`${Z}m ago`})()})]})]}),b.jsxs("div",{className:"mt-2 text-xs text-dark-muted",children:[b.jsxs("span",{children:["Worktree: ",s.worktreeName]}),s.branchName&&b.jsxs("span",{className:"ml-3",children:["Branch: ",s.branchName]}),b.jsxs("span",{className:"ml-3",children:["Model: ",s.model??"—"]})]}),s.totalInputTokens+s.totalOutputTokens>0&&b.jsxs("div",{className:"mt-3 flex items-center gap-4 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Input: ",b.jsx("span",{className:"text-dark-text",children:s.totalInputTokens.toLocaleString()})]}),b.jsxs("span",{className:"text-dark-muted",children:["Output: ",b.jsx("span",{className:"text-dark-text",children:s.totalOutputTokens.toLocaleString()})]}),s.totalCacheCreationTokens+s.totalCacheReadTokens>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cache: ",b.jsx("span",{className:"text-dark-text",children:(s.totalCacheCreationTokens+s.totalCacheReadTokens).toLocaleString()})]}),s.totalCostUsd>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cost: ",b.jsxs("span",{className:"text-[#3FB950]",children:["$",s.totalCostUsd.toFixed(4)]})]})]})]}),T.length>0&&b.jsxs("section",{className:"min-w-0",children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"State Transitions"}),b.jsx("div",{className:"flex items-center gap-0 overflow-x-auto pb-1 custom-scrollbar max-w-full",children:T.map((Z,se)=>{const ge=se===0,ee=Wn[Z.toStatus]??"#8B949E",be=(()=>{try{return new Date(Z.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}})();return b.jsxs("div",{className:"flex items-center shrink-0",children:[ge&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex flex-col items-center",children:b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:Wn[Z.fromStatus]??"#8B949E",backgroundColor:(Wn[Z.fromStatus]??"#8B949E")+"18"},children:Z.fromStatus})}),b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]}),b.jsxs("div",{className:"flex flex-col items-center group relative",children:[b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:ee,backgroundColor:ee+"18"},children:Z.toStatus}),b.jsx("span",{className:"text-[9px] text-dark-muted mt-0.5 leading-none",children:be}),Z.reason&&b.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-1 bg-dark-surface border border-dark-border rounded text-[10px] text-dark-text whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg max-w-[240px] truncate",children:Z.reason})]}),se<T.length-1&&b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]},Z.id)})})]}),s.pr&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("div",{className:"flex items-center gap-3 mb-3 text-sm",children:[b.jsxs("span",{className:"text-dark-accent font-medium",children:["PR #",s.pr.number]}),b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded border",style:{color:s.pr.state==="merged"?"#A371F7":s.pr.state==="open"?"#3FB950":s.pr.state==="closed"?"#F85149":"#8B949E",borderColor:(s.pr.state==="merged"?"#A371F7":s.pr.state==="open"?"#3FB950":s.pr.state==="closed"?"#F85149":"#8B949E")+"40"},children:((xe=s.pr.state)==null?void 0:xe.toUpperCase())??"UNKNOWN"}),he&&b.jsxs("span",{className:"text-xs text-dark-muted",children:["Merge: ",he]}),s.pr.autoMerge&&b.jsx("span",{className:"text-xs text-[#3FB950]",children:"Auto-merge"})]}),b.jsxs("div",{className:"ml-1",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide",children:"CI Checks"}),b.jsx("div",{className:"max-h-[120px] overflow-y-auto custom-scrollbar",children:b.jsx(W6,{checks:s.pr.checks??[]})})]})]}),!s.pr&&s.prNumber&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("p",{className:"text-sm text-dark-muted",children:["PR #",s.prNumber," (details loading...)"]})]})]})})]}),b.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[b.jsxs("div",{className:"shrink-0 flex items-center gap-0 px-5 border-b border-dark-border",children:[b.jsx("button",{onClick:()=>L("session-log"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${R==="session-log"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Session Log"}),b.jsx("button",{onClick:()=>L("team"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${R==="team"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Team"})]}),R==="session-log"&&b.jsx("div",{className:"flex-1 min-h-0 flex flex-col px-5 py-3",children:b.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:b.jsx(dK,{teamId:s.id,teamStatus:s.status,isThinking:i(s.id),roster:N,agentFilters:F,onAgentFiltersChange:X})})}),R==="team"&&b.jsx("div",{className:"flex-1 min-h-0 px-5 py-3",children:b.jsx(gne,{edges:D,agents:N})})]}),b.jsxs("div",{className:"shrink-0 border-t border-dark-border px-5 py-4 space-y-4",children:[b.jsx(hK,{teamId:s.id,disabled:!Y}),b.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[b.jsx("span",{className:"text-xs text-dark-muted mr-1",children:"Quick:"}),[{id:"nudge_progress",label:"Status?",color:"#58A6FF"},{id:"check_ci",label:"Fix CI",color:"#F85149",show:!!(s!=null&&s.prNumber)}].filter(Z=>Z.show!==!1).map(Z=>b.jsx("button",{onClick:()=>$(Z.id),disabled:!Y||_!==null,className:"px-2.5 py-1 text-xs rounded-full border transition-colors disabled:opacity-40",style:{color:Z.color,borderColor:Z.color+"40"},title:`Send "${Z.label}" message to TL`,children:_===Z.id?"...":w===Z.id?"Sent!":Z.label},Z.id))]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[Y&&b.jsx("button",{onClick:()=>le("stop"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#F85149]/40 text-[#F85149] hover:bg-[#F85149]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="stop"?"Stopping...":"Stop"}),G&&b.jsx("button",{onClick:()=>le("resume"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="resume"?"Resuming...":"Resume"}),(s==null?void 0:s.status)!=="done"&&b.jsx("button",{onClick:()=>le("restart"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="restart"?"Restarting...":"Restart"}),b.jsxs("button",{onClick:()=>{window.open(`/api/teams/${s.id}/export?format=txt`,"_blank")},className:"px-3 py-1.5 text-sm rounded border border-dark-muted/40 text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors flex items-center gap-1.5",title:"Export team log as text file",children:[b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"}),b.jsx("path",{d:"M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"})]}),"Export Log"]})]})]})]})]})]})]})}const xne={open:{color:"#3FB950",label:"OPEN"},merged:{color:"#A371F7",label:"MERGED"},closed:{color:"#8B949E",label:"CLOSED"},draft:{color:"#8B949E",label:"DRAFT"}},_ne={clean:"#3FB950",behind:"#D29922",blocked:"#F85149",dirty:"#F85149",unstable:"#D29922",has_hooks:"#D29922",draft:"#8B949E",unknown:"#8B949E"};function wne({prNumber:e,teamId:r,onClose:n,githubRepo:a}){const i=Ft(),[o,s]=k.useState(null),[c,f]=k.useState(!0),[d,h]=k.useState(null),[m,g]=k.useState(null),y=k.useRef(null);k.useEffect(()=>{let N=!1;async function M(){f(!0),h(null);try{const R=await i.get(`teams/${r}`);N||s(R)}catch(R){N||h(R instanceof Error?R.message:"Failed to load PR detail")}finally{N||f(!1)}}return M(),()=>{N=!0}},[r,i]),k.useEffect(()=>{function N(M){M.key==="Escape"&&n()}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[n]),k.useEffect(()=>{function N(R){y.current&&!y.current.contains(R.target)&&n()}const M=setTimeout(()=>{document.addEventListener("mousedown",N)},0);return()=>{clearTimeout(M),document.removeEventListener("mousedown",N)}},[n]);const _=k.useCallback(async N=>{if(m)return;const M=N?"enable-auto-merge":"disable-auto-merge";g(M);try{await i.post(`prs/${e}/${M}`);const R=await i.get(`teams/${r}`);s(R)}catch{}finally{g(null)}},[m,i,e,r]),E=k.useCallback(async()=>{if(!m){g("update-branch");try{await i.post(`prs/${e}/update-branch`);const N=await i.get(`teams/${r}`);s(N)}catch{}finally{g(null)}}},[m,i,e,r]),w=(o==null?void 0:o.pr)??null,x=a??(o==null?void 0:o.githubRepo)??null,j=x&&w?`https://github.com/${x}/pull/${w.number}`:null,C=xne[(w==null?void 0:w.state)??""]??{color:"#8B949E",label:"UNKNOWN"},T=_ne[((w==null?void 0:w.mergeStatus)??"unknown").toLowerCase()]??"#8B949E",O=(w==null?void 0:w.state)==="open";return b.jsxs("div",{ref:y,className:"absolute top-full left-0 mt-1.5 z-50 w-[360px] bg-[#1C2128] border border-dark-border rounded-lg shadow-2xl",onClick:N=>N.stopPropagation(),children:[c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-dark-muted text-sm",children:"Loading PR details..."})}),d&&!c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-[#F85149] text-sm",children:d})}),!c&&!d&&w&&b.jsxs("div",{className:"p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[j?b.jsxs("a",{href:j,target:"_blank",rel:"noopener noreferrer",onClick:N=>N.stopPropagation(),className:"text-sm font-semibold text-dark-accent hover:underline",children:["PR #",w.number]}):b.jsxs("span",{className:"text-sm font-semibold text-dark-accent",children:["PR #",w.number]}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-0.5 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[b.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded border",style:{color:C.color,borderColor:C.color+"40",backgroundColor:C.color+"10"},children:C.label}),w.mergeStatus&&w.state!=="merged"&&w.state!=="closed"&&b.jsx("span",{className:"text-xs px-2 py-0.5 rounded border",style:{color:T,borderColor:T+"40",backgroundColor:T+"10"},children:w.mergeStatus.toUpperCase()}),w.autoMerge&&b.jsxs("span",{className:"text-xs text-[#3FB950] flex items-center gap-1",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z"})}),"Auto-merge"]})]}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide font-medium",children:["CI Checks",w.ciFailCount>0&&b.jsxs("span",{className:"ml-1.5 text-[#F85149] normal-case",children:["(",w.ciFailCount," failing)"]})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto custom-scrollbar",children:b.jsx(W6,{checks:w.checks??[]})})]}),O&&b.jsx("div",{className:"pt-2 border-t border-dark-border/50",children:b.jsxs("div",{className:"flex items-center gap-2",children:[w.autoMerge?b.jsx("button",{onClick:()=>_(!1),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="disable-auto-merge"?"Disabling...":"Disable Auto-merge"}):b.jsx("button",{onClick:()=>_(!0),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="enable-auto-merge"?"Enabling...":"Enable Auto-merge"}),b.jsx("button",{onClick:E,disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="update-branch"?"Updating...":"Update Branch"})]})})]}),!c&&!d&&!w&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsxs("span",{className:"text-dark-muted text-sm",children:["PR #",e," details not available"]})})]})}const VT={passing:{icon:"✓",color:"#3FB950"},failing:{icon:"✕",color:"#F85149"},pending:{icon:"○",color:"#D29922"},none:{icon:"—",color:"#8B949E"}},Sne={open:"#3FB950",merged:"#A371F7",closed:"#8B949E",draft:"#8B949E"};function II({prNumber:e,ciStatus:r,teamId:n,prState:a,githubRepo:i}){const[o,s]=k.useState(!1),[c,f]=k.useState(!1),d=k.useCallback(E=>{E.stopPropagation(),e!=null&&n!=null&&s(w=>!w)},[e,n]),h=k.useCallback(()=>{s(!1)},[]);if(e==null)return b.jsx("span",{className:"text-dark-muted text-sm",children:"—"});const m=a==="merged"?{icon:"✓",color:"#A371F7"}:VT[r??"none"]??VT.none,g=n!=null,y=Sne[a??""]??"#8B949E",_=a?a.toUpperCase():null;return b.jsxs("span",{className:"relative inline-flex items-center gap-1.5",children:[b.jsxs("button",{type:"button",onClick:d,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:`inline-flex items-center gap-1.5 ${g?"cursor-pointer hover:bg-dark-border/30 rounded px-1.5 py-0.5 -mx-1.5 -my-0.5 transition-colors":""}`,title:g?"Click to view PR details":void 0,children:[b.jsxs("span",{className:"text-sm text-dark-accent",children:["#",e]}),b.jsx("span",{className:"text-sm font-bold",style:{color:m.color},children:m.icon})]}),c&&!o&&_&&b.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-0.5 text-xs rounded whitespace-nowrap bg-[#1C2128] border border-dark-border shadow-lg pointer-events-none",style:{color:y},children:_}),o&&n!=null&&b.jsx(wne,{prNumber:e,teamId:n,onClose:h,githubRepo:i})]})}function Ene(e){if(e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function kne(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Nd(e){return e<1e3?String(e):e<1e6?(e/1e3).toFixed(e<1e4?1:0)+"K":(e/1e6).toFixed(1)+"M"}function Ane({team:e,selected:r,onClick:n}){const a=Ft(),{isThinking:i}=Sc(),[o,s]=k.useState(!1),[c,f]=k.useState(!1),d=i(e.id),h=async x=>{if(x.stopPropagation(),!o){s(!0);try{await a.post(`teams/${e.id}/stop`)}catch{}finally{s(!1)}}},m=async x=>{if(x.stopPropagation(),!c){f(!0);try{await a.post(`teams/${e.id}/force-launch`)}catch{}finally{f(!1)}}},g=e.status==="running"||e.status==="stuck"||e.status==="idle"||e.status==="launching",y=e.issueTitle?kne(e.issueTitle,40):"Untitled",_=e.status==="done"||e.status==="failed";let E="—",w="text-dark-muted";if(e.lastEventAt&&!_){const x=Date.now()-new Date(e.lastEventAt).getTime(),j=Math.floor(x/6e4);j<1?(E="just now",w="text-[#3FB950]"):j<5?(E=`${j}m ago`,w="text-[#3FB950]"):j<15?(E=`${j}m ago`,w="text-[#D29922]"):(E=`${j}m ago`,w="text-[#F85149]")}return b.jsxs("tr",{onClick:n,className:`h-16 border-b border-dark-border cursor-pointer transition-colors group ${r?"bg-dark-accent/10":"bg-dark-surface hover:bg-[#1C2128]"}`,children:[b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(DS,{status:e.status})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.projectName??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"text-sm",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",e.issueNumber]}),b.jsx("span",{className:"text-dark-text",children:y})]})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.model??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:Ene(e.durationMin??0)})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:d?b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-[#E8976C]",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-[#E8976C] animate-thinking-dot"}),"thinking..."]}):b.jsx("span",{className:`text-sm ${w}`,title:e.lastEventAt??void 0,children:E})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:e.totalInputTokens+e.totalOutputTokens>0?b.jsx("span",{className:"text-sm text-dark-muted",title:`Input: ${Nd(e.totalInputTokens)}, Output: ${Nd(e.totalOutputTokens)}, Cache: ${Nd(e.totalCacheCreationTokens+e.totalCacheReadTokens)}`,children:Nd(e.totalInputTokens+e.totalOutputTokens)}):b.jsx("span",{className:"text-sm text-dark-muted",children:"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(II,{prNumber:e.prNumber,ciStatus:e.ciStatus,teamId:e.id,prState:e.prState,githubRepo:e.githubRepo})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"inline-flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.status==="queued"&&b.jsx("button",{onClick:m,disabled:c,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#D29922] hover:border-[#D29922]/50 transition-colors disabled:opacity-50",title:"Launch immediately despite usage limit",children:c?"Launching…":"Force Launch"}),g&&b.jsx("button",{onClick:h,disabled:o,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-50",title:"Stop team",children:o?"Stopping…":"Stop"})]})})]})}const jne=["Status","Project","Issue","Model","Duration","Activity","Tokens","PR","Actions"];function Cne({teams:e,selectedTeamId:r,onSelectTeam:n}){return b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("table",{className:"w-full table-auto",children:[b.jsx("thead",{children:b.jsx("tr",{className:"border-b border-dark-border",children:jne.map(a=>b.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-dark-muted uppercase tracking-wider",children:a},a))})}),b.jsx("tbody",{children:e.map(a=>b.jsx(Ane,{team:a,selected:r===a.id,onClick:()=>n(a.id)},a.id))})]})})}function KT(e){if(e<1)return"<1m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function One(e,r){return e.toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}function Tne(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Nne({teams:e}){const[r,n]=k.useState(null),[a,i]=k.useState(()=>Date.now());k.useEffect(()=>{const d=setInterval(()=>i(Date.now()),15e3);return()=>clearInterval(d)},[]);const o=k.useMemo(()=>e.filter(d=>d.launchedAt).map(d=>{const h=new Date(d.launchedAt).getTime(),m=d.status==="running"||d.status==="launching"||d.status==="idle"||d.status==="stuck",g=(d.durationMin??0)*6e4,y=m?a:h+g;return{team:d,startMs:h,endMs:y,isRunning:m}}).sort((d,h)=>d.startMs-h.startMs),[e,a]),{rangeStart:s,rangeTotal:c}=k.useMemo(()=>{if(o.length===0)return{rangeStart:a-36e5,rangeTotal:36e5};const d=Math.min(...o.map(y=>y.startMs)),m=Math.max(...o.map(y=>y.endMs),a)-d||36e5,g=m*.05;return{rangeStart:d-g,rangeTotal:m+g*2}},[o,a]),f=k.useMemo(()=>{const h=c/5,m=[];for(let g=0;g<6;g++){const y=s+h*g,_=(y-s)/c*100;m.push({pct:_,text:One(new Date(y))})}return m},[s,c,a]);return o.length===0?b.jsx("div",{className:"flex items-center justify-center h-40 text-dark-muted text-sm",children:"No teams with timeline data"}):b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("div",{className:"min-w-[600px]",children:[o.map(({team:d,startMs:h,endMs:m,isRunning:g})=>{const y=(h-s)/c*100,_=(m-h)/c*100,E=Math.max(_,.5),w=Wn[d.status]??"#8B949E",x=r===d.id,j=d.issueTitle?Tne(d.issueTitle,30):"Untitled";return b.jsxs("div",{className:"flex items-center h-8 group",onMouseEnter:()=>n(d.id),onMouseLeave:()=>n(null),children:[b.jsxs("div",{className:"w-[120px] min-w-[120px] pr-2 text-right text-xs text-dark-muted truncate shrink-0",children:["#",d.issueNumber]}),b.jsxs("div",{className:"relative flex-1 h-5 bg-dark-base rounded overflow-visible",children:[b.jsx("div",{className:`absolute top-0 h-full rounded transition-opacity ${g?"timeline-bar-pulse":""}`,style:{left:`${y}%`,width:`${E}%`,backgroundColor:w,opacity:x?1:.8},children:E>8&&b.jsxs("span",{className:"absolute inset-0 flex items-center px-1.5 text-[10px] font-medium text-dark-base truncate",children:["#",d.issueNumber," ",KT(d.durationMin??0)]})}),x&&b.jsxs("div",{className:"absolute z-50 bottom-full mb-1 px-2.5 py-1.5 rounded bg-dark-surface border border-dark-border text-xs text-dark-text whitespace-nowrap shadow-lg pointer-events-none",style:{left:`${Math.min(y+E/2,90)}%`,transform:"translateX(-50%)"},children:[b.jsxs("div",{className:"font-medium",children:["#",d.issueNumber," ",j]}),b.jsxs("div",{className:"text-dark-muted mt-0.5",children:[d.status," · ",KT(d.durationMin??0)]}),d.prNumber&&b.jsxs("div",{className:"text-dark-muted",children:["PR #",d.prNumber," · CI: ",d.ciStatus??"none"]})]})]})]},d.id)}),b.jsxs("div",{className:"flex items-center h-6 mt-1",children:[b.jsx("div",{className:"w-[120px] min-w-[120px] shrink-0"}),b.jsx("div",{className:"relative flex-1 h-full border-t border-dark-border",children:f.map((d,h)=>b.jsx("span",{className:"absolute top-1 text-[10px] text-dark-muted -translate-x-1/2",style:{left:`${d.pct}%`},children:d.text},h))})]})]})})}const YT={stuck:0,running:1,idle:2,launching:3,queued:4,failed:5,done:6};function Mne(e){return[...e].sort((r,n)=>{const a=YT[r.status]??99,i=YT[n.status]??99;if(a!==i)return a-i;const o=r.launchedAt?new Date(r.launchedAt).getTime():0;return(n.launchedAt?new Date(n.launchedAt).getTime():0)-o})}function Pne(){const{teams:e,selectedTeamId:r,setSelectedTeamId:n}=Sc(),[a,i]=k.useState("grid"),o=k.useMemo(()=>Mne(e),[e]);return o.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No teams"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Launch a team to get started"})]}):b.jsxs("div",{className:"p-4",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3 px-4",children:[b.jsxs("div",{className:"text-xs text-dark-muted",children:[o.length," team",o.length!==1?"s":""]}),b.jsxs("div",{className:"inline-flex rounded border border-dark-border text-xs overflow-hidden",children:[b.jsx("button",{onClick:()=>i("grid"),className:`px-3 py-1 transition-colors ${a==="grid"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Grid"}),b.jsx("button",{onClick:()=>i("timeline"),className:`px-3 py-1 border-l border-dark-border transition-colors ${a==="timeline"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Timeline"})]})]}),a==="grid"?b.jsx(Cne,{teams:o,selectedTeamId:r,onSelectTeam:n}):b.jsx(Nne,{teams:o})]})}function zI(e){const r=[];for(const n of e)n.state==="open"&&r.push({number:n.number,title:n.title}),n.children.length>0&&r.push(...zI(n.children));return r}function qI(e){const r=[];for(const n of e)n.children.length>0?r.push(...qI(n.children)):n.state==="open"&&r.push({number:n.number,title:n.title});return r}function AE(e,r){return[...e].map(n=>({...n,children:AE(n.children,r)})).sort((n,a)=>{var s,c;const i=((s=r.get(n.number))==null?void 0:s.priority)??999,o=((c=r.get(a.number))==null?void 0:c.priority)??999;return i-o})}function BI(){const e=Ft(),[r,n]=k.useState({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set}),a=k.useCallback(async h=>{const m=zI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const E=g.error??"Prioritization returned no data",w=g.text?`
|
|
114
|
+
|
|
115
|
+
CC output: ${g.text}`:"";n(x=>({...x,loading:!1,error:E+w}));return}const y=new Map;for(const E of g.data)y.set(E.number,E);const _=new Set(g.data.map(E=>E.number));n({priorityMap:y,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:_})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),i=k.useCallback(async h=>{const m=qI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const y=g.error??"Prioritization returned no data",_=g.text?`
|
|
116
|
+
|
|
117
|
+
CC output: ${g.text}`:"";n(E=>({...E,loading:!1,error:y+_}));return}n(y=>{const _=new Map(y.priorityMap),E=new Set(y.checkedIssues);for(const w of g.data)_.set(w.number,w),E.add(w.number);return{priorityMap:_,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:E}})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),o=k.useCallback(()=>{n({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set})},[]),s=k.useCallback((h,m)=>{n(g=>{const y=new Set(g.checkedIssues);return m?y.add(h):y.delete(h),{...g,checkedIssues:y}})},[]),c=r.priorityMap.size>0,f=c?[...r.priorityMap.entries()].sort((h,m)=>h[1].priority-m[1].priority).map(([h])=>h):[],d=f.filter(h=>r.checkedIssues.has(h));return{...r,prioritize:a,prioritizeSubtree:i,reset:o,toggleCheck:s,hasPriority:c,sortedIssueNumbers:f,checkedSortedIssueNumbers:d}}const $I="fleet-issue-tree-collapsed";function Rne(){try{const e=localStorage.getItem($I);if(!e)return new Set;const r=JSON.parse(e);if(Array.isArray(r))return new Set(r.filter(n=>typeof n=="string"))}catch{}return new Set}function Dne(e){try{localStorage.setItem($I,JSON.stringify([...e]))}catch{}}function Lne(){const[e,r]=k.useState(()=>Rne()),n=k.useRef(!1);k.useEffect(()=>{if(!n.current){n.current=!0;return}Dne(e)},[e]);const a=k.useCallback(c=>{r(f=>{const d=new Set(f);return d.has(c)?d.delete(c):d.add(c),d})},[]),i=k.useCallback(()=>{r(new Set)},[]),o=k.useCallback(c=>{r(new Set(c))},[]),s=k.useCallback(c=>e.has(c),[e]);return{collapsedNodes:e,toggleCollapse:a,expandAll:i,collapseAll:o,isCollapsed:s}}function Ine({completed:e,total:r}){if(r<=0)return null;const n=Math.round(e/r*100),a=n===100?"#3FB950":n>=50?"#D29922":"#58A6FF";return b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-dark-muted",children:[b.jsx("span",{className:"relative w-16 h-1.5 bg-dark-border rounded-full overflow-hidden",children:b.jsx("span",{className:"absolute inset-y-0 left-0 rounded-full transition-all duration-300",style:{width:`${n}%`,backgroundColor:a}})}),b.jsxs("span",{children:[e,"/",r]})]})}function zne({state:e}){return e==="open"?b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-[#3FB950]",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]})}):b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-dark-muted",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]})})}function qne({dependencies:e}){return!e.blockedBy||e.blockedBy.length===0||e.resolved||e.openCount===0?null:b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-dark-muted cursor-default flex-wrap",children:[b.jsx(HV,{size:12,className:"text-[#F85149] shrink-0"}),b.jsx("span",{children:"blocked by"}),e.blockedBy.map((r,n)=>{const a=`https://github.com/${r.owner}/${r.repo}/issues/${r.number}`,i=r.state==="closed",o=r.title?`${r.title} (${r.state})`:`#${r.number} (${r.state})`;return b.jsxs("span",{children:[b.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:o,className:`hover:text-dark-accent transition-colors ${i?"line-through text-dark-muted/60":"text-dark-muted"}`,onClick:s=>s.stopPropagation(),children:["#",r.number]}),n<e.blockedBy.length-1&&b.jsx("span",{className:"text-dark-muted",children:","})]},`${r.owner}/${r.repo}#${r.number}`)})]})}function Bne({data:e}){let r,n;return e.priority<=3?(r="rgba(248, 81, 73, 0.15)",n="#F85149"):e.priority<=6?(r="rgba(210, 153, 34, 0.15)",n="#D29922"):(r="rgba(139, 148, 158, 0.15)",n="#8B949E"),b.jsxs("span",{className:"inline-flex items-center gap-1 shrink-0 px-1.5 py-0.5 rounded text-xs font-medium cursor-default",style:{backgroundColor:r,color:n},title:`Priority ${e.priority}/10 (${e.category}): ${e.reason}`,children:["P",e.priority]})}const FI=vp.memo(function e({node:r,depth:n,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:s,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:_}){var z;const E=r.number.toString(),w=y!=null&&_!=null,[x,j]=k.useState(n<2),C=w?!y.has(E):x,T=s||C,O=r.children.length>0,N=r.activeTeam!=null,M=!!(r.dependencies&&!r.dependencies.resolved&&r.dependencies.openCount>0),R=i.has(r.number),L=o.get(r.number)??null,D=async H=>{H.stopPropagation(),!R&&await a(r.number,r.title,c)},q=((z=r.prReferences)==null?void 0:z[0])??null;return b.jsxs("div",{children:[b.jsxs("div",{className:`flex items-center gap-2 py-1.5 px-2 rounded hover:bg-dark-surface/80 group transition-colors ${M?"opacity-60 border-l-2 border-[#F85149]":""}`,style:{paddingLeft:`${n*20+8}px`},children:[b.jsx("button",{disabled:!O,onClick:()=>{w?_(E):j(!T)},className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${O?"cursor-pointer hover:text-dark-text":"invisible"} ${T?"rotate-90":""}`,"aria-label":T?"Collapse":"Expand",tabIndex:O?0:-1,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),h&&f&&b.jsx("input",{type:"checkbox",checked:(d==null?void 0:d.has(r.number))??!1,onChange:H=>{H.stopPropagation(),h(r.number,H.target.checked)},className:"w-3.5 h-3.5 shrink-0 accent-dark-accent cursor-pointer","aria-label":`Select issue #${r.number}`}),b.jsx(zne,{state:r.state}),b.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-dark-muted hover:text-dark-accent transition-colors shrink-0",onClick:H=>H.stopPropagation(),children:["#",r.number]}),b.jsx("span",{className:`text-sm truncate ${r.state==="closed"?"text-dark-muted line-through":"text-dark-text"}`,children:r.title}),(f==null?void 0:f.get(r.number))&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Bne,{data:f.get(r.number)})}),R&&b.jsx("span",{className:"shrink-0 ml-1 text-xs text-dark-accent/70 animate-pulse",children:"Launching..."}),N&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(DS,{status:r.activeTeam.status})}),r.dependencies&&!r.dependencies.resolved&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(qne,{dependencies:r.dependencies})}),q&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(II,{prNumber:q.number,ciStatus:q.state??null})}),r.subIssueSummary&&r.subIssueSummary.total>0&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Ine,{completed:r.subIssueSummary.completed,total:r.subIssueSummary.total})}),O&&m&&b.jsxs("button",{onClick:H=>{H.stopPropagation(),m(r.children)},disabled:g,className:`ml-auto shrink-0 transition-opacity inline-flex items-center gap-1 px-1.5 py-0.5 text-xs rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 disabled:opacity-50 disabled:cursor-not-allowed ${g?"opacity-100":"opacity-0 group-hover:opacity-100"}`,title:`Prioritize sub-issues under #${r.number}`,children:[g?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),"Prioritize"]}),!N&&r.state==="open"&&!O&&b.jsx("button",{onClick:D,disabled:R,className:`ml-auto shrink-0 transition-opacity px-1.5 py-0.5 text-xs rounded border disabled:opacity-70 disabled:cursor-not-allowed ${R?"opacity-100":"opacity-0 group-hover:opacity-100"} ${M?"border-[#D29922]/50 text-[#D29922] hover:text-[#D29922] hover:border-[#D29922]":"border-dark-border text-dark-muted hover:text-[#3FB950] hover:border-[#3FB950]/50"}`,title:M?`Launch team for #${r.number} (blocked — will prompt for confirmation)`:`Launch team for #${r.number}`,children:R?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx(IV,{size:12})})]}),L&&b.jsxs("div",{className:"flex items-center gap-1.5 py-1 text-xs text-[#F85149]",style:{paddingLeft:`${n*20+32}px`},children:[b.jsx("svg",{className:"w-3 h-3 shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2.343 13.657A8 8 0 1 1 13.657 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"})}),b.jsx("span",{children:L})]}),O&&T&&b.jsx("div",{children:r.children.map(H=>b.jsx(e,{node:H,depth:n+1,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:s,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:_},H.number))})]})}),gy=[{key:"all",label:"All"},{key:"no-team",label:"No Team"},{key:"blocked-deps",label:"Blocked",color:"#F85149"},{key:"queued",label:"Queued",color:"#58A6FF"},{key:"running",label:"Running",color:"#3FB950"},{key:"idle",label:"Idle",color:"#D29922"},{key:"stuck",label:"Stuck",color:"#F85149"},{key:"done",label:"Done",color:"#A371F7"},{key:"failed",label:"Failed",color:"#F85149"}];function $ne(){var $,Y;const e=Ft(),[r,n]=k.useState([]),[a,i]=k.useState(!0),[o,s]=k.useState(!1),[c,f]=k.useState(null),[d,h]=k.useState(null),[m,g]=k.useState(0),[y,_]=k.useState(new Set),[E,w]=k.useState(new Map),[x,j]=k.useState([]),[C,T]=k.useState([]),[O,N]=k.useState(""),[M,R]=k.useState("all"),L=Lne(),[D,q]=k.useState(null),z=k.useRef(new Set);k.useEffect(()=>()=>{for(const G of z.current)clearTimeout(G);z.current.clear()},[]),k.useEffect(()=>{e.get("projects").then(j).catch(()=>{})},[e]);const H=x.filter(G=>G.status==="active"),F=H.length===1?H[0].id:null,X=k.useCallback(async()=>{try{f(null);const G=await e.get("issues");n(G.tree),T(G.groups??[]),h(G.cachedAt),g(G.count)}catch(G){const he=G instanceof Error?G.message:String(G);f(he)}finally{i(!1)}},[e]);k.useEffect(()=>{X()},[X]);const B=k.useCallback(G=>{G==="dependency_resolved"&&X()},[X]);PS({onEvent:B});const Q=k.useCallback(async()=>{if(!o){s(!0);try{f(null),await e.post("issues/refresh"),await X()}catch(G){const he=G instanceof Error?G.message:String(G);f(he)}finally{s(!1)}}},[e,o,X]),te=k.useCallback(async(G,he,xe)=>{const Z=xe??F;if(!Z){const se=H.length>1?"Multiple projects exist — use the Launch Team dialog to select one":"No active project found";w(ee=>{const be=new Map(ee);return be.set(G,se),be});const ge=setTimeout(()=>{z.current.delete(ge),w(ee=>{const be=new Map(ee);return be.delete(G),be})},5e3);z.current.add(ge);return}_(se=>new Set(se).add(G)),w(se=>{if(!se.has(G))return se;const ge=new Map(se);return ge.delete(G),ge});try{await e.post("teams/launch",{issueNumber:G,issueTitle:he,projectId:Z});const se=setTimeout(()=>{z.current.delete(se),_(ge=>{const ee=new Set(ge);return ee.delete(G),ee}),X()},5e3);z.current.add(se)}catch(se){const ge=se instanceof Error?se.message:String(se);if(se.status===409&&Z){_(ye=>{const we=new Set(ye);return we.delete(G),we}),q({issueNumber:G,title:he,projectId:Z,message:ge,blockers:[]});return}console.error(`[IssueTree] Failed to launch team for #${G}:`,ge),_(ye=>{const we=new Set(ye);return we.delete(G),we}),w(ye=>{const we=new Map(ye);return we.set(G,ge),we});const ce=setTimeout(()=>{z.current.delete(ce),w(ye=>{const we=new Map(ye);return we.delete(G),we})},5e3);z.current.add(ce)}},[e,X,F,H.length]),K=k.useCallback(async()=>{if(!D)return;const{issueNumber:G,title:he,projectId:xe}=D;q(null),_(Z=>new Set(Z).add(G));try{await e.post("teams/launch",{issueNumber:G,issueTitle:he,projectId:xe,force:!0});const Z=setTimeout(()=>{z.current.delete(Z),_(se=>{const ge=new Set(se);return ge.delete(G),ge}),X()},5e3);z.current.add(Z)}catch(Z){const se=Z instanceof Error?Z.message:String(Z);_(ee=>{const be=new Set(ee);return be.delete(G),be}),w(ee=>{const be=new Map(ee);return be.set(G,se),be});const ge=setTimeout(()=>{z.current.delete(ge),w(ee=>{const be=new Map(ee);return be.delete(G),be})},5e3);z.current.add(ge)}},[e,D,X]),de=k.useCallback(async()=>{if(!D)return;const{issueNumber:G,title:he,projectId:xe}=D;q(null),_(Z=>new Set(Z).add(G));try{await e.post("teams/launch",{issueNumber:G,issueTitle:he,projectId:xe,queue:!0});const Z=setTimeout(()=>{z.current.delete(Z),_(se=>{const ge=new Set(se);return ge.delete(G),ge}),X()},5e3);z.current.add(Z)}catch(Z){const se=Z instanceof Error?Z.message:String(Z);_(ee=>{const be=new Set(ee);return be.delete(G),be}),w(ee=>{const be=new Map(ee);return be.set(G,se),be});const ge=setTimeout(()=>{z.current.delete(ge),w(ee=>{const be=new Map(ee);return be.delete(G),be})},5e3);z.current.add(ge)}},[e,D,X]),U=k.useMemo(()=>D2(r,O,M),[r,O,M]),J=k.useMemo(()=>C.length===0?[]:C.map(G=>({...G,tree:D2(G.tree,O,M)})).filter(G=>G.tree.length>0),[C,O,M]),le=k.useMemo(()=>C.length>0?C.flatMap(G=>[`project-${G.projectId}`,...L2(G.tree)]):L2(r),[r,C]);return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"flex flex-col items-center gap-3",children:[b.jsxs("svg",{className:"w-8 h-8 text-dark-accent animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4Z"})]}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading issue tree..."})]})}):b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-border shrink-0 gap-3",children:[b.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-text",children:"Issue Tree"}),b.jsx("span",{className:"text-xs text-dark-muted",children:O||M!=="all"?`${Oh(U)} of ${m} issues`:`${m} issue${m!==1?"s":""}`}),d&&!O&&b.jsxs("span",{className:"text-xs text-dark-muted",title:d,children:["·"," cached ",Vne(d)]})]}),b.jsxs("div",{className:"relative flex-1 max-w-xs",children:[b.jsx("input",{type:"text",placeholder:"Search issues... (#number or title)",value:O,onChange:G=>N(G.target.value),"aria-label":"Search issues",className:"w-full px-3 py-1 text-xs bg-[#0D1117] border border-[#30363D] rounded text-[#E6EDF3] placeholder-[#8B949E] focus:outline-none focus:border-[#58A6FF]"}),O&&b.jsx("button",{onClick:()=>N(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[#8B949E] hover:text-[#E6EDF3] transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:gy.map(G=>b.jsx("button",{onClick:()=>R(G.key),className:`px-2.5 py-1 text-xs rounded-full border transition-colors ${M===G.key?"border-dark-accent/50 bg-dark-accent/20 text-dark-accent":"border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted"}`,style:M===G.key&&"color"in G?{color:G.color,borderColor:G.color+"50",backgroundColor:G.color+"15"}:void 0,children:G.label},G.key))}),b.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[b.jsxs("button",{onClick:L.expandAll,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Expand all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8.177 14.323a.75.75 0 0 1-1.06-.146l-3.5-4.5A.75.75 0 0 1 4.211 8.5h7.578a.75.75 0 0 1 .594 1.177l-3.5 4.5a.75.75 0 0 1-.706.146ZM7.823 1.677a.75.75 0 0 1 1.06.146l3.5 4.5A.75.75 0 0 1 11.789 7.5H4.211a.75.75 0 0 1-.594-1.177l3.5-4.5a.75.75 0 0 1 .706-.146Z"})}),"Expand All"]}),b.jsxs("button",{onClick:()=>L.collapseAll(le),className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Collapse all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M4.177 7.823a.75.75 0 0 1 .146-1.06l3.5-3.5A.75.75 0 0 1 8.5 3.557V7.5h-3.5a.75.75 0 0 1-.823-.677ZM11.823 7.823a.75.75 0 0 0-.146-1.06l-3.5-3.5A.75.75 0 0 0 7.5 3.557V7.5h3.5a.75.75 0 0 0 .823-.677ZM4.177 8.177a.75.75 0 0 0 .146 1.06l3.5 3.5a.75.75 0 0 0 .677.823V9.5H5a.75.75 0 0 0-.823.677ZM11.823 8.177a.75.75 0 0 1-.146 1.06l-3.5 3.5a.75.75 0 0 1-.677.823V9.5H11a.75.75 0 0 1 .823.677Z"})}),"Collapse All"]})]}),b.jsxs("button",{onClick:Q,disabled:o,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[b.jsx("svg",{className:`w-3.5 h-3.5 ${o?"animate-spin":""}`,viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.705 8.005a.75.75 0 0 1 .834.656 5.5 5.5 0 0 0 9.592 2.97l-1.204-1.204a.25.25 0 0 1 .177-.427h3.646a.25.25 0 0 1 .25.25v3.646a.25.25 0 0 1-.427.177l-1.38-1.38A7.002 7.002 0 0 1 1.05 8.84a.75.75 0 0 1 .656-.834ZM8 2.5a5.487 5.487 0 0 0-4.131 1.869l1.204 1.204A.25.25 0 0 1 4.896 6H1.25A.25.25 0 0 1 1 5.75V2.104a.25.25 0 0 1 .427-.177l1.38 1.38A7.002 7.002 0 0 1 14.95 7.16a.75.75 0 0 1-1.49.178A5.5 5.5 0 0 0 8 2.5Z"})}),o?"Refreshing...":"Refresh"]})]}),c&&b.jsx("div",{className:"mx-4 mt-3 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:c}),b.jsx("div",{className:"flex-1 overflow-auto p-2",children:r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No issues found"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Click Refresh to fetch issues from GitHub"})]}):U.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("p",{className:"text-dark-muted text-sm",children:O&&M!=="all"?b.jsxs(b.Fragment,{children:["No issues match “",O,"” with filter “",($=gy.find(G=>G.key===M))==null?void 0:$.label,"”"]}):O?b.jsxs(b.Fragment,{children:["No issues match “",O,"”"]}):b.jsxs(b.Fragment,{children:["No issues match filter “",(Y=gy.find(G=>G.key===M))==null?void 0:Y.label,"”"]})}),b.jsx("button",{onClick:()=>{N(""),R("all")},className:"text-xs text-dark-accent hover:underline",children:"Clear filters"})]}):J.length>0?b.jsx("div",{className:"space-y-1",children:J.map(G=>b.jsx(Une,{group:G,onLaunch:te,launchingIssues:y,launchErrors:E,forceExpand:!!O||M!=="all",fetchTree:X,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse},G.projectId))}):b.jsx(Hne,{tree:U,projectId:F,onLaunch:te,launchingIssues:y,launchErrors:E,forceExpand:!!O||M!=="all",fetchTree:X,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse})}),D&&b.jsx(Fne,{issueNumber:D.issueNumber,message:D.message,onForce:K,onQueue:de,onCancel:()=>q(null)})]})}function Fne({issueNumber:e,message:r,onForce:n,onQueue:a,onCancel:i}){return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[420px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-4 h-4 text-[#F85149]",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M4.25 7.25a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5h-7.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),"Issue #",e," has unresolved dependencies"]})}),b.jsxs("div",{className:"px-5 py-4",children:[b.jsx("p",{className:"text-sm text-dark-muted mb-3",children:r}),b.jsxs("p",{className:"text-xs text-dark-muted",children:["You can ",b.jsx("strong",{children:"queue"})," this issue to auto-launch when blockers resolve, or ",b.jsx("strong",{children:"force launch"})," to bypass the dependency check."]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:i,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:a,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#58A6FF]/40 text-[#58A6FF] bg-[#58A6FF]/10 hover:bg-[#58A6FF]/20 transition-colors",children:"Queue"}),b.jsx("button",{onClick:n,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors",children:"Force Launch"})]})]})})}function UI({issues:e,skippedActive:r,skippedBlocked:n,projectId:a,api:i,fetchTree:o,onClose:s}){const[c,f]=k.useState(!1),[d,h]=k.useState(null),m=k.useCallback(async()=>{f(!0),h(null);try{await i.post("teams/launch-batch",{projectId:a,issues:e.map(g=>({number:g.number,title:g.title}))}),s(),setTimeout(()=>o(),3e3)}catch(g){const y=g instanceof Error?g.message:String(g);h(y),f(!1)}},[i,a,e,s,o]);return e.length===0?null:b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsx("svg",{className:"w-4 h-4 text-[#3FB950]",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),"Launch ",e.length," team",e.length!==1?"s":"","?"]})}),b.jsxs("div",{className:"px-5 py-4 max-h-[50vh] overflow-auto",children:[b.jsx("ul",{className:"space-y-1 mb-3",children:e.map(g=>b.jsxs("li",{className:"text-xs text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-3 h-3 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted",children:["#",g.number]}),b.jsx("span",{className:"truncate",children:g.title})]},g.number))}),(r>0||n>0)&&b.jsxs("div",{className:"text-xs text-dark-muted space-y-0.5 mb-3 border-t border-dark-border/40 pt-2",children:[r>0&&b.jsxs("p",{children:[r," issue",r!==1?"s":""," skipped (already have active teams)"]}),n>0&&b.jsxs("p",{children:[n," issue",n!==1?"s":""," skipped (blocked by dependencies)"]})]}),d&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149] mb-3",children:d})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:s,disabled:c,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors disabled:opacity-50",children:"Cancel"}),b.jsxs("button",{onClick:m,disabled:c,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded border border-[#3FB950]/40 text-[#3FB950] bg-[#3FB950]/10 hover:bg-[#3FB950]/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),c?"Launching...":"Launch All"]})]})]})})}function HI({prioritization:e,tree:r,className:n,onRunAll:a,runAllDisabled:i}){return b.jsxs("div",{className:`flex items-center gap-2 ${n??""}`,children:[b.jsxs("button",{onClick:()=>e.prioritize(r),disabled:e.loading||r.length===0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"AI-prioritize open issues",children:[e.loading?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),e.loading?"Prioritizing...":"Prioritize"]}),a&&b.jsxs("button",{onClick:a,disabled:i,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Launch teams for all launchable issues",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.5 3.5a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Zm7 0a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Z"})}),"Run All"]}),e.hasPriority&&b.jsxs("button",{onClick:e.reset,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Clear prioritization",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}),"Reset"]})]})}function GI({prioritization:e,projectId:r,api:n,fetchTree:a}){const[i,o]=k.useState(!1),s=k.useRef(new Set);k.useEffect(()=>()=>{for(const f of s.current)clearTimeout(f);s.current.clear()},[]);const c=k.useCallback(async()=>{const f=e.checkedSortedIssueNumbers;if(f.length!==0){o(!0);try{await n.post("teams/launch-batch",{projectId:r,issues:f.map(h=>{const m=e.priorityMap.get(h);return{number:h,title:m==null?void 0:m.title}})});const d=setTimeout(()=>{s.current.delete(d),a()},3e3);s.current.add(d)}catch(d){console.error("[IssueTree] Batch launch failed:",d instanceof Error?d.message:String(d))}finally{o(!1)}}},[n,e.checkedSortedIssueNumbers,e.priorityMap,r,a]);return e.hasPriority?b.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-dark-border/40 bg-[#A371F7]/5",children:[b.jsxs("span",{className:"text-xs text-dark-muted",children:[e.checkedIssues.size," of ",e.priorityMap.size," selected"]}),b.jsxs("button",{onClick:c,disabled:i||e.checkedIssues.size===0,className:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[i?b.jsxs("svg",{className:"w-3 h-3 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),e.checkedIssues.size===e.priorityMap.size?"Launch all in order":`Launch ${e.checkedIssues.size} selected in order`]}),e.costUsd!=null&&b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["$",e.costUsd.toFixed(4)," · ",((e.durationMs??0)/1e3).toFixed(1),"s"]})]}):null}function Une({group:e,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,fetchTree:o,collapsedNodes:s,onToggleCollapse:c}){const f=Ft(),d=`project-${e.projectId}`,h=!s.has(d),m=BI(),[g,y]=k.useState(!1),_=k.useMemo(()=>m.hasPriority?AE(e.tree,m.priorityMap):e.tree,[e.tree,m.hasPriority,m.priorityMap]),E=k.useMemo(()=>VI(e.tree),[e.tree]);return b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 py-2 px-2 rounded hover:bg-dark-surface/60 transition-colors",children:[b.jsxs("button",{onClick:()=>c(d),className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[b.jsx("span",{className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${h?"rotate-90":""}`,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),b.jsx("svg",{className:"w-4 h-4 text-dark-muted shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.25.25 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate",children:e.projectName}),b.jsxs("span",{className:"text-xs text-dark-muted shrink-0",children:[Oh(e.tree)," issue",Oh(e.tree)!==1?"s":""]})]}),b.jsx(HI,{prioritization:m,tree:e.tree,onRunAll:()=>y(!0),runAllDisabled:E.launchable.length===0})]}),m.error&&b.jsxs("div",{className:"mx-2 mb-1 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",m.error]}),b.jsx(GI,{prioritization:m,projectId:e.projectId,api:f,fetchTree:o}),h&&b.jsx("div",{className:"ml-2 border-l border-dark-border/40 pl-1",children:_.map(w=>b.jsx(FI,{node:w,depth:0,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,projectId:e.projectId,priorityMap:m.hasPriority?m.priorityMap:void 0,checkedIssues:m.hasPriority?m.checkedIssues:void 0,onCheckChange:m.hasPriority?m.toggleCheck:void 0,onPrioritizeSubtree:m.prioritizeSubtree,prioritizing:m.loading,collapsedNodes:s,onToggleCollapse:c},w.number))}),g&&b.jsx(UI,{issues:E.launchable,skippedActive:E.skippedActive,skippedBlocked:E.skippedBlocked,projectId:e.projectId,api:f,fetchTree:o,onClose:()=>y(!1)})]})}function Hne({tree:e,projectId:r,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,fetchTree:s,collapsedNodes:c,onToggleCollapse:f}){const d=Ft(),h=BI(),[m,g]=k.useState(!1),y=k.useMemo(()=>h.hasPriority?AE(e,h.priorityMap):e,[e,h.hasPriority,h.priorityMap]),_=k.useMemo(()=>VI(e),[e]);return b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-2 px-2 pb-2",children:b.jsx(HI,{prioritization:h,tree:e,onRunAll:r?()=>g(!0):void 0,runAllDisabled:_.launchable.length===0})}),h.error&&b.jsxs("div",{className:"mx-2 mb-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",h.error]}),r&&b.jsx(GI,{prioritization:h,projectId:r,api:d,fetchTree:s}),b.jsx("div",{className:"space-y-0",children:y.map(E=>b.jsx(FI,{node:E,depth:0,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,priorityMap:h.hasPriority?h.priorityMap:void 0,checkedIssues:h.hasPriority?h.checkedIssues:void 0,onCheckChange:h.hasPriority?h.toggleCheck:void 0,onPrioritizeSubtree:h.prioritizeSubtree,prioritizing:h.loading,collapsedNodes:c,onToggleCollapse:f},E.number))}),m&&r&&b.jsx(UI,{issues:_.launchable,skippedActive:_.skippedActive,skippedBlocked:_.skippedBlocked,projectId:r,api:d,fetchTree:s,onClose:()=>g(!1)})]})}function Gne(e,r){var n;return r==="all"?!0:r==="no-team"?!e.activeTeam:r==="blocked-deps"?!!(e.dependencies&&!e.dependencies.resolved):((n=e.activeTeam)==null?void 0:n.status)===r}function D2(e,r,n){const a=r.trim().length>0;if(!a&&!(n!=="all"))return e;const o=r.toLowerCase().trim(),s=/^\d+$/.test(o),c=o.startsWith("#")?parseInt(o.slice(1),10):s?parseInt(o,10):NaN;return e.reduce((f,d)=>{const h=!a||!isNaN(c)&&d.number===c||d.title.toLowerCase().includes(o),m=Gne(d,n),g=h&&m,y=D2(d.children,r,n);return(g||y.length>0)&&f.push({...d,children:y}),f},[])}function L2(e){const r=[];for(const n of e)r.push(n.number.toString()),n.children.length>0&&r.push(...L2(n.children));return r}function Oh(e){let r=0;for(const n of e)r++,r+=Oh(n.children);return r}function VI(e){const r=[];let n=0,a=0;function i(o){for(const s of o)s.state==="open"&&(s.activeTeam?n++:s.dependencies&&!s.dependencies.resolved?a++:r.push(s)),i(s.children)}return i(e),{launchable:r,skippedActive:n,skippedBlocked:a}}function Vne(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function KI(e){var r,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=KI(e[r]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function et(){for(var e,r,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=KI(e))&&(a&&(a+=" "),a+=r);return a}var Kne=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function jE(e){if(typeof e!="string")return!1;var r=Kne;return r.includes(e)}var Yne=["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"],Xne=new Set(Yne);function YI(e){return typeof e!="string"?!1:Xne.has(e)}function XI(e){return typeof e=="string"&&e.startsWith("data-")}function ia(e){if(typeof e!="object"||e===null)return{};var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(YI(n)||XI(n))&&(r[n]=e[n]);return r}function Pp(e){if(e==null)return null;if(k.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var r=e.props;return ia(r)}return typeof e=="object"&&!Array.isArray(e)?ia(e):null}function ur(e){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(YI(n)||XI(n)||jE(n))&&(r[n]=e[n]);return r}function Wne(e){return e==null?null:k.isValidElement(e)?ur(e.props):typeof e=="object"&&!Array.isArray(e)?ur(e):null}var Zne=["children","width","height","viewBox","className","style","title","desc"];function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},I2.apply(null,arguments)}function Qne(e,r){if(e==null)return{};var n,a,i=Jne(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jne(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var WI=k.forwardRef((e,r)=>{var{children:n,width:a,height:i,viewBox:o,className:s,style:c,title:f,desc:d}=e,h=Qne(e,Zne),m=o||{width:a,height:i,x:0,y:0},g=et("recharts-surface",s);return k.createElement("svg",I2({},ur(h),{className:g,width:a,height:i,style:c,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:r}),k.createElement("title",null,f),k.createElement("desc",null,d),n)}),eae=["children","className"];function z2(){return z2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},z2.apply(null,arguments)}function tae(e,r){if(e==null)return{};var n,a,i=rae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function rae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var oa=k.forwardRef((e,r)=>{var{children:n,className:a}=e,i=tae(e,eae),o=et("recharts-layer",a);return k.createElement("g",z2({className:o},ur(i),{ref:r}),n)}),nae=k.createContext(null);function at(e){return function(){return e}}const ZI=Math.cos,Th=Math.sin,In=Math.sqrt,Nh=Math.PI,Rp=2*Nh,q2=Math.PI,B2=2*q2,xo=1e-6,aae=B2-xo;function QI(e){this._+=e[0];for(let r=1,n=e.length;r<n;++r)this._+=arguments[r]+e[r]}function iae(e){let r=Math.floor(e);if(!(r>=0))throw new Error(`invalid digits: ${e}`);if(r>15)return QI;const n=10**r;return function(a){this._+=a[0];for(let i=1,o=a.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+a[i]}}class oae{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?QI:iae(r)}moveTo(r,n){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,n){this._append`L${this._x1=+r},${this._y1=+n}`}quadraticCurveTo(r,n,a,i){this._append`Q${+r},${+n},${this._x1=+a},${this._y1=+i}`}bezierCurveTo(r,n,a,i,o,s){this._append`C${+r},${+n},${+a},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(r,n,a,i,o){if(r=+r,n=+n,a=+a,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,c=this._y1,f=a-r,d=i-n,h=s-r,m=c-n,g=h*h+m*m;if(this._x1===null)this._append`M${this._x1=r},${this._y1=n}`;else if(g>xo)if(!(Math.abs(m*f-d*h)>xo)||!o)this._append`L${this._x1=r},${this._y1=n}`;else{let y=a-s,_=i-c,E=f*f+d*d,w=y*y+_*_,x=Math.sqrt(E),j=Math.sqrt(g),C=o*Math.tan((q2-Math.acos((E+g-w)/(2*x*j)))/2),T=C/j,O=C/x;Math.abs(T-1)>xo&&this._append`L${r+T*h},${n+T*m}`,this._append`A${o},${o},0,0,${+(m*y>h*_)},${this._x1=r+O*f},${this._y1=n+O*d}`}}arc(r,n,a,i,o,s){if(r=+r,n=+n,a=+a,s=!!s,a<0)throw new Error(`negative radius: ${a}`);let c=a*Math.cos(i),f=a*Math.sin(i),d=r+c,h=n+f,m=1^s,g=s?i-o:o-i;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>xo||Math.abs(this._y1-h)>xo)&&this._append`L${d},${h}`,a&&(g<0&&(g=g%B2+B2),g>aae?this._append`A${a},${a},0,1,${m},${r-c},${n-f}A${a},${a},0,1,${m},${this._x1=d},${this._y1=h}`:g>xo&&this._append`A${a},${a},0,${+(g>=q2)},${m},${this._x1=r+a*Math.cos(o)},${this._y1=n+a*Math.sin(o)}`)}rect(r,n,a,i){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}h${a=+a}v${+i}h${-a}Z`}toString(){return this._}}function CE(e){let r=3;return e.digits=function(n){if(!arguments.length)return r;if(n==null)r=null;else{const a=Math.floor(n);if(!(a>=0))throw new RangeError(`invalid digits: ${n}`);r=a}return e},()=>new oae(r)}function OE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function JI(e){this._context=e}JI.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,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:this._context.lineTo(e,r);break}}};function Dp(e){return new JI(e)}function ez(e){return e[0]}function tz(e){return e[1]}function rz(e,r){var n=at(!0),a=null,i=Dp,o=null,s=CE(c);e=typeof e=="function"?e:e===void 0?ez:at(e),r=typeof r=="function"?r:r===void 0?tz:at(r);function c(f){var d,h=(f=OE(f)).length,m,g=!1,y;for(a==null&&(o=i(y=s())),d=0;d<=h;++d)!(d<h&&n(m=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,d,f),+r(m,d,f));if(y)return o=null,y+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:at(+f),c):e},c.y=function(f){return arguments.length?(r=typeof f=="function"?f:at(+f),c):r},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:at(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,a!=null&&(o=i(a)),c):i},c.context=function(f){return arguments.length?(f==null?a=o=null:o=i(a=f),c):a},c}function Md(e,r,n){var a=null,i=at(!0),o=null,s=Dp,c=null,f=CE(d);e=typeof e=="function"?e:e===void 0?ez:at(+e),r=typeof r=="function"?r:at(r===void 0?0:+r),n=typeof n=="function"?n:n===void 0?tz:at(+n);function d(m){var g,y,_,E=(m=OE(m)).length,w,x=!1,j,C=new Array(E),T=new Array(E);for(o==null&&(c=s(j=f())),g=0;g<=E;++g){if(!(g<E&&i(w=m[g],g,m))===x)if(x=!x)y=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),_=g-1;_>=y;--_)c.point(C[_],T[_]);c.lineEnd(),c.areaEnd()}x&&(C[g]=+e(w,g,m),T[g]=+r(w,g,m),c.point(a?+a(w,g,m):C[g],n?+n(w,g,m):T[g]))}if(j)return c=null,j+""||null}function h(){return rz().defined(i).curve(s).context(o)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:at(+m),a=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:at(+m),d):e},d.x1=function(m){return arguments.length?(a=m==null?null:typeof m=="function"?m:at(+m),d):a},d.y=function(m){return arguments.length?(r=typeof m=="function"?m:at(+m),n=null,d):r},d.y0=function(m){return arguments.length?(r=typeof m=="function"?m:at(+m),d):r},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:at(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(r)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(a).y(r)},d.defined=function(m){return arguments.length?(i=typeof m=="function"?m:at(!!m),d):i},d.curve=function(m){return arguments.length?(s=m,o!=null&&(c=s(o)),d):s},d.context=function(m){return arguments.length?(m==null?o=c=null:c=s(o=m),d):o},d}class nz{constructor(r,n){this._context=r,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(r,n){switch(r=+r,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,n,r,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,r,this._y0,r,n);break}}this._x0=r,this._y0=n}}function lae(e){return new nz(e,!0)}function sae(e){return new nz(e,!1)}const TE={draw(e,r){const n=In(r/Nh);e.moveTo(n,0),e.arc(0,0,n,0,Rp)}},uae={draw(e,r){const n=In(r/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()}},az=In(1/3),cae=az*2,fae={draw(e,r){const n=In(r/cae),a=n*az;e.moveTo(0,-n),e.lineTo(a,0),e.lineTo(0,n),e.lineTo(-a,0),e.closePath()}},dae={draw(e,r){const n=In(r),a=-n/2;e.rect(a,a,n,n)}},hae=.8908130915292852,iz=Th(Nh/10)/Th(7*Nh/10),pae=Th(Rp/10)*iz,mae=-ZI(Rp/10)*iz,vae={draw(e,r){const n=In(r*hae),a=pae*n,i=mae*n;e.moveTo(0,-n),e.lineTo(a,i);for(let o=1;o<5;++o){const s=Rp*o/5,c=ZI(s),f=Th(s);e.lineTo(f*n,-c*n),e.lineTo(c*a-f*i,f*a+c*i)}e.closePath()}},yy=In(3),gae={draw(e,r){const n=-In(r/(yy*3));e.moveTo(0,n*2),e.lineTo(-yy*n,-n),e.lineTo(yy*n,-n),e.closePath()}},ln=-.5,sn=In(3)/2,$2=1/In(12),yae=($2/2+1)*3,bae={draw(e,r){const n=In(r/yae),a=n/2,i=n*$2,o=a,s=n*$2+n,c=-o,f=s;e.moveTo(a,i),e.lineTo(o,s),e.lineTo(c,f),e.lineTo(ln*a-sn*i,sn*a+ln*i),e.lineTo(ln*o-sn*s,sn*o+ln*s),e.lineTo(ln*c-sn*f,sn*c+ln*f),e.lineTo(ln*a+sn*i,ln*i-sn*a),e.lineTo(ln*o+sn*s,ln*s-sn*o),e.lineTo(ln*c+sn*f,ln*f-sn*c),e.closePath()}};function xae(e,r){let n=null,a=CE(i);e=typeof e=="function"?e:at(e||TE),r=typeof r=="function"?r:at(r===void 0?64:+r);function i(){let o;if(n||(n=o=a()),e.apply(this,arguments).draw(n,+r.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:at(o),i):e},i.size=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Mh(){}function Ph(e,r,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+r)/6,(e._y0+4*e._y1+n)/6)}function oz(e){this._context=e}oz.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:Ph(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,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);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:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function _ae(e){return new oz(e)}function lz(e){this._context=e}lz.prototype={areaStart:Mh,areaEnd:Mh,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,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._x2=e,this._y2=r;break;case 1:this._point=2,this._x3=e,this._y3=r;break;case 2:this._point=3,this._x4=e,this._y4=r,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+r)/6);break;default:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function wae(e){return new lz(e)}function sz(e){this._context=e}sz.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,r){switch(e=+e,r=+r,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,a=(this._y0+4*this._y1+r)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:Ph(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function Sae(e){return new sz(e)}function uz(e){this._context=e}uz.prototype={areaStart:Mh,areaEnd:Mh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,r){e=+e,r=+r,this._point?this._context.lineTo(e,r):(this._point=1,this._context.moveTo(e,r))}};function Eae(e){return new uz(e)}function XT(e){return e<0?-1:1}function WT(e,r,n){var a=e._x1-e._x0,i=r-e._x1,o=(e._y1-e._y0)/(a||i<0&&-0),s=(n-e._y1)/(i||a<0&&-0),c=(o*i+s*a)/(a+i);return(XT(o)+XT(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(c))||0}function ZT(e,r){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-r)/2:r}function by(e,r,n){var a=e._x0,i=e._y0,o=e._x1,s=e._y1,c=(o-a)/3;e._context.bezierCurveTo(a+c,i+c*r,o-c,s-c*n,o,s)}function Rh(e){this._context=e}Rh.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:by(this,this._t0,ZT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){var n=NaN;if(e=+e,r=+r,!(e===this._x1&&r===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,by(this,ZT(this,n=WT(this,e,r)),n);break;default:by(this,this._t0,n=WT(this,e,r));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r,this._t0=n}}};function cz(e){this._context=new fz(e)}(cz.prototype=Object.create(Rh.prototype)).point=function(e,r){Rh.prototype.point.call(this,r,e)};function fz(e){this._context=e}fz.prototype={moveTo:function(e,r){this._context.moveTo(r,e)},closePath:function(){this._context.closePath()},lineTo:function(e,r){this._context.lineTo(r,e)},bezierCurveTo:function(e,r,n,a,i,o){this._context.bezierCurveTo(r,e,a,n,o,i)}};function kae(e){return new Rh(e)}function Aae(e){return new cz(e)}function dz(e){this._context=e}dz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,r=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],r[0]):this._context.moveTo(e[0],r[0]),n===2)this._context.lineTo(e[1],r[1]);else for(var a=QT(e),i=QT(r),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(a[0][o],i[0][o],a[1][o],i[1][o],e[s],r[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,r){this._x.push(+e),this._y.push(+r)}};function QT(e){var r,n=e.length-1,a,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],r=1;r<n-1;++r)i[r]=1,o[r]=4,s[r]=4*e[r]+2*e[r+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],r=1;r<n;++r)a=i[r]/o[r-1],o[r]-=a,s[r]-=a*s[r-1];for(i[n-1]=s[n-1]/o[n-1],r=n-2;r>=0;--r)i[r]=(s[r]-i[r+1])/o[r];for(o[n-1]=(e[n]+i[n-1])/2,r=0;r<n-1;++r)o[r]=2*e[r+1]-i[r+1];return[i,o]}function jae(e){return new dz(e)}function Lp(e,r){this._context=e,this._t=r}Lp.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,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,r),this._context.lineTo(e,r);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,r)}break}}this._x=e,this._y=r}};function Cae(e){return new Lp(e,.5)}function Oae(e){return new Lp(e,0)}function Tae(e){return new Lp(e,1)}function Ro(e,r){if((s=e.length)>1)for(var n=1,a,i,o=e[r[0]],s,c=o.length;n<s;++n)for(i=o,o=e[r[n]],a=0;a<c;++a)o[a][1]+=o[a][0]=isNaN(i[a][1])?i[a][0]:i[a][1]}function F2(e){for(var r=e.length,n=new Array(r);--r>=0;)n[r]=r;return n}function Nae(e,r){return e[r]}function Mae(e){const r=[];return r.key=e,r}function Pae(){var e=at([]),r=F2,n=Ro,a=Nae;function i(o){var s=Array.from(e.apply(this,arguments),Mae),c,f=s.length,d=-1,h;for(const m of o)for(c=0,++d;c<f;++c)(s[c][d]=[0,+a(m,s[c].key,d,o)]).data=m;for(c=0,h=OE(r(s));c<f;++c)s[h[c]].index=c;return n(s,h),s}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:at(Array.from(o)),i):e},i.value=function(o){return arguments.length?(a=typeof o=="function"?o:at(+o),i):a},i.order=function(o){return arguments.length?(r=o==null?F2:typeof o=="function"?o:at(Array.from(o)),i):r},i.offset=function(o){return arguments.length?(n=o??Ro,i):n},i}function Rae(e,r){if((a=e.length)>0){for(var n,a,i=0,o=e[0].length,s;i<o;++i){for(s=n=0;n<a;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<a;++n)e[n][i][1]/=s}Ro(e,r)}}function Dae(e,r){if((i=e.length)>0){for(var n=0,a=e[r[0]],i,o=a.length;n<o;++n){for(var s=0,c=0;s<i;++s)c+=e[s][n][1]||0;a[n][1]+=a[n][0]=-c/2}Ro(e,r)}}function Lae(e,r){if(!(!((s=e.length)>0)||!((o=(i=e[r[0]]).length)>0))){for(var n=0,a=1,i,o,s;a<o;++a){for(var c=0,f=0,d=0;c<s;++c){for(var h=e[r[c]],m=h[a][1]||0,g=h[a-1][1]||0,y=(m-g)/2,_=0;_<c;++_){var E=e[r[_]],w=E[a][1]||0,x=E[a-1][1]||0;y+=w-x}f+=m,d+=y*m}i[a-1][1]+=i[a-1][0]=n,f&&(n-=d/f)}i[a-1][1]+=i[a-1][0]=n,Ro(e,r)}}var xy={},_y={},JT;function Iae(){return JT||(JT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==="__proto__"}e.isUnsafeProperty=r})(_y)),_y}var wy={},eN;function hz(){return eN||(eN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=r})(wy)),wy}var Sy={},tN;function NE(){return tN||(tN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var a;return typeof n=="string"||typeof n=="symbol"?n:Object.is((a=n==null?void 0:n.valueOf)==null?void 0:a.call(n),-0)?"-0":String(n)}e.toKey=r})(Sy)),Sy}var Ey={},ky={},rN;function zae(){return rN||(rN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(r).join(",");const a=String(n);return a==="0"&&Object.is(Number(n),-0)?"-0":a}e.toString=r})(ky)),ky}var nN;function ME(){return nN||(nN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=zae(),n=NE();function a(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=r.toString(i);const o=[],s=i.length;if(s===0)return o;let c=0,f="",d="",h=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<s;){const m=i[c];d?m==="\\"&&c+1<s?(c++,f+=i[c]):m===d?d="":f+=m:h?m==='"'||m==="'"?d=m:m==="]"?(h=!1,o.push(f),f=""):f+=m:m==="["?(h=!0,f&&(o.push(f),f="")):m==="."?f&&(o.push(f),f=""):f+=m,c++}return f&&o.push(f),o}e.toPath=a})(Ey)),Ey}var aN;function PE(){return aN||(aN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Iae(),n=hz(),a=NE(),i=ME();function o(c,f,d){if(c==null)return d;switch(typeof f){case"string":{if(r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?n.isDeepKey(f)?o(c,i.toPath(f),d):d:h}case"number":case"symbol":{typeof f=="number"&&(f=a.toKey(f));const h=c[f];return h===void 0?d:h}default:{if(Array.isArray(f))return s(c,f,d);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?d:h}}}function s(c,f,d){if(f.length===0)return d;let h=c;for(let m=0;m<f.length;m++){if(h==null||r.isUnsafeProperty(f[m]))return d;h=h[f[m]]}return h===void 0?d:h}e.get=o})(xy)),xy}var Ay,iN;function qae(){return iN||(iN=1,Ay=PE().get),Ay}var Bae=qae();const Ip=Dn(Bae);var $ae=4;function Bi(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$ae,n=10**r,a=Math.round(e*n)/n;return Object.is(a,-0)?0:a}function xt(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return e.reduce((i,o,s)=>{var c=n[s-1];return typeof c=="string"?i+c+o:c!==void 0?i+Bi(c)+o:i+o},"")}var mn=e=>e===0?0:e>0?1:-1,Wa=e=>typeof e=="number"&&e!=+e,Do=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,je=e=>(typeof e=="number"||e instanceof Number)&&!Wa(e),gn=e=>je(e)||typeof e=="string",Fae=0,lc=e=>{var r=++Fae;return"".concat(e||"").concat(r)},Ui=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!je(r)&&typeof r!="string")return a;var o;if(Do(r)){if(n==null)return a;var s=r.indexOf("%");o=n*parseFloat(r.slice(0,s))/100}else o=+r;return Wa(o)&&(o=a),i&&n!=null&&o>n&&(o=n),o},pz=e=>{if(!Array.isArray(e))return!1;for(var r=e.length,n={},a=0;a<r;a++)if(!n[String(e[a])])n[String(e[a])]=!0;else return!0;return!1};function Cr(e,r,n){return je(e)&&je(r)?Bi(e+n*(r-e)):r}function mz(e,r,n){if(!(!e||!e.length))return e.find(a=>a&&(typeof r=="function"?r(a):Ip(a,r))===n)}var $t=e=>e===null||typeof e>"u",Mc=e=>$t(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Tr(e){return e!=null}function Uo(){}var Uae=["type","size","sizeType"];function U2(){return U2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},U2.apply(null,arguments)}function oN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function lN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oN(Object(n),!0).forEach(function(a){Hae(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Hae(e,r,n){return(r=Gae(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Gae(e){var r=Vae(e,"string");return typeof r=="symbol"?r:r+""}function Vae(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Kae(e,r){if(e==null)return{};var n,a,i=Yae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var vz={symbolCircle:TE,symbolCross:uae,symbolDiamond:fae,symbolSquare:dae,symbolStar:vae,symbolTriangle:gae,symbolWye:bae},Xae=Math.PI/180,Wae=e=>{var r="symbol".concat(Mc(e));return vz[r]||TE},Zae=(e,r,n)=>{if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var a=18*Xae;return 1.25*e*e*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Qae=(e,r)=>{vz["symbol".concat(Mc(e))]=r},gz=e=>{var{type:r="circle",size:n=64,sizeType:a="area"}=e,i=Kae(e,Uae),o=lN(lN({},i),{},{type:r,size:n,sizeType:a}),s="circle";typeof r=="string"&&(s=r);var c=()=>{var g=Wae(s),y=xae().type(g).size(Zae(n,a,s)),_=y();if(_!==null)return _},{className:f,cx:d,cy:h}=o,m=ur(o);return je(d)&&je(h)&&je(n)?k.createElement("path",U2({},m,{className:et("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};gz.registerSymbol=Qae;var yz=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,RE=(e,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var a={};return Object.keys(n).forEach(i=>{jE(i)&&typeof n[i]=="function"&&(a[i]=(o=>n[i](n,o)))}),a},Jae=(e,r,n)=>a=>(e(r,n,a),null),eie=(e,r,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var a=null;return Object.keys(e).forEach(i=>{var o=e[i];jE(i)&&typeof o=="function"&&(a||(a={}),a[i]=Jae(o,r,n))}),a};function sN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function tie(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sN(Object(n),!0).forEach(function(a){rie(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function rie(e,r,n){return(r=nie(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function nie(e){var r=aie(e,"string");return typeof r=="symbol"?r:r+""}function aie(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function gr(e,r){var n=tie({},e),a=r,i=Object.keys(r),o=i.reduce((s,c)=>(s[c]===void 0&&a[c]!==void 0&&(s[c]=a[c]),s),n);return o}var jy={},Cy={},uN;function iie(){return uN||(uN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){const i=new Map;for(let o=0;o<n.length;o++){const s=n[o],c=a(s,o,n);i.has(c)||i.set(c,s)}return Array.from(i.values())}e.uniqBy=r})(Cy)),Cy}var Oy={},cN;function oie(){return cN||(cN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return function(...i){return n.apply(this,i.slice(0,a))}}e.ary=r})(Oy)),Oy}var Ty={},fN;function bz(){return fN||(fN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n}e.identity=r})(Ty)),Ty}var Ny={},My={},Py={},dN;function lie(){return dN||(dN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=r})(Py)),Py}var hN;function xz(){return hN||(hN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=lie();function n(a){return a!=null&&typeof a!="function"&&r.isLength(a.length)}e.isArrayLike=n})(My)),My}var Ry={},pN;function sie(){return pN||(pN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="object"&&n!==null}e.isObjectLike=r})(Ry)),Ry}var mN;function uie(){return mN||(mN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=xz(),n=sie();function a(i){return n.isObjectLike(i)&&r.isArrayLike(i)}e.isArrayLikeObject=a})(Ny)),Ny}var Dy={},Ly={},vN;function cie(){return vN||(vN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=PE();function n(a){return function(i){return r.get(i,a)}}e.property=n})(Ly)),Ly}var Iy={},zy={},qy={},By={},gN;function _z(){return gN||(gN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=r})(By)),By}var $y={},yN;function wz(){return yN||(yN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=r})($y)),$y}var Fy={},bN;function Sz(){return bN||(bN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return n===a||Number.isNaN(n)&&Number.isNaN(a)}e.isEqualsSameValueZero=r})(Fy)),Fy}var xN;function fie(){return xN||(xN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=_z(),n=wz(),a=Sz();function i(h,m,g){return typeof g!="function"?i(h,m,()=>{}):o(h,m,function y(_,E,w,x,j,C){const T=g(_,E,w,x,j,C);return T!==void 0?!!T:o(_,E,y,C)},new Map)}function o(h,m,g,y){if(m===h)return!0;switch(typeof m){case"object":return s(h,m,g,y);case"function":return Object.keys(m).length>0?o(h,{...m},g,y):a.isEqualsSameValueZero(h,m);default:return r.isObject(h)?typeof m=="string"?m==="":!0:a.isEqualsSameValueZero(h,m)}}function s(h,m,g,y){if(m==null)return!0;if(Array.isArray(m))return f(h,m,g,y);if(m instanceof Map)return c(h,m,g,y);if(m instanceof Set)return d(h,m,g,y);const _=Object.keys(m);if(h==null||n.isPrimitive(h))return _.length===0;if(_.length===0)return!0;if(y!=null&&y.has(m))return y.get(m)===h;y==null||y.set(m,h);try{for(let E=0;E<_.length;E++){const w=_[E];if(!n.isPrimitive(h)&&!(w in h)||m[w]===void 0&&h[w]!==void 0||m[w]===null&&h[w]!==null||!g(h[w],m[w],w,h,m,y))return!1}return!0}finally{y==null||y.delete(m)}}function c(h,m,g,y){if(m.size===0)return!0;if(!(h instanceof Map))return!1;for(const[_,E]of m.entries()){const w=h.get(_);if(g(w,E,_,h,m,y)===!1)return!1}return!0}function f(h,m,g,y){if(m.length===0)return!0;if(!Array.isArray(h))return!1;const _=new Set;for(let E=0;E<m.length;E++){const w=m[E];let x=!1;for(let j=0;j<h.length;j++){if(_.has(j))continue;const C=h[j];let T=!1;if(g(C,w,E,h,m,y)&&(T=!0),T){_.add(j),x=!0;break}}if(!x)return!1}return!0}function d(h,m,g,y){return m.size===0?!0:h instanceof Set?f([...h],[...m],g,y):!1}e.isMatchWith=i,e.isSetMatch=d})(qy)),qy}var _N;function Ez(){return _N||(_N=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=fie();function n(a,i){return r.isMatchWith(a,i,()=>{})}e.isMatch=n})(zy)),zy}var Uy={},Hy={},Gy={},wN;function die(){return wN||(wN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Object.getOwnPropertySymbols(n).filter(a=>Object.prototype.propertyIsEnumerable.call(n,a))}e.getSymbols=r})(Gy)),Gy}var Vy={},SN;function DE(){return SN||(SN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=r})(Vy)),Vy}var Ky={},EN;function kz(){return EN||(EN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r="[object RegExp]",n="[object String]",a="[object Number]",i="[object Boolean]",o="[object Arguments]",s="[object Symbol]",c="[object Date]",f="[object Map]",d="[object Set]",h="[object Array]",m="[object Function]",g="[object ArrayBuffer]",y="[object Object]",_="[object Error]",E="[object DataView]",w="[object Uint8Array]",x="[object Uint8ClampedArray]",j="[object Uint16Array]",C="[object Uint32Array]",T="[object BigUint64Array]",O="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",R="[object BigInt64Array]",L="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=R,e.bigUint64ArrayTag=T,e.booleanTag=i,e.dataViewTag=E,e.dateTag=c,e.errorTag=_,e.float32ArrayTag=L,e.float64ArrayTag=D,e.functionTag=m,e.int16ArrayTag=N,e.int32ArrayTag=M,e.int8ArrayTag=O,e.mapTag=f,e.numberTag=a,e.objectTag=y,e.regexpTag=r,e.setTag=d,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=j,e.uint32ArrayTag=C,e.uint8ArrayTag=w,e.uint8ClampedArrayTag=x})(Ky)),Ky}var Yy={},kN;function hie(){return kN||(kN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=r})(Yy)),Yy}var AN;function Az(){return AN||(AN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=die(),n=DE(),a=kz(),i=wz(),o=hie();function s(h,m){return c(h,void 0,h,new Map,m)}function c(h,m,g,y=new Map,_=void 0){const E=_==null?void 0:_(h,m,g,y);if(E!==void 0)return E;if(i.isPrimitive(h))return h;if(y.has(h))return y.get(h);if(Array.isArray(h)){const w=new Array(h.length);y.set(h,w);for(let x=0;x<h.length;x++)w[x]=c(h[x],x,g,y,_);return Object.hasOwn(h,"index")&&(w.index=h.index),Object.hasOwn(h,"input")&&(w.input=h.input),w}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const w=new RegExp(h.source,h.flags);return w.lastIndex=h.lastIndex,w}if(h instanceof Map){const w=new Map;y.set(h,w);for(const[x,j]of h)w.set(x,c(j,x,g,y,_));return w}if(h instanceof Set){const w=new Set;y.set(h,w);for(const x of h)w.add(c(x,void 0,g,y,_));return w}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(o.isTypedArray(h)){const w=new(Object.getPrototypeOf(h)).constructor(h.length);y.set(h,w);for(let x=0;x<h.length;x++)w[x]=c(h[x],x,g,y,_);return w}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const w=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return y.set(h,w),f(w,h,g,y,_),w}if(typeof File<"u"&&h instanceof File){const w=new File([h],h.name,{type:h.type});return y.set(h,w),f(w,h,g,y,_),w}if(typeof Blob<"u"&&h instanceof Blob){const w=new Blob([h],{type:h.type});return y.set(h,w),f(w,h,g,y,_),w}if(h instanceof Error){const w=structuredClone(h);return y.set(h,w),w.message=h.message,w.name=h.name,w.stack=h.stack,w.cause=h.cause,w.constructor=h.constructor,f(w,h,g,y,_),w}if(h instanceof Boolean){const w=new Boolean(h.valueOf());return y.set(h,w),f(w,h,g,y,_),w}if(h instanceof Number){const w=new Number(h.valueOf());return y.set(h,w),f(w,h,g,y,_),w}if(h instanceof String){const w=new String(h.valueOf());return y.set(h,w),f(w,h,g,y,_),w}if(typeof h=="object"&&d(h)){const w=Object.create(Object.getPrototypeOf(h));return y.set(h,w),f(w,h,g,y,_),w}return h}function f(h,m,g=h,y,_){const E=[...Object.keys(m),...r.getSymbols(m)];for(let w=0;w<E.length;w++){const x=E[w],j=Object.getOwnPropertyDescriptor(h,x);(j==null||j.writable)&&(h[x]=c(m[x],x,g,y,_))}}function d(h){switch(n.getTag(h)){case a.argumentsTag:case a.arrayTag:case a.arrayBufferTag:case a.dataViewTag:case a.booleanTag:case a.dateTag:case a.float32ArrayTag:case a.float64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.mapTag:case a.numberTag:case a.objectTag:case a.regexpTag:case a.setTag:case a.stringTag:case a.symbolTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=f})(Hy)),Hy}var jN;function pie(){return jN||(jN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Az();function n(a){return r.cloneDeepWithImpl(a,void 0,a,new Map,void 0)}e.cloneDeep=n})(Uy)),Uy}var CN;function mie(){return CN||(CN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ez(),n=pie();function a(i){return i=n.cloneDeep(i),o=>r.isMatch(o,i)}e.matches=a})(Iy)),Iy}var Xy={},Wy={},Zy={},ON;function vie(){return ON||(ON=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Az(),n=DE(),a=kz();function i(o,s){return r.cloneDeepWith(o,(c,f,d,h)=>{const m=s==null?void 0:s(c,f,d,h);if(m!==void 0)return m;if(typeof o=="object"){if(n.getTag(o)===a.objectTag&&typeof o.constructor!="function"){const g={};return h.set(o,g),r.copyProperties(g,o,d,h),g}switch(Object.prototype.toString.call(o)){case a.numberTag:case a.stringTag:case a.booleanTag:{const g=new o.constructor(o==null?void 0:o.valueOf());return r.copyProperties(g,o),g}case a.argumentsTag:{const g={};return r.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(Zy)),Zy}var TN;function gie(){return TN||(TN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=vie();function n(a){return r.cloneDeepWith(a)}e.cloneDeep=n})(Wy)),Wy}var Qy={},Jy={},NN;function jz(){return NN||(NN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=/^(?:0|[1-9]\d*)$/;function n(a,i=Number.MAX_SAFE_INTEGER){switch(typeof a){case"number":return Number.isInteger(a)&&a>=0&&a<i;case"symbol":return!1;case"string":return r.test(a)}}e.isIndex=n})(Jy)),Jy}var e0={},MN;function yie(){return MN||(MN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=DE();function n(a){return a!==null&&typeof a=="object"&&r.getTag(a)==="[object Arguments]"}e.isArguments=n})(e0)),e0}var PN;function bie(){return PN||(PN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=hz(),n=jz(),a=yie(),i=ME();function o(s,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&r.isDeepKey(c)&&(s==null?void 0:s[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let d=s;for(let h=0;h<f.length;h++){const m=f[h];if((d==null||!Object.hasOwn(d,m))&&!((Array.isArray(d)||a.isArguments(d))&&n.isIndex(m)&&m<d.length))return!1;d=d[m]}return!0}e.has=o})(Qy)),Qy}var RN;function xie(){return RN||(RN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ez(),n=NE(),a=gie(),i=PE(),o=bie();function s(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=a.cloneDeep(f),function(d){const h=i.get(d,c);return h===void 0?o.has(d,c):f===void 0?h===void 0:r.isMatch(h,f)}}e.matchesProperty=s})(Xy)),Xy}var DN;function _ie(){return DN||(DN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=bz(),n=cie(),a=mie(),i=xie();function o(s){if(s==null)return r.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):a.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=o})(Dy)),Dy}var LN;function wie(){return LN||(LN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=iie(),n=oie(),a=bz(),i=uie(),o=_ie();function s(c,f=a.identity){return i.isArrayLikeObject(c)?r.uniqBy(Array.from(c),n.ary(o.iteratee(f),1)):[]}e.uniqBy=s})(jy)),jy}var t0,IN;function Sie(){return IN||(IN=1,t0=wie().uniqBy),t0}var Eie=Sie();const zN=Dn(Eie);function kie(e,r,n){return r===!0?zN(e,n):typeof r=="function"?zN(e,r):e}var r0={exports:{}},n0={},a0={exports:{}},i0={};/**
|
|
118
|
+
* @license React
|
|
119
|
+
* use-sync-external-store-shim.production.js
|
|
120
|
+
*
|
|
121
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the MIT license found in the
|
|
124
|
+
* LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/var qN;function Aie(){if(qN)return i0;qN=1;var e=is();function r(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:r,a=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function c(m,g){var y=g(),_=a({inst:{value:y,getSnapshot:g}}),E=_[0].inst,w=_[1];return o(function(){E.value=y,E.getSnapshot=g,f(E)&&w({inst:E})},[m,y,g]),i(function(){return f(E)&&w({inst:E}),m(function(){f(E)&&w({inst:E})})},[m]),s(y),y}function f(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return i0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,i0}var BN;function jie(){return BN||(BN=1,a0.exports=Aie()),a0.exports}/**
|
|
126
|
+
* @license React
|
|
127
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
128
|
+
*
|
|
129
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the MIT license found in the
|
|
132
|
+
* LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/var $N;function Cie(){if($N)return n0;$N=1;var e=is(),r=jie();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var a=typeof Object.is=="function"?Object.is:n,i=r.useSyncExternalStore,o=e.useRef,s=e.useEffect,c=e.useMemo,f=e.useDebugValue;return n0.useSyncExternalStoreWithSelector=function(d,h,m,g,y){var _=o(null);if(_.current===null){var E={hasValue:!1,value:null};_.current=E}else E=_.current;_=c(function(){function x(N){if(!j){if(j=!0,C=N,N=g(N),y!==void 0&&E.hasValue){var M=E.value;if(y(M,N))return T=M}return T=N}if(M=T,a(C,N))return M;var R=g(N);return y!==void 0&&y(M,R)?(C=N,M):(C=N,T=R)}var j=!1,C,T,O=m===void 0?null:m;return[function(){return x(h())},O===null?void 0:function(){return x(O())}]},[h,m,g,y]);var w=i(d,_[0],_[1]);return s(function(){E.hasValue=!0,E.value=w},[w]),f(w),w},n0}var FN;function Oie(){return FN||(FN=1,r0.exports=Cie()),r0.exports}var Tie=Oie(),LE=k.createContext(null),Nie=e=>e,Et=()=>{var e=k.useContext(LE);return e?e.store.dispatch:Nie},Qd=()=>{},Mie=()=>Qd,Pie=(e,r)=>e===r;function Ce(e){var r=k.useContext(LE),n=k.useMemo(()=>r?a=>{if(a!=null)return e(a)}:Qd,[r,e]);return Tie.useSyncExternalStoreWithSelector(r?r.subscription.addNestedSub:Mie,r?r.store.getState:Qd,r?r.store.getState:Qd,n,Pie)}function Rie(e,r=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(r)}function Die(e,r=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(r)}function Lie(e,r="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${r}[${n}]`)}}var UN=e=>Array.isArray(e)?e:[e];function Iie(e){const r=Array.isArray(e[0])?e[0]:e;return Lie(r,"createSelector expects all input-selectors to be functions, but received the following types: "),r}function zie(e,r){const n=[],{length:a}=e;for(let i=0;i<a;i++)n.push(e[i].apply(null,r));return n}var qie=class{constructor(e){this.value=e}deref(){return this.value}},Bie=typeof WeakRef<"u"?WeakRef:qie,$ie=0,HN=1;function Pd(){return{s:$ie,v:void 0,o:null,p:null}}function Cz(e,r={}){let n=Pd();const{resultEqualityCheck:a}=r;let i,o=0;function s(){var m;let c=n;const{length:f}=arguments;for(let g=0,y=f;g<y;g++){const _=arguments[g];if(typeof _=="function"||typeof _=="object"&&_!==null){let E=c.o;E===null&&(c.o=E=new WeakMap);const w=E.get(_);w===void 0?(c=Pd(),E.set(_,c)):c=w}else{let E=c.p;E===null&&(c.p=E=new Map);const w=E.get(_);w===void 0?(c=Pd(),E.set(_,c)):c=w}}const d=c;let h;if(c.s===HN)h=c.v;else if(h=e.apply(null,arguments),o++,a){const g=((m=i==null?void 0:i.deref)==null?void 0:m.call(i))??i;g!=null&&a(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Bie(h):h}return d.s=HN,d.v=h,h}return s.clearCache=()=>{n=Pd(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function Fie(e,...r){const n=typeof e=="function"?{memoize:e,memoizeOptions:r}:e,a=(...i)=>{let o=0,s=0,c,f={},d=i.pop();typeof d=="object"&&(f=d,d=i.pop()),Rie(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...f},{memoize:m,memoizeOptions:g=[],argsMemoize:y=Cz,argsMemoizeOptions:_=[]}=h,E=UN(g),w=UN(_),x=Iie(i),j=m(function(){return o++,d.apply(null,arguments)},...E),C=y(function(){s++;const O=zie(x,arguments);return c=j.apply(null,O),c},...w);return Object.assign(C,{resultFunc:d,memoizedResultFunc:j,dependencies:x,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:y})};return Object.assign(a,{withTypes:()=>a}),a}var ue=Fie(Cz),Uie=Object.assign((e,r=ue)=>{Die(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),a=n.map(o=>e[o]);return r(a,(...o)=>o.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>Uie}),o0={},l0={},s0={},GN;function Hie(){return GN||(GN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(a){return typeof a=="symbol"?1:a===null?2:a===void 0?3:a!==a?4:0}const n=(a,i,o)=>{if(a!==i){const s=r(a),c=r(i);if(s===c&&s===0){if(a<i)return o==="desc"?1:-1;if(a>i)return o==="desc"?-1:1}return o==="desc"?c-s:s-c}return 0};e.compareValues=n})(s0)),s0}var u0={},c0={},VN;function Oz(){return VN||(VN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=r})(c0)),c0}var KN;function Gie(){return KN||(KN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Oz(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,s){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||r.isSymbol(o)?!0:typeof o=="string"&&(a.test(o)||!n.test(o))||s!=null&&Object.hasOwn(s,o)}e.isKey=i})(u0)),u0}var YN;function Vie(){return YN||(YN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Hie(),n=Gie(),a=ME();function i(o,s,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(y=>String(y));const d=(y,_)=>{let E=y;for(let w=0;w<_.length&&E!=null;++w)E=E[_[w]];return E},h=(y,_)=>_==null||y==null?_:typeof y=="object"&&"key"in y?Object.hasOwn(_,y.key)?_[y.key]:d(_,y.path):typeof y=="function"?y(_):Array.isArray(y)?d(_,y):typeof _=="object"?_[y]:_,m=s.map(y=>(Array.isArray(y)&&y.length===1&&(y=y[0]),y==null||typeof y=="function"||Array.isArray(y)||n.isKey(y)?y:{key:y,path:a.toPath(y)}));return o.map(y=>({original:y,criteria:m.map(_=>h(_,y))})).slice().sort((y,_)=>{for(let E=0;E<m.length;E++){const w=r.compareValues(y.criteria[E],_.criteria[E],c[E]);if(w!==0)return w}return 0}).map(y=>y.original)}e.orderBy=i})(l0)),l0}var f0={},XN;function Kie(){return XN||(XN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a=1){const i=[],o=Math.floor(a),s=(c,f)=>{for(let d=0;d<c.length;d++){const h=c[d];Array.isArray(h)&&f<o?s(h,f+1):i.push(h)}};return s(n,0),i}e.flatten=r})(f0)),f0}var d0={},WN;function Tz(){return WN||(WN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jz(),n=xz(),a=_z(),i=Sz();function o(s,c,f){return a.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&r.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],s):!1}e.isIterateeCall=o})(d0)),d0}var ZN;function Yie(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Vie(),n=Kie(),a=Tz();function i(o,...s){const c=s.length;return c>1&&a.isIterateeCall(o,s[0],s[1])?s=[]:c>2&&a.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),r.orderBy(o,n.flatten(s),["asc"])}e.sortBy=i})(o0)),o0}var h0,QN;function Xie(){return QN||(QN=1,h0=Yie().sortBy),h0}var Wie=Xie();const zp=Dn(Wie);var Nz=e=>e.legend.settings,Zie=e=>e.legend.size,Qie=e=>e.legend.payload;ue([Qie,Nz],(e,r)=>{var{itemSorter:n}=r,a=e.flat(1);return n?zp(a,n):a});var Rd=1;function Jie(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[r,n]=k.useState({height:0,left:0,top:0,width:0}),a=k.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),s={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(s.height-r.height)>Rd||Math.abs(s.left-r.left)>Rd||Math.abs(s.top-r.top)>Rd||Math.abs(s.width-r.width)>Rd)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[r.width,r.height,r.top,r.left,...e]);return[r,a]}function Zt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eoe=typeof Symbol=="function"&&Symbol.observable||"@@observable",JN=eoe,p0=()=>Math.random().toString(36).substring(7).split("").join("."),toe={INIT:`@@redux/INIT${p0()}`,REPLACE:`@@redux/REPLACE${p0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${p0()}`},Dh=toe;function IE(e){if(typeof e!="object"||e===null)return!1;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r||Object.getPrototypeOf(e)===null}function Mz(e,r,n){if(typeof e!="function")throw new Error(Zt(2));if(typeof r=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Zt(0));if(typeof r=="function"&&typeof n>"u"&&(n=r,r=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zt(1));return n(Mz)(e,r)}let a=e,i=r,o=new Map,s=o,c=0,f=!1;function d(){s===o&&(s=new Map,o.forEach((w,x)=>{s.set(x,w)}))}function h(){if(f)throw new Error(Zt(3));return i}function m(w){if(typeof w!="function")throw new Error(Zt(4));if(f)throw new Error(Zt(5));let x=!0;d();const j=c++;return s.set(j,w),function(){if(x){if(f)throw new Error(Zt(6));x=!1,d(),s.delete(j),o=null}}}function g(w){if(!IE(w))throw new Error(Zt(7));if(typeof w.type>"u")throw new Error(Zt(8));if(typeof w.type!="string")throw new Error(Zt(17));if(f)throw new Error(Zt(9));try{f=!0,i=a(i,w)}finally{f=!1}return(o=s).forEach(j=>{j()}),w}function y(w){if(typeof w!="function")throw new Error(Zt(10));a=w,g({type:Dh.REPLACE})}function _(){const w=m;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Zt(11));function j(){const T=x;T.next&&T.next(h())}return j(),{unsubscribe:w(j)}},[JN](){return this}}}return g({type:Dh.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:y,[JN]:_}}function roe(e){Object.keys(e).forEach(r=>{const n=e[r];if(typeof n(void 0,{type:Dh.INIT})>"u")throw new Error(Zt(12));if(typeof n(void 0,{type:Dh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zt(13))})}function Pz(e){const r=Object.keys(e),n={};for(let o=0;o<r.length;o++){const s=r[o];typeof e[s]=="function"&&(n[s]=e[s])}const a=Object.keys(n);let i;try{roe(n)}catch(o){i=o}return function(s={},c){if(i)throw i;let f=!1;const d={};for(let h=0;h<a.length;h++){const m=a[h],g=n[m],y=s[m],_=g(y,c);if(typeof _>"u")throw c&&c.type,new Error(Zt(14));d[m]=_,f=f||_!==y}return f=f||a.length!==Object.keys(s).length,f?d:s}}function Lh(...e){return e.length===0?r=>r:e.length===1?e[0]:e.reduce((r,n)=>(...a)=>r(n(...a)))}function noe(...e){return r=>(n,a)=>{const i=r(n,a);let o=()=>{throw new Error(Zt(15))};const s={getState:i.getState,dispatch:(f,...d)=>o(f,...d)},c=e.map(f=>f(s));return o=Lh(...c)(i.dispatch),{...i,dispatch:o}}}function Rz(e){return IE(e)&&"type"in e&&typeof e.type=="string"}var Dz=Symbol.for("immer-nothing"),e4=Symbol.for("immer-draftable"),mr=Symbol.for("immer-state");function Tn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ur=Object,rs=Ur.getPrototypeOf,Ih="constructor",qp="prototype",H2="configurable",zh="enumerable",Jd="writable",sc="value",Za=e=>!!e&&!!e[mr];function Pn(e){var r;return e?Lz(e)||$p(e)||!!e[e4]||!!((r=e[Ih])!=null&&r[e4])||Fp(e)||Up(e):!1}var aoe=Ur[qp][Ih].toString(),t4=new WeakMap;function Lz(e){if(!e||!zE(e))return!1;const r=rs(e);if(r===null||r===Ur[qp])return!0;const n=Ur.hasOwnProperty.call(r,Ih)&&r[Ih];if(n===Object)return!0;if(!Ul(n))return!1;let a=t4.get(n);return a===void 0&&(a=Function.toString.call(n),t4.set(n,a)),a===aoe}function Bp(e,r,n=!0){Pc(e)===0?(n?Reflect.ownKeys(e):Ur.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function Pc(e){const r=e[mr];return r?r.type_:$p(e)?1:Fp(e)?2:Up(e)?3:0}var r4=(e,r,n=Pc(e))=>n===2?e.has(r):Ur[qp].hasOwnProperty.call(e,r),G2=(e,r,n=Pc(e))=>n===2?e.get(r):e[r],qh=(e,r,n,a=Pc(e))=>{a===2?e.set(r,n):a===3?e.add(n):e[r]=n};function ioe(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}var $p=Array.isArray,Fp=e=>e instanceof Map,Up=e=>e instanceof Set,zE=e=>typeof e=="object",Ul=e=>typeof e=="function",m0=e=>typeof e=="boolean";function ooe(e){const r=+e;return Number.isInteger(r)&&String(r)===e}var La=e=>e.copy_||e.base_,qE=e=>e.modified_?e.copy_:e.base_;function V2(e,r){if(Fp(e))return new Map(e);if(Up(e))return new Set(e);if($p(e))return Array[qp].slice.call(e);const n=Lz(e);if(r===!0||r==="class_only"&&!n){const a=Ur.getOwnPropertyDescriptors(e);delete a[mr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const s=i[o],c=a[s];c[Jd]===!1&&(c[Jd]=!0,c[H2]=!0),(c.get||c.set)&&(a[s]={[H2]:!0,[Jd]:!0,[zh]:c[zh],[sc]:e[s]})}return Ur.create(rs(e),a)}else{const a=rs(e);if(a!==null&&n)return{...e};const i=Ur.create(a);return Ur.assign(i,e)}}function BE(e,r=!1){return Hp(e)||Za(e)||!Pn(e)||(Pc(e)>1&&Ur.defineProperties(e,{set:Dd,add:Dd,clear:Dd,delete:Dd}),Ur.freeze(e),r&&Bp(e,(n,a)=>{BE(a,!0)},!1)),e}function loe(){Tn(2)}var Dd={[sc]:loe};function Hp(e){return e===null||!zE(e)?!0:Ur.isFrozen(e)}var Bh="MapSet",K2="Patches",n4="ArrayMethods",Iz={};function Lo(e){const r=Iz[e];return r||Tn(0,e),r}var a4=e=>!!Iz[e],uc,zz=()=>uc,soe=(e,r)=>({drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:a4(Bh)?Lo(Bh):void 0,arrayMethodsPlugin_:a4(n4)?Lo(n4):void 0});function i4(e,r){r&&(e.patchPlugin_=Lo(K2),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function Y2(e){X2(e),e.drafts_.forEach(uoe),e.drafts_=null}function X2(e){e===uc&&(uc=e.parent_)}var o4=e=>uc=soe(uc,e);function uoe(e){const r=e[mr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function l4(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];if(e!==void 0&&e!==n){n[mr].modified_&&(Y2(r),Tn(4)),Pn(e)&&(e=s4(r,e));const{patchPlugin_:i}=r;i&&i.generateReplacementPatches_(n[mr].base_,e,r)}else e=s4(r,n);return coe(r,e,!0),Y2(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Dz?e:void 0}function s4(e,r){if(Hp(r))return r;const n=r[mr];if(!n)return $h(r,e.handledSet_,e);if(!Gp(n,e))return r;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:a}=n;if(a)for(;a.length>0;)a.pop()(e);$z(n,e)}return n.copy_}function coe(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BE(r,n)}function qz(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Gp=(e,r)=>e.scope_===r,foe=[];function Bz(e,r,n,a){const i=La(e),o=e.type_;if(a!==void 0&&G2(i,a,o)===r){qh(i,a,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Bp(i,(f,d)=>{if(Za(d)){const h=c.get(d)||[];h.push(f),c.set(d,h)}})}const s=e.draftLocations_.get(r)??foe;for(const c of s)qh(i,c,n,o)}function doe(e,r,n){e.callbacks_.push(function(i){var c;const o=r;if(!o||!Gp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const s=qE(o);Bz(e,o.draft_??o,s,n),$z(o,i)})}function $z(e,r){var a;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((a=e.assigned_)==null?void 0:a.size)??0)>0)){const{patchPlugin_:i}=r;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,r)}qz(e)}}function hoe(e,r,n){const{scope_:a}=e;if(Za(n)){const i=n[mr];Gp(i,a)&&i.callbacks_.push(function(){eh(e);const s=qE(i);Bz(e,n,s,r)})}else Pn(n)&&e.callbacks_.push(function(){const o=La(e);e.type_===3?o.has(n)&&$h(n,a.handledSet_,a):G2(o,r,e.type_)===n&&a.drafts_.length>1&&(e.assigned_.get(r)??!1)===!0&&e.copy_&&$h(G2(e.copy_,r,e.type_),a.handledSet_,a)})}function $h(e,r,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Za(e)||r.has(e)||!Pn(e)||Hp(e)||(r.add(e),Bp(e,(a,i)=>{if(Za(i)){const o=i[mr];if(Gp(o,n)){const s=qE(o);qh(e,a,s,e.type_),qz(o)}}else Pn(i)&&$h(i,r,n)})),e}function poe(e,r){const n=$p(e),a={type_:n?1:0,scope_:r?r.scope_:zz(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=a,o=Fh;n&&(i=[a],o=cc);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=s,[c,a]}var Fh={get(e,r){if(r===mr)return e;let n=e.scope_.arrayMethodsPlugin_;const a=e.type_===1&&typeof r=="string";if(a&&n!=null&&n.isArrayOperationMethod(r))return n.createMethodInterceptor(e,r);const i=La(e);if(!r4(i,r,e.type_))return moe(e,i,r);const o=i[r];if(e.finalized_||!Pn(o)||a&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&ooe(r))return o;if(o===v0(e.base_,r)){eh(e);const s=e.type_===1?+r:r,c=Z2(e.scope_,o,e,s);return e.copy_[s]=c}return o},has(e,r){return r in La(e)},ownKeys(e){return Reflect.ownKeys(La(e))},set(e,r,n){const a=Fz(La(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=v0(La(e),r),o=i==null?void 0:i[mr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_.set(r,!1),!0;if(ioe(n,i)&&(n!==void 0||r4(e.base_,r,e.type_)))return!0;eh(e),W2(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_.set(r,!0),hoe(e,r,n)),!0},deleteProperty(e,r){return eh(e),v0(e.base_,r)!==void 0||r in e.base_?(e.assigned_.set(r,!1),W2(e)):e.assigned_.delete(r),e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=La(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{[Jd]:!0,[H2]:e.type_!==1||r!=="length",[zh]:a[zh],[sc]:n[r]}},defineProperty(){Tn(11)},getPrototypeOf(e){return rs(e.base_)},setPrototypeOf(){Tn(12)}},cc={};for(let e in Fh){let r=Fh[e];cc[e]=function(){const n=arguments;return n[0]=n[0][0],r.apply(this,n)}}cc.deleteProperty=function(e,r){return cc.set.call(this,e,r,void 0)};cc.set=function(e,r,n){return Fh.set.call(this,e[0],r,n,e[0])};function v0(e,r){const n=e[mr];return(n?La(n):e)[r]}function moe(e,r,n){var i;const a=Fz(r,n);return a?sc in a?a[sc]:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function Fz(e,r){if(!(r in e))return;let n=rs(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=rs(n)}}function W2(e){e.modified_||(e.modified_=!0,e.parent_&&W2(e.parent_))}function eh(e){e.copy_||(e.assigned_=new Map,e.copy_=V2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var voe=class{constructor(r){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,a,i)=>{if(Ul(n)&&!Ul(a)){const s=a;a=n;const c=this;return function(d=s,...h){return c.produce(d,m=>a.call(this,m,...h))}}Ul(a)||Tn(6),i!==void 0&&!Ul(i)&&Tn(7);let o;if(Pn(n)){const s=o4(this),c=Z2(s,n,void 0);let f=!0;try{o=a(c),f=!1}finally{f?Y2(s):X2(s)}return i4(s,i),l4(o,s)}else if(!n||!zE(n)){if(o=a(n),o===void 0&&(o=n),o===Dz&&(o=void 0),this.autoFreeze_&&BE(o,!0),i){const s=[],c=[];Lo(K2).generateReplacementPatches_(n,o,{patches_:s,inversePatches_:c}),i(s,c)}return o}else Tn(1,n)},this.produceWithPatches=(n,a)=>{if(Ul(n))return(c,...f)=>this.produceWithPatches(c,d=>n(d,...f));let i,o;return[this.produce(n,a,(c,f)=>{i=c,o=f}),i,o]},m0(r==null?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze),m0(r==null?void 0:r.useStrictShallowCopy)&&this.setUseStrictShallowCopy(r.useStrictShallowCopy),m0(r==null?void 0:r.useStrictIteration)&&this.setUseStrictIteration(r.useStrictIteration)}createDraft(r){Pn(r)||Tn(8),Za(r)&&(r=vn(r));const n=o4(this),a=Z2(n,r,void 0);return a[mr].isManual_=!0,X2(n),a}finishDraft(r,n){const a=r&&r[mr];(!a||!a.isManual_)&&Tn(9);const{scope_:i}=a;return i4(i,n),l4(void 0,i)}setAutoFreeze(r){this.autoFreeze_=r}setUseStrictShallowCopy(r){this.useStrictShallowCopy_=r}setUseStrictIteration(r){this.useStrictIteration_=r}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(r,n){let a;for(a=n.length-1;a>=0;a--){const o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));const i=Lo(K2).applyPatches_;return Za(r)?i(r,n):this.produce(r,o=>i(o,n))}};function Z2(e,r,n,a){const[i,o]=Fp(r)?Lo(Bh).proxyMap_(r,n):Up(r)?Lo(Bh).proxySet_(r,n):poe(r,n);return((n==null?void 0:n.scope_)??zz()).drafts_.push(i),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=a,n&&a!==void 0?doe(n,o,a):o.callbacks_.push(function(f){var h;(h=f.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:d}=f;o.modified_&&d&&d.generatePatches_(o,[],f)}),i}function vn(e){return Za(e)||Tn(10,e),Uz(e)}function Uz(e){if(!Pn(e)||Hp(e))return e;const r=e[mr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=V2(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=V2(e,!0);return Bp(n,(i,o)=>{qh(n,i,Uz(o))},a),r&&(r.finalized_=!1),n}var goe=new voe,Hz=goe.produce;function Gz(e){return({dispatch:n,getState:a})=>i=>o=>typeof o=="function"?o(n,a,e):i(o)}var yoe=Gz(),boe=Gz,xoe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Lh:Lh.apply(null,arguments)};function Vr(e,r){function n(...a){if(r){let i=r(...a);if(!i)throw new Error(Hr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:a[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=a=>Rz(a)&&a.type===e,n}var Vz=class Hu extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Hu.prototype)}static get[Symbol.species](){return Hu}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Hu(...r[0].concat(this)):new Hu(...r.concat(this))}};function u4(e){return Pn(e)?Hz(e,()=>{}):e}function Ld(e,r,n){return e.has(r)?e.get(r):e.set(r,n(r)).get(r)}function _oe(e){return typeof e=="boolean"}var woe=()=>function(r){const{thunk:n=!0,immutableCheck:a=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=r??{};let s=new Vz;return n&&(_oe(n)?s.push(yoe):s.push(boe(n.extraArgument))),s},Kz="RTK_autoBatch",st=()=>e=>({payload:e,meta:{[Kz]:!0}}),c4=e=>r=>{setTimeout(r,e)},Yz=(e={type:"raf"})=>r=>(...n)=>{const a=r(...n);let i=!0,o=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:c4(10):e.type==="callback"?e.queueNotification:c4(e.timeout),d=()=>{s=!1,o&&(o=!1,c.forEach(h=>h()))};return Object.assign({},a,{subscribe(h){const m=()=>i&&h(),g=a.subscribe(m);return c.add(h),()=>{g(),c.delete(h)}},dispatch(h){var m;try{return i=!((m=h==null?void 0:h.meta)!=null&&m[Kz]),o=!i,o&&(s||(s=!0,f(d))),a.dispatch(h)}finally{i=!0}}})},Soe=e=>function(n){const{autoBatch:a=!0}=n??{};let i=new Vz(e);return a&&i.push(Yz(typeof a=="object"?a:void 0)),i};function Eoe(e){const r=woe(),{reducer:n=void 0,middleware:a,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(IE(n))c=Pz(n);else throw new Error(Hr(1));let f;typeof a=="function"?f=a(r):f=r();let d=Lh;i&&(d=xoe({trace:!1,...typeof i=="object"&&i}));const h=noe(...f),m=Soe(h);let g=typeof s=="function"?s(m):m();const y=d(...g);return Mz(c,o,y)}function Xz(e){const r={},n=[];let a;const i={addCase(o,s){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Hr(28));if(c in r)throw new Error(Hr(29));return r[c]=s,i},addAsyncThunk(o,s){return s.pending&&(r[o.pending.type]=s.pending),s.rejected&&(r[o.rejected.type]=s.rejected),s.fulfilled&&(r[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return a=o,i}};return e(i),[r,n,a]}function koe(e){return typeof e=="function"}function Aoe(e,r){let[n,a,i]=Xz(r),o;if(koe(e))o=()=>u4(e());else{const c=u4(e);o=()=>c}function s(c=o(),f){let d=[n[f.type],...a.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[i]),d.reduce((h,m)=>{if(m)if(Za(h)){const y=m(h,f);return y===void 0?h:y}else{if(Pn(h))return Hz(h,g=>m(g,f));{const g=m(h,f);if(g===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return h},c)}return s.getInitialState=o,s}var joe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Coe=(e=21)=>{let r="",n=e;for(;n--;)r+=joe[Math.random()*64|0];return r},Ooe=Symbol.for("rtk-slice-createasyncthunk");function Toe(e,r){return`${e}/${r}`}function Noe({creators:e}={}){var n;const r=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Ooe];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(Hr(11));const c=(typeof i.reducers=="function"?i.reducers(Poe()):i.reducers)||{},f=Object.keys(c),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(T,O){const N=typeof T=="string"?T:T.type;if(!N)throw new Error(Hr(12));if(N in d.sliceCaseReducersByType)throw new Error(Hr(13));return d.sliceCaseReducersByType[N]=O,h},addMatcher(T,O){return d.sliceMatchers.push({matcher:T,reducer:O}),h},exposeAction(T,O){return d.actionCreators[T]=O,h},exposeCaseReducer(T,O){return d.sliceCaseReducersByName[T]=O,h}};f.forEach(T=>{const O=c[T],N={reducerName:T,type:Toe(o,T),createNotation:typeof i.reducers=="function"};Doe(O)?Ioe(N,O,h,r):Roe(N,O,h)});function m(){const[T={},O=[],N=void 0]=typeof i.extraReducers=="function"?Xz(i.extraReducers):[i.extraReducers],M={...T,...d.sliceCaseReducersByType};return Aoe(i.initialState,R=>{for(let L in M)R.addCase(L,M[L]);for(let L of d.sliceMatchers)R.addMatcher(L.matcher,L.reducer);for(let L of O)R.addMatcher(L.matcher,L.reducer);N&&R.addDefaultCase(N)})}const g=T=>T,y=new Map,_=new WeakMap;let E;function w(T,O){return E||(E=m()),E(T,O)}function x(){return E||(E=m()),E.getInitialState()}function j(T,O=!1){function N(R){let L=R[T];return typeof L>"u"&&O&&(L=Ld(_,N,x)),L}function M(R=g){const L=Ld(y,O,()=>new WeakMap);return Ld(L,R,()=>{const D={};for(const[q,z]of Object.entries(i.selectors??{}))D[q]=Moe(z,R,()=>Ld(_,R,x),O);return D})}return{reducerPath:T,getSelectors:M,get selectors(){return M(N)},selectSlice:N}}const C={name:o,reducer:w,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:x,...j(s),injectInto(T,{reducerPath:O,...N}={}){const M=O??s;return T.inject({reducerPath:M,reducer:w},N),{...C,...j(M,!0)}}};return C}}function Moe(e,r,n,a){function i(o,...s){let c=r(o);return typeof c>"u"&&a&&(c=n()),e(c,...s)}return i.unwrapped=e,i}var cr=Noe();function Poe(){function e(r,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...n}}return e.withTypes=()=>e,{reducer(r){return Object.assign({[r.name](...n){return r(...n)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:n}},asyncThunk:e}}function Roe({type:e,reducerName:r,createNotation:n},a,i){let o,s;if("reducer"in a){if(n&&!Loe(a))throw new Error(Hr(17));o=a.reducer,s=a.prepare}else o=a;i.addCase(e,o).exposeCaseReducer(r,o).exposeAction(r,s?Vr(e,s):Vr(e))}function Doe(e){return e._reducerDefinitionType==="asyncThunk"}function Loe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ioe({type:e,reducerName:r},n,a,i){if(!i)throw new Error(Hr(18));const{payloadCreator:o,fulfilled:s,pending:c,rejected:f,settled:d,options:h}=n,m=i(e,o,h);a.exposeAction(r,m),s&&a.addCase(m.fulfilled,s),c&&a.addCase(m.pending,c),f&&a.addCase(m.rejected,f),d&&a.addMatcher(m.settled,d),a.exposeCaseReducer(r,{fulfilled:s||Id,pending:c||Id,rejected:f||Id,settled:d||Id})}function Id(){}var zoe="task",Wz="listener",Zz="completed",$E="cancelled",qoe=`task-${$E}`,Boe=`task-${Zz}`,Q2=`${Wz}-${$E}`,$oe=`${Wz}-${Zz}`,Vp=class{constructor(e){Fg(this,"name","TaskAbortError");Fg(this,"message");this.code=e,this.message=`${zoe} ${$E} (reason: ${e})`}},FE=(e,r)=>{if(typeof e!="function")throw new TypeError(Hr(32))},Uh=()=>{},Qz=(e,r=Uh)=>(e.catch(r),e),Jz=(e,r)=>(e.addEventListener("abort",r,{once:!0}),()=>e.removeEventListener("abort",r)),To=e=>{if(e.aborted)throw new Vp(e.reason)};function eq(e,r){let n=Uh;return new Promise((a,i)=>{const o=()=>i(new Vp(e.reason));if(e.aborted){o();return}n=Jz(e,o),r.finally(()=>n()).then(a,i)}).finally(()=>{n=Uh})}var Foe=async(e,r)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Vp?"cancelled":"rejected",error:n}}finally{r==null||r()}},Hh=e=>r=>Qz(eq(e,r).then(n=>(To(e),n))),tq=e=>{const r=Hh(e);return n=>r(new Promise(a=>setTimeout(a,n)))},{assign:Yl}=Object,f4={},Kp="listenerMiddleware",Uoe=(e,r)=>{const n=a=>Jz(e,()=>a.abort(e.reason));return(a,i)=>{FE(a);const o=new AbortController;n(o);const s=Foe(async()=>{To(e),To(o.signal);const c=await a({pause:Hh(o.signal),delay:tq(o.signal),signal:o.signal});return To(o.signal),c},()=>o.abort(Boe));return i!=null&&i.autoJoin&&r.push(s.catch(Uh)),{result:Hh(e)(s),cancel(){o.abort(qoe)}}}},Hoe=(e,r)=>{const n=async(a,i)=>{To(r);let o=()=>{};const c=[new Promise((f,d)=>{let h=e({predicate:a,effect:(m,g)=>{g.unsubscribe(),f([m,g.getState(),g.getOriginalState()])}});o=()=>{h(),d()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await eq(r,Promise.race(c));return To(r),f}finally{o()}};return(a,i)=>Qz(n(a,i))},rq=e=>{let{type:r,actionCreator:n,matcher:a,predicate:i,effect:o}=e;if(r)i=Vr(r).match;else if(n)r=n.type,i=n.match;else if(a)i=a;else if(!i)throw new Error(Hr(21));return FE(o),{predicate:i,type:r,effect:o}},nq=Yl(e=>{const{type:r,predicate:n,effect:a}=rq(e);return{id:Coe(),effect:a,type:r,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Hr(22))}}},{withTypes:()=>nq}),d4=(e,r)=>{const{type:n,effect:a,predicate:i}=rq(r);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===a)},J2=e=>{e.pending.forEach(r=>{r.abort(Q2)})},Goe=(e,r)=>()=>{for(const n of r.keys())J2(n);e.clear()},h4=(e,r,n)=>{try{e(r,n)}catch(a){setTimeout(()=>{throw a},0)}},aq=Yl(Vr(`${Kp}/add`),{withTypes:()=>aq}),Voe=Vr(`${Kp}/removeAll`),iq=Yl(Vr(`${Kp}/remove`),{withTypes:()=>iq}),Koe=(...e)=>{console.error(`${Kp}/error`,...e)},Rc=(e={})=>{const r=new Map,n=new Map,a=y=>{const _=n.get(y)??0;n.set(y,_+1)},i=y=>{const _=n.get(y)??1;_===1?n.delete(y):n.set(y,_-1)},{extra:o,onError:s=Koe}=e;FE(s);const c=y=>(y.unsubscribe=()=>r.delete(y.id),r.set(y.id,y),_=>{y.unsubscribe(),_!=null&&_.cancelActive&&J2(y)}),f=y=>{const _=d4(r,y)??nq(y);return c(_)};Yl(f,{withTypes:()=>f});const d=y=>{const _=d4(r,y);return _&&(_.unsubscribe(),y.cancelActive&&J2(_)),!!_};Yl(d,{withTypes:()=>d});const h=async(y,_,E,w)=>{const x=new AbortController,j=Hoe(f,x.signal),C=[];try{y.pending.add(x),a(y),await Promise.resolve(y.effect(_,Yl({},E,{getOriginalState:w,condition:(T,O)=>j(T,O).then(Boolean),take:j,delay:tq(x.signal),pause:Hh(x.signal),extra:o,signal:x.signal,fork:Uoe(x.signal,C),unsubscribe:y.unsubscribe,subscribe:()=>{r.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((T,O,N)=>{T!==x&&(T.abort(Q2),N.delete(T))})},cancel:()=>{x.abort(Q2),y.pending.delete(x)},throwIfCancelled:()=>{To(x.signal)}})))}catch(T){T instanceof Vp||h4(s,T,{raisedBy:"effect"})}finally{await Promise.all(C),x.abort($oe),i(y),y.pending.delete(x)}},m=Goe(r,n);return{middleware:y=>_=>E=>{if(!Rz(E))return _(E);if(aq.match(E))return f(E.payload);if(Voe.match(E)){m();return}if(iq.match(E))return d(E.payload);let w=y.getState();const x=()=>{if(w===f4)throw new Error(Hr(23));return w};let j;try{if(j=_(E),r.size>0){const C=y.getState(),T=Array.from(r.values());for(const O of T){let N=!1;try{N=O.predicate(E,C,w)}catch(M){N=!1,h4(s,M,{raisedBy:"predicate"})}N&&h(O,E,y,x)}}}finally{w=f4}return j},startListening:f,stopListening:d,clearListeners:m}};function Hr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Yoe={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},oq=cr({name:"chartLayout",initialState:Yoe,reducers:{setLayout(e,r){e.layoutType=r.payload},setChartSize(e,r){e.width=r.payload.width,e.height=r.payload.height},setMargin(e,r){var n,a,i,o;e.margin.top=(n=r.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(a=r.payload.right)!==null&&a!==void 0?a:0,e.margin.bottom=(i=r.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=r.payload.left)!==null&&o!==void 0?o:0},setScale(e,r){e.scale=r.payload}}}),{setMargin:Xoe,setLayout:Woe,setChartSize:Zoe,setScale:Qoe}=oq.actions,Joe=oq.reducer;function lq(e,r,n){return Array.isArray(e)&&e&&r+n!==0?e.slice(r,n+1):e}function De(e){return Number.isFinite(e)}function la(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function p4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Hl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?p4(Object(n),!0).forEach(function(a){ele(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ele(e,r,n){return(r=tle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tle(e){var r=rle(e,"string");return typeof r=="symbol"?r:r+""}function rle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function er(e,r,n){return $t(e)||$t(r)?n:gn(r)?Ip(e,r,n):typeof r=="function"?r(e):n}var nle=(e,r,n)=>{if(r&&n){var{width:a,height:i}=n,{align:o,verticalAlign:s,layout:c}=r;if((c==="vertical"||c==="horizontal"&&s==="middle")&&o!=="center"&&je(e[o]))return Hl(Hl({},e),{},{[o]:e[o]+(a||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&s!=="middle"&&je(e[s]))return Hl(Hl({},e),{},{[s]:e[s]+(i||0)})}return e},ti=(e,r)=>e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis",sq=(e,r,n,a)=>{if(a)return e.map(c=>c.coordinate);var i,o,s=e.map(c=>(c.coordinate===r&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate));return i||s.push(r),o||s.push(n),s},uq=(e,r,n)=>{if(!e)return null;var{duplicateDomain:a,type:i,range:o,scale:s,realScaleType:c,isCategorical:f,categoricalDomain:d,tickCount:h,ticks:m,niceTicks:g,axisType:y}=e;if(!s)return null;var _=c==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,E=i==="category"&&s.bandwidth?s.bandwidth()/_:0;if(E=y==="angleAxis"&&o&&o.length>=2?mn(o[0]-o[1])*2*E:E,m||g){var w=(m||g||[]).map((x,j)=>{var C=a?a.indexOf(x):x,T=s.map(C);return De(T)?{coordinate:T+E,value:x,offset:E,index:j}:null}).filter(Tr);return w}return f&&d?d.map((x,j)=>{var C=s.map(x);return De(C)?{coordinate:C+E,value:x,index:j,offset:E}:null}).filter(Tr):s.ticks&&h!=null?s.ticks(h).map((x,j)=>{var C=s.map(x);return De(C)?{coordinate:C+E,value:x,index:j,offset:E}:null}).filter(Tr):s.domain().map((x,j)=>{var C=s.map(x);return De(C)?{coordinate:C+E,value:a?a[x]:x,index:j,offset:E}:null}).filter(Tr)},ale=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,s=0,c=0;c<n;++c){var f=e[c],d=f==null?void 0:f[i];if(d!=null){var h=d[1],m=d[0],g=Wa(h)?m:h;g>=0?(d[0]=o,o+=g,d[1]=o):(d[0]=s,s+=g,d[1]=s)}}}},ile=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,s=0;s<n;++s){var c=e[s],f=c==null?void 0:c[i];if(f!=null){var d=Wa(f[1])?f[0]:f[1];d>=0?(f[0]=o,o+=d,f[1]=o):(f[0]=0,f[1]=0)}}}},ole={sign:ale,expand:Rae,none:Ro,silhouette:Dae,wiggle:Lae,positive:ile},lle=(e,r,n)=>{var a,i=(a=ole[n])!==null&&a!==void 0?a:Ro,o=Pae().keys(r).value((c,f)=>Number(er(c,f,0))).order(F2).offset(i),s=o(e);return s.forEach((c,f)=>{c.forEach((d,h)=>{var m=er(e[h],r[f],0);Array.isArray(m)&&m.length===2&&je(m[0])&&je(m[1])&&(d[0]=m[0],d[1]=m[1])})}),s};function m4(e){var{axis:r,ticks:n,bandSize:a,entry:i,index:o,dataKey:s}=e;if(r.type==="category"){if(!r.allowDuplicatedCategory&&r.dataKey&&!$t(i[r.dataKey])){var c=mz(n,"value",i[r.dataKey]);if(c)return c.coordinate+a/2}return n!=null&&n[o]?n[o].coordinate+a/2:null}var f=er(i,$t(s)?r.dataKey:s),d=r.scale.map(f);return je(d)?d:null}var sle=e=>{var r=e.flat(2).filter(je);return[Math.min(...r),Math.max(...r)]},ule=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],cle=(e,r,n)=>{if(e!=null)return ule(Object.keys(e).reduce((a,i)=>{var o=e[i];if(!o)return a;var{stackedData:s}=o,c=s.reduce((f,d)=>{var h=lq(d,r,n),m=sle(h);return!De(m[0])||!De(m[1])?f:[Math.min(f[0],m[0]),Math.max(f[1],m[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]))},v4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,g4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Gh=(e,r,n)=>{if(e&&e.scale&&e.scale.bandwidth){var a=e.scale.bandwidth();if(!n||a>0)return a}if(e&&r&&r.length>=2){for(var i=zp(r,h=>h.coordinate),o=1/0,s=1,c=i.length;s<c;s++){var f=i[s],d=i[s-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((d==null?void 0:d.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function y4(e){var{tooltipEntrySettings:r,dataKey:n,payload:a,value:i,name:o}=e;return Hl(Hl({},r),{},{dataKey:n,payload:a,value:i,name:o})}function cq(e,r){if(e)return String(e);if(typeof r=="string")return r}var fle=(e,r)=>{if(r==="horizontal")return e.relativeX;if(r==="vertical")return e.relativeY},dle=(e,r)=>r==="centric"?e.angle:e.radius,ri=e=>e.layout.width,ni=e=>e.layout.height,hle=e=>e.layout.scale,fq=e=>e.layout.margin,Yp=ue(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Xp=ue(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),ple="data-recharts-item-index",mle="data-recharts-item-id",Dc=60;function b4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function zd(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?b4(Object(n),!0).forEach(function(a){vle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function vle(e,r,n){return(r=gle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function gle(e){var r=yle(e,"string");return typeof r=="symbol"?r:r+""}function yle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ble=e=>e.brush.height;function xle(e){var r=Xp(e);return r.reduce((n,a)=>{if(a.orientation==="left"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Dc;return n+i}return n},0)}function _le(e){var r=Xp(e);return r.reduce((n,a)=>{if(a.orientation==="right"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Dc;return n+i}return n},0)}function wle(e){var r=Yp(e);return r.reduce((n,a)=>a.orientation==="top"&&!a.mirror&&!a.hide?n+a.height:n,0)}function Sle(e){var r=Yp(e);return r.reduce((n,a)=>a.orientation==="bottom"&&!a.mirror&&!a.hide?n+a.height:n,0)}var rr=ue([ri,ni,fq,ble,xle,_le,wle,Sle,Nz,Zie],(e,r,n,a,i,o,s,c,f,d)=>{var h={left:(n.left||0)+i,right:(n.right||0)+o},m={top:(n.top||0)+s,bottom:(n.bottom||0)+c},g=zd(zd({},m),h),y=g.bottom;g.bottom+=a,g=nle(g,f,d);var _=e-g.left-g.right,E=r-g.top-g.bottom;return zd(zd({brushBottom:y},g),{},{width:Math.max(_,0),height:Math.max(E,0)})}),Ele=ue(rr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),dq=ue(ri,ni,(e,r)=>({x:0,y:0,width:e,height:r})),kle=k.createContext(null),yr=()=>k.useContext(kle)!=null,Wp=e=>e.brush,Zp=ue([Wp,rr,fq],(e,r,n)=>({height:e.height,x:je(e.x)?e.x:r.left,y:je(e.y)?e.y:r.top+r.height+r.brushBottom-((n==null?void 0:n.bottom)||0),width:je(e.width)?e.width:r.width})),g0={},y0={},b0={},x4;function Ale(){return x4||(x4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a,{signal:i,edges:o}={}){let s,c=null;const f=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),h=()=>{c!==null&&(n.apply(s,c),s=void 0,c=null)},m=()=>{d&&h(),E()};let g=null;const y=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,m()},a)},_=()=>{g!==null&&(clearTimeout(g),g=null)},E=()=>{_(),s=void 0,c=null},w=()=>{h()},x=function(...j){if(i!=null&&i.aborted)return;s=this,c=j;const C=g==null;y(),f&&C&&h()};return x.schedule=y,x.cancel=E,x.flush=w,i==null||i.addEventListener("abort",E,{once:!0}),x}e.debounce=r})(b0)),b0}var _4;function jle(){return _4||(_4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Ale();function n(a,i=0,o={}){typeof o!="object"&&(o={});const{leading:s=!1,trailing:c=!0,maxWait:f}=o,d=Array(2);s&&(d[0]="leading"),c&&(d[1]="trailing");let h,m=null;const g=r.debounce(function(...E){h=a.apply(this,E),m=null},i,{edges:d}),y=function(...E){return f!=null&&(m===null&&(m=Date.now()),Date.now()-m>=f)?(h=a.apply(this,E),m=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,E),h)},_=()=>(g.flush(),h);return y.cancel=g.cancel,y.flush=_,y}e.debounce=n})(y0)),y0}var w4;function Cle(){return w4||(w4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jle();function n(a,i=0,o={}){const{leading:s=!0,trailing:c=!0}=o;return r.debounce(a,i,{leading:s,maxWait:i,trailing:c})}e.throttle=n})(g0)),g0}var x0,S4;function Ole(){return S4||(S4=1,x0=Cle().throttle),x0}var Tle=Ole();const Nle=Dn(Tle);var Vh=function(r,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!r))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>i[s++]))}},Qn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},hq=(e,r,n)=>{var{width:a=Qn.width,height:i=Qn.height,aspect:o,maxHeight:s}=n,c=Do(a)?e:Number(a),f=Do(i)?r:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),s&&f!=null&&f>s&&(f=s)),{calculatedWidth:c,calculatedHeight:f}},Mle={width:0,height:0,overflow:"visible"},Ple={width:0,overflowX:"visible"},Rle={height:0,overflowY:"visible"},Dle={},Lle=e=>{var{width:r,height:n}=e,a=Do(r),i=Do(n);return a&&i?Mle:a?Ple:i?Rle:Dle};function Ile(e){var{width:r,height:n,aspect:a}=e,i=r,o=n;return i===void 0&&o===void 0?(i=Qn.width,o=Qn.height):i===void 0?i=a&&a>0?void 0:Qn.width:o===void 0&&(o=a&&a>0?void 0:Qn.height),{width:i,height:o}}function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},eS.apply(null,arguments)}function E4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function k4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?E4(Object(n),!0).forEach(function(a){zle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function zle(e,r,n){return(r=qle(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qle(e){var r=Ble(e,"string");return typeof r=="symbol"?r:r+""}function Ble(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var pq=k.createContext(Qn.initialDimension);function $le(e){return la(e.width)&&la(e.height)}function mq(e){var{children:r,width:n,height:a}=e,i=k.useMemo(()=>({width:n,height:a}),[n,a]);return $le(i)?k.createElement(pq.Provider,{value:i},r):null}var UE=()=>k.useContext(pq),Fle=k.forwardRef((e,r)=>{var{aspect:n,initialDimension:a=Qn.initialDimension,width:i,height:o,minWidth:s=Qn.minWidth,minHeight:c,maxHeight:f,children:d,debounce:h=Qn.debounce,id:m,className:g,onResize:y,style:_={}}=e,E=k.useRef(null),w=k.useRef();w.current=y,k.useImperativeHandle(r,()=>E.current);var[x,j]=k.useState({containerWidth:a.width,containerHeight:a.height}),C=k.useCallback((R,L)=>{j(D=>{var q=Math.round(R),z=Math.round(L);return D.containerWidth===q&&D.containerHeight===z?D:{containerWidth:q,containerHeight:z}})},[]);k.useEffect(()=>{if(E.current==null||typeof ResizeObserver>"u")return Uo;var R=z=>{var H,F=z[0];if(F!=null){var{width:X,height:B}=F.contentRect;C(X,B),(H=w.current)===null||H===void 0||H.call(w,X,B)}};h>0&&(R=Nle(R,h,{trailing:!0,leading:!1}));var L=new ResizeObserver(R),{width:D,height:q}=E.current.getBoundingClientRect();return C(D,q),L.observe(E.current),()=>{L.disconnect()}},[C,h]);var{containerWidth:T,containerHeight:O}=x;Vh(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:M}=hq(T,O,{width:i,height:o,aspect:n,maxHeight:f});return Vh(N!=null&&N>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
134
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
135
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
136
|
+
height and width.`,N,M,i,o,s,c,n),k.createElement("div",{id:m?"".concat(m):void 0,className:et("recharts-responsive-container",g),style:k4(k4({},_),{},{width:i,height:o,minWidth:s,minHeight:c,maxHeight:f}),ref:E},k.createElement("div",{style:Lle({width:i,height:o})},k.createElement(mq,{width:N,height:M},d)))}),Ule=k.forwardRef((e,r)=>{var n=UE();if(la(n.width)&&la(n.height))return e.children;var{width:a,height:i}=Ile({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:s}=hq(void 0,void 0,{width:a,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return je(o)&&je(s)?k.createElement(mq,{width:o,height:s},e.children):k.createElement(Fle,eS({},e,{width:a,height:i,ref:r}))});function HE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Lc=()=>{var e,r=yr(),n=Ce(Ele),a=Ce(Zp),i=(e=Ce(Wp))===null||e===void 0?void 0:e.padding;return!r||!a||!i?n:{width:a.width-i.left-i.right,height:a.height-i.top-i.bottom,x:i.left,y:i.top}},Hle={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},vq=()=>{var e;return(e=Ce(rr))!==null&&e!==void 0?e:Hle},gq=()=>Ce(ri),yq=()=>Ce(ni),vt=e=>e.layout.layoutType,us=()=>Ce(vt),bq=()=>{var e=us();if(e==="horizontal"||e==="vertical")return e},xq=e=>{var r=e.layout.layoutType;if(r==="centric"||r==="radial")return r},Gle=()=>{var e=us();return e!==void 0},Ic=e=>{var r=Et(),n=yr(),{width:a,height:i}=e,o=UE(),s=a,c=i;return o&&(s=o.width>0?o.width:a,c=o.height>0?o.height:i),k.useEffect(()=>{!n&&la(s)&&la(c)&&r(Zoe({width:s,height:c}))},[r,n,s,c]),null},_q=Symbol.for("immer-nothing"),A4=Symbol.for("immer-draftable"),Kr=Symbol.for("immer-state");function Nn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var fc=Object.getPrototypeOf;function ns(e){return!!e&&!!e[Kr]}function Io(e){var r;return e?wq(e)||Array.isArray(e)||!!e[A4]||!!((r=e.constructor)!=null&&r[A4])||zc(e)||Jp(e):!1}var Vle=Object.prototype.constructor.toString(),j4=new WeakMap;function wq(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let a=j4.get(n);return a===void 0&&(a=Function.toString.call(n),j4.set(n,a)),a===Vle}function Kh(e,r,n=!0){Qp(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function Qp(e){const r=e[Kr];return r?r.type_:Array.isArray(e)?1:zc(e)?2:Jp(e)?3:0}function tS(e,r){return Qp(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function Sq(e,r,n){const a=Qp(e);a===2?e.set(r,n):a===3?e.add(n):e[r]=n}function Kle(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function zc(e){return e instanceof Map}function Jp(e){return e instanceof Set}function _o(e){return e.copy_||e.base_}function rS(e,r){if(zc(e))return new Map(e);if(Jp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=wq(e);if(r===!0||r==="class_only"&&!n){const a=Object.getOwnPropertyDescriptors(e);delete a[Kr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const s=i[o],c=a[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(a[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(fc(e),a)}else{const a=fc(e);if(a!==null&&n)return{...e};const i=Object.create(a);return Object.assign(i,e)}}function GE(e,r=!1){return em(e)||ns(e)||!Io(e)||(Qp(e)>1&&Object.defineProperties(e,{set:qd,add:qd,clear:qd,delete:qd}),Object.freeze(e),r&&Object.values(e).forEach(n=>GE(n,!0))),e}function Yle(){Nn(2)}var qd={value:Yle};function em(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Xle={};function zo(e){const r=Xle[e];return r||Nn(0,e),r}var dc;function Eq(){return dc}function Wle(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function C4(e,r){r&&(zo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function nS(e){aS(e),e.drafts_.forEach(Zle),e.drafts_=null}function aS(e){e===dc&&(dc=e.parent_)}function O4(e){return dc=Wle(dc,e)}function Zle(e){const r=e[Kr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function T4(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return e!==void 0&&e!==n?(n[Kr].modified_&&(nS(r),Nn(4)),Io(e)&&(e=Yh(r,e),r.parent_||Xh(r,e)),r.patches_&&zo("Patches").generateReplacementPatches_(n[Kr].base_,e,r.patches_,r.inversePatches_)):e=Yh(r,n,[]),nS(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==_q?e:void 0}function Yh(e,r,n){if(em(r))return r;const a=e.immer_.shouldUseStrictIteration(),i=r[Kr];if(!i)return Kh(r,(o,s)=>N4(e,i,r,o,s,n),a),r;if(i.scope_!==e)return r;if(!i.modified_)return Xh(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let s=o,c=!1;i.type_===3&&(s=new Set(o),o.clear(),c=!0),Kh(s,(f,d)=>N4(e,i,o,f,d,n,c),a),Xh(e,o,!1),n&&e.patches_&&zo("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function N4(e,r,n,a,i,o,s){if(i==null||typeof i!="object"&&!s)return;const c=em(i);if(!(c&&!s)){if(ns(i)){const f=o&&r&&r.type_!==3&&!tS(r.assigned_,a)?o.concat(a):void 0,d=Yh(e,i,f);if(Sq(n,a,d),ns(d))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Io(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[a]===i&&c)return;Yh(e,i),(!r||!r.scope_.parent_)&&typeof a!="symbol"&&(zc(n)?n.has(a):Object.prototype.propertyIsEnumerable.call(n,a))&&Xh(e,i)}}}function Xh(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&GE(r,n)}function Qle(e,r){const n=Array.isArray(e),a={type_:n?1:0,scope_:r?r.scope_:Eq(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=a,o=VE;n&&(i=[a],o=hc);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=s,c}var VE={get(e,r){if(r===Kr)return e;const n=_o(e);if(!tS(n,r))return Jle(e,n,r);const a=n[r];return e.finalized_||!Io(a)?a:a===_0(e.base_,r)?(w0(e),e.copy_[r]=oS(a,e)):a},has(e,r){return r in _o(e)},ownKeys(e){return Reflect.ownKeys(_o(e))},set(e,r,n){const a=kq(_o(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=_0(_o(e),r),o=i==null?void 0:i[Kr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_[r]=!1,!0;if(Kle(n,i)&&(n!==void 0||tS(e.base_,r)))return!0;w0(e),iS(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_[r]=!0),!0},deleteProperty(e,r){return _0(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,w0(e),iS(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=_o(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:a.enumerable,value:n[r]}},defineProperty(){Nn(11)},getPrototypeOf(e){return fc(e.base_)},setPrototypeOf(){Nn(12)}},hc={};Kh(VE,(e,r)=>{hc[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});hc.deleteProperty=function(e,r){return hc.set.call(this,e,r,void 0)};hc.set=function(e,r,n){return VE.set.call(this,e[0],r,n,e[0])};function _0(e,r){const n=e[Kr];return(n?_o(n):e)[r]}function Jle(e,r,n){var i;const a=kq(r,n);return a?"value"in a?a.value:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function kq(e,r){if(!(r in e))return;let n=fc(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=fc(n)}}function iS(e){e.modified_||(e.modified_=!0,e.parent_&&iS(e.parent_))}function w0(e){e.copy_||(e.copy_=rS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ese=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,n,a)=>{if(typeof r=="function"&&typeof n!="function"){const o=n;n=r;const s=this;return function(f=o,...d){return s.produce(f,h=>n.call(this,h,...d))}}typeof n!="function"&&Nn(6),a!==void 0&&typeof a!="function"&&Nn(7);let i;if(Io(r)){const o=O4(this),s=oS(r,void 0);let c=!0;try{i=n(s),c=!1}finally{c?nS(o):aS(o)}return C4(o,a),T4(i,o)}else if(!r||typeof r!="object"){if(i=n(r),i===void 0&&(i=r),i===_q&&(i=void 0),this.autoFreeze_&&GE(i,!0),a){const o=[],s=[];zo("Patches").generateReplacementPatches_(r,i,o,s),a(o,s)}return i}else Nn(1,r)},this.produceWithPatches=(r,n)=>{if(typeof r=="function")return(s,...c)=>this.produceWithPatches(s,f=>r(f,...c));let a,i;return[this.produce(r,n,(s,c)=>{a=s,i=c}),a,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Io(e)||Nn(8),ns(e)&&(e=tse(e));const r=O4(this),n=oS(e,void 0);return n[Kr].isManual_=!0,aS(r),n}finishDraft(e,r){const n=e&&e[Kr];(!n||!n.isManual_)&&Nn(9);const{scope_:a}=n;return C4(a,r),T4(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let n;for(n=r.length-1;n>=0;n--){const i=r[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(r=r.slice(n+1));const a=zo("Patches").applyPatches_;return ns(e)?a(e,r):this.produce(e,i=>a(i,r))}};function oS(e,r){const n=zc(e)?zo("MapSet").proxyMap_(e,r):Jp(e)?zo("MapSet").proxySet_(e,r):Qle(e,r);return(r?r.scope_:Eq()).drafts_.push(n),n}function tse(e){return ns(e)||Nn(10,e),Aq(e)}function Aq(e){if(!Io(e)||em(e))return e;const r=e[Kr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=rS(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=rS(e,!0);return Kh(n,(i,o)=>{Sq(n,i,Aq(o))},a),r&&(r.finalized_=!1),n}var rse=new ese;rse.produce;var nse={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},jq=cr({name:"legend",initialState:nse,reducers:{setLegendSize(e,r){e.size.width=r.payload.width,e.size.height=r.payload.height},setLegendSettings(e,r){e.settings.align=r.payload.align,e.settings.layout=r.payload.layout,e.settings.verticalAlign=r.payload.verticalAlign,e.settings.itemSorter=r.payload.itemSorter},addLegendPayload:{reducer(e,r){e.payload.push(r.payload)},prepare:st()},replaceLegendPayload:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).payload.indexOf(n);i>-1&&(e.payload[i]=a)},prepare:st()},removeLegendPayload:{reducer(e,r){var n=vn(e).payload.indexOf(r.payload);n>-1&&e.payload.splice(n,1)},prepare:st()}}}),{setLegendSize:k_e,setLegendSettings:A_e,addLegendPayload:ase,replaceLegendPayload:ise,removeLegendPayload:ose}=jq.actions,lse=jq.reducer,S0={exports:{}},E0={};/**
|
|
137
|
+
* @license React
|
|
138
|
+
* use-sync-external-store-with-selector.production.js
|
|
139
|
+
*
|
|
140
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the MIT license found in the
|
|
143
|
+
* LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/var M4;function sse(){if(M4)return E0;M4=1;var e=is();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,a=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var y=i(null);if(y.current===null){var _={hasValue:!1,value:null};y.current=_}else _=y.current;y=s(function(){function w(O){if(!x){if(x=!0,j=O,O=m(O),g!==void 0&&_.hasValue){var N=_.value;if(g(N,O))return C=N}return C=O}if(N=C,n(j,O))return N;var M=m(O);return g!==void 0&&g(N,M)?(j=O,N):(j=O,C=M)}var x=!1,j,C,T=h===void 0?null:h;return[function(){return w(d())},T===null?void 0:function(){return w(T())}]},[d,h,m,g]);var E=a(f,y[0],y[1]);return o(function(){_.hasValue=!0,_.value=E},[E]),c(E),E},E0}var P4;function use(){return P4||(P4=1,S0.exports=sse()),S0.exports}use();function cse(e){e()}function fse(){let e=null,r=null;return{clear(){e=null,r=null},notify(){cse(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let a=e;for(;a;)n.push(a),a=a.next;return n},subscribe(n){let a=!0;const i=r={callback:n,next:null,prev:r};return i.prev?i.prev.next=i:e=i,function(){!a||e===null||(a=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var R4={notify(){},get:()=>[]};function dse(e,r){let n,a=R4,i=0,o=!1;function s(E){h();const w=a.subscribe(E);let x=!1;return()=>{x||(x=!0,w(),m())}}function c(){a.notify()}function f(){_.onStateChange&&_.onStateChange()}function d(){return o}function h(){i++,n||(n=e.subscribe(f),a=fse())}function m(){i--,n&&i===0&&(n(),n=void 0,a.clear(),a=R4)}function g(){o||(o=!0,h())}function y(){o&&(o=!1,m())}const _={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:g,tryUnsubscribe:y,getListeners:()=>a};return _}var hse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pse=hse(),mse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",vse=mse(),gse=()=>pse||vse?k.useLayoutEffect:k.useEffect,yse=gse();function D4(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function bse(e,r){if(D4(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;const n=Object.keys(e),a=Object.keys(r);if(n.length!==a.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(r,n[i])||!D4(e[n[i]],r[n[i]]))return!1;return!0}var k0=Symbol.for("react-redux-context"),A0=typeof globalThis<"u"?globalThis:{};function xse(){if(!k.createContext)return{};const e=A0[k0]??(A0[k0]=new Map);let r=e.get(k.createContext);return r||(r=k.createContext(null),e.set(k.createContext,r)),r}var _se=xse();function wse(e){const{children:r,context:n,serverState:a,store:i}=e,o=k.useMemo(()=>{const f=dse(i);return{store:i,subscription:f,getServerState:a?()=>a:void 0}},[i,a]),s=k.useMemo(()=>i.getState(),[i]);yse(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),s!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,s]);const c=n||_se;return k.createElement(c.Provider,{value:o},r)}var Sse=wse,Ese=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function kse(e,r){return e==null&&r==null?!0:typeof e=="number"&&typeof r=="number"?e===r||e!==e&&r!==r:e===r}function tm(e,r){var n=new Set([...Object.keys(e),...Object.keys(r)]);for(var a of n)if(Ese.has(a)){if(e[a]==null&&r[a]==null)continue;if(!bse(e[a],r[a]))return!1}else if(!kse(e[a],r[a]))return!1;return!0}function lS(){return lS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},lS.apply(null,arguments)}function L4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Mu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?L4(Object(n),!0).forEach(function(a){Ase(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ase(e,r,n){return(r=jse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jse(e){var r=Cse(e,"string");return typeof r=="symbol"?r:r+""}function Cse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ose(e){return Array.isArray(e)&&gn(e[0])&&gn(e[1])?e.join(" ~ "):e}var Il={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Tse(e,r){return r==null?e:zp(e,r)}var Nse=e=>{var{separator:r=Il.separator,contentStyle:n,itemStyle:a,labelStyle:i=Il.labelStyle,payload:o,formatter:s,itemSorter:c,wrapperClassName:f,labelClassName:d,label:h,labelFormatter:m,accessibilityLayer:g=Il.accessibilityLayer}=e,y=()=>{if(o&&o.length){var O={padding:0,margin:0},N=Tse(o,c),M=N.map((R,L)=>{if(R.type==="none")return null;var D=R.formatter||s||Ose,{value:q,name:z}=R,H=q,F=z;if(D){var X=D(q,z,R,L,o);if(Array.isArray(X))[H,F]=X;else if(X!=null)H=X;else return null}var B=Mu(Mu({},Il.itemStyle),{},{color:R.color||Il.itemStyle.color},a);return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:B},gn(F)?k.createElement("span",{className:"recharts-tooltip-item-name"},F):null,gn(F)?k.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,k.createElement("span",{className:"recharts-tooltip-item-value"},H),k.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:O},M)}return null},_=Mu(Mu({},Il.contentStyle),n),E=Mu({margin:0},i),w=!$t(h),x=w?h:"",j=et("recharts-default-tooltip",f),C=et("recharts-tooltip-label",d);w&&m&&o!==void 0&&o!==null&&(x=m(h,o));var T=g?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",lS({className:j,style:_},T),k.createElement("p",{className:C,style:E},k.isValidElement(x)?x:"".concat(x)),y())},Pu="recharts-tooltip-wrapper",Mse={visibility:"hidden"};function Pse(e){var{coordinate:r,translateX:n,translateY:a}=e;return et(Pu,{["".concat(Pu,"-right")]:je(n)&&r&&je(r.x)&&n>=r.x,["".concat(Pu,"-left")]:je(n)&&r&&je(r.x)&&n<r.x,["".concat(Pu,"-bottom")]:je(a)&&r&&je(r.y)&&a>=r.y,["".concat(Pu,"-top")]:je(a)&&r&&je(r.y)&&a<r.y})}function I4(e){var{allowEscapeViewBox:r,coordinate:n,key:a,offset:i,position:o,reverseDirection:s,tooltipDimension:c,viewBox:f,viewBoxDimension:d}=e;if(o&&je(o[a]))return o[a];var h=n[a]-c-(i>0?i:0),m=n[a]+i;if(r[a])return s[a]?h:m;var g=f[a];if(g==null)return 0;if(s[a]){var y=h,_=g;return y<_?Math.max(m,g):Math.max(h,g)}if(d==null)return 0;var E=m+c,w=g+d;return E>w?Math.max(h,g):Math.max(m,g)}function Rse(e){var{translateX:r,translateY:n,useTranslate3d:a}=e;return{transform:a?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}}function Dse(e){var{allowEscapeViewBox:r,coordinate:n,offsetTop:a,offsetLeft:i,position:o,reverseDirection:s,tooltipBox:c,useTranslate3d:f,viewBox:d}=e,h,m,g;return c.height>0&&c.width>0&&n?(m=I4({allowEscapeViewBox:r,coordinate:n,key:"x",offset:i,position:o,reverseDirection:s,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),g=I4({allowEscapeViewBox:r,coordinate:n,key:"y",offset:a,position:o,reverseDirection:s,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),h=Rse({translateX:m,translateY:g,useTranslate3d:f})):h=Mse,{cssProperties:h,cssClasses:Pse({translateX:m,translateY:g,coordinate:n})}}var Lse=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),qc={isSsr:Lse()};function Cq(){var[e,r]=k.useState(()=>qc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return k.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{r(n.matches)};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}}},[]),e}function z4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function zl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?z4(Object(n),!0).forEach(function(a){Ise(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ise(e,r,n){return(r=zse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zse(e){var r=qse(e,"string");return typeof r=="symbol"?r:r+""}function qse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Bse(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function $se(e){var r,n,a,i,o,s,c=Cq(),[f,d]=k.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));k.useEffect(()=>{var _=E=>{if(E.key==="Escape"){var w,x,j,C;d({dismissed:!0,dismissedAtCoordinate:{x:(w=(x=e.coordinate)===null||x===void 0?void 0:x.x)!==null&&w!==void 0?w:0,y:(j=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&j!==void 0?j:0}})}};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[(r=e.coordinate)===null||r===void 0?void 0:r.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),f.dismissed&&(((a=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:0)!==f.dismissedAtCoordinate.x||((o=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)!==f.dismissedAtCoordinate.y)&&d(zl(zl({},f),{},{dismissed:!1}));var{cssClasses:h,cssProperties:m}=Dse({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:zl(zl({transition:Bse({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},m),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),y=zl(zl({},g),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return k.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:y,ref:e.innerRef},e.children)}var Fse=k.memo($se),Oq=()=>{var e;return(e=Ce(r=>r.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},sS.apply(null,arguments)}function q4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q4(Object(n),!0).forEach(function(a){Use(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Use(e,r,n){return(r=Hse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Hse(e){var r=Gse(e,"string");return typeof r=="symbol"?r:r+""}function Gse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $4={curveBasisClosed:wae,curveBasisOpen:Sae,curveBasis:_ae,curveBumpX:lae,curveBumpY:sae,curveLinearClosed:Eae,curveLinear:Dp,curveMonotoneX:kae,curveMonotoneY:Aae,curveNatural:jae,curveStep:Cae,curveStepAfter:Tae,curveStepBefore:Oae},Wh=e=>De(e.x)&&De(e.y),F4=e=>e.base!=null&&Wh(e.base)&&Wh(e),Ru=e=>e.x,Du=e=>e.y,Vse=(e,r)=>{if(typeof e=="function")return e;var n="curve".concat(Mc(e));if((n==="curveMonotone"||n==="curveBump")&&r){var a=$4["".concat(n).concat(r==="vertical"?"Y":"X")];if(a)return a}return $4[n]||Dp},U4={connectNulls:!1,type:"linear"},Kse=e=>{var{type:r=U4.type,points:n=[],baseLine:a,layout:i,connectNulls:o=U4.connectNulls}=e,s=Vse(r,i),c=o?n.filter(Wh):n;if(Array.isArray(a)){var f,d=n.map((_,E)=>B4(B4({},_),{},{base:a[E]}));i==="vertical"?f=Md().y(Du).x1(Ru).x0(_=>_.base.x):f=Md().x(Ru).y1(Du).y0(_=>_.base.y);var h=f.defined(F4).curve(s),m=o?d.filter(F4):d;return h(m)}var g;i==="vertical"&&je(a)?g=Md().y(Du).x1(Ru).x0(a):je(a)?g=Md().x(Ru).y1(Du).y0(a):g=rz().x(Ru).y(Du);var y=g.defined(Wh).curve(s);return y(c)},Tq=e=>{var{className:r,points:n,path:a,pathRef:i}=e,o=us();if((!n||!n.length)&&!a)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=n&&n.length?Kse(s):a;return k.createElement("path",sS({},ia(e),RE(e),{className:et("recharts-curve",r),d:c===null?void 0:c,ref:i}))},Yse=["x","y","top","left","width","height","className"];function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},uS.apply(null,arguments)}function H4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Xse(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?H4(Object(n),!0).forEach(function(a){Wse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Wse(e,r,n){return(r=Zse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zse(e){var r=Qse(e,"string");return typeof r=="symbol"?r:r+""}function Qse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jse(e,r){if(e==null)return{};var n,a,i=eue(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eue(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var tue=(e,r,n,a,i,o)=>"M".concat(e,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n),rue=e=>{var{x:r=0,y:n=0,top:a=0,left:i=0,width:o=0,height:s=0,className:c}=e,f=Jse(e,Yse),d=Xse({x:r,y:n,top:a,left:i,width:o,height:s},f);return!je(r)||!je(n)||!je(o)||!je(s)||!je(a)||!je(i)?null:k.createElement("path",uS({},ur(d),{className:et("recharts-cross",c),d:tue(r,n,o,s,a,i)}))};function nue(e,r,n,a){var i=a/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?r.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:r.y-i,width:e==="horizontal"?a:n.width-1,height:e==="horizontal"?n.height-1:a}}function G4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function V4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?G4(Object(n),!0).forEach(function(a){aue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function aue(e,r,n){return(r=iue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function iue(e){var r=oue(e,"string");return typeof r=="symbol"?r:r+""}function oue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var lue=e=>e.replace(/([A-Z])/g,r=>"-".concat(r.toLowerCase())),Nq=(e,r,n)=>e.map(a=>"".concat(lue(a)," ").concat(r,"ms ").concat(n)).join(","),sue=(e,r)=>[Object.keys(e),Object.keys(r)].reduce((n,a)=>n.filter(i=>a.includes(i))),pc=(e,r)=>Object.keys(r).reduce((n,a)=>V4(V4({},n),{},{[a]:e(a,r[a])}),{});function K4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Rt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?K4(Object(n),!0).forEach(function(a){uue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uue(e,r,n){return(r=cue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cue(e){var r=fue(e,"string");return typeof r=="symbol"?r:r+""}function fue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Zh=(e,r,n)=>e+(r-e)*n,cS=e=>{var{from:r,to:n}=e;return r!==n},Mq=(e,r,n)=>{var a=pc((i,o)=>{if(cS(o)){var[s,c]=e(o.from,o.to,o.velocity);return Rt(Rt({},o),{},{from:s,velocity:c})}return o},r);return n<1?pc((i,o)=>cS(o)&&a[i]!=null?Rt(Rt({},o),{},{velocity:Zh(o.velocity,a[i].velocity,n),from:Zh(o.from,a[i].from,n)}):o,r):Mq(e,a,n-1)};function due(e,r,n,a,i,o){var s,c=a.reduce((g,y)=>Rt(Rt({},g),{},{[y]:{from:e[y],velocity:0,to:r[y]}}),{}),f=()=>pc((g,y)=>y.from,c),d=()=>!Object.values(c).filter(cS).length,h=null,m=g=>{s||(s=g);var y=g-s,_=y/n.dt;c=Mq(n,c,_),i(Rt(Rt(Rt({},e),r),f())),s=g,d()||(h=o.setTimeout(m))};return()=>(h=o.setTimeout(m),()=>{var g;(g=h)===null||g===void 0||g()})}function hue(e,r,n,a,i,o,s){var c=null,f=i.reduce((m,g)=>{var y=e[g],_=r[g];return y==null||_==null?m:Rt(Rt({},m),{},{[g]:[y,_]})},{}),d,h=m=>{d||(d=m);var g=(m-d)/a,y=pc((E,w)=>Zh(...w,n(g)),f);if(o(Rt(Rt(Rt({},e),r),y)),g<1)c=s.setTimeout(h);else{var _=pc((E,w)=>Zh(...w,n(1)),f);o(Rt(Rt(Rt({},e),r),_))}};return()=>(c=s.setTimeout(h),()=>{var m;(m=c)===null||m===void 0||m()})}const pue=(e,r,n,a,i,o)=>{var s=sue(e,r);return n==null?()=>(i(Rt(Rt({},e),r)),()=>{}):n.isStepper===!0?due(e,r,n,s,i,o):hue(e,r,n,a,s,i,o)};var Qh=1e-4,Pq=(e,r)=>[0,3*e,3*r-6*e,3*e-3*r+1],Rq=(e,r)=>e.map((n,a)=>n*r**a).reduce((n,a)=>n+a),Y4=(e,r)=>n=>{var a=Pq(e,r);return Rq(a,n)},mue=(e,r)=>n=>{var a=Pq(e,r),i=[...a.map((o,s)=>o*s).slice(1),0];return Rq(i,n)},vue=e=>{var r,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var a=(r=n[1])===null||r===void 0||(r=r.split(")")[0])===null||r===void 0?void 0:r.split(",");if(a==null||a.length!==4)return null;var i=a.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},gue=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=vue(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},yue=(e,r,n,a)=>{var i=Y4(e,n),o=Y4(r,a),s=mue(e,n),c=d=>d>1?1:d<0?0:d,f=d=>{for(var h=d>1?1:d,m=h,g=0;g<8;++g){var y=i(m)-h,_=s(m);if(Math.abs(y-h)<Qh||_<Qh)return o(m);m=c(m-y/_)}return o(m)};return f.isStepper=!1,f},X4=function(){return yue(...gue(...arguments))},bue=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:a=8,dt:i=17}=r,o=(s,c,f)=>{var d=-(s-c)*n,h=f*a,m=f+(d-h)*i/1e3,g=f*i/1e3+s;return Math.abs(g-c)<Qh&&Math.abs(m)<Qh?[c,0]:[g,m]};return o.isStepper=!0,o.dt=i,o},xue=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return X4(e);case"spring":return bue();default:if(e.split("(")[0]==="cubic-bezier")return X4(e)}return typeof e=="function"?e:null};function _ue(e){var r,n=()=>null,a=!1,i=null,o=s=>{if(!a){if(Array.isArray(s)){if(!s.length)return;var c=s,[f,...d]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,d),f);return}o(f),i=e.setTimeout(o.bind(null,d));return}typeof s=="string"&&(r=s,n(r)),typeof s=="object"&&(r=s,n(r)),typeof s=="function"&&s()}};return{stop:()=>{a=!0},start:s=>{a=!1,i&&(i(),i=null),o(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class wue{setTimeout(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=performance.now(),i=null,o=s=>{s-a>=n?r(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function Sue(){return _ue(new wue)}var Eue=k.createContext(Sue);function kue(e,r){var n=k.useContext(Eue);return k.useMemo(()=>r??n(e),[e,r,n])}var Aue={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},W4={t:0},j0={t:1};function KE(e){var r=gr(e,Aue),{isActive:n,canBegin:a,duration:i,easing:o,begin:s,onAnimationEnd:c,onAnimationStart:f,children:d}=r,h=Cq(),m=n==="auto"?!qc.isSsr&&!h:n,g=kue(r.animationId,r.animationManager),[y,_]=k.useState(m?W4:j0),E=k.useRef(null);return k.useEffect(()=>{m||_(j0)},[m]),k.useEffect(()=>{if(!m||!a)return Uo;var w=pue(W4,j0,xue(o),i,_,g.getTimeoutController()),x=()=>{E.current=w()};return g.start([f,s,x,i,c]),()=>{g.stop(),E.current&&E.current(),c()}},[m,a,i,o,s,f,c,g]),d(y.t)}function YE(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(lc(r)),a=k.useRef(e);return a.current!==e&&(n.current=lc(r),a.current=e),n.current}var jue=["radius"],Cue=["radius"],Z4,Q4,J4,e3,t3,r3,n3,a3,i3,o3;function l3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function s3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?l3(Object(n),!0).forEach(function(a){Oue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Oue(e,r,n){return(r=Tue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tue(e){var r=Nue(e,"string");return typeof r=="symbol"?r:r+""}function Nue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Jh.apply(null,arguments)}function u3(e,r){if(e==null)return{};var n,a,i=Mue(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mue(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Hn(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var c3=(e,r,n,a,i)=>{var o=Bi(n),s=Bi(a),c=Math.min(Math.abs(o)/2,Math.abs(s)/2),f=s>=0?1:-1,d=o>=0?1:-1,h=s>=0&&o>=0||s<0&&o<0?1:0,m;if(c>0&&Array.isArray(i)){for(var g=[0,0,0,0],y=0,_=4;y<_;y++){var E,w=(E=i[y])!==null&&E!==void 0?E:0;g[y]=w>c?c:w}m=xt(Z4||(Z4=Hn(["M",",",""])),e,r+f*g[0]),g[0]>0&&(m+=xt(Q4||(Q4=Hn(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+d*g[0],r)),m+=xt(J4||(J4=Hn(["L ",",",""])),e+n-d*g[1],r),g[1]>0&&(m+=xt(e3||(e3=Hn(["A ",",",",0,0,",`,
|
|
145
|
+
`,",",""])),g[1],g[1],h,e+n,r+f*g[1])),m+=xt(t3||(t3=Hn(["L ",",",""])),e+n,r+a-f*g[2]),g[2]>0&&(m+=xt(r3||(r3=Hn(["A ",",",",0,0,",`,
|
|
146
|
+
`,",",""])),g[2],g[2],h,e+n-d*g[2],r+a)),m+=xt(n3||(n3=Hn(["L ",",",""])),e+d*g[3],r+a),g[3]>0&&(m+=xt(a3||(a3=Hn(["A ",",",",0,0,",`,
|
|
147
|
+
`,",",""])),g[3],g[3],h,e,r+a-f*g[3])),m+="Z"}else if(c>0&&i===+i&&i>0){var x=Math.min(c,i);m=xt(i3||(i3=Hn(["M ",",",`
|
|
148
|
+
A `,",",",0,0,",",",",",`
|
|
149
|
+
L `,",",`
|
|
150
|
+
A `,",",",0,0,",",",",",`
|
|
151
|
+
L `,",",`
|
|
152
|
+
A `,",",",0,0,",",",",",`
|
|
153
|
+
L `,",",`
|
|
154
|
+
A `,",",",0,0,",",",","," Z"])),e,r+f*x,x,x,h,e+d*x,r,e+n-d*x,r,x,x,h,e+n,r+f*x,e+n,r+a-f*x,x,x,h,e+n-d*x,r+a,e+d*x,r+a,x,x,h,e,r+a-f*x)}else m=xt(o3||(o3=Hn(["M ",","," h "," v "," h "," Z"])),e,r,n,a,-n);return m},f3={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Dq=e=>{var r=gr(e,f3),n=k.useRef(null),[a,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var Q=n.current.getTotalLength();Q&&i(Q)}catch{}},[]);var{x:o,y:s,width:c,height:f,radius:d,className:h}=r,{animationEasing:m,animationDuration:g,animationBegin:y,isAnimationActive:_,isUpdateAnimationActive:E}=r,w=k.useRef(c),x=k.useRef(f),j=k.useRef(o),C=k.useRef(s),T=k.useMemo(()=>({x:o,y:s,width:c,height:f,radius:d}),[o,s,c,f,d]),O=YE(T,"rectangle-");if(o!==+o||s!==+s||c!==+c||f!==+f||c===0||f===0)return null;var N=et("recharts-rectangle",h);if(!E){var M=ur(r),{radius:R}=M,L=u3(M,jue);return k.createElement("path",Jh({},L,{x:Bi(o),y:Bi(s),width:Bi(c),height:Bi(f),radius:typeof d=="number"?d:void 0,className:N,d:c3(o,s,c,f,d)}))}var D=w.current,q=x.current,z=j.current,H=C.current,F="0px ".concat(a===-1?1:a,"px"),X="".concat(a,"px ").concat(a,"px"),B=Nq(["strokeDasharray"],g,typeof m=="string"?m:f3.animationEasing);return k.createElement(KE,{animationId:O,key:O,canBegin:a>0,duration:g,easing:m,isActive:E,begin:y},Q=>{var te=Cr(D,c,Q),K=Cr(q,f,Q),de=Cr(z,o,Q),U=Cr(H,s,Q);n.current&&(w.current=te,x.current=K,j.current=de,C.current=U);var J;_?Q>0?J={transition:B,strokeDasharray:X}:J={strokeDasharray:F}:J={strokeDasharray:X};var le=ur(r),{radius:$}=le,Y=u3(le,Cue);return k.createElement("path",Jh({},Y,{radius:typeof d=="number"?d:void 0,className:N,d:c3(de,U,te,K,d),ref:n,style:s3(s3({},J),r.style)}))})};function d3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function h3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?d3(Object(n),!0).forEach(function(a){Pue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Pue(e,r,n){return(r=Rue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Rue(e){var r=Due(e,"string");return typeof r=="symbol"?r:r+""}function Due(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ep=Math.PI/180,Lue=e=>e*180/Math.PI,Jt=(e,r,n,a)=>({x:e+Math.cos(-ep*a)*n,y:r+Math.sin(-ep*a)*n}),Iue=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(r-(a.left||0)-(a.right||0)),Math.abs(n-(a.top||0)-(a.bottom||0)))/2},zue=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return Math.sqrt((n-i)**2+(a-o)**2)},que=(e,r)=>{var{x:n,y:a}=e,{cx:i,cy:o}=r,s=zue({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s,angle:0};var c=(n-i)/s,f=Math.acos(c);return a>o&&(f=2*Math.PI-f),{radius:s,angle:Lue(f),angleInRadian:f}},Bue=e=>{var{startAngle:r,endAngle:n}=e,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},$ue=(e,r)=>{var{startAngle:n,endAngle:a}=r,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return e+s*360},Fue=(e,r)=>{var{relativeX:n,relativeY:a}=e,{radius:i,angle:o}=que({x:n,y:a},r),{innerRadius:s,outerRadius:c}=r;if(i<s||i>c||i===0)return null;var{startAngle:f,endAngle:d}=Bue(r),h=o,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?h3(h3({},r),{},{radius:i,angle:$ue(h,r)}):null};function Lq(e){var{cx:r,cy:n,radius:a,startAngle:i,endAngle:o}=e,s=Jt(r,n,a,i),c=Jt(r,n,a,o);return{points:[s,c],cx:r,cy:n,radius:a,startAngle:i,endAngle:o}}var p3,m3,v3,g3,y3,b3,x3;function fS(){return fS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fS.apply(null,arguments)}function Ao(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var Uue=(e,r)=>{var n=mn(r-e),a=Math.min(Math.abs(r-e),359.999);return n*a},Bd=e=>{var{cx:r,cy:n,radius:a,angle:i,sign:o,isExternal:s,cornerRadius:c,cornerIsExternal:f}=e,d=c*(s?1:-1)+a,h=Math.asin(c/d)/ep,m=f?i:i+o*h,g=Jt(r,n,d,m),y=Jt(r,n,a,m),_=f?i-o*h:i,E=Jt(r,n,d*Math.cos(h*ep),_);return{center:g,circleTangency:y,lineTangency:E,theta:h}},Iq=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:o,endAngle:s}=e,c=Uue(o,s),f=o+c,d=Jt(r,n,i,o),h=Jt(r,n,i,f),m=xt(p3||(p3=Ao(["M ",",",`
|
|
155
|
+
A `,",",`,0,
|
|
156
|
+
`,",",`,
|
|
157
|
+
`,",",`
|
|
158
|
+
`])),d.x,d.y,i,i,+(Math.abs(c)>180),+(o>f),h.x,h.y);if(a>0){var g=Jt(r,n,a,o),y=Jt(r,n,a,f);m+=xt(m3||(m3=Ao(["L ",",",`
|
|
159
|
+
A `,",",`,0,
|
|
160
|
+
`,",",`,
|
|
161
|
+
`,","," Z"])),y.x,y.y,a,a,+(Math.abs(c)>180),+(o<=f),g.x,g.y)}else m+=xt(v3||(v3=Ao(["L ",","," Z"])),r,n);return m},Hue=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:c,startAngle:f,endAngle:d}=e,h=mn(d-f),{circleTangency:m,lineTangency:g,theta:y}=Bd({cx:r,cy:n,radius:i,angle:f,sign:h,cornerRadius:o,cornerIsExternal:c}),{circleTangency:_,lineTangency:E,theta:w}=Bd({cx:r,cy:n,radius:i,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:c}),x=c?Math.abs(f-d):Math.abs(f-d)-y-w;if(x<0)return s?xt(g3||(g3=Ao(["M ",",",`
|
|
162
|
+
a`,",",",0,0,1,",`,0
|
|
163
|
+
a`,",",",0,0,1,",`,0
|
|
164
|
+
`])),g.x,g.y,o,o,o*2,o,o,-o*2):Iq({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:f,endAngle:d});var j=xt(y3||(y3=Ao(["M ",",",`
|
|
165
|
+
A`,",",",0,0,",",",",",`
|
|
166
|
+
A`,",",",0,",",",",",",",`
|
|
167
|
+
A`,",",",0,0,",",",",",`
|
|
168
|
+
`])),g.x,g.y,o,o,+(h<0),m.x,m.y,i,i,+(x>180),+(h<0),_.x,_.y,o,o,+(h<0),E.x,E.y);if(a>0){var{circleTangency:C,lineTangency:T,theta:O}=Bd({cx:r,cy:n,radius:a,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:N,lineTangency:M,theta:R}=Bd({cx:r,cy:n,radius:a,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=c?Math.abs(f-d):Math.abs(f-d)-O-R;if(L<0&&o===0)return"".concat(j,"L").concat(r,",").concat(n,"Z");j+=xt(b3||(b3=Ao(["L",",",`
|
|
169
|
+
A`,",",",0,0,",",",",",`
|
|
170
|
+
A`,",",",0,",",",",",",",`
|
|
171
|
+
A`,",",",0,0,",",",",","Z"])),M.x,M.y,o,o,+(h<0),N.x,N.y,a,a,+(L>180),+(h>0),C.x,C.y,o,o,+(h<0),T.x,T.y)}else j+=xt(x3||(x3=Ao(["L",",","Z"])),r,n);return j},Gue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},zq=e=>{var r=gr(e,Gue),{cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h,className:m}=r;if(o<i||d===h)return null;var g=et("recharts-sector",m),y=o-i,_=Ui(s,y,0,!0),E;return _>0&&Math.abs(d-h)<360?E=Hue({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(_,y/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h}):E=Iq({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:h}),k.createElement("path",fS({},ur(r),{className:g,d:E}))};function Vue(e,r,n){if(e==="horizontal")return[{x:r.x,y:n.top},{x:r.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:r.y},{x:n.left+n.width,y:r.y}];if(yz(r)){if(e==="centric"){var{cx:a,cy:i,innerRadius:o,outerRadius:s,angle:c}=r,f=Jt(a,i,o,c),d=Jt(a,i,s,c);return[{x:f.x,y:f.y},{x:d.x,y:d.y}]}return Lq(r)}}var C0={},O0={},T0={},_3;function Kue(){return _3||(_3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Oz();function n(a){return r.isSymbol(a)?NaN:Number(a)}e.toNumber=n})(T0)),T0}var w3;function Yue(){return w3||(w3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Kue();function n(a){return a?(a=r.toNumber(a),a===1/0||a===-1/0?(a<0?-1:1)*Number.MAX_VALUE:a===a?a:0):a===0?a:0}e.toFinite=n})(O0)),O0}var S3;function Xue(){return S3||(S3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Tz(),n=Yue();function a(i,o,s){s&&typeof s!="number"&&r.isIterateeCall(i,o,s)&&(o=s=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),s=s===void 0?i<o?1:-1:n.toFinite(s);const c=Math.max(Math.ceil((o-i)/(s||1)),0),f=new Array(c);for(let d=0;d<c;d++)f[d]=i,i+=s;return f}e.range=a})(C0)),C0}var N0,E3;function Wue(){return E3||(E3=1,N0=Xue().range),N0}var Zue=Wue();const qq=Dn(Zue);var Ki=e=>e.chartData,Que=ue([Ki],e=>{var r=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:r,dataStartIndex:0}}),XE=(e,r,n,a)=>a?Que(e):Ki(e);function ra(e){if(Array.isArray(e)&&e.length===2){var[r,n]=e;if(De(r)&&De(n))return!0}return!1}function k3(e,r,n){return n?e:[Math.min(e[0],r[0]),Math.max(e[1],r[1])]}function Bq(e,r){if(r&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,a]=e,i,o;if(De(n))i=n;else if(typeof n=="function")return;if(De(a))o=a;else if(typeof a=="function")return;var s=[i,o];if(ra(s))return s}}function Jue(e,r,n){if(!(!n&&r==null)){if(typeof e=="function"&&r!=null)try{var a=e(r,n);if(ra(a))return k3(a,r,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,s,c;if(i==="auto")r!=null&&(s=Math.min(...r));else if(je(i))s=i;else if(typeof i=="function")try{r!=null&&(s=i(r==null?void 0:r[0]))}catch{}else if(typeof i=="string"&&v4.test(i)){var f=v4.exec(i);if(f==null||f[1]==null||r==null)s=void 0;else{var d=+f[1];s=r[0]-d}}else s=r==null?void 0:r[0];if(o==="auto")r!=null&&(c=Math.max(...r));else if(je(o))c=o;else if(typeof o=="function")try{r!=null&&(c=o(r==null?void 0:r[1]))}catch{}else if(typeof o=="string"&&g4.test(o)){var h=g4.exec(o);if(h==null||h[1]==null||r==null)c=void 0;else{var m=+h[1];c=r[1]+m}}else c=r==null?void 0:r[1];var g=[s,c];if(ra(g))return r==null?g:k3(g,r,n)}}}var cs=1e9,ece={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ZE,ht=!0,yn="[DecimalError] ",No=yn+"Invalid argument: ",WE=yn+"Exponent out of range: ",fs=Math.floor,wo=Math.pow,tce=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Fr,Bt=1e7,ut=7,$q=9007199254740991,tp=fs($q/ut),Se={};Se.absoluteValue=Se.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Se.comparedTo=Se.cmp=function(e){var r,n,a,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(a=o.d.length,i=e.d.length,r=0,n=a<i?a:i;r<n;++r)if(o.d[r]!==e.d[r])return o.d[r]>e.d[r]^o.s<0?1:-1;return a===i?0:a>i^o.s<0?1:-1};Se.decimalPlaces=Se.dp=function(){var e=this,r=e.d.length-1,n=(r-e.e)*ut;if(r=e.d[r],r)for(;r%10==0;r/=10)n--;return n<0?0:n};Se.dividedBy=Se.div=function(e){return Ua(this,new this.constructor(e))};Se.dividedToIntegerBy=Se.idiv=function(e){var r=this,n=r.constructor;return nt(Ua(r,new n(e),0,1),n.precision)};Se.equals=Se.eq=function(e){return!this.cmp(e)};Se.exponent=function(){return Ot(this)};Se.greaterThan=Se.gt=function(e){return this.cmp(e)>0};Se.greaterThanOrEqualTo=Se.gte=function(e){return this.cmp(e)>=0};Se.isInteger=Se.isint=function(){return this.e>this.d.length-2};Se.isNegative=Se.isneg=function(){return this.s<0};Se.isPositive=Se.ispos=function(){return this.s>0};Se.isZero=function(){return this.s===0};Se.lessThan=Se.lt=function(e){return this.cmp(e)<0};Se.lessThanOrEqualTo=Se.lte=function(e){return this.cmp(e)<1};Se.logarithm=Se.log=function(e){var r,n=this,a=n.constructor,i=a.precision,o=i+5;if(e===void 0)e=new a(10);else if(e=new a(e),e.s<1||e.eq(Fr))throw Error(yn+"NaN");if(n.s<1)throw Error(yn+(n.s?"NaN":"-Infinity"));return n.eq(Fr)?new a(0):(ht=!1,r=Ua(mc(n,o),mc(e,o),o),ht=!0,nt(r,i))};Se.minus=Se.sub=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?Hq(r,e):Fq(r,(e.s=-e.s,e))};Se.modulo=Se.mod=function(e){var r,n=this,a=n.constructor,i=a.precision;if(e=new a(e),!e.s)throw Error(yn+"NaN");return n.s?(ht=!1,r=Ua(n,e,0,1).times(e),ht=!0,n.minus(r)):nt(new a(n),i)};Se.naturalExponential=Se.exp=function(){return Uq(this)};Se.naturalLogarithm=Se.ln=function(){return mc(this)};Se.negated=Se.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Se.plus=Se.add=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?Fq(r,e):Hq(r,(e.s=-e.s,e))};Se.precision=Se.sd=function(e){var r,n,a,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(No+e);if(r=Ot(i)+1,a=i.d.length-1,n=a*ut+1,a=i.d[a],a){for(;a%10==0;a/=10)n--;for(a=i.d[0];a>=10;a/=10)n++}return e&&r>n?r:n};Se.squareRoot=Se.sqrt=function(){var e,r,n,a,i,o,s,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(yn+"NaN")}for(e=Ot(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(r=Jn(c.d),(r.length+e)%2==0&&(r+="0"),i=Math.sqrt(r),e=fs((e+1)/2)-(e<0||e%2),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),a=new f(r)):a=new f(i.toString()),n=f.precision,i=s=n+3;;)if(o=a,a=o.plus(Ua(c,o,s+2)).times(.5),Jn(o.d).slice(0,s)===(r=Jn(a.d)).slice(0,s)){if(r=r.slice(s-3,s+1),i==s&&r=="4999"){if(nt(o,n+1,0),o.times(o).eq(c)){a=o;break}}else if(r!="9999")break;s+=4}return ht=!0,nt(a,n)};Se.times=Se.mul=function(e){var r,n,a,i,o,s,c,f,d,h=this,m=h.constructor,g=h.d,y=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,f=g.length,d=y.length,f<d&&(o=g,g=y,y=o,s=f,f=d,d=s),o=[],s=f+d,a=s;a--;)o.push(0);for(a=d;--a>=0;){for(r=0,i=f+a;i>a;)c=o[i]+y[a]*g[i-a-1]+r,o[i--]=c%Bt|0,r=c/Bt|0;o[i]=(o[i]+r)%Bt|0}for(;!o[--s];)o.pop();return r?++n:o.shift(),e.d=o,e.e=n,ht?nt(e,m.precision):e};Se.toDecimalPlaces=Se.todp=function(e,r){var n=this,a=n.constructor;return n=new a(n),e===void 0?n:(sa(e,0,cs),r===void 0?r=a.rounding:sa(r,0,8),nt(n,e+Ot(n)+1,r))};Se.toExponential=function(e,r){var n,a=this,i=a.constructor;return e===void 0?n=qo(a,!0):(sa(e,0,cs),r===void 0?r=i.rounding:sa(r,0,8),a=nt(new i(a),e+1,r),n=qo(a,!0,e+1)),n};Se.toFixed=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?qo(i):(sa(e,0,cs),r===void 0?r=o.rounding:sa(r,0,8),a=nt(new o(i),e+Ot(i)+1,r),n=qo(a.abs(),!1,e+Ot(a)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Se.toInteger=Se.toint=function(){var e=this,r=e.constructor;return nt(new r(e),Ot(e)+1,r.rounding)};Se.toNumber=function(){return+this};Se.toPower=Se.pow=function(e){var r,n,a,i,o,s,c=this,f=c.constructor,d=12,h=+(e=new f(e));if(!e.s)return new f(Fr);if(c=new f(c),!c.s){if(e.s<1)throw Error(yn+"Infinity");return c}if(c.eq(Fr))return c;if(a=f.precision,e.eq(Fr))return nt(c,a);if(r=e.e,n=e.d.length-1,s=r>=n,o=c.s,s){if((n=h<0?-h:h)<=$q){for(i=new f(Fr),r=Math.ceil(a/ut+4),ht=!1;n%2&&(i=i.times(c),j3(i.d,r)),n=fs(n/2),n!==0;)c=c.times(c),j3(c.d,r);return ht=!0,e.s<0?new f(Fr).div(i):nt(i,a)}}else if(o<0)throw Error(yn+"NaN");return o=o<0&&e.d[Math.max(r,n)]&1?-1:1,c.s=1,ht=!1,i=e.times(mc(c,a+d)),ht=!0,i=Uq(i),i.s=o,i};Se.toPrecision=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?(n=Ot(i),a=qo(i,n<=o.toExpNeg||n>=o.toExpPos)):(sa(e,1,cs),r===void 0?r=o.rounding:sa(r,0,8),i=nt(new o(i),e,r),n=Ot(i),a=qo(i,e<=n||n<=o.toExpNeg,e)),a};Se.toSignificantDigits=Se.tosd=function(e,r){var n=this,a=n.constructor;return e===void 0?(e=a.precision,r=a.rounding):(sa(e,1,cs),r===void 0?r=a.rounding:sa(r,0,8)),nt(new a(n),e,r)};Se.toString=Se.valueOf=Se.val=Se.toJSON=Se[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,r=Ot(e),n=e.constructor;return qo(e,r<=n.toExpNeg||r>=n.toExpPos)};function Fq(e,r){var n,a,i,o,s,c,f,d,h=e.constructor,m=h.precision;if(!e.s||!r.s)return r.s||(r=new h(e)),ht?nt(r,m):r;if(f=e.d,d=r.d,s=e.e,i=r.e,f=f.slice(),o=s-i,o){for(o<0?(a=f,o=-o,c=d.length):(a=d,i=s,c=f.length),s=Math.ceil(m/ut),c=s>c?s+1:c+1,o>c&&(o=c,a.length=1),a.reverse();o--;)a.push(0);a.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,a=d,d=f,f=a),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Bt|0,f[o]%=Bt;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return r.d=f,r.e=i,ht?nt(r,m):r}function sa(e,r,n){if(e!==~~e||e<r||e>n)throw Error(No+e)}function Jn(e){var r,n,a,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;r<i;r++)a=e[r]+"",n=ut-a.length,n&&(o+=Ii(n)),o+=a;s=e[r],a=s+"",n=ut-a.length,n&&(o+=Ii(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var Ua=(function(){function e(a,i){var o,s=0,c=a.length;for(a=a.slice();c--;)o=a[c]*i+s,a[c]=o%Bt|0,s=o/Bt|0;return s&&a.unshift(s),a}function r(a,i,o,s){var c,f;if(o!=s)f=o>s?1:-1;else for(c=f=0;c<o;c++)if(a[c]!=i[c]){f=a[c]>i[c]?1:-1;break}return f}function n(a,i,o){for(var s=0;o--;)a[o]-=s,s=a[o]<i[o]?1:0,a[o]=s*Bt+a[o]-i[o];for(;!a[0]&&a.length>1;)a.shift()}return function(a,i,o,s){var c,f,d,h,m,g,y,_,E,w,x,j,C,T,O,N,M,R,L=a.constructor,D=a.s==i.s?1:-1,q=a.d,z=i.d;if(!a.s)return new L(a);if(!i.s)throw Error(yn+"Division by zero");for(f=a.e-i.e,M=z.length,O=q.length,y=new L(D),_=y.d=[],d=0;z[d]==(q[d]||0);)++d;if(z[d]>(q[d]||0)&&--f,o==null?j=o=L.precision:s?j=o+(Ot(a)-Ot(i))+1:j=o,j<0)return new L(0);if(j=j/ut+2|0,d=0,M==1)for(h=0,z=z[0],j++;(d<O||h)&&j--;d++)C=h*Bt+(q[d]||0),_[d]=C/z|0,h=C%z|0;else{for(h=Bt/(z[0]+1)|0,h>1&&(z=e(z,h),q=e(q,h),M=z.length,O=q.length),T=M,E=q.slice(0,M),w=E.length;w<M;)E[w++]=0;R=z.slice(),R.unshift(0),N=z[0],z[1]>=Bt/2&&++N;do h=0,c=r(z,E,M,w),c<0?(x=E[0],M!=w&&(x=x*Bt+(E[1]||0)),h=x/N|0,h>1?(h>=Bt&&(h=Bt-1),m=e(z,h),g=m.length,w=E.length,c=r(m,E,g,w),c==1&&(h--,n(m,M<g?R:z,g))):(h==0&&(c=h=1),m=z.slice()),g=m.length,g<w&&m.unshift(0),n(E,m,w),c==-1&&(w=E.length,c=r(z,E,M,w),c<1&&(h++,n(E,M<w?R:z,w))),w=E.length):c===0&&(h++,E=[0]),_[d++]=h,c&&E[0]?E[w++]=q[T]||0:(E=[q[T]],w=1);while((T++<O||E[0]!==void 0)&&j--)}return _[0]||_.shift(),y.e=f,nt(y,s?o+Ot(y)+1:o)}})();function Uq(e,r){var n,a,i,o,s,c,f=0,d=0,h=e.constructor,m=h.precision;if(Ot(e)>16)throw Error(WE+Ot(e));if(!e.s)return new h(Fr);for(ht=!1,c=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(a=Math.log(wo(2,d))/Math.LN10*2+5|0,c+=a,n=i=o=new h(Fr),h.precision=c;;){if(i=nt(i.times(e),c),n=n.times(++f),s=o.plus(Ua(i,n,c)),Jn(s.d).slice(0,c)===Jn(o.d).slice(0,c)){for(;d--;)o=nt(o.times(o),c);return h.precision=m,r==null?(ht=!0,nt(o,m)):o}o=s}}function Ot(e){for(var r=e.e*ut,n=e.d[0];n>=10;n/=10)r++;return r}function M0(e,r,n){if(r>e.LN10.sd())throw ht=!0,n&&(e.precision=n),Error(yn+"LN10 precision limit exceeded");return nt(new e(e.LN10),r)}function Ii(e){for(var r="";e--;)r+="0";return r}function mc(e,r){var n,a,i,o,s,c,f,d,h,m=1,g=10,y=e,_=y.d,E=y.constructor,w=E.precision;if(y.s<1)throw Error(yn+(y.s?"NaN":"-Infinity"));if(y.eq(Fr))return new E(0);if(r==null?(ht=!1,d=w):d=r,y.eq(10))return r==null&&(ht=!0),M0(E,d);if(d+=g,E.precision=d,n=Jn(_),a=n.charAt(0),o=Ot(y),Math.abs(o)<15e14){for(;a<7&&a!=1||a==1&&n.charAt(1)>3;)y=y.times(e),n=Jn(y.d),a=n.charAt(0),m++;o=Ot(y),a>1?(y=new E("0."+n),o++):y=new E(a+"."+n.slice(1))}else return f=M0(E,d+2,w).times(o+""),y=mc(new E(a+"."+n.slice(1)),d-g).plus(f),E.precision=w,r==null?(ht=!0,nt(y,w)):y;for(c=s=y=Ua(y.minus(Fr),y.plus(Fr),d),h=nt(y.times(y),d),i=3;;){if(s=nt(s.times(h),d),f=c.plus(Ua(s,new E(i),d)),Jn(f.d).slice(0,d)===Jn(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(M0(E,d+2,w).times(o+""))),c=Ua(c,new E(m),d),E.precision=w,r==null?(ht=!0,nt(c,w)):c;c=f,i+=2}}function A3(e,r){var n,a,i;for((n=r.indexOf("."))>-1&&(r=r.replace(".","")),(a=r.search(/e/i))>0?(n<0&&(n=a),n+=+r.slice(a+1),r=r.substring(0,a)):n<0&&(n=r.length),a=0;r.charCodeAt(a)===48;)++a;for(i=r.length;r.charCodeAt(i-1)===48;)--i;if(r=r.slice(a,i),r){if(i-=a,n=n-a-1,e.e=fs(n/ut),e.d=[],a=(n+1)%ut,n<0&&(a+=ut),a<i){for(a&&e.d.push(+r.slice(0,a)),i-=ut;a<i;)e.d.push(+r.slice(a,a+=ut));r=r.slice(a),a=ut-r.length}else a-=i;for(;a--;)r+="0";if(e.d.push(+r),ht&&(e.e>tp||e.e<-tp))throw Error(WE+n)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,r,n){var a,i,o,s,c,f,d,h,m=e.d;for(s=1,o=m[0];o>=10;o/=10)s++;if(a=r-s,a<0)a+=ut,i=r,d=m[h=0];else{if(h=Math.ceil((a+1)/ut),o=m.length,h>=o)return e;for(d=o=m[h],s=1;o>=10;o/=10)s++;a%=ut,i=a-ut+s}if(n!==void 0&&(o=wo(10,s-i-1),c=d/o%10|0,f=r<0||m[h+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(a>0?i>0?d/wo(10,s-i):0:m[h-1])%10&1||n==(e.s<0?8:7))),r<1||!m[0])return f?(o=Ot(e),m.length=1,r=r-o-1,m[0]=wo(10,(ut-r%ut)%ut),e.e=fs(-r/ut)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(a==0?(m.length=h,o=1,h--):(m.length=h+1,o=wo(10,ut-a),m[h]=i>0?(d/wo(10,s-i)%wo(10,i)|0)*o:0),f)for(;;)if(h==0){(m[0]+=o)==Bt&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=Bt)break;m[h--]=0,o=1}for(a=m.length;m[--a]===0;)m.pop();if(ht&&(e.e>tp||e.e<-tp))throw Error(WE+Ot(e));return e}function Hq(e,r){var n,a,i,o,s,c,f,d,h,m,g=e.constructor,y=g.precision;if(!e.s||!r.s)return r.s?r.s=-r.s:r=new g(e),ht?nt(r,y):r;if(f=e.d,m=r.d,a=r.e,d=e.e,f=f.slice(),s=d-a,s){for(h=s<0,h?(n=f,s=-s,c=m.length):(n=m,a=d,c=f.length),i=Math.max(Math.ceil(y/ut),c)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=m.length,h=i<c,h&&(c=i),i=0;i<c;i++)if(f[i]!=m[i]){h=f[i]<m[i];break}s=0}for(h&&(n=f,f=m,m=n,r.s=-r.s),c=f.length,i=m.length-c;i>0;--i)f[c++]=0;for(i=m.length;i>s;){if(f[--i]<m[i]){for(o=i;o&&f[--o]===0;)f[o]=Bt-1;--f[o],f[i]+=Bt}f[i]-=m[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--a;return f[0]?(r.d=f,r.e=a,ht?nt(r,y):r):new g(0)}function qo(e,r,n){var a,i=Ot(e),o=Jn(e.d),s=o.length;return r?(n&&(a=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+Ii(a):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ii(-i-1)+o,n&&(a=n-s)>0&&(o+=Ii(a))):i>=s?(o+=Ii(i+1-s),n&&(a=n-i-1)>0&&(o=o+"."+Ii(a))):((a=i+1)<s&&(o=o.slice(0,a)+"."+o.slice(a)),n&&(a=n-s)>0&&(i+1===s&&(o+="."),o+=Ii(a))),e.s<0?"-"+o:o}function j3(e,r){if(e.length>r)return e.length=r,!0}function Gq(e){var r,n,a;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(No+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return A3(s,o.toString())}else if(typeof o!="string")throw Error(No+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,tce.test(o))A3(s,o);else throw Error(No+o)}if(i.prototype=Se,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=Gq,i.config=i.set=rce,e===void 0&&(e={}),e)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<a.length;)e.hasOwnProperty(n=a[r++])||(e[n]=this[n]);return i.config(e),i}function rce(e){if(!e||typeof e!="object")throw Error(yn+"Object expected");var r,n,a,i=["precision",1,cs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(r=0;r<i.length;r+=3)if((a=e[n=i[r]])!==void 0)if(fs(a)===a&&a>=i[r+1]&&a<=i[r+2])this[n]=a;else throw Error(No+n+": "+a);if((a=e[n="LN10"])!==void 0)if(a==Math.LN10)this[n]=new this(a);else throw Error(No+n+": "+a);return this}var ZE=Gq(ece);Fr=new ZE(1);const $e=ZE;function Vq(e){var r;return e===0?r=1:r=Math.floor(new $e(e).abs().log(10).toNumber())+1,r}function Kq(e,r,n){for(var a=new $e(e),i=0,o=[];a.lt(r)&&i<1e5;)o.push(a.toNumber()),a=a.add(n),i++;return o}var Yq=e=>{var[r,n]=e,[a,i]=[r,n];return r>n&&([a,i]=[n,r]),[a,i]},QE=(e,r,n)=>{if(e.lte(0))return new $e(0);var a=Vq(e.toNumber()),i=new $e(10).pow(a),o=e.div(i),s=a!==1?.05:.1,c=new $e(Math.ceil(o.div(s).toNumber())).add(n).mul(s),f=c.mul(i);return r?new $e(f.toNumber()):new $e(Math.ceil(f.toNumber()))},Xq=(e,r,n)=>{var a;if(e.lte(0))return new $e(0);var i=[1,2,2.5,5],o=e.toNumber(),s=Math.floor(new $e(o).abs().log(10).toNumber()),c=new $e(10).pow(s),f=e.div(c).toNumber(),d=i.findIndex(y=>y>=f-1e-10);if(d===-1&&(c=c.mul(10),d=0),d+=n,d>=i.length){var h=Math.floor(d/i.length);d%=i.length,c=c.mul(new $e(10).pow(h))}var m=(a=i[d])!==null&&a!==void 0?a:1,g=new $e(m).mul(c);return r?g:new $e(Math.ceil(g.toNumber()))},nce=(e,r,n)=>{var a=new $e(1),i=new $e(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(a=new $e(10).pow(Vq(e)-1),i=new $e(Math.floor(i.div(a).toNumber())).mul(a)):o>1&&(i=new $e(Math.floor(e)))}else e===0?i=new $e(Math.floor((r-1)/2)):n||(i=new $e(Math.floor(e)));for(var s=Math.floor((r-1)/2),c=[],f=0;f<r;f++)c.push(i.add(new $e(f-s).mul(a)).toNumber());return c},Wq=function(r,n,a,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:QE;if(!Number.isFinite((n-r)/(a-1)))return{step:new $e(0),tickMin:new $e(0),tickMax:new $e(0)};var c=s(new $e(n).sub(r).div(a-1),i,o),f;r<=0&&n>=0?f=new $e(0):(f=new $e(r).add(n).div(2),f=f.sub(new $e(f).mod(c)));var d=Math.ceil(f.sub(r).div(c).toNumber()),h=Math.ceil(new $e(n).sub(f).div(c).toNumber()),m=d+h+1;return m>a?Wq(r,n,a,i,o+1,s):(m<a&&(h=n>0?h+(a-m):h,d=n>0?d:d+(a-m)),{step:c,tickMin:f.sub(new $e(d).mul(c)),tickMax:f.add(new $e(h).mul(c))})},C3=function(r){var[n,a]=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,d]=Yq([n,a]);if(f===-1/0||d===1/0){var h=d===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>a?h.reverse():h}if(f===d)return nce(f,i,o);var m=s==="snap125"?Xq:QE,{step:g,tickMin:y,tickMax:_}=Wq(f,d,c,o,0,m),E=Kq(y,_.add(new $e(.1).mul(g)),g);return n>a?E.reverse():E},O3=function(r,n){var[a,i]=r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=Yq([a,i]);if(c===-1/0||f===1/0)return[a,i];if(c===f)return[c];var d=s==="snap125"?Xq:QE,h=Math.max(n,2),m=d(new $e(f).sub(c).div(h-1),o,0),g=[...Kq(new $e(c),new $e(f),m),f];return o===!1&&(g=g.map(y=>Math.round(y))),a>i?g.reverse():g},ace=e=>e.rootProps.barCategoryGap,rm=e=>e.rootProps.stackOffset,Zq=e=>e.rootProps.reverseStackOrder,JE=e=>e.options.chartName,ek=e=>e.rootProps.syncId,Qq=e=>e.rootProps.syncMethod,tk=e=>e.options.eventEmitter,sr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},mo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Gn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},nm=(e,r)=>{if(!(!e||!r))return e!=null&&e.reversed?[r[1],r[0]]:r};function am(e,r,n){if(n!=="auto")return n;if(e!=null)return ti(e,r)?"category":"number"}function T3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function rp(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?T3(Object(n),!0).forEach(function(a){ice(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ice(e,r,n){return(r=oce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function oce(e){var r=lce(e,"string");return typeof r=="symbol"?r:r+""}function lce(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var N3={allowDataOverflow:mo.allowDataOverflow,allowDecimals:mo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:mo.angleAxisId,includeHidden:!1,name:void 0,reversed:mo.reversed,scale:mo.scale,tick:mo.tick,tickCount:void 0,ticks:void 0,type:mo.type,unit:void 0,niceTicks:"auto"},M3={allowDataOverflow:Gn.allowDataOverflow,allowDecimals:Gn.allowDecimals,allowDuplicatedCategory:Gn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Gn.radiusAxisId,includeHidden:Gn.includeHidden,name:void 0,reversed:Gn.reversed,scale:Gn.scale,tick:Gn.tick,tickCount:Gn.tickCount,ticks:void 0,type:Gn.type,unit:void 0,niceTicks:"auto"},sce=(e,r)=>{if(r!=null)return e.polarAxis.angleAxis[r]},rk=ue([sce,xq],(e,r)=>{var n;if(e!=null)return e;var a=(n=am(r,"angleAxis",N3.type))!==null&&n!==void 0?n:"category";return rp(rp({},N3),{},{type:a})}),uce=(e,r)=>e.polarAxis.radiusAxis[r],nk=ue([uce,xq],(e,r)=>{var n;if(e!=null)return e;var a=(n=am(r,"radiusAxis",M3.type))!==null&&n!==void 0?n:"category";return rp(rp({},M3),{},{type:a})}),im=e=>e.polarOptions,ak=ue([ri,ni,rr],Iue),Jq=ue([im,ak],(e,r)=>{if(e!=null)return Ui(e.innerRadius,r,0)}),e7=ue([im,ak],(e,r)=>{if(e!=null)return Ui(e.outerRadius,r,r*.8)}),cce=e=>{if(e==null)return[0,0];var{startAngle:r,endAngle:n}=e;return[r,n]},t7=ue([im],cce);ue([rk,t7],nm);var r7=ue([ak,Jq,e7],(e,r,n)=>{if(!(e==null||r==null||n==null))return[r,n]});ue([nk,r7],nm);var n7=ue([vt,im,Jq,e7,ri,ni],(e,r,n,a,i,o)=>{if(!(e!=="centric"&&e!=="radial"||r==null||n==null||a==null)){var{cx:s,cy:c,startAngle:f,endAngle:d}=r;return{cx:Ui(s,i,i/2),cy:Ui(c,o,o/2),innerRadius:n,outerRadius:a,startAngle:f,endAngle:d,clockWise:!1}}}),Ht=(e,r)=>r,om=(e,r,n)=>n;function a7(e){return e==null?void 0:e.id}function i7(e,r,n){var{chartData:a=[]}=r,{allowDuplicatedCategory:i,dataKey:o}=n,s=new Map;return e.forEach(c=>{var f,d=(f=c.data)!==null&&f!==void 0?f:a;if(!(d==null||d.length===0)){var h=a7(c);d.forEach((m,g)=>{var y=o==null||i?g:String(er(m,o,null)),_=er(m,c.dataKey,0),E;s.has(y)?E=s.get(y):E={},Object.assign(E,{[h]:_}),s.set(y,E)})}}),Array.from(s.values())}function ik(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var lm=(e,r)=>e===r?!0:e==null||r==null?!1:e[0]===r[0]&&e[1]===r[1];function sm(e,r){return Array.isArray(e)&&Array.isArray(r)&&e.length===0&&r.length===0?!0:e===r}function fce(e,r){if(e.length===r.length){for(var n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}return!1}var Gt=e=>{var r=vt(e);return r==="horizontal"?"xAxis":r==="vertical"?"yAxis":r==="centric"?"angleAxis":"radiusAxis"},ds=e=>e.tooltip.settings.axisId;function ok(e){if(e!=null){var r=e.ticks,n=e.bandwidth,a=e.range(),i=[Math.min(...a),Math.max(...a)];return{domain:()=>e.domain(),range:(function(o){function s(){return o.apply(this,arguments)}return s.toString=function(){return o.toString()},s})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var s=i[0],c=i[1];return s<=c?o>=s&&o<=c:o>=c&&o<=s},bandwidth:n?()=>n.call(e):void 0,ticks:r?o=>r.call(e,o):void 0,map:(o,s)=>{var c=e(o);if(c!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var f=e.bandwidth();switch(s.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var dce=(e,r)=>{if(r!=null)switch(e){case"linear":{if(!ra(r)){for(var n,a,i=0;i<r.length;i++){var o=r[i];De(o)&&((n===void 0||o<n)&&(n=o),(a===void 0||o>a)&&(a=o))}return n!==void 0&&a!==void 0?[n,a]:void 0}return r}default:return r}};const Gu=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:oE,scaleDiverging:CI,scaleDivergingLog:OI,scaleDivergingPow:SE,scaleDivergingSqrt:Bre,scaleDivergingSymlog:TI,scaleIdentity:sI,scaleImplicit:N2,scaleLinear:lI,scaleLog:cI,scaleOrdinal:kp,scalePoint:Zee,scalePow:hE,scaleQuantile:hI,scaleQuantize:pI,scaleRadial:dI,scaleSequential:EI,scaleSequentialLog:kI,scaleSequentialPow:wE,scaleSequentialQuantile:jI,scaleSequentialSqrt:qre,scaleSequentialSymlog:AI,scaleSqrt:xte,scaleSymlog:fI,scaleThreshold:mI,scaleTime:Ire,scaleUtc:zre,tickFormat:oI},Symbol.toStringTag,{value:"Module"}));function hce(e){if(e in Gu)return Gu[e]();var r="scale".concat(Mc(e));if(r in Gu)return Gu[r]()}function P3(e,r,n){if(typeof e=="function")return e.copy().domain(r).range(n);if(e!=null){var a=hce(e);if(a!=null)return a.domain(r).range(n),a}}function lk(e,r,n,a){if(!(n==null||a==null))return typeof e.scale=="function"?P3(e.scale,n,a):P3(r,n,a)}function pce(e){return"scale".concat(Mc(e))}function mce(e){return pce(e)in Gu}var o7=(e,r,n)=>{if(e!=null){var{scale:a,type:i}=e;if(a==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":i==="category"?"band":"linear";if(typeof a=="string")return mce(a)?a:"point"}};function vce(e,r){for(var n=0,a=e.length,i=e[0]<e[e.length-1];n<a;){var o=Math.floor((n+a)/2);(i?e[o]<r:e[o]>r)?n=o+1:a=o}return n}function l7(e,r){if(e){var n=r??e.domain(),a=n.map(o=>{var s;return(s=e(o))!==null&&s!==void 0?s:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var s,c,f=vce(a,o);if(f<=0)return n[0];if(f>=n.length)return n[n.length-1];var d=(s=a[f-1])!==null&&s!==void 0?s:0,h=(c=a[f])!==null&&c!==void 0?c:0;return Math.abs(o-d)<=Math.abs(o-h)?n[f-1]:n[f]}}}function gce(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):l7(e,void 0)}function R3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function np(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?R3(Object(n),!0).forEach(function(a){yce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function yce(e,r,n){return(r=bce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bce(e){var r=xce(e,"string");return typeof r=="symbol"?r:r+""}function xce(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var dS=[0,"auto"],Mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},s7=(e,r)=>e.cartesianAxis.xAxis[r],ca=(e,r)=>{var n=s7(e,r);return n??Mt},Pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:dS,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Dc},u7=(e,r)=>e.cartesianAxis.yAxis[r],fa=(e,r)=>{var n=u7(e,r);return n??Pt},_ce={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},sk=(e,r)=>{var n=e.cartesianAxis.zAxis[r];return n??_ce},br=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);case"zAxis":return sk(e,n);case"angleAxis":return rk(e,n);case"radiusAxis":return nk(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},wce=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},Bc=(e,r,n)=>{switch(r){case"xAxis":return ca(e,n);case"yAxis":return fa(e,n);case"angleAxis":return rk(e,n);case"radiusAxis":return nk(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},c7=e=>e.graphicalItems.cartesianItems.some(r=>r.type==="bar")||e.graphicalItems.polarItems.some(r=>r.type==="radialBar");function f7(e,r){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===r;case"yAxis":return"yAxisId"in n&&n.yAxisId===r;case"zAxis":return"zAxisId"in n&&n.zAxisId===r;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===r;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===r;default:return!1}}}var d7=e=>e.graphicalItems.cartesianItems,Sce=ue([Ht,om],f7),h7=(e,r,n)=>e.filter(n).filter(a=>(r==null?void 0:r.includeHidden)===!0?!0:!a.hide),$c=ue([d7,br,Sce],h7,{memoizeOptions:{resultEqualityCheck:sm}}),p7=ue([$c],e=>e.filter(r=>r.type==="area"||r.type==="bar").filter(ik)),m7=e=>e.filter(r=>!("stackId"in r)||r.stackId===void 0),Ece=ue([$c],m7),v7=e=>e.map(r=>r.data).filter(Boolean).flat(1),kce=ue([$c],v7,{memoizeOptions:{resultEqualityCheck:sm}}),g7=(e,r)=>{var{chartData:n=[],dataStartIndex:a,dataEndIndex:i}=r;return e.length>0?e:n.slice(a,i+1)},uk=ue([kce,XE],g7),y7=(e,r,n)=>(r==null?void 0:r.dataKey)!=null?e.map(a=>({value:er(a,r.dataKey)})):n.length>0?n.map(a=>a.dataKey).flatMap(a=>e.map(i=>({value:er(i,a)}))):e.map(a=>({value:a})),Fc=ue([uk,br,$c],y7);function Xl(e){if(gn(e)||e instanceof Date){var r=Number(e);if(De(r))return r}}function D3(e){if(Array.isArray(e)){var r=[Xl(e[0]),Xl(e[1])];return ra(r)?r:void 0}var n=Xl(e);if(n!=null)return[n,n]}function Qa(e){return e.map(Xl).filter(Tr)}function Ace(e,r){var n=Xl(e),a=Xl(r);return n==null&&a==null?0:n==null?-1:a==null?1:n-a}var jce=ue([Fc],e=>e==null?void 0:e.map(r=>r.value).sort(Ace));function b7(e,r){switch(e){case"xAxis":return r.direction==="x";case"yAxis":return r.direction==="y";default:return!1}}function Cce(e,r,n){return!n||typeof r!="number"||Wa(r)?[]:n.length?Qa(n.flatMap(a=>{var i=er(e,a.dataKey),o,s;if(Array.isArray(i)?[o,s]=i:o=s=i,!(!De(o)||!De(s)))return[r-o,r+s]})):[]}var Lt=e=>{var r=Gt(e),n=ds(e);return Bc(e,r,n)},Uc=ue([Lt],e=>e==null?void 0:e.dataKey),Oce=ue([p7,XE,Lt],i7),x7=(e,r,n,a)=>{var i={},o=r.reduce((s,c)=>{if(c.stackId==null)return s;var f=s[c.stackId];return f==null&&(f=[]),f.push(c),s[c.stackId]=f,s},i);return Object.fromEntries(Object.entries(o).map(s=>{var[c,f]=s,d=a?[...f].reverse():f,h=d.map(a7);return[c,{stackedData:lle(e,h,n),graphicalItems:d}]}))},Tce=ue([Oce,p7,rm,Zq],x7),_7=(e,r,n,a)=>{var{dataStartIndex:i,dataEndIndex:o}=r;if(a==null&&n!=="zAxis"){var s=cle(e,i,o);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},Nce=ue([br],e=>e.allowDataOverflow),ck=e=>{var r;if(e==null||!("domain"in e))return dS;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Qa(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(r=e==null?void 0:e.domain)!==null&&r!==void 0?r:dS},w7=ue([br],ck),S7=ue([w7,Nce],Bq),Mce=ue([Tce,Ki,Ht,S7],_7,{memoizeOptions:{resultEqualityCheck:lm}}),fk=e=>e.errorBars,Pce=(e,r,n)=>e.flatMap(a=>r[a.id]).filter(Boolean).filter(a=>b7(n,a)),ap=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),s=Math.min(...o),c=Math.max(...o);return[s,c]}},E7=(e,r,n,a,i)=>{var o,s;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var d,h,m=(d=a[f.id])===null||d===void 0?void 0:d.filter(x=>b7(i,x)),g=er(c,(h=r.dataKey)!==null&&h!==void 0?h:f.dataKey),y=Cce(c,g,m);if(y.length>=2){var _=Math.min(...y),E=Math.max(...y);(o==null||_<o)&&(o=_),(s==null||E>s)&&(s=E)}var w=D3(g);w!=null&&(o=o==null?w[0]:Math.min(o,w[0]),s=s==null?w[1]:Math.max(s,w[1]))})}),(r==null?void 0:r.dataKey)!=null&&e.forEach(c=>{var f=D3(er(c,r.dataKey));f!=null&&(o=o==null?f[0]:Math.min(o,f[0]),s=s==null?f[1]:Math.max(s,f[1]))}),De(o)&&De(s))return[o,s]},Rce=ue([uk,br,Ece,fk,Ht],E7,{memoizeOptions:{resultEqualityCheck:lm}});function Dce(e){var{value:r}=e;if(gn(r)||r instanceof Date)return r}var Lce=(e,r,n)=>{var a=e.map(Dce).filter(i=>i!=null);return n&&(r.dataKey==null||r.allowDuplicatedCategory&&pz(a))?qq(0,e.length):r.allowDuplicatedCategory?a:Array.from(new Set(a))},k7=e=>e.referenceElements.dots,hs=(e,r,n)=>e.filter(a=>a.ifOverflow==="extendDomain").filter(a=>r==="xAxis"?a.xAxisId===n:a.yAxisId===n),Ice=ue([k7,Ht,om],hs),A7=e=>e.referenceElements.areas,zce=ue([A7,Ht,om],hs),j7=e=>e.referenceElements.lines,qce=ue([j7,Ht,om],hs),C7=(e,r)=>{if(e!=null){var n=Qa(e.map(a=>r==="xAxis"?a.x:a.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Bce=ue(Ice,Ht,C7),O7=(e,r)=>{if(e!=null){var n=Qa(e.flatMap(a=>[r==="xAxis"?a.x1:a.y1,r==="xAxis"?a.x2:a.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},$ce=ue([zce,Ht],O7);function Fce(e){var r;if(e.x!=null)return Qa([e.x]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.x);return n==null||n.length===0?[]:Qa(n)}function Uce(e){var r;if(e.y!=null)return Qa([e.y]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.y);return n==null||n.length===0?[]:Qa(n)}var T7=(e,r)=>{if(e!=null){var n=e.flatMap(a=>r==="xAxis"?Fce(a):Uce(a));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Hce=ue([qce,Ht],T7),Gce=ue(Bce,Hce,$ce,(e,r,n)=>ap(e,n,r)),N7=(e,r,n,a,i,o,s,c)=>{if(n!=null)return n;var f=s==="vertical"&&c==="xAxis"||s==="horizontal"&&c==="yAxis",d=f?ap(a,o,i):ap(o,i);return Jue(r,d,e.allowDataOverflow)},Vce=ue([br,w7,S7,Mce,Rce,Gce,vt,Ht],N7,{memoizeOptions:{resultEqualityCheck:lm}}),Kce=[0,1],M7=(e,r,n,a,i,o,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:c,type:f}=e,d=ti(r,o);if(d&&c==null){var h;return qq(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return f==="category"?Lce(a,e,d):i==="expand"?Kce:s}},dk=ue([br,vt,uk,Fc,rm,Ht,Vce],M7),ps=ue([br,c7,JE],o7),P7=(e,r,n)=>{var{niceTicks:a}=r;if(a!=="none"){var i=ck(r),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((a==="snap125"||a==="adaptive")&&r!=null&&r.tickCount&&ra(e)){if(o)return C3(e,r.tickCount,r.allowDecimals,a);if(r.type==="number")return O3(e,r.tickCount,r.allowDecimals,a)}if(a==="auto"&&n==="linear"&&r!=null&&r.tickCount){if(o&&ra(e))return C3(e,r.tickCount,r.allowDecimals,"adaptive");if(r.type==="number"&&ra(e))return O3(e,r.tickCount,r.allowDecimals,"adaptive")}}},hk=ue([dk,Bc,ps],P7),R7=(e,r,n,a)=>{if(a!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ra(r)&&Array.isArray(n)&&n.length>0){var i,o,s=r[0],c=(i=n[0])!==null&&i!==void 0?i:0,f=r[1],d=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(s,c),Math.max(f,d)]}return r},Yce=ue([br,dk,hk,Ht],R7),Xce=ue(Fc,br,(e,r)=>{if(!(!r||r.type!=="number")){var n=1/0,a=Array.from(Qa(e.map(m=>m.value))).sort((m,g)=>m-g),i=a[0],o=a[a.length-1];if(i==null||o==null)return 1/0;var s=o-i;if(s===0)return 1/0;for(var c=0;c<a.length-1;c++){var f=a[c],d=a[c+1];if(!(f==null||d==null)){var h=d-f;n=Math.min(n,h)}}return n/s}}),D7=ue(Xce,vt,ace,rr,(e,r,n,a,i)=>i,(e,r,n,a,i)=>{if(!De(e))return 0;var o=r==="vertical"?a.height:a.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var s=Ui(n,e*o),c=e*o/2;return c-s-(c-s)/o*s}return 0}),Wce=(e,r,n)=>{var a=ca(e,r);return a==null||typeof a.padding!="string"?0:D7(e,"xAxis",r,n,a.padding)},Zce=(e,r,n)=>{var a=fa(e,r);return a==null||typeof a.padding!="string"?0:D7(e,"yAxis",r,n,a.padding)},Qce=ue(ca,Wce,(e,r)=>{var n,a;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:r,right:r}:{left:((n=i.left)!==null&&n!==void 0?n:0)+r,right:((a=i.right)!==null&&a!==void 0?a:0)+r}}),Jce=ue(fa,Zce,(e,r)=>{var n,a;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:r,bottom:r}:{top:((n=i.top)!==null&&n!==void 0?n:0)+r,bottom:((a=i.bottom)!==null&&a!==void 0?a:0)+r}}),efe=ue([rr,Qce,Zp,Wp,(e,r,n)=>n],(e,r,n,a,i)=>{var{padding:o}=a;return i?[o.left,n.width-o.right]:[e.left+r.left,e.left+e.width-r.right]}),tfe=ue([rr,vt,Jce,Zp,Wp,(e,r,n)=>n],(e,r,n,a,i,o)=>{var{padding:s}=i;return o?[a.height-s.bottom,s.top]:r==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Hc=(e,r,n,a)=>{var i;switch(r){case"xAxis":return efe(e,n,a);case"yAxis":return tfe(e,n,a);case"zAxis":return(i=sk(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return t7(e);case"radiusAxis":return r7(e,n);default:return}},L7=ue([br,Hc],nm),rfe=ue([ps,Yce],dce),pk=ue([br,ps,rfe,L7],lk),I7=(e,r,n,a)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,s=ti(e,a);if(s&&(i==="number"||o!=="auto"))return r.map(c=>c.value)}},mk=ue([vt,Fc,Bc,Ht],I7),as=ue([pk],ok);ue([pk],gce);ue([pk,jce],l7);ue([$c,fk,Ht],Pce);function z7(e,r){return e.id<r.id?-1:e.id>r.id?1:0}var um=(e,r)=>r,cm=(e,r,n)=>n,nfe=ue(Yp,um,cm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(z7)),afe=ue(Xp,um,cm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(z7)),q7=(e,r)=>({width:e.width,height:r.height}),ife=(e,r)=>{var n=typeof r.width=="number"?r.width:Dc;return{width:n,height:e.height}},ofe=ue(rr,ca,q7),lfe=(e,r,n)=>{switch(r){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},sfe=(e,r,n)=>{switch(r){case"left":return e.left;case"right":return n-e.right;default:return 0}},ufe=ue(ni,rr,nfe,um,cm,(e,r,n,a,i)=>{var o={},s;return n.forEach(c=>{var f=q7(r,c);s==null&&(s=lfe(r,a,e));var d=a==="top"&&!i||a==="bottom"&&i;o[c.id]=s-Number(d)*f.height,s+=(d?-1:1)*f.height}),o}),cfe=ue(ri,rr,afe,um,cm,(e,r,n,a,i)=>{var o={},s;return n.forEach(c=>{var f=ife(r,c);s==null&&(s=sfe(r,a,e));var d=a==="left"&&!i||a==="right"&&i;o[c.id]=s-Number(d)*f.width,s+=(d?-1:1)*f.width}),o}),ffe=(e,r)=>{var n=ca(e,r);if(n!=null)return ufe(e,n.orientation,n.mirror)},dfe=ue([rr,ca,ffe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),hfe=(e,r)=>{var n=fa(e,r);if(n!=null)return cfe(e,n.orientation,n.mirror)},pfe=ue([rr,fa,hfe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),mfe=ue(rr,fa,(e,r)=>{var n=typeof r.width=="number"?r.width:Dc;return{width:n,height:e.height}}),B7=(e,r,n,a)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:s}=n,c=ti(e,a),f=r.map(d=>d.value);if(s&&c&&o==="category"&&i&&pz(f))return f}},vk=ue([vt,Fc,br,Ht],B7),L3=ue([vt,wce,ps,as,vk,mk,Hc,hk,Ht],(e,r,n,a,i,o,s,c,f)=>{if(r!=null){var d=ti(e,f);return{angle:r.angle,interval:r.interval,minTickGap:r.minTickGap,orientation:r.orientation,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:d,niceTicks:c,range:s,realScaleType:n,scale:a}}}),vfe=(e,r,n,a,i,o,s,c,f)=>{if(!(r==null||a==null)){var d=ti(e,f),{type:h,ticks:m,tickCount:g}=r,y=n==="scaleBand"&&typeof a.bandwidth=="function"?a.bandwidth()/2:2,_=h==="category"&&a.bandwidth?a.bandwidth()/y:0;_=f==="angleAxis"&&o!=null&&o.length>=2?mn(o[0]-o[1])*2*_:_;var E=m||i;return E?E.map((w,x)=>{var j=s?s.indexOf(w):w,C=a.map(j);return De(C)?{index:x,coordinate:C+_,value:w,offset:_}:null}).filter(Tr):d&&c?c.map((w,x)=>{var j=a.map(w);return De(j)?{coordinate:j+_,value:w,index:x,offset:_}:null}).filter(Tr):a.ticks?a.ticks(g).map((w,x)=>{var j=a.map(w);return De(j)?{coordinate:j+_,value:w,index:x,offset:_}:null}).filter(Tr):a.domain().map((w,x)=>{var j=a.map(w);return De(j)?{coordinate:j+_,value:s?s[w]:w,index:x,offset:_}:null}).filter(Tr)}},$7=ue([vt,Bc,ps,as,hk,Hc,vk,mk,Ht],vfe),gfe=(e,r,n,a,i,o,s)=>{if(!(r==null||n==null||a==null||a[0]===a[1])){var c=ti(e,s),{tickCount:f}=r,d=0;return d=s==="angleAxis"&&(a==null?void 0:a.length)>=2?mn(a[0]-a[1])*2*d:d,c&&o?o.map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.ticks?n.ticks(f).map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.domain().map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:i?i[h]:h,index:m,offset:d}:null}).filter(Tr)}},F7=ue([vt,Bc,as,Hc,vk,mk,Ht],gfe),U7=ue(br,as,(e,r)=>{if(!(e==null||r==null))return np(np({},e),{},{scale:r})}),yfe=ue([br,ps,dk,L7],lk),bfe=ue([yfe],ok);ue((e,r,n)=>sk(e,n),bfe,(e,r)=>{if(!(e==null||r==null))return np(np({},e),{},{scale:r})});var xfe=ue([vt,Yp,Xp],(e,r,n)=>{switch(e){case"horizontal":return r.some(a=>a.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(a=>a.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),_fe=(e,r,n)=>{var a;return(a=e.renderedTicks[r])===null||a===void 0?void 0:a[n]};ue([_fe],e=>{if(!(!e||e.length===0))return r=>{var n,a=1/0,i=e[0];for(var o of e){var s=Math.abs(o.coordinate-r);s<a&&(a=s,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var H7=e=>e.options.defaultTooltipEventType,G7=e=>e.options.validateTooltipEventTypes;function V7(e,r,n){if(e==null)return r;var a=e?"axis":"item";return n==null?r:n.includes(a)?a:r}function gk(e,r){var n=H7(e),a=G7(e);return V7(r,n,a)}function wfe(e){return Ce(r=>gk(r,e))}var K7=(e,r)=>{var n,a=Number(r);if(!(Wa(a)||r==null))return a>=0?e==null||(n=e[a])===null||n===void 0?void 0:n.value:void 0},Sfe=e=>e.tooltip.settings,qi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Efe={itemInteraction:{click:qi,hover:qi},axisInteraction:{click:qi,hover:qi},keyboardInteraction:qi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Y7=cr({name:"tooltip",initialState:Efe,reducers:{addTooltipEntrySettings:{reducer(e,r){e.tooltipItemPayloads.push(r.payload)},prepare:st()},replaceTooltipEntrySettings:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=a)},prepare:st()},removeTooltipEntrySettings:{reducer(e,r){var n=vn(e).tooltipItemPayloads.indexOf(r.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:st()},setTooltipSettingsState(e,r){e.settings=r.payload},setActiveMouseOverItemIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=r.payload.activeIndex,e.itemInteraction.hover.dataKey=r.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=r.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,r){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=r.payload.activeIndex,e.itemInteraction.click.dataKey=r.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=r.payload.activeCoordinate},setMouseOverAxisIndex(e,r){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=r.payload.activeIndex,e.axisInteraction.hover.dataKey=r.payload.activeDataKey,e.axisInteraction.hover.coordinate=r.payload.activeCoordinate},setMouseClickAxisIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=r.payload.activeIndex,e.axisInteraction.click.dataKey=r.payload.activeDataKey,e.axisInteraction.click.coordinate=r.payload.activeCoordinate},setSyncInteraction(e,r){e.syncInteraction=r.payload},setKeyboardInteraction(e,r){e.keyboardInteraction.active=r.payload.active,e.keyboardInteraction.index=r.payload.activeIndex,e.keyboardInteraction.coordinate=r.payload.activeCoordinate}}}),{addTooltipEntrySettings:kfe,replaceTooltipEntrySettings:Afe,removeTooltipEntrySettings:jfe,setTooltipSettingsState:Cfe,setActiveMouseOverItemIndex:Ofe,mouseLeaveItem:j_e,mouseLeaveChart:X7,setActiveClickItemIndex:C_e,setMouseOverAxisIndex:W7,setMouseClickAxisIndex:Tfe,setSyncInteraction:hS,setKeyboardInteraction:ip}=Y7.actions,Nfe=Y7.reducer;function I3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function $d(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?I3(Object(n),!0).forEach(function(a){Mfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Mfe(e,r,n){return(r=Pfe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Pfe(e){var r=Rfe(e,"string");return typeof r=="symbol"?r:r+""}function Rfe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Dfe(e,r,n){return r==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Lfe(e){return e.index!=null}var Z7=(e,r,n,a)=>{if(r==null)return qi;var i=Dfe(e,r,n);if(i==null)return qi;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(Lfe(i)){if(o)return $d($d({},i),{},{active:!0})}else if(a!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:a,graphicalItemId:void 0};return $d($d({},qi),{},{coordinate:i.coordinate})};function Ife(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var r=e.valueOf();return Number.isFinite(r)?r:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function zfe(e,r){var n=Ife(e),a=r[0],i=r[1];if(n===void 0)return!1;var o=Math.min(a,i),s=Math.max(a,i);return n>=o&&n<=s}function qfe(e,r,n){if(n==null||r==null)return!0;var a=er(e,r);return a==null||!ra(n)?!0:zfe(a,n)}var yk=(e,r,n,a)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!De(o))return i;var s=0,c=1/0;r.length>0&&(c=r.length-1);var f=Math.max(s,Math.min(o,c)),d=r[f];return d==null||qfe(d,n,a)?String(f):null},Q7=(e,r,n,a,i,o,s)=>{if(o!=null){var c=s[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var d=i==null?void 0:i[Number(o)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(a.top+r)/2};default:return{x:(a.left+e)/2,y:d.coordinate}}}},J7=(e,r,n,a)=>{if(r==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&a!=null){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(s=>{var c;return((c=s.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},eB=e=>e.options.tooltipPayloadSearcher,ms=e=>e.tooltip;function z3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?z3(Object(n),!0).forEach(function(a){Bfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Bfe(e,r,n){return(r=$fe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function $fe(e){var r=Ffe(e,"string");return typeof r=="symbol"?r:r+""}function Ffe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ufe(e){if(typeof e=="string"||typeof e=="number")return e}function Hfe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Gfe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return r=>e(r)}function B3(e){if(typeof e=="string")return e}function Vfe(e){if(!(e==null||typeof e!="object")){var r="name"in e?Ufe(e.name):void 0,n="unit"in e?Hfe(e.unit):void 0,a="dataKey"in e?Gfe(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?B3(e.color):void 0,s="fill"in e?B3(e.fill):void 0;return{name:r,unit:n,dataKey:a,payload:i,color:o,fill:s}}}function Kfe(e,r){return e??r}var tB=(e,r,n,a,i,o,s)=>{if(!(r==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:d,dataEndIndex:h}=n,m=[];return e.reduce((g,y)=>{var _,{dataDefinedOnItem:E,settings:w}=y,x=Kfe(E,c),j=Array.isArray(x)?lq(x,d,h):x,C=(_=w==null?void 0:w.dataKey)!==null&&_!==void 0?_:a,T=w==null?void 0:w.nameKey,O;if(a&&Array.isArray(j)&&!Array.isArray(j[0])&&s==="axis"?O=mz(j,a,i):O=o(j,r,f,T),Array.isArray(O))O.forEach(M=>{var R,L,D=Vfe(M),q=D==null?void 0:D.name,z=D==null?void 0:D.dataKey,H=D==null?void 0:D.payload,F=q3(q3({},w),{},{name:q,unit:D==null?void 0:D.unit,color:(R=D==null?void 0:D.color)!==null&&R!==void 0?R:w==null?void 0:w.color,fill:(L=D==null?void 0:D.fill)!==null&&L!==void 0?L:w==null?void 0:w.fill});g.push(y4({tooltipEntrySettings:F,dataKey:z,payload:H,value:er(H,z),name:q==null?void 0:String(q)}))});else{var N;g.push(y4({tooltipEntrySettings:w,dataKey:C,payload:O,value:er(O,C),name:(N=er(O,T))!==null&&N!==void 0?N:w==null?void 0:w.name}))}return g},m)}},bk=ue([Lt,c7,JE],o7),Yfe=ue([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,r)=>[...e,...r]),Xfe=ue([Gt,ds],f7),vs=ue([Yfe,Lt,Xfe],h7,{memoizeOptions:{resultEqualityCheck:sm}}),Wfe=ue([vs],e=>e.filter(ik)),Zfe=ue([vs],v7,{memoizeOptions:{resultEqualityCheck:sm}}),gs=ue([Zfe,Ki],g7),Qfe=ue([Wfe,Ki,Lt],i7),xk=ue([gs,Lt,vs],y7),rB=ue([Lt],ck),Jfe=ue([Lt],e=>e.allowDataOverflow),nB=ue([rB,Jfe],Bq),ede=ue([vs],e=>e.filter(ik)),tde=ue([Qfe,ede,rm,Zq],x7),rde=ue([tde,Ki,Gt,nB],_7),nde=ue([vs],m7),ade=ue([gs,Lt,nde,fk,Gt],E7,{memoizeOptions:{resultEqualityCheck:lm}}),ide=ue([k7,Gt,ds],hs),ode=ue([ide,Gt],C7),lde=ue([A7,Gt,ds],hs),sde=ue([lde,Gt],O7),ude=ue([j7,Gt,ds],hs),cde=ue([ude,Gt],T7),fde=ue([ode,cde,sde],ap),dde=ue([Lt,rB,nB,rde,ade,fde,vt,Gt],N7),Gc=ue([Lt,vt,gs,xk,rm,Gt,dde],M7),hde=ue([Gc,Lt,bk],P7),pde=ue([Lt,Gc,hde,Gt],R7),aB=e=>{var r=Gt(e),n=ds(e),a=!1;return Hc(e,r,n,a)},iB=ue([Lt,aB],nm),mde=ue([Lt,bk,pde,iB],lk),oB=ue([mde],ok),vde=ue([vt,xk,Lt,Gt],B7),gde=ue([vt,xk,Lt,Gt],I7),yde=(e,r,n,a,i,o,s,c)=>{if(r){var{type:f}=r,d=ti(e,c);if(a){var h=n==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=f==="category"&&a.bandwidth?a.bandwidth()/h:0;return m=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?mn(i[0]-i[1])*2*m:m,d&&s?s.map((g,y)=>{var _=a.map(g);return De(_)?{coordinate:_+m,value:g,index:y,offset:m}:null}).filter(Tr):a.domain().map((g,y)=>{var _=a.map(g);return De(_)?{coordinate:_+m,value:o?o[g]:g,index:y,offset:m}:null}).filter(Tr)}}},ai=ue([vt,Lt,bk,oB,aB,vde,gde,Gt],yde),_k=ue([H7,G7,Sfe],(e,r,n)=>V7(n.shared,e,r)),lB=e=>e.tooltip.settings.trigger,wk=e=>e.tooltip.settings.defaultIndex,Vc=ue([ms,_k,lB,wk],Z7),vc=ue([Vc,gs,Uc,Gc],yk),sB=ue([ai,vc],K7),bde=ue([Vc],e=>{if(e)return e.dataKey}),xde=ue([Vc],e=>{if(e)return e.graphicalItemId}),uB=ue([ms,_k,lB,wk],J7),_de=ue([ri,ni,vt,rr,ai,wk,uB],Q7),wde=ue([Vc,_de],(e,r)=>e!=null&&e.coordinate?e.coordinate:r),Sde=ue([Vc],e=>{var r;return(r=e==null?void 0:e.active)!==null&&r!==void 0?r:!1}),Ede=ue([uB,vc,Ki,Uc,sB,eB,_k],tB),kde=ue([Ede],e=>{if(e!=null){var r=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(r))}});function $3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function F3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?$3(Object(n),!0).forEach(function(a){Ade(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ade(e,r,n){return(r=jde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jde(e){var r=Cde(e,"string");return typeof r=="symbol"?r:r+""}function Cde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ode=()=>Ce(Lt),Tde=()=>{var e=Ode(),r=Ce(ai),n=Ce(oB);return Gh(!e||!n?void 0:F3(F3({},e),{},{scale:n}),r)};function U3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ql(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?U3(Object(n),!0).forEach(function(a){Nde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Nde(e,r,n){return(r=Mde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Mde(e){var r=Pde(e,"string");return typeof r=="symbol"?r:r+""}function Pde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Rde=(e,r,n,a)=>{var i=r.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:a.relativeY};if(e==="vertical")return{x:a.relativeX,y:i.coordinate}}return{x:0,y:0}},Dde=(e,r,n,a)=>{var i=r.find(d=>d&&d.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:s}=a;return ql(ql(ql({},a),Jt(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var c=i.coordinate,{angle:f}=a;return ql(ql(ql({},a),Jt(a.cx,a.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Lde(e,r){var{relativeX:n,relativeY:a}=e;return n>=r.left&&n<=r.left+r.width&&a>=r.top&&a<=r.top+r.height}var cB=(e,r,n,a,i)=>{var o,s=(o=r==null?void 0:r.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(a==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<s;c++){var f,d,h,m,g,y=c>0?(f=n[c-1])===null||f===void 0?void 0:f.coordinate:(d=n[s-1])===null||d===void 0?void 0:d.coordinate,_=(h=n[c])===null||h===void 0?void 0:h.coordinate,E=c>=s-1?(m=n[0])===null||m===void 0?void 0:m.coordinate:(g=n[c+1])===null||g===void 0?void 0:g.coordinate,w=void 0;if(!(y==null||_==null||E==null))if(mn(_-y)!==mn(E-_)){var x=[];if(mn(E-_)===mn(i[1]-i[0])){w=E;var j=_+i[1]-i[0];x[0]=Math.min(j,(j+y)/2),x[1]=Math.max(j,(j+y)/2)}else{w=y;var C=E+i[1]-i[0];x[0]=Math.min(_,(C+_)/2),x[1]=Math.max(_,(C+_)/2)}var T=[Math.min(_,(w+_)/2),Math.max(_,(w+_)/2)];if(e>T[0]&&e<=T[1]||e>=x[0]&&e<=x[1]){var O;return(O=n[c])===null||O===void 0?void 0:O.index}}else{var N=Math.min(y,E),M=Math.max(y,E);if(e>(N+_)/2&&e<=(M+_)/2){var R;return(R=n[c])===null||R===void 0?void 0:R.index}}}else if(r)for(var L=0;L<s;L++){var D=r[L];if(D!=null){var q=r[L+1],z=r[L-1];if(L===0&&q!=null&&e<=(D.coordinate+q.coordinate)/2||L===s-1&&z!=null&&e>(D.coordinate+z.coordinate)/2||L>0&&L<s-1&&z!=null&&q!=null&&e>(D.coordinate+z.coordinate)/2&&e<=(D.coordinate+q.coordinate)/2)return D.index}}return-1},Ide=()=>Ce(JE),Sk=(e,r)=>r,fB=(e,r,n)=>n,Ek=(e,r,n,a)=>a,zde=ue(ai,e=>zp(e,r=>r.coordinate)),kk=ue([ms,Sk,fB,Ek],Z7),Ak=ue([kk,gs,Uc,Gc],yk),qde=(e,r,n)=>{if(r!=null){var a=ms(e);return r==="axis"?n==="hover"?a.axisInteraction.hover.dataKey:a.axisInteraction.click.dataKey:n==="hover"?a.itemInteraction.hover.dataKey:a.itemInteraction.click.dataKey}},dB=ue([ms,Sk,fB,Ek],J7),op=ue([ri,ni,vt,rr,ai,Ek,dB],Q7),Bde=ue([kk,op],(e,r)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:r}),hB=ue([ai,Ak],K7),$de=ue([dB,Ak,Ki,Uc,hB,eB,Sk],tB),Fde=ue([kk,Ak],(e,r)=>({isActive:e.active&&r!=null,activeIndex:r})),Ude=(e,r,n,a,i,o,s)=>{if(!(!e||!n||!a||!i)&&Lde(e,s)){var c=fle(e,r),f=cB(c,o,i,n,a),d=Rde(r,i,f,e);return{activeIndex:String(f),activeCoordinate:d}}},Hde=(e,r,n,a,i,o,s)=>{if(!(!e||!a||!i||!o||!n)){var c=Fue(e,n);if(c){var f=dle(c,r),d=cB(f,s,o,a,i),h=Dde(r,o,d,c);return{activeIndex:String(d),activeCoordinate:h}}}},Gde=(e,r,n,a,i,o,s,c)=>{if(!(!e||!r||!a||!i||!o))return r==="horizontal"||r==="vertical"?Ude(e,r,a,i,o,s,c):Hde(e,r,n,a,i,o,s)},Vde=ue(e=>e.zIndex.zIndexMap,(e,r)=>r,(e,r,n)=>n,(e,r,n)=>{if(r!=null){var a=e[r];if(a!=null)return n?a.panoramaElement:a.element}}),Kde=ue(e=>e.zIndex.zIndexMap,e=>{var r=Object.keys(e).map(a=>parseInt(a,10)).concat(Object.values(sr)),n=Array.from(new Set(r));return n.sort((a,i)=>a-i)},{memoizeOptions:{resultEqualityCheck:fce}});function H3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function G3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?H3(Object(n),!0).forEach(function(a){Yde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Yde(e,r,n){return(r=Xde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xde(e){var r=Wde(e,"string");return typeof r=="symbol"?r:r+""}function Wde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Zde={},Qde={zIndexMap:Object.values(sr).reduce((e,r)=>G3(G3({},e),{},{[r]:{element:void 0,panoramaElement:void 0,consumers:0}}),Zde)},Jde=new Set(Object.values(sr));function ehe(e){return Jde.has(e)}var pB=cr({name:"zIndex",initialState:Qde,reducers:{registerZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:st()},unregisterZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!ehe(n)&&delete e.zIndexMap[n])},prepare:st()},registerZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n,element:a,isPanorama:i}=r.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:i?void 0:a,panoramaElement:i?a:void 0}},prepare:st()},unregisterZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(r.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:st()}}}),{registerZIndexPortal:the,unregisterZIndexPortal:rhe,registerZIndexPortalElement:nhe,unregisterZIndexPortalElement:ahe}=pB.actions,ihe=pB.reducer;function da(e){var{zIndex:r,children:n}=e,a=Gle(),i=a&&r!==void 0&&r!==0,o=yr(),s=Et();k.useLayoutEffect(()=>i?(s(the({zIndex:r})),()=>{s(rhe({zIndex:r}))}):Uo,[s,r,i]);var c=Ce(f=>Vde(f,r,o));return i?c?MS.createPortal(n,c):null:n}function pS(){return pS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},pS.apply(null,arguments)}function V3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Fd(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?V3(Object(n),!0).forEach(function(a){ohe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ohe(e,r,n){return(r=lhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function lhe(e){var r=she(e,"string");return typeof r=="symbol"?r:r+""}function she(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function uhe(e){var{cursor:r,cursorComp:n,cursorProps:a}=e;return k.isValidElement(r)?k.cloneElement(r,a):k.createElement(n,a)}function che(e){var r,{coordinate:n,payload:a,index:i,offset:o,tooltipAxisBandSize:s,layout:c,cursor:f,tooltipEventType:d,chartName:h}=e,m=n,g=a,y=i;if(!f||!m||h!=="ScatterChart"&&d!=="axis")return null;var _,E,w;if(h==="ScatterChart")_=m,E=rue,w=sr.cursorLine;else if(h==="BarChart")_=nue(c,m,o,s),E=Dq,w=sr.cursorRectangle;else if(c==="radial"&&yz(m)){var{cx:x,cy:j,radius:C,startAngle:T,endAngle:O}=Lq(m);_={cx:x,cy:j,startAngle:T,endAngle:O,innerRadius:C,outerRadius:C},E=zq,w=sr.cursorLine}else _={points:Vue(c,m,o)},E=Tq,w=sr.cursorLine;var N=typeof f=="object"&&"className"in f?f.className:void 0,M=Fd(Fd(Fd(Fd({stroke:"#ccc",pointerEvents:"none"},o),_),Pp(f)),{},{payload:g,payloadIndex:y,className:et("recharts-tooltip-cursor",N)});return k.createElement(da,{zIndex:(r=e.zIndex)!==null&&r!==void 0?r:w},k.createElement(uhe,{cursor:f,cursorComp:E,cursorProps:M}))}function fhe(e){var r=Tde(),n=vq(),a=us(),i=Ide();return r==null||n==null||a==null||i==null?null:k.createElement(che,pS({},e,{offset:n,layout:a,tooltipAxisBandSize:r,chartName:i}))}var mB=k.createContext(null),dhe=()=>k.useContext(mB),P0={exports:{}},K3;function hhe(){return K3||(K3=1,(function(e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function i(f,d,h){this.fn=f,this.context=d,this.once=h||!1}function o(f,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var y=new i(h,m||f,g),_=n?n+d:d;return f._events[_]?f._events[_].fn?f._events[_]=[f._events[_],y]:f._events[_].push(y):(f._events[_]=y,f._eventsCount++),f}function s(f,d){--f._eventsCount===0?f._events=new a:delete f._events[d]}function c(){this._events=new a,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)r.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d){var h=n?n+d:d,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,y=m.length,_=new Array(y);g<y;g++)_[g]=m[g].fn;return _},c.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},c.prototype.emit=function(d,h,m,g,y,_){var E=n?n+d:d;if(!this._events[E])return!1;var w=this._events[E],x=arguments.length,j,C;if(w.fn){switch(w.once&&this.removeListener(d,w.fn,void 0,!0),x){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,h),!0;case 3:return w.fn.call(w.context,h,m),!0;case 4:return w.fn.call(w.context,h,m,g),!0;case 5:return w.fn.call(w.context,h,m,g,y),!0;case 6:return w.fn.call(w.context,h,m,g,y,_),!0}for(C=1,j=new Array(x-1);C<x;C++)j[C-1]=arguments[C];w.fn.apply(w.context,j)}else{var T=w.length,O;for(C=0;C<T;C++)switch(w[C].once&&this.removeListener(d,w[C].fn,void 0,!0),x){case 1:w[C].fn.call(w[C].context);break;case 2:w[C].fn.call(w[C].context,h);break;case 3:w[C].fn.call(w[C].context,h,m);break;case 4:w[C].fn.call(w[C].context,h,m,g);break;default:if(!j)for(O=1,j=new Array(x-1);O<x;O++)j[O-1]=arguments[O];w[C].fn.apply(w[C].context,j)}}return!0},c.prototype.on=function(d,h,m){return o(this,d,h,m,!1)},c.prototype.once=function(d,h,m){return o(this,d,h,m,!0)},c.prototype.removeListener=function(d,h,m,g){var y=n?n+d:d;if(!this._events[y])return this;if(!h)return s(this,y),this;var _=this._events[y];if(_.fn)_.fn===h&&(!g||_.once)&&(!m||_.context===m)&&s(this,y);else{for(var E=0,w=[],x=_.length;E<x;E++)(_[E].fn!==h||g&&!_[E].once||m&&_[E].context!==m)&&w.push(_[E]);w.length?this._events[y]=w.length===1?w[0]:w:s(this,y)}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&s(this,h)):(this._events=new a,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})(P0)),P0.exports}var phe=hhe();const mhe=Dn(phe);var gc=new mhe,mS="recharts.syncEvent.tooltip",Y3="recharts.syncEvent.brush",vhe=(e,r)=>{if(r&&Array.isArray(e)){var n=Number.parseInt(r,10);if(!Wa(n))return e[n]}},ghe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},vB=cr({name:"options",initialState:ghe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),yhe=vB.reducer,{createEventEmitter:bhe}=vB.actions;function xhe(e){return e.tooltip.syncInteraction}var _he={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},gB=cr({name:"chartData",initialState:_he,reducers:{setChartData(e,r){if(e.chartData=r.payload,r.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}r.payload.length>0&&e.dataEndIndex!==r.payload.length-1&&(e.dataEndIndex=r.payload.length-1)},setComputedData(e,r){e.computedData=r.payload},setDataStartEndIndexes(e,r){var{startIndex:n,endIndex:a}=r.payload;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),{setChartData:X3,setDataStartEndIndexes:whe,setComputedData:O_e}=gB.actions,She=gB.reducer,Ehe=["x","y"];function W3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Bl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?W3(Object(n),!0).forEach(function(a){khe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function khe(e,r,n){return(r=Ahe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ahe(e){var r=jhe(e,"string");return typeof r=="symbol"?r:r+""}function jhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Che(e,r){if(e==null)return{};var n,a,i=Ohe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ohe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function The(){var e=Ce(ek),r=Ce(tk),n=Et(),a=Ce(Qq),i=Ce(ai),o=us(),s=Lc(),c=Ce(f=>f.rootProps.className);k.useEffect(()=>{if(e==null)return Uo;var f=(d,h,m)=>{if(r!==m&&e===d){if(a==="index"){var g;if(s&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var y=h.payload.coordinate,{x:_,y:E}=y,w=Che(y,Ehe),{x,y:j,width:C,height:T}=h.payload.sourceViewBox,O=Bl(Bl({},w),{},{x:s.x+(C?(_-x)/C:0)*s.width,y:s.y+(T?(E-j)/T:0)*s.height});n(Bl(Bl({},h),{},{payload:Bl(Bl({},h.payload),{},{coordinate:O})}))}else n(h);return}if(i!=null){var N;if(typeof a=="function"){var M={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},R=a(i,M);N=i[R]}else a==="value"&&(N=i.find(B=>String(B.value)===h.payload.label));var{coordinate:L}=h.payload;if(N==null||h.payload.active===!1||L==null||s==null){n(hS({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:D,y:q}=L,z=Math.min(D,s.x+s.width),H=Math.min(q,s.y+s.height),F={x:o==="horizontal"?N.coordinate:z,y:o==="horizontal"?H:N.coordinate},X=hS({active:h.payload.active,coordinate:F,dataKey:h.payload.dataKey,index:String(N.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(X)}}};return gc.on(mS,f),()=>{gc.off(mS,f)}},[c,n,r,e,a,i,o,s])}function Nhe(){var e=Ce(ek),r=Ce(tk),n=Et();k.useEffect(()=>{if(e==null)return Uo;var a=(i,o,s)=>{r!==s&&e===i&&n(whe(o))};return gc.on(Y3,a),()=>{gc.off(Y3,a)}},[n,r,e])}function Mhe(){var e=Et();k.useEffect(()=>{e(bhe())},[e]),The(),Nhe()}function Phe(e,r,n,a,i,o){var s=Ce(_=>qde(_,e,r)),c=Ce(xde),f=Ce(tk),d=Ce(ek),h=Ce(Qq),m=Ce(xhe),g=m==null?void 0:m.active,y=Lc();k.useEffect(()=>{if(!g&&d!=null&&f!=null){var _=hS({active:o,coordinate:n,dataKey:s,index:i,label:typeof a=="number"?String(a):a,sourceViewBox:y,graphicalItemId:c});gc.emit(mS,d,_,f)}},[g,n,s,c,i,a,f,d,h,o,y])}function Z3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Q3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Z3(Object(n),!0).forEach(function(a){Rhe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Rhe(e,r,n){return(r=Dhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Dhe(e){var r=Lhe(e,"string");return typeof r=="symbol"?r:r+""}function Lhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ihe(e){return e.dataKey}function zhe(e,r){return k.isValidElement(e)?k.cloneElement(e,r):typeof e=="function"?k.createElement(e,r):k.createElement(Nse,r)}var J3=[],qhe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Bhe(e){var r,n,a=gr(e,qhe),{active:i,allowEscapeViewBox:o,animationDuration:s,animationEasing:c,content:f,filterNull:d,isAnimationActive:h,offset:m,payloadUniqBy:g,position:y,reverseDirection:_,useTranslate3d:E,wrapperStyle:w,cursor:x,shared:j,trigger:C,defaultIndex:T,portal:O,axisId:N}=a,M=Et(),R=typeof T=="number"?String(T):T;k.useEffect(()=>{M(Cfe({shared:j,trigger:C,axisId:N,active:i,defaultIndex:R}))},[M,j,C,N,i,R]);var L=Lc(),D=Oq(),q=wfe(j),{activeIndex:z,isActive:H}=(r=Ce(xe=>Fde(xe,q,C,R)))!==null&&r!==void 0?r:{},F=Ce(xe=>$de(xe,q,C,R)),X=Ce(xe=>hB(xe,q,C,R)),B=Ce(xe=>Bde(xe,q,C,R)),Q=F,te=dhe(),K=(n=i??H)!==null&&n!==void 0?n:!1,[de,U]=Jie([Q,K]),J=q==="axis"?X:void 0;Phe(q,C,B,J,z,K);var le=O??te;if(le==null||L==null||q==null)return null;var $=Q??J3;K||($=J3),d&&$.length&&($=kie($.filter(xe=>xe.value!=null&&(xe.hide!==!0||a.includeHidden)),g,Ihe));var Y=$.length>0,G=Q3(Q3({},a),{},{payload:$,label:J,active:K,activeIndex:z,coordinate:B,accessibilityLayer:D}),he=k.createElement(Fse,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:K,coordinate:B,hasPayload:Y,offset:m,position:y,reverseDirection:_,useTranslate3d:E,viewBox:L,wrapperStyle:w,lastBoundingBox:de,innerRef:U,hasPortalFromProps:!!O},zhe(f,G));return k.createElement(k.Fragment,null,MS.createPortal(he,le),K&&k.createElement(fhe,{cursor:x,tooltipEventType:q,coordinate:B,payload:$,index:z}))}function $he(e,r,n){return(r=Fhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fhe(e){var r=Uhe(e,"string");return typeof r=="symbol"?r:r+""}function Uhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}class Hhe{constructor(r){$he(this,"cache",new Map),this.maxSize=r}get(r){var n=this.cache.get(r);return n!==void 0&&(this.cache.delete(r),this.cache.set(r,n)),n}set(r,n){if(this.cache.has(r))this.cache.delete(r);else if(this.cache.size>=this.maxSize){var a=this.cache.keys().next().value;a!=null&&this.cache.delete(a)}this.cache.set(r,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function eM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ghe(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?eM(Object(n),!0).forEach(function(a){Vhe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Vhe(e,r,n){return(r=Khe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Khe(e){var r=Yhe(e,"string");return typeof r=="symbol"?r:r+""}function Yhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Xhe={cacheSize:2e3,enableCache:!0},yB=Ghe({},Xhe),tM=new Hhe(yB.cacheSize),Whe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},rM="recharts_measurement_span";function Zhe(e,r){var n=r.fontSize||"",a=r.fontFamily||"",i=r.fontWeight||"",o=r.fontStyle||"",s=r.letterSpacing||"",c=r.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(a,"|").concat(i,"|").concat(o,"|").concat(s,"|").concat(c)}var nM=(e,r)=>{try{var n=document.getElementById(rM);n||(n=document.createElement("span"),n.setAttribute("id",rM),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Whe,r),n.textContent="".concat(e);var a=n.getBoundingClientRect();return{width:a.width,height:a.height}}catch{return{width:0,height:0}}},Ju=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r==null||qc.isSsr)return{width:0,height:0};if(!yB.enableCache)return nM(r,n);var a=Zhe(r,n),i=tM.get(a);if(i)return i;var o=nM(r,n);return tM.set(a,o),o},bB;function Qhe(e,r,n){return(r=Jhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Jhe(e){var r=epe(e,"string");return typeof r=="symbol"?r:r+""}function epe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var aM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tpe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,rpe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,npe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ape=["cm","mm","pt","pc","in","Q","px"];function ipe(e){return ape.includes(e)}var Gl="NaN";function ope(e,r){return e*npe[r]}class Qt{static parse(r){var n,[,a,i]=(n=rpe.exec(r))!==null&&n!==void 0?n:[];return a==null?Qt.NaN:new Qt(parseFloat(a),i??"")}constructor(r,n){this.num=r,this.unit=n,this.num=r,this.unit=n,Wa(r)&&(this.unit=""),n!==""&&!tpe.test(n)&&(this.num=NaN,this.unit=""),ipe(n)&&(this.num=ope(r,n),this.unit="px")}add(r){return this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num+r.num,this.unit)}subtract(r){return this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num-r.num,this.unit)}multiply(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num*r.num,this.unit||r.unit)}divide(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new Qt(NaN,""):new Qt(this.num/r.num,this.unit||r.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Wa(this.num)}}bB=Qt;Qhe(Qt,"NaN",new bB(NaN,""));function xB(e){if(e==null||e.includes(Gl))return Gl;for(var r=e;r.includes("*")||r.includes("/");){var n,[,a,i,o]=(n=aM.exec(r))!==null&&n!==void 0?n:[],s=Qt.parse(a??""),c=Qt.parse(o??""),f=i==="*"?s.multiply(c):s.divide(c);if(f.isNaN())return Gl;r=r.replace(aM,f.toString())}for(;r.includes("+")||/.-\d+(?:\.\d+)?/.test(r);){var d,[,h,m,g]=(d=iM.exec(r))!==null&&d!==void 0?d:[],y=Qt.parse(h??""),_=Qt.parse(g??""),E=m==="+"?y.add(_):y.subtract(_);if(E.isNaN())return Gl;r=r.replace(iM,E.toString())}return r}var oM=/\(([^()]*)\)/;function lpe(e){for(var r=e,n;(n=oM.exec(r))!=null;){var[,a]=n;r=r.replace(oM,xB(a))}return r}function spe(e){var r=e.replace(/\s+/g,"");return r=lpe(r),r=xB(r),r}function upe(e){try{return spe(e)}catch{return Gl}}function R0(e){var r=upe(e.slice(5,-1));return r===Gl?"":r}var cpe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],fpe=["dx","dy","angle","className","breakAll"];function vS(){return vS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},vS.apply(null,arguments)}function lM(e,r){if(e==null)return{};var n,a,i=dpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function dpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var _B=/[ \f\n\r\t\v\u2028\u2029]+/,wB=e=>{var{children:r,breakAll:n,style:a}=e;try{var i=[];$t(r)||(n?i=r.toString().split(""):i=r.toString().split(_B));var o=i.map(c=>({word:c,width:Ju(c,a).width})),s=n?0:Ju(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function SB(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function hpe(e){return $t(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var EB=(e,r,n,a)=>e.reduce((i,o)=>{var{word:s,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(r==null||a||f.width+c+n<Number(r)))f.words.push(s),f.width+=c+n;else{var d={words:[s],width:c};i.push(d)}return i},[]),kB=e=>e.reduce((r,n)=>r.width>n.width?r:n),ppe="…",sM=(e,r,n,a,i,o,s,c)=>{var f=e.slice(0,r),d=wB({breakAll:n,style:a,children:f+ppe});if(!d)return[!1,[]];var h=EB(d.wordsWithComputedWidth,o,s,c),m=h.length>i||kB(h).width>Number(o);return[m,h]},mpe=(e,r,n,a,i)=>{var{maxLines:o,children:s,style:c,breakAll:f}=e,d=je(o),h=String(s),m=EB(r,a,n,i);if(!d||i)return m;var g=m.length>o||kB(m).width>Number(a);if(!g)return m;for(var y=0,_=h.length-1,E=0,w;y<=_&&E<=h.length-1;){var x=Math.floor((y+_)/2),j=x-1,[C,T]=sM(h,j,f,c,o,a,n,i),[O]=sM(h,x,f,c,o,a,n,i);if(!C&&!O&&(y=x+1),C&&O&&(_=x-1),!C&&O){w=T;break}E++}return w||m},uM=e=>{var r=$t(e)?[]:e.toString().split(_B);return[{words:r,width:void 0}]},vpe=e=>{var{width:r,scaleToFit:n,children:a,style:i,breakAll:o,maxLines:s}=e;if((r||n)&&!qc.isSsr){var c,f,d=wB({breakAll:o,children:a,style:i});if(d){var{wordsWithComputedWidth:h,spaceWidth:m}=d;c=h,f=m}else return uM(a);return mpe({breakAll:o,children:a,maxLines:s,style:i},c,f,r,!!n)}return uM(a)},AB="#808080",gpe={angle:0,breakAll:!1,capHeight:"0.71em",fill:AB,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},jk=k.forwardRef((e,r)=>{var n=gr(e,gpe),{x:a,y:i,lineHeight:o,capHeight:s,fill:c,scaleToFit:f,textAnchor:d,verticalAnchor:h}=n,m=lM(n,cpe),g=k.useMemo(()=>vpe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:f,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,f,m.style,m.width]),{dx:y,dy:_,angle:E,className:w,breakAll:x}=m,j=lM(m,fpe);if(!gn(a)||!gn(i)||g.length===0)return null;var C=Number(a)+(je(y)?y:0),T=Number(i)+(je(_)?_:0);if(!De(C)||!De(T))return null;var O;switch(h){case"start":O=R0("calc(".concat(s,")"));break;case"middle":O=R0("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:O=R0("calc(".concat(g.length-1," * -").concat(o,")"));break}var N=[],M=g[0];if(f&&M!=null){var R=M.width,{width:L}=m;N.push("scale(".concat(je(L)&&je(R)?L/R:1,")"))}return E&&N.push("rotate(".concat(E,", ").concat(C,", ").concat(T,")")),N.length&&(j.transform=N.join(" ")),k.createElement("text",vS({},ur(j),{ref:r,x:C,y:T,className:et("recharts-text",w),textAnchor:d,fill:c.includes("url")?AB:c}),g.map((D,q)=>{var z=D.words.join(x?"":" ");return k.createElement("tspan",{x:C,dy:q===0?O:o,key:"".concat(z,"-").concat(q)},z)}))});jk.displayName="Text";function cM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Vn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cM(Object(n),!0).forEach(function(a){ype(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ype(e,r,n){return(r=bpe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bpe(e){var r=xpe(e,"string");return typeof r=="symbol"?r:r+""}function xpe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var _pe=e=>{var{viewBox:r,position:n,offset:a=0,parentViewBox:i}=e,{x:o,y:s,height:c,upperWidth:f,lowerWidth:d}=HE(r),h=o,m=o+(f-d)/2,g=(h+m)/2,y=(f+d)/2,_=h+f/2,E=c>=0?1:-1,w=E*a,x=E>0?"end":"start",j=E>0?"start":"end",C=f>=0?1:-1,T=C*a,O=C>0?"end":"start",N=C>0?"start":"end",M=i;if(n==="top"){var R={x:h+f/2,y:s-w,horizontalAnchor:"middle",verticalAnchor:x};return M&&(R.height=Math.max(s-M.y,0),R.width=f),R}if(n==="bottom"){var L={x:m+d/2,y:s+c+w,horizontalAnchor:"middle",verticalAnchor:j};return M&&(L.height=Math.max(M.y+M.height-(s+c),0),L.width=d),L}if(n==="left"){var D={x:g-T,y:s+c/2,horizontalAnchor:O,verticalAnchor:"middle"};return M&&(D.width=Math.max(D.x-M.x,0),D.height=c),D}if(n==="right"){var q={x:g+y+T,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"};return M&&(q.width=Math.max(M.x+M.width-q.x,0),q.height=c),q}var z=M?{width:y,height:c}:{};return n==="insideLeft"?Vn({x:g+T,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"},z):n==="insideRight"?Vn({x:g+y-T,y:s+c/2,horizontalAnchor:O,verticalAnchor:"middle"},z):n==="insideTop"?Vn({x:h+f/2,y:s+w,horizontalAnchor:"middle",verticalAnchor:j},z):n==="insideBottom"?Vn({x:m+d/2,y:s+c-w,horizontalAnchor:"middle",verticalAnchor:x},z):n==="insideTopLeft"?Vn({x:h+T,y:s+w,horizontalAnchor:N,verticalAnchor:j},z):n==="insideTopRight"?Vn({x:h+f-T,y:s+w,horizontalAnchor:O,verticalAnchor:j},z):n==="insideBottomLeft"?Vn({x:m+T,y:s+c-w,horizontalAnchor:N,verticalAnchor:x},z):n==="insideBottomRight"?Vn({x:m+d-T,y:s+c-w,horizontalAnchor:O,verticalAnchor:x},z):n&&typeof n=="object"&&(je(n.x)||Do(n.x))&&(je(n.y)||Do(n.y))?Vn({x:o+Ui(n.x,y),y:s+Ui(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},z):Vn({x:_,y:s+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},wpe=["labelRef"],Spe=["content"];function fM(e,r){if(e==null)return{};var n,a,i=Epe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Epe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function dM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Vu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?dM(Object(n),!0).forEach(function(a){kpe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function kpe(e,r,n){return(r=Ape(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ape(e){var r=jpe(e,"string");return typeof r=="symbol"?r:r+""}function jpe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function za(){return za=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},za.apply(null,arguments)}var jB=k.createContext(null),CB=e=>{var{x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:s,children:c}=e,f=k.useMemo(()=>({x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:s}),[r,n,a,i,o,s]);return k.createElement(jB.Provider,{value:f},c)},OB=()=>{var e=k.useContext(jB),r=Lc();return e||(r?HE(r):void 0)},Cpe=k.createContext(null),Ope=()=>{var e=k.useContext(Cpe),r=Ce(n7);return e||r},Tpe=e=>{var{value:r,formatter:n}=e,a=$t(e.children)?r:e.children;return typeof n=="function"?n(a):a},Ck=e=>e!=null&&typeof e=="function",Npe=(e,r)=>{var n=mn(r-e),a=Math.min(Math.abs(r-e),360);return n*a},Mpe=(e,r,n,a,i)=>{var{offset:o,className:s}=e,{cx:c,cy:f,innerRadius:d,outerRadius:h,startAngle:m,endAngle:g,clockWise:y}=i,_=(d+h)/2,E=Npe(m,g),w=E>=0?1:-1,x,j;switch(r){case"insideStart":x=m+w*o,j=y;break;case"insideEnd":x=g-w*o,j=!y;break;case"end":x=g+w*o,j=y;break;default:throw new Error("Unsupported position ".concat(r))}j=E<=0?j:!j;var C=Jt(c,f,_,x),T=Jt(c,f,_,x+(j?1:-1)*359),O="M".concat(C.x,",").concat(C.y,`
|
|
172
|
+
A`).concat(_,",").concat(_,",0,1,").concat(j?0:1,`,
|
|
173
|
+
`).concat(T.x,",").concat(T.y),N=$t(e.id)?lc("recharts-radial-line-"):e.id;return k.createElement("text",za({},a,{dominantBaseline:"central",className:et("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:N,d:O})),k.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Ppe=(e,r,n)=>{var{cx:a,cy:i,innerRadius:o,outerRadius:s,startAngle:c,endAngle:f}=e,d=(c+f)/2;if(n==="outside"){var{x:h,y:m}=Jt(a,i,s+r,d);return{x:h,y:m,textAnchor:h>=a?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(o+s)/2,{x:y,y:_}=Jt(a,i,g,d);return{x:y,y:_,textAnchor:"middle",verticalAnchor:"middle"}},th=e=>e!=null&&"cx"in e&&je(e.cx),Rpe={angle:0,offset:5,zIndex:sr.label,position:"middle",textBreakAll:!1};function Dpe(e){if(!th(e))return e;var{cx:r,cy:n,outerRadius:a}=e,i=a*2;return{x:r-a,y:n-a,width:i,upperWidth:i,lowerWidth:i,height:i}}function zi(e){var r=gr(e,Rpe),{viewBox:n,parentViewBox:a,position:i,value:o,children:s,content:c,className:f="",textBreakAll:d,labelRef:h}=r,m=Ope(),g=OB(),y=i==="center"?g:m??g,_,E,w;n==null?_=y:th(n)?_=n:_=HE(n);var x=Dpe(_);if(!_||$t(o)&&$t(s)&&!k.isValidElement(c)&&typeof c!="function")return null;var j=Vu(Vu({},r),{},{viewBox:_});if(k.isValidElement(c)){var{labelRef:C}=j,T=fM(j,wpe);return k.cloneElement(c,T)}if(typeof c=="function"){var{content:O}=j,N=fM(j,Spe);if(E=k.createElement(c,N),k.isValidElement(E))return E}else E=Tpe(r);var M=ur(r);if(th(_)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Mpe(r,i,E,M,_);w=Ppe(_,r.offset,r.position)}else{if(!x)return null;var R=_pe({viewBox:x,position:i,offset:r.offset,parentViewBox:th(a)?void 0:a});w=Vu(Vu({x:R.x,y:R.y,textAnchor:R.horizontalAnchor,verticalAnchor:R.verticalAnchor},R.width!==void 0?{width:R.width}:{}),R.height!==void 0?{height:R.height}:{})}return k.createElement(da,{zIndex:r.zIndex},k.createElement(jk,za({ref:h,className:et("recharts-label",f)},M,w,{textAnchor:SB(M.textAnchor)?M.textAnchor:w.textAnchor,breakAll:d}),E))}zi.displayName="Label";var Lpe=(e,r,n)=>{if(!e)return null;var a={viewBox:r,labelRef:n};return e===!0?k.createElement(zi,za({key:"label-implicit"},a)):gn(e)?k.createElement(zi,za({key:"label-implicit",value:e},a)):k.isValidElement(e)?e.type===zi?k.cloneElement(e,Vu({key:"label-implicit"},a)):k.createElement(zi,za({key:"label-implicit",content:e},a)):Ck(e)?k.createElement(zi,za({key:"label-implicit",content:e},a)):e&&typeof e=="object"?k.createElement(zi,za({},e,{key:"label-implicit"},a)):null};function TB(e){var{label:r,labelRef:n}=e,a=OB();return Lpe(r,a,n)||null}var Ipe=["valueAccessor"],zpe=["dataKey","clockWise","id","textBreakAll","zIndex"];function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},lp.apply(null,arguments)}function hM(e,r){if(e==null)return{};var n,a,i=qpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Bpe=e=>{var r=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(hpe(r))return r},NB=k.createContext(void 0),$pe=NB.Provider,MB=k.createContext(void 0);MB.Provider;function Fpe(){return k.useContext(NB)}function Upe(){return k.useContext(MB)}function rh(e){var{valueAccessor:r=Bpe}=e,n=hM(e,Ipe),{dataKey:a,clockWise:i,id:o,textBreakAll:s,zIndex:c}=n,f=hM(n,zpe),d=Fpe(),h=Upe(),m=d||h;return!m||!m.length?null:k.createElement(da,{zIndex:c??sr.label},k.createElement(oa,{className:"recharts-label-list"},m.map((g,y)=>{var _,E=$t(a)?r(g,y):er(g.payload,a),w=$t(o)?{}:{id:"".concat(o,"-").concat(y)};return k.createElement(zi,lp({key:"label-".concat(y)},ur(g),f,w,{fill:(_=n.fill)!==null&&_!==void 0?_:g.fill,parentViewBox:g.parentViewBox,value:E,textBreakAll:s,viewBox:g.viewBox,index:y,zIndex:0}))})))}rh.displayName="LabelList";function Hpe(e){var{label:r}=e;return r?r===!0?k.createElement(rh,{key:"labelList-implicit"}):k.isValidElement(r)||Ck(r)?k.createElement(rh,{key:"labelList-implicit",content:r}):typeof r=="object"?k.createElement(rh,lp({key:"labelList-implicit"},r,{type:String(r.type)})):null:null}function gS(){return gS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},gS.apply(null,arguments)}var PB=e=>{var{cx:r,cy:n,r:a,className:i}=e,o=et("recharts-dot",i);return je(r)&&je(n)&&je(a)?k.createElement("circle",gS({},ia(e),RE(e),{className:o,cx:r,cy:n,r:a})):null},Gpe={radiusAxis:{},angleAxis:{}},RB=cr({name:"polarAxis",initialState:Gpe,reducers:{addRadiusAxis(e,r){e.radiusAxis[r.payload.id]=r.payload},removeRadiusAxis(e,r){delete e.radiusAxis[r.payload.id]},addAngleAxis(e,r){e.angleAxis[r.payload.id]=r.payload},removeAngleAxis(e,r){delete e.angleAxis[r.payload.id]}}}),{addRadiusAxis:T_e,removeRadiusAxis:N_e,addAngleAxis:M_e,removeAngleAxis:P_e}=RB.actions,Vpe=RB.reducer;function Kpe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var D0={exports:{}},Je={};/** @license React v17.0.2
|
|
174
|
+
* react-is.production.min.js
|
|
175
|
+
*
|
|
176
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the MIT license found in the
|
|
179
|
+
* LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/var pM;function Ype(){if(pM)return Je;pM=1;var e=60103,r=60106,n=60107,a=60108,i=60114,o=60109,s=60110,c=60112,f=60113,d=60120,h=60115,m=60116,g=60121,y=60122,_=60117,E=60129,w=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),r=x("react.portal"),n=x("react.fragment"),a=x("react.strict_mode"),i=x("react.profiler"),o=x("react.provider"),s=x("react.context"),c=x("react.forward_ref"),f=x("react.suspense"),d=x("react.suspense_list"),h=x("react.memo"),m=x("react.lazy"),g=x("react.block"),y=x("react.server.block"),_=x("react.fundamental"),E=x("react.debug_trace_mode"),w=x("react.legacy_hidden")}function j(H){if(typeof H=="object"&&H!==null){var F=H.$$typeof;switch(F){case e:switch(H=H.type,H){case n:case i:case a:case f:case d:return H;default:switch(H=H&&H.$$typeof,H){case s:case c:case m:case h:case o:return H;default:return F}}case r:return F}}}var C=o,T=e,O=c,N=n,M=m,R=h,L=r,D=i,q=a,z=f;return Je.ContextConsumer=s,Je.ContextProvider=C,Je.Element=T,Je.ForwardRef=O,Je.Fragment=N,Je.Lazy=M,Je.Memo=R,Je.Portal=L,Je.Profiler=D,Je.StrictMode=q,Je.Suspense=z,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(H){return j(H)===s},Je.isContextProvider=function(H){return j(H)===o},Je.isElement=function(H){return typeof H=="object"&&H!==null&&H.$$typeof===e},Je.isForwardRef=function(H){return j(H)===c},Je.isFragment=function(H){return j(H)===n},Je.isLazy=function(H){return j(H)===m},Je.isMemo=function(H){return j(H)===h},Je.isPortal=function(H){return j(H)===r},Je.isProfiler=function(H){return j(H)===i},Je.isStrictMode=function(H){return j(H)===a},Je.isSuspense=function(H){return j(H)===f},Je.isValidElementType=function(H){return typeof H=="string"||typeof H=="function"||H===n||H===i||H===E||H===a||H===f||H===d||H===w||typeof H=="object"&&H!==null&&(H.$$typeof===m||H.$$typeof===h||H.$$typeof===o||H.$$typeof===s||H.$$typeof===c||H.$$typeof===_||H.$$typeof===g||H[0]===y)},Je.typeOf=j,Je}var mM;function Xpe(){return mM||(mM=1,D0.exports=Ype()),D0.exports}Xpe();var DB=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,L0={},vM;function Wpe(){return vM||(vM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${o}]`}let a=n;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(n)===a}e.isPlainObject=r})(L0)),L0}var I0,gM;function Zpe(){return gM||(gM=1,I0=Wpe().isPlainObject),I0}var Qpe=Zpe();const Jpe=Dn(Qpe);var yM,bM,xM,_M,wM;function SM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function EM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?SM(Object(n),!0).forEach(function(a){eme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function eme(e,r,n){return(r=tme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tme(e){var r=rme(e,"string");return typeof r=="symbol"?r:r+""}function rme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function sp(){return sp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},sp.apply(null,arguments)}function Lu(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var kM=(e,r,n,a,i)=>{var o=n-a,s;return s=xt(yM||(yM=Lu(["M ",",",""])),e,r),s+=xt(bM||(bM=Lu(["L ",",",""])),e+n,r),s+=xt(xM||(xM=Lu(["L ",",",""])),e+n-o/2,r+i),s+=xt(_M||(_M=Lu(["L ",",",""])),e+n-o/2-a,r+i),s+=xt(wM||(wM=Lu(["L ",","," Z"])),e,r),s},nme={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ame=e=>{var r=gr(e,nme),{x:n,y:a,upperWidth:i,lowerWidth:o,height:s,className:c}=r,{animationEasing:f,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=r,g=k.useRef(null),[y,_]=k.useState(-1),E=k.useRef(i),w=k.useRef(o),x=k.useRef(s),j=k.useRef(n),C=k.useRef(a),T=YE(e,"trapezoid-");if(k.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var F=g.current.getTotalLength();F&&_(F)}catch{}},[]),n!==+n||a!==+a||i!==+i||o!==+o||s!==+s||i===0&&o===0||s===0)return null;var O=et("recharts-trapezoid",c);if(!m)return k.createElement("g",null,k.createElement("path",sp({},ur(r),{className:O,d:kM(n,a,i,o,s)})));var N=E.current,M=w.current,R=x.current,L=j.current,D=C.current,q="0px ".concat(y===-1?1:y,"px"),z="".concat(y,"px ").concat(y,"px"),H=Nq(["strokeDasharray"],d,f);return k.createElement(KE,{animationId:T,key:T,canBegin:y>0,duration:d,easing:f,isActive:m,begin:h},F=>{var X=Cr(N,i,F),B=Cr(M,o,F),Q=Cr(R,s,F),te=Cr(L,n,F),K=Cr(D,a,F);g.current&&(E.current=X,w.current=B,x.current=Q,j.current=te,C.current=K);var de=F>0?{transition:H,strokeDasharray:z}:{strokeDasharray:q};return k.createElement("path",sp({},ur(r),{className:O,d:kM(te,K,X,B,Q),ref:g,style:EM(EM({},de),r.style)}))})},ime=["option","shapeType","activeClassName","inActiveClassName"];function ome(e,r){if(e==null)return{};var n,a,i=lme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function AM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function up(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AM(Object(n),!0).forEach(function(a){sme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function sme(e,r,n){return(r=ume(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ume(e){var r=cme(e,"string");return typeof r=="symbol"?r:r+""}function cme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fme(e,r){return up(up({},r),e)}function dme(e,r){return e==="symbols"}function jM(e){var{shapeType:r,elementProps:n}=e;switch(r){case"rectangle":return k.createElement(Dq,n);case"trapezoid":return k.createElement(ame,n);case"sector":return k.createElement(zq,n);case"symbols":if(dme(r))return k.createElement(gz,n);break;case"curve":return k.createElement(Tq,n);default:return null}}function hme(e){return k.isValidElement(e)?e.props:e}function pme(e){var{option:r,shapeType:n,activeClassName:a="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=ome(e,ime),s;if(k.isValidElement(r))s=k.cloneElement(r,up(up({},o),hme(r)));else if(typeof r=="function")s=r(o,o.index);else if(Jpe(r)&&typeof r!="boolean"){var c=fme(r,o);s=k.createElement(jM,{shapeType:n,elementProps:c})}else{var f=o;s=k.createElement(jM,{shapeType:n,elementProps:f})}return o.isActive?k.createElement(oa,{className:a},s):k.createElement(oa,{className:i},s)}function mme(e){var{tooltipEntrySettings:r}=e,n=Et(),a=yr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(kfe(r)):i.current!==r&&n(Afe({prev:i.current,next:r})),i.current=r)},[r,n,a]),k.useLayoutEffect(()=>()=>{i.current&&(n(jfe(i.current)),i.current=null)},[n]),null}function vme(e){var{legendPayload:r}=e,n=Et(),a=yr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(ase(r)):i.current!==r&&n(ise({prev:i.current,next:r})),i.current=r)},[n,a,r]),k.useLayoutEffect(()=>()=>{i.current&&(n(ose(i.current)),i.current=null)},[n]),null}var z0,gme=()=>{var[e]=k.useState(()=>lc("uid-"));return e},yme=(z0=qH.useId)!==null&&z0!==void 0?z0:gme;function bme(e,r){var n=yme();return r||(e?"".concat(e,"-").concat(n):n)}var xme=k.createContext(void 0),_me=e=>{var{id:r,type:n,children:a}=e,i=bme("recharts-".concat(n),r);return k.createElement(xme.Provider,{value:i},a(i))},wme={cartesianItems:[],polarItems:[]},LB=cr({name:"graphicalItems",initialState:wme,reducers:{addCartesianGraphicalItem:{reducer(e,r){e.cartesianItems.push(r.payload)},prepare:st()},replaceCartesianGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=a)},prepare:st()},removeCartesianGraphicalItem:{reducer(e,r){var n=vn(e).cartesianItems.indexOf(r.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:st()},addPolarGraphicalItem:{reducer(e,r){e.polarItems.push(r.payload)},prepare:st()},removePolarGraphicalItem:{reducer(e,r){var n=vn(e).polarItems.indexOf(r.payload);n>-1&&e.polarItems.splice(n,1)},prepare:st()},replacePolarGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=vn(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=a)},prepare:st()}}}),{addCartesianGraphicalItem:Sme,replaceCartesianGraphicalItem:Eme,removeCartesianGraphicalItem:kme,addPolarGraphicalItem:R_e,removePolarGraphicalItem:D_e,replacePolarGraphicalItem:L_e}=LB.actions,Ame=LB.reducer,jme=e=>{var r=Et(),n=k.useRef(null);return k.useLayoutEffect(()=>{n.current===null?r(Sme(e)):n.current!==e&&r(Eme({prev:n.current,next:e})),n.current=e},[r,e]),k.useLayoutEffect(()=>()=>{n.current&&(r(kme(n.current)),n.current=null)},[r]),null},Cme=k.memo(jme),Ome=["points"];function CM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function q0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?CM(Object(n),!0).forEach(function(a){Tme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Tme(e,r,n){return(r=Nme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Nme(e){var r=Mme(e,"string");return typeof r=="symbol"?r:r+""}function Mme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},cp.apply(null,arguments)}function Pme(e,r){if(e==null)return{};var n,a,i=Rme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Dme(e){var{option:r,dotProps:n,className:a}=e;if(k.isValidElement(r))return k.cloneElement(r,n);if(typeof r=="function")return r(n);var i=et(a,typeof r!="boolean"?r.className:""),o=n??{},{points:s}=o,c=Pme(o,Ome);return k.createElement(PB,cp({},c,{className:i}))}function Lme(e,r){return e==null?!1:r?!0:e.length===1}function Ime(e){var{points:r,dot:n,className:a,dotClassName:i,dataKey:o,baseProps:s,needClip:c,clipPathId:f,zIndex:d=sr.scatter}=e;if(!Lme(r,n))return null;var h=DB(n),m=Wne(n),g=r.map((_,E)=>{var w,x,j=q0(q0(q0({r:3},s),m),{},{index:E,cx:(w=_.x)!==null&&w!==void 0?w:void 0,cy:(x=_.y)!==null&&x!==void 0?x:void 0,dataKey:o,value:_.value,payload:_.payload,points:r});return k.createElement(Dme,{key:"dot-".concat(E),option:n,dotProps:j,className:i})}),y={};return c&&f!=null&&(y.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(f,")")),k.createElement(da,{zIndex:d},k.createElement(oa,cp({className:a},y),g))}function OM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function TM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OM(Object(n),!0).forEach(function(a){zme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function zme(e,r,n){return(r=qme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qme(e){var r=Bme(e,"string");return typeof r=="symbol"?r:r+""}function Bme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var $me={xAxis:{},yAxis:{},zAxis:{}},IB=cr({name:"cartesianAxis",initialState:$me,reducers:{addXAxis:{reducer(e,r){e.xAxis[r.payload.id]=r.payload},prepare:st()},replaceXAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:st()},removeXAxis:{reducer(e,r){delete e.xAxis[r.payload.id]},prepare:st()},addYAxis:{reducer(e,r){e.yAxis[r.payload.id]=r.payload},prepare:st()},replaceYAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:st()},removeYAxis:{reducer(e,r){delete e.yAxis[r.payload.id]},prepare:st()},addZAxis:{reducer(e,r){e.zAxis[r.payload.id]=r.payload},prepare:st()},replaceZAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:st()},removeZAxis:{reducer(e,r){delete e.zAxis[r.payload.id]},prepare:st()},updateYAxisWidth(e,r){var{id:n,width:a}=r.payload,i=e.yAxis[n];if(i){var o,s=i.widthHistory||[];if(s.length===3&&s[0]===s[2]&&a===s[1]&&a!==i.width&&Math.abs(a-((o=s[0])!==null&&o!==void 0?o:0))<=1)return;var c=[...s,a].slice(-3);e.yAxis[n]=TM(TM({},i),{},{width:a,widthHistory:c})}}}}),{addXAxis:Fme,replaceXAxis:Ume,removeXAxis:Hme,addYAxis:Gme,replaceYAxis:Vme,removeYAxis:Kme,addZAxis:I_e,replaceZAxis:z_e,removeZAxis:q_e,updateYAxisWidth:Yme}=IB.actions,Xme=IB.reducer,Wme=ue([rr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Zme=ue([Wme,ri,ni],(e,r,n)=>{if(!(!e||r==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,r-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Ok=()=>Ce(Zme),Qme=()=>Ce(kde);function NM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?NM(Object(n),!0).forEach(function(a){Jme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Jme(e,r,n){return(r=eve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function eve(e){var r=tve(e,"string");return typeof r=="symbol"?r:r+""}function tve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var rve=e=>{var{point:r,childIndex:n,mainColor:a,activeDot:i,dataKey:o,clipPath:s}=e;if(i===!1||r.x==null||r.y==null)return null;var c={index:n,dataKey:o,cx:r.x,cy:r.y,r:4,fill:a??"none",strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},f=B0(B0(B0({},c),Pp(i)),RE(i)),d;return k.isValidElement(i)?d=k.cloneElement(i,f):typeof i=="function"?d=i(f):d=k.createElement(PB,f),k.createElement(oa,{className:"recharts-active-dot",clipPath:s},d)};function nve(e){var{points:r,mainColor:n,activeDot:a,itemDataKey:i,clipPath:o,zIndex:s=sr.activeDot}=e,c=Ce(vc),f=Qme();if(r==null||f==null)return null;var d=r.find(h=>f.includes(h.payload));return $t(d)?null:k.createElement(da,{zIndex:s},k.createElement(rve,{point:d,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:a,clipPath:o}))}var ave=e=>{var{chartData:r}=e,n=Et(),a=yr();return k.useEffect(()=>a?()=>{}:(n(X3(r)),()=>{n(X3(void 0))}),[r,n,a]),null},MM={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},zB=cr({name:"brush",initialState:MM,reducers:{setBrushSettings(e,r){return r.payload==null?MM:r.payload}}}),{setBrushSettings:B_e}=zB.actions,ive=zB.reducer,ove=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},lve=e=>{var{x1:r,y1:n,x2:a,y2:i}=e;return ove({x:r,y:n},{x:a,y:i})};function sve(e){return(e%180+180)%180}var uve=function(r){var{width:n,height:a}=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=sve(i),s=o*Math.PI/180,c=Math.atan(a/n),f=s>c&&s<Math.PI-c?a/Math.sin(s):n/Math.cos(s);return Math.abs(f)},cve={dots:[],areas:[],lines:[]},qB=cr({name:"referenceElements",initialState:cve,reducers:{addDot:(e,r)=>{e.dots.push(r.payload)},removeDot:(e,r)=>{var n=vn(e).dots.findIndex(a=>a===r.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,r)=>{e.areas.push(r.payload)},removeArea:(e,r)=>{var n=vn(e).areas.findIndex(a=>a===r.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,r)=>{e.lines.push(r.payload)},removeLine:(e,r)=>{var n=vn(e).lines.findIndex(a=>a===r.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:$_e,removeDot:F_e,addArea:U_e,removeArea:H_e,addLine:fve,removeLine:dve}=qB.actions,hve=qB.reducer,BB=k.createContext(void 0),pve=e=>{var{children:r}=e,[n]=k.useState("".concat(lc("recharts"),"-clip")),a=Ok();if(a==null)return null;var{x:i,y:o,width:s,height:c}=a;return k.createElement(BB.Provider,{value:n},k.createElement("defs",null,k.createElement("clipPath",{id:n},k.createElement("rect",{x:i,y:o,height:c,width:s}))),r)},mve=()=>k.useContext(BB);class vve{constructor(r){var{x:n,y:a}=r;this.xAxisScale=n,this.yAxisScale=a}map(r,n){var a,i,{position:o}=n;return{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:0,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:0}}mapWithFallback(r,n){var a,i,{position:o,fallback:s}=n,c,f;return s==="rangeMin"?c=this.yAxisScale.rangeMin():s==="rangeMax"?c=this.yAxisScale.rangeMax():c=0,s==="rangeMin"?f=this.xAxisScale.rangeMin():s==="rangeMax"?f=this.xAxisScale.rangeMax():f=0,{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:f,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:c}}isInRange(r){var{x:n,y:a}=r,i=n==null||this.xAxisScale.isInRange(n),o=a==null||this.yAxisScale.isInRange(a);return i&&o}}function PM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function RM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PM(Object(n),!0).forEach(function(a){gve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function gve(e,r,n){return(r=yve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function yve(e){var r=bve(e,"string");return typeof r=="symbol"?r:r+""}function bve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function fp(){return fp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},fp.apply(null,arguments)}var xve=(e,r)=>{var n;if(k.isValidElement(e))n=k.cloneElement(e,r);else if(typeof e=="function")n=e(r);else{if(!De(r.x1)||!De(r.y1)||!De(r.x2)||!De(r.y2))return null;n=k.createElement("line",fp({},r,{className:"recharts-reference-line-line"}))}return n},_ve=(e,r,n,a,i,o)=>{var{x:s,width:c}=o,f=i.map(e,{position:n});if(!De(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:s+c,y:f},{x:s,y:f}];return a==="left"?d.reverse():d},wve=(e,r,n,a,i,o)=>{var{y:s,height:c}=o,f=i.map(e,{position:n});if(!De(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:f,y:s+c},{x:f,y:s}];return a==="top"?d.reverse():d},Sve=(e,r,n,a)=>{var i=[a.mapWithFallback(e[0],{position:n,fallback:"rangeMin"}),a.mapWithFallback(e[1],{position:n,fallback:"rangeMax"})];return r==="discard"&&i.some(o=>!a.isInRange(o))?null:i},Eve=(e,r,n,a,i,o,s)=>{var{x:c,y:f,segment:d,ifOverflow:h}=s,m=gn(c),g=gn(f);return g?_ve(f,h,a,o,r,n):m?wve(c,h,a,i,e,n):d!=null&&d.length===2?Sve(d,h,a,new vve({x:e,y:r})):null};function kve(e){var r=Et();return k.useEffect(()=>(r(fve(e)),()=>{r(dve(e))})),null}function Ave(e){var{xAxisId:r,yAxisId:n,shape:a,className:i,ifOverflow:o}=e,s=yr(),c=mve(),f=Ce(M=>ca(M,r)),d=Ce(M=>fa(M,n)),h=Ce(M=>as(M,"xAxis",r,s)),m=Ce(M=>as(M,"yAxis",n,s)),g=Lc();if(!c||!g||f==null||d==null||h==null||m==null)return null;var y=Eve(h,m,g,e.position,f.orientation,d.orientation,e);if(!y)return null;var _=y[0],E=y[1];if(_==null||E==null)return null;var{x:w,y:x}=_,{x:j,y:C}=E,T=o==="hidden"?"url(#".concat(c,")"):void 0,O=RM(RM({clipPath:T},ur(e)),{},{x1:w,y1:x,x2:j,y2:C}),N=lve({x1:w,y1:x,x2:j,y2:C});return k.createElement(da,{zIndex:e.zIndex},k.createElement(oa,{className:et("recharts-reference-line",i)},xve(a,O),k.createElement(CB,fp({},N,{lowerWidth:N.width,upperWidth:N.width}),k.createElement(TB,{label:e.label}),e.children)))}var jve={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:sr.line};function yS(e){var r=gr(e,jve);return k.createElement(k.Fragment,null,k.createElement(kve,{yAxisId:r.yAxisId,xAxisId:r.xAxisId,ifOverflow:r.ifOverflow,x:r.x,y:r.y,segment:r.segment}),k.createElement(Ave,r))}yS.displayName="ReferenceLine";function $B(e,r){if(r<1)return[];if(r===1)return e;for(var n=[],a=0;a<e.length;a+=r){var i=e[a];i!==void 0&&n.push(i)}return n}function Cve(e,r,n){var a={width:e.width+r.width,height:e.height+r.height};return uve(a,n)}function Ove(e,r,n){var a=n==="width",{x:i,y:o,width:s,height:c}=e;return r===1?{start:a?i:o,end:a?i+s:o+c}:{start:a?i+s:o+c,end:a?i:o}}function yc(e,r,n,a,i){if(e*r<e*a||e*r>e*i)return!1;var o=n();return e*(r-e*o/2-a)>=0&&e*(r+e*o/2-i)<=0}function Tve(e,r){return $B(e,r+1)}function Nve(e,r,n,a,i){for(var o=(a||[]).slice(),{start:s,end:c}=r,f=0,d=1,h=s,m=function(){var _=a==null?void 0:a[f];if(_===void 0)return{v:$B(a,d)};var E=f,w,x=()=>(w===void 0&&(w=n(_,E)),w),j=_.coordinate,C=f===0||yc(e,j,x,h,c);C||(f=0,h=s,d+=1),C&&(h=j+e*(x()/2+i),f+=d)},g;d<=o.length;)if(g=m(),g)return g.v;return[]}function Mve(e,r,n,a,i){var o=(a||[]).slice(),s=o.length;if(s===0)return[];for(var{start:c,end:f}=r,d=1;d<=s;d++){for(var h=(s-1)%d,m=c,g=!0,y=function(){var T=a[E];if(T==null)return 0;var O=E,N,M=()=>(N===void 0&&(N=n(T,O)),N),R=T.coordinate,L=E===h||yc(e,R,M,m,f);if(!L)return g=!1,1;L&&(m=R+e*(M()/2+i))},_,E=h;E<s&&(_=y(),!(_!==0&&_===1));E+=d);if(g){for(var w=[],x=h;x<s;x+=d){var j=a[x];j!=null&&w.push(j)}return w}}return[]}function DM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function or(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?DM(Object(n),!0).forEach(function(a){Pve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Pve(e,r,n){return(r=Rve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Rve(e){var r=Dve(e,"string");return typeof r=="symbol"?r:r+""}function Dve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Lve(e,r,n,a,i){for(var o=(a||[]).slice(),s=o.length,{start:c}=r,{end:f}=r,d=function(g){var y=o[g];if(y==null)return 1;var _=y,E,w=()=>(E===void 0&&(E=n(y,g)),E);if(g===s-1){var x=e*(_.coordinate+e*w()/2-f);o[g]=_=or(or({},_),{},{tickCoord:x>0?_.coordinate-x*e:_.coordinate})}else o[g]=_=or(or({},_),{},{tickCoord:_.coordinate});if(_.tickCoord!=null){var j=yc(e,_.tickCoord,w,c,f);j&&(f=_.tickCoord-e*(w()/2+i),o[g]=or(or({},_),{},{isShow:!0}))}},h=s-1;h>=0;h--)d(h);return o}function Ive(e,r,n,a,i,o){var s=(a||[]).slice(),c=s.length,{start:f,end:d}=r;if(o){var h=a[c-1];if(h!=null){var m=n(h,c-1),g=e*(h.coordinate+e*m/2-d);if(s[c-1]=h=or(or({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var y=yc(e,h.tickCoord,()=>m,f,d);y&&(d=h.tickCoord-e*(m/2+i),s[c-1]=or(or({},h),{},{isShow:!0}))}}}for(var _=o?c-1:c,E=function(j){var C=s[j];if(C==null)return 1;var T=C,O,N=()=>(O===void 0&&(O=n(C,j)),O);if(j===0){var M=e*(T.coordinate-e*N()/2-f);s[j]=T=or(or({},T),{},{tickCoord:M<0?T.coordinate-M*e:T.coordinate})}else s[j]=T=or(or({},T),{},{tickCoord:T.coordinate});if(T.tickCoord!=null){var R=yc(e,T.tickCoord,N,f,d);R&&(f=T.tickCoord+e*(N()/2+i),s[j]=or(or({},T),{},{isShow:!0}))}},w=0;w<_;w++)E(w);return s}function Tk(e,r,n){var{tick:a,ticks:i,viewBox:o,minTickGap:s,orientation:c,interval:f,tickFormatter:d,unit:h,angle:m}=e;if(!i||!i.length||!a)return[];if(je(f)||qc.isSsr){var g;return(g=Tve(i,je(f)?f:0))!==null&&g!==void 0?g:[]}var y=[],_=c==="top"||c==="bottom"?"width":"height",E=h&&_==="width"?Ju(h,{fontSize:r,letterSpacing:n}):{width:0,height:0},w=(O,N)=>{var M=typeof d=="function"?d(O.value,N):O.value;return _==="width"?Cve(Ju(M,{fontSize:r,letterSpacing:n}),E,m):Ju(M,{fontSize:r,letterSpacing:n})[_]},x=i[0],j=i[1],C=i.length>=2&&x!=null&&j!=null?mn(j.coordinate-x.coordinate):1,T=Ove(o,C,_);return f==="equidistantPreserveStart"?Nve(C,T,w,i,s):f==="equidistantPreserveEnd"?Mve(C,T,w,i,s):(f==="preserveStart"||f==="preserveStartEnd"?y=Ive(C,T,w,i,s,f==="preserveStartEnd"):y=Lve(C,T,w,i,s),y.filter(O=>O.isShow))}var zve=e=>{var{ticks:r,label:n,labelGapWithTick:a=5,tickSize:i=0,tickMargin:o=0}=e,s=0;if(r){Array.from(r).forEach(h=>{if(h){var m=h.getBoundingClientRect();m.width>s&&(s=m.width)}});var c=n?n.getBoundingClientRect().width:0,f=i+o,d=s+f+c+(n?a:0);return Math.round(d)}return 0},qve={xAxis:{},yAxis:{}},FB=cr({name:"renderedTicks",initialState:qve,reducers:{setRenderedTicks:(e,r)=>{var{axisType:n,axisId:a,ticks:i}=r.payload;e[n][a]=i},removeRenderedTicks:(e,r)=>{var{axisType:n,axisId:a}=r.payload;delete e[n][a]}}}),{setRenderedTicks:Bve,removeRenderedTicks:$ve}=FB.actions,Fve=FB.reducer,Uve=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Hve(e,r){if(e==null)return{};var n,a,i=Gve(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gve(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Bo.apply(null,arguments)}function LM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function bt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LM(Object(n),!0).forEach(function(a){Vve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Vve(e,r,n){return(r=Kve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Kve(e){var r=Yve(e,"string");return typeof r=="symbol"?r:r+""}function Yve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Ha={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:sr.axis};function Xve(e){var{x:r,y:n,width:a,height:i,orientation:o,mirror:s,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var d=bt(bt(bt({},f),ia(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var h=+(o==="top"&&!s||o==="bottom"&&s);d=bt(bt({},d),{},{x1:r,y1:n+h*i,x2:r+a,y2:n+h*i})}else{var m=+(o==="left"&&!s||o==="right"&&s);d=bt(bt({},d),{},{x1:r+m*a,y1:n,x2:r+m*a,y2:n+i})}return k.createElement("line",Bo({},d,{className:et("recharts-cartesian-axis-line",Ip(c,"className"))}))}function Wve(e,r,n,a,i,o,s,c,f){var d,h,m,g,y,_,E=c?-1:1,w=e.tickSize||s,x=je(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":d=h=e.coordinate,g=n+ +!c*i,m=g-E*w,_=m-E*f,y=x;break;case"left":m=g=e.coordinate,h=r+ +!c*a,d=h-E*w,y=d-E*f,_=x;break;case"right":m=g=e.coordinate,h=r+ +c*a,d=h+E*w,y=d+E*f,_=x;break;default:d=h=e.coordinate,g=n+ +c*i,m=g+E*w,_=m+E*f,y=x;break}return{line:{x1:d,y1:m,x2:h,y2:g},tick:{x:y,y:_}}}function Zve(e,r){switch(e){case"left":return r?"start":"end";case"right":return r?"end":"start";default:return"middle"}}function Qve(e,r){switch(e){case"left":case"right":return"middle";case"top":return r?"start":"end";default:return r?"end":"start"}}function Jve(e){var{option:r,tickProps:n,value:a}=e,i,o=et(n.className,"recharts-cartesian-axis-tick-value");if(k.isValidElement(r))i=k.cloneElement(r,bt(bt({},n),{},{className:o}));else if(typeof r=="function")i=r(bt(bt({},n),{},{className:o}));else{var s="recharts-cartesian-axis-tick-value";typeof r!="boolean"&&(s=et(s,Kpe(r))),i=k.createElement(jk,Bo({},n,{className:s}),a)}return i}function ege(e){var{ticks:r,axisType:n,axisId:a}=e,i=Et();return k.useEffect(()=>{if(a==null||n==null)return Uo;var o=r.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(Bve({ticks:o,axisId:a,axisType:n})),()=>{i($ve({axisId:a,axisType:n}))}},[i,r,a,n]),null}var tge=k.forwardRef((e,r)=>{var{ticks:n=[],tick:a,tickLine:i,stroke:o,tickFormatter:s,unit:c,padding:f,tickTextProps:d,orientation:h,mirror:m,x:g,y,width:_,height:E,tickSize:w,tickMargin:x,fontSize:j,letterSpacing:C,getTicksConfig:T,events:O,axisType:N,axisId:M}=e,R=Tk(bt(bt({},T),{},{ticks:n}),j,C),L=ia(T),D=Pp(a),q=SB(L.textAnchor)?L.textAnchor:Zve(h,m),z=Qve(h,m),H={};typeof i=="object"&&(H=i);var F=bt(bt({},L),{},{fill:"none"},H),X=R.map(te=>bt({entry:te},Wve(te,g,y,_,E,h,w,m,x))),B=X.map(te=>{var{entry:K,line:de}=te;return k.createElement(oa,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},i&&k.createElement("line",Bo({},F,de,{className:et("recharts-cartesian-axis-tick-line",Ip(i,"className"))})))}),Q=X.map((te,K)=>{var de,U,{entry:J,tick:le}=te,$=bt(bt(bt(bt({verticalAnchor:z},L),{},{textAnchor:q,stroke:"none",fill:o},le),{},{index:K,payload:J,visibleTicksCount:R.length,tickFormatter:s,padding:f},d),{},{angle:(de=(U=d==null?void 0:d.angle)!==null&&U!==void 0?U:L.angle)!==null&&de!==void 0?de:0}),Y=bt(bt({},$),D);return k.createElement(oa,Bo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(J.value,"-").concat(J.coordinate,"-").concat(J.tickCoord)},eie(O,J,K)),a&&k.createElement(Jve,{option:a,tickProps:Y,value:"".concat(typeof s=="function"?s(J.value,K):J.value).concat(c||"")}))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},k.createElement(ege,{ticks:R,axisId:M,axisType:N}),Q.length>0&&k.createElement(da,{zIndex:sr.label},k.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:r},Q)),B.length>0&&k.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},B))}),rge=k.forwardRef((e,r)=>{var{axisLine:n,width:a,height:i,className:o,hide:s,ticks:c,axisType:f,axisId:d}=e,h=Hve(e,Uve),[m,g]=k.useState(""),[y,_]=k.useState(""),E=k.useRef(null);k.useImperativeHandle(r,()=>({getCalculatedWidth:()=>{var x;return zve({ticks:E.current,label:(x=e.labelRef)===null||x===void 0?void 0:x.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var w=k.useCallback(x=>{if(x){var j=x.getElementsByClassName("recharts-cartesian-axis-tick-value");E.current=j;var C=j[0];if(C){var T=window.getComputedStyle(C),O=T.fontSize,N=T.letterSpacing;(O!==m||N!==y)&&(g(O),_(N))}}},[m,y]);return s||a!=null&&a<=0||i!=null&&i<=0?null:k.createElement(da,{zIndex:e.zIndex},k.createElement(oa,{className:et("recharts-cartesian-axis",o)},k.createElement(Xve,{x:e.x,y:e.y,width:a,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:ia(e)}),k.createElement(tge,{ref:w,axisType:f,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:y,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),k.createElement(CB,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},k.createElement(TB,{label:e.label,labelRef:e.labelRef}),e.children)))}),Nk=k.forwardRef((e,r)=>{var n=gr(e,Ha);return k.createElement(rge,Bo({},n,{ref:r}))});Nk.displayName="CartesianAxis";var nge=["x1","y1","x2","y2","key"],age=["offset"],ige=["xAxisId","yAxisId"],oge=["xAxisId","yAxisId"];function IM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function lr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?IM(Object(n),!0).forEach(function(a){lge(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lge(e,r,n){return(r=sge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sge(e){var r=uge(e,"string");return typeof r=="symbol"?r:r+""}function uge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},jo.apply(null,arguments)}function dp(e,r){if(e==null)return{};var n,a,i=cge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var fge=e=>{var{fill:r}=e;if(!r||r==="none")return null;var{fillOpacity:n,x:a,y:i,width:o,height:s,ry:c}=e;return k.createElement("rect",{x:a,y:i,ry:c,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function UB(e){var{option:r,lineItemProps:n}=e,a;if(k.isValidElement(r))a=k.cloneElement(r,n);else if(typeof r=="function")a=r(n);else{var i,{x1:o,y1:s,x2:c,y2:f,key:d}=n,h=dp(n,nge),m=(i=ia(h))!==null&&i!==void 0?i:{},{offset:g}=m,y=dp(m,age);a=k.createElement("line",jo({},y,{x1:o,y1:s,x2:c,y2:f,fill:"none",key:d}))}return a}function dge(e){var{x:r,width:n,horizontal:a=!0,horizontalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:s}=e,c=dp(e,ige),f=i.map((d,h)=>{var m=lr(lr({},c),{},{x1:r,y1:d,x2:r+n,y2:d,key:"line-".concat(h),index:h});return k.createElement(UB,{key:"line-".concat(h),option:a,lineItemProps:m})});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function hge(e){var{y:r,height:n,vertical:a=!0,verticalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:s}=e,c=dp(e,oge),f=i.map((d,h)=>{var m=lr(lr({},c),{},{x1:d,y1:r,x2:d,y2:r+n,key:"line-".concat(h),index:h});return k.createElement(UB,{option:a,lineItemProps:m,key:"line-".concat(h)})});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function pge(e){var{horizontalFill:r,fillOpacity:n,x:a,y:i,width:o,height:s,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!r||!r.length||c==null)return null;var d=c.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],_=y==null,E=_?i+s-m:y-m;if(E<=0)return null;var w=g%r.length;return k.createElement("rect",{key:"react-".concat(g),y:m,x:a,height:E,width:o,stroke:"none",fill:r[w],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function mge(e){var{vertical:r=!0,verticalFill:n,fillOpacity:a,x:i,y:o,width:s,height:c,verticalPoints:f}=e;if(!r||!n||!n.length)return null;var d=f.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],_=y==null,E=_?i+s-m:y-m;if(E<=0)return null;var w=g%n.length;return k.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:E,height:c,stroke:"none",fill:n[w],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var vge=(e,r)=>{var{xAxis:n,width:a,height:i,offset:o}=e;return sq(Tk(lr(lr(lr({},Ha),n),{},{ticks:uq(n),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},gge=(e,r)=>{var{yAxis:n,width:a,height:i,offset:o}=e;return sq(Tk(lr(lr(lr({},Ha),n),{},{ticks:uq(n),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},yge={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:sr.grid};function HB(e){var r=gq(),n=yq(),a=vq(),i=lr(lr({},gr(e,yge)),{},{x:je(e.x)?e.x:a.left,y:je(e.y)?e.y:a.top,width:je(e.width)?e.width:a.width,height:je(e.height)?e.height:a.height}),{xAxisId:o,yAxisId:s,x:c,y:f,width:d,height:h,syncWithTicks:m,horizontalValues:g,verticalValues:y}=i,_=yr(),E=Ce(L=>L3(L,"xAxis",o,_)),w=Ce(L=>L3(L,"yAxis",s,_));if(!la(d)||!la(h)||!je(c)||!je(f))return null;var x=i.verticalCoordinatesGenerator||vge,j=i.horizontalCoordinatesGenerator||gge,{horizontalPoints:C,verticalPoints:T}=i;if((!C||!C.length)&&typeof j=="function"){var O=g&&g.length,N=j({yAxis:w?lr(lr({},w),{},{ticks:O?g:w.ticks}):void 0,width:r??d,height:n??h,offset:a},O?!0:m);Vh(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(C=N)}if((!T||!T.length)&&typeof x=="function"){var M=y&&y.length,R=x({xAxis:E?lr(lr({},E),{},{ticks:M?y:E.ticks}):void 0,width:r??d,height:n??h,offset:a},M?!0:m);Vh(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(T=R)}return k.createElement(da,{zIndex:i.zIndex},k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(fge,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),k.createElement(pge,jo({},i,{horizontalPoints:C})),k.createElement(mge,jo({},i,{verticalPoints:T})),k.createElement(dge,jo({},i,{offset:a,horizontalPoints:C,xAxis:E,yAxis:w})),k.createElement(hge,jo({},i,{offset:a,verticalPoints:T,xAxis:E,yAxis:w}))))}HB.displayName="CartesianGrid";var bge={},GB=cr({name:"errorBars",initialState:bge,reducers:{addErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,r)=>{var{itemId:n,prev:a,next:i}=r.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===a.dataKey&&o.direction===a.direction?i:o))},removeErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==a.dataKey||i.direction!==a.direction))}}}),{addErrorBar:G_e,replaceErrorBar:V_e,removeErrorBar:K_e}=GB.actions,xge=GB.reducer,_ge=["children"];function wge(e,r){if(e==null)return{};var n,a,i=Sge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Sge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Ege={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},kge=k.createContext(Ege);function Age(e){var{children:r}=e,n=wge(e,_ge);return k.createElement(kge.Provider,{value:n},r)}function VB(e,r){var n,a,i=Ce(d=>ca(d,e)),o=Ce(d=>fa(d,r)),s=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Mt.allowDataOverflow,c=(a=o==null?void 0:o.allowDataOverflow)!==null&&a!==void 0?a:Pt.allowDataOverflow,f=s||c;return{needClip:f,needClipX:s,needClipY:c}}function jge(e){var{xAxisId:r,yAxisId:n,clipPathId:a}=e,i=Ok(),{needClipX:o,needClipY:s,needClip:c}=VB(r,n);if(!c||!i)return null;var{x:f,y:d,width:h,height:m}=i;return k.createElement("clipPath",{id:"clipPath-".concat(a)},k.createElement("rect",{x:o?f:f-h/2,y:s?d:d-m/2,width:o?h:h*2,height:s?m:m*2}))}var KB=(e,r,n,a)=>U7(e,"xAxis",r,a),YB=(e,r,n,a)=>F7(e,"xAxis",r,a),XB=(e,r,n,a)=>U7(e,"yAxis",n,a),WB=(e,r,n,a)=>F7(e,"yAxis",n,a),Cge=ue([vt,KB,XB,YB,WB],(e,r,n,a,i)=>ti(e,"xAxis")?Gh(r,a,!1):Gh(n,i,!1)),Oge=(e,r,n,a,i)=>i;function Tge(e){return e.type==="line"}var Nge=ue([d7,Oge],(e,r)=>e.filter(Tge).find(n=>n.id===r)),Mge=ue([vt,KB,XB,YB,WB,Nge,Cge,XE],(e,r,n,a,i,o,s,c)=>{var{chartData:f,dataStartIndex:d,dataEndIndex:h}=c;if(!(o==null||r==null||n==null||a==null||i==null||a.length===0||i.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:m,data:g}=o,y;if(g!=null&&g.length>0?y=g:y=f==null?void 0:f.slice(d,h+1),y!=null)return Jge({layout:e,xAxis:r,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:m,bandSize:s,displayedData:y})}});function Pge(e){var r=Pp(e),n=3,a=2;if(r!=null){var{r:i,strokeWidth:o}=r,s=Number(i),c=Number(o);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(c)||c<0)&&(c=a),{r:s,strokeWidth:c}}return{r:n,strokeWidth:a}}var Rge=["id"],Dge=["type","layout","connectNulls","needClip","shape"],Lge=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function bc(){return bc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bc.apply(null,arguments)}function zM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Xn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?zM(Object(n),!0).forEach(function(a){Ige(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ige(e,r,n){return(r=zge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zge(e){var r=qge(e,"string");return typeof r=="symbol"?r:r+""}function qge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Mk(e,r){if(e==null)return{};var n,a,i=Bge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Bge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var $ge=e=>{var{dataKey:r,name:n,stroke:a,legendType:i,hide:o}=e;return[{inactive:o,dataKey:r,type:i,color:a,value:cq(n,r),payload:e}]},Fge=k.memo(e=>{var{dataKey:r,data:n,stroke:a,strokeWidth:i,fill:o,name:s,hide:c,unit:f,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n,getPosition:Uo,settings:{stroke:a,strokeWidth:i,fill:o,dataKey:r,nameKey:void 0,name:cq(s,r),hide:c,type:d,color:a,unit:f,graphicalItemId:h}};return k.createElement(mme,{tooltipEntrySettings:m})}),ZB=(e,r)=>"".concat(r,"px ").concat(e,"px");function Uge(e,r){for(var n=e.length%2!==0?[...e,0]:e,a=[],i=0;i<r;++i)a.push(...n);return a}var Hge=(e,r,n)=>{var a=n.reduce((g,y)=>g+y,0);if(!a)return ZB(r,e);for(var i=Math.floor(e/a),o=e%a,s=[],c=0,f=0;c<n.length;f+=(d=n[c])!==null&&d!==void 0?d:0,++c){var d,h=n[c];if(h!=null&&f+h>o){s=[...n.slice(0,c),o-f];break}}var m=s.length%2===0?[0,r]:[r];return[...Uge(n,i),...s,...m].map(g=>"".concat(g,"px")).join(", ")};function Gge(e){var{clipPathId:r,points:n,props:a}=e,{dot:i,dataKey:o,needClip:s}=a,{id:c}=a,f=Mk(a,Rge),d=ia(f);return k.createElement(Ime,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:d,needClip:s,clipPathId:r})}function Vge(e){var{showLabels:r,children:n,points:a}=e,i=k.useMemo(()=>a==null?void 0:a.map(o=>{var s,c,f={x:(s=o.x)!==null&&s!==void 0?s:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Xn(Xn({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[a]);return k.createElement($pe,{value:r?i:void 0},n)}function qM(e){var{clipPathId:r,pathRef:n,points:a,strokeDasharray:i,props:o}=e,{type:s,layout:c,connectNulls:f,needClip:d,shape:h}=o,m=Mk(o,Dge),g=Xn(Xn({},ur(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(r,")"):void 0,points:a,type:s,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return k.createElement(k.Fragment,null,(a==null?void 0:a.length)>1&&k.createElement(pme,bc({shapeType:"curve",option:h},g,{pathRef:n})),k.createElement(Gge,{points:a,clipPathId:r,props:o}))}function Kge(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Yge(e){var{clipPathId:r,props:n,pathRef:a,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:s,strokeDasharray:c,isAnimationActive:f,animationBegin:d,animationDuration:h,animationEasing:m,animateNewValues:g,width:y,height:_,onAnimationEnd:E,onAnimationStart:w}=n,x=i.current,j=YE(s,"recharts-line-"),C=k.useRef(j),[T,O]=k.useState(!1),N=!T,M=k.useCallback(()=>{typeof E=="function"&&E(),O(!1)},[E]),R=k.useCallback(()=>{typeof w=="function"&&w(),O(!0)},[w]),L=Kge(a.current),D=k.useRef(0);C.current!==j&&(D.current=o.current,C.current=j);var q=D.current;return k.createElement(Vge,{points:s,showLabels:N},n.children,k.createElement(KE,{animationId:j,begin:d,duration:h,isActive:f,easing:m,onAnimationEnd:M,onAnimationStart:R,key:j},z=>{var H=Cr(q,L+q,z),F=Math.min(H,L),X;if(f)if(c){var B="".concat(c).split(/[,\s]+/gim).map(K=>parseFloat(K));X=Hge(F,L,B)}else X=ZB(L,F);else X=c==null?void 0:String(c);if(z>0&&L>0&&(i.current=s,o.current=Math.max(o.current,F)),x){var Q=x.length/s.length,te=z===1?s:s.map((K,de)=>{var U=Math.floor(de*Q);if(x[U]){var J=x[U];return Xn(Xn({},K),{},{x:Cr(J.x,K.x,z),y:Cr(J.y,K.y,z)})}return g?Xn(Xn({},K),{},{x:Cr(y*2,K.x,z),y:Cr(_/2,K.y,z)}):Xn(Xn({},K),{},{x:K.x,y:K.y})});return i.current=te,k.createElement(qM,{props:n,points:te,clipPathId:r,pathRef:a,strokeDasharray:X})}return k.createElement(qM,{props:n,points:s,clipPathId:r,pathRef:a,strokeDasharray:X})}),k.createElement(Hpe,{label:n.label}))}function Xge(e){var{clipPathId:r,props:n}=e,a=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return k.createElement(Yge,{props:n,clipPathId:r,previousPointsRef:a,longestAnimatedLengthRef:i,pathRef:o})}var Wge=(e,r)=>{var n,a;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(a=e.y)!==null&&a!==void 0?a:void 0,value:e.value,errorVal:er(e.payload,r)}};class Zge extends k.Component{render(){var{hide:r,dot:n,points:a,className:i,xAxisId:o,yAxisId:s,top:c,left:f,width:d,height:h,id:m,needClip:g,zIndex:y}=this.props;if(r)return null;var _=et("recharts-line",i),E=m,{r:w,strokeWidth:x}=Pge(n),j=DB(n),C=w*2+x,T=g?"url(#clipPath-".concat(j?"":"dots-").concat(E,")"):void 0;return k.createElement(da,{zIndex:y},k.createElement(oa,{className:_},g&&k.createElement("defs",null,k.createElement(jge,{clipPathId:E,xAxisId:o,yAxisId:s}),!j&&k.createElement("clipPath",{id:"clipPath-dots-".concat(E)},k.createElement("rect",{x:f-C/2,y:c-C/2,width:d+C,height:h+C}))),k.createElement(Age,{xAxisId:o,yAxisId:s,data:a,dataPointFormatter:Wge,errorBarOffset:0},k.createElement(Xge,{props:this.props,clipPathId:E}))),k.createElement(nve,{activeDot:this.props.activeDot,points:a,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:T}))}}var QB={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:sr.line,type:"linear"};function Qge(e){var r=gr(e,QB),{activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:s,connectNulls:c,dot:f,hide:d,isAnimationActive:h,label:m,legendType:g,xAxisId:y,yAxisId:_,id:E}=r,w=Mk(r,Lge),{needClip:x}=VB(y,_),j=Ok(),C=us(),T=yr(),O=Ce(D=>Mge(D,y,_,T,E));if(C!=="horizontal"&&C!=="vertical"||O==null||j==null)return null;var{height:N,width:M,x:R,y:L}=j;return k.createElement(Zge,bc({},w,{id:E,connectNulls:c,dot:f,activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:s,isAnimationActive:h,hide:d,label:m,legendType:g,xAxisId:y,yAxisId:_,points:O,layout:C,height:N,width:M,left:R,top:L,needClip:x}))}function Jge(e){var{layout:r,xAxis:n,yAxis:a,xAxisTicks:i,yAxisTicks:o,dataKey:s,bandSize:c,displayedData:f}=e;return f.map((d,h)=>{var m=er(d,s);if(r==="horizontal"){var g=m4({axis:n,ticks:i,bandSize:c,entry:d,index:h}),y=$t(m)?null:a.scale.map(m);return{x:g,y:y??null,value:m,payload:d}}var _=$t(m)?null:n.scale.map(m),E=m4({axis:a,ticks:o,bandSize:c,entry:d,index:h});return _==null||E==null?null:{x:_,y:E,value:m,payload:d}}).filter(Boolean)}function eye(e){var r=gr(e,QB),n=yr();return k.createElement(_me,{id:r.id,type:"line"},a=>k.createElement(k.Fragment,null,k.createElement(vme,{legendPayload:$ge(r)}),k.createElement(Fge,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,tooltipType:r.tooltipType,id:a}),k.createElement(Cme,{type:"line",id:a,data:r.data,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,dataKey:r.dataKey,hide:r.hide,isPanorama:n}),k.createElement(Qge,bc({},r,{id:a}))))}var JB=k.memo(eye,tm);JB.displayName="Line";var tye=["domain","range"],rye=["domain","range"];function BM(e,r){if(e==null)return{};var n,a,i=nye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function $M(e,r){return e===r?!0:Array.isArray(e)&&e.length===2&&Array.isArray(r)&&r.length===2?e[0]===r[0]&&e[1]===r[1]:!1}function e$(e,r){if(e===r)return!0;var{domain:n,range:a}=e,i=BM(e,tye),{domain:o,range:s}=r,c=BM(r,rye);return!$M(n,o)||!$M(a,s)?!1:tm(i,c)}var aye=["type"],iye=["dangerouslySetInnerHTML","ticks","scale"],oye=["id","scale"];function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bS.apply(null,arguments)}function FM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function UM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?FM(Object(n),!0).forEach(function(a){lye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function lye(e,r,n){return(r=sye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function sye(e){var r=uye(e,"string");return typeof r=="symbol"?r:r+""}function uye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function xS(e,r){if(e==null)return{};var n,a,i=cye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function cye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function fye(e){var r=Et(),n=k.useRef(null),a=bq(),{type:i}=e,o=xS(e,aye),s=am(a,"xAxis",i),c=k.useMemo(()=>{if(s!=null)return UM(UM({},o),{},{type:s})},[o,s]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Fme(c)):n.current!==c&&r(Ume({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Hme(n.current)),n.current=null)},[r]),null}var dye=e=>{var{xAxisId:r,className:n}=e,a=Ce(dq),i=yr(),o="xAxis",s=Ce(x=>$7(x,o,r,i)),c=Ce(x=>ofe(x,r)),f=Ce(x=>dfe(x,r)),d=Ce(x=>s7(x,r));if(c==null||f==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:m,scale:g}=e,y=xS(e,iye),{id:_,scale:E}=d,w=xS(d,oye);return k.createElement(Nk,bS({},y,w,{x:f.x,y:f.y,width:c.width,height:c.height,className:et("recharts-".concat(o," ").concat(o),n),viewBox:a,ticks:s,axisType:o,axisId:r}))},hye={allowDataOverflow:Mt.allowDataOverflow,allowDecimals:Mt.allowDecimals,allowDuplicatedCategory:Mt.allowDuplicatedCategory,angle:Mt.angle,axisLine:Ha.axisLine,height:Mt.height,hide:!1,includeHidden:Mt.includeHidden,interval:Mt.interval,label:!1,minTickGap:Mt.minTickGap,mirror:Mt.mirror,orientation:Mt.orientation,padding:Mt.padding,reversed:Mt.reversed,scale:Mt.scale,tick:Mt.tick,tickCount:Mt.tickCount,tickLine:Ha.tickLine,tickSize:Ha.tickSize,type:Mt.type,niceTicks:Mt.niceTicks,xAxisId:0},pye=e=>{var r=gr(e,hye);return k.createElement(k.Fragment,null,k.createElement(fye,{allowDataOverflow:r.allowDataOverflow,allowDecimals:r.allowDecimals,allowDuplicatedCategory:r.allowDuplicatedCategory,angle:r.angle,dataKey:r.dataKey,domain:r.domain,height:r.height,hide:r.hide,id:r.xAxisId,includeHidden:r.includeHidden,interval:r.interval,minTickGap:r.minTickGap,mirror:r.mirror,name:r.name,orientation:r.orientation,padding:r.padding,reversed:r.reversed,scale:r.scale,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,niceTicks:r.niceTicks}),k.createElement(dye,r))},t$=k.memo(pye,e$);t$.displayName="XAxis";var mye=["type"],vye=["dangerouslySetInnerHTML","ticks","scale"],gye=["id","scale"];function _S(){return _S=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_S.apply(null,arguments)}function HM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function GM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?HM(Object(n),!0).forEach(function(a){yye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function yye(e,r,n){return(r=bye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function bye(e){var r=xye(e,"string");return typeof r=="symbol"?r:r+""}function xye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function wS(e,r){if(e==null)return{};var n,a,i=_ye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _ye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function wye(e){var r=Et(),n=k.useRef(null),a=bq(),{type:i}=e,o=wS(e,mye),s=am(a,"yAxis",i),c=k.useMemo(()=>{if(s!=null)return GM(GM({},o),{},{type:s})},[s,o]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Gme(c)):n.current!==c&&r(Vme({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Kme(n.current)),n.current=null)},[r]),null}function Sye(e){var{yAxisId:r,className:n,width:a,label:i}=e,o=k.useRef(null),s=k.useRef(null),c=Ce(dq),f=yr(),d=Et(),h="yAxis",m=Ce(N=>mfe(N,r)),g=Ce(N=>pfe(N,r)),y=Ce(N=>$7(N,h,r,f)),_=Ce(N=>u7(N,r));if(k.useLayoutEffect(()=>{if(!(a!=="auto"||!m||Ck(i)||k.isValidElement(i)||_==null)){var N=o.current;if(N){var M=N.getCalculatedWidth();Math.round(m.width)!==Math.round(M)&&d(Yme({id:r,width:M}))}}},[y,m,d,i,r,a,_]),m==null||g==null||_==null)return null;var{dangerouslySetInnerHTML:E,ticks:w,scale:x}=e,j=wS(e,vye),{id:C,scale:T}=_,O=wS(_,gye);return k.createElement(Nk,_S({},j,O,{ref:o,labelRef:s,x:g.x,y:g.y,tickTextProps:a==="auto"?{width:void 0}:{width:a},width:m.width,height:m.height,className:et("recharts-".concat(h," ").concat(h),n),viewBox:c,ticks:y,axisType:h,axisId:r}))}var Eye={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:Ha.axisLine,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,label:!1,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:Ha.tickLine,tickSize:Ha.tickSize,type:Pt.type,niceTicks:Pt.niceTicks,width:Pt.width,yAxisId:0},kye=e=>{var r=gr(e,Eye);return k.createElement(k.Fragment,null,k.createElement(wye,{interval:r.interval,id:r.yAxisId,scale:r.scale,type:r.type,domain:r.domain,allowDataOverflow:r.allowDataOverflow,dataKey:r.dataKey,allowDuplicatedCategory:r.allowDuplicatedCategory,allowDecimals:r.allowDecimals,tickCount:r.tickCount,padding:r.padding,includeHidden:r.includeHidden,reversed:r.reversed,ticks:r.ticks,width:r.width,orientation:r.orientation,mirror:r.mirror,hide:r.hide,unit:r.unit,name:r.name,angle:r.angle,minTickGap:r.minTickGap,tick:r.tick,tickFormatter:r.tickFormatter,niceTicks:r.niceTicks}),k.createElement(Sye,r))},r$=k.memo(kye,e$);r$.displayName="YAxis";var Aye=(e,r)=>r,Pk=ue([Aye,vt,n7,Gt,iB,ai,zde,rr],Gde);function jye(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Rk(e){var r=e.currentTarget.getBoundingClientRect(),n,a;if(jye(e)){var i=e.currentTarget.getBBox();n=i.width>0?r.width/i.width:1,a=i.height>0?r.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?r.width/o.offsetWidth:1,a=o.offsetHeight>0?r.height/o.offsetHeight:1}var s=(c,f)=>({relativeX:Math.round((c-r.left)/n),relativeY:Math.round((f-r.top)/a)});return"touches"in e?Array.from(e.touches).map(c=>s(c.clientX,c.clientY)):s(e.clientX,e.clientY)}var n$=Vr("mouseClick"),a$=Rc();a$.startListening({actionCreator:n$,effect:(e,r)=>{var n=e.payload,a=Pk(r.getState(),Rk(n));(a==null?void 0:a.activeIndex)!=null&&r.dispatch(Tfe({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}});var SS=Vr("mouseMove"),i$=Rc(),$l=null,vo=null,$0=null;i$.startListening({actionCreator:SS,effect:(e,r)=>{var n=e.payload,a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,s=o==="all"||(o==null?void 0:o.includes("mousemove"));$l!==null&&(cancelAnimationFrame($l),$l=null),vo!==null&&(typeof i!="number"||!s)&&(clearTimeout(vo),vo=null),$0=Rk(n);var c=()=>{var f=r.getState(),d=gk(f,f.tooltip.settings.shared);if(!$0){$l=null,vo=null;return}if(d==="axis"){var h=Pk(f,$0);(h==null?void 0:h.activeIndex)!=null?r.dispatch(W7({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):r.dispatch(X7())}$l=null,vo=null};if(!s){c();return}i==="raf"?$l=requestAnimationFrame(c):typeof i=="number"&&vo===null&&(vo=setTimeout(c,i))}});function Cye(e,r){return r instanceof HTMLElement?"HTMLElement <".concat(r.tagName,' class="').concat(r.className,'">'):r===window?"global.window":e==="children"&&typeof r=="object"&&r!==null?"<<CHILDREN>>":r}var VM={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},o$=cr({name:"rootProps",initialState:VM,reducers:{updateOptions:(e,r)=>{var n;e.accessibilityLayer=r.payload.accessibilityLayer,e.barCategoryGap=r.payload.barCategoryGap,e.barGap=(n=r.payload.barGap)!==null&&n!==void 0?n:VM.barGap,e.barSize=r.payload.barSize,e.maxBarSize=r.payload.maxBarSize,e.stackOffset=r.payload.stackOffset,e.syncId=r.payload.syncId,e.syncMethod=r.payload.syncMethod,e.className=r.payload.className,e.baseValue=r.payload.baseValue,e.reverseStackOrder=r.payload.reverseStackOrder}}}),Oye=o$.reducer,{updateOptions:Tye}=o$.actions,Nye=null,Mye={updatePolarOptions:(e,r)=>e===null?r.payload:(e.startAngle=r.payload.startAngle,e.endAngle=r.payload.endAngle,e.cx=r.payload.cx,e.cy=r.payload.cy,e.innerRadius=r.payload.innerRadius,e.outerRadius=r.payload.outerRadius,e)},l$=cr({name:"polarOptions",initialState:Nye,reducers:Mye}),{updatePolarOptions:Y_e}=l$.actions,Pye=l$.reducer,s$=Vr("keyDown"),u$=Vr("focus"),c$=Vr("blur"),fm=Rc(),Fl=null,go=null,Ud=null;fm.startListening({actionCreator:s$,effect:(e,r)=>{Ud=e.payload,Fl!==null&&(cancelAnimationFrame(Fl),Fl=null);var n=r.getState(),{throttleDelay:a,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");go!==null&&(typeof a!="number"||!o)&&(clearTimeout(go),go=null);var s=()=>{try{var c=r.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:d}=c.tooltip,h=Ud;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var m=yk(d,gs(c),Uc(c),Gc(c)),g=m==null?-1:Number(m);if(!Number.isFinite(g)||g<0)return;var y=ai(c);if(h==="Enter"){var _=op(c,"axis","hover",String(d.index));r.dispatch(ip({active:!d.active,activeIndex:d.index,activeCoordinate:_}));return}var E=xfe(c),w=E==="left-to-right"?1:-1,x=h==="ArrowRight"?1:-1,j=g+x*w;if(y==null||j>=y.length||j<0)return;var C=op(c,"axis","hover",String(j));r.dispatch(ip({active:!0,activeIndex:j.toString(),activeCoordinate:C}))}finally{Fl=null,go=null}};if(!o){s();return}a==="raf"?Fl=requestAnimationFrame(s):typeof a=="number"&&go===null&&(s(),Ud=null,go=setTimeout(()=>{Ud?s():(go=null,Fl=null)},a))}});fm.startListening({actionCreator:u$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",s=op(n,"axis","hover",String(o));r.dispatch(ip({active:!0,activeIndex:o,activeCoordinate:s}))}}}});fm.startListening({actionCreator:c$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;i.active&&r.dispatch(ip({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function f$(e){e.persist();var{currentTarget:r}=e;return new Proxy(e,{get:(n,a)=>{if(a==="currentTarget")return r;var i=Reflect.get(n,a);return typeof i=="function"?i.bind(n):i}})}var un=Vr("externalEvent"),d$=Rc(),Hd=new Map,Iu=new Map,F0=new Map;d$.startListening({actionCreator:un,effect:(e,r)=>{var{handler:n,reactEvent:a}=e.payload;if(n!=null){var i=a.type,o=f$(a);F0.set(i,{handler:n,reactEvent:o});var s=Hd.get(i);s!==void 0&&(cancelAnimationFrame(s),Hd.delete(i));var c=r.getState(),{throttleDelay:f,throttledEvents:d}=c.eventSettings,h=d,m=h==="all"||(h==null?void 0:h.includes(i)),g=Iu.get(i);g!==void 0&&(typeof f!="number"||!m)&&(clearTimeout(g),Iu.delete(i));var y=()=>{var w=F0.get(i);try{if(!w)return;var{handler:x,reactEvent:j}=w,C=r.getState(),T={activeCoordinate:wde(C),activeDataKey:bde(C),activeIndex:vc(C),activeLabel:sB(C),activeTooltipIndex:vc(C),isTooltipActive:Sde(C)};x&&x(T,j)}finally{Hd.delete(i),Iu.delete(i),F0.delete(i)}};if(!m){y();return}if(f==="raf"){var _=requestAnimationFrame(y);Hd.set(i,_)}else if(typeof f=="number"){if(!Iu.has(i)){y();var E=setTimeout(y,f);Iu.set(i,E)}}else y()}}});var Rye=ue([ms],e=>e.tooltipItemPayloads),Dye=ue([Rye,(e,r)=>r,(e,r,n)=>n],(e,r,n)=>{if(r!=null){var a=e.find(o=>o.settings.graphicalItemId===n);if(a!=null){var{getPosition:i}=a;if(i!=null)return i(r)}}}),h$=Vr("touchMove"),p$=Rc(),yo=null,Di=null,KM=null,zu=null;p$.startListening({actionCreator:h$,effect:(e,r)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){zu=f$(n);var a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,s=o==="all"||o.includes("touchmove");yo!==null&&(cancelAnimationFrame(yo),yo=null),Di!==null&&(typeof i!="number"||!s)&&(clearTimeout(Di),Di=null),KM=Array.from(n.touches).map(f=>Rk({clientX:f.clientX,clientY:f.clientY,currentTarget:n.currentTarget}));var c=()=>{if(zu!=null){var f=r.getState(),d=gk(f,f.tooltip.settings.shared);if(d==="axis"){var h,m=(h=KM)===null||h===void 0?void 0:h[0];if(m==null){yo=null,Di=null;return}var g=Pk(f,m);(g==null?void 0:g.activeIndex)!=null&&r.dispatch(W7({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(d==="item"){var y,_=zu.touches[0];if(document.elementFromPoint==null||_==null)return;var E=document.elementFromPoint(_.clientX,_.clientY);if(!E||!E.getAttribute)return;var w=E.getAttribute(ple),x=(y=E.getAttribute(mle))!==null&&y!==void 0?y:void 0,j=vs(f).find(O=>O.id===x);if(w==null||j==null||x==null)return;var{dataKey:C}=j,T=Dye(f,w,x);r.dispatch(Ofe({activeDataKey:C,activeIndex:w,activeCoordinate:T,activeGraphicalItemId:x}))}yo=null,Di=null}};if(!s){c();return}i==="raf"?yo=requestAnimationFrame(c):typeof i=="number"&&Di===null&&(c(),zu=null,Di=setTimeout(()=>{zu?c():(Di=null,yo=null)},i))}}});var m$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},v$=cr({name:"eventSettings",initialState:m$,reducers:{setEventSettings:(e,r)=>{r.payload.throttleDelay!=null&&(e.throttleDelay=r.payload.throttleDelay),r.payload.throttledEvents!=null&&(e.throttledEvents=r.payload.throttledEvents)}}}),{setEventSettings:Lye}=v$.actions,Iye=v$.reducer,zye=Pz({brush:ive,cartesianAxis:Xme,chartData:She,errorBars:xge,eventSettings:Iye,graphicalItems:Ame,layout:Joe,legend:lse,options:yhe,polarAxis:Vpe,polarOptions:Pye,referenceElements:hve,renderedTicks:Fve,rootProps:Oye,tooltip:Nfe,zIndex:ihe}),qye=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Eoe({reducer:zye,preloadedState:r,middleware:a=>{var i;return a({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([a$.middleware,i$.middleware,fm.middleware,d$.middleware,p$.middleware])},enhancers:a=>{var i=a;return typeof a=="function"&&(i=a()),i.concat(Yz({type:"raf"}))},devTools:{serialize:{replacer:Cye},name:"recharts-".concat(n)}})};function Bye(e){var{preloadedState:r,children:n,reduxStoreName:a}=e,i=yr(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=qye(r,a));var s=LE;return k.createElement(Sse,{context:s,store:o.current},n)}function $ye(e){var{layout:r,margin:n}=e,a=Et(),i=yr();return k.useEffect(()=>{i||(a(Woe(r)),a(Xoe(n)))},[a,i,r,n]),null}var Fye=k.memo($ye,tm);function Uye(e){var r=Et();return k.useEffect(()=>{r(Tye(e))},[r,e]),null}var Hye=e=>{var r=Et();return k.useEffect(()=>{r(Lye(e))},[r,e]),null},Gye=k.memo(Hye,tm);function YM(e){var{zIndex:r,isPanorama:n}=e,a=k.useRef(null),i=Et();return k.useLayoutEffect(()=>(a.current&&i(nhe({zIndex:r,element:a.current,isPanorama:n})),()=>{i(ahe({zIndex:r,isPanorama:n}))}),[i,r,n]),k.createElement("g",{tabIndex:-1,ref:a,className:"recharts-zIndex-layer_".concat(r)})}function XM(e){var{children:r,isPanorama:n}=e,a=Ce(Kde);if(!a||a.length===0)return r;var i=a.filter(s=>s<0),o=a.filter(s=>s>0);return k.createElement(k.Fragment,null,i.map(s=>k.createElement(YM,{key:s,zIndex:s,isPanorama:n})),r,o.map(s=>k.createElement(YM,{key:s,zIndex:s,isPanorama:n})))}var Vye=["children"];function Kye(e,r){if(e==null)return{};var n,a,i=Yye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Yye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function hp(){return hp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},hp.apply(null,arguments)}var Xye={width:"100%",height:"100%",display:"block"},Wye=k.forwardRef((e,r)=>{var n=gq(),a=yq(),i=Oq();if(!la(n)||!la(a))return null;var{children:o,otherAttributes:s,title:c,desc:f}=e,d,h;return s!=null&&(typeof s.tabIndex=="number"?d=s.tabIndex:d=i?0:void 0,typeof s.role=="string"?h=s.role:h=i?"application":void 0),k.createElement(WI,hp({},s,{title:c,desc:f,role:h,tabIndex:d,width:n,height:a,style:Xye,ref:r}),o)}),Zye=e=>{var{children:r}=e,n=Ce(Zp);if(!n)return null;var{width:a,height:i,y:o,x:s}=n;return k.createElement(WI,{width:a,height:i,x:s,y:o},r)},WM=k.forwardRef((e,r)=>{var{children:n}=e,a=Kye(e,Vye),i=yr();return i?k.createElement(Zye,null,k.createElement(XM,{isPanorama:!0},n)):k.createElement(Wye,hp({ref:r},a),k.createElement(XM,{isPanorama:!1},n))});function Qye(){var e=Et(),[r,n]=k.useState(null),a=Ce(hle);return k.useEffect(()=>{if(r!=null){var i=r.getBoundingClientRect(),o=i.width/r.offsetWidth;De(o)&&o!==a&&e(Qoe(o))}},[r,e,a]),n}function ZM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Jye(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?ZM(Object(n),!0).forEach(function(a){e0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function e0e(e,r,n){return(r=t0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function t0e(e){var r=r0e(e,"string");return typeof r=="symbol"?r:r+""}function r0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Fi(){return Fi=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Fi.apply(null,arguments)}var n0e=()=>(Mhe(),null);function pp(e){if(typeof e=="number")return e;if(typeof e=="string"){var r=parseFloat(e);if(!Number.isNaN(r))return r}return 0}var a0e=k.forwardRef((e,r)=>{var n,a,i=k.useRef(null),[o,s]=k.useState({containerWidth:pp((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:pp((a=e.style)===null||a===void 0?void 0:a.height)}),c=k.useCallback((d,h)=>{s(m=>{var g=Math.round(d),y=Math.round(h);return m.containerWidth===g&&m.containerHeight===y?m:{containerWidth:g,containerHeight:y}})},[]),f=k.useCallback(d=>{if(typeof r=="function"&&r(d),d!=null&&typeof ResizeObserver<"u"){var{width:h,height:m}=d.getBoundingClientRect();c(h,m);var g=_=>{var E=_[0];if(E!=null){var{width:w,height:x}=E.contentRect;c(w,x)}},y=new ResizeObserver(g);y.observe(d),i.current=y}},[r,c]);return k.useEffect(()=>()=>{var d=i.current;d!=null&&d.disconnect()},[c]),k.createElement(k.Fragment,null,k.createElement(Ic,{width:o.containerWidth,height:o.containerHeight}),k.createElement("div",Fi({ref:f},e)))}),i0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e,[i,o]=k.useState({containerWidth:pp(n),containerHeight:pp(a)}),s=k.useCallback((f,d)=>{o(h=>{var m=Math.round(f),g=Math.round(d);return h.containerWidth===m&&h.containerHeight===g?h:{containerWidth:m,containerHeight:g}})},[]),c=k.useCallback(f=>{if(typeof r=="function"&&r(f),f!=null){var{width:d,height:h}=f.getBoundingClientRect();s(d,h)}},[r,s]);return k.createElement(k.Fragment,null,k.createElement(Ic,{width:i.containerWidth,height:i.containerHeight}),k.createElement("div",Fi({ref:c},e)))}),o0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement("div",Fi({ref:r},e)))}),l0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return typeof n=="string"||typeof a=="string"?k.createElement(i0e,Fi({},e,{ref:r})):typeof n=="number"&&typeof a=="number"?k.createElement(o0e,Fi({},e,{width:n,height:a,ref:r})):k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement("div",Fi({ref:r},e)))});function s0e(e){return e?a0e:l0e}var u0e=k.forwardRef((e,r)=>{var{children:n,className:a,height:i,onClick:o,onContextMenu:s,onDoubleClick:c,onMouseDown:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:m,onMouseUp:g,onTouchEnd:y,onTouchMove:_,onTouchStart:E,style:w,width:x,responsive:j,dispatchTouchEvents:C=!0}=e,T=k.useRef(null),O=Et(),[N,M]=k.useState(null),[R,L]=k.useState(null),D=Qye(),q=UE(),z=(q==null?void 0:q.width)>0?q.width:x,H=(q==null?void 0:q.height)>0?q.height:i,F=k.useCallback(se=>{D(se),typeof r=="function"&&r(se),M(se),L(se),se!=null&&(T.current=se)},[D,r,M,L]),X=k.useCallback(se=>{O(n$(se)),O(un({handler:o,reactEvent:se}))},[O,o]),B=k.useCallback(se=>{O(SS(se)),O(un({handler:d,reactEvent:se}))},[O,d]),Q=k.useCallback(se=>{O(X7()),O(un({handler:h,reactEvent:se}))},[O,h]),te=k.useCallback(se=>{O(SS(se)),O(un({handler:m,reactEvent:se}))},[O,m]),K=k.useCallback(()=>{O(u$())},[O]),de=k.useCallback(()=>{O(c$())},[O]),U=k.useCallback(se=>{O(s$(se.key))},[O]),J=k.useCallback(se=>{O(un({handler:s,reactEvent:se}))},[O,s]),le=k.useCallback(se=>{O(un({handler:c,reactEvent:se}))},[O,c]),$=k.useCallback(se=>{O(un({handler:f,reactEvent:se}))},[O,f]),Y=k.useCallback(se=>{O(un({handler:g,reactEvent:se}))},[O,g]),G=k.useCallback(se=>{O(un({handler:E,reactEvent:se}))},[O,E]),he=k.useCallback(se=>{C&&O(h$(se)),O(un({handler:_,reactEvent:se}))},[O,C,_]),xe=k.useCallback(se=>{O(un({handler:y,reactEvent:se}))},[O,y]),Z=s0e(j);return k.createElement(mB.Provider,{value:N},k.createElement(nae.Provider,{value:R},k.createElement(Z,{width:z??(w==null?void 0:w.width),height:H??(w==null?void 0:w.height),className:et("recharts-wrapper",a),style:Jye({position:"relative",cursor:"default",width:z,height:H},w),onClick:X,onContextMenu:J,onDoubleClick:le,onFocus:K,onBlur:de,onKeyDown:U,onMouseDown:$,onMouseEnter:B,onMouseLeave:Q,onMouseMove:te,onMouseUp:Y,onTouchEnd:xe,onTouchMove:he,onTouchStart:G,ref:F},k.createElement(n0e,null),n)))}),c0e=["width","height","responsive","children","className","style","compact","title","desc"];function f0e(e,r){if(e==null)return{};var n,a,i=d0e(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d0e(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var h0e=k.forwardRef((e,r)=>{var{width:n,height:a,responsive:i,children:o,className:s,style:c,compact:f,title:d,desc:h}=e,m=f0e(e,c0e),g=ia(m);return f?k.createElement(k.Fragment,null,k.createElement(Ic,{width:n,height:a}),k.createElement(WM,{otherAttributes:g,title:d,desc:h},o)):k.createElement(u0e,{className:s,style:c,width:n,height:a,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},k.createElement(WM,{otherAttributes:g,title:d,desc:h,ref:r},k.createElement(pve,null,o)))});function ES(){return ES=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ES.apply(null,arguments)}function QM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function p0e(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?QM(Object(n),!0).forEach(function(a){m0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function m0e(e,r,n){return(r=v0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v0e(e){var r=g0e(e,"string");return typeof r=="symbol"?r:r+""}function g0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var y0e={top:5,right:5,bottom:5,left:5},b0e=p0e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:y0e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},m$),x0e=k.forwardRef(function(r,n){var a,i=gr(r.categoricalChartProps,b0e),{chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:d}=r,h={chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return k.createElement(Bye,{preloadedState:{options:h},reduxStoreName:(a=d.id)!==null&&a!==void 0?a:o},k.createElement(ave,{chartData:d.data}),k.createElement(Fye,{layout:i.layout,margin:i.margin}),k.createElement(Gye,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),k.createElement(Uye,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),k.createElement(h0e,ES({},i,{ref:n})))}),_0e=["axis"],w0e=k.forwardRef((e,r)=>k.createElement(x0e,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:_0e,tooltipPayloadSearcher:vhe,categoricalChartProps:e,ref:r}));const JM={dailyPercent:"#58A6FF",weeklyPercent:"#A371F7",sonnetPercent:"#3FB950",extraPercent:"#D29922"},S0e={dailyPercent:"Daily",weeklyPercent:"Weekly",sonnetPercent:"Sonnet",extraPercent:"Extra"},E0e=["dailyPercent","weeklyPercent","sonnetPercent","extraPercent"];function k0e(e){return e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function A0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function j0e({active:e,payload:r,label:n}){return!e||!r||r.length===0||n===void 0?null:b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-md px-3 py-2 shadow-lg",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:A0e(n)}),r.map(a=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:a.color}}),b.jsxs("span",{className:"text-dark-text",children:[S0e[a.dataKey]??a.dataKey,":"]}),b.jsxs("span",{className:"text-dark-text font-semibold tabular-nums",children:[a.value.toFixed(1),"%"]})]},a.dataKey))]})}function C0e({snapshots:e,redThresholds:r}){const n=k.useMemo(()=>{const o=Date.now()-10080*60*1e3;return e.map(s=>({time:new Date(s.recordedAt).getTime(),dailyPercent:s.dailyPercent,weeklyPercent:s.weeklyPercent,sonnetPercent:s.sonnetPercent,extraPercent:s.extraPercent})).filter(s=>s.time>=o).sort((s,c)=>s.time-c.time)},[e]),a=k.useMemo(()=>{const i=Date.now();return[i-10080*60*1e3,i]},[n]);return n.length===0?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"No usage data in the last 7 days"})}):b.jsx("div",{className:"w-full h-72",children:b.jsx(Ule,{width:"100%",height:"100%",children:b.jsxs(w0e,{data:n,margin:{top:8,right:16,bottom:8,left:0},children:[b.jsx(HB,{strokeDasharray:"3 3",stroke:"rgba(48, 54, 61, 0.6)",vertical:!1}),b.jsx(t$,{dataKey:"time",type:"number",domain:a,tickFormatter:i=>k0e(new Date(i)),stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"}}),b.jsx(r$,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:i=>`${i}%`,stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"},width:48}),b.jsx(Bhe,{content:b.jsx(j0e,{}),cursor:{stroke:"rgba(139, 148, 158, 0.3)"}}),b.jsx(yS,{y:r.daily,stroke:"#F85149",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Daily ${r.daily}%`,position:"right",fill:"#F85149",fontSize:10}}),b.jsx(yS,{y:r.weekly,stroke:"#A371F7",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Weekly ${r.weekly}%`,position:"right",fill:"#A371F7",fontSize:10}}),E0e.map(i=>b.jsx(JB,{type:"monotone",dataKey:i,stroke:JM[i],strokeWidth:2,dot:!1,activeDot:{r:4,fill:JM[i],stroke:"#161B22",strokeWidth:2}},i))]})})})}const O0e=3e4,T0e={daily:85,weekly:95,sonnet:95,extra:95},N0e=[{label:"Daily Usage",key:"dailyPercent",thresholdKey:"daily",resetKey:"dailyResetsAt"},{label:"Weekly Usage",key:"weeklyPercent",thresholdKey:"weekly",resetKey:"weeklyResetsAt"},{label:"Sonnet Usage",key:"sonnetPercent",thresholdKey:"sonnet",resetKey:null},{label:"Extra Usage",key:"extraPercent",thresholdKey:"extra",resetKey:null}];function M0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function P0e(){const e=Ft(),[r,n]=k.useState(null),[a,i]=k.useState(T0e),[o,s]=k.useState([]),[c,f]=k.useState(!0),[d,h]=k.useState(null),m=k.useCallback(async()=>{try{const[y,_]=await Promise.all([e.get("usage"),e.get("usage/history?limit=1000")]);n(y),y.redThresholds&&i(y.redThresholds),s(_.snapshots),h(null)}catch(y){h(y instanceof Error?y.message:"Failed to fetch usage data")}finally{f(!1)}},[e]);k.useEffect(()=>{m();const y=setInterval(()=>{m()},O0e);return()=>clearInterval(y)},[m]);const g=k.useCallback(y=>{y==="usage_updated"&&m()},[m]);return PS({onEvent:g}),b.jsxs("div",{className:"p-6 max-w-4xl mx-auto flex flex-col gap-8",children:[b.jsxs("section",{className:"flex flex-col gap-2 py-4",children:[b.jsx("h2",{className:"text-xs font-medium text-dark-muted uppercase tracking-widest mb-4",children:"Usage Overview"}),c&&!r?b.jsx("p",{className:"text-dark-muted text-lg text-center py-8",children:"Loading..."}):d&&!r?b.jsx("p",{className:"text-[#F85149] text-sm text-center py-8",children:d}):r?b.jsxs("div",{className:"flex flex-col gap-4",children:[N0e.map(y=>{const _=r[y.key]??0,E=X6(_,a[y.thresholdKey]),w=Math.min(Math.max(_,0),100);return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-sm font-medium text-dark-text",children:y.label}),b.jsxs("span",{className:"text-sm font-semibold tabular-nums",style:{color:E},children:[_.toFixed(1),"%"]})]}),b.jsx("div",{className:"w-full h-6 bg-dark-base rounded-md overflow-hidden border border-dark-border",children:b.jsx("div",{className:"h-full rounded-md transition-all duration-500 ease-out",style:{width:`${Math.max(w,.5)}%`,backgroundColor:E+"40",borderRight:w>0?`2px solid ${E}`:"none"}})}),y.resetKey&&(()=>{const x=s2(r[y.resetKey]);return x?b.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:x}):null})()]},y.key)}),r.recordedAt&&b.jsxs("p",{className:"text-xs text-dark-muted mt-2",children:["Last updated: ",M0e(r.recordedAt)]})]}):null]}),b.jsxs("section",{children:[b.jsx("h3",{className:"text-sm font-medium text-dark-muted uppercase tracking-wider mb-3",children:"Last 7 Days"}),b.jsx("div",{className:"bg-dark-surface rounded-lg border border-dark-border p-4",children:b.jsx(C0e,{snapshots:o,redThresholds:a})})]})]})}function eP(e){const[r,n]=k.useState(!1),[a,i]=k.useState(e),o=k.useRef(null),s=k.useRef(!1),c=k.useCallback(h=>{i(h),n(!0),s.current=!1,setTimeout(()=>{var m;return(m=o.current)==null?void 0:m.focus()},50)},[]),f=k.useCallback(()=>{n(!1),s.current=!1},[]),d=k.useCallback(()=>s.current?null:(s.current=!0,n(!1),a),[a]);return{isEditing:r,editValue:a,inputRef:o,startEdit:c,cancelEdit:f,confirmEdit:d,setEditValue:i}}function R0e({open:e,onClose:r,onAdded:n}){const a=Ft(),[i,o]=k.useState(""),[s,c]=k.useState(""),[f,d]=k.useState(""),[h,m]=k.useState(5),[g,y]=k.useState(""),[_,E]=k.useState(!1),[w,x]=k.useState(null),[j,C]=k.useState([]),[T,O]=k.useState(!1),[N,M]=k.useState(-1),[R,L]=k.useState(""),D=k.useRef(null),q=k.useRef(null),z=k.useRef(null),H=k.useRef(null),F=k.useRef(null);k.useEffect(()=>()=>{F.current&&clearTimeout(F.current)},[]),k.useEffect(()=>{if(e){const $=setTimeout(()=>{var Y;return(Y=D.current)==null?void 0:Y.focus()},50);return()=>clearTimeout($)}},[e]),k.useEffect(()=>{e&&(o(""),c(""),d(""),m(5),y(""),x(null),E(!1),C([]),O(!1),M(-1),L(""))},[e]),k.useEffect(()=>{if(!e)return;function $(Y){Y.key==="Escape"&&(T?O(!1):r())}return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[e,r,T]),k.useEffect(()=>{if(!T)return;function $(Y){const G=Y.target;z.current&&!z.current.contains(G)&&H.current&&!H.current.contains(G)&&O(!1)}return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[T]);const X=k.useCallback($=>{q.current&&!q.current.contains($.target)&&r()},[r]),B=k.useCallback(async $=>{if(!$.trim()){C([]),O(!1);return}try{const Y=encodeURIComponent($),G=await a.get(`system/browse-dirs?path=${Y}`);C(G.dirs),L(G.parentPath),O(G.dirs.length>0),M(-1)}catch{C([]),O(!1)}},[a]),Q=k.useCallback($=>{c($),F.current&&clearTimeout(F.current);const Y=$.endsWith("/")||$.endsWith("\\")?$:$.substring(0,Math.max($.lastIndexOf("/"),$.lastIndexOf("\\"))+1);Y?F.current=setTimeout(()=>{B(Y)},300):(C([]),O(!1))},[B]),te=k.useCallback($=>{var Y;c($.path),O(!1),M(-1),i.trim()||o($.name),$.isGitRepo||setTimeout(()=>{B($.path+"/")},100),(Y=z.current)==null||Y.focus()},[i,B]),K=k.useCallback(()=>{if(!R)return;const $=R.replace(/\/[^/]+\/?$/,"");$&&$!==R&&(c($),B($+"/"))},[R,B]),de=j.length===0||s===R?!1:j.some($=>$.path===s&&$.isGitRepo),U=k.useCallback(async()=>{if(x(null),!i.trim()){x("Project name is required");return}if(!s.trim()){x("Repository path is required");return}E(!0);try{await a.post("projects",{name:i.trim(),repoPath:s.trim(),githubRepo:f.trim()||void 0,maxActiveTeams:h,model:g.trim()||void 0}),n()}catch($){const Y=$ instanceof Error?$.message:String($);x(Y||"Failed to add project")}finally{E(!1)}},[i,s,f,h,g,a,n]),J=k.useCallback($=>{if(T&&j.length>0){if($.key==="ArrowDown"){$.preventDefault(),M(Y=>Y<j.length-1?Y+1:0);return}if($.key==="ArrowUp"){$.preventDefault(),M(Y=>Y>0?Y-1:j.length-1);return}if($.key==="Enter"&&N>=0){$.preventDefault(),te(j[N]);return}if($.key==="Tab"&&N>=0){$.preventDefault(),te(j[N]);return}}$.key==="Enter"&&!_&&U()},[T,j,N,te,_,U]),le=k.useCallback($=>{$.key==="Enter"&&!_&&U()},[_,U]);return e?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:X,children:b.jsxs("div",{ref:q,className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Add Project",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Add Project"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project Name ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:D,type:"text",value:i,onChange:$=>o($.target.value),onKeyDown:le,placeholder:"my-project",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:_})]}),b.jsxs("div",{className:"relative",children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Repository Path ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{ref:z,type:"text",value:s,onChange:$=>Q($.target.value),onKeyDown:J,onFocus:()=>{j.length>0&&O(!0)},placeholder:"C:/Git/my-repo",className:`w-full px-3 py-2 text-sm rounded border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:ring-1 ${de?"border-green-500/50 focus:border-green-500 focus:ring-green-500/30":"border-dark-border focus:border-dark-accent focus:ring-dark-accent/30"}`,disabled:_,autoComplete:"off"}),de&&b.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-green-400",title:"Valid git repository",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Type a path and subdirectories will appear. End with / to browse."}),T&&j.length>0&&b.jsxs("div",{ref:H,className:"absolute z-10 left-0 right-0 mt-1 max-h-48 overflow-y-auto rounded border border-dark-border bg-dark-base shadow-lg",children:[R&&b.jsxs("button",{type:"button",onClick:K,className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-dark-muted hover:bg-dark-border/30 hover:text-dark-text transition-colors text-left",children:[b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),b.jsx("span",{children:".."}),b.jsx("span",{className:"ml-auto text-xs text-dark-muted/50 truncate",children:R})]}),j.map(($,Y)=>b.jsxs("button",{type:"button",onClick:()=>te($),className:`w-full flex items-center gap-2 px-3 py-1.5 text-sm transition-colors text-left ${Y===N?"bg-dark-accent/20 text-dark-text":"text-dark-text hover:bg-dark-border/30"}`,children:[$.isGitRepo?b.jsx("span",{className:"w-3.5 h-3.5 shrink-0 rounded-full bg-green-500/80 inline-flex items-center justify-center",title:"Git repository",children:b.jsx("svg",{className:"w-2 h-2 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0 text-dark-muted/50",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{d:"M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"})}),b.jsx("span",{className:"truncate",children:$.name}),$.isGitRepo&&b.jsx("span",{className:"ml-auto text-xs text-green-400/70 shrink-0",children:"git"})]},$.path))]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["GitHub Repo ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:f,onChange:$=>d($.target.value),onKeyDown:le,placeholder:"org/repo (auto-detected)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:_})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Max Active Teams"}),b.jsx("input",{type:"number",value:h,onChange:$=>m(Math.max(1,Math.min(50,parseInt($.target.value,10)||1))),onKeyDown:le,min:1,max:50,className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:_}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Max concurrent active teams before new launches are queued (1-50, default: 5)."})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Model ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:g,onChange:$=>y($.target.value),onKeyDown:le,placeholder:"e.g. opus, sonnet, claude-opus-4-6",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:_}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Claude model to use for teams in this project. Empty uses the default model."})]}),w&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:w})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",disabled:_,children:"Cancel"}),b.jsx("button",{onClick:U,disabled:_,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:_?"Adding...":"Add Project"})]})]})}):null}const tP={worktree:0,signal_file:1,stale_branch:2,team_record:3},D0e={worktree:"Worktrees",signal_file:"Signal Files",stale_branch:"Branches",team_record:"Database Records"},L0e={worktree:"📁",signal_file:"📄",stale_branch:"🌿",team_record:"🗑️"};function I0e(e){const r=[...e].sort((a,i)=>tP[a.type]-tP[i.type]),n=new Map;for(const a of r)n.has(a.type)||n.set(a.type,[]),n.get(a.type).push(a);return n}function z0e({projectId:e,open:r,onClose:n,onDone:a}){const i=Ft(),o=k.useRef(null),[s,c]=k.useState("loading"),[f,d]=k.useState(null),[h,m]=k.useState(new Set),[g,y]=k.useState(null),[_,E]=k.useState(null),[w,x]=k.useState(!1),j=k.useCallback(()=>{s==="result"&&a(),x(!1),n()},[s,n,a]);k.useEffect(()=>{if(!r)return;c("loading"),d(null),m(new Set),y(null),E(null);let L=!1;return(async()=>{try{const D=w?"?resetTeams=true":"",q=await i.get(`projects/${e}/cleanup-preview${D}`);if(L)return;d(q),m(new Set(q.items.map(z=>z.path))),c("preview")}catch(D){if(L)return;E(D instanceof Error?D.message:String(D)),c("preview")}})(),()=>{L=!0}},[r,e,i,w]),k.useEffect(()=>{if(!r)return;function L(D){D.key==="Escape"&&s!=="executing"&&j()}return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[r,s,j]);const C=k.useCallback(L=>{m(D=>{const q=new Set(D);return q.has(L)?q.delete(L):q.add(L),q})},[]),T=k.useCallback(()=>{f&&m(new Set(f.items.map(L=>L.path)))},[f]),O=k.useCallback(()=>{m(new Set)},[]),N=k.useCallback(async()=>{if(h.size!==0){c("executing"),E(null);try{const L=await i.post(`projects/${e}/cleanup`,{items:Array.from(h),resetTeams:w});y(L),c("result")}catch(L){E(L instanceof Error?L.message:String(L)),c("preview")}}},[i,e,h,w]),M=k.useCallback(L=>{o.current&&!o.current.contains(L.target)&&j()},[j]);if(!r)return null;const R=f?I0e(f.items):new Map;return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:M,children:b.jsxs("div",{ref:o,className:"w-[560px] max-w-[95vw] max-h-[80vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Clean Up",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsxs("h2",{className:"text-base font-semibold text-dark-text",children:["Clean Up",f?` — ${f.projectName}`:""]}),b.jsx("button",{onClick:j,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 min-h-0",children:[s==="loading"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Scanning for items to clean up..."})}),_&&b.jsx("div",{className:"mb-4 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:_}),s==="preview"&&f&&b.jsx("div",{className:"mb-4",children:b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2.5 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:w,onChange:L=>x(L.target.checked),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text font-medium",children:"Reset team history"}),w&&b.jsx("div",{className:"text-xs text-[#F85149]/80 mt-1",children:"This will delete all team records, events, and commands for this project from the database. The project will be like freshly added."})]})]})}),s==="preview"&&f&&f.items.length===0&&!_&&b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[b.jsx("span",{className:"text-3xl",children:"✨"}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Nothing to clean up!"}),b.jsx("p",{className:"text-dark-muted/60 text-xs",children:"This project is already tidy."})]}),s==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx("button",{onClick:T,className:"text-xs text-dark-accent hover:underline",children:"Select All"}),b.jsx("button",{onClick:O,className:"text-xs text-dark-muted hover:underline",children:"Deselect All"}),b.jsxs("span",{className:"ml-auto text-xs text-dark-muted",children:[h.size," of ",f.items.length," selected"]})]}),Array.from(R.entries()).map(([L,D])=>b.jsxs("div",{className:"mb-4",children:[b.jsxs("h3",{className:"text-xs font-semibold text-dark-muted uppercase tracking-wider mb-2",children:[L0e[L]," ",D0e[L]," (",D.length,")"]}),b.jsx("div",{className:"space-y-1",children:D.map(q=>b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:h.has(q.path),onChange:()=>C(q.path),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text truncate",title:q.path,children:q.name}),b.jsx("div",{className:"text-xs text-dark-muted/70 truncate",children:q.reason})]})]},q.path))})]},L))]}),s==="executing"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsxs("p",{className:"text-dark-muted text-sm",children:["Removing ",h.size," item",h.size!==1?"s":"","..."]})}),s==="result"&&g&&b.jsxs("div",{className:"py-4 space-y-3",children:[g.removed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-dark-text font-medium mb-1",children:["Removed ",g.removed.length," item",g.removed.length!==1?"s":""]}),b.jsx("ul",{className:"space-y-0.5",children:g.removed.map(L=>b.jsxs("li",{className:"text-xs text-dark-muted flex items-center gap-1.5",children:[b.jsx("span",{className:"text-green-400",children:"✓"})," ",L]},L))})]}),g.failed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-[#F85149] font-medium mb-1",children:[g.failed.length," failed"]}),b.jsx("ul",{className:"space-y-0.5",children:g.failed.map(L=>b.jsxs("li",{className:"text-xs text-[#F85149]/80 flex items-start gap-1.5",children:[b.jsx("span",{className:"shrink-0",children:"✗"}),b.jsxs("span",{className:"truncate",title:L.error,children:[L.name,": ",L.error]})]},L.name))})]}),g.removed.length===0&&g.failed.length===0&&b.jsx("p",{className:"text-sm text-dark-muted",children:"No items were removed."})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[s==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:j,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsxs("button",{onClick:N,disabled:h.size===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:["Remove Selected (",h.size,")"]})]}),(s==="result"||s==="preview"&&(!f||f.items.length===0))&&b.jsx("button",{onClick:j,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Close"})]})]})})}function q0e({items:e}){const[r,n]=k.useState(!1),a=k.useRef(null),i=k.useCallback(o=>{o.stopPropagation(),n(s=>!s)},[]);return k.useEffect(()=>{if(!r)return;function o(s){a.current&&!a.current.contains(s.target)&&n(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[r]),k.useEffect(()=>{if(!r)return;function o(s){s.key==="Escape"&&n(!1)}return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r]),b.jsxs("div",{ref:a,className:"relative",children:[b.jsx("button",{onClick:i,className:"p-1 rounded text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors",title:"More actions",children:b.jsx(UV,{size:16})}),r&&b.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[140px] bg-dark-surface border border-dark-border rounded-lg shadow-lg py-1",children:e.map(o=>b.jsx("button",{onClick:s=>{s.stopPropagation(),n(!1),o.onClick()},className:`w-full text-left px-3 py-1.5 text-xs transition-colors ${o.danger?"text-[#F85149] hover:bg-[#F85149]/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/30"}`,children:o.label},o.label))})]})}const rP={active:{bg:"#3FB95020",text:"#3FB950",border:"#3FB95040"},archived:{bg:"#8B949E20",text:"#8B949E",border:"#8B949E40"}};function B0e(e){var h,m,g,y,_,E,w;if(!e.installStatus)return"#8B949E";const r=e.installStatus,n=(h=r.gitCommitStatus)==null?void 0:h.health;if(n==="red")return"#F85149";const a=((m=r.hooks)==null?void 0:m.installed)??!1,i=((y=(g=r.hooks)==null?void 0:g.files)==null?void 0:y.some(x=>x.hasCrlf))??!1,o=((_=r.prompt)==null?void 0:_.installed)??!1,s=((E=r.agents)==null?void 0:E.installed)??!1,c=((w=r.settings)==null?void 0:w.exists)??!1;return a&&!i&&o&&s&&c?(r.outdatedCount??0)>0||n==="amber"?"#D29922":"#3FB950":a||o||s||c||i?"#D29922":"#F85149"}function $0e(e,r){var n,a,i,o,s;if((n=r==null?void 0:r.installStatus)!=null&&n.gitCommitStatus){const c=r.installStatus.gitCommitStatus;if(c.health==="red"&&e==="#F85149"||c.health==="amber"&&e==="#D29922")return c.message}if(e==="#D29922"&&(r!=null&&r.installStatus)){const c=r.installStatus,f=((a=c.hooks)==null?void 0:a.installed)??!1,d=((i=c.prompt)==null?void 0:i.installed)??!1,h=((o=c.agents)==null?void 0:o.installed)??!1,m=((s=c.settings)==null?void 0:s.exists)??!1;if(f&&d&&h&&m&&(c.outdatedCount??0)>0)return`${c.outdatedCount} file${c.outdatedCount===1?"":"s"} outdated`}switch(e){case"#3FB950":return"All installed";case"#D29922":return"Partially installed";case"#F85149":return"Not installed";default:return"Unknown"}}function F0e({project:e,repoSettings:r}){var c,f,d,h,m,g,y,_,E,w,x,j,C,T,O,N,M,R,L,D,q,z,H,F,X,B,Q,te;if(!e.installStatus)return b.jsx("span",{className:"text-xs text-dark-muted",title:"Install status unknown",children:"Status unknown"});const n=e.installStatus,a=n.currentVersion,i=[{key:"hooks",label:"hooks",installed:((c=n.hooks)==null?void 0:c.installed)??!1,hasCrlf:((d=(f=n.hooks)==null?void 0:f.files)==null?void 0:d.some(K=>K.hasCrlf))??!1,somePresent:(((h=n.hooks)==null?void 0:h.found)??0)>0,files:((m=n.hooks)==null?void 0:m.files)??[],summary:`Hook Scripts (${((g=n.hooks)==null?void 0:g.found)??0}/${((y=n.hooks)==null?void 0:y.total)??0})`,outdatedInCategory:(((_=n.hooks)==null?void 0:_.files)??[]).filter(K=>K.exists&&K.installedVersion!==a).length},{key:"prompt",label:"prompt",installed:((E=n.prompt)==null?void 0:E.installed)??!1,hasCrlf:!1,somePresent:((x=(w=n.prompt)==null?void 0:w.files)==null?void 0:x.some(K=>K.exists))??!1,files:((j=n.prompt)==null?void 0:j.files)??[],summary:"Prompt Files",outdatedInCategory:(((C=n.prompt)==null?void 0:C.files)??[]).filter(K=>K.exists&&K.installedVersion!==a).length},{key:"agents",label:"agents",installed:((T=n.agents)==null?void 0:T.installed)??!1,hasCrlf:!1,somePresent:((N=(O=n.agents)==null?void 0:O.files)==null?void 0:N.some(K=>K.exists))??!1,files:((M=n.agents)==null?void 0:M.files)??[],summary:"Agent Templates",outdatedInCategory:(((R=n.agents)==null?void 0:R.files)??[]).filter(K=>K.exists&&K.installedVersion!==a).length},{key:"guides",label:"guides",installed:((L=n.guides)==null?void 0:L.installed)??!1,hasCrlf:!1,somePresent:(((q=(D=n.guides)==null?void 0:D.files)==null?void 0:q.length)??0)>0,files:((z=n.guides)==null?void 0:z.files)??[],summary:`Guidebooks (${((F=(H=n.guides)==null?void 0:H.files)==null?void 0:F.length)??0})`,outdatedInCategory:(((X=n.guides)==null?void 0:X.files)??[]).filter(K=>K.exists&&K.installedVersion!==a).length}],o=((B=n.settings)==null?void 0:B.exists)&&n.settings.installedVersion!==a,s=[{key:"settings",label:"settings",exists:((Q=n.settings)==null?void 0:Q.exists)??!1,tooltip:(te=n.settings)!=null&&te.exists?o?`settings.json: v${n.settings.installedVersion||"?"} → v${a}`:"settings.json found":"settings.json missing",outdated:!!o}];return b.jsxs("div",{className:"flex items-center gap-3 text-xs flex-wrap",children:[i.map(K=>{const de=K.outdatedInCategory>0,U=K.installed&&!K.hasCrlf&&!de?"#3FB950":K.hasCrlf||de||K.somePresent?"#D29922":"#F85149",J=K.installed&&!K.hasCrlf&&!de?"✓":K.hasCrlf||de||K.somePresent?"⚠":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:U},children:[J," ",K.label]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full left-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-48 max-h-64 overflow-auto",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:K.summary}),K.files.map(le=>{const $=le.exists&&le.installedVersion!==a,Y=le.exists?le.hasCrlf||$?"#D29922":"#3FB950":"#F85149",G=le.exists?le.hasCrlf||$?"⚠":"✓":"✗",he=le.exists&&$?` (v${le.installedVersion||"?"} → v${a})`:le.hasCrlf?" (CRLF)":"";return b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:Y},children:G}),b.jsxs("span",{className:"text-[#8B949E] font-mono",children:[le.name,he]})]},le.name)})]})]},K.key)}),s.map(K=>{const de=K.exists?K.outdated?"#D29922":"#3FB950":"#F85149",U=K.exists?K.outdated?"⚠":"✓":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:de},children:[U," ",K.label]}),b.jsx("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs whitespace-nowrap",children:b.jsx("span",{className:"text-[#C9D1D9]",children:K.tooltip})})]},K.key)}),n.gitCommitStatus&&b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:n.gitCommitStatus.health==="green"?"#3FB950":n.gitCommitStatus.health==="amber"?"#D29922":n.gitCommitStatus.health==="red"?"#F85149":"#8B949E"},children:[n.gitCommitStatus.health==="green"?"✓":n.gitCommitStatus.health==="amber"?"⚠":n.gitCommitStatus.health==="red"?"✗":"?"," committed"]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-56 max-h-64 overflow-auto",children:[b.jsxs("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:["Git Commit Status (",n.gitCommitStatus.defaultBranch,")"]}),b.jsx("div",{className:"text-[#8B949E] mb-1",children:n.gitCommitStatus.message}),n.gitCommitStatus.gitignored&&b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:"#F85149"},children:"✗"}),b.jsx("span",{className:"text-[#8B949E]",children:".claude/ is in .gitignore"})]}),n.gitCommitStatus.files.map(K=>{const de=K.committed?K.committedVersion&&K.committedVersion!==K.currentVersion?"#D29922":"#3FB950":"#F85149",U=K.committed?K.committedVersion&&K.committedVersion!==K.currentVersion?"⚠":"✓":"✗",J=K.committed&&K.committedVersion&&K.committedVersion!==K.currentVersion?` (v${K.committedVersion} → v${K.currentVersion})`:"";return b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:de},children:U}),b.jsxs("span",{className:"text-[#8B949E] font-mono text-[11px]",children:[K.path,J]})]},K.path)})]})]}),r&&b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:r.autoMergeEnabled?"#3FB950":"#D29922"},children:[r.autoMergeEnabled?"✓":"⚠"," github"]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-52",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:"GitHub Repo Settings"}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:r.autoMergeEnabled?"#3FB950":"#D29922"},children:r.autoMergeEnabled?"✓":"⚠"}),b.jsx("span",{className:"text-[#8B949E]",children:r.autoMergeEnabled?"Auto-merge enabled":"Auto-merge disabled — required for gh pr merge --auto"})]}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:"#8B949E"},children:"•"}),b.jsxs("span",{className:"text-[#8B949E]",children:["Default branch: ",r.defaultBranch]})]}),r.branchProtection&&b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:r.branchProtection.enabled?"#3FB950":"#8B949E"},children:r.branchProtection.enabled?"✓":"•"}),b.jsx("span",{className:"text-[#8B949E]",children:r.branchProtection.enabled?`Branch protection (${r.branchProtection.requiredChecks.length} required check${r.branchProtection.requiredChecks.length!==1?"s":""})`:"No branch protection"})]})]})]})]})}function nP({project:e,groups:r,reinstalling:n,reinstallResult:a,onSaveLimit:i,onSaveModel:o,onReinstall:s,onCleanup:c,onDelete:f,onEditPrompt:d,onGroupChange:h,fetchRepoSettings:m,onCommitClaudeFiles:g}){var B,Q;const[y,_]=k.useState(!1),[E,w]=k.useState(void 0),[x,j]=k.useState(!1),[C,T]=k.useState(null),[O,N]=k.useState(!1),M=eP(e.maxActiveTeams),R=eP(e.model??"");k.useEffect(()=>{!y||O||(N(!0),m(e.id).then(te=>w(te)).catch(()=>w(null)))},[y,O,m,e.id]);const L=rP[e.status]||rP.active,D=B0e(e),q=$0e(D,e),z=e.queuedTeamCount??0,H=`${e.activeTeamCount}/${e.maxActiveTeams} active${z>0?` · ${z} queued`:""}`,F=k.useCallback(()=>{const te=M.confirmEdit();if(te===null)return;const K=Math.max(1,Math.min(50,te));i(e.id,K)},[M,i,e.id]),X=k.useCallback(()=>{const te=R.confirmEdit();te!==null&&o(e.id,te)},[R,o,e.id]);return b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>_(!y),children:[b.jsx(GV,{size:14,className:`text-dark-muted shrink-0 transition-transform ${y?"rotate-90":""}`}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate min-w-0",children:e.name}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium shrink-0",style:{backgroundColor:L.bg,color:L.text,border:`1px solid ${L.border}`},children:e.status}),b.jsx("span",{className:"text-xs text-dark-muted shrink-0",children:H}),b.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:D},title:q}),b.jsx("span",{className:"flex-1"}),(((B=e.installStatus)==null?void 0:B.outdatedCount)??0)>0&&b.jsx("button",{onClick:te=>{te.stopPropagation(),s(e)},disabled:n===e.id,className:"px-3 py-1 text-xs rounded border border-[#D29922]/40 text-[#D29922] bg-[#D29922]/10 hover:bg-[#D29922]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:`Update ${e.installStatus.outdatedCount} outdated file${e.installStatus.outdatedCount===1?"":"s"} to v${e.installStatus.currentVersion}`,children:n===e.id?"Updating...":"Update"}),b.jsx("button",{onClick:te=>{te.stopPropagation(),s(e)},disabled:n===e.id,className:"px-3 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:"(Re)install hooks, settings, and workflow prompt",children:n===e.id?"Installing...":"Reinstall"}),b.jsx(q0e,{items:[{label:"Clean Up",onClick:()=>c(e)},{label:"Delete",onClick:()=>f(e),danger:!0}]})]}),(a==null?void 0:a.id)===e.id&&b.jsx("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs ${a.ok?"border border-[#3FB950]/30 bg-[#3FB950]/10 text-[#3FB950]":"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]"}`,children:a.ok?"Installation completed successfully":`Installation failed: ${a.error}`}),((Q=e.installStatus)==null?void 0:Q.gitCommitStatus)&&(e.installStatus.gitCommitStatus.health==="red"||e.installStatus.gitCommitStatus.health==="amber")&&b.jsxs("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs flex items-center gap-2 ${e.installStatus.gitCommitStatus.health==="red"?"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]":"border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922]"}`,children:[b.jsxs("span",{className:"flex-1",children:[e.installStatus.gitCommitStatus.message,e.installStatus.gitCommitStatus.health==="red"&&!e.installStatus.gitCommitStatus.gitignored&&" — hooks and agents won't work in worktrees"]}),b.jsx("button",{onClick:async te=>{te.stopPropagation(),j(!0),T(null);try{const K=await g(e.id);T(K)}catch(K){T({ok:!1,error:K instanceof Error?K.message:String(K)})}finally{j(!1)}},disabled:x,className:`shrink-0 px-2 py-0.5 rounded border text-xs font-medium transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${e.installStatus.gitCommitStatus.health==="red"?"border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20":"border-[#D29922]/40 text-[#D29922] bg-[#D29922]/10 hover:bg-[#D29922]/20"}`,children:x?"Committing...":e.installStatus.gitCommitStatus.health==="amber"?"Update & Commit":"Fix"})]}),C&&b.jsx("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs ${C.ok?"border border-[#3FB950]/30 bg-[#3FB950]/10 text-[#3FB950]":"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]"}`,children:C.ok?".claude/ files committed successfully":`Commit failed: ${C.error}`}),y&&b.jsxs("div",{className:"border-t border-dark-border px-4 py-3 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Repository"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate",title:e.repoPath,children:e.repoPath}),e.githubRepo&&b.jsx("span",{className:"shrink-0",children:e.githubRepo})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Configuration"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted flex-wrap",children:[R.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Model:"}),b.jsx("input",{ref:R.inputRef,type:"text",value:R.editValue,onChange:te=>R.setEditValue(te.target.value),onKeyDown:te=>{te.key==="Enter"&&X(),te.key==="Escape"&&R.cancelEdit()},onBlur:X,placeholder:"default",className:"w-32 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>R.startEdit(e.model??""),title:"Click to edit model",children:["Model: ",e.model||"default",b.jsx(d5,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),M.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Max teams:"}),b.jsx("input",{ref:M.inputRef,type:"number",value:M.editValue,onChange:te=>M.setEditValue(parseInt(te.target.value,10)||1),onKeyDown:te=>{te.key==="Enter"&&F(),te.key==="Escape"&&M.cancelEdit()},onBlur:F,min:1,max:50,className:"w-12 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>M.startEdit(e.maxActiveTeams),title:"Click to edit max active teams",children:["Max teams: ",e.maxActiveTeams,b.jsx(d5,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),b.jsxs("select",{value:e.groupId??"",onChange:te=>{const K=te.target.value;h(e.id,K===""?null:parseInt(K,10))},onClick:te=>te.stopPropagation(),className:"shrink-0 px-1 py-0 text-xs rounded border border-dark-border bg-dark-base text-dark-muted hover:text-dark-text focus:outline-none cursor-pointer",title:"Assign to group",children:[b.jsx("option",{value:"",children:"No group"}),r.map(te=>b.jsx("option",{value:te.id,children:te.name},te.id))]})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Install Health"}),b.jsx(F0e,{project:e,repoSettings:E})]}),e.promptFile&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Prompt"}),b.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate text-dark-text/70",title:e.promptFile,children:e.promptFile}),b.jsx("button",{onClick:()=>d(e.id),className:"shrink-0 text-dark-accent/70 hover:text-dark-accent transition-colors",title:"Edit launch prompt",children:"Edit"})]})]})]})]})}function aP({title:e,description:r,projectCount:n,defaultExpanded:a,onEdit:i,onDelete:o,children:s}){const[c,f]=k.useState(a??!0);return b.jsxs("div",{className:"mb-4",children:[b.jsxs("button",{onClick:()=>f(!c),className:"flex items-center gap-2 w-full text-left py-2 group",children:[b.jsx("svg",{className:`w-3.5 h-3.5 text-dark-muted transition-transform ${c?"rotate-90":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text",children:e}),b.jsxs("span",{className:"text-xs text-dark-muted",children:["(",n,")"]}),r&&b.jsx("span",{className:"text-xs text-dark-muted/60 truncate ml-2",children:r}),i&&b.jsx("span",{onClick:d=>{d.stopPropagation(),i()},className:"ml-auto text-xs text-dark-muted hover:text-dark-text transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Edit group",children:"Edit"}),o&&b.jsx("span",{onClick:d=>{d.stopPropagation(),o()},className:"text-xs text-[#F85149]/70 hover:text-[#F85149] transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Delete group",children:"Delete"})]}),c&&b.jsx("div",{className:"space-y-3 ml-5",children:s})]})}function U0e({open:e,group:r,onClose:n,onSave:a}){const[i,o]=k.useState((r==null?void 0:r.name)??""),[s,c]=k.useState((r==null?void 0:r.description)??""),[f,d]=k.useState(null),h=k.useRef(null);if(k.useEffect(()=>{e&&(o((r==null?void 0:r.name)??""),c((r==null?void 0:r.description)??""),d(null),setTimeout(()=>{var g;return(g=h.current)==null?void 0:g.focus()},50))},[e,r]),!e)return null;const m=()=>{if(!i.trim()){d("Name is required");return}a(i.trim(),s.trim()||null)};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:g=>{g.target===g.currentTarget&&n()},children:b.jsxs("div",{className:"w-[400px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:r?"Edit Group":"New Group"}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Name"}),b.jsx("input",{ref:h,type:"text",value:i,onChange:g=>o(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"e.g. Backend Services"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Description (optional)"}),b.jsx("input",{type:"text",value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"Short description of this group"})]}),f&&b.jsx("div",{className:"text-xs text-[#F85149]",children:f})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:n,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:m,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:r?"Save":"Create"})]})]})})}function H0e(){const e=Ft(),[r,n]=k.useState([]),[a,i]=k.useState([]),[o,s]=k.useState(!0),[c,f]=k.useState(!1),[d,h]=k.useState(!1),[m,g]=k.useState(null),[y,_]=k.useState(null),[E,w]=k.useState(null),[x,j]=k.useState(""),[C,T]=k.useState(!1),[O,N]=k.useState(!1),[M,R]=k.useState(null),[L,D]=k.useState(null),[q,z]=k.useState(null),H=k.useCallback(async()=>{try{const ce=await e.get("projects");n(ce)}catch{}finally{s(!1)}},[e]),F=k.useCallback(async()=>{try{const ce=await e.get("project-groups");i(ce)}catch{}},[e]),X=k.useCallback(async ce=>{try{return await e.get(`projects/${ce}/repo-settings`)}catch{return null}},[e]);k.useEffect(()=>{H(),F()},[H,F]);const B=k.useCallback(()=>{g(null),h(!0)},[]),Q=k.useCallback(ce=>{g(ce),h(!0)},[]),te=k.useCallback(async ce=>{if(window.confirm(`Delete group "${ce.name}"? Projects in this group will become ungrouped.`))try{await e.del(`project-groups/${ce.id}`),await F(),await H()}catch(we){window.alert(`Failed to delete group: ${we instanceof Error?we.message:String(we)}`)}},[e,F,H]),K=k.useCallback(async(ce,ye)=>{try{m?await e.put(`project-groups/${m.id}`,{name:ce,description:ye}):await e.post("project-groups",{name:ce,description:ye}),h(!1),await F()}catch(we){window.alert(`Failed to save group: ${we instanceof Error?we.message:String(we)}`)}},[e,m,F]),de=k.useCallback(async(ce,ye)=>{n(we=>we.map(ke=>ke.id===ce?{...ke,groupId:ye}:ke));try{await e.put(`projects/${ce}`,{groupId:ye}),await F()}catch{await H(),await F()}},[e,H,F]),U=k.useCallback(async ce=>{if(window.confirm(`Delete project "${ce.name}"? This will stop all active teams and remove the project.`)){n(we=>we.filter(ke=>ke.id!==ce.id));try{await e.del(`projects/${ce.id}`),await F()}catch(we){await H(),await F(),window.alert(`Failed to delete project: ${we instanceof Error?we.message:String(we)}`)}}},[e,H,F]),J=k.useCallback(()=>{f(!1),H()},[H]),le=k.useCallback(async ce=>{D(ce.id),z(null);try{const ye=await e.post(`projects/${ce.id}/install`,{});z({id:ce.id,ok:ye.ok,error:ye.error}),ye.installStatus&&n(we=>we.map(ke=>ke.id===ce.id?{...ke,installStatus:ye.installStatus}:ke))}catch(ye){z({id:ce.id,ok:!1,error:ye instanceof Error?ye.message:String(ye)})}finally{D(null)}},[e]),$=k.useCallback(async ce=>{try{const ye=await e.post(`projects/${ce}/commit-claude-files`,{});return await H(),ye}catch(ye){return{ok:!1,error:ye instanceof Error?ye.message:String(ye)}}},[e,H]),Y=k.useCallback(ce=>{_(ce.id)},[]),G=k.useCallback(()=>{_(null)},[]),he=k.useCallback(()=>{H()},[H]),xe=k.useCallback(async(ce,ye)=>{n(we=>we.map(ke=>ke.id===ce?{...ke,maxActiveTeams:ye}:ke));try{await e.put(`projects/${ce}`,{maxActiveTeams:ye})}catch{await H()}},[e,H]),Z=k.useCallback(async(ce,ye)=>{const we=ye.trim()||null;n(ke=>ke.map(Ke=>Ke.id===ce?{...Ke,model:we}:Ke));try{await e.put(`projects/${ce}`,{model:we})}catch{await H()}},[e,H]);k.useEffect(()=>{E!==null&&(T(!0),R(null),e.get(`projects/${E}/prompt`).then(ce=>{j(ce.content)}).catch(ce=>{R(ce instanceof Error?ce.message:String(ce))}).finally(()=>{T(!1)}))},[E,e]),k.useEffect(()=>{if(E===null)return;function ce(ye){ye.key==="Escape"&&w(null)}return document.addEventListener("keydown",ce),()=>document.removeEventListener("keydown",ce)},[E]);const se=k.useCallback(async()=>{if(E!==null){N(!0),R(null);try{await e.put(`projects/${E}/prompt`,{content:x}),w(null)}catch(ce){R(ce instanceof Error?ce.message:String(ce))}finally{N(!1)}}},[E,x,e]),{groupedSections:ge,ungroupedProjects:ee}=k.useMemo(()=>{const ce=r.filter(we=>we.groupId==null);return{groupedSections:a.map(we=>({group:we,projects:r.filter(ke=>ke.groupId===we.id)})),ungroupedProjects:ce}},[r,a]),be={groups:a,reinstalling:L,reinstallResult:q,onSaveLimit:xe,onSaveModel:Z,onReinstall:le,onCleanup:Y,onDelete:U,onEditPrompt:w,onGroupChange:de,fetchRepoSettings:X,onCommitClaudeFiles:$};return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading projects..."})}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"p-6 max-w-5xl mx-auto",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Projects"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:B,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"New Group"}),b.jsx("button",{onClick:()=>f(!0),className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:"Add Project"})]})]}),r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No projects yet"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Add your first project to get started."})]}):b.jsxs("div",{children:[ge.map(({group:ce,projects:ye})=>b.jsx(aP,{title:ce.name,description:ce.description,projectCount:ye.length,onEdit:()=>Q(ce),onDelete:()=>te(ce),children:ye.length===0?b.jsx("p",{className:"text-xs text-dark-muted/60 py-2",children:"No projects in this group"}):ye.map(we=>b.jsx(nP,{project:we,...be},we.id))},ce.id)),ee.length>0&&b.jsx(aP,{title:"Ungrouped",projectCount:ee.length,defaultExpanded:!0,children:ee.map(ce=>b.jsx(nP,{project:ce,...be},ce.id))})]})]}),b.jsx(R0e,{open:c,onClose:()=>f(!1),onAdded:J}),y!==null&&b.jsx(z0e,{projectId:y,open:!0,onClose:G,onDone:he}),b.jsx(U0e,{open:d,group:m,onClose:()=>h(!1),onSave:K}),E!==null&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:ce=>{ce.target===ce.currentTarget&&w(null)},children:b.jsxs("div",{className:"w-[600px] max-w-[95vw] max-h-[80vh] bg-dark-surface border border-dark-border rounded-lg shadow-2xl flex flex-col",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Edit Launch Prompt"}),b.jsx("button",{onClick:()=>w(null),className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsx("div",{className:"px-5 py-4 flex-1 overflow-y-auto",children:C?b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading prompt..."}):b.jsxs(b.Fragment,{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-2",children:["Use ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," as a placeholder -- it will be replaced with the actual issue number at launch time."]}),b.jsx("textarea",{value:x,onChange:ce=>j(ce.target.value),className:"w-full h-48 px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30 font-mono resize-y",disabled:O}),M&&b.jsx("div",{className:"mt-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:M})]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[b.jsx("button",{onClick:()=>w(null),className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:se,disabled:O||C,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:O?"Saving...":"Save Prompt"})]})]})})]})}function qu(e){const r=Number(e);return r>=6e4?`${r/1e3}s (${r/6e4}min)`:r>=1e3?`${r/1e3}s`:`${r}ms`}const G0e=[{title:"Server",rows:[{key:"host",label:"Host",envVar:"FLEET_HOST",description:"Network interface to bind to"},{key:"port",label:"Port",envVar:"PORT",description:"HTTP server port"},{key:"claudeCmd",label:"Claude Command",envVar:"FLEET_CLAUDE_CMD",description:"CLI command used to invoke Claude"},{key:"resolvedClaudeCmd",label:"Resolved Claude Path",envVar:"(auto-detected)",description:"Actual path used after auto-detection (Windows) or explicit override"},{key:"enableAgentTeams",label:"Agent Teams",envVar:"FLEET_ENABLE_AGENT_TEAMS",description:"Enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var for spawned CC processes",format:e=>e?"Enabled":"Disabled"},{key:"outputBufferLines",label:"Output Buffer Lines",envVar:"(hardcoded)",description:"Max lines kept in team output buffer"}]},{title:"Thresholds",rows:[{key:"idleThresholdMin",label:"Idle Threshold",envVar:"FLEET_IDLE_THRESHOLD_MIN",description:"Minutes before a team is considered idle",format:e=>`${e} min`},{key:"stuckThresholdMin",label:"Stuck Threshold",envVar:"FLEET_STUCK_THRESHOLD_MIN",description:"Minutes before a team is considered stuck",format:e=>`${e} min`},{key:"launchTimeoutMin",label:"Launch Timeout",envVar:"FLEET_LAUNCH_TIMEOUT_MIN",description:"Minutes before a launching team is marked failed",format:e=>`${e} min`},{key:"maxUniqueCiFailures",label:"Max CI Failures",envVar:"FLEET_MAX_CI_FAILURES",description:"Unique CI failures before a team is blocked"},{key:"earlyCrashThresholdSec",label:"Early Crash Threshold",envVar:"FLEET_EARLY_CRASH_THRESHOLD_SEC",description:"Seconds before a SubagentStop is considered an early crash",format:e=>`${e}s`},{key:"earlyCrashMinTools",label:"Early Crash Min Tools",envVar:"FLEET_EARLY_CRASH_MIN_TOOLS",description:"Minimum tool-use events for a subagent to be considered healthy"}]},{title:"Polling Intervals",rows:[{key:"githubPollIntervalMs",label:"GitHub Poll Interval",envVar:"FLEET_GITHUB_POLL_MS",description:"How often to poll GitHub for PR/CI updates",format:qu},{key:"issuePollIntervalMs",label:"Issue Poll Interval",envVar:"FLEET_ISSUE_POLL_MS",description:"How often to poll for new issues",format:qu},{key:"stuckCheckIntervalMs",label:"Stuck Check Interval",envVar:"FLEET_STUCK_CHECK_MS",description:"How often to check for stuck teams",format:qu},{key:"usagePollIntervalMs",label:"Usage Poll Interval",envVar:"FLEET_USAGE_POLL_MS",description:"How often to poll API usage data",format:qu},{key:"sseHeartbeatMs",label:"SSE Heartbeat",envVar:"(hardcoded)",description:"Interval between SSE keepalive pings",format:qu}]},{title:"Paths",rows:[{key:"fleetCommanderRoot",label:"Fleet Commander Root",envVar:"FLEET_COMMANDER_ROOT",description:"Installation root directory"},{key:"dbPath",label:"Database Path",envVar:"FLEET_DB_PATH",description:"SQLite database file location"}]}];function V0e(){const e=Ft(),[r,n]=k.useState(null),[a,i]=k.useState(!0),[o,s]=k.useState(null),[c,f]=k.useState(!1),[d,h]=k.useState(!1),[m,g]=k.useState(""),y=k.useCallback(async()=>{try{const E=await e.get("settings");n(E),s(null)}catch(E){s(E instanceof Error?E.message:String(E))}finally{i(!1)}},[e]);k.useEffect(()=>{y()},[y]);const _=async()=>{f(!0);try{await e.post("system/factory-reset",{confirm:"FACTORY_RESET"}),window.location.href="/"}catch(E){alert("Factory reset failed: "+(E instanceof Error?E.message:String(E)))}finally{f(!1)}};return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading settings..."})}):o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load settings"}),b.jsx("p",{className:"text-dark-muted text-xs",children:o})]})}):r?b.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Settings"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Current runtime configuration. Set via environment variables — changes require a server restart."})]}),b.jsx("div",{className:"space-y-6",children:G0e.map(E=>b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-2",children:E.title}),b.jsx("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-dark-border",children:[b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[180px]",children:"Setting"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Value"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Env Variable"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider",children:"Description"})]})}),b.jsx("tbody",{children:E.rows.map((w,x)=>{const j=r[w.key],C=w.format?w.format(j):String(j);return b.jsxs("tr",{className:`border-b border-dark-border/50 last:border-b-0 ${x%2===1?"bg-dark-base/30":""}`,children:[b.jsx("td",{className:"px-4 py-2.5 text-dark-text font-medium",children:w.label}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:C})}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-muted font-mono text-xs",children:w.envVar})}),b.jsx("td",{className:"px-4 py-2.5 text-dark-muted",children:w.description})]},w.key)})})]})})]},E.title))}),b.jsxs("div",{className:"mt-6 bg-dark-surface border border-dark-border rounded-lg px-4 py-3",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-1",children:"Launch Prompt"}),b.jsxs("p",{className:"text-dark-muted text-sm",children:["Configured per-project via prompt files:"," ",b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:"prompts/{slug}-prompt.md"})]})]}),b.jsxs("div",{className:"mt-8 border border-[#F85149]/30 rounded p-4",children:[b.jsx("h3",{className:"text-[#F85149] font-semibold mb-2",children:"Danger Zone"}),b.jsx("p",{className:"text-[#8B949E] text-sm mb-3",children:"Factory reset will stop all running teams, uninstall hooks from all projects, and delete all data. The database will be recreated fresh with default settings."}),d?b.jsxs("div",{className:"mt-2 p-3 bg-[#F85149]/5 border border-[#F85149]/30 rounded",children:[b.jsx("p",{className:"text-[#F85149] text-sm font-medium mb-1",children:"This action cannot be undone."}),b.jsxs("p",{className:"text-[#8B949E] text-sm mb-3",children:["Type ",b.jsx("code",{className:"font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded text-dark-accent",children:"FACTORY_RESET"})," to confirm."]}),b.jsx("input",{type:"text",value:m,onChange:E=>g(E.target.value),placeholder:"FACTORY_RESET",autoFocus:!0,className:"w-full px-3 py-1.5 text-sm font-mono bg-dark-base border border-dark-border rounded text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-[#F85149]/60 mb-3"}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:_,disabled:c||m!=="FACTORY_RESET",className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:c?"Resetting...":"Confirm Factory Reset"}),b.jsx("button",{onClick:()=>{h(!1),g("")},disabled:c,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors disabled:opacity-50",children:"Cancel"})]})]}):b.jsx("button",{onClick:()=>h(!0),disabled:c,className:"px-4 py-2 text-sm bg-[#F85149]/10 text-[#F85149] border border-[#F85149]/40 rounded hover:bg-[#F85149]/20 disabled:opacity-50",children:"Factory Reset"})]})]}):null}function Dk(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var U0,iP;function K0e(){if(iP)return U0;iP=1;function e(){this.__data__=[],this.size=0}return U0=e,U0}var H0,oP;function ys(){if(oP)return H0;oP=1;function e(r,n){return r===n||r!==r&&n!==n}return H0=e,H0}var G0,lP;function dm(){if(lP)return G0;lP=1;var e=ys();function r(n,a){for(var i=n.length;i--;)if(e(n[i][0],a))return i;return-1}return G0=r,G0}var V0,sP;function Y0e(){if(sP)return V0;sP=1;var e=dm(),r=Array.prototype,n=r.splice;function a(i){var o=this.__data__,s=e(o,i);if(s<0)return!1;var c=o.length-1;return s==c?o.pop():n.call(o,s,1),--this.size,!0}return V0=a,V0}var K0,uP;function X0e(){if(uP)return K0;uP=1;var e=dm();function r(n){var a=this.__data__,i=e(a,n);return i<0?void 0:a[i][1]}return K0=r,K0}var Y0,cP;function W0e(){if(cP)return Y0;cP=1;var e=dm();function r(n){return e(this.__data__,n)>-1}return Y0=r,Y0}var X0,fP;function Z0e(){if(fP)return X0;fP=1;var e=dm();function r(n,a){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,a])):i[o][1]=a,this}return X0=r,X0}var W0,dP;function hm(){if(dP)return W0;dP=1;var e=K0e(),r=Y0e(),n=X0e(),a=W0e(),i=Z0e();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,W0=o,W0}var Z0,hP;function Q0e(){if(hP)return Z0;hP=1;var e=hm();function r(){this.__data__=new e,this.size=0}return Z0=r,Z0}var Q0,pP;function J0e(){if(pP)return Q0;pP=1;function e(r){var n=this.__data__,a=n.delete(r);return this.size=n.size,a}return Q0=e,Q0}var J0,mP;function ebe(){if(mP)return J0;mP=1;function e(r){return this.__data__.get(r)}return J0=e,J0}var eb,vP;function tbe(){if(vP)return eb;vP=1;function e(r){return this.__data__.has(r)}return eb=e,eb}var tb,gP;function g$(){if(gP)return tb;gP=1;var e=typeof yd=="object"&&yd&&yd.Object===Object&&yd;return tb=e,tb}var rb,yP;function zn(){if(yP)return rb;yP=1;var e=g$(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return rb=n,rb}var nb,bP;function bs(){if(bP)return nb;bP=1;var e=zn(),r=e.Symbol;return nb=r,nb}var ab,xP;function rbe(){if(xP)return ab;xP=1;var e=bs(),r=Object.prototype,n=r.hasOwnProperty,a=r.toString,i=e?e.toStringTag:void 0;function o(s){var c=n.call(s,i),f=s[i];try{s[i]=void 0;var d=!0}catch{}var h=a.call(s);return d&&(c?s[i]=f:delete s[i]),h}return ab=o,ab}var ib,_P;function nbe(){if(_P)return ib;_P=1;var e=Object.prototype,r=e.toString;function n(a){return r.call(a)}return ib=n,ib}var ob,wP;function Ho(){if(wP)return ob;wP=1;var e=bs(),r=rbe(),n=nbe(),a="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(c){return c==null?c===void 0?i:a:o&&o in Object(c)?r(c):n(c)}return ob=s,ob}var lb,SP;function _n(){if(SP)return lb;SP=1;function e(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}return lb=e,lb}var sb,EP;function Kc(){if(EP)return sb;EP=1;var e=Ho(),r=_n(),n="[object AsyncFunction]",a="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(c){if(!r(c))return!1;var f=e(c);return f==a||f==i||f==n||f==o}return sb=s,sb}var ub,kP;function abe(){if(kP)return ub;kP=1;var e=zn(),r=e["__core-js_shared__"];return ub=r,ub}var cb,AP;function ibe(){if(AP)return cb;AP=1;var e=abe(),r=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function n(a){return!!r&&r in a}return cb=n,cb}var fb,jP;function y$(){if(jP)return fb;jP=1;var e=Function.prototype,r=e.toString;function n(a){if(a!=null){try{return r.call(a)}catch{}try{return a+""}catch{}}return""}return fb=n,fb}var db,CP;function obe(){if(CP)return db;CP=1;var e=Kc(),r=ibe(),n=_n(),a=y$(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,d=c.hasOwnProperty,h=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||r(g))return!1;var y=e(g)?h:o;return y.test(a(g))}return db=m,db}var hb,OP;function lbe(){if(OP)return hb;OP=1;function e(r,n){return r==null?void 0:r[n]}return hb=e,hb}var pb,TP;function Go(){if(TP)return pb;TP=1;var e=obe(),r=lbe();function n(a,i){var o=r(a,i);return e(o)?o:void 0}return pb=n,pb}var mb,NP;function Lk(){if(NP)return mb;NP=1;var e=Go(),r=zn(),n=e(r,"Map");return mb=n,mb}var vb,MP;function pm(){if(MP)return vb;MP=1;var e=Go(),r=e(Object,"create");return vb=r,vb}var gb,PP;function sbe(){if(PP)return gb;PP=1;var e=pm();function r(){this.__data__=e?e(null):{},this.size=0}return gb=r,gb}var yb,RP;function ube(){if(RP)return yb;RP=1;function e(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}return yb=e,yb}var bb,DP;function cbe(){if(DP)return bb;DP=1;var e=pm(),r="__lodash_hash_undefined__",n=Object.prototype,a=n.hasOwnProperty;function i(o){var s=this.__data__;if(e){var c=s[o];return c===r?void 0:c}return a.call(s,o)?s[o]:void 0}return bb=i,bb}var xb,LP;function fbe(){if(LP)return xb;LP=1;var e=pm(),r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return xb=a,xb}var _b,IP;function dbe(){if(IP)return _b;IP=1;var e=pm(),r="__lodash_hash_undefined__";function n(a,i){var o=this.__data__;return this.size+=this.has(a)?0:1,o[a]=e&&i===void 0?r:i,this}return _b=n,_b}var wb,zP;function hbe(){if(zP)return wb;zP=1;var e=sbe(),r=ube(),n=cbe(),a=fbe(),i=dbe();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,wb=o,wb}var Sb,qP;function pbe(){if(qP)return Sb;qP=1;var e=hbe(),r=hm(),n=Lk();function a(){this.size=0,this.__data__={hash:new e,map:new(n||r),string:new e}}return Sb=a,Sb}var Eb,BP;function mbe(){if(BP)return Eb;BP=1;function e(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}return Eb=e,Eb}var kb,$P;function mm(){if($P)return kb;$P=1;var e=mbe();function r(n,a){var i=n.__data__;return e(a)?i[typeof a=="string"?"string":"hash"]:i.map}return kb=r,kb}var Ab,FP;function vbe(){if(FP)return Ab;FP=1;var e=mm();function r(n){var a=e(this,n).delete(n);return this.size-=a?1:0,a}return Ab=r,Ab}var jb,UP;function gbe(){if(UP)return jb;UP=1;var e=mm();function r(n){return e(this,n).get(n)}return jb=r,jb}var Cb,HP;function ybe(){if(HP)return Cb;HP=1;var e=mm();function r(n){return e(this,n).has(n)}return Cb=r,Cb}var Ob,GP;function bbe(){if(GP)return Ob;GP=1;var e=mm();function r(n,a){var i=e(this,n),o=i.size;return i.set(n,a),this.size+=i.size==o?0:1,this}return Ob=r,Ob}var Tb,VP;function Ik(){if(VP)return Tb;VP=1;var e=pbe(),r=vbe(),n=gbe(),a=ybe(),i=bbe();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Tb=o,Tb}var Nb,KP;function xbe(){if(KP)return Nb;KP=1;var e=hm(),r=Lk(),n=Ik(),a=200;function i(o,s){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!r||f.length<a-1)return f.push([o,s]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,s),this.size=c.size,this}return Nb=i,Nb}var Mb,YP;function vm(){if(YP)return Mb;YP=1;var e=hm(),r=Q0e(),n=J0e(),a=ebe(),i=tbe(),o=xbe();function s(c){var f=this.__data__=new e(c);this.size=f.size}return s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=a,s.prototype.has=i,s.prototype.set=o,Mb=s,Mb}var Pb,XP;function zk(){if(XP)return Pb;XP=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i&&n(r[a],a,r)!==!1;);return r}return Pb=e,Pb}var Rb,WP;function b$(){if(WP)return Rb;WP=1;var e=Go(),r=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Rb=r,Rb}var Db,ZP;function gm(){if(ZP)return Db;ZP=1;var e=b$();function r(n,a,i){a=="__proto__"&&e?e(n,a,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[a]=i}return Db=r,Db}var Lb,QP;function ym(){if(QP)return Lb;QP=1;var e=gm(),r=ys(),n=Object.prototype,a=n.hasOwnProperty;function i(o,s,c){var f=o[s];(!(a.call(o,s)&&r(f,c))||c===void 0&&!(s in o))&&e(o,s,c)}return Lb=i,Lb}var Ib,JP;function Yc(){if(JP)return Ib;JP=1;var e=ym(),r=gm();function n(a,i,o,s){var c=!o;o||(o={});for(var f=-1,d=i.length;++f<d;){var h=i[f],m=s?s(o[h],a[h],h,o,a):void 0;m===void 0&&(m=a[h]),c?r(o,h,m):e(o,h,m)}return o}return Ib=n,Ib}var zb,eR;function _be(){if(eR)return zb;eR=1;function e(r,n){for(var a=-1,i=Array(r);++a<r;)i[a]=n(a);return i}return zb=e,zb}var qb,tR;function ha(){if(tR)return qb;tR=1;function e(r){return r!=null&&typeof r=="object"}return qb=e,qb}var Bb,rR;function wbe(){if(rR)return Bb;rR=1;var e=Ho(),r=ha(),n="[object Arguments]";function a(i){return r(i)&&e(i)==n}return Bb=a,Bb}var $b,nR;function Xc(){if(nR)return $b;nR=1;var e=wbe(),r=ha(),n=Object.prototype,a=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(s){return r(s)&&a.call(s,"callee")&&!i.call(s,"callee")};return $b=o,$b}var Fb,aR;function Tt(){if(aR)return Fb;aR=1;var e=Array.isArray;return Fb=e,Fb}var Ku={exports:{}},Ub,iR;function Sbe(){if(iR)return Ub;iR=1;function e(){return!1}return Ub=e,Ub}Ku.exports;var oR;function xs(){return oR||(oR=1,(function(e,r){var n=zn(),a=Sbe(),i=r&&!r.nodeType&&r,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,c=s?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||a;e.exports=d})(Ku,Ku.exports)),Ku.exports}var Hb,lR;function bm(){if(lR)return Hb;lR=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(a,i){var o=typeof a;return i=i??e,!!i&&(o=="number"||o!="symbol"&&r.test(a))&&a>-1&&a%1==0&&a<i}return Hb=n,Hb}var Gb,sR;function qk(){if(sR)return Gb;sR=1;var e=9007199254740991;function r(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Gb=r,Gb}var Vb,uR;function Ebe(){if(uR)return Vb;uR=1;var e=Ho(),r=qk(),n=ha(),a="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",y="[object Set]",_="[object String]",E="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",j="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",O="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",q={};q[j]=q[C]=q[T]=q[O]=q[N]=q[M]=q[R]=q[L]=q[D]=!0,q[a]=q[i]=q[w]=q[o]=q[x]=q[s]=q[c]=q[f]=q[d]=q[h]=q[m]=q[g]=q[y]=q[_]=q[E]=!1;function z(H){return n(H)&&r(H.length)&&!!q[e(H)]}return Vb=z,Vb}var Kb,cR;function xm(){if(cR)return Kb;cR=1;function e(r){return function(n){return r(n)}}return Kb=e,Kb}var Yu={exports:{}};Yu.exports;var fR;function Bk(){return fR||(fR=1,(function(e,r){var n=g$(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}})();e.exports=c})(Yu,Yu.exports)),Yu.exports}var Yb,dR;function Wc(){if(dR)return Yb;dR=1;var e=Ebe(),r=xm(),n=Bk(),a=n&&n.isTypedArray,i=a?r(a):e;return Yb=i,Yb}var Xb,hR;function x$(){if(hR)return Xb;hR=1;var e=_be(),r=Xc(),n=Tt(),a=xs(),i=bm(),o=Wc(),s=Object.prototype,c=s.hasOwnProperty;function f(d,h){var m=n(d),g=!m&&r(d),y=!m&&!g&&a(d),_=!m&&!g&&!y&&o(d),E=m||g||y||_,w=E?e(d.length,String):[],x=w.length;for(var j in d)(h||c.call(d,j))&&!(E&&(j=="length"||y&&(j=="offset"||j=="parent")||_&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||i(j,x)))&&w.push(j);return w}return Xb=f,Xb}var Wb,pR;function _m(){if(pR)return Wb;pR=1;var e=Object.prototype;function r(n){var a=n&&n.constructor,i=typeof a=="function"&&a.prototype||e;return n===i}return Wb=r,Wb}var Zb,mR;function _$(){if(mR)return Zb;mR=1;function e(r,n){return function(a){return r(n(a))}}return Zb=e,Zb}var Qb,vR;function kbe(){if(vR)return Qb;vR=1;var e=_$(),r=e(Object.keys,Object);return Qb=r,Qb}var Jb,gR;function $k(){if(gR)return Jb;gR=1;var e=_m(),r=kbe(),n=Object.prototype,a=n.hasOwnProperty;function i(o){if(!e(o))return r(o);var s=[];for(var c in Object(o))a.call(o,c)&&c!="constructor"&&s.push(c);return s}return Jb=i,Jb}var e1,yR;function ii(){if(yR)return e1;yR=1;var e=Kc(),r=qk();function n(a){return a!=null&&r(a.length)&&!e(a)}return e1=n,e1}var t1,bR;function Yi(){if(bR)return t1;bR=1;var e=x$(),r=$k(),n=ii();function a(i){return n(i)?e(i):r(i)}return t1=a,t1}var r1,xR;function Abe(){if(xR)return r1;xR=1;var e=Yc(),r=Yi();function n(a,i){return a&&e(i,r(i),a)}return r1=n,r1}var n1,_R;function jbe(){if(_R)return n1;_R=1;function e(r){var n=[];if(r!=null)for(var a in Object(r))n.push(a);return n}return n1=e,n1}var a1,wR;function Cbe(){if(wR)return a1;wR=1;var e=_n(),r=_m(),n=jbe(),a=Object.prototype,i=a.hasOwnProperty;function o(s){if(!e(s))return n(s);var c=r(s),f=[];for(var d in s)d=="constructor"&&(c||!i.call(s,d))||f.push(d);return f}return a1=o,a1}var i1,SR;function Vo(){if(SR)return i1;SR=1;var e=x$(),r=Cbe(),n=ii();function a(i){return n(i)?e(i,!0):r(i)}return i1=a,i1}var o1,ER;function Obe(){if(ER)return o1;ER=1;var e=Yc(),r=Vo();function n(a,i){return a&&e(i,r(i),a)}return o1=n,o1}var Xu={exports:{}};Xu.exports;var kR;function w$(){return kR||(kR=1,(function(e,r){var n=zn(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function f(d,h){if(h)return d.slice();var m=d.length,g=c?c(m):new d.constructor(m);return d.copy(g),g}e.exports=f})(Xu,Xu.exports)),Xu.exports}var l1,AR;function S$(){if(AR)return l1;AR=1;function e(r,n){var a=-1,i=r.length;for(n||(n=Array(i));++a<i;)n[a]=r[a];return n}return l1=e,l1}var s1,jR;function E$(){if(jR)return s1;jR=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=0,s=[];++a<i;){var c=r[a];n(c,a,r)&&(s[o++]=c)}return s}return s1=e,s1}var u1,CR;function k$(){if(CR)return u1;CR=1;function e(){return[]}return u1=e,u1}var c1,OR;function Fk(){if(OR)return c1;OR=1;var e=E$(),r=k$(),n=Object.prototype,a=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(c){return a.call(s,c)}))}:r;return c1=o,c1}var f1,TR;function Tbe(){if(TR)return f1;TR=1;var e=Yc(),r=Fk();function n(a,i){return e(a,r(a),i)}return f1=n,f1}var d1,NR;function Uk(){if(NR)return d1;NR=1;function e(r,n){for(var a=-1,i=n.length,o=r.length;++a<i;)r[o+a]=n[a];return r}return d1=e,d1}var h1,MR;function wm(){if(MR)return h1;MR=1;var e=_$(),r=e(Object.getPrototypeOf,Object);return h1=r,h1}var p1,PR;function A$(){if(PR)return p1;PR=1;var e=Uk(),r=wm(),n=Fk(),a=k$(),i=Object.getOwnPropertySymbols,o=i?function(s){for(var c=[];s;)e(c,n(s)),s=r(s);return c}:a;return p1=o,p1}var m1,RR;function Nbe(){if(RR)return m1;RR=1;var e=Yc(),r=A$();function n(a,i){return e(a,r(a),i)}return m1=n,m1}var v1,DR;function j$(){if(DR)return v1;DR=1;var e=Uk(),r=Tt();function n(a,i,o){var s=i(a);return r(a)?s:e(s,o(a))}return v1=n,v1}var g1,LR;function C$(){if(LR)return g1;LR=1;var e=j$(),r=Fk(),n=Yi();function a(i){return e(i,n,r)}return g1=a,g1}var y1,IR;function Mbe(){if(IR)return y1;IR=1;var e=j$(),r=A$(),n=Vo();function a(i){return e(i,n,r)}return y1=a,y1}var b1,zR;function Pbe(){if(zR)return b1;zR=1;var e=Go(),r=zn(),n=e(r,"DataView");return b1=n,b1}var x1,qR;function Rbe(){if(qR)return x1;qR=1;var e=Go(),r=zn(),n=e(r,"Promise");return x1=n,x1}var _1,BR;function O$(){if(BR)return _1;BR=1;var e=Go(),r=zn(),n=e(r,"Set");return _1=n,_1}var w1,$R;function Dbe(){if($R)return w1;$R=1;var e=Go(),r=zn(),n=e(r,"WeakMap");return w1=n,w1}var S1,FR;function _s(){if(FR)return S1;FR=1;var e=Pbe(),r=Lk(),n=Rbe(),a=O$(),i=Dbe(),o=Ho(),s=y$(),c="[object Map]",f="[object Object]",d="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",y=s(e),_=s(r),E=s(n),w=s(a),x=s(i),j=o;return(e&&j(new e(new ArrayBuffer(1)))!=g||r&&j(new r)!=c||n&&j(n.resolve())!=d||a&&j(new a)!=h||i&&j(new i)!=m)&&(j=function(C){var T=o(C),O=T==f?C.constructor:void 0,N=O?s(O):"";if(N)switch(N){case y:return g;case _:return c;case E:return d;case w:return h;case x:return m}return T}),S1=j,S1}var E1,UR;function Lbe(){if(UR)return E1;UR=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=a.length,o=new a.constructor(i);return i&&typeof a[0]=="string"&&r.call(a,"index")&&(o.index=a.index,o.input=a.input),o}return E1=n,E1}var k1,HR;function T$(){if(HR)return k1;HR=1;var e=zn(),r=e.Uint8Array;return k1=r,k1}var A1,GR;function Hk(){if(GR)return A1;GR=1;var e=T$();function r(n){var a=new n.constructor(n.byteLength);return new e(a).set(new e(n)),a}return A1=r,A1}var j1,VR;function Ibe(){if(VR)return j1;VR=1;var e=Hk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return j1=r,j1}var C1,KR;function zbe(){if(KR)return C1;KR=1;var e=/\w*$/;function r(n){var a=new n.constructor(n.source,e.exec(n));return a.lastIndex=n.lastIndex,a}return C1=r,C1}var O1,YR;function qbe(){if(YR)return O1;YR=1;var e=bs(),r=e?e.prototype:void 0,n=r?r.valueOf:void 0;function a(i){return n?Object(n.call(i)):{}}return O1=a,O1}var T1,XR;function N$(){if(XR)return T1;XR=1;var e=Hk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return T1=r,T1}var N1,WR;function Bbe(){if(WR)return N1;WR=1;var e=Hk(),r=Ibe(),n=zbe(),a=qbe(),i=N$(),o="[object Boolean]",s="[object Date]",c="[object Map]",f="[object Number]",d="[object RegExp]",h="[object Set]",m="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",w="[object Float64Array]",x="[object Int8Array]",j="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",O="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]";function R(L,D,q){var z=L.constructor;switch(D){case y:return e(L);case o:case s:return new z(+L);case _:return r(L,q);case E:case w:case x:case j:case C:case T:case O:case N:case M:return i(L,q);case c:return new z;case f:case m:return new z(L);case d:return n(L);case h:return new z;case g:return a(L)}}return N1=R,N1}var M1,ZR;function M$(){if(ZR)return M1;ZR=1;var e=_n(),r=Object.create,n=(function(){function a(){}return function(i){if(!e(i))return{};if(r)return r(i);a.prototype=i;var o=new a;return a.prototype=void 0,o}})();return M1=n,M1}var P1,QR;function P$(){if(QR)return P1;QR=1;var e=M$(),r=wm(),n=_m();function a(i){return typeof i.constructor=="function"&&!n(i)?e(r(i)):{}}return P1=a,P1}var R1,JR;function $be(){if(JR)return R1;JR=1;var e=_s(),r=ha(),n="[object Map]";function a(i){return r(i)&&e(i)==n}return R1=a,R1}var D1,eD;function Fbe(){if(eD)return D1;eD=1;var e=$be(),r=xm(),n=Bk(),a=n&&n.isMap,i=a?r(a):e;return D1=i,D1}var L1,tD;function Ube(){if(tD)return L1;tD=1;var e=_s(),r=ha(),n="[object Set]";function a(i){return r(i)&&e(i)==n}return L1=a,L1}var I1,rD;function Hbe(){if(rD)return I1;rD=1;var e=Ube(),r=xm(),n=Bk(),a=n&&n.isSet,i=a?r(a):e;return I1=i,I1}var z1,nD;function R$(){if(nD)return z1;nD=1;var e=vm(),r=zk(),n=ym(),a=Abe(),i=Obe(),o=w$(),s=S$(),c=Tbe(),f=Nbe(),d=C$(),h=Mbe(),m=_s(),g=Lbe(),y=Bbe(),_=P$(),E=Tt(),w=xs(),x=Fbe(),j=_n(),C=Hbe(),T=Yi(),O=Vo(),N=1,M=2,R=4,L="[object Arguments]",D="[object Array]",q="[object Boolean]",z="[object Date]",H="[object Error]",F="[object Function]",X="[object GeneratorFunction]",B="[object Map]",Q="[object Number]",te="[object Object]",K="[object RegExp]",de="[object Set]",U="[object String]",J="[object Symbol]",le="[object WeakMap]",$="[object ArrayBuffer]",Y="[object DataView]",G="[object Float32Array]",he="[object Float64Array]",xe="[object Int8Array]",Z="[object Int16Array]",se="[object Int32Array]",ge="[object Uint8Array]",ee="[object Uint8ClampedArray]",be="[object Uint16Array]",ce="[object Uint32Array]",ye={};ye[L]=ye[D]=ye[$]=ye[Y]=ye[q]=ye[z]=ye[G]=ye[he]=ye[xe]=ye[Z]=ye[se]=ye[B]=ye[Q]=ye[te]=ye[K]=ye[de]=ye[U]=ye[J]=ye[ge]=ye[ee]=ye[be]=ye[ce]=!0,ye[H]=ye[F]=ye[le]=!1;function we(ke,Ke,Yr,Ss,li,qn){var nr,It=Ke&N,Yo=Ke&M,Qc=Ke&R;if(Yr&&(nr=li?Yr(ke,Ss,li,qn):Yr(ke)),nr!==void 0)return nr;if(!j(ke))return ke;var Es=E(ke);if(Es){if(nr=g(ke),!It)return s(ke,nr)}else{var Sn=m(ke),Jc=Sn==F||Sn==X;if(w(ke))return o(ke,It);if(Sn==te||Sn==L||Jc&&!li){if(nr=Yo||Jc?{}:_(ke),!It)return Yo?f(ke,i(nr,ke)):c(ke,a(nr,ke))}else{if(!ye[Sn])return li?ke:{};nr=y(ke,Sn,It)}}qn||(qn=new e);var ks=qn.get(ke);if(ks)return ks;qn.set(ke,nr),C(ke)?ke.forEach(function(xr){nr.add(we(xr,Ke,Yr,xr,ke,qn))}):x(ke)&&ke.forEach(function(xr,_t){nr.set(_t,we(xr,Ke,Yr,_t,ke,qn))});var Om=Qc?Yo?h:d:Yo?O:T,ef=Es?void 0:Om(ke);return r(ef||ke,function(xr,_t){ef&&(_t=xr,xr=ke[_t]),n(nr,_t,we(xr,Ke,Yr,_t,ke,qn))}),nr}return z1=we,z1}var q1,aD;function Gbe(){if(aD)return q1;aD=1;var e=R$(),r=4;function n(a){return e(a,r)}return q1=n,q1}var B1,iD;function Gk(){if(iD)return B1;iD=1;function e(r){return function(){return r}}return B1=e,B1}var $1,oD;function Vbe(){if(oD)return $1;oD=1;function e(r){return function(n,a,i){for(var o=-1,s=Object(n),c=i(n),f=c.length;f--;){var d=c[r?f:++o];if(a(s[d],d,s)===!1)break}return n}}return $1=e,$1}var F1,lD;function Vk(){if(lD)return F1;lD=1;var e=Vbe(),r=e();return F1=r,F1}var U1,sD;function Kk(){if(sD)return U1;sD=1;var e=Vk(),r=Yi();function n(a,i){return a&&e(a,i,r)}return U1=n,U1}var H1,uD;function Kbe(){if(uD)return H1;uD=1;var e=ii();function r(n,a){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var s=i.length,c=a?s:-1,f=Object(i);(a?c--:++c<s)&&o(f[c],c,f)!==!1;);return i}}return H1=r,H1}var G1,cD;function Sm(){if(cD)return G1;cD=1;var e=Kk(),r=Kbe(),n=r(e);return G1=n,G1}var V1,fD;function Ko(){if(fD)return V1;fD=1;function e(r){return r}return V1=e,V1}var K1,dD;function D$(){if(dD)return K1;dD=1;var e=Ko();function r(n){return typeof n=="function"?n:e}return K1=r,K1}var Y1,hD;function L$(){if(hD)return Y1;hD=1;var e=zk(),r=Sm(),n=D$(),a=Tt();function i(o,s){var c=a(o)?e:r;return c(o,n(s))}return Y1=i,Y1}var X1,pD;function I$(){return pD||(pD=1,X1=L$()),X1}var W1,mD;function Ybe(){if(mD)return W1;mD=1;var e=Sm();function r(n,a){var i=[];return e(n,function(o,s,c){a(o,s,c)&&i.push(o)}),i}return W1=r,W1}var Z1,vD;function Xbe(){if(vD)return Z1;vD=1;var e="__lodash_hash_undefined__";function r(n){return this.__data__.set(n,e),this}return Z1=r,Z1}var Q1,gD;function Wbe(){if(gD)return Q1;gD=1;function e(r){return this.__data__.has(r)}return Q1=e,Q1}var J1,yD;function z$(){if(yD)return J1;yD=1;var e=Ik(),r=Xbe(),n=Wbe();function a(i){var o=-1,s=i==null?0:i.length;for(this.__data__=new e;++o<s;)this.add(i[o])}return a.prototype.add=a.prototype.push=r,a.prototype.has=n,J1=a,J1}var ex,bD;function Zbe(){if(bD)return ex;bD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(r[a],a,r))return!0;return!1}return ex=e,ex}var tx,xD;function q$(){if(xD)return tx;xD=1;function e(r,n){return r.has(n)}return tx=e,tx}var rx,_D;function B$(){if(_D)return rx;_D=1;var e=z$(),r=Zbe(),n=q$(),a=1,i=2;function o(s,c,f,d,h,m){var g=f&a,y=s.length,_=c.length;if(y!=_&&!(g&&_>y))return!1;var E=m.get(s),w=m.get(c);if(E&&w)return E==c&&w==s;var x=-1,j=!0,C=f&i?new e:void 0;for(m.set(s,c),m.set(c,s);++x<y;){var T=s[x],O=c[x];if(d)var N=g?d(O,T,x,c,s,m):d(T,O,x,s,c,m);if(N!==void 0){if(N)continue;j=!1;break}if(C){if(!r(c,function(M,R){if(!n(C,R)&&(T===M||h(T,M,f,d,m)))return C.push(R)})){j=!1;break}}else if(!(T===O||h(T,O,f,d,m))){j=!1;break}}return m.delete(s),m.delete(c),j}return rx=o,rx}var nx,wD;function Qbe(){if(wD)return nx;wD=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i,o){a[++n]=[o,i]}),a}return nx=e,nx}var ax,SD;function Yk(){if(SD)return ax;SD=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i){a[++n]=i}),a}return ax=e,ax}var ix,ED;function Jbe(){if(ED)return ix;ED=1;var e=bs(),r=T$(),n=ys(),a=B$(),i=Qbe(),o=Yk(),s=1,c=2,f="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",y="[object RegExp]",_="[object Set]",E="[object String]",w="[object Symbol]",x="[object ArrayBuffer]",j="[object DataView]",C=e?e.prototype:void 0,T=C?C.valueOf:void 0;function O(N,M,R,L,D,q,z){switch(R){case j:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case x:return!(N.byteLength!=M.byteLength||!q(new r(N),new r(M)));case f:case d:case g:return n(+N,+M);case h:return N.name==M.name&&N.message==M.message;case y:case E:return N==M+"";case m:var H=i;case _:var F=L&s;if(H||(H=o),N.size!=M.size&&!F)return!1;var X=z.get(N);if(X)return X==M;L|=c,z.set(N,M);var B=a(H(N),H(M),L,D,q,z);return z.delete(N),B;case w:if(T)return T.call(N)==T.call(M)}return!1}return ix=O,ix}var ox,kD;function e1e(){if(kD)return ox;kD=1;var e=C$(),r=1,n=Object.prototype,a=n.hasOwnProperty;function i(o,s,c,f,d,h){var m=c&r,g=e(o),y=g.length,_=e(s),E=_.length;if(y!=E&&!m)return!1;for(var w=y;w--;){var x=g[w];if(!(m?x in s:a.call(s,x)))return!1}var j=h.get(o),C=h.get(s);if(j&&C)return j==s&&C==o;var T=!0;h.set(o,s),h.set(s,o);for(var O=m;++w<y;){x=g[w];var N=o[x],M=s[x];if(f)var R=m?f(M,N,x,s,o,h):f(N,M,x,o,s,h);if(!(R===void 0?N===M||d(N,M,c,f,h):R)){T=!1;break}O||(O=x=="constructor")}if(T&&!O){var L=o.constructor,D=s.constructor;L!=D&&"constructor"in o&&"constructor"in s&&!(typeof L=="function"&&L instanceof L&&typeof D=="function"&&D instanceof D)&&(T=!1)}return h.delete(o),h.delete(s),T}return ox=i,ox}var lx,AD;function t1e(){if(AD)return lx;AD=1;var e=vm(),r=B$(),n=Jbe(),a=e1e(),i=_s(),o=Tt(),s=xs(),c=Wc(),f=1,d="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,y=g.hasOwnProperty;function _(E,w,x,j,C,T){var O=o(E),N=o(w),M=O?h:i(E),R=N?h:i(w);M=M==d?m:M,R=R==d?m:R;var L=M==m,D=R==m,q=M==R;if(q&&s(E)){if(!s(w))return!1;O=!0,L=!1}if(q&&!L)return T||(T=new e),O||c(E)?r(E,w,x,j,C,T):n(E,w,M,x,j,C,T);if(!(x&f)){var z=L&&y.call(E,"__wrapped__"),H=D&&y.call(w,"__wrapped__");if(z||H){var F=z?E.value():E,X=H?w.value():w;return T||(T=new e),C(F,X,x,j,T)}}return q?(T||(T=new e),a(E,w,x,j,C,T)):!1}return lx=_,lx}var sx,jD;function $$(){if(jD)return sx;jD=1;var e=t1e(),r=ha();function n(a,i,o,s,c){return a===i?!0:a==null||i==null||!r(a)&&!r(i)?a!==a&&i!==i:e(a,i,o,s,n,c)}return sx=n,sx}var ux,CD;function r1e(){if(CD)return ux;CD=1;var e=vm(),r=$$(),n=1,a=2;function i(o,s,c,f){var d=c.length,h=d,m=!f;if(o==null)return!h;for(o=Object(o);d--;){var g=c[d];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<h;){g=c[d];var y=g[0],_=o[y],E=g[1];if(m&&g[2]){if(_===void 0&&!(y in o))return!1}else{var w=new e;if(f)var x=f(_,E,y,o,s,w);if(!(x===void 0?r(E,_,n|a,f,w):x))return!1}}return!0}return ux=i,ux}var cx,OD;function F$(){if(OD)return cx;OD=1;var e=_n();function r(n){return n===n&&!e(n)}return cx=r,cx}var fx,TD;function n1e(){if(TD)return fx;TD=1;var e=F$(),r=Yi();function n(a){for(var i=r(a),o=i.length;o--;){var s=i[o],c=a[s];i[o]=[s,c,e(c)]}return i}return fx=n,fx}var dx,ND;function U$(){if(ND)return dx;ND=1;function e(r,n){return function(a){return a==null?!1:a[r]===n&&(n!==void 0||r in Object(a))}}return dx=e,dx}var hx,MD;function a1e(){if(MD)return hx;MD=1;var e=r1e(),r=n1e(),n=U$();function a(i){var o=r(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(s){return s===i||e(s,i,o)}}return hx=a,hx}var px,PD;function ws(){if(PD)return px;PD=1;var e=Ho(),r=ha(),n="[object Symbol]";function a(i){return typeof i=="symbol"||r(i)&&e(i)==n}return px=a,px}var mx,RD;function Xk(){if(RD)return mx;RD=1;var e=Tt(),r=ws(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,s){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||r(o)?!0:a.test(o)||!n.test(o)||s!=null&&o in Object(s)}return mx=i,mx}var vx,DD;function i1e(){if(DD)return vx;DD=1;var e=Ik(),r="Expected a function";function n(a,i){if(typeof a!="function"||i!=null&&typeof i!="function")throw new TypeError(r);var o=function(){var s=arguments,c=i?i.apply(this,s):s[0],f=o.cache;if(f.has(c))return f.get(c);var d=a.apply(this,s);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,vx=n,vx}var gx,LD;function o1e(){if(LD)return gx;LD=1;var e=i1e(),r=500;function n(a){var i=e(a,function(s){return o.size===r&&o.clear(),s}),o=i.cache;return i}return gx=n,gx}var yx,ID;function l1e(){if(ID)return yx;ID=1;var e=o1e(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,a=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(r,function(s,c,f,d){o.push(f?d.replace(n,"$1"):c||s)}),o});return yx=a,yx}var bx,zD;function Em(){if(zD)return bx;zD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=Array(i);++a<i;)o[a]=n(r[a],a,r);return o}return bx=e,bx}var xx,qD;function s1e(){if(qD)return xx;qD=1;var e=bs(),r=Em(),n=Tt(),a=ws(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function s(c){if(typeof c=="string")return c;if(n(c))return r(c,s)+"";if(a(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return xx=s,xx}var _x,BD;function H$(){if(BD)return _x;BD=1;var e=s1e();function r(n){return n==null?"":e(n)}return _x=r,_x}var wx,$D;function km(){if($D)return wx;$D=1;var e=Tt(),r=Xk(),n=l1e(),a=H$();function i(o,s){return e(o)?o:r(o,s)?[o]:n(a(o))}return wx=i,wx}var Sx,FD;function Zc(){if(FD)return Sx;FD=1;var e=ws();function r(n){if(typeof n=="string"||e(n))return n;var a=n+"";return a=="0"&&1/n==-1/0?"-0":a}return Sx=r,Sx}var Ex,UD;function Am(){if(UD)return Ex;UD=1;var e=km(),r=Zc();function n(a,i){i=e(i,a);for(var o=0,s=i.length;a!=null&&o<s;)a=a[r(i[o++])];return o&&o==s?a:void 0}return Ex=n,Ex}var kx,HD;function u1e(){if(HD)return kx;HD=1;var e=Am();function r(n,a,i){var o=n==null?void 0:e(n,a);return o===void 0?i:o}return kx=r,kx}var Ax,GD;function c1e(){if(GD)return Ax;GD=1;function e(r,n){return r!=null&&n in Object(r)}return Ax=e,Ax}var jx,VD;function G$(){if(VD)return jx;VD=1;var e=km(),r=Xc(),n=Tt(),a=bm(),i=qk(),o=Zc();function s(c,f,d){f=e(f,c);for(var h=-1,m=f.length,g=!1;++h<m;){var y=o(f[h]);if(!(g=c!=null&&d(c,y)))break;c=c[y]}return g||++h!=m?g:(m=c==null?0:c.length,!!m&&i(m)&&a(y,m)&&(n(c)||r(c)))}return jx=s,jx}var Cx,KD;function V$(){if(KD)return Cx;KD=1;var e=c1e(),r=G$();function n(a,i){return a!=null&&r(a,i,e)}return Cx=n,Cx}var Ox,YD;function f1e(){if(YD)return Ox;YD=1;var e=$$(),r=u1e(),n=V$(),a=Xk(),i=F$(),o=U$(),s=Zc(),c=1,f=2;function d(h,m){return a(h)&&i(m)?o(s(h),m):function(g){var y=r(g,h);return y===void 0&&y===m?n(g,h):e(m,y,c|f)}}return Ox=d,Ox}var Tx,XD;function K$(){if(XD)return Tx;XD=1;function e(r){return function(n){return n==null?void 0:n[r]}}return Tx=e,Tx}var Nx,WD;function d1e(){if(WD)return Nx;WD=1;var e=Am();function r(n){return function(a){return e(a,n)}}return Nx=r,Nx}var Mx,ZD;function h1e(){if(ZD)return Mx;ZD=1;var e=K$(),r=d1e(),n=Xk(),a=Zc();function i(o){return n(o)?e(a(o)):r(o)}return Mx=i,Mx}var Px,QD;function oi(){if(QD)return Px;QD=1;var e=a1e(),r=f1e(),n=Ko(),a=Tt(),i=h1e();function o(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?a(s)?r(s[0],s[1]):e(s):i(s)}return Px=o,Px}var Rx,JD;function Y$(){if(JD)return Rx;JD=1;var e=E$(),r=Ybe(),n=oi(),a=Tt();function i(o,s){var c=a(o)?e:r;return c(o,n(s,3))}return Rx=i,Rx}var Dx,e8;function p1e(){if(e8)return Dx;e8=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a,i){return a!=null&&r.call(a,i)}return Dx=n,Dx}var Lx,t8;function X$(){if(t8)return Lx;t8=1;var e=p1e(),r=G$();function n(a,i){return a!=null&&r(a,i,e)}return Lx=n,Lx}var Ix,r8;function m1e(){if(r8)return Ix;r8=1;var e=$k(),r=_s(),n=Xc(),a=Tt(),i=ii(),o=xs(),s=_m(),c=Wc(),f="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;function g(y){if(y==null)return!0;if(i(y)&&(a(y)||typeof y=="string"||typeof y.splice=="function"||o(y)||c(y)||n(y)))return!y.length;var _=r(y);if(_==f||_==d)return!y.size;if(s(y))return!e(y).length;for(var E in y)if(m.call(y,E))return!1;return!0}return Ix=g,Ix}var zx,n8;function W$(){if(n8)return zx;n8=1;function e(r){return r===void 0}return zx=e,zx}var qx,a8;function Z$(){if(a8)return qx;a8=1;var e=Sm(),r=ii();function n(a,i){var o=-1,s=r(a)?Array(a.length):[];return e(a,function(c,f,d){s[++o]=i(c,f,d)}),s}return qx=n,qx}var Bx,i8;function Q$(){if(i8)return Bx;i8=1;var e=Em(),r=oi(),n=Z$(),a=Tt();function i(o,s){var c=a(o)?e:n;return c(o,r(s,3))}return Bx=i,Bx}var $x,o8;function v1e(){if(o8)return $x;o8=1;function e(r,n,a,i){var o=-1,s=r==null?0:r.length;for(i&&s&&(a=r[++o]);++o<s;)a=n(a,r[o],o,r);return a}return $x=e,$x}var Fx,l8;function g1e(){if(l8)return Fx;l8=1;function e(r,n,a,i,o){return o(r,function(s,c,f){a=i?(i=!1,s):n(a,s,c,f)}),a}return Fx=e,Fx}var Ux,s8;function J$(){if(s8)return Ux;s8=1;var e=v1e(),r=Sm(),n=oi(),a=g1e(),i=Tt();function o(s,c,f){var d=i(s)?e:a,h=arguments.length<3;return d(s,n(c,4),f,h,r)}return Ux=o,Ux}var Hx,u8;function y1e(){if(u8)return Hx;u8=1;var e=Ho(),r=Tt(),n=ha(),a="[object String]";function i(o){return typeof o=="string"||!r(o)&&n(o)&&e(o)==a}return Hx=i,Hx}var Gx,c8;function b1e(){if(c8)return Gx;c8=1;var e=K$(),r=e("length");return Gx=r,Gx}var Vx,f8;function x1e(){if(f8)return Vx;f8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",s="\\u200d",c=RegExp("["+s+e+i+o+"]");function f(d){return c.test(d)}return Vx=f,Vx}var Kx,d8;function _1e(){if(d8)return Kx;d8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",s="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",h="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",_=d+"?",E="["+o+"]?",w="(?:"+y+"(?:"+[h,m,g].join("|")+")"+E+_+")*",x=E+_+w,j="(?:"+[h+c+"?",c,m,g,s].join("|")+")",C=RegExp(f+"(?="+f+")|"+j+x,"g");function T(O){for(var N=C.lastIndex=0;C.test(O);)++N;return N}return Kx=T,Kx}var Yx,h8;function w1e(){if(h8)return Yx;h8=1;var e=b1e(),r=x1e(),n=_1e();function a(i){return r(i)?n(i):e(i)}return Yx=a,Yx}var Xx,p8;function S1e(){if(p8)return Xx;p8=1;var e=$k(),r=_s(),n=ii(),a=y1e(),i=w1e(),o="[object Map]",s="[object Set]";function c(f){if(f==null)return 0;if(n(f))return a(f)?i(f):f.length;var d=r(f);return d==o||d==s?f.size:e(f).length}return Xx=c,Xx}var Wx,m8;function E1e(){if(m8)return Wx;m8=1;var e=zk(),r=M$(),n=Kk(),a=oi(),i=wm(),o=Tt(),s=xs(),c=Kc(),f=_n(),d=Wc();function h(m,g,y){var _=o(m),E=_||s(m)||d(m);if(g=a(g,4),y==null){var w=m&&m.constructor;E?y=_?new w:[]:f(m)?y=c(w)?r(i(m)):{}:y={}}return(E?e:n)(m,function(x,j,C){return g(y,x,j,C)}),y}return Wx=h,Wx}var Zx,v8;function k1e(){if(v8)return Zx;v8=1;var e=bs(),r=Xc(),n=Tt(),a=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||r(o)||!!(a&&o&&o[a])}return Zx=i,Zx}var Qx,g8;function Wk(){if(g8)return Qx;g8=1;var e=Uk(),r=k1e();function n(a,i,o,s,c){var f=-1,d=a.length;for(o||(o=r),c||(c=[]);++f<d;){var h=a[f];i>0&&o(h)?i>1?n(h,i-1,o,s,c):e(c,h):s||(c[c.length]=h)}return c}return Qx=n,Qx}var Jx,y8;function A1e(){if(y8)return Jx;y8=1;function e(r,n,a){switch(a.length){case 0:return r.call(n);case 1:return r.call(n,a[0]);case 2:return r.call(n,a[0],a[1]);case 3:return r.call(n,a[0],a[1],a[2])}return r.apply(n,a)}return Jx=e,Jx}var e_,b8;function eF(){if(b8)return e_;b8=1;var e=A1e(),r=Math.max;function n(a,i,o){return i=r(i===void 0?a.length-1:i,0),function(){for(var s=arguments,c=-1,f=r(s.length-i,0),d=Array(f);++c<f;)d[c]=s[i+c];c=-1;for(var h=Array(i+1);++c<i;)h[c]=s[c];return h[i]=o(d),e(a,this,h)}}return e_=n,e_}var t_,x8;function j1e(){if(x8)return t_;x8=1;var e=Gk(),r=b$(),n=Ko(),a=r?function(i,o){return r(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return t_=a,t_}var r_,_8;function C1e(){if(_8)return r_;_8=1;var e=800,r=16,n=Date.now;function a(i){var o=0,s=0;return function(){var c=n(),f=r-(c-s);if(s=c,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return r_=a,r_}var n_,w8;function tF(){if(w8)return n_;w8=1;var e=j1e(),r=C1e(),n=r(e);return n_=n,n_}var a_,S8;function jm(){if(S8)return a_;S8=1;var e=Ko(),r=eF(),n=tF();function a(i,o){return n(r(i,o,e),i+"")}return a_=a,a_}var i_,E8;function rF(){if(E8)return i_;E8=1;function e(r,n,a,i){for(var o=r.length,s=a+(i?1:-1);i?s--:++s<o;)if(n(r[s],s,r))return s;return-1}return i_=e,i_}var o_,k8;function O1e(){if(k8)return o_;k8=1;function e(r){return r!==r}return o_=e,o_}var l_,A8;function T1e(){if(A8)return l_;A8=1;function e(r,n,a){for(var i=a-1,o=r.length;++i<o;)if(r[i]===n)return i;return-1}return l_=e,l_}var s_,j8;function N1e(){if(j8)return s_;j8=1;var e=rF(),r=O1e(),n=T1e();function a(i,o,s){return o===o?n(i,o,s):e(i,r,s)}return s_=a,s_}var u_,C8;function M1e(){if(C8)return u_;C8=1;var e=N1e();function r(n,a){var i=n==null?0:n.length;return!!i&&e(n,a,0)>-1}return u_=r,u_}var c_,O8;function P1e(){if(O8)return c_;O8=1;function e(r,n,a){for(var i=-1,o=r==null?0:r.length;++i<o;)if(a(n,r[i]))return!0;return!1}return c_=e,c_}var f_,T8;function R1e(){if(T8)return f_;T8=1;function e(){}return f_=e,f_}var d_,N8;function D1e(){if(N8)return d_;N8=1;var e=O$(),r=R1e(),n=Yk(),a=1/0,i=e&&1/n(new e([,-0]))[1]==a?function(o){return new e(o)}:r;return d_=i,d_}var h_,M8;function L1e(){if(M8)return h_;M8=1;var e=z$(),r=M1e(),n=P1e(),a=q$(),i=D1e(),o=Yk(),s=200;function c(f,d,h){var m=-1,g=r,y=f.length,_=!0,E=[],w=E;if(h)_=!1,g=n;else if(y>=s){var x=d?null:i(f);if(x)return o(x);_=!1,g=a,w=new e}else w=d?[]:E;e:for(;++m<y;){var j=f[m],C=d?d(j):j;if(j=h||j!==0?j:0,_&&C===C){for(var T=w.length;T--;)if(w[T]===C)continue e;d&&w.push(C),E.push(j)}else g(w,C,h)||(w!==E&&w.push(C),E.push(j))}return E}return h_=c,h_}var p_,P8;function nF(){if(P8)return p_;P8=1;var e=ii(),r=ha();function n(a){return r(a)&&e(a)}return p_=n,p_}var m_,R8;function I1e(){if(R8)return m_;R8=1;var e=Wk(),r=jm(),n=L1e(),a=nF(),i=r(function(o){return n(e(o,1,a,!0))});return m_=i,m_}var v_,D8;function z1e(){if(D8)return v_;D8=1;var e=Em();function r(n,a){return e(a,function(i){return n[i]})}return v_=r,v_}var g_,L8;function aF(){if(L8)return g_;L8=1;var e=z1e(),r=Yi();function n(a){return a==null?[]:e(a,r(a))}return g_=n,g_}var y_,I8;function wn(){if(I8)return y_;I8=1;var e;if(typeof Dk=="function")try{e={clone:Gbe(),constant:Gk(),each:I$(),filter:Y$(),has:X$(),isArray:Tt(),isEmpty:m1e(),isFunction:Kc(),isUndefined:W$(),keys:Yi(),map:Q$(),reduce:J$(),size:S1e(),transform:E1e(),union:I1e(),values:aF()}}catch{}return e||(e=window._),y_=e,y_}var b_,z8;function Zk(){if(z8)return b_;z8=1;var e=wn();b_=i;var r="\0",n="\0",a="";function i(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(h){return this._label=h,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._in[m])})},i.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._out[m])})},i.prototype.setNodes=function(h,m){var g=arguments,y=this;return e.each(h,function(_){g.length>1?y.setNode(_,m):y.setNode(_)}),this},i.prototype.setNode=function(h,m){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=m),this):(this._nodes[h]=arguments.length>1?m:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},i.prototype.node=function(h){return this._nodes[h]},i.prototype.hasNode=function(h){return e.has(this._nodes,h)},i.prototype.removeNode=function(h){var m=this;if(e.has(this._nodes,h)){var g=function(y){m.removeEdge(m._edgeObjs[y])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(y){m.setParent(y)}),delete this._children[h]),e.each(e.keys(this._in[h]),g),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),g),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},i.prototype.setParent=function(h,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(m))m=n;else{m+="";for(var g=m;!e.isUndefined(g);g=this.parent(g))if(g===h)throw new Error("Setting "+m+" as parent of "+h+" would create a cycle");this.setNode(m)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=m,this._children[m][h]=!0,this},i.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},i.prototype.parent=function(h){if(this._isCompound){var m=this._parent[h];if(m!==n)return m}},i.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var m=this._children[h];if(m)return e.keys(m)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},i.prototype.predecessors=function(h){var m=this._preds[h];if(m)return e.keys(m)},i.prototype.successors=function(h){var m=this._sucs[h];if(m)return e.keys(m)},i.prototype.neighbors=function(h){var m=this.predecessors(h);if(m)return e.union(m,this.successors(h))},i.prototype.isLeaf=function(h){var m;return this.isDirected()?m=this.successors(h):m=this.neighbors(h),m.length===0},i.prototype.filterNodes=function(h){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var g=this;e.each(this._nodes,function(E,w){h(w)&&m.setNode(w,E)}),e.each(this._edgeObjs,function(E){m.hasNode(E.v)&&m.hasNode(E.w)&&m.setEdge(E,g.edge(E))});var y={};function _(E){var w=g.parent(E);return w===void 0||m.hasNode(w)?(y[E]=w,w):w in y?y[w]:_(w)}return this._isCompound&&e.each(m.nodes(),function(E){m.setParent(E,_(E))}),m},i.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(h,m){var g=this,y=arguments;return e.reduce(h,function(_,E){return y.length>1?g.setEdge(_,E,m):g.setEdge(_,E),E}),this},i.prototype.setEdge=function(){var h,m,g,y,_=!1,E=arguments[0];typeof E=="object"&&E!==null&&"v"in E?(h=E.v,m=E.w,g=E.name,arguments.length===2&&(y=arguments[1],_=!0)):(h=E,m=arguments[1],g=arguments[3],arguments.length>2&&(y=arguments[2],_=!0)),h=""+h,m=""+m,e.isUndefined(g)||(g=""+g);var w=c(this._isDirected,h,m,g);if(e.has(this._edgeLabels,w))return _&&(this._edgeLabels[w]=y),this;if(!e.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(m),this._edgeLabels[w]=_?y:this._defaultEdgeLabelFn(h,m,g);var x=f(this._isDirected,h,m,g);return h=x.v,m=x.w,Object.freeze(x),this._edgeObjs[w]=x,o(this._preds[m],h),o(this._sucs[h],m),this._in[m][w]=x,this._out[h][w]=x,this._edgeCount++,this},i.prototype.edge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return this._edgeLabels[y]},i.prototype.hasEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return e.has(this._edgeLabels,y)},i.prototype.removeEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g),_=this._edgeObjs[y];return _&&(h=_.v,m=_.w,delete this._edgeLabels[y],delete this._edgeObjs[y],s(this._preds[m],h),s(this._sucs[h],m),delete this._in[m][y],delete this._out[h][y],this._edgeCount--),this},i.prototype.inEdges=function(h,m){var g=this._in[h];if(g){var y=e.values(g);return m?e.filter(y,function(_){return _.v===m}):y}},i.prototype.outEdges=function(h,m){var g=this._out[h];if(g){var y=e.values(g);return m?e.filter(y,function(_){return _.w===m}):y}},i.prototype.nodeEdges=function(h,m){var g=this.inEdges(h,m);if(g)return g.concat(this.outEdges(h,m))};function o(h,m){h[m]?h[m]++:h[m]=1}function s(h,m){--h[m]||delete h[m]}function c(h,m,g,y){var _=""+m,E=""+g;if(!h&&_>E){var w=_;_=E,E=w}return _+a+E+a+(e.isUndefined(y)?r:y)}function f(h,m,g,y){var _=""+m,E=""+g;if(!h&&_>E){var w=_;_=E,E=w}var x={v:_,w:E};return y&&(x.name=y),x}function d(h,m){return c(h,m.v,m.w,m.name)}return b_}var x_,q8;function q1e(){return q8||(q8=1,x_="2.1.8"),x_}var __,B8;function B1e(){return B8||(B8=1,__={Graph:Zk(),version:q1e()}),__}var w_,$8;function $1e(){if($8)return w_;$8=1;var e=wn(),r=Zk();w_={write:n,read:o};function n(s){var c={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:a(s),edges:i(s)};return e.isUndefined(s.graph())||(c.value=e.clone(s.graph())),c}function a(s){return e.map(s.nodes(),function(c){var f=s.node(c),d=s.parent(c),h={v:c};return e.isUndefined(f)||(h.value=f),e.isUndefined(d)||(h.parent=d),h})}function i(s){return e.map(s.edges(),function(c){var f=s.edge(c),d={v:c.v,w:c.w};return e.isUndefined(c.name)||(d.name=c.name),e.isUndefined(f)||(d.value=f),d})}function o(s){var c=new r(s.options).setGraph(s.value);return e.each(s.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(s.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return w_}var S_,F8;function F1e(){if(F8)return S_;F8=1;var e=wn();S_=r;function r(n){var a={},i=[],o;function s(c){e.has(a,c)||(a[c]=!0,o.push(c),e.each(n.successors(c),s),e.each(n.predecessors(c),s))}return e.each(n.nodes(),function(c){o=[],s(c),o.length&&i.push(o)}),i}return S_}var E_,U8;function iF(){if(U8)return E_;U8=1;var e=wn();E_=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(n){return n.key})},r.prototype.has=function(n){return e.has(this._keyIndices,n)},r.prototype.priority=function(n){var a=this._keyIndices[n];if(a!==void 0)return this._arr[a].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(n,a){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,s=o.length;return i[n]=s,o.push({key:n,priority:a}),this._decrease(s),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},r.prototype.decrease=function(n,a){var i=this._keyIndices[n];if(a>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+a);this._arr[i].priority=a,this._decrease(i)},r.prototype._heapify=function(n){var a=this._arr,i=2*n,o=i+1,s=n;i<a.length&&(s=a[i].priority<a[s].priority?i:s,o<a.length&&(s=a[o].priority<a[s].priority?o:s),s!==n&&(this._swap(n,s),this._heapify(s)))},r.prototype._decrease=function(n){for(var a=this._arr,i=a[n].priority,o;n!==0&&(o=n>>1,!(a[o].priority<i));)this._swap(n,o),n=o},r.prototype._swap=function(n,a){var i=this._arr,o=this._keyIndices,s=i[n],c=i[a];i[n]=c,i[a]=s,o[c.key]=n,o[s.key]=a},E_}var k_,H8;function oF(){if(H8)return k_;H8=1;var e=wn(),r=iF();k_=a;var n=e.constant(1);function a(o,s,c,f){return i(o,String(s),c||n,f||function(d){return o.outEdges(d)})}function i(o,s,c,f){var d={},h=new r,m,g,y=function(_){var E=_.v!==m?_.v:_.w,w=d[E],x=c(_),j=g.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+x);j<w.distance&&(w.distance=j,w.predecessor=m,h.decrease(E,j))};for(o.nodes().forEach(function(_){var E=_===s?0:Number.POSITIVE_INFINITY;d[_]={distance:E},h.add(_,E)});h.size()>0&&(m=h.removeMin(),g=d[m],g.distance!==Number.POSITIVE_INFINITY);)f(m).forEach(y);return d}return k_}var A_,G8;function U1e(){if(G8)return A_;G8=1;var e=oF(),r=wn();A_=n;function n(a,i,o){return r.transform(a.nodes(),function(s,c){s[c]=e(a,c,i,o)},{})}return A_}var j_,V8;function lF(){if(V8)return j_;V8=1;var e=wn();j_=r;function r(n){var a=0,i=[],o={},s=[];function c(f){var d=o[f]={onStack:!0,lowlink:a,index:a++};if(i.push(f),n.successors(f).forEach(function(g){e.has(o,g)?o[g].onStack&&(d.lowlink=Math.min(d.lowlink,o[g].index)):(c(g),d.lowlink=Math.min(d.lowlink,o[g].lowlink))}),d.lowlink===d.index){var h=[],m;do m=i.pop(),o[m].onStack=!1,h.push(m);while(f!==m);s.push(h)}}return n.nodes().forEach(function(f){e.has(o,f)||c(f)}),s}return j_}var C_,K8;function H1e(){if(K8)return C_;K8=1;var e=wn(),r=lF();C_=n;function n(a){return e.filter(r(a),function(i){return i.length>1||i.length===1&&a.hasEdge(i[0],i[0])})}return C_}var O_,Y8;function G1e(){if(Y8)return O_;Y8=1;var e=wn();O_=n;var r=e.constant(1);function n(i,o,s){return a(i,o||r,s||function(c){return i.outEdges(c)})}function a(i,o,s){var c={},f=i.nodes();return f.forEach(function(d){c[d]={},c[d][d]={distance:0},f.forEach(function(h){d!==h&&(c[d][h]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(h){var m=h.v===d?h.w:h.v,g=o(h);c[d][m]={distance:g,predecessor:d}})}),f.forEach(function(d){var h=c[d];f.forEach(function(m){var g=c[m];f.forEach(function(y){var _=g[d],E=h[y],w=g[y],x=_.distance+E.distance;x<w.distance&&(w.distance=x,w.predecessor=E.predecessor)})})}),c}return O_}var T_,X8;function sF(){if(X8)return T_;X8=1;var e=wn();T_=r,r.CycleException=n;function r(a){var i={},o={},s=[];function c(f){if(e.has(o,f))throw new n;e.has(i,f)||(o[f]=!0,i[f]=!0,e.each(a.predecessors(f),c),delete o[f],s.push(f))}if(e.each(a.sinks(),c),e.size(i)!==a.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,T_}var N_,W8;function V1e(){if(W8)return N_;W8=1;var e=sF();N_=r;function r(n){try{e(n)}catch(a){if(a instanceof e.CycleException)return!1;throw a}return!0}return N_}var M_,Z8;function uF(){if(Z8)return M_;Z8=1;var e=wn();M_=r;function r(a,i,o){e.isArray(i)||(i=[i]);var s=(a.isDirected()?a.successors:a.neighbors).bind(a),c=[],f={};return e.each(i,function(d){if(!a.hasNode(d))throw new Error("Graph does not have node: "+d);n(a,d,o==="post",f,s,c)}),c}function n(a,i,o,s,c,f){e.has(s,i)||(s[i]=!0,o||f.push(i),e.each(c(i),function(d){n(a,d,o,s,c,f)}),o&&f.push(i))}return M_}var P_,Q8;function K1e(){if(Q8)return P_;Q8=1;var e=uF();P_=r;function r(n,a){return e(n,a,"post")}return P_}var R_,J8;function Y1e(){if(J8)return R_;J8=1;var e=uF();R_=r;function r(n,a){return e(n,a,"pre")}return R_}var D_,e9;function X1e(){if(e9)return D_;e9=1;var e=wn(),r=Zk(),n=iF();D_=a;function a(i,o){var s=new r,c={},f=new n,d;function h(g){var y=g.v===d?g.w:g.v,_=f.priority(y);if(_!==void 0){var E=o(g);E<_&&(c[y]=d,f.decrease(y,E))}}if(i.nodeCount()===0)return s;e.each(i.nodes(),function(g){f.add(g,Number.POSITIVE_INFINITY),s.setNode(g)}),f.decrease(i.nodes()[0],0);for(var m=!1;f.size()>0;){if(d=f.removeMin(),e.has(c,d))s.setEdge(d,c[d]);else{if(m)throw new Error("Input graph is not connected: "+i);m=!0}i.nodeEdges(d).forEach(h)}return s}return D_}var L_,t9;function W1e(){return t9||(t9=1,L_={components:F1e(),dijkstra:oF(),dijkstraAll:U1e(),findCycles:H1e(),floydWarshall:G1e(),isAcyclic:V1e(),postorder:K1e(),preorder:Y1e(),prim:X1e(),tarjan:lF(),topsort:sF()}),L_}var I_,r9;function Z1e(){if(r9)return I_;r9=1;var e=B1e();return I_={Graph:e.Graph,json:$1e(),alg:W1e(),version:e.version},I_}var z_,n9;function Rn(){if(n9)return z_;n9=1;var e;if(typeof Dk=="function")try{e=Z1e()}catch{}return e||(e=window.graphlib),z_=e,z_}var q_,a9;function Q1e(){if(a9)return q_;a9=1;var e=R$(),r=1,n=4;function a(i){return e(i,r|n)}return q_=a,q_}var B_,i9;function Cm(){if(i9)return B_;i9=1;var e=ys(),r=ii(),n=bm(),a=_n();function i(o,s,c){if(!a(c))return!1;var f=typeof s;return(f=="number"?r(c)&&n(s,c.length):f=="string"&&s in c)?e(c[s],o):!1}return B_=i,B_}var $_,o9;function J1e(){if(o9)return $_;o9=1;var e=jm(),r=ys(),n=Cm(),a=Vo(),i=Object.prototype,o=i.hasOwnProperty,s=e(function(c,f){c=Object(c);var d=-1,h=f.length,m=h>2?f[2]:void 0;for(m&&n(f[0],f[1],m)&&(h=1);++d<h;)for(var g=f[d],y=a(g),_=-1,E=y.length;++_<E;){var w=y[_],x=c[w];(x===void 0||r(x,i[w])&&!o.call(c,w))&&(c[w]=g[w])}return c});return $_=s,$_}var F_,l9;function exe(){if(l9)return F_;l9=1;var e=oi(),r=ii(),n=Yi();function a(i){return function(o,s,c){var f=Object(o);if(!r(o)){var d=e(s,3);o=n(o),s=function(m){return d(f[m],m,f)}}var h=i(o,s,c);return h>-1?f[d?o[h]:h]:void 0}}return F_=a,F_}var U_,s9;function txe(){if(s9)return U_;s9=1;var e=/\s/;function r(n){for(var a=n.length;a--&&e.test(n.charAt(a)););return a}return U_=r,U_}var H_,u9;function rxe(){if(u9)return H_;u9=1;var e=txe(),r=/^\s+/;function n(a){return a&&a.slice(0,e(a)+1).replace(r,"")}return H_=n,H_}var G_,c9;function nxe(){if(c9)return G_;c9=1;var e=rxe(),r=_n(),n=ws(),a=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return a;if(r(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=r(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var m=o.test(d);return m||s.test(d)?c(d.slice(2),m?2:8):i.test(d)?a:+d}return G_=f,G_}var V_,f9;function cF(){if(f9)return V_;f9=1;var e=nxe(),r=1/0,n=17976931348623157e292;function a(i){if(!i)return i===0?i:0;if(i=e(i),i===r||i===-r){var o=i<0?-1:1;return o*n}return i===i?i:0}return V_=a,V_}var K_,d9;function axe(){if(d9)return K_;d9=1;var e=cF();function r(n){var a=e(n),i=a%1;return a===a?i?a-i:a:0}return K_=r,K_}var Y_,h9;function ixe(){if(h9)return Y_;h9=1;var e=rF(),r=oi(),n=axe(),a=Math.max;function i(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=a(f+d,0)),e(o,r(s,3),d)}return Y_=i,Y_}var X_,p9;function oxe(){if(p9)return X_;p9=1;var e=exe(),r=ixe(),n=e(r);return X_=n,X_}var W_,m9;function fF(){if(m9)return W_;m9=1;var e=Wk();function r(n){var a=n==null?0:n.length;return a?e(n,1):[]}return W_=r,W_}var Z_,v9;function lxe(){if(v9)return Z_;v9=1;var e=Vk(),r=D$(),n=Vo();function a(i,o){return i==null?i:e(i,r(o),n)}return Z_=a,Z_}var Q_,g9;function sxe(){if(g9)return Q_;g9=1;function e(r){var n=r==null?0:r.length;return n?r[n-1]:void 0}return Q_=e,Q_}var J_,y9;function uxe(){if(y9)return J_;y9=1;var e=gm(),r=Kk(),n=oi();function a(i,o){var s={};return o=n(o,3),r(i,function(c,f,d){e(s,f,o(c,f,d))}),s}return J_=a,J_}var ew,b9;function Qk(){if(b9)return ew;b9=1;var e=ws();function r(n,a,i){for(var o=-1,s=n.length;++o<s;){var c=n[o],f=a(c);if(f!=null&&(d===void 0?f===f&&!e(f):i(f,d)))var d=f,h=c}return h}return ew=r,ew}var tw,x9;function cxe(){if(x9)return tw;x9=1;function e(r,n){return r>n}return tw=e,tw}var rw,_9;function fxe(){if(_9)return rw;_9=1;var e=Qk(),r=cxe(),n=Ko();function a(i){return i&&i.length?e(i,n,r):void 0}return rw=a,rw}var nw,w9;function dF(){if(w9)return nw;w9=1;var e=gm(),r=ys();function n(a,i,o){(o!==void 0&&!r(a[i],o)||o===void 0&&!(i in a))&&e(a,i,o)}return nw=n,nw}var aw,S9;function dxe(){if(S9)return aw;S9=1;var e=Ho(),r=wm(),n=ha(),a="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,c=o.hasOwnProperty,f=s.call(Object);function d(h){if(!n(h)||e(h)!=a)return!1;var m=r(h);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==f}return aw=d,aw}var iw,E9;function hF(){if(E9)return iw;E9=1;function e(r,n){if(!(n==="constructor"&&typeof r[n]=="function")&&n!="__proto__")return r[n]}return iw=e,iw}var ow,k9;function hxe(){if(k9)return ow;k9=1;var e=Yc(),r=Vo();function n(a){return e(a,r(a))}return ow=n,ow}var lw,A9;function pxe(){if(A9)return lw;A9=1;var e=dF(),r=w$(),n=N$(),a=S$(),i=P$(),o=Xc(),s=Tt(),c=nF(),f=xs(),d=Kc(),h=_n(),m=dxe(),g=Wc(),y=hF(),_=hxe();function E(w,x,j,C,T,O,N){var M=y(w,j),R=y(x,j),L=N.get(R);if(L){e(w,j,L);return}var D=O?O(M,R,j+"",w,x,N):void 0,q=D===void 0;if(q){var z=s(R),H=!z&&f(R),F=!z&&!H&&g(R);D=R,z||H||F?s(M)?D=M:c(M)?D=a(M):H?(q=!1,D=r(R,!0)):F?(q=!1,D=n(R,!0)):D=[]:m(R)||o(R)?(D=M,o(M)?D=_(M):(!h(M)||d(M))&&(D=i(R))):q=!1}q&&(N.set(R,D),T(D,R,C,O,N),N.delete(R)),e(w,j,D)}return lw=E,lw}var sw,j9;function mxe(){if(j9)return sw;j9=1;var e=vm(),r=dF(),n=Vk(),a=pxe(),i=_n(),o=Vo(),s=hF();function c(f,d,h,m,g){f!==d&&n(d,function(y,_){if(g||(g=new e),i(y))a(f,d,_,h,c,m,g);else{var E=m?m(s(f,_),y,_+"",f,d,g):void 0;E===void 0&&(E=y),r(f,_,E)}},o)}return sw=c,sw}var uw,C9;function vxe(){if(C9)return uw;C9=1;var e=jm(),r=Cm();function n(a){return e(function(i,o){var s=-1,c=o.length,f=c>1?o[c-1]:void 0,d=c>2?o[2]:void 0;for(f=a.length>3&&typeof f=="function"?(c--,f):void 0,d&&r(o[0],o[1],d)&&(f=c<3?void 0:f,c=1),i=Object(i);++s<c;){var h=o[s];h&&a(i,h,s,f)}return i})}return uw=n,uw}var cw,O9;function gxe(){if(O9)return cw;O9=1;var e=mxe(),r=vxe(),n=r(function(a,i,o){e(a,i,o)});return cw=n,cw}var fw,T9;function pF(){if(T9)return fw;T9=1;function e(r,n){return r<n}return fw=e,fw}var dw,N9;function yxe(){if(N9)return dw;N9=1;var e=Qk(),r=pF(),n=Ko();function a(i){return i&&i.length?e(i,n,r):void 0}return dw=a,dw}var hw,M9;function bxe(){if(M9)return hw;M9=1;var e=Qk(),r=oi(),n=pF();function a(i,o){return i&&i.length?e(i,r(o,2),n):void 0}return hw=a,hw}var pw,P9;function xxe(){if(P9)return pw;P9=1;var e=zn(),r=function(){return e.Date.now()};return pw=r,pw}var mw,R9;function _xe(){if(R9)return mw;R9=1;var e=ym(),r=km(),n=bm(),a=_n(),i=Zc();function o(s,c,f,d){if(!a(s))return s;c=r(c,s);for(var h=-1,m=c.length,g=m-1,y=s;y!=null&&++h<m;){var _=i(c[h]),E=f;if(_==="__proto__"||_==="constructor"||_==="prototype")return s;if(h!=g){var w=y[_];E=d?d(w,_,y):void 0,E===void 0&&(E=a(w)?w:n(c[h+1])?[]:{})}e(y,_,E),y=y[_]}return s}return mw=o,mw}var vw,D9;function wxe(){if(D9)return vw;D9=1;var e=Am(),r=_xe(),n=km();function a(i,o,s){for(var c=-1,f=o.length,d={};++c<f;){var h=o[c],m=e(i,h);s(m,h)&&r(d,n(h,i),m)}return d}return vw=a,vw}var gw,L9;function Sxe(){if(L9)return gw;L9=1;var e=wxe(),r=V$();function n(a,i){return e(a,i,function(o,s){return r(a,s)})}return gw=n,gw}var yw,I9;function Exe(){if(I9)return yw;I9=1;var e=fF(),r=eF(),n=tF();function a(i){return n(r(i,void 0,e),i+"")}return yw=a,yw}var bw,z9;function kxe(){if(z9)return bw;z9=1;var e=Sxe(),r=Exe(),n=r(function(a,i){return a==null?{}:e(a,i)});return bw=n,bw}var xw,q9;function Axe(){if(q9)return xw;q9=1;var e=Math.ceil,r=Math.max;function n(a,i,o,s){for(var c=-1,f=r(e((i-a)/(o||1)),0),d=Array(f);f--;)d[s?f:++c]=a,a+=o;return d}return xw=n,xw}var _w,B9;function jxe(){if(B9)return _w;B9=1;var e=Axe(),r=Cm(),n=cF();function a(i){return function(o,s,c){return c&&typeof c!="number"&&r(o,s,c)&&(s=c=void 0),o=n(o),s===void 0?(s=o,o=0):s=n(s),c=c===void 0?o<s?1:-1:n(c),e(o,s,c,i)}}return _w=a,_w}var ww,$9;function Cxe(){if($9)return ww;$9=1;var e=jxe(),r=e();return ww=r,ww}var Sw,F9;function Oxe(){if(F9)return Sw;F9=1;function e(r,n){var a=r.length;for(r.sort(n);a--;)r[a]=r[a].value;return r}return Sw=e,Sw}var Ew,U9;function Txe(){if(U9)return Ew;U9=1;var e=ws();function r(n,a){if(n!==a){var i=n!==void 0,o=n===null,s=n===n,c=e(n),f=a!==void 0,d=a===null,h=a===a,m=e(a);if(!d&&!m&&!c&&n>a||c&&f&&h&&!d&&!m||o&&f&&h||!i&&h||!s)return 1;if(!o&&!c&&!m&&n<a||m&&i&&s&&!o&&!c||d&&i&&s||!f&&s||!h)return-1}return 0}return Ew=r,Ew}var kw,H9;function Nxe(){if(H9)return kw;H9=1;var e=Txe();function r(n,a,i){for(var o=-1,s=n.criteria,c=a.criteria,f=s.length,d=i.length;++o<f;){var h=e(s[o],c[o]);if(h){if(o>=d)return h;var m=i[o];return h*(m=="desc"?-1:1)}}return n.index-a.index}return kw=r,kw}var Aw,G9;function Mxe(){if(G9)return Aw;G9=1;var e=Em(),r=Am(),n=oi(),a=Z$(),i=Oxe(),o=xm(),s=Nxe(),c=Ko(),f=Tt();function d(h,m,g){m.length?m=e(m,function(E){return f(E)?function(w){return r(w,E.length===1?E[0]:E)}:E}):m=[c];var y=-1;m=e(m,o(n));var _=a(h,function(E,w,x){var j=e(m,function(C){return C(E)});return{criteria:j,index:++y,value:E}});return i(_,function(E,w){return s(E,w,g)})}return Aw=d,Aw}var jw,V9;function Pxe(){if(V9)return jw;V9=1;var e=Wk(),r=Mxe(),n=jm(),a=Cm(),i=n(function(o,s){if(o==null)return[];var c=s.length;return c>1&&a(o,s[0],s[1])?s=[]:c>2&&a(s[0],s[1],s[2])&&(s=[s[0]]),r(o,e(s,1),[])});return jw=i,jw}var Cw,K9;function Rxe(){if(K9)return Cw;K9=1;var e=H$(),r=0;function n(a){var i=++r;return e(a)+i}return Cw=n,Cw}var Ow,Y9;function Dxe(){if(Y9)return Ow;Y9=1;function e(r,n,a){for(var i=-1,o=r.length,s=n.length,c={};++i<o;){var f=i<s?n[i]:void 0;a(c,r[i],f)}return c}return Ow=e,Ow}var Tw,X9;function Lxe(){if(X9)return Tw;X9=1;var e=ym(),r=Dxe();function n(a,i){return r(a||[],i||[],e)}return Tw=n,Tw}var Nw,W9;function pt(){if(W9)return Nw;W9=1;var e;if(typeof Dk=="function")try{e={cloneDeep:Q1e(),constant:Gk(),defaults:J1e(),each:I$(),filter:Y$(),find:oxe(),flatten:fF(),forEach:L$(),forIn:lxe(),has:X$(),isUndefined:W$(),last:sxe(),map:Q$(),mapValues:uxe(),max:fxe(),merge:gxe(),min:yxe(),minBy:bxe(),now:xxe(),pick:kxe(),range:Cxe(),reduce:J$(),sortBy:Pxe(),uniqueId:Rxe(),values:aF(),zipObject:Lxe()}}catch{}return e||(e=window._),Nw=e,Nw}var Mw,Z9;function Ixe(){if(Z9)return Mw;Z9=1,Mw=e;function e(){var a={};a._next=a._prev=a,this._sentinel=a}e.prototype.dequeue=function(){var a=this._sentinel,i=a._prev;if(i!==a)return r(i),i},e.prototype.enqueue=function(a){var i=this._sentinel;a._prev&&a._next&&r(a),a._next=i._next,i._next._prev=a,i._next=a,a._prev=i},e.prototype.toString=function(){for(var a=[],i=this._sentinel,o=i._prev;o!==i;)a.push(JSON.stringify(o,n)),o=o._prev;return"["+a.join(", ")+"]"};function r(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function n(a,i){if(a!=="_next"&&a!=="_prev")return i}return Mw}var Pw,Q9;function zxe(){if(Q9)return Pw;Q9=1;var e=pt(),r=Rn().Graph,n=Ixe();Pw=i;var a=e.constant(1);function i(d,h){if(d.nodeCount()<=1)return[];var m=c(d,h||a),g=o(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(y){return d.outEdges(y.v,y.w)}),!0)}function o(d,h,m){for(var g=[],y=h[h.length-1],_=h[0],E;d.nodeCount();){for(;E=_.dequeue();)s(d,h,m,E);for(;E=y.dequeue();)s(d,h,m,E);if(d.nodeCount()){for(var w=h.length-2;w>0;--w)if(E=h[w].dequeue(),E){g=g.concat(s(d,h,m,E,!0));break}}}return g}function s(d,h,m,g,y){var _=y?[]:void 0;return e.forEach(d.inEdges(g.v),function(E){var w=d.edge(E),x=d.node(E.v);y&&_.push({v:E.v,w:E.w}),x.out-=w,f(h,m,x)}),e.forEach(d.outEdges(g.v),function(E){var w=d.edge(E),x=E.w,j=d.node(x);j.in-=w,f(h,m,j)}),d.removeNode(g.v),_}function c(d,h){var m=new r,g=0,y=0;e.forEach(d.nodes(),function(w){m.setNode(w,{v:w,in:0,out:0})}),e.forEach(d.edges(),function(w){var x=m.edge(w.v,w.w)||0,j=h(w),C=x+j;m.setEdge(w.v,w.w,C),y=Math.max(y,m.node(w.v).out+=j),g=Math.max(g,m.node(w.w).in+=j)});var _=e.range(y+g+3).map(function(){return new n}),E=g+1;return e.forEach(m.nodes(),function(w){f(_,E,m.node(w))}),{graph:m,buckets:_,zeroIdx:E}}function f(d,h,m){m.out?m.in?d[m.out-m.in+h].enqueue(m):d[d.length-1].enqueue(m):d[0].enqueue(m)}return Pw}var Rw,J9;function qxe(){if(J9)return Rw;J9=1;var e=pt(),r=zxe();Rw={run:n,undo:i};function n(o){var s=o.graph().acyclicer==="greedy"?r(o,c(o)):a(o);e.forEach(s,function(f){var d=o.edge(f);o.removeEdge(f),d.forwardName=f.name,d.reversed=!0,o.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function c(f){return function(d){return f.edge(d).weight}}}function a(o){var s=[],c={},f={};function d(h){e.has(f,h)||(f[h]=!0,c[h]=!0,e.forEach(o.outEdges(h),function(m){e.has(c,m.w)?s.push(m):d(m.w)}),delete c[h])}return e.forEach(o.nodes(),d),s}function i(o){e.forEach(o.edges(),function(s){var c=o.edge(s);if(c.reversed){o.removeEdge(s);var f=c.forwardName;delete c.reversed,delete c.forwardName,o.setEdge(s.w,s.v,c,f)}})}return Rw}var Dw,e6;function Nr(){if(e6)return Dw;e6=1;var e=pt(),r=Rn().Graph;Dw={addDummyNode:n,simplify:a,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:s,intersectRect:c,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:m,maxRank:g,partition:y,time:_,notime:E};function n(w,x,j,C){var T;do T=e.uniqueId(C);while(w.hasNode(T));return j.dummy=x,w.setNode(T,j),T}function a(w){var x=new r().setGraph(w.graph());return e.forEach(w.nodes(),function(j){x.setNode(j,w.node(j))}),e.forEach(w.edges(),function(j){var C=x.edge(j.v,j.w)||{weight:0,minlen:1},T=w.edge(j);x.setEdge(j.v,j.w,{weight:C.weight+T.weight,minlen:Math.max(C.minlen,T.minlen)})}),x}function i(w){var x=new r({multigraph:w.isMultigraph()}).setGraph(w.graph());return e.forEach(w.nodes(),function(j){w.children(j).length||x.setNode(j,w.node(j))}),e.forEach(w.edges(),function(j){x.setEdge(j,w.edge(j))}),x}function o(w){var x=e.map(w.nodes(),function(j){var C={};return e.forEach(w.outEdges(j),function(T){C[T.w]=(C[T.w]||0)+w.edge(T).weight}),C});return e.zipObject(w.nodes(),x)}function s(w){var x=e.map(w.nodes(),function(j){var C={};return e.forEach(w.inEdges(j),function(T){C[T.v]=(C[T.v]||0)+w.edge(T).weight}),C});return e.zipObject(w.nodes(),x)}function c(w,x){var j=w.x,C=w.y,T=x.x-j,O=x.y-C,N=w.width/2,M=w.height/2;if(!T&&!O)throw new Error("Not possible to find intersection inside of the rectangle");var R,L;return Math.abs(O)*N>Math.abs(T)*M?(O<0&&(M=-M),R=M*T/O,L=M):(T<0&&(N=-N),R=N,L=N*O/T),{x:j+R,y:C+L}}function f(w){var x=e.map(e.range(g(w)+1),function(){return[]});return e.forEach(w.nodes(),function(j){var C=w.node(j),T=C.rank;e.isUndefined(T)||(x[T][C.order]=j)}),x}function d(w){var x=e.min(e.map(w.nodes(),function(j){return w.node(j).rank}));e.forEach(w.nodes(),function(j){var C=w.node(j);e.has(C,"rank")&&(C.rank-=x)})}function h(w){var x=e.min(e.map(w.nodes(),function(O){return w.node(O).rank})),j=[];e.forEach(w.nodes(),function(O){var N=w.node(O).rank-x;j[N]||(j[N]=[]),j[N].push(O)});var C=0,T=w.graph().nodeRankFactor;e.forEach(j,function(O,N){e.isUndefined(O)&&N%T!==0?--C:C&&e.forEach(O,function(M){w.node(M).rank+=C})})}function m(w,x,j,C){var T={width:0,height:0};return arguments.length>=4&&(T.rank=j,T.order=C),n(w,"border",T,x)}function g(w){return e.max(e.map(w.nodes(),function(x){var j=w.node(x).rank;if(!e.isUndefined(j))return j}))}function y(w,x){var j={lhs:[],rhs:[]};return e.forEach(w,function(C){x(C)?j.lhs.push(C):j.rhs.push(C)}),j}function _(w,x){var j=e.now();try{return x()}finally{console.log(w+" time: "+(e.now()-j)+"ms")}}function E(w,x){return x()}return Dw}var Lw,t6;function Bxe(){if(t6)return Lw;t6=1;var e=pt(),r=Nr();Lw={run:n,undo:i};function n(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(s){a(o,s)})}function a(o,s){var c=s.v,f=o.node(c).rank,d=s.w,h=o.node(d).rank,m=s.name,g=o.edge(s),y=g.labelRank;if(h!==f+1){o.removeEdge(s);var _,E,w;for(w=0,++f;f<h;++w,++f)g.points=[],E={width:0,height:0,edgeLabel:g,edgeObj:s,rank:f},_=r.addDummyNode(o,"edge",E,"_d"),f===y&&(E.width=g.width,E.height=g.height,E.dummy="edge-label",E.labelpos=g.labelpos),o.setEdge(c,_,{weight:g.weight},m),w===0&&o.graph().dummyChains.push(_),c=_;o.setEdge(c,d,{weight:g.weight},m)}}function i(o){e.forEach(o.graph().dummyChains,function(s){var c=o.node(s),f=c.edgeLabel,d;for(o.setEdge(c.edgeObj,f);c.dummy;)d=o.successors(s)[0],o.removeNode(s),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),s=d,c=o.node(s)})}return Lw}var Iw,r6;function mp(){if(r6)return Iw;r6=1;var e=pt();Iw={longestPath:r,slack:n};function r(a){var i={};function o(s){var c=a.node(s);if(e.has(i,s))return c.rank;i[s]=!0;var f=e.min(e.map(a.outEdges(s),function(d){return o(d.w)-a.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(a.sources(),o)}function n(a,i){return a.node(i.w).rank-a.node(i.v).rank-a.edge(i).minlen}return Iw}var zw,n6;function mF(){if(n6)return zw;n6=1;var e=pt(),r=Rn().Graph,n=mp().slack;zw=a;function a(c){var f=new r({directed:!1}),d=c.nodes()[0],h=c.nodeCount();f.setNode(d,{});for(var m,g;i(f,c)<h;)m=o(f,c),g=f.hasNode(m.v)?n(c,m):-n(c,m),s(f,c,g);return f}function i(c,f){function d(h){e.forEach(f.nodeEdges(h),function(m){var g=m.v,y=h===g?m.w:g;!c.hasNode(y)&&!n(f,m)&&(c.setNode(y,{}),c.setEdge(h,y,{}),d(y))})}return e.forEach(c.nodes(),d),c.nodeCount()}function o(c,f){return e.minBy(f.edges(),function(d){if(c.hasNode(d.v)!==c.hasNode(d.w))return n(f,d)})}function s(c,f,d){e.forEach(c.nodes(),function(h){f.node(h).rank+=d})}return zw}var qw,a6;function $xe(){if(a6)return qw;a6=1;var e=pt(),r=mF(),n=mp().slack,a=mp().longestPath,i=Rn().alg.preorder,o=Rn().alg.postorder,s=Nr().simplify;qw=c,c.initLowLimValues=m,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=y,c.enterEdge=_,c.exchangeEdges=E;function c(C){C=s(C),a(C);var T=r(C);m(T),f(T,C);for(var O,N;O=y(T);)N=_(T,C,O),E(T,C,O,N)}function f(C,T){var O=o(C,C.nodes());O=O.slice(0,O.length-1),e.forEach(O,function(N){d(C,T,N)})}function d(C,T,O){var N=C.node(O),M=N.parent;C.edge(O,M).cutvalue=h(C,T,O)}function h(C,T,O){var N=C.node(O),M=N.parent,R=!0,L=T.edge(O,M),D=0;return L||(R=!1,L=T.edge(M,O)),D=L.weight,e.forEach(T.nodeEdges(O),function(q){var z=q.v===O,H=z?q.w:q.v;if(H!==M){var F=z===R,X=T.edge(q).weight;if(D+=F?X:-X,x(C,O,H)){var B=C.edge(O,H).cutvalue;D+=F?-B:B}}}),D}function m(C,T){arguments.length<2&&(T=C.nodes()[0]),g(C,{},1,T)}function g(C,T,O,N,M){var R=O,L=C.node(N);return T[N]=!0,e.forEach(C.neighbors(N),function(D){e.has(T,D)||(O=g(C,T,O,D,N))}),L.low=R,L.lim=O++,M?L.parent=M:delete L.parent,O}function y(C){return e.find(C.edges(),function(T){return C.edge(T).cutvalue<0})}function _(C,T,O){var N=O.v,M=O.w;T.hasEdge(N,M)||(N=O.w,M=O.v);var R=C.node(N),L=C.node(M),D=R,q=!1;R.lim>L.lim&&(D=L,q=!0);var z=e.filter(T.edges(),function(H){return q===j(C,C.node(H.v),D)&&q!==j(C,C.node(H.w),D)});return e.minBy(z,function(H){return n(T,H)})}function E(C,T,O,N){var M=O.v,R=O.w;C.removeEdge(M,R),C.setEdge(N.v,N.w,{}),m(C),f(C,T),w(C,T)}function w(C,T){var O=e.find(C.nodes(),function(M){return!T.node(M).parent}),N=i(C,O);N=N.slice(1),e.forEach(N,function(M){var R=C.node(M).parent,L=T.edge(M,R),D=!1;L||(L=T.edge(R,M),D=!0),T.node(M).rank=T.node(R).rank+(D?L.minlen:-L.minlen)})}function x(C,T,O){return C.hasEdge(T,O)}function j(C,T,O){return O.low<=T.lim&&T.lim<=O.lim}return qw}var Bw,i6;function Fxe(){if(i6)return Bw;i6=1;var e=mp(),r=e.longestPath,n=mF(),a=$xe();Bw=i;function i(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":s(f);break;case"longest-path":o(f);break;default:c(f)}}var o=r;function s(f){r(f),n(f)}function c(f){a(f)}return Bw}var $w,o6;function Uxe(){if(o6)return $w;o6=1;var e=pt();$w=r;function r(i){var o=a(i);e.forEach(i.graph().dummyChains,function(s){for(var c=i.node(s),f=c.edgeObj,d=n(i,o,f.v,f.w),h=d.path,m=d.lca,g=0,y=h[g],_=!0;s!==f.w;){if(c=i.node(s),_){for(;(y=h[g])!==m&&i.node(y).maxRank<c.rank;)g++;y===m&&(_=!1)}if(!_){for(;g<h.length-1&&i.node(y=h[g+1]).minRank<=c.rank;)g++;y=h[g]}i.setParent(s,y),s=i.successors(s)[0]}})}function n(i,o,s,c){var f=[],d=[],h=Math.min(o[s].low,o[c].low),m=Math.max(o[s].lim,o[c].lim),g,y;g=s;do g=i.parent(g),f.push(g);while(g&&(o[g].low>h||m>o[g].lim));for(y=g,g=c;(g=i.parent(g))!==y;)d.push(g);return{path:f.concat(d.reverse()),lca:y}}function a(i){var o={},s=0;function c(f){var d=s;e.forEach(i.children(f),c),o[f]={low:d,lim:s++}}return e.forEach(i.children(),c),o}return $w}var Fw,l6;function Hxe(){if(l6)return Fw;l6=1;var e=pt(),r=Nr();Fw={run:n,cleanup:s};function n(c){var f=r.addDummyNode(c,"root",{},"_root"),d=i(c),h=e.max(e.values(d))-1,m=2*h+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(y){c.edge(y).minlen*=m});var g=o(c)+1;e.forEach(c.children(),function(y){a(c,f,m,g,h,d,y)}),c.graph().nodeRankFactor=m}function a(c,f,d,h,m,g,y){var _=c.children(y);if(!_.length){y!==f&&c.setEdge(f,y,{weight:0,minlen:d});return}var E=r.addBorderNode(c,"_bt"),w=r.addBorderNode(c,"_bb"),x=c.node(y);c.setParent(E,y),x.borderTop=E,c.setParent(w,y),x.borderBottom=w,e.forEach(_,function(j){a(c,f,d,h,m,g,j);var C=c.node(j),T=C.borderTop?C.borderTop:j,O=C.borderBottom?C.borderBottom:j,N=C.borderTop?h:2*h,M=T!==O?1:m-g[y]+1;c.setEdge(E,T,{weight:N,minlen:M,nestingEdge:!0}),c.setEdge(O,w,{weight:N,minlen:M,nestingEdge:!0})}),c.parent(y)||c.setEdge(f,E,{weight:0,minlen:m+g[y]})}function i(c){var f={};function d(h,m){var g=c.children(h);g&&g.length&&e.forEach(g,function(y){d(y,m+1)}),f[h]=m}return e.forEach(c.children(),function(h){d(h,1)}),f}function o(c){return e.reduce(c.edges(),function(f,d){return f+c.edge(d).weight},0)}function s(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(d){var h=c.edge(d);h.nestingEdge&&c.removeEdge(d)})}return Fw}var Uw,s6;function Gxe(){if(s6)return Uw;s6=1;var e=pt(),r=Nr();Uw=n;function n(i){function o(s){var c=i.children(s),f=i.node(s);if(c.length&&e.forEach(c,o),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,h=f.maxRank+1;d<h;++d)a(i,"borderLeft","_bl",s,f,d),a(i,"borderRight","_br",s,f,d)}}e.forEach(i.children(),o)}function a(i,o,s,c,f,d){var h={width:0,height:0,rank:d,borderType:o},m=f[o][d-1],g=r.addDummyNode(i,"border",h,s);f[o][d]=g,i.setParent(g,c),m&&i.setEdge(m,g,{weight:1})}return Uw}var Hw,u6;function Vxe(){if(u6)return Hw;u6=1;var e=pt();Hw={adjust:r,undo:n};function r(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&a(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&o(d),(h==="lr"||h==="rl")&&(c(d),a(d))}function a(d){e.forEach(d.nodes(),function(h){i(d.node(h))}),e.forEach(d.edges(),function(h){i(d.edge(h))})}function i(d){var h=d.width;d.width=d.height,d.height=h}function o(d){e.forEach(d.nodes(),function(h){s(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,s),e.has(m,"y")&&s(m)})}function s(d){d.y=-d.y}function c(d){e.forEach(d.nodes(),function(h){f(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,f),e.has(m,"x")&&f(m)})}function f(d){var h=d.x;d.x=d.y,d.y=h}return Hw}var Gw,c6;function Kxe(){if(c6)return Gw;c6=1;var e=pt();Gw=r;function r(n){var a={},i=e.filter(n.nodes(),function(d){return!n.children(d).length}),o=e.max(e.map(i,function(d){return n.node(d).rank})),s=e.map(e.range(o+1),function(){return[]});function c(d){if(!e.has(a,d)){a[d]=!0;var h=n.node(d);s[h.rank].push(d),e.forEach(n.successors(d),c)}}var f=e.sortBy(i,function(d){return n.node(d).rank});return e.forEach(f,c),s}return Gw}var Vw,f6;function Yxe(){if(f6)return Vw;f6=1;var e=pt();Vw=r;function r(a,i){for(var o=0,s=1;s<i.length;++s)o+=n(a,i[s-1],i[s]);return o}function n(a,i,o){for(var s=e.zipObject(o,e.map(o,function(g,y){return y})),c=e.flatten(e.map(i,function(g){return e.sortBy(e.map(a.outEdges(g),function(y){return{pos:s[y.w],weight:a.edge(y).weight}}),"pos")}),!0),f=1;f<o.length;)f<<=1;var d=2*f-1;f-=1;var h=e.map(new Array(d),function(){return 0}),m=0;return e.forEach(c.forEach(function(g){var y=g.pos+f;h[y]+=g.weight;for(var _=0;y>0;)y%2&&(_+=h[y+1]),y=y-1>>1,h[y]+=g.weight;m+=g.weight*_})),m}return Vw}var Kw,d6;function Xxe(){if(d6)return Kw;d6=1;var e=pt();Kw=r;function r(n,a){return e.map(a,function(i){var o=n.inEdges(i);if(o.length){var s=e.reduce(o,function(c,f){var d=n.edge(f),h=n.node(f.v);return{sum:c.sum+d.weight*h.order,weight:c.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:i}})}return Kw}var Yw,h6;function Wxe(){if(h6)return Yw;h6=1;var e=pt();Yw=r;function r(i,o){var s={};e.forEach(i,function(f,d){var h=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(h.barycenter=f.barycenter,h.weight=f.weight)}),e.forEach(o.edges(),function(f){var d=s[f.v],h=s[f.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(s[f.w]))});var c=e.filter(s,function(f){return!f.indegree});return n(c)}function n(i){var o=[];function s(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&a(d,h)}}function c(d){return function(h){h.in.push(d),--h.indegree===0&&i.push(h)}}for(;i.length;){var f=i.pop();o.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,c(f))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function a(i,o){var s=0,c=0;i.weight&&(s+=i.barycenter*i.weight,c+=i.weight),o.weight&&(s+=o.barycenter*o.weight,c+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=s/c,i.weight=c,i.i=Math.min(o.i,i.i),o.merged=!0}return Yw}var Xw,p6;function Zxe(){if(p6)return Xw;p6=1;var e=pt(),r=Nr();Xw=n;function n(o,s){var c=r.partition(o,function(E){return e.has(E,"barycenter")}),f=c.lhs,d=e.sortBy(c.rhs,function(E){return-E.i}),h=[],m=0,g=0,y=0;f.sort(i(!!s)),y=a(h,d,y),e.forEach(f,function(E){y+=E.vs.length,h.push(E.vs),m+=E.barycenter*E.weight,g+=E.weight,y=a(h,d,y)});var _={vs:e.flatten(h,!0)};return g&&(_.barycenter=m/g,_.weight=g),_}function a(o,s,c){for(var f;s.length&&(f=e.last(s)).i<=c;)s.pop(),o.push(f.vs),c++;return c}function i(o){return function(s,c){return s.barycenter<c.barycenter?-1:s.barycenter>c.barycenter?1:o?c.i-s.i:s.i-c.i}}return Xw}var Ww,m6;function Qxe(){if(m6)return Ww;m6=1;var e=pt(),r=Xxe(),n=Wxe(),a=Zxe();Ww=i;function i(c,f,d,h){var m=c.children(f),g=c.node(f),y=g?g.borderLeft:void 0,_=g?g.borderRight:void 0,E={};y&&(m=e.filter(m,function(O){return O!==y&&O!==_}));var w=r(c,m);e.forEach(w,function(O){if(c.children(O.v).length){var N=i(c,O.v,d,h);E[O.v]=N,e.has(N,"barycenter")&&s(O,N)}});var x=n(w,d);o(x,E);var j=a(x,h);if(y&&(j.vs=e.flatten([y,j.vs,_],!0),c.predecessors(y).length)){var C=c.node(c.predecessors(y)[0]),T=c.node(c.predecessors(_)[0]);e.has(j,"barycenter")||(j.barycenter=0,j.weight=0),j.barycenter=(j.barycenter*j.weight+C.order+T.order)/(j.weight+2),j.weight+=2}return j}function o(c,f){e.forEach(c,function(d){d.vs=e.flatten(d.vs.map(function(h){return f[h]?f[h].vs:h}),!0)})}function s(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return Ww}var Zw,v6;function Jxe(){if(v6)return Zw;v6=1;var e=pt(),r=Rn().Graph;Zw=n;function n(i,o,s){var c=a(i),f=new r({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var h=i.node(d),m=i.parent(d);(h.rank===o||h.minRank<=o&&o<=h.maxRank)&&(f.setNode(d),f.setParent(d,m||c),e.forEach(i[s](d),function(g){var y=g.v===d?g.w:g.v,_=f.edge(y,d),E=e.isUndefined(_)?0:_.weight;f.setEdge(y,d,{weight:i.edge(g).weight+E})}),e.has(h,"minRank")&&f.setNode(d,{borderLeft:h.borderLeft[o],borderRight:h.borderRight[o]}))}),f}function a(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return Zw}var Qw,g6;function e_e(){if(g6)return Qw;g6=1;var e=pt();Qw=r;function r(n,a,i){var o={},s;e.forEach(i,function(c){for(var f=n.parent(c),d,h;f;){if(d=n.parent(f),d?(h=o[d],o[d]=f):(h=s,s=f),h&&h!==f){a.setEdge(h,f);return}f=d}})}return Qw}var Jw,y6;function t_e(){if(y6)return Jw;y6=1;var e=pt(),r=Kxe(),n=Yxe(),a=Qxe(),i=Jxe(),o=e_e(),s=Rn().Graph,c=Nr();Jw=f;function f(g){var y=c.maxRank(g),_=d(g,e.range(1,y+1),"inEdges"),E=d(g,e.range(y-1,-1,-1),"outEdges"),w=r(g);m(g,w);for(var x=Number.POSITIVE_INFINITY,j,C=0,T=0;T<4;++C,++T){h(C%2?_:E,C%4>=2),w=c.buildLayerMatrix(g);var O=n(g,w);O<x&&(T=0,j=e.cloneDeep(w),x=O)}m(g,j)}function d(g,y,_){return e.map(y,function(E){return i(g,E,_)})}function h(g,y){var _=new s;e.forEach(g,function(E){var w=E.graph().root,x=a(E,w,_,y);e.forEach(x.vs,function(j,C){E.node(j).order=C}),o(E,_,x.vs)})}function m(g,y){e.forEach(y,function(_){e.forEach(_,function(E,w){g.node(E).order=w})})}return Jw}var e2,b6;function r_e(){if(b6)return e2;b6=1;var e=pt(),r=Rn().Graph,n=Nr();e2={positionX:_,findType1Conflicts:a,findType2Conflicts:i,addConflict:s,hasConflict:c,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:g,findSmallestWidthAlignment:m,balance:y};function a(x,j){var C={};function T(O,N){var M=0,R=0,L=O.length,D=e.last(N);return e.forEach(N,function(q,z){var H=o(x,q),F=H?x.node(H).order:L;(H||q===D)&&(e.forEach(N.slice(R,z+1),function(X){e.forEach(x.predecessors(X),function(B){var Q=x.node(B),te=Q.order;(te<M||F<te)&&!(Q.dummy&&x.node(X).dummy)&&s(C,B,X)})}),R=z+1,M=F)}),N}return e.reduce(j,T),C}function i(x,j){var C={};function T(N,M,R,L,D){var q;e.forEach(e.range(M,R),function(z){q=N[z],x.node(q).dummy&&e.forEach(x.predecessors(q),function(H){var F=x.node(H);F.dummy&&(F.order<L||F.order>D)&&s(C,H,q)})})}function O(N,M){var R=-1,L,D=0;return e.forEach(M,function(q,z){if(x.node(q).dummy==="border"){var H=x.predecessors(q);H.length&&(L=x.node(H[0]).order,T(M,D,z,R,L),D=z,R=L)}T(M,D,M.length,L,N.length)}),M}return e.reduce(j,O),C}function o(x,j){if(x.node(j).dummy)return e.find(x.predecessors(j),function(C){return x.node(C).dummy})}function s(x,j,C){if(j>C){var T=j;j=C,C=T}var O=x[j];O||(x[j]=O={}),O[C]=!0}function c(x,j,C){if(j>C){var T=j;j=C,C=T}return e.has(x[j],C)}function f(x,j,C,T){var O={},N={},M={};return e.forEach(j,function(R){e.forEach(R,function(L,D){O[L]=L,N[L]=L,M[L]=D})}),e.forEach(j,function(R){var L=-1;e.forEach(R,function(D){var q=T(D);if(q.length){q=e.sortBy(q,function(B){return M[B]});for(var z=(q.length-1)/2,H=Math.floor(z),F=Math.ceil(z);H<=F;++H){var X=q[H];N[D]===D&&L<M[X]&&!c(C,D,X)&&(N[X]=D,N[D]=O[D]=O[X],L=M[X])}}})}),{root:O,align:N}}function d(x,j,C,T,O){var N={},M=h(x,j,C,O),R=O?"borderLeft":"borderRight";function L(z,H){for(var F=M.nodes(),X=F.pop(),B={};X;)B[X]?z(X):(B[X]=!0,F.push(X),F=F.concat(H(X))),X=F.pop()}function D(z){N[z]=M.inEdges(z).reduce(function(H,F){return Math.max(H,N[F.v]+M.edge(F))},0)}function q(z){var H=M.outEdges(z).reduce(function(X,B){return Math.min(X,N[B.w]-M.edge(B))},Number.POSITIVE_INFINITY),F=x.node(z);H!==Number.POSITIVE_INFINITY&&F.borderType!==R&&(N[z]=Math.max(N[z],H))}return L(D,M.predecessors.bind(M)),L(q,M.successors.bind(M)),e.forEach(T,function(z){N[z]=N[C[z]]}),N}function h(x,j,C,T){var O=new r,N=x.graph(),M=E(N.nodesep,N.edgesep,T);return e.forEach(j,function(R){var L;e.forEach(R,function(D){var q=C[D];if(O.setNode(q),L){var z=C[L],H=O.edge(z,q);O.setEdge(z,q,Math.max(M(x,D,L),H||0))}L=D})}),O}function m(x,j){return e.minBy(e.values(j),function(C){var T=Number.NEGATIVE_INFINITY,O=Number.POSITIVE_INFINITY;return e.forIn(C,function(N,M){var R=w(x,M)/2;T=Math.max(N+R,T),O=Math.min(N-R,O)}),T-O})}function g(x,j){var C=e.values(j),T=e.min(C),O=e.max(C);e.forEach(["u","d"],function(N){e.forEach(["l","r"],function(M){var R=N+M,L=x[R],D;if(L!==j){var q=e.values(L);D=M==="l"?T-e.min(q):O-e.max(q),D&&(x[R]=e.mapValues(L,function(z){return z+D}))}})})}function y(x,j){return e.mapValues(x.ul,function(C,T){if(j)return x[j.toLowerCase()][T];var O=e.sortBy(e.map(x,T));return(O[1]+O[2])/2})}function _(x){var j=n.buildLayerMatrix(x),C=e.merge(a(x,j),i(x,j)),T={},O;e.forEach(["u","d"],function(M){O=M==="u"?j:e.values(j).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(O=e.map(O,function(z){return e.values(z).reverse()}));var L=(M==="u"?x.predecessors:x.successors).bind(x),D=f(x,O,C,L),q=d(x,O,D.root,D.align,R==="r");R==="r"&&(q=e.mapValues(q,function(z){return-z})),T[M+R]=q})});var N=m(x,T);return g(T,N),y(T,x.graph().align)}function E(x,j,C){return function(T,O,N){var M=T.node(O),R=T.node(N),L=0,D;if(L+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":D=-M.width/2;break;case"r":D=M.width/2;break}if(D&&(L+=C?D:-D),D=0,L+=(M.dummy?j:x)/2,L+=(R.dummy?j:x)/2,L+=R.width/2,e.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":D=R.width/2;break;case"r":D=-R.width/2;break}return D&&(L+=C?D:-D),D=0,L}}function w(x,j){return x.node(j).width}return e2}var t2,x6;function n_e(){if(x6)return t2;x6=1;var e=pt(),r=Nr(),n=r_e().positionX;t2=a;function a(o){o=r.asNonCompoundGraph(o),i(o),e.forEach(n(o),function(s,c){o.node(c).x=s})}function i(o){var s=r.buildLayerMatrix(o),c=o.graph().ranksep,f=0;e.forEach(s,function(d){var h=e.max(e.map(d,function(m){return o.node(m).height}));e.forEach(d,function(m){o.node(m).y=f+h/2}),f+=h+c})}return t2}var r2,_6;function a_e(){if(_6)return r2;_6=1;var e=pt(),r=qxe(),n=Bxe(),a=Fxe(),i=Nr().normalizeRanks,o=Uxe(),s=Nr().removeEmptyRanks,c=Hxe(),f=Gxe(),d=Vxe(),h=t_e(),m=n_e(),g=Nr(),y=Rn().Graph;r2=_;function _($,Y){var G=Y&&Y.debugTiming?g.time:g.notime;G("layout",function(){var he=G(" buildLayoutGraph",function(){return L($)});G(" runLayout",function(){E(he,G)}),G(" updateInputGraph",function(){w($,he)})})}function E($,Y){Y(" makeSpaceForEdgeLabels",function(){D($)}),Y(" removeSelfEdges",function(){K($)}),Y(" acyclic",function(){r.run($)}),Y(" nestingGraph.run",function(){c.run($)}),Y(" rank",function(){a(g.asNonCompoundGraph($))}),Y(" injectEdgeLabelProxies",function(){q($)}),Y(" removeEmptyRanks",function(){s($)}),Y(" nestingGraph.cleanup",function(){c.cleanup($)}),Y(" normalizeRanks",function(){i($)}),Y(" assignRankMinMax",function(){z($)}),Y(" removeEdgeLabelProxies",function(){H($)}),Y(" normalize.run",function(){n.run($)}),Y(" parentDummyChains",function(){o($)}),Y(" addBorderSegments",function(){f($)}),Y(" order",function(){h($)}),Y(" insertSelfEdges",function(){de($)}),Y(" adjustCoordinateSystem",function(){d.adjust($)}),Y(" position",function(){m($)}),Y(" positionSelfEdges",function(){U($)}),Y(" removeBorderNodes",function(){te($)}),Y(" normalize.undo",function(){n.undo($)}),Y(" fixupEdgeLabelCoords",function(){B($)}),Y(" undoCoordinateSystem",function(){d.undo($)}),Y(" translateGraph",function(){F($)}),Y(" assignNodeIntersects",function(){X($)}),Y(" reversePoints",function(){Q($)}),Y(" acyclic.undo",function(){r.undo($)})}function w($,Y){e.forEach($.nodes(),function(G){var he=$.node(G),xe=Y.node(G);he&&(he.x=xe.x,he.y=xe.y,Y.children(G).length&&(he.width=xe.width,he.height=xe.height))}),e.forEach($.edges(),function(G){var he=$.edge(G),xe=Y.edge(G);he.points=xe.points,e.has(xe,"x")&&(he.x=xe.x,he.y=xe.y)}),$.graph().width=Y.graph().width,$.graph().height=Y.graph().height}var x=["nodesep","edgesep","ranksep","marginx","marginy"],j={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},C=["acyclicer","ranker","rankdir","align"],T=["width","height"],O={width:0,height:0},N=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function L($){var Y=new y({multigraph:!0,compound:!0}),G=le($.graph());return Y.setGraph(e.merge({},j,J(G,x),e.pick(G,C))),e.forEach($.nodes(),function(he){var xe=le($.node(he));Y.setNode(he,e.defaults(J(xe,T),O)),Y.setParent(he,$.parent(he))}),e.forEach($.edges(),function(he){var xe=le($.edge(he));Y.setEdge(he,e.merge({},M,J(xe,N),e.pick(xe,R)))}),Y}function D($){var Y=$.graph();Y.ranksep/=2,e.forEach($.edges(),function(G){var he=$.edge(G);he.minlen*=2,he.labelpos.toLowerCase()!=="c"&&(Y.rankdir==="TB"||Y.rankdir==="BT"?he.width+=he.labeloffset:he.height+=he.labeloffset)})}function q($){e.forEach($.edges(),function(Y){var G=$.edge(Y);if(G.width&&G.height){var he=$.node(Y.v),xe=$.node(Y.w),Z={rank:(xe.rank-he.rank)/2+he.rank,e:Y};g.addDummyNode($,"edge-proxy",Z,"_ep")}})}function z($){var Y=0;e.forEach($.nodes(),function(G){var he=$.node(G);he.borderTop&&(he.minRank=$.node(he.borderTop).rank,he.maxRank=$.node(he.borderBottom).rank,Y=e.max(Y,he.maxRank))}),$.graph().maxRank=Y}function H($){e.forEach($.nodes(),function(Y){var G=$.node(Y);G.dummy==="edge-proxy"&&($.edge(G.e).labelRank=G.rank,$.removeNode(Y))})}function F($){var Y=Number.POSITIVE_INFINITY,G=0,he=Number.POSITIVE_INFINITY,xe=0,Z=$.graph(),se=Z.marginx||0,ge=Z.marginy||0;function ee(be){var ce=be.x,ye=be.y,we=be.width,ke=be.height;Y=Math.min(Y,ce-we/2),G=Math.max(G,ce+we/2),he=Math.min(he,ye-ke/2),xe=Math.max(xe,ye+ke/2)}e.forEach($.nodes(),function(be){ee($.node(be))}),e.forEach($.edges(),function(be){var ce=$.edge(be);e.has(ce,"x")&&ee(ce)}),Y-=se,he-=ge,e.forEach($.nodes(),function(be){var ce=$.node(be);ce.x-=Y,ce.y-=he}),e.forEach($.edges(),function(be){var ce=$.edge(be);e.forEach(ce.points,function(ye){ye.x-=Y,ye.y-=he}),e.has(ce,"x")&&(ce.x-=Y),e.has(ce,"y")&&(ce.y-=he)}),Z.width=G-Y+se,Z.height=xe-he+ge}function X($){e.forEach($.edges(),function(Y){var G=$.edge(Y),he=$.node(Y.v),xe=$.node(Y.w),Z,se;G.points?(Z=G.points[0],se=G.points[G.points.length-1]):(G.points=[],Z=xe,se=he),G.points.unshift(g.intersectRect(he,Z)),G.points.push(g.intersectRect(xe,se))})}function B($){e.forEach($.edges(),function(Y){var G=$.edge(Y);if(e.has(G,"x"))switch((G.labelpos==="l"||G.labelpos==="r")&&(G.width-=G.labeloffset),G.labelpos){case"l":G.x-=G.width/2+G.labeloffset;break;case"r":G.x+=G.width/2+G.labeloffset;break}})}function Q($){e.forEach($.edges(),function(Y){var G=$.edge(Y);G.reversed&&G.points.reverse()})}function te($){e.forEach($.nodes(),function(Y){if($.children(Y).length){var G=$.node(Y),he=$.node(G.borderTop),xe=$.node(G.borderBottom),Z=$.node(e.last(G.borderLeft)),se=$.node(e.last(G.borderRight));G.width=Math.abs(se.x-Z.x),G.height=Math.abs(xe.y-he.y),G.x=Z.x+G.width/2,G.y=he.y+G.height/2}}),e.forEach($.nodes(),function(Y){$.node(Y).dummy==="border"&&$.removeNode(Y)})}function K($){e.forEach($.edges(),function(Y){if(Y.v===Y.w){var G=$.node(Y.v);G.selfEdges||(G.selfEdges=[]),G.selfEdges.push({e:Y,label:$.edge(Y)}),$.removeEdge(Y)}})}function de($){var Y=g.buildLayerMatrix($);e.forEach(Y,function(G){var he=0;e.forEach(G,function(xe,Z){var se=$.node(xe);se.order=Z+he,e.forEach(se.selfEdges,function(ge){g.addDummyNode($,"selfedge",{width:ge.label.width,height:ge.label.height,rank:se.rank,order:Z+ ++he,e:ge.e,label:ge.label},"_se")}),delete se.selfEdges})})}function U($){e.forEach($.nodes(),function(Y){var G=$.node(Y);if(G.dummy==="selfedge"){var he=$.node(G.e.v),xe=he.x+he.width/2,Z=he.y,se=G.x-xe,ge=he.height/2;$.setEdge(G.e,G.label),$.removeNode(Y),G.label.points=[{x:xe+2*se/3,y:Z-ge},{x:xe+5*se/6,y:Z-ge},{x:xe+se,y:Z},{x:xe+5*se/6,y:Z+ge},{x:xe+2*se/3,y:Z+ge}],G.label.x=G.x,G.label.y=G.y}})}function J($,Y){return e.mapValues(e.pick($,Y),Number)}function le($){var Y={};return e.forEach($,function(G,he){Y[he.toLowerCase()]=G}),Y}return r2}var n2,w6;function i_e(){if(w6)return n2;w6=1;var e=pt(),r=Nr(),n=Rn().Graph;n2={debugOrdering:a};function a(i){var o=r.buildLayerMatrix(i),s=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(c){s.setNode(c,{label:c}),s.setParent(c,"layer"+i.node(c).rank)}),e.forEach(i.edges(),function(c){s.setEdge(c.v,c.w,{},c.name)}),e.forEach(o,function(c,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(c,function(h,m){return s.setEdge(h,m,{style:"invis"}),m})}),s}return n2}var a2,S6;function o_e(){return S6||(S6=1,a2="0.8.5"),a2}var i2,E6;function l_e(){return E6||(E6=1,i2={graphlib:Rn(),layout:a_e(),debug:i_e(),util:{time:Nr().time,notime:Nr().notime},version:o_e()}),i2}var s_e=l_e();const k6=Dn(s_e),u_e=[{id:"ci_green",eventName:"CI Passed",description:"When CI checks pass on a PR"},{id:"ci_red",eventName:"CI Failed",description:"When CI checks fail on a PR"},{id:"pr_merged",eventName:"PR Merged",description:"When a PR is merged"},{id:"ci_blocked",eventName:"CI Blocked",description:"When CI failure count exceeds threshold"},{id:"stuck_nudge",eventName:"Stuck Nudge",description:"When a team has been idle too long"},{id:"nudge_progress",eventName:"Nudge Progress",description:"Ask TL for a status update"},{id:"ask_for_pr",eventName:"Ask for PR",description:"Request TL to open a pull request"},{id:"check_ci",eventName:"Check CI",description:"Tell TL to fix failing CI"},{id:"wrap_up",eventName:"Wrap Up",description:"Tell TL to finish and push"}],c_e=130,f_e=50;function kS({trigger:e,size:r=14,className:n}){switch(e){case"hook":return b.jsx(BV,{size:r,className:n});case"timer":return b.jsx(FV,{size:r,className:n});case"poller":return b.jsx(zV,{size:r,className:n});case"pm_action":return b.jsx($V,{size:r,className:n});case"system":return b.jsx(RS,{size:r,className:n});default:return null}}function d_e(e,r,n,a,i,o){const s=a/24,c=r-a/2,f=n-a/2,d={fill:"none",stroke:i,strokeWidth:2/s,strokeLinecap:"round",strokeLinejoin:"round",opacity:o};switch(e){case"hook":return b.jsx("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})});case"timer":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"poller":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]});case"pm_action":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]});case"system":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("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"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]});default:return null}}const h_e={hook:"Hook event",timer:"Timer (stuck detector)",poller:"Poller (GitHub)",pm_action:"PM action (API call)",system:"System (queue, recovery)"};function p_e(e,r){const n=e.map(h=>h.id),a=r.flatMap(h=>h.from==="*"?n.map(m=>({...h,from:m,id:`${h.id}-${m}`})):[h]),i=new Map;for(const h of a){const m=`${h.from}|${h.trigger}|${h.to}`,g=i.get(m);if(!g)i.set(m,h);else{const y=g.id.includes(`-${g.from}`),_=h.id.includes(`-${h.from}`);y&&!_&&i.set(m,h)}}const o=[...i.values()],s=h=>`${h.trigger}|${h.to}`,c=new Map;for(const h of o){const m=s(h);c.has(m)||c.set(m,[]),c.get(m).push(h)}const f=[];for(const[,h]of c){const m=new Set(h.map(y=>y.from));if(n.every(y=>m.has(y))&&h.length>=n.length){const y=h[0],_=y.id.replace(/-[^-]+$/,"");f.push({...y,from:"*",id:_})}else f.push(...h)}const d=[...f].sort((h,m)=>h.from==="*"&&m.from!=="*"?-1:h.from!=="*"&&m.from==="*"?1:h.from<m.from?-1:h.from>m.from?1:h.to<m.to?-1:h.to>m.to?1:0);return{transitions:f,tableTransitions:d}}function m_e(e,r){const n=[],a=e.map(d=>d.id),i=new Map;for(const d of r){if(d.from==="*")continue;const h=`${d.id}|${d.from}|${d.to}|${d.trigger}`;i.has(h)||i.set(h,[]),i.get(h).push(d)}for(const[,d]of i)if(d.length>1){const h=d.map(m=>m.id).join(", ");n.push({type:"duplicate",message:`Duplicate transition: ${d[0].from} -> ${d[0].to} (${d[0].trigger}) defined ${d.length} times [${h}]`})}const o=new Set,s=new Set;for(const d of r)d.from==="*"?a.forEach(h=>o.add(h)):o.add(d.from),s.add(d.to);const c=new Set(["done","failed"]);for(const d of a)!o.has(d)&&!c.has(d)&&n.push({type:"orphan",message:`Orphan state: "${d}" has no outgoing transitions`});const f=new Set(["queued"]);for(const d of a)!s.has(d)&&!f.has(d)&&n.push({type:"unreachable",message:`Unreachable state: "${d}" has no incoming transitions`});return n}const v_e=70,g_e=30;function y_e(e,r){const n=new k6.graphlib.Graph({multigraph:!0});n.setGraph({rankdir:"LR",nodesep:60,ranksep:120,marginx:40,marginy:40}),n.setDefaultEdgeLabel(()=>({}));const a=new Set(e.map(m=>m.id));for(const m of e)n.setNode(m.id,{label:m.id,width:c_e,height:f_e});r.some(m=>m.from==="*")&&n.setNode("*",{label:"All",width:v_e,height:g_e});const o=new Map;for(const m of r){const g=m.from==="*"?"*":m.from;if(g!=="*"&&!a.has(g)||!a.has(m.to))continue;const y=`${g}->${m.to}|${m.trigger}`;o.has(y)||o.set(y,[]),o.get(y).push(m)}o.forEach((m,g)=>{const[y,_]=g.split("|"),[E,w]=y.split("->");n.setEdge(E,w,{},_)}),k6.layout(n);const s=n.nodes().map(m=>{const g=n.node(m);return{id:m,x:g.x,y:g.y,width:g.width,height:g.height}}),c=n.edges().map(m=>{const g=n.edge(m),y=`${m.v}->${m.w}|${m.name}`;return{from:m.v,to:m.w,trigger:m.name||"",points:g.points||[],transitions:o.get(y)||[]}}),f=n.graph(),d=(f.width||800)+80,h=(f.height||400)+80;return{nodes:s,edges:c,width:d,height:h}}function b_e({info:e,stateColorMap:r,onClose:n}){const a=k.useRef(null);return k.useEffect(()=>{const o=setTimeout(n,5e3);return()=>clearTimeout(o)},[n]),k.useEffect(()=>{function o(s){a.current&&!a.current.contains(s.target)&&n()}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[n]),e.transitions[0]?b.jsx("div",{ref:a,className:"absolute z-50 bg-[#161B22] border border-[#30363D] rounded-lg shadow-xl p-3 min-w-[240px] max-w-[340px]",style:{left:e.x,top:e.y,transform:"translate(-50%, -100%) translateY(-8px)"},children:e.transitions.map((o,s)=>b.jsxs("div",{className:s>0?"mt-3 pt-3 border-t border-[#30363D]":"",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.from]||"#8B949E"}20`,color:r[o.from]||"#8B949E",border:`1px solid ${r[o.from]||"#8B949E"}40`},children:o.from==="*"?"All":o.from}),b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#8B949E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M5 12h14"}),b.jsx("path",{d:"m12 5 7 7-7 7"})]}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.to]||"#8B949E"}20`,color:r[o.to]||"#8B949E",border:`1px solid ${r[o.to]||"#8B949E"}40`},children:o.to})]}),b.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-dark-text mb-1",children:[b.jsx(kS,{trigger:o.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"font-medium",children:o.triggerLabel})]}),b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:o.description}),b.jsx("p",{className:"text-xs font-mono text-dark-muted bg-[#0D1117] px-1.5 py-0.5 rounded",children:o.condition})]},o.id))}):null}function x_e({cardDef:e,templateData:r,onSave:n}){const[a,i]=k.useState((r==null?void 0:r.template)??""),[o,s]=k.useState((r==null?void 0:r.enabled)??!0),[c,f]=k.useState(!1),[d,h]=k.useState(null);k.useEffect(()=>{r&&(i(r.template),s(r.enabled))},[r]);const m=k.useCallback(async()=>{f(!0),h(null);try{await n(e.id,a,o),h("Saved successfully")}catch(y){h(y instanceof Error?y.message:"Failed to save")}finally{f(!1)}},[e.id,a,o,n]),g=(r==null?void 0:r.placeholders)??[];return b.jsxs("div",{className:"bg-[#161B22] border border-[#30363D] rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-start justify-between mb-2",children:[b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-semibold text-dark-text",children:e.eventName}),b.jsx("p",{className:"text-xs text-dark-muted mt-0.5",children:e.description}),b.jsxs("p",{className:"text-[10px] text-dark-muted font-mono mt-0.5",children:["(",e.id,")"]})]}),b.jsx("button",{type:"button",role:"switch","aria-checked":o,"aria-label":`Toggle ${e.eventName} message`,onClick:()=>s(!o),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0 mt-0.5 ${o?"bg-[#3FB950]":"bg-[#30363D]"}`,children:b.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${o?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),b.jsx("textarea",{value:a,onChange:y=>{i(y.target.value),h(null)},rows:3,className:`w-full text-sm font-mono rounded px-3 py-2 resize-y bg-[#0D1117] border ${o?"border-[#30363D] text-dark-text":"border-[#30363D] text-dark-muted opacity-60"} focus:outline-none focus:ring-1 focus:ring-[#58A6FF]/50`}),g.length>0&&b.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:g.map(y=>b.jsx("code",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-[#30363D] text-[#58A6FF]",children:`{{${y}}}`},y))}),b.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[b.jsx("button",{type:"button",onClick:m,disabled:c,className:"px-3 py-1 text-xs font-medium rounded border border-[#58A6FF]/50 text-[#58A6FF] hover:bg-[#58A6FF]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:c?"Saving...":"Save"}),d&&b.jsx("span",{className:`text-xs ${d.includes("success")?"text-[#3FB950]":"text-[#F85149]"}`,children:d})]})]})}function __e(){const e=Ft(),[r,n]=k.useState("diagram"),[a,i]=k.useState(null),[o,s]=k.useState(!0),[c,f]=k.useState(null),[d,h]=k.useState([]),[m,g]=k.useState(null),[y,_]=k.useState(null),E=k.useRef(null),w=k.useCallback(async()=>{try{const D=await e.get("state-machine");i(D),f(null)}catch(D){f(D instanceof Error?D.message:String(D))}finally{s(!1)}},[e]),x=k.useCallback(async()=>{try{const D=await e.get("message-templates");h(D)}catch{}},[e]);k.useEffect(()=>{w(),x()},[w,x]);const j=k.useMemo(()=>a?p_e(a.states,a.transitions):null,[a]),C=k.useMemo(()=>a?m_e(a.states,a.transitions):[],[a]),T=k.useMemo(()=>!a||!j?null:y_e(a.states,j.transitions),[a,j]),O=k.useMemo(()=>{if(!a)return{};const D={"*":"#8B949E"};for(const q of a.states)D[q.id]=q.color;return D},[a]),N=k.useMemo(()=>{const D=new Map;for(const q of d)D.set(q.id,q);return D},[d]),M=k.useCallback((D,q)=>{if(!E.current)return;const z=E.current.getBoundingClientRect();_({transitions:q,x:D.clientX-z.left,y:D.clientY-z.top})},[]),R=k.useCallback(()=>_(null),[]),L=k.useCallback(async(D,q,z)=>{await e.put(`message-templates/${D}`,{template:q,enabled:z}),await x()},[e,x]);return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading state machine..."})}):c?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load state machine"}),b.jsx("p",{className:"text-dark-muted text-xs",children:c})]})}):!a||!T?null:b.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[b.jsxs("div",{className:"px-6 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Lifecycle"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Team lifecycle transitions and PM message templates"})]}),b.jsxs("div",{className:"flex items-center gap-1 px-4 py-2 border-b border-[#30363D] shrink-0",children:[b.jsx("button",{onClick:()=>n("diagram"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="diagram"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"State Machine"}),b.jsx("button",{onClick:()=>n("table"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="table"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"Transition Table"}),b.jsx("button",{onClick:()=>n("messages"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="messages"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"PM Messages"})]}),b.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:r==="diagram"?b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsx("div",{className:"flex items-center gap-4 text-xs text-dark-muted px-6 py-3 border-b border-dark-border shrink-0",children:Object.entries(h_e).map(([D,q])=>b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(kS,{trigger:D,size:14,className:"text-[#8B949E]"}),b.jsx("span",{children:q})]},D))}),b.jsxs("div",{ref:E,className:"relative flex-1 min-h-0 p-4 overflow-auto",children:[b.jsxs("svg",{viewBox:`0 0 ${T.width} ${T.height}`,className:"w-full h-auto",style:{minHeight:300},children:[b.jsxs("defs",{children:[b.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#8B949E"})}),b.jsx("marker",{id:"arrowhead-hover",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#C9D1D9"})})]}),T.edges.map(D=>{const q=`${D.from}->${D.to}|${D.trigger}`,z=q===m,H=D.points;if(H.length===0)return null;const F=H.map((U,J)=>`${J===0?"M":"L"} ${U.x} ${U.y}`).join(" "),X=Math.floor(H.length/2),B=H[X];let Q="#30363D",te=1.5,K="url(#arrowhead)";z&&(Q="#C9D1D9",te=2,K="url(#arrowhead-hover)");const de=D.transitions.length;return b.jsxs("g",{className:"cursor-pointer",onClick:U=>M(U,D.transitions),onMouseEnter:()=>g(q),onMouseLeave:()=>g(null),children:[b.jsx("path",{d:F,fill:"none",stroke:"transparent",strokeWidth:"16"}),b.jsx("path",{d:F,fill:"none",stroke:Q,strokeWidth:te,markerEnd:K,strokeLinejoin:"round",strokeLinecap:"round"}),B&&D.transitions.length>0&&d_e(D.transitions[0].trigger,B.x,B.y-12,14,z?"#C9D1D9":"#8B949E",1),de>1&&B&&b.jsxs("g",{children:[b.jsx("rect",{x:B.x+6,y:B.y-22,width:de>=10?30:18,height:16,rx:8,fill:"#30363D"}),b.jsx("text",{x:B.x+6+(de>=10?15:9),y:B.y-22+12,textAnchor:"middle",fontSize:10,fontWeight:600,fill:"#8B949E",children:de})]})]},q)}),T.nodes.map(D=>{const q=D.x-D.width/2,z=D.y-D.height/2;if(D.id==="*")return b.jsxs("g",{children:[b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:15,ry:15,fill:"none",stroke:"#8B949E",strokeWidth:1.5,strokeDasharray:"4 2"}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fill:"#8B949E",fontSize:11,fontWeight:600,className:"select-none",children:"All"})]},"all-node");const H=O[D.id]||"#8B949E",F=`${H}18`;return b.jsxs("g",{children:[b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:"#0D1117"}),b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:F}),b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:"none",stroke:H,strokeWidth:2}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fontSize:14,fontWeight:700,fill:H,className:"select-none",children:D.id})]},D.id)})]}),y&&b.jsx(b_e,{info:y,stateColorMap:O,onClose:R})]}),C.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:C.map((D,q)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},q))})]})]}):r==="table"?b.jsxs("div",{className:"flex flex-col h-full",children:[j&&b.jsxs("div",{className:"px-6 py-4 flex-1 min-h-0 overflow-auto",children:[b.jsxs("h2",{className:"text-sm font-medium text-dark-text mb-3",children:["Transition Table (",j.tableTransitions.length," transitions)"]}),b.jsx("div",{className:"overflow-x-auto",children:b.jsxs("table",{className:"w-full text-xs border-collapse",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"text-left text-dark-muted border-b border-[#30363D]",children:[b.jsx("th",{className:"py-2 pr-4 font-medium",children:"From"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"To"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"Trigger"}),b.jsx("th",{className:"py-2 font-medium",children:"Description"})]})}),b.jsx("tbody",{children:j.tableTransitions.map(D=>b.jsxs("tr",{className:"border-b border-[#30363D]/50 hover:bg-[#161B22]",children:[b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${O[D.from]||"#8B949E"}20`,color:O[D.from]||"#8B949E",border:`1px solid ${O[D.from]||"#8B949E"}40`},children:D.from==="*"?"ALL":D.from})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${O[D.to]||"#8B949E"}20`,color:O[D.to]||"#8B949E",border:`1px solid ${O[D.to]||"#8B949E"}40`},children:D.to})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(kS,{trigger:D.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"text-dark-text",children:D.triggerLabel})]})}),b.jsx("td",{className:"py-1.5 text-dark-muted",children:D.description})]},D.id))})]})})]}),C.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:C.map((D,q)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},q))})]})]}):b.jsxs("div",{className:"px-6 py-4",children:[b.jsxs("div",{className:"mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text",children:"PM → Team Leader Messages"}),b.jsx("p",{className:"text-dark-muted text-sm mt-0.5",children:"Messages automatically sent to your team leads when events occur"})]}),b.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:u_e.map(D=>b.jsx(x_e,{cardDef:D,templateData:N.get(D.id),onSave:L},D.id))})]})})]})}function w_e(){return b.jsx(pV,{children:b.jsxs(EV,{children:[b.jsxs("div",{className:"h-screen w-screen flex flex-col bg-dark-base text-dark-text overflow-hidden",children:[b.jsx(KV,{}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx(XV,{}),b.jsx("main",{className:"flex-1 min-w-0 overflow-auto",children:b.jsxs(HG,{children:[b.jsx(bo,{path:"/",element:b.jsx(Pne,{})}),b.jsx(bo,{path:"/issues",element:b.jsx($ne,{})}),b.jsx(bo,{path:"/usage",element:b.jsx(P0e,{})}),b.jsx(bo,{path:"/projects",element:b.jsx(H0e,{})}),b.jsx(bo,{path:"/lifecycle",element:b.jsx(__e,{})}),b.jsx(bo,{path:"/settings",element:b.jsx(V0e,{})})]})})]}),b.jsx(WV,{})]}),b.jsx(bne,{})]})})}const vF=document.getElementById("root");if(!vF)throw new Error("Root element not found");VH.createRoot(vF).render(b.jsx(vp.StrictMode,{children:b.jsx(w_e,{})}));
|
|
181
|
+
//# sourceMappingURL=index-DLivu-L6.js.map
|