clitrigger 0.1.5 → 0.1.7

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.
Files changed (112) hide show
  1. package/README.md +146 -97
  2. package/README_KR.md +268 -0
  3. package/dist/client/assets/index-BiXO2oR3.js +541 -0
  4. package/dist/client/assets/index-tGOot928.css +1 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/server/data/cli-models-registry.json +34 -0
  7. package/dist/server/db/queries.d.ts +95 -48
  8. package/dist/server/db/queries.d.ts.map +1 -1
  9. package/dist/server/db/queries.js +328 -129
  10. package/dist/server/db/queries.js.map +1 -1
  11. package/dist/server/db/schema.d.ts.map +1 -1
  12. package/dist/server/db/schema.js +67 -35
  13. package/dist/server/db/schema.js.map +1 -1
  14. package/dist/server/index.d.ts.map +1 -1
  15. package/dist/server/index.js +43 -20
  16. package/dist/server/index.js.map +1 -1
  17. package/dist/server/lib/git.d.ts +3 -0
  18. package/dist/server/lib/git.d.ts.map +1 -0
  19. package/dist/server/lib/git.js +7 -0
  20. package/dist/server/lib/git.js.map +1 -0
  21. package/dist/server/routes/{pipelines.d.ts → analytics.d.ts} +1 -1
  22. package/dist/server/routes/analytics.d.ts.map +1 -0
  23. package/dist/server/routes/analytics.js +102 -0
  24. package/dist/server/routes/analytics.js.map +1 -0
  25. package/dist/server/routes/cli-status.d.ts +3 -0
  26. package/dist/server/routes/cli-status.d.ts.map +1 -0
  27. package/dist/server/routes/cli-status.js +28 -0
  28. package/dist/server/routes/cli-status.js.map +1 -0
  29. package/dist/server/routes/discussions.js +5 -5
  30. package/dist/server/routes/discussions.js.map +1 -1
  31. package/dist/server/routes/execution.d.ts.map +1 -1
  32. package/dist/server/routes/execution.js +9 -5
  33. package/dist/server/routes/execution.js.map +1 -1
  34. package/dist/server/routes/images.d.ts +21 -0
  35. package/dist/server/routes/images.d.ts.map +1 -1
  36. package/dist/server/routes/images.js +163 -1
  37. package/dist/server/routes/images.js.map +1 -1
  38. package/dist/server/routes/logs.js +3 -3
  39. package/dist/server/routes/logs.js.map +1 -1
  40. package/dist/server/routes/models.d.ts.map +1 -1
  41. package/dist/server/routes/models.js +2 -0
  42. package/dist/server/routes/models.js.map +1 -1
  43. package/dist/server/routes/planner.d.ts +3 -0
  44. package/dist/server/routes/planner.d.ts.map +1 -0
  45. package/dist/server/routes/planner.js +344 -0
  46. package/dist/server/routes/planner.js.map +1 -0
  47. package/dist/server/routes/projects.d.ts.map +1 -1
  48. package/dist/server/routes/projects.js +159 -1
  49. package/dist/server/routes/projects.js.map +1 -1
  50. package/dist/server/routes/schedules.d.ts.map +1 -1
  51. package/dist/server/routes/schedules.js +39 -0
  52. package/dist/server/routes/schedules.js.map +1 -1
  53. package/dist/server/routes/sessions.d.ts +3 -0
  54. package/dist/server/routes/sessions.d.ts.map +1 -0
  55. package/dist/server/routes/sessions.js +200 -0
  56. package/dist/server/routes/sessions.js.map +1 -0
  57. package/dist/server/routes/todos.d.ts.map +1 -1
  58. package/dist/server/routes/todos.js +16 -4
  59. package/dist/server/routes/todos.js.map +1 -1
  60. package/dist/server/services/claude-manager.d.ts.map +1 -1
  61. package/dist/server/services/claude-manager.js +63 -28
  62. package/dist/server/services/claude-manager.js.map +1 -1
  63. package/dist/server/services/cli-adapters.d.ts +60 -0
  64. package/dist/server/services/cli-adapters.d.ts.map +1 -1
  65. package/dist/server/services/cli-adapters.js +123 -5
  66. package/dist/server/services/cli-adapters.js.map +1 -1
  67. package/dist/server/services/cli-status.d.ts +8 -0
  68. package/dist/server/services/cli-status.d.ts.map +1 -0
  69. package/dist/server/services/cli-status.js +57 -0
  70. package/dist/server/services/cli-status.js.map +1 -0
  71. package/dist/server/services/discussion-orchestrator.d.ts.map +1 -1
  72. package/dist/server/services/discussion-orchestrator.js +33 -6
  73. package/dist/server/services/discussion-orchestrator.js.map +1 -1
  74. package/dist/server/services/log-streamer.d.ts +12 -0
  75. package/dist/server/services/log-streamer.d.ts.map +1 -1
  76. package/dist/server/services/log-streamer.js +116 -31
  77. package/dist/server/services/log-streamer.js.map +1 -1
  78. package/dist/server/services/model-sync.d.ts +22 -0
  79. package/dist/server/services/model-sync.d.ts.map +1 -0
  80. package/dist/server/services/model-sync.js +181 -0
  81. package/dist/server/services/model-sync.js.map +1 -0
  82. package/dist/server/services/orchestrator.d.ts +18 -0
  83. package/dist/server/services/orchestrator.d.ts.map +1 -1
  84. package/dist/server/services/orchestrator.js +81 -11
  85. package/dist/server/services/orchestrator.js.map +1 -1
  86. package/dist/server/services/pty-output-filter.d.ts.map +1 -1
  87. package/dist/server/services/pty-output-filter.js +91 -8
  88. package/dist/server/services/pty-output-filter.js.map +1 -1
  89. package/dist/server/services/session-manager.d.ts +22 -0
  90. package/dist/server/services/session-manager.d.ts.map +1 -0
  91. package/dist/server/services/session-manager.js +249 -0
  92. package/dist/server/services/session-manager.js.map +1 -0
  93. package/dist/server/services/worktree-manager.d.ts +11 -1
  94. package/dist/server/services/worktree-manager.d.ts.map +1 -1
  95. package/dist/server/services/worktree-manager.js +128 -32
  96. package/dist/server/services/worktree-manager.js.map +1 -1
  97. package/dist/server/websocket/events.d.ts +13 -22
  98. package/dist/server/websocket/events.d.ts.map +1 -1
  99. package/dist/server/websocket/index.d.ts.map +1 -1
  100. package/dist/server/websocket/index.js +17 -2
  101. package/dist/server/websocket/index.js.map +1 -1
  102. package/package.json +3 -3
  103. package/README_EN.md +0 -219
  104. package/dist/client/assets/index-B4peRpUi.js +0 -134
  105. package/dist/client/assets/index-Bjyoy6lB.css +0 -1
  106. package/dist/server/routes/pipelines.d.ts.map +0 -1
  107. package/dist/server/routes/pipelines.js +0 -315
  108. package/dist/server/routes/pipelines.js.map +0 -1
  109. package/dist/server/services/pipeline-orchestrator.d.ts +0 -43
  110. package/dist/server/services/pipeline-orchestrator.d.ts.map +0 -1
  111. package/dist/server/services/pipeline-orchestrator.js +0 -503
  112. package/dist/server/services/pipeline-orchestrator.js.map +0 -1
@@ -0,0 +1,541 @@
1
+ var RZ=Object.defineProperty;var IZ=(e,t,n)=>t in e?RZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var v0=(e,t,n)=>IZ(e,typeof t!="symbol"?t+"":t,n);function LZ(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var km=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ea(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y0={exports:{}},hd={};/**
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 kP;function zZ(){if(kP)return hd;kP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:i}}return hd.Fragment=t,hd.jsx=n,hd.jsxs=n,hd}var CP;function $Z(){return CP||(CP=1,y0.exports=zZ()),y0.exports}var f=$Z(),x0={exports:{}},st={};/**
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 NP;function qZ(){if(NP)return st;NP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function j(U,X,H){this.props=U,this.context=X,this.refs=S,this.updater=H||b}j.prototype.isReactComponent={},j.prototype.setState=function(U,X){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,X,"setState")},j.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function k(){}k.prototype=j.prototype;function _(U,X,H){this.props=U,this.context=X,this.refs=S,this.updater=H||b}var E=_.prototype=new k;E.constructor=_,w(E,j.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function A(){}var O={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function P(U,X,H){var W=H.ref;return{$$typeof:e,type:U,key:X,ref:W!==void 0?W:null,props:H}}function M(U,X){return P(U.type,X,U.props)}function z(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function L(U){var X={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(H){return X[H]})}var F=/\/+/g;function R(U,X){return typeof U=="object"&&U!==null&&U.key!=null?L(""+U.key):X.toString(36)}function I(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(A,A):(U.status="pending",U.then(function(X){U.status==="pending"&&(U.status="fulfilled",U.value=X)},function(X){U.status==="pending"&&(U.status="rejected",U.reason=X)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function q(U,X,H,W,Q){var J=typeof U;(J==="undefined"||J==="boolean")&&(U=null);var re=!1;if(U===null)re=!0;else switch(J){case"bigint":case"string":case"number":re=!0;break;case"object":switch(U.$$typeof){case e:case t:re=!0;break;case h:return re=U._init,q(re(U._payload),X,H,W,Q)}}if(re)return Q=Q(U),re=W===""?"."+R(U,0):W,T(Q)?(H="",re!=null&&(H=re.replace(F,"$&/")+"/"),q(Q,X,H,"",function(le){return le})):Q!=null&&(z(Q)&&(Q=M(Q,H+(Q.key==null||U&&U.key===Q.key?"":(""+Q.key).replace(F,"$&/")+"/")+re)),X.push(Q)),1;re=0;var oe=W===""?".":W+":";if(T(U))for(var Z=0;Z<U.length;Z++)W=U[Z],J=oe+R(W,Z),re+=q(W,X,H,J,Q);else if(Z=v(U),typeof Z=="function")for(U=Z.call(U),Z=0;!(W=U.next()).done;)W=W.value,J=oe+R(W,Z++),re+=q(W,X,H,J,Q);else if(J==="object"){if(typeof U.then=="function")return q(I(U),X,H,W,Q);throw X=String(U),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return re}function G(U,X,H){if(U==null)return U;var W=[],Q=0;return q(U,W,"","",function(J){return X.call(H,J,Q++)}),W}function Y(U){if(U._status===-1){var X=U._result;X=X(),X.then(function(H){(U._status===0||U._status===-1)&&(U._status=1,U._result=H)},function(H){(U._status===0||U._status===-1)&&(U._status=2,U._result=H)}),U._status===-1&&(U._status=0,U._result=X)}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 X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},B={map:G,forEach:function(U,X,H){G(U,function(){X.apply(this,arguments)},H)},count:function(U){var X=0;return G(U,function(){X++}),X},toArray:function(U){return G(U,function(X){return X})||[]},only:function(U){if(!z(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return st.Activity=m,st.Children=B,st.Component=j,st.Fragment=n,st.Profiler=a,st.PureComponent=_,st.StrictMode=r,st.Suspense=c,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,st.__COMPILER_RUNTIME={__proto__:null,c:function(U){return O.H.useMemoCache(U)}},st.cache=function(U){return function(){return U.apply(null,arguments)}},st.cacheSignal=function(){return null},st.cloneElement=function(U,X,H){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var W=w({},U.props),Q=U.key;if(X!=null)for(J in X.key!==void 0&&(Q=""+X.key),X)!D.call(X,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&X.ref===void 0||(W[J]=X[J]);var J=arguments.length-2;if(J===1)W.children=H;else if(1<J){for(var re=Array(J),oe=0;oe<J;oe++)re[oe]=arguments[oe+2];W.children=re}return P(U.type,Q,W)},st.createContext=function(U){return U={$$typeof:s,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:i,_context:U},U},st.createElement=function(U,X,H){var W,Q={},J=null;if(X!=null)for(W in X.key!==void 0&&(J=""+X.key),X)D.call(X,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(Q[W]=X[W]);var re=arguments.length-2;if(re===1)Q.children=H;else if(1<re){for(var oe=Array(re),Z=0;Z<re;Z++)oe[Z]=arguments[Z+2];Q.children=oe}if(U&&U.defaultProps)for(W in re=U.defaultProps,re)Q[W]===void 0&&(Q[W]=re[W]);return P(U,J,Q)},st.createRef=function(){return{current:null}},st.forwardRef=function(U){return{$$typeof:l,render:U}},st.isValidElement=z,st.lazy=function(U){return{$$typeof:h,_payload:{_status:-1,_result:U},_init:Y}},st.memo=function(U,X){return{$$typeof:d,type:U,compare:X===void 0?null:X}},st.startTransition=function(U){var X=O.T,H={};O.T=H;try{var W=U(),Q=O.S;Q!==null&&Q(H,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(A,K)}catch(J){K(J)}finally{X!==null&&H.types!==null&&(X.types=H.types),O.T=X}},st.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},st.use=function(U){return O.H.use(U)},st.useActionState=function(U,X,H){return O.H.useActionState(U,X,H)},st.useCallback=function(U,X){return O.H.useCallback(U,X)},st.useContext=function(U){return O.H.useContext(U)},st.useDebugValue=function(){},st.useDeferredValue=function(U,X){return O.H.useDeferredValue(U,X)},st.useEffect=function(U,X){return O.H.useEffect(U,X)},st.useEffectEvent=function(U){return O.H.useEffectEvent(U)},st.useId=function(){return O.H.useId()},st.useImperativeHandle=function(U,X,H){return O.H.useImperativeHandle(U,X,H)},st.useInsertionEffect=function(U,X){return O.H.useInsertionEffect(U,X)},st.useLayoutEffect=function(U,X){return O.H.useLayoutEffect(U,X)},st.useMemo=function(U,X){return O.H.useMemo(U,X)},st.useOptimistic=function(U,X){return O.H.useOptimistic(U,X)},st.useReducer=function(U,X,H){return O.H.useReducer(U,X,H)},st.useRef=function(U){return O.H.useRef(U)},st.useState=function(U){return O.H.useState(U)},st.useSyncExternalStore=function(U,X,H){return O.H.useSyncExternalStore(U,X,H)},st.useTransition=function(){return O.H.useTransition()},st.version="19.2.4",st}var EP;function rc(){return EP||(EP=1,x0.exports=qZ()),x0.exports}var x=rc();const ON=ea(x),BZ=LZ({__proto__:null,default:ON},[x]);var b0={exports:{}},md={},w0={exports:{}},S0={};/**
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 AP;function FZ(){return AP||(AP=1,(function(e){function t(q,G){var Y=q.length;q.push(G);e:for(;0<Y;){var K=Y-1>>>1,B=q[K];if(0<a(B,G))q[K]=G,q[Y]=B,Y=K;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var G=q[0],Y=q.pop();if(Y!==G){q[0]=Y;e:for(var K=0,B=q.length,U=B>>>1;K<U;){var X=2*(K+1)-1,H=q[X],W=X+1,Q=q[W];if(0>a(H,Y))W<B&&0>a(Q,H)?(q[K]=Q,q[W]=Y,K=W):(q[K]=H,q[X]=Y,K=X);else if(W<B&&0>a(Q,Y))q[K]=Q,q[W]=Y,K=W;else break e}}return G}function a(q,G){var Y=q.sortIndex-G.sortIndex;return Y!==0?Y:q.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],d=[],h=1,m=null,g=3,v=!1,b=!1,w=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function E(q){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=q)r(d),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(d)}}function T(q){if(w=!1,E(q),!b)if(n(c)!==null)b=!0,A||(A=!0,L());else{var G=n(d);G!==null&&I(T,G.startTime-q)}}var A=!1,O=-1,D=5,P=-1;function M(){return S?!0:!(e.unstable_now()-P<D)}function z(){if(S=!1,A){var q=e.unstable_now();P=q;var G=!0;try{e:{b=!1,w&&(w=!1,k(O),O=-1),v=!0;var Y=g;try{t:{for(E(q),m=n(c);m!==null&&!(m.expirationTime>q&&M());){var K=m.callback;if(typeof K=="function"){m.callback=null,g=m.priorityLevel;var B=K(m.expirationTime<=q);if(q=e.unstable_now(),typeof B=="function"){m.callback=B,E(q),G=!0;break t}m===n(c)&&r(c),E(q)}else r(c);m=n(c)}if(m!==null)G=!0;else{var U=n(d);U!==null&&I(T,U.startTime-q),G=!1}}break e}finally{m=null,g=Y,v=!1}G=void 0}}finally{G?L():A=!1}}}var L;if(typeof _=="function")L=function(){_(z)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,R=F.port2;F.port1.onmessage=z,L=function(){R.postMessage(null)}}else L=function(){j(z,0)};function I(q,G){O=j(function(){q(e.unstable_now())},G)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var Y=g;g=G;try{return q()}finally{g=Y}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(q,G){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var Y=g;g=q;try{return G()}finally{g=Y}},e.unstable_scheduleCallback=function(q,G,Y){var K=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?K+Y:K):Y=K,q){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=Y+B,q={id:h++,callback:G,priorityLevel:q,startTime:Y,expirationTime:B,sortIndex:-1},Y>K?(q.sortIndex=Y,t(d,q),n(c)===null&&q===n(d)&&(w?(k(O),O=-1):w=!0,I(T,Y-K))):(q.sortIndex=B,t(c,q),b||v||(b=!0,A||(A=!0,L()))),q},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(q){var G=g;return function(){var Y=g;g=G;try{return q.apply(this,arguments)}finally{g=Y}}}})(S0)),S0}var TP;function HZ(){return TP||(TP=1,w0.exports=FZ()),w0.exports}var j0={exports:{}},or={};/**
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 OP;function UZ(){if(OP)return or;OP=1;var e=rc();function t(c){var d="https://react.dev/errors/"+c;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 #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(c,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:c,containerInfo:d,implementation:h}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return or.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,or.createPortal=function(c,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(t(299));return i(c,d,null,h)},or.flushSync=function(c){var d=s.T,h=r.p;try{if(s.T=null,r.p=2,c)return c()}finally{s.T=d,r.p=h,r.d.f()}},or.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(c,d))},or.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},or.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,v=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},or.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=l(d.as,d.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(c)},or.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=l(h,d.crossOrigin);r.d.L(c,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})}},or.preloadModule=function(c,d){if(typeof c=="string")if(d){var h=l(d.as,d.crossOrigin);r.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(c)},or.requestFormReset=function(c){r.d.r(c)},or.unstable_batchedUpdates=function(c,d){return c(d)},or.useFormState=function(c,d,h){return s.H.useFormState(c,d,h)},or.useFormStatus=function(){return s.H.useHostTransitionStatus()},or.version="19.2.4",or}var MP;function SF(){if(MP)return j0.exports;MP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),j0.exports=UZ(),j0.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 PP;function GZ(){if(PP)return md;PP=1;var e=HZ(),t=rc(),n=SF();function r(o){var u="https://react.dev/errors/"+o;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 #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var u=o,p=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(p=u.return),o=u.return;while(o)}return u.tag===3?p:null}function s(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function l(o){if(o.tag===31){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function c(o){if(i(o)!==o)throw Error(r(188))}function d(o){var u=o.alternate;if(!u){if(u=i(o),u===null)throw Error(r(188));return u!==o?null:o}for(var p=o,y=u;;){var C=p.return;if(C===null)break;var N=C.alternate;if(N===null){if(y=C.return,y!==null){p=y;continue}break}if(C.child===N.child){for(N=C.child;N;){if(N===p)return c(C),o;if(N===y)return c(C),u;N=N.sibling}throw Error(r(188))}if(p.return!==y.return)p=C,y=N;else{for(var $=!1,V=C.child;V;){if(V===p){$=!0,p=C,y=N;break}if(V===y){$=!0,y=C,p=N;break}V=V.sibling}if(!$){for(V=N.child;V;){if(V===p){$=!0,p=N,y=C;break}if(V===y){$=!0,y=N,p=C;break}V=V.sibling}if(!$)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?o:u}function h(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o;for(o=o.child;o!==null;){if(u=h(o),u!==null)return u;o=o.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function L(o){return o===null||typeof o!="object"?null:(o=z&&o[z]||o["@@iterator"],typeof o=="function"?o:null)}var F=Symbol.for("react.client.reference");function R(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===F?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case j:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case A:return"SuspenseList";case P:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case _:return o.displayName||"Context";case k:return(o._context.displayName||"Context")+".Consumer";case E:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case O:return u=o.displayName||null,u!==null?u:R(o.type)||"Memo";case D:u=o._payload,o=o._init;try{return R(o(u))}catch{}}return null}var I=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},K=[],B=-1;function U(o){return{current:o}}function X(o){0>B||(o.current=K[B],K[B]=null,B--)}function H(o,u){B++,K[B]=o.current,o.current=u}var W=U(null),Q=U(null),J=U(null),re=U(null);function oe(o,u){switch(H(J,u),H(Q,o),H(W,null),u.nodeType){case 9:case 11:o=(o=u.documentElement)&&(o=o.namespaceURI)?YM(o):0;break;default:if(o=u.tagName,u=u.namespaceURI)u=YM(u),o=WM(u,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}X(W),H(W,o)}function Z(){X(W),X(Q),X(J)}function le(o){o.memoizedState!==null&&H(re,o);var u=W.current,p=WM(u,o.type);u!==p&&(H(Q,o),H(W,p))}function ie(o){Q.current===o&&(X(W),X(Q)),re.current===o&&(X(re),ud._currentValue=Y)}var ee,ae;function xe(o){if(ee===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ee=u&&u[1]||"",ae=-1<p.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ee+o+ae}var ye=!1;function Te(o,u){if(!o||ye)return"";ye=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(je){var ve=je}Reflect.construct(o,[],Ee)}else{try{Ee.call()}catch(je){ve=je}o.call(Ee.prototype)}}else{try{throw Error()}catch(je){ve=je}(Ee=o())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(je){if(je&&ve&&typeof je.stack=="string")return[je.stack,ve.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=y.DetermineComponentFrameRoot(),$=N[0],V=N[1];if($&&V){var te=$.split(`
44
+ `),pe=V.split(`
45
+ `);for(C=y=0;y<te.length&&!te[y].includes("DetermineComponentFrameRoot");)y++;for(;C<pe.length&&!pe[C].includes("DetermineComponentFrameRoot");)C++;if(y===te.length||C===pe.length)for(y=te.length-1,C=pe.length-1;1<=y&&0<=C&&te[y]!==pe[C];)C--;for(;1<=y&&0<=C;y--,C--)if(te[y]!==pe[C]){if(y!==1||C!==1)do if(y--,C--,0>C||te[y]!==pe[C]){var ke=`
46
+ `+te[y].replace(" at new "," at ");return o.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",o.displayName)),ke}while(1<=y&&0<=C);break}}}finally{ye=!1,Error.prepareStackTrace=p}return(p=o?o.displayName||o.name:"")?xe(p):""}function Me(o,u){switch(o.tag){case 26:case 27:case 5:return xe(o.type);case 16:return xe("Lazy");case 13:return o.child!==u&&u!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Te(o.type,!1);case 11:return Te(o.type.render,!1);case 1:return Te(o.type,!0);case 31:return xe("Activity");default:return""}}function he(o){try{var u="",p=null;do u+=Me(o,p),p=o,o=o.return;while(o);return u}catch(y){return`
47
+ Error generating stack: `+y.message+`
48
+ `+y.stack}}var Ie=Object.prototype.hasOwnProperty,Je=e.unstable_scheduleCallback,We=e.unstable_cancelCallback,it=e.unstable_shouldYield,Ce=e.unstable_requestPaint,He=e.unstable_now,ge=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,fe=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,ze=e.unstable_IdlePriority,ut=e.log,gt=e.unstable_setDisableYieldValue,_t=null,ct=null;function Ae(o){if(typeof ut=="function"&&gt(o),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(_t,o)}catch{}}var $e=Math.clz32?Math.clz32:at,Xe=Math.log,pt=Math.LN2;function at(o){return o>>>=0,o===0?32:31-(Xe(o)/pt|0)|0}var Et=256,Ze=262144,Ot=4194304;function zt(o){var u=o&42;if(u!==0)return u;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function hn(o,u,p){var y=o.pendingLanes;if(y===0)return 0;var C=0,N=o.suspendedLanes,$=o.pingedLanes;o=o.warmLanes;var V=y&134217727;return V!==0?(y=V&~N,y!==0?C=zt(y):($&=V,$!==0?C=zt($):p||(p=V&~o,p!==0&&(C=zt(p))))):(V=y&~N,V!==0?C=zt(V):$!==0?C=zt($):p||(p=y&~o,p!==0&&(C=zt(p)))),C===0?0:u!==0&&u!==C&&(u&N)===0&&(N=C&-C,p=u&-u,N>=p||N===32&&(p&4194048)!==0)?u:C}function ne(o,u){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&u)===0}function be(o,u){switch(o){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 Se(){var o=Ot;return Ot<<=1,(Ot&62914560)===0&&(Ot=4194304),o}function Pe(o){for(var u=[],p=0;31>p;p++)u.push(o);return u}function Le(o,u){o.pendingLanes|=u,u!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function ot(o,u,p,y,C,N){var $=o.pendingLanes;o.pendingLanes=p,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=p,o.entangledLanes&=p,o.errorRecoveryDisabledLanes&=p,o.shellSuspendCounter=0;var V=o.entanglements,te=o.expirationTimes,pe=o.hiddenUpdates;for(p=$&~p;0<p;){var ke=31-$e(p),Ee=1<<ke;V[ke]=0,te[ke]=-1;var ve=pe[ke];if(ve!==null)for(pe[ke]=null,ke=0;ke<ve.length;ke++){var je=ve[ke];je!==null&&(je.lane&=-536870913)}p&=~Ee}y!==0&&Vt(o,y,0),N!==0&&C===0&&o.tag!==0&&(o.suspendedLanes|=N&~($&~u))}function Vt(o,u,p){o.pendingLanes|=u,o.suspendedLanes&=~u;var y=31-$e(u);o.entangledLanes|=u,o.entanglements[y]=o.entanglements[y]|1073741824|p&261930}function ir(o,u){var p=o.entangledLanes|=u;for(o=o.entanglements;p;){var y=31-$e(p),C=1<<y;C&u|o[y]&u&&(o[y]|=u),p&=~C}}function Re(o,u){var p=u&-u;return p=(p&42)!==0?1:Cn(p),(p&(o.suspendedLanes|u))!==0?0:p}function Cn(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Dr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Ml(){var o=G.p;return o!==0?o:(o=window.event,o===void 0?32:yP(o.type))}function Pl(o,u){var p=G.p;try{return G.p=o,u()}finally{G.p=p}}var Rr=Math.random().toString(36).slice(2),jn="__reactFiber$"+Rr,Gn="__reactProps$"+Rr,Sa="__reactContainer$"+Rr,ys="__reactEvents$"+Rr,wi="__reactListeners$"+Rr,jc="__reactHandles$"+Rr,mo="__reactResources$"+Rr,Si="__reactMarker$"+Rr;function po(o){delete o[jn],delete o[Gn],delete o[ys],delete o[wi],delete o[jc]}function Ua(o){var u=o[jn];if(u)return u;for(var p=o.parentNode;p;){if(u=p[Sa]||p[jn]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(o=nP(o);o!==null;){if(p=o[jn])return p;o=nP(o)}return u}o=p,p=o.parentNode}return null}function Ga(o){if(o=o[jn]||o[Sa]){var u=o.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return o}return null}function Va(o){var u=o.tag;if(u===5||u===26||u===27||u===6)return o.stateNode;throw Error(r(33))}function Ka(o){var u=o[mo];return u||(u=o[mo]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function gn(o){o[Si]=!0}var go=new Set,ja={};function Vn(o,u){wr(o,u),wr(o+"Capture",u)}function wr(o,u){for(ja[o]=u,o=0;o<u.length;o++)go.add(u[o])}var _c=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]*$"),vo={},Dl={};function kc(o){return Ie.call(Dl,o)?!0:Ie.call(vo,o)?!1:_c.test(o)?Dl[o]=!0:(vo[o]=!0,!1)}function xs(o,u,p){if(kc(u))if(p===null)o.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":o.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){o.removeAttribute(u);return}}o.setAttribute(u,""+p)}}function bs(o,u,p){if(p===null)o.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(u);return}o.setAttribute(u,""+p)}}function Ir(o,u,p,y){if(y===null)o.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(p);return}o.setAttributeNS(u,p,""+y)}}function sr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function yo(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Rl(o,u,p){var y=Object.getOwnPropertyDescriptor(o.constructor.prototype,u);if(!o.hasOwnProperty(u)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var C=y.get,N=y.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return C.call(this)},set:function($){p=""+$,N.call(this,$)}}),Object.defineProperty(o,u,{enumerable:y.enumerable}),{getValue:function(){return p},setValue:function($){p=""+$},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function we(o){if(!o._valueTracker){var u=yo(o)?"checked":"value";o._valueTracker=Rl(o,u,""+o[u])}}function dt(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var p=u.getValue(),y="";return o&&(y=yo(o)?o.checked?"true":"false":o.value),o=y,o!==p?(u.setValue(o),!0):!1}function wt(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var vn=/[\n"\\]/g;function vt(o){return o.replace(vn,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function _a(o,u,p,y,C,N,$,V){o.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?o.type=$:o.removeAttribute("type"),u!=null?$==="number"?(u===0&&o.value===""||o.value!=u)&&(o.value=""+sr(u)):o.value!==""+sr(u)&&(o.value=""+sr(u)):$!=="submit"&&$!=="reset"||o.removeAttribute("value"),u!=null?xo(o,$,sr(u)):p!=null?xo(o,$,sr(p)):y!=null&&o.removeAttribute("value"),C==null&&N!=null&&(o.defaultChecked=!!N),C!=null&&(o.checked=C&&typeof C!="function"&&typeof C!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?o.name=""+sr(V):o.removeAttribute("name")}function Il(o,u,p,y,C,N,$,V){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(o.type=N),u!=null||p!=null){if(!(N!=="submit"&&N!=="reset"||u!=null)){we(o);return}p=p!=null?""+sr(p):"",u=u!=null?""+sr(u):p,V||u===o.value||(o.value=u),o.defaultValue=u}y=y??C,y=typeof y!="function"&&typeof y!="symbol"&&!!y,o.checked=V?o.checked:!!y,o.defaultChecked=!!y,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(o.name=$),we(o)}function xo(o,u,p){u==="number"&&wt(o.ownerDocument)===o||o.defaultValue===""+p||(o.defaultValue=""+p)}function ta(o,u,p,y){if(o=o.options,u){u={};for(var C=0;C<p.length;C++)u["$"+p[C]]=!0;for(p=0;p<o.length;p++)C=u.hasOwnProperty("$"+o[p].value),o[p].selected!==C&&(o[p].selected=C),C&&y&&(o[p].defaultSelected=!0)}else{for(p=""+sr(p),u=null,C=0;C<o.length;C++){if(o[C].value===p){o[C].selected=!0,y&&(o[C].defaultSelected=!0);return}u!==null||o[C].disabled||(u=o[C])}u!==null&&(u.selected=!0)}}function HA(o,u,p){if(u!=null&&(u=""+sr(u),u!==o.value&&(o.value=u),p==null)){o.defaultValue!==u&&(o.defaultValue=u);return}o.defaultValue=p!=null?""+sr(p):""}function UA(o,u,p,y){if(u==null){if(y!=null){if(p!=null)throw Error(r(92));if(I(y)){if(1<y.length)throw Error(r(93));y=y[0]}p=y}p==null&&(p=""),u=p}p=sr(u),o.defaultValue=p,y=o.textContent,y===p&&y!==""&&y!==null&&(o.value=y),we(o)}function Ll(o,u){if(u){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=u;return}}o.textContent=u}var TW=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 GA(o,u,p){var y=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?o.setProperty(u,""):u==="float"?o.cssFloat="":o[u]="":y?o.setProperty(u,p):typeof p!="number"||p===0||TW.has(u)?u==="float"?o.cssFloat=p:o[u]=(""+p).trim():o[u]=p+"px"}function VA(o,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(o=o.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?o.setProperty(y,""):y==="float"?o.cssFloat="":o[y]="");for(var C in u)y=u[C],u.hasOwnProperty(C)&&p[C]!==y&&GA(o,C,y)}else for(var N in u)u.hasOwnProperty(N)&&GA(o,N,u[N])}function hy(o){if(o.indexOf("-")===-1)return!1;switch(o){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 OW=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"]]),MW=/^[\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 gh(o){return MW.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ji(){}var my=null;function py(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var zl=null,$l=null;function KA(o){var u=Ga(o);if(u&&(o=u.stateNode)){var p=o[Gn]||null;e:switch(o=u.stateNode,u.type){case"input":if(_a(o,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=o;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+vt(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var y=p[u];if(y!==o&&y.form===o.form){var C=y[Gn]||null;if(!C)throw Error(r(90));_a(y,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(u=0;u<p.length;u++)y=p[u],y.form===o.form&&dt(y)}break e;case"textarea":HA(o,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&ta(o,!!p.multiple,u,!1)}}}var gy=!1;function YA(o,u,p){if(gy)return o(u,p);gy=!0;try{var y=o(u);return y}finally{if(gy=!1,(zl!==null||$l!==null)&&(rm(),zl&&(u=zl,o=$l,$l=zl=null,KA(u),o)))for(u=0;u<o.length;u++)KA(o[u])}}function Cc(o,u){var p=o.stateNode;if(p===null)return null;var y=p[Gn]||null;if(y===null)return null;p=y[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":(y=!y.disabled)||(o=o.type,y=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!y;break e;default:o=!1}if(o)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var _i=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vy=!1;if(_i)try{var Nc={};Object.defineProperty(Nc,"passive",{get:function(){vy=!0}}),window.addEventListener("test",Nc,Nc),window.removeEventListener("test",Nc,Nc)}catch{vy=!1}var ws=null,yy=null,vh=null;function WA(){if(vh)return vh;var o,u=yy,p=u.length,y,C="value"in ws?ws.value:ws.textContent,N=C.length;for(o=0;o<p&&u[o]===C[o];o++);var $=p-o;for(y=1;y<=$&&u[p-y]===C[N-y];y++);return vh=C.slice(o,1<y?1-y:void 0)}function yh(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function xh(){return!0}function XA(){return!1}function Sr(o){function u(p,y,C,N,$){this._reactName=p,this._targetInst=C,this.type=y,this.nativeEvent=N,this.target=$,this.currentTarget=null;for(var V in o)o.hasOwnProperty(V)&&(p=o[V],this[V]=p?p(N):N[V]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?xh: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=xh)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=xh)},persist:function(){},isPersistent:xh}),u}var bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bh=Sr(bo),Ec=m({},bo,{view:0,detail:0}),PW=Sr(Ec),xy,by,Ac,wh=m({},Ec,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sy,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Ac&&(Ac&&o.type==="mousemove"?(xy=o.screenX-Ac.screenX,by=o.screenY-Ac.screenY):by=xy=0,Ac=o),xy)},movementY:function(o){return"movementY"in o?o.movementY:by}}),ZA=Sr(wh),DW=m({},wh,{dataTransfer:0}),RW=Sr(DW),IW=m({},Ec,{relatedTarget:0}),wy=Sr(IW),LW=m({},bo,{animationName:0,elapsedTime:0,pseudoElement:0}),zW=Sr(LW),$W=m({},bo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),qW=Sr($W),BW=m({},bo,{data:0}),QA=Sr(BW),FW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HW={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"},UW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GW(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=UW[o])?!!u[o]:!1}function Sy(){return GW}var VW=m({},Ec,{key:function(o){if(o.key){var u=FW[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=yh(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?HW[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sy,charCode:function(o){return o.type==="keypress"?yh(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?yh(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),KW=Sr(VW),YW=m({},wh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JA=Sr(YW),WW=m({},Ec,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sy}),XW=Sr(WW),ZW=m({},bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),QW=Sr(ZW),JW=m({},wh,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),eX=Sr(JW),tX=m({},bo,{newState:0,oldState:0}),nX=Sr(tX),rX=[9,13,27,32],jy=_i&&"CompositionEvent"in window,Tc=null;_i&&"documentMode"in document&&(Tc=document.documentMode);var aX=_i&&"TextEvent"in window&&!Tc,eT=_i&&(!jy||Tc&&8<Tc&&11>=Tc),tT=" ",nT=!1;function rT(o,u){switch(o){case"keyup":return rX.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aT(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var ql=!1;function iX(o,u){switch(o){case"compositionend":return aT(u);case"keypress":return u.which!==32?null:(nT=!0,tT);case"textInput":return o=u.data,o===tT&&nT?null:o;default:return null}}function sX(o,u){if(ql)return o==="compositionend"||!jy&&rT(o,u)?(o=WA(),vh=yy=ws=null,ql=!1,o):null;switch(o){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 eT&&u.locale!=="ko"?null:u.data;default:return null}}var oX={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 iT(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!oX[o.type]:u==="textarea"}function sT(o,u,p,y){zl?$l?$l.push(y):$l=[y]:zl=y,u=cm(u,"onChange"),0<u.length&&(p=new bh("onChange","change",null,p,y),o.push({event:p,listeners:u}))}var Oc=null,Mc=null;function lX(o){FM(o,0)}function Sh(o){var u=Va(o);if(dt(u))return o}function oT(o,u){if(o==="change")return u}var lT=!1;if(_i){var _y;if(_i){var ky="oninput"in document;if(!ky){var uT=document.createElement("div");uT.setAttribute("oninput","return;"),ky=typeof uT.oninput=="function"}_y=ky}else _y=!1;lT=_y&&(!document.documentMode||9<document.documentMode)}function cT(){Oc&&(Oc.detachEvent("onpropertychange",dT),Mc=Oc=null)}function dT(o){if(o.propertyName==="value"&&Sh(Mc)){var u=[];sT(u,Mc,o,py(o)),YA(lX,u)}}function uX(o,u,p){o==="focusin"?(cT(),Oc=u,Mc=p,Oc.attachEvent("onpropertychange",dT)):o==="focusout"&&cT()}function cX(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Sh(Mc)}function dX(o,u){if(o==="click")return Sh(u)}function fX(o,u){if(o==="input"||o==="change")return Sh(u)}function hX(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var Lr=typeof Object.is=="function"?Object.is:hX;function Pc(o,u){if(Lr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var p=Object.keys(o),y=Object.keys(u);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var C=p[y];if(!Ie.call(u,C)||!Lr(o[C],u[C]))return!1}return!0}function fT(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function hT(o,u){var p=fT(o);o=0;for(var y;p;){if(p.nodeType===3){if(y=o+p.textContent.length,o<=u&&y>=u)return{node:p,offset:u-o};o=y}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=fT(p)}}function mT(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?mT(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function pT(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var u=wt(o.document);u instanceof o.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)o=u.contentWindow;else break;u=wt(o.document)}return u}function Cy(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}var mX=_i&&"documentMode"in document&&11>=document.documentMode,Bl=null,Ny=null,Dc=null,Ey=!1;function gT(o,u,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Ey||Bl==null||Bl!==wt(y)||(y=Bl,"selectionStart"in y&&Cy(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Dc&&Pc(Dc,y)||(Dc=y,y=cm(Ny,"onSelect"),0<y.length&&(u=new bh("onSelect","select",null,u,p),o.push({event:u,listeners:y}),u.target=Bl)))}function wo(o,u){var p={};return p[o.toLowerCase()]=u.toLowerCase(),p["Webkit"+o]="webkit"+u,p["Moz"+o]="moz"+u,p}var Fl={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionrun:wo("Transition","TransitionRun"),transitionstart:wo("Transition","TransitionStart"),transitioncancel:wo("Transition","TransitionCancel"),transitionend:wo("Transition","TransitionEnd")},Ay={},vT={};_i&&(vT=document.createElement("div").style,"AnimationEvent"in window||(delete Fl.animationend.animation,delete Fl.animationiteration.animation,delete Fl.animationstart.animation),"TransitionEvent"in window||delete Fl.transitionend.transition);function So(o){if(Ay[o])return Ay[o];if(!Fl[o])return o;var u=Fl[o],p;for(p in u)if(u.hasOwnProperty(p)&&p in vT)return Ay[o]=u[p];return o}var yT=So("animationend"),xT=So("animationiteration"),bT=So("animationstart"),pX=So("transitionrun"),gX=So("transitionstart"),vX=So("transitioncancel"),wT=So("transitionend"),ST=new Map,Ty="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(" ");Ty.push("scrollEnd");function ka(o,u){ST.set(o,u),Vn(u,[o])}var jh=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},na=[],Hl=0,Oy=0;function _h(){for(var o=Hl,u=Oy=Hl=0;u<o;){var p=na[u];na[u++]=null;var y=na[u];na[u++]=null;var C=na[u];na[u++]=null;var N=na[u];if(na[u++]=null,y!==null&&C!==null){var $=y.pending;$===null?C.next=C:(C.next=$.next,$.next=C),y.pending=C}N!==0&&jT(p,C,N)}}function kh(o,u,p,y){na[Hl++]=o,na[Hl++]=u,na[Hl++]=p,na[Hl++]=y,Oy|=y,o.lanes|=y,o=o.alternate,o!==null&&(o.lanes|=y)}function My(o,u,p,y){return kh(o,u,p,y),Ch(o)}function jo(o,u){return kh(o,null,null,u),Ch(o)}function jT(o,u,p){o.lanes|=p;var y=o.alternate;y!==null&&(y.lanes|=p);for(var C=!1,N=o.return;N!==null;)N.childLanes|=p,y=N.alternate,y!==null&&(y.childLanes|=p),N.tag===22&&(o=N.stateNode,o===null||o._visibility&1||(C=!0)),o=N,N=N.return;return o.tag===3?(N=o.stateNode,C&&u!==null&&(C=31-$e(p),o=N.hiddenUpdates,y=o[C],y===null?o[C]=[u]:y.push(u),u.lane=p|536870912),N):null}function Ch(o){if(50<nd)throw nd=0,Bx=null,Error(r(185));for(var u=o.return;u!==null;)o=u,u=o.return;return o.tag===3?o.stateNode:null}var Ul={};function yX(o,u,p,y){this.tag=o,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=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(o,u,p,y){return new yX(o,u,p,y)}function Py(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ki(o,u){var p=o.alternate;return p===null?(p=zr(o.tag,u,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=u,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&65011712,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,u=o.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p.refCleanup=o.refCleanup,p}function _T(o,u){o.flags&=65011714;var p=o.alternate;return p===null?(o.childLanes=0,o.lanes=u,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=p.childLanes,o.lanes=p.lanes,o.child=p.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=p.memoizedProps,o.memoizedState=p.memoizedState,o.updateQueue=p.updateQueue,o.type=p.type,u=p.dependencies,o.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),o}function Nh(o,u,p,y,C,N){var $=0;if(y=o,typeof o=="function")Py(o)&&($=1);else if(typeof o=="string")$=jZ(o,p,W.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case P:return o=zr(31,p,u,C),o.elementType=P,o.lanes=N,o;case w:return _o(p.children,C,N,u);case S:$=8,C|=24;break;case j:return o=zr(12,p,u,C|2),o.elementType=j,o.lanes=N,o;case T:return o=zr(13,p,u,C),o.elementType=T,o.lanes=N,o;case A:return o=zr(19,p,u,C),o.elementType=A,o.lanes=N,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case _:$=10;break e;case k:$=9;break e;case E:$=11;break e;case O:$=14;break e;case D:$=16,y=null;break e}$=29,p=Error(r(130,o===null?"null":typeof o,"")),y=null}return u=zr($,p,u,C),u.elementType=o,u.type=y,u.lanes=N,u}function _o(o,u,p,y){return o=zr(7,o,y,u),o.lanes=p,o}function Dy(o,u,p){return o=zr(6,o,null,u),o.lanes=p,o}function kT(o){var u=zr(18,null,null,0);return u.stateNode=o,u}function Ry(o,u,p){return u=zr(4,o.children!==null?o.children:[],o.key,u),u.lanes=p,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}var CT=new WeakMap;function ra(o,u){if(typeof o=="object"&&o!==null){var p=CT.get(o);return p!==void 0?p:(u={value:o,source:u,stack:he(u)},CT.set(o,u),u)}return{value:o,source:u,stack:he(u)}}var Gl=[],Vl=0,Eh=null,Rc=0,aa=[],ia=0,Ss=null,Ya=1,Wa="";function Ci(o,u){Gl[Vl++]=Rc,Gl[Vl++]=Eh,Eh=o,Rc=u}function NT(o,u,p){aa[ia++]=Ya,aa[ia++]=Wa,aa[ia++]=Ss,Ss=o;var y=Ya;o=Wa;var C=32-$e(y)-1;y&=~(1<<C),p+=1;var N=32-$e(u)+C;if(30<N){var $=C-C%5;N=(y&(1<<$)-1).toString(32),y>>=$,C-=$,Ya=1<<32-$e(u)+C|p<<C|y,Wa=N+o}else Ya=1<<N|p<<C|y,Wa=o}function Iy(o){o.return!==null&&(Ci(o,1),NT(o,1,0))}function Ly(o){for(;o===Eh;)Eh=Gl[--Vl],Gl[Vl]=null,Rc=Gl[--Vl],Gl[Vl]=null;for(;o===Ss;)Ss=aa[--ia],aa[ia]=null,Wa=aa[--ia],aa[ia]=null,Ya=aa[--ia],aa[ia]=null}function ET(o,u){aa[ia++]=Ya,aa[ia++]=Wa,aa[ia++]=Ss,Ya=u.id,Wa=u.overflow,Ss=o}var Jn=null,en=null,kt=!1,js=null,sa=!1,zy=Error(r(519));function _s(o){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ic(ra(u,o)),zy}function AT(o){var u=o.stateNode,p=o.type,y=o.memoizedProps;switch(u[jn]=o,u[Gn]=y,p){case"dialog":xt("cancel",u),xt("close",u);break;case"iframe":case"object":case"embed":xt("load",u);break;case"video":case"audio":for(p=0;p<ad.length;p++)xt(ad[p],u);break;case"source":xt("error",u);break;case"img":case"image":case"link":xt("error",u),xt("load",u);break;case"details":xt("toggle",u);break;case"input":xt("invalid",u),Il(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":xt("invalid",u);break;case"textarea":xt("invalid",u),UA(u,y.value,y.defaultValue,y.children)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||y.suppressHydrationWarning===!0||VM(u.textContent,p)?(y.popover!=null&&(xt("beforetoggle",u),xt("toggle",u)),y.onScroll!=null&&xt("scroll",u),y.onScrollEnd!=null&&xt("scrollend",u),y.onClick!=null&&(u.onclick=ji),u=!0):u=!1,u||_s(o,!0)}function TT(o){for(Jn=o.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:Jn=Jn.return}}function Kl(o){if(o!==Jn)return!1;if(!kt)return TT(o),kt=!0,!1;var u=o.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=o.type,p=!(p!=="form"&&p!=="button")||n0(o.type,o.memoizedProps)),p=!p),p&&en&&_s(o),TT(o),u===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));en=tP(o)}else if(u===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));en=tP(o)}else u===27?(u=en,zs(o.type)?(o=o0,o0=null,en=o):en=u):en=Jn?la(o.stateNode.nextSibling):null;return!0}function ko(){en=Jn=null,kt=!1}function $y(){var o=js;return o!==null&&(Cr===null?Cr=o:Cr.push.apply(Cr,o),js=null),o}function Ic(o){js===null?js=[o]:js.push(o)}var qy=U(null),Co=null,Ni=null;function ks(o,u,p){H(qy,u._currentValue),u._currentValue=p}function Ei(o){o._currentValue=qy.current,X(qy)}function By(o,u,p){for(;o!==null;){var y=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),o===p)break;o=o.return}}function Fy(o,u,p,y){var C=o.child;for(C!==null&&(C.return=o);C!==null;){var N=C.dependencies;if(N!==null){var $=C.child;N=N.firstContext;e:for(;N!==null;){var V=N;N=C;for(var te=0;te<u.length;te++)if(V.context===u[te]){N.lanes|=p,V=N.alternate,V!==null&&(V.lanes|=p),By(N.return,p,o),y||($=null);break e}N=V.next}}else if(C.tag===18){if($=C.return,$===null)throw Error(r(341));$.lanes|=p,N=$.alternate,N!==null&&(N.lanes|=p),By($,p,o),$=null}else $=C.child;if($!==null)$.return=C;else for($=C;$!==null;){if($===o){$=null;break}if(C=$.sibling,C!==null){C.return=$.return,$=C;break}$=$.return}C=$}}function Yl(o,u,p,y){o=null;for(var C=u,N=!1;C!==null;){if(!N){if((C.flags&524288)!==0)N=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var $=C.alternate;if($===null)throw Error(r(387));if($=$.memoizedProps,$!==null){var V=C.type;Lr(C.pendingProps.value,$.value)||(o!==null?o.push(V):o=[V])}}else if(C===re.current){if($=C.alternate,$===null)throw Error(r(387));$.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(o!==null?o.push(ud):o=[ud])}C=C.return}o!==null&&Fy(u,o,p,y),u.flags|=262144}function Ah(o){for(o=o.firstContext;o!==null;){if(!Lr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function No(o){Co=o,Ni=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function er(o){return OT(Co,o)}function Th(o,u){return Co===null&&No(o),OT(o,u)}function OT(o,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},Ni===null){if(o===null)throw Error(r(308));Ni=u,o.dependencies={lanes:0,firstContext:u},o.flags|=524288}else Ni=Ni.next=u;return p}var xX=typeof AbortController<"u"?AbortController:function(){var o=[],u=this.signal={aborted:!1,addEventListener:function(p,y){o.push(y)}};this.abort=function(){u.aborted=!0,o.forEach(function(p){return p()})}},bX=e.unstable_scheduleCallback,wX=e.unstable_NormalPriority,Nn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hy(){return{controller:new xX,data:new Map,refCount:0}}function Lc(o){o.refCount--,o.refCount===0&&bX(wX,function(){o.controller.abort()})}var zc=null,Uy=0,Wl=0,Xl=null;function SX(o,u){if(zc===null){var p=zc=[];Uy=0,Wl=Kx(),Xl={status:"pending",value:void 0,then:function(y){p.push(y)}}}return Uy++,u.then(MT,MT),u}function MT(){if(--Uy===0&&zc!==null){Xl!==null&&(Xl.status="fulfilled");var o=zc;zc=null,Wl=0,Xl=null;for(var u=0;u<o.length;u++)(0,o[u])()}}function jX(o,u){var p=[],y={status:"pending",value:null,reason:null,then:function(C){p.push(C)}};return o.then(function(){y.status="fulfilled",y.value=u;for(var C=0;C<p.length;C++)(0,p[C])(u)},function(C){for(y.status="rejected",y.reason=C,C=0;C<p.length;C++)(0,p[C])(void 0)}),y}var PT=q.S;q.S=function(o,u){gM=He(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&SX(o,u),PT!==null&&PT(o,u)};var Eo=U(null);function Gy(){var o=Eo.current;return o!==null?o:Kt.pooledCache}function Oh(o,u){u===null?H(Eo,Eo.current):H(Eo,u.pool)}function DT(){var o=Gy();return o===null?null:{parent:Nn._currentValue,pool:o}}var Zl=Error(r(460)),Vy=Error(r(474)),Mh=Error(r(542)),Ph={then:function(){}};function RT(o){return o=o.status,o==="fulfilled"||o==="rejected"}function IT(o,u,p){switch(p=o[p],p===void 0?o.push(u):p!==u&&(u.then(ji,ji),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,zT(o),o;default:if(typeof u.status=="string")u.then(ji,ji);else{if(o=Kt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=u,o.status="pending",o.then(function(y){if(u.status==="pending"){var C=u;C.status="fulfilled",C.value=y}},function(y){if(u.status==="pending"){var C=u;C.status="rejected",C.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw o=u.reason,zT(o),o}throw To=u,Zl}}function Ao(o){try{var u=o._init;return u(o._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(To=p,Zl):p}}var To=null;function LT(){if(To===null)throw Error(r(459));var o=To;return To=null,o}function zT(o){if(o===Zl||o===Mh)throw Error(r(483))}var Ql=null,$c=0;function Dh(o){var u=$c;return $c+=1,Ql===null&&(Ql=[]),IT(Ql,o,u)}function qc(o,u){u=u.props.ref,o.ref=u!==void 0?u:null}function Rh(o,u){throw u.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o)))}function $T(o){function u(ce,se){if(o){var me=ce.deletions;me===null?(ce.deletions=[se],ce.flags|=16):me.push(se)}}function p(ce,se){if(!o)return null;for(;se!==null;)u(ce,se),se=se.sibling;return null}function y(ce){for(var se=new Map;ce!==null;)ce.key!==null?se.set(ce.key,ce):se.set(ce.index,ce),ce=ce.sibling;return se}function C(ce,se){return ce=ki(ce,se),ce.index=0,ce.sibling=null,ce}function N(ce,se,me){return ce.index=me,o?(me=ce.alternate,me!==null?(me=me.index,me<se?(ce.flags|=67108866,se):me):(ce.flags|=67108866,se)):(ce.flags|=1048576,se)}function $(ce){return o&&ce.alternate===null&&(ce.flags|=67108866),ce}function V(ce,se,me,Ne){return se===null||se.tag!==6?(se=Dy(me,ce.mode,Ne),se.return=ce,se):(se=C(se,me),se.return=ce,se)}function te(ce,se,me,Ne){var et=me.type;return et===w?ke(ce,se,me.props.children,Ne,me.key):se!==null&&(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===D&&Ao(et)===se.type)?(se=C(se,me.props),qc(se,me),se.return=ce,se):(se=Nh(me.type,me.key,me.props,null,ce.mode,Ne),qc(se,me),se.return=ce,se)}function pe(ce,se,me,Ne){return se===null||se.tag!==4||se.stateNode.containerInfo!==me.containerInfo||se.stateNode.implementation!==me.implementation?(se=Ry(me,ce.mode,Ne),se.return=ce,se):(se=C(se,me.children||[]),se.return=ce,se)}function ke(ce,se,me,Ne,et){return se===null||se.tag!==7?(se=_o(me,ce.mode,Ne,et),se.return=ce,se):(se=C(se,me),se.return=ce,se)}function Ee(ce,se,me){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=Dy(""+se,ce.mode,me),se.return=ce,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return me=Nh(se.type,se.key,se.props,null,ce.mode,me),qc(me,se),me.return=ce,me;case b:return se=Ry(se,ce.mode,me),se.return=ce,se;case D:return se=Ao(se),Ee(ce,se,me)}if(I(se)||L(se))return se=_o(se,ce.mode,me,null),se.return=ce,se;if(typeof se.then=="function")return Ee(ce,Dh(se),me);if(se.$$typeof===_)return Ee(ce,Th(ce,se),me);Rh(ce,se)}return null}function ve(ce,se,me,Ne){var et=se!==null?se.key:null;if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return et!==null?null:V(ce,se,""+me,Ne);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case v:return me.key===et?te(ce,se,me,Ne):null;case b:return me.key===et?pe(ce,se,me,Ne):null;case D:return me=Ao(me),ve(ce,se,me,Ne)}if(I(me)||L(me))return et!==null?null:ke(ce,se,me,Ne,null);if(typeof me.then=="function")return ve(ce,se,Dh(me),Ne);if(me.$$typeof===_)return ve(ce,se,Th(ce,me),Ne);Rh(ce,me)}return null}function je(ce,se,me,Ne,et){if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint")return ce=ce.get(me)||null,V(se,ce,""+Ne,et);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case v:return ce=ce.get(Ne.key===null?me:Ne.key)||null,te(se,ce,Ne,et);case b:return ce=ce.get(Ne.key===null?me:Ne.key)||null,pe(se,ce,Ne,et);case D:return Ne=Ao(Ne),je(ce,se,me,Ne,et)}if(I(Ne)||L(Ne))return ce=ce.get(me)||null,ke(se,ce,Ne,et,null);if(typeof Ne.then=="function")return je(ce,se,me,Dh(Ne),et);if(Ne.$$typeof===_)return je(ce,se,me,Th(se,Ne),et);Rh(se,Ne)}return null}function Ue(ce,se,me,Ne){for(var et=null,Mt=null,Ye=se,ft=se=0,jt=null;Ye!==null&&ft<me.length;ft++){Ye.index>ft?(jt=Ye,Ye=null):jt=Ye.sibling;var Pt=ve(ce,Ye,me[ft],Ne);if(Pt===null){Ye===null&&(Ye=jt);break}o&&Ye&&Pt.alternate===null&&u(ce,Ye),se=N(Pt,se,ft),Mt===null?et=Pt:Mt.sibling=Pt,Mt=Pt,Ye=jt}if(ft===me.length)return p(ce,Ye),kt&&Ci(ce,ft),et;if(Ye===null){for(;ft<me.length;ft++)Ye=Ee(ce,me[ft],Ne),Ye!==null&&(se=N(Ye,se,ft),Mt===null?et=Ye:Mt.sibling=Ye,Mt=Ye);return kt&&Ci(ce,ft),et}for(Ye=y(Ye);ft<me.length;ft++)jt=je(Ye,ce,ft,me[ft],Ne),jt!==null&&(o&&jt.alternate!==null&&Ye.delete(jt.key===null?ft:jt.key),se=N(jt,se,ft),Mt===null?et=jt:Mt.sibling=jt,Mt=jt);return o&&Ye.forEach(function(Hs){return u(ce,Hs)}),kt&&Ci(ce,ft),et}function rt(ce,se,me,Ne){if(me==null)throw Error(r(151));for(var et=null,Mt=null,Ye=se,ft=se=0,jt=null,Pt=me.next();Ye!==null&&!Pt.done;ft++,Pt=me.next()){Ye.index>ft?(jt=Ye,Ye=null):jt=Ye.sibling;var Hs=ve(ce,Ye,Pt.value,Ne);if(Hs===null){Ye===null&&(Ye=jt);break}o&&Ye&&Hs.alternate===null&&u(ce,Ye),se=N(Hs,se,ft),Mt===null?et=Hs:Mt.sibling=Hs,Mt=Hs,Ye=jt}if(Pt.done)return p(ce,Ye),kt&&Ci(ce,ft),et;if(Ye===null){for(;!Pt.done;ft++,Pt=me.next())Pt=Ee(ce,Pt.value,Ne),Pt!==null&&(se=N(Pt,se,ft),Mt===null?et=Pt:Mt.sibling=Pt,Mt=Pt);return kt&&Ci(ce,ft),et}for(Ye=y(Ye);!Pt.done;ft++,Pt=me.next())Pt=je(Ye,ce,ft,Pt.value,Ne),Pt!==null&&(o&&Pt.alternate!==null&&Ye.delete(Pt.key===null?ft:Pt.key),se=N(Pt,se,ft),Mt===null?et=Pt:Mt.sibling=Pt,Mt=Pt);return o&&Ye.forEach(function(DZ){return u(ce,DZ)}),kt&&Ci(ce,ft),et}function Ut(ce,se,me,Ne){if(typeof me=="object"&&me!==null&&me.type===w&&me.key===null&&(me=me.props.children),typeof me=="object"&&me!==null){switch(me.$$typeof){case v:e:{for(var et=me.key;se!==null;){if(se.key===et){if(et=me.type,et===w){if(se.tag===7){p(ce,se.sibling),Ne=C(se,me.props.children),Ne.return=ce,ce=Ne;break e}}else if(se.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===D&&Ao(et)===se.type){p(ce,se.sibling),Ne=C(se,me.props),qc(Ne,me),Ne.return=ce,ce=Ne;break e}p(ce,se);break}else u(ce,se);se=se.sibling}me.type===w?(Ne=_o(me.props.children,ce.mode,Ne,me.key),Ne.return=ce,ce=Ne):(Ne=Nh(me.type,me.key,me.props,null,ce.mode,Ne),qc(Ne,me),Ne.return=ce,ce=Ne)}return $(ce);case b:e:{for(et=me.key;se!==null;){if(se.key===et)if(se.tag===4&&se.stateNode.containerInfo===me.containerInfo&&se.stateNode.implementation===me.implementation){p(ce,se.sibling),Ne=C(se,me.children||[]),Ne.return=ce,ce=Ne;break e}else{p(ce,se);break}else u(ce,se);se=se.sibling}Ne=Ry(me,ce.mode,Ne),Ne.return=ce,ce=Ne}return $(ce);case D:return me=Ao(me),Ut(ce,se,me,Ne)}if(I(me))return Ue(ce,se,me,Ne);if(L(me)){if(et=L(me),typeof et!="function")throw Error(r(150));return me=et.call(me),rt(ce,se,me,Ne)}if(typeof me.then=="function")return Ut(ce,se,Dh(me),Ne);if(me.$$typeof===_)return Ut(ce,se,Th(ce,me),Ne);Rh(ce,me)}return typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint"?(me=""+me,se!==null&&se.tag===6?(p(ce,se.sibling),Ne=C(se,me),Ne.return=ce,ce=Ne):(p(ce,se),Ne=Dy(me,ce.mode,Ne),Ne.return=ce,ce=Ne),$(ce)):p(ce,se)}return function(ce,se,me,Ne){try{$c=0;var et=Ut(ce,se,me,Ne);return Ql=null,et}catch(Ye){if(Ye===Zl||Ye===Mh)throw Ye;var Mt=zr(29,Ye,null,ce.mode);return Mt.lanes=Ne,Mt.return=ce,Mt}finally{}}}var Oo=$T(!0),qT=$T(!1),Cs=!1;function Ky(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yy(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ns(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Es(o,u,p){var y=o.updateQueue;if(y===null)return null;if(y=y.shared,(It&2)!==0){var C=y.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),y.pending=u,u=Ch(o),jT(o,null,p),u}return kh(o,y,u,p),Ch(o)}function Bc(o,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var y=u.lanes;y&=o.pendingLanes,p|=y,u.lanes=p,ir(o,p)}}function Wy(o,u){var p=o.updateQueue,y=o.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var C=null,N=null;if(p=p.firstBaseUpdate,p!==null){do{var $={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};N===null?C=N=$:N=N.next=$,p=p.next}while(p!==null);N===null?C=N=u:N=N.next=u}else C=N=u;p={baseState:y.baseState,firstBaseUpdate:C,lastBaseUpdate:N,shared:y.shared,callbacks:y.callbacks},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=u:o.next=u,p.lastBaseUpdate=u}var Xy=!1;function Fc(){if(Xy){var o=Xl;if(o!==null)throw o}}function Hc(o,u,p,y){Xy=!1;var C=o.updateQueue;Cs=!1;var N=C.firstBaseUpdate,$=C.lastBaseUpdate,V=C.shared.pending;if(V!==null){C.shared.pending=null;var te=V,pe=te.next;te.next=null,$===null?N=pe:$.next=pe,$=te;var ke=o.alternate;ke!==null&&(ke=ke.updateQueue,V=ke.lastBaseUpdate,V!==$&&(V===null?ke.firstBaseUpdate=pe:V.next=pe,ke.lastBaseUpdate=te))}if(N!==null){var Ee=C.baseState;$=0,ke=pe=te=null,V=N;do{var ve=V.lane&-536870913,je=ve!==V.lane;if(je?(St&ve)===ve:(y&ve)===ve){ve!==0&&ve===Wl&&(Xy=!0),ke!==null&&(ke=ke.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Ue=o,rt=V;ve=u;var Ut=p;switch(rt.tag){case 1:if(Ue=rt.payload,typeof Ue=="function"){Ee=Ue.call(Ut,Ee,ve);break e}Ee=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=rt.payload,ve=typeof Ue=="function"?Ue.call(Ut,Ee,ve):Ue,ve==null)break e;Ee=m({},Ee,ve);break e;case 2:Cs=!0}}ve=V.callback,ve!==null&&(o.flags|=64,je&&(o.flags|=8192),je=C.callbacks,je===null?C.callbacks=[ve]:je.push(ve))}else je={lane:ve,tag:V.tag,payload:V.payload,callback:V.callback,next:null},ke===null?(pe=ke=je,te=Ee):ke=ke.next=je,$|=ve;if(V=V.next,V===null){if(V=C.shared.pending,V===null)break;je=V,V=je.next,je.next=null,C.lastBaseUpdate=je,C.shared.pending=null}}while(!0);ke===null&&(te=Ee),C.baseState=te,C.firstBaseUpdate=pe,C.lastBaseUpdate=ke,N===null&&(C.shared.lanes=0),Ps|=$,o.lanes=$,o.memoizedState=Ee}}function BT(o,u){if(typeof o!="function")throw Error(r(191,o));o.call(u)}function FT(o,u){var p=o.callbacks;if(p!==null)for(o.callbacks=null,o=0;o<p.length;o++)BT(p[o],u)}var Jl=U(null),Ih=U(0);function HT(o,u){o=Li,H(Ih,o),H(Jl,u),Li=o|u.baseLanes}function Zy(){H(Ih,Li),H(Jl,Jl.current)}function Qy(){Li=Ih.current,X(Jl),X(Ih)}var $r=U(null),oa=null;function As(o){var u=o.alternate;H(_n,_n.current&1),H($r,o),oa===null&&(u===null||Jl.current!==null||u.memoizedState!==null)&&(oa=o)}function Jy(o){H(_n,_n.current),H($r,o),oa===null&&(oa=o)}function UT(o){o.tag===22?(H(_n,_n.current),H($r,o),oa===null&&(oa=o)):Ts()}function Ts(){H(_n,_n.current),H($r,$r.current)}function qr(o){X($r),oa===o&&(oa=null),X(_n)}var _n=U(0);function Lh(o){for(var u=o;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||i0(p)||s0(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===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Ai=0,lt=null,Ft=null,En=null,zh=!1,eu=!1,Mo=!1,$h=0,Uc=0,tu=null,_X=0;function yn(){throw Error(r(321))}function ex(o,u){if(u===null)return!1;for(var p=0;p<u.length&&p<o.length;p++)if(!Lr(o[p],u[p]))return!1;return!0}function tx(o,u,p,y,C,N){return Ai=N,lt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,q.H=o===null||o.memoizedState===null?NO:gx,Mo=!1,N=p(y,C),Mo=!1,eu&&(N=VT(u,p,y,C)),GT(o),N}function GT(o){q.H=Kc;var u=Ft!==null&&Ft.next!==null;if(Ai=0,En=Ft=lt=null,zh=!1,Uc=0,tu=null,u)throw Error(r(300));o===null||An||(o=o.dependencies,o!==null&&Ah(o)&&(An=!0))}function VT(o,u,p,y){lt=o;var C=0;do{if(eu&&(tu=null),Uc=0,eu=!1,25<=C)throw Error(r(301));if(C+=1,En=Ft=null,o.updateQueue!=null){var N=o.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}q.H=EO,N=u(p,y)}while(eu);return N}function kX(){var o=q.H,u=o.useState()[0];return u=typeof u.then=="function"?Gc(u):u,o=o.useState()[0],(Ft!==null?Ft.memoizedState:null)!==o&&(lt.flags|=1024),u}function nx(){var o=$h!==0;return $h=0,o}function rx(o,u,p){u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~p}function ax(o){if(zh){for(o=o.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}zh=!1}Ai=0,En=Ft=lt=null,eu=!1,Uc=$h=0,tu=null}function pr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?lt.memoizedState=En=o:En=En.next=o,En}function kn(){if(Ft===null){var o=lt.alternate;o=o!==null?o.memoizedState:null}else o=Ft.next;var u=En===null?lt.memoizedState:En.next;if(u!==null)En=u,Ft=o;else{if(o===null)throw lt.alternate===null?Error(r(467)):Error(r(310));Ft=o,o={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},En===null?lt.memoizedState=En=o:En=En.next=o}return En}function qh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gc(o){var u=Uc;return Uc+=1,tu===null&&(tu=[]),o=IT(tu,o,u),u=lt,(En===null?u.memoizedState:En.next)===null&&(u=u.alternate,q.H=u===null||u.memoizedState===null?NO:gx),o}function Bh(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Gc(o);if(o.$$typeof===_)return er(o)}throw Error(r(438,String(o)))}function ix(o){var u=null,p=lt.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var y=lt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(C){return C.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=qh(),lt.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(o),y=0;y<o;y++)p[y]=M;return u.index++,p}function Ti(o,u){return typeof u=="function"?u(o):u}function Fh(o){var u=kn();return sx(u,Ft,o)}function sx(o,u,p){var y=o.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=p;var C=o.baseQueue,N=y.pending;if(N!==null){if(C!==null){var $=C.next;C.next=N.next,N.next=$}u.baseQueue=C=N,y.pending=null}if(N=o.baseState,C===null)o.memoizedState=N;else{u=C.next;var V=$=null,te=null,pe=u,ke=!1;do{var Ee=pe.lane&-536870913;if(Ee!==pe.lane?(St&Ee)===Ee:(Ai&Ee)===Ee){var ve=pe.revertLane;if(ve===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Ee===Wl&&(ke=!0);else if((Ai&ve)===ve){pe=pe.next,ve===Wl&&(ke=!0);continue}else Ee={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},te===null?(V=te=Ee,$=N):te=te.next=Ee,lt.lanes|=ve,Ps|=ve;Ee=pe.action,Mo&&p(N,Ee),N=pe.hasEagerState?pe.eagerState:p(N,Ee)}else ve={lane:Ee,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},te===null?(V=te=ve,$=N):te=te.next=ve,lt.lanes|=Ee,Ps|=Ee;pe=pe.next}while(pe!==null&&pe!==u);if(te===null?$=N:te.next=V,!Lr(N,o.memoizedState)&&(An=!0,ke&&(p=Xl,p!==null)))throw p;o.memoizedState=N,o.baseState=$,o.baseQueue=te,y.lastRenderedState=N}return C===null&&(y.lanes=0),[o.memoizedState,y.dispatch]}function ox(o){var u=kn(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=o;var y=p.dispatch,C=p.pending,N=u.memoizedState;if(C!==null){p.pending=null;var $=C=C.next;do N=o(N,$.action),$=$.next;while($!==C);Lr(N,u.memoizedState)||(An=!0),u.memoizedState=N,u.baseQueue===null&&(u.baseState=N),p.lastRenderedState=N}return[N,y]}function KT(o,u,p){var y=lt,C=kn(),N=kt;if(N){if(p===void 0)throw Error(r(407));p=p()}else p=u();var $=!Lr((Ft||C).memoizedState,p);if($&&(C.memoizedState=p,An=!0),C=C.queue,cx(XT.bind(null,y,C,o),[o]),C.getSnapshot!==u||$||En!==null&&En.memoizedState.tag&1){if(y.flags|=2048,nu(9,{destroy:void 0},WT.bind(null,y,C,p,u),null),Kt===null)throw Error(r(349));N||(Ai&127)!==0||YT(y,u,p)}return p}function YT(o,u,p){o.flags|=16384,o={getSnapshot:u,value:p},u=lt.updateQueue,u===null?(u=qh(),lt.updateQueue=u,u.stores=[o]):(p=u.stores,p===null?u.stores=[o]:p.push(o))}function WT(o,u,p,y){u.value=p,u.getSnapshot=y,ZT(u)&&QT(o)}function XT(o,u,p){return p(function(){ZT(u)&&QT(o)})}function ZT(o){var u=o.getSnapshot;o=o.value;try{var p=u();return!Lr(o,p)}catch{return!0}}function QT(o){var u=jo(o,2);u!==null&&Nr(u,o,2)}function lx(o){var u=pr();if(typeof o=="function"){var p=o;if(o=p(),Mo){Ae(!0);try{p()}finally{Ae(!1)}}}return u.memoizedState=u.baseState=o,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:o},u}function JT(o,u,p,y){return o.baseState=p,sx(o,Ft,typeof y=="function"?y:Ti)}function CX(o,u,p,y,C){if(Gh(o))throw Error(r(485));if(o=u.action,o!==null){var N={payload:C,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function($){N.listeners.push($)}};q.T!==null?p(!0):N.isTransition=!1,y(N),p=u.pending,p===null?(N.next=u.pending=N,eO(u,N)):(N.next=p.next,u.pending=p.next=N)}}function eO(o,u){var p=u.action,y=u.payload,C=o.state;if(u.isTransition){var N=q.T,$={};q.T=$;try{var V=p(C,y),te=q.S;te!==null&&te($,V),tO(o,u,V)}catch(pe){ux(o,u,pe)}finally{N!==null&&$.types!==null&&(N.types=$.types),q.T=N}}else try{N=p(C,y),tO(o,u,N)}catch(pe){ux(o,u,pe)}}function tO(o,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){nO(o,u,y)},function(y){return ux(o,u,y)}):nO(o,u,p)}function nO(o,u,p){u.status="fulfilled",u.value=p,rO(u),o.state=p,u=o.pending,u!==null&&(p=u.next,p===u?o.pending=null:(p=p.next,u.next=p,eO(o,p)))}function ux(o,u,p){var y=o.pending;if(o.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=p,rO(u),u=u.next;while(u!==y)}o.action=null}function rO(o){o=o.listeners;for(var u=0;u<o.length;u++)(0,o[u])()}function aO(o,u){return u}function iO(o,u){if(kt){var p=Kt.formState;if(p!==null){e:{var y=lt;if(kt){if(en){t:{for(var C=en,N=sa;C.nodeType!==8;){if(!N){C=null;break t}if(C=la(C.nextSibling),C===null){C=null;break t}}N=C.data,C=N==="F!"||N==="F"?C:null}if(C){en=la(C.nextSibling),y=C.data==="F!";break e}}_s(y)}y=!1}y&&(u=p[0])}}return p=pr(),p.memoizedState=p.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aO,lastRenderedState:u},p.queue=y,p=_O.bind(null,lt,y),y.dispatch=p,y=lx(!1),N=px.bind(null,lt,!1,y.queue),y=pr(),C={state:u,dispatch:null,action:o,pending:null},y.queue=C,p=CX.bind(null,lt,C,N,p),C.dispatch=p,y.memoizedState=o,[u,p,!1]}function sO(o){var u=kn();return oO(u,Ft,o)}function oO(o,u,p){if(u=sx(o,u,aO)[0],o=Fh(Ti)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Gc(u)}catch($){throw $===Zl?Mh:$}else y=u;u=kn();var C=u.queue,N=C.dispatch;return p!==u.memoizedState&&(lt.flags|=2048,nu(9,{destroy:void 0},NX.bind(null,C,p),null)),[y,N,o]}function NX(o,u){o.action=u}function lO(o){var u=kn(),p=Ft;if(p!==null)return oO(u,p,o);kn(),u=u.memoizedState,p=kn();var y=p.queue.dispatch;return p.memoizedState=o,[u,y,!1]}function nu(o,u,p,y){return o={tag:o,create:p,deps:y,inst:u,next:null},u=lt.updateQueue,u===null&&(u=qh(),lt.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=o.next=o:(y=p.next,p.next=o,o.next=y,u.lastEffect=o),o}function uO(){return kn().memoizedState}function Hh(o,u,p,y){var C=pr();lt.flags|=o,C.memoizedState=nu(1|u,{destroy:void 0},p,y===void 0?null:y)}function Uh(o,u,p,y){var C=kn();y=y===void 0?null:y;var N=C.memoizedState.inst;Ft!==null&&y!==null&&ex(y,Ft.memoizedState.deps)?C.memoizedState=nu(u,N,p,y):(lt.flags|=o,C.memoizedState=nu(1|u,N,p,y))}function cO(o,u){Hh(8390656,8,o,u)}function cx(o,u){Uh(2048,8,o,u)}function EX(o){lt.flags|=4;var u=lt.updateQueue;if(u===null)u=qh(),lt.updateQueue=u,u.events=[o];else{var p=u.events;p===null?u.events=[o]:p.push(o)}}function dO(o){var u=kn().memoizedState;return EX({ref:u,nextImpl:o}),function(){if((It&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function fO(o,u){return Uh(4,2,o,u)}function hO(o,u){return Uh(4,4,o,u)}function mO(o,u){if(typeof u=="function"){o=o();var p=u(o);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function pO(o,u,p){p=p!=null?p.concat([o]):null,Uh(4,4,mO.bind(null,u,o),p)}function dx(){}function gO(o,u){var p=kn();u=u===void 0?null:u;var y=p.memoizedState;return u!==null&&ex(u,y[1])?y[0]:(p.memoizedState=[o,u],o)}function vO(o,u){var p=kn();u=u===void 0?null:u;var y=p.memoizedState;if(u!==null&&ex(u,y[1]))return y[0];if(y=o(),Mo){Ae(!0);try{o()}finally{Ae(!1)}}return p.memoizedState=[y,u],y}function fx(o,u,p){return p===void 0||(Ai&1073741824)!==0&&(St&261930)===0?o.memoizedState=u:(o.memoizedState=p,o=yM(),lt.lanes|=o,Ps|=o,p)}function yO(o,u,p,y){return Lr(p,u)?p:Jl.current!==null?(o=fx(o,p,y),Lr(o,u)||(An=!0),o):(Ai&42)===0||(Ai&1073741824)!==0&&(St&261930)===0?(An=!0,o.memoizedState=p):(o=yM(),lt.lanes|=o,Ps|=o,u)}function xO(o,u,p,y,C){var N=G.p;G.p=N!==0&&8>N?N:8;var $=q.T,V={};q.T=V,px(o,!1,u,p);try{var te=C(),pe=q.S;if(pe!==null&&pe(V,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var ke=jX(te,y);Vc(o,u,ke,Hr(o))}else Vc(o,u,y,Hr(o))}catch(Ee){Vc(o,u,{then:function(){},status:"rejected",reason:Ee},Hr())}finally{G.p=N,$!==null&&V.types!==null&&($.types=V.types),q.T=$}}function AX(){}function hx(o,u,p,y){if(o.tag!==5)throw Error(r(476));var C=bO(o).queue;xO(o,C,u,Y,p===null?AX:function(){return wO(o),p(y)})}function bO(o){var u=o.memoizedState;if(u!==null)return u;u={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:Y},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:p},next:null},o.memoizedState=u,o=o.alternate,o!==null&&(o.memoizedState=u),u}function wO(o){var u=bO(o);u.next===null&&(u=o.alternate.memoizedState),Vc(o,u.next.queue,{},Hr())}function mx(){return er(ud)}function SO(){return kn().memoizedState}function jO(){return kn().memoizedState}function TX(o){for(var u=o.return;u!==null;){switch(u.tag){case 24:case 3:var p=Hr();o=Ns(p);var y=Es(u,o,p);y!==null&&(Nr(y,u,p),Bc(y,u,p)),u={cache:Hy()},o.payload=u;return}u=u.return}}function OX(o,u,p){var y=Hr();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Gh(o)?kO(u,p):(p=My(o,u,p,y),p!==null&&(Nr(p,o,y),CO(p,u,y)))}function _O(o,u,p){var y=Hr();Vc(o,u,p,y)}function Vc(o,u,p,y){var C={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Gh(o))kO(u,C);else{var N=o.alternate;if(o.lanes===0&&(N===null||N.lanes===0)&&(N=u.lastRenderedReducer,N!==null))try{var $=u.lastRenderedState,V=N($,p);if(C.hasEagerState=!0,C.eagerState=V,Lr(V,$))return kh(o,u,C,0),Kt===null&&_h(),!1}catch{}finally{}if(p=My(o,u,C,y),p!==null)return Nr(p,o,y),CO(p,u,y),!0}return!1}function px(o,u,p,y){if(y={lane:2,revertLane:Kx(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Gh(o)){if(u)throw Error(r(479))}else u=My(o,p,y,2),u!==null&&Nr(u,o,2)}function Gh(o){var u=o.alternate;return o===lt||u!==null&&u===lt}function kO(o,u){eu=zh=!0;var p=o.pending;p===null?u.next=u:(u.next=p.next,p.next=u),o.pending=u}function CO(o,u,p){if((p&4194048)!==0){var y=u.lanes;y&=o.pendingLanes,p|=y,u.lanes=p,ir(o,p)}}var Kc={readContext:er,use:Bh,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useLayoutEffect:yn,useInsertionEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useSyncExternalStore:yn,useId:yn,useHostTransitionStatus:yn,useFormState:yn,useActionState:yn,useOptimistic:yn,useMemoCache:yn,useCacheRefresh:yn};Kc.useEffectEvent=yn;var NO={readContext:er,use:Bh,useCallback:function(o,u){return pr().memoizedState=[o,u===void 0?null:u],o},useContext:er,useEffect:cO,useImperativeHandle:function(o,u,p){p=p!=null?p.concat([o]):null,Hh(4194308,4,mO.bind(null,u,o),p)},useLayoutEffect:function(o,u){return Hh(4194308,4,o,u)},useInsertionEffect:function(o,u){Hh(4,2,o,u)},useMemo:function(o,u){var p=pr();u=u===void 0?null:u;var y=o();if(Mo){Ae(!0);try{o()}finally{Ae(!1)}}return p.memoizedState=[y,u],y},useReducer:function(o,u,p){var y=pr();if(p!==void 0){var C=p(u);if(Mo){Ae(!0);try{p(u)}finally{Ae(!1)}}}else C=u;return y.memoizedState=y.baseState=C,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:C},y.queue=o,o=o.dispatch=OX.bind(null,lt,o),[y.memoizedState,o]},useRef:function(o){var u=pr();return o={current:o},u.memoizedState=o},useState:function(o){o=lx(o);var u=o.queue,p=_O.bind(null,lt,u);return u.dispatch=p,[o.memoizedState,p]},useDebugValue:dx,useDeferredValue:function(o,u){var p=pr();return fx(p,o,u)},useTransition:function(){var o=lx(!1);return o=xO.bind(null,lt,o.queue,!0,!1),pr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,u,p){var y=lt,C=pr();if(kt){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),Kt===null)throw Error(r(349));(St&127)!==0||YT(y,u,p)}C.memoizedState=p;var N={value:p,getSnapshot:u};return C.queue=N,cO(XT.bind(null,y,N,o),[o]),y.flags|=2048,nu(9,{destroy:void 0},WT.bind(null,y,N,p,u),null),p},useId:function(){var o=pr(),u=Kt.identifierPrefix;if(kt){var p=Wa,y=Ya;p=(y&~(1<<32-$e(y)-1)).toString(32)+p,u="_"+u+"R_"+p,p=$h++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=_X++,u="_"+u+"r_"+p.toString(32)+"_";return o.memoizedState=u},useHostTransitionStatus:mx,useFormState:iO,useActionState:iO,useOptimistic:function(o){var u=pr();u.memoizedState=u.baseState=o;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=px.bind(null,lt,!0,p),p.dispatch=u,[o,u]},useMemoCache:ix,useCacheRefresh:function(){return pr().memoizedState=TX.bind(null,lt)},useEffectEvent:function(o){var u=pr(),p={impl:o};return u.memoizedState=p,function(){if((It&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},gx={readContext:er,use:Bh,useCallback:gO,useContext:er,useEffect:cx,useImperativeHandle:pO,useInsertionEffect:fO,useLayoutEffect:hO,useMemo:vO,useReducer:Fh,useRef:uO,useState:function(){return Fh(Ti)},useDebugValue:dx,useDeferredValue:function(o,u){var p=kn();return yO(p,Ft.memoizedState,o,u)},useTransition:function(){var o=Fh(Ti)[0],u=kn().memoizedState;return[typeof o=="boolean"?o:Gc(o),u]},useSyncExternalStore:KT,useId:SO,useHostTransitionStatus:mx,useFormState:sO,useActionState:sO,useOptimistic:function(o,u){var p=kn();return JT(p,Ft,o,u)},useMemoCache:ix,useCacheRefresh:jO};gx.useEffectEvent=dO;var EO={readContext:er,use:Bh,useCallback:gO,useContext:er,useEffect:cx,useImperativeHandle:pO,useInsertionEffect:fO,useLayoutEffect:hO,useMemo:vO,useReducer:ox,useRef:uO,useState:function(){return ox(Ti)},useDebugValue:dx,useDeferredValue:function(o,u){var p=kn();return Ft===null?fx(p,o,u):yO(p,Ft.memoizedState,o,u)},useTransition:function(){var o=ox(Ti)[0],u=kn().memoizedState;return[typeof o=="boolean"?o:Gc(o),u]},useSyncExternalStore:KT,useId:SO,useHostTransitionStatus:mx,useFormState:lO,useActionState:lO,useOptimistic:function(o,u){var p=kn();return Ft!==null?JT(p,Ft,o,u):(p.baseState=o,[o,p.queue.dispatch])},useMemoCache:ix,useCacheRefresh:jO};EO.useEffectEvent=dO;function vx(o,u,p,y){u=o.memoizedState,p=p(y,u),p=p==null?u:m({},u,p),o.memoizedState=p,o.lanes===0&&(o.updateQueue.baseState=p)}var yx={enqueueSetState:function(o,u,p){o=o._reactInternals;var y=Hr(),C=Ns(y);C.payload=u,p!=null&&(C.callback=p),u=Es(o,C,y),u!==null&&(Nr(u,o,y),Bc(u,o,y))},enqueueReplaceState:function(o,u,p){o=o._reactInternals;var y=Hr(),C=Ns(y);C.tag=1,C.payload=u,p!=null&&(C.callback=p),u=Es(o,C,y),u!==null&&(Nr(u,o,y),Bc(u,o,y))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var p=Hr(),y=Ns(p);y.tag=2,u!=null&&(y.callback=u),u=Es(o,y,p),u!==null&&(Nr(u,o,p),Bc(u,o,p))}};function AO(o,u,p,y,C,N,$){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(y,N,$):u.prototype&&u.prototype.isPureReactComponent?!Pc(p,y)||!Pc(C,N):!0}function TO(o,u,p,y){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,y),u.state!==o&&yx.enqueueReplaceState(u,u.state,null)}function Po(o,u){var p=u;if("ref"in u){p={};for(var y in u)y!=="ref"&&(p[y]=u[y])}if(o=o.defaultProps){p===u&&(p=m({},p));for(var C in o)p[C]===void 0&&(p[C]=o[C])}return p}function OO(o){jh(o)}function MO(o){console.error(o)}function PO(o){jh(o)}function Vh(o,u){try{var p=o.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function DO(o,u,p){try{var y=o.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function xx(o,u,p){return p=Ns(p),p.tag=3,p.payload={element:null},p.callback=function(){Vh(o,u)},p}function RO(o){return o=Ns(o),o.tag=3,o}function IO(o,u,p,y){var C=p.type.getDerivedStateFromError;if(typeof C=="function"){var N=y.value;o.payload=function(){return C(N)},o.callback=function(){DO(u,p,y)}}var $=p.stateNode;$!==null&&typeof $.componentDidCatch=="function"&&(o.callback=function(){DO(u,p,y),typeof C!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var V=y.stack;this.componentDidCatch(y.value,{componentStack:V!==null?V:""})})}function MX(o,u,p,y,C){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=p.alternate,u!==null&&Yl(u,p,C,!0),p=$r.current,p!==null){switch(p.tag){case 31:case 13:return oa===null?am():p.alternate===null&&xn===0&&(xn=3),p.flags&=-257,p.flags|=65536,p.lanes=C,y===Ph?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([y]):u.add(y),Ux(o,y,C)),!1;case 22:return p.flags|=65536,y===Ph?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([y]):p.add(y)),Ux(o,y,C)),!1}throw Error(r(435,p.tag))}return Ux(o,y,C),am(),!1}if(kt)return u=$r.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=C,y!==zy&&(o=Error(r(422),{cause:y}),Ic(ra(o,p)))):(y!==zy&&(u=Error(r(423),{cause:y}),Ic(ra(u,p))),o=o.current.alternate,o.flags|=65536,C&=-C,o.lanes|=C,y=ra(y,p),C=xx(o.stateNode,y,C),Wy(o,C),xn!==4&&(xn=2)),!1;var N=Error(r(520),{cause:y});if(N=ra(N,p),td===null?td=[N]:td.push(N),xn!==4&&(xn=2),u===null)return!0;y=ra(y,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,o=C&-C,p.lanes|=o,o=xx(p.stateNode,y,o),Wy(p,o),!1;case 1:if(u=p.type,N=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Ds===null||!Ds.has(N))))return p.flags|=65536,C&=-C,p.lanes|=C,C=RO(C),IO(C,o,p,y),Wy(p,C),!1}p=p.return}while(p!==null);return!1}var bx=Error(r(461)),An=!1;function tr(o,u,p,y){u.child=o===null?qT(u,null,p,y):Oo(u,o.child,p,y)}function LO(o,u,p,y,C){p=p.render;var N=u.ref;if("ref"in y){var $={};for(var V in y)V!=="ref"&&($[V]=y[V])}else $=y;return No(u),y=tx(o,u,p,$,N,C),V=nx(),o!==null&&!An?(rx(o,u,C),Oi(o,u,C)):(kt&&V&&Iy(u),u.flags|=1,tr(o,u,y,C),u.child)}function zO(o,u,p,y,C){if(o===null){var N=p.type;return typeof N=="function"&&!Py(N)&&N.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=N,$O(o,u,N,y,C)):(o=Nh(p.type,null,y,u,u.mode,C),o.ref=u.ref,o.return=u,u.child=o)}if(N=o.child,!Ex(o,C)){var $=N.memoizedProps;if(p=p.compare,p=p!==null?p:Pc,p($,y)&&o.ref===u.ref)return Oi(o,u,C)}return u.flags|=1,o=ki(N,y),o.ref=u.ref,o.return=u,u.child=o}function $O(o,u,p,y,C){if(o!==null){var N=o.memoizedProps;if(Pc(N,y)&&o.ref===u.ref)if(An=!1,u.pendingProps=y=N,Ex(o,C))(o.flags&131072)!==0&&(An=!0);else return u.lanes=o.lanes,Oi(o,u,C)}return wx(o,u,p,y,C)}function qO(o,u,p,y){var C=y.children,N=o!==null?o.memoizedState:null;if(o===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((u.flags&128)!==0){if(N=N!==null?N.baseLanes|p:p,o!==null){for(y=u.child=o.child,C=0;y!==null;)C=C|y.lanes|y.childLanes,y=y.sibling;y=C&~N}else y=0,u.child=null;return BO(o,u,N,p,y)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},o!==null&&Oh(u,N!==null?N.cachePool:null),N!==null?HT(u,N):Zy(),UT(u);else return y=u.lanes=536870912,BO(o,u,N!==null?N.baseLanes|p:p,p,y)}else N!==null?(Oh(u,N.cachePool),HT(u,N),Ts(),u.memoizedState=null):(o!==null&&Oh(u,null),Zy(),Ts());return tr(o,u,C,p),u.child}function Yc(o,u){return o!==null&&o.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function BO(o,u,p,y,C){var N=Gy();return N=N===null?null:{parent:Nn._currentValue,pool:N},u.memoizedState={baseLanes:p,cachePool:N},o!==null&&Oh(u,null),Zy(),UT(u),o!==null&&Yl(o,u,y,!0),u.childLanes=C,null}function Kh(o,u){return u=Wh({mode:u.mode,children:u.children},o.mode),u.ref=o.ref,o.child=u,u.return=o,u}function FO(o,u,p){return Oo(u,o.child,null,p),o=Kh(u,u.pendingProps),o.flags|=2,qr(u),u.memoizedState=null,o}function PX(o,u,p){var y=u.pendingProps,C=(u.flags&128)!==0;if(u.flags&=-129,o===null){if(kt){if(y.mode==="hidden")return o=Kh(u,y),u.lanes=536870912,Yc(null,o);if(Jy(u),(o=en)?(o=eP(o,sa),o=o!==null&&o.data==="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ss!==null?{id:Ya,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},p=kT(o),p.return=u,u.child=p,Jn=u,en=null)):o=null,o===null)throw _s(u);return u.lanes=536870912,null}return Kh(u,y)}var N=o.memoizedState;if(N!==null){var $=N.dehydrated;if(Jy(u),C)if(u.flags&256)u.flags&=-257,u=FO(o,u,p);else if(u.memoizedState!==null)u.child=o.child,u.flags|=128,u=null;else throw Error(r(558));else if(An||Yl(o,u,p,!1),C=(p&o.childLanes)!==0,An||C){if(y=Kt,y!==null&&($=Re(y,p),$!==0&&$!==N.retryLane))throw N.retryLane=$,jo(o,$),Nr(y,o,$),bx;am(),u=FO(o,u,p)}else o=N.treeContext,en=la($.nextSibling),Jn=u,kt=!0,js=null,sa=!1,o!==null&&ET(u,o),u=Kh(u,y),u.flags|=4096;return u}return o=ki(o.child,{mode:y.mode,children:y.children}),o.ref=u.ref,u.child=o,o.return=u,o}function Yh(o,u){var p=u.ref;if(p===null)o!==null&&o.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(o===null||o.ref!==p)&&(u.flags|=4194816)}}function wx(o,u,p,y,C){return No(u),p=tx(o,u,p,y,void 0,C),y=nx(),o!==null&&!An?(rx(o,u,C),Oi(o,u,C)):(kt&&y&&Iy(u),u.flags|=1,tr(o,u,p,C),u.child)}function HO(o,u,p,y,C,N){return No(u),u.updateQueue=null,p=VT(u,y,p,C),GT(o),y=nx(),o!==null&&!An?(rx(o,u,N),Oi(o,u,N)):(kt&&y&&Iy(u),u.flags|=1,tr(o,u,p,N),u.child)}function UO(o,u,p,y,C){if(No(u),u.stateNode===null){var N=Ul,$=p.contextType;typeof $=="object"&&$!==null&&(N=er($)),N=new p(y,N),u.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=yx,u.stateNode=N,N._reactInternals=u,N=u.stateNode,N.props=y,N.state=u.memoizedState,N.refs={},Ky(u),$=p.contextType,N.context=typeof $=="object"&&$!==null?er($):Ul,N.state=u.memoizedState,$=p.getDerivedStateFromProps,typeof $=="function"&&(vx(u,p,$,y),N.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||($=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),$!==N.state&&yx.enqueueReplaceState(N,N.state,null),Hc(u,y,N,C),Fc(),N.state=u.memoizedState),typeof N.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(o===null){N=u.stateNode;var V=u.memoizedProps,te=Po(p,V);N.props=te;var pe=N.context,ke=p.contextType;$=Ul,typeof ke=="object"&&ke!==null&&($=er(ke));var Ee=p.getDerivedStateFromProps;ke=typeof Ee=="function"||typeof N.getSnapshotBeforeUpdate=="function",V=u.pendingProps!==V,ke||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(V||pe!==$)&&TO(u,N,y,$),Cs=!1;var ve=u.memoizedState;N.state=ve,Hc(u,y,N,C),Fc(),pe=u.memoizedState,V||ve!==pe||Cs?(typeof Ee=="function"&&(vx(u,p,Ee,y),pe=u.memoizedState),(te=Cs||AO(u,p,te,y,ve,pe,$))?(ke||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(u.flags|=4194308)):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=pe),N.props=y,N.state=pe,N.context=$,y=te):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{N=u.stateNode,Yy(o,u),$=u.memoizedProps,ke=Po(p,$),N.props=ke,Ee=u.pendingProps,ve=N.context,pe=p.contextType,te=Ul,typeof pe=="object"&&pe!==null&&(te=er(pe)),V=p.getDerivedStateFromProps,(pe=typeof V=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||($!==Ee||ve!==te)&&TO(u,N,y,te),Cs=!1,ve=u.memoizedState,N.state=ve,Hc(u,y,N,C),Fc();var je=u.memoizedState;$!==Ee||ve!==je||Cs||o!==null&&o.dependencies!==null&&Ah(o.dependencies)?(typeof V=="function"&&(vx(u,p,V,y),je=u.memoizedState),(ke=Cs||AO(u,p,ke,y,ve,je,te)||o!==null&&o.dependencies!==null&&Ah(o.dependencies))?(pe||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(y,je,te),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(y,je,te)),typeof N.componentDidUpdate=="function"&&(u.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof N.componentDidUpdate!="function"||$===o.memoizedProps&&ve===o.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ve===o.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=je),N.props=y,N.state=je,N.context=te,y=ke):(typeof N.componentDidUpdate!="function"||$===o.memoizedProps&&ve===o.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ve===o.memoizedState||(u.flags|=1024),y=!1)}return N=y,Yh(o,u),y=(u.flags&128)!==0,N||y?(N=u.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:N.render(),u.flags|=1,o!==null&&y?(u.child=Oo(u,o.child,null,C),u.child=Oo(u,null,p,C)):tr(o,u,p,C),u.memoizedState=N.state,o=u.child):o=Oi(o,u,C),o}function GO(o,u,p,y){return ko(),u.flags|=256,tr(o,u,p,y),u.child}var Sx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jx(o){return{baseLanes:o,cachePool:DT()}}function _x(o,u,p){return o=o!==null?o.childLanes&~p:0,u&&(o|=Fr),o}function VO(o,u,p){var y=u.pendingProps,C=!1,N=(u.flags&128)!==0,$;if(($=N)||($=o!==null&&o.memoizedState===null?!1:(_n.current&2)!==0),$&&(C=!0,u.flags&=-129),$=(u.flags&32)!==0,u.flags&=-33,o===null){if(kt){if(C?As(u):Ts(),(o=en)?(o=eP(o,sa),o=o!==null&&o.data!=="&"?o:null,o!==null&&(u.memoizedState={dehydrated:o,treeContext:Ss!==null?{id:Ya,overflow:Wa}:null,retryLane:536870912,hydrationErrors:null},p=kT(o),p.return=u,u.child=p,Jn=u,en=null)):o=null,o===null)throw _s(u);return s0(o)?u.lanes=32:u.lanes=536870912,null}var V=y.children;return y=y.fallback,C?(Ts(),C=u.mode,V=Wh({mode:"hidden",children:V},C),y=_o(y,C,p,null),V.return=u,y.return=u,V.sibling=y,u.child=V,y=u.child,y.memoizedState=jx(p),y.childLanes=_x(o,$,p),u.memoizedState=Sx,Yc(null,y)):(As(u),kx(u,V))}var te=o.memoizedState;if(te!==null&&(V=te.dehydrated,V!==null)){if(N)u.flags&256?(As(u),u.flags&=-257,u=Cx(o,u,p)):u.memoizedState!==null?(Ts(),u.child=o.child,u.flags|=128,u=null):(Ts(),V=y.fallback,C=u.mode,y=Wh({mode:"visible",children:y.children},C),V=_o(V,C,p,null),V.flags|=2,y.return=u,V.return=u,y.sibling=V,u.child=y,Oo(u,o.child,null,p),y=u.child,y.memoizedState=jx(p),y.childLanes=_x(o,$,p),u.memoizedState=Sx,u=Yc(null,y));else if(As(u),s0(V)){if($=V.nextSibling&&V.nextSibling.dataset,$)var pe=$.dgst;$=pe,y=Error(r(419)),y.stack="",y.digest=$,Ic({value:y,source:null,stack:null}),u=Cx(o,u,p)}else if(An||Yl(o,u,p,!1),$=(p&o.childLanes)!==0,An||$){if($=Kt,$!==null&&(y=Re($,p),y!==0&&y!==te.retryLane))throw te.retryLane=y,jo(o,y),Nr($,o,y),bx;i0(V)||am(),u=Cx(o,u,p)}else i0(V)?(u.flags|=192,u.child=o.child,u=null):(o=te.treeContext,en=la(V.nextSibling),Jn=u,kt=!0,js=null,sa=!1,o!==null&&ET(u,o),u=kx(u,y.children),u.flags|=4096);return u}return C?(Ts(),V=y.fallback,C=u.mode,te=o.child,pe=te.sibling,y=ki(te,{mode:"hidden",children:y.children}),y.subtreeFlags=te.subtreeFlags&65011712,pe!==null?V=ki(pe,V):(V=_o(V,C,p,null),V.flags|=2),V.return=u,y.return=u,y.sibling=V,u.child=y,Yc(null,y),y=u.child,V=o.child.memoizedState,V===null?V=jx(p):(C=V.cachePool,C!==null?(te=Nn._currentValue,C=C.parent!==te?{parent:te,pool:te}:C):C=DT(),V={baseLanes:V.baseLanes|p,cachePool:C}),y.memoizedState=V,y.childLanes=_x(o,$,p),u.memoizedState=Sx,Yc(o.child,y)):(As(u),p=o.child,o=p.sibling,p=ki(p,{mode:"visible",children:y.children}),p.return=u,p.sibling=null,o!==null&&($=u.deletions,$===null?(u.deletions=[o],u.flags|=16):$.push(o)),u.child=p,u.memoizedState=null,p)}function kx(o,u){return u=Wh({mode:"visible",children:u},o.mode),u.return=o,o.child=u}function Wh(o,u){return o=zr(22,o,null,u),o.lanes=0,o}function Cx(o,u,p){return Oo(u,o.child,null,p),o=kx(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function KO(o,u,p){o.lanes|=u;var y=o.alternate;y!==null&&(y.lanes|=u),By(o.return,u,p)}function Nx(o,u,p,y,C,N){var $=o.memoizedState;$===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:C,treeForkCount:N}:($.isBackwards=u,$.rendering=null,$.renderingStartTime=0,$.last=y,$.tail=p,$.tailMode=C,$.treeForkCount=N)}function YO(o,u,p){var y=u.pendingProps,C=y.revealOrder,N=y.tail;y=y.children;var $=_n.current,V=($&2)!==0;if(V?($=$&1|2,u.flags|=128):$&=1,H(_n,$),tr(o,u,y,p),y=kt?Rc:0,!V&&o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&KO(o,p,u);else if(o.tag===19)KO(o,p,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(C){case"forwards":for(p=u.child,C=null;p!==null;)o=p.alternate,o!==null&&Lh(o)===null&&(C=p),p=p.sibling;p=C,p===null?(C=u.child,u.child=null):(C=p.sibling,p.sibling=null),Nx(u,!1,C,p,N,y);break;case"backwards":case"unstable_legacy-backwards":for(p=null,C=u.child,u.child=null;C!==null;){if(o=C.alternate,o!==null&&Lh(o)===null){u.child=C;break}o=C.sibling,C.sibling=p,p=C,C=o}Nx(u,!0,p,null,N,y);break;case"together":Nx(u,!1,null,null,void 0,y);break;default:u.memoizedState=null}return u.child}function Oi(o,u,p){if(o!==null&&(u.dependencies=o.dependencies),Ps|=u.lanes,(p&u.childLanes)===0)if(o!==null){if(Yl(o,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,p=ki(o,o.pendingProps),u.child=p,p.return=u;o.sibling!==null;)o=o.sibling,p=p.sibling=ki(o,o.pendingProps),p.return=u;p.sibling=null}return u.child}function Ex(o,u){return(o.lanes&u)!==0?!0:(o=o.dependencies,!!(o!==null&&Ah(o)))}function DX(o,u,p){switch(u.tag){case 3:oe(u,u.stateNode.containerInfo),ks(u,Nn,o.memoizedState.cache),ko();break;case 27:case 5:le(u);break;case 4:oe(u,u.stateNode.containerInfo);break;case 10:ks(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Jy(u),null;break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(As(u),u.flags|=128,null):(p&u.child.childLanes)!==0?VO(o,u,p):(As(u),o=Oi(o,u,p),o!==null?o.sibling:null);As(u);break;case 19:var C=(o.flags&128)!==0;if(y=(p&u.childLanes)!==0,y||(Yl(o,u,p,!1),y=(p&u.childLanes)!==0),C){if(y)return YO(o,u,p);u.flags|=128}if(C=u.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),H(_n,_n.current),y)break;return null;case 22:return u.lanes=0,qO(o,u,p,u.pendingProps);case 24:ks(u,Nn,o.memoizedState.cache)}return Oi(o,u,p)}function WO(o,u,p){if(o!==null)if(o.memoizedProps!==u.pendingProps)An=!0;else{if(!Ex(o,p)&&(u.flags&128)===0)return An=!1,DX(o,u,p);An=(o.flags&131072)!==0}else An=!1,kt&&(u.flags&1048576)!==0&&NT(u,Rc,u.index);switch(u.lanes=0,u.tag){case 16:e:{var y=u.pendingProps;if(o=Ao(u.elementType),u.type=o,typeof o=="function")Py(o)?(y=Po(o,y),u.tag=1,u=UO(null,u,o,y,p)):(u.tag=0,u=wx(null,u,o,y,p));else{if(o!=null){var C=o.$$typeof;if(C===E){u.tag=11,u=LO(null,u,o,y,p);break e}else if(C===O){u.tag=14,u=zO(null,u,o,y,p);break e}}throw u=R(o)||o,Error(r(306,u,""))}}return u;case 0:return wx(o,u,u.type,u.pendingProps,p);case 1:return y=u.type,C=Po(y,u.pendingProps),UO(o,u,y,C,p);case 3:e:{if(oe(u,u.stateNode.containerInfo),o===null)throw Error(r(387));y=u.pendingProps;var N=u.memoizedState;C=N.element,Yy(o,u),Hc(u,y,null,p);var $=u.memoizedState;if(y=$.cache,ks(u,Nn,y),y!==N.cache&&Fy(u,[Nn],p,!0),Fc(),y=$.element,N.isDehydrated)if(N={element:y,isDehydrated:!1,cache:$.cache},u.updateQueue.baseState=N,u.memoizedState=N,u.flags&256){u=GO(o,u,y,p);break e}else if(y!==C){C=ra(Error(r(424)),u),Ic(C),u=GO(o,u,y,p);break e}else{switch(o=u.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(en=la(o.firstChild),Jn=u,kt=!0,js=null,sa=!0,p=qT(u,null,y,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(ko(),y===C){u=Oi(o,u,p);break e}tr(o,u,y,p)}u=u.child}return u;case 26:return Yh(o,u),o===null?(p=sP(u.type,null,u.pendingProps,null))?u.memoizedState=p:kt||(p=u.type,o=u.pendingProps,y=dm(J.current).createElement(p),y[jn]=u,y[Gn]=o,nr(y,p,o),gn(y),u.stateNode=y):u.memoizedState=sP(u.type,o.memoizedProps,u.pendingProps,o.memoizedState),null;case 27:return le(u),o===null&&kt&&(y=u.stateNode=rP(u.type,u.pendingProps,J.current),Jn=u,sa=!0,C=en,zs(u.type)?(o0=C,en=la(y.firstChild)):en=C),tr(o,u,u.pendingProps.children,p),Yh(o,u),o===null&&(u.flags|=4194304),u.child;case 5:return o===null&&kt&&((C=y=en)&&(y=cZ(y,u.type,u.pendingProps,sa),y!==null?(u.stateNode=y,Jn=u,en=la(y.firstChild),sa=!1,C=!0):C=!1),C||_s(u)),le(u),C=u.type,N=u.pendingProps,$=o!==null?o.memoizedProps:null,y=N.children,n0(C,N)?y=null:$!==null&&n0(C,$)&&(u.flags|=32),u.memoizedState!==null&&(C=tx(o,u,kX,null,null,p),ud._currentValue=C),Yh(o,u),tr(o,u,y,p),u.child;case 6:return o===null&&kt&&((o=p=en)&&(p=dZ(p,u.pendingProps,sa),p!==null?(u.stateNode=p,Jn=u,en=null,o=!0):o=!1),o||_s(u)),null;case 13:return VO(o,u,p);case 4:return oe(u,u.stateNode.containerInfo),y=u.pendingProps,o===null?u.child=Oo(u,null,y,p):tr(o,u,y,p),u.child;case 11:return LO(o,u,u.type,u.pendingProps,p);case 7:return tr(o,u,u.pendingProps,p),u.child;case 8:return tr(o,u,u.pendingProps.children,p),u.child;case 12:return tr(o,u,u.pendingProps.children,p),u.child;case 10:return y=u.pendingProps,ks(u,u.type,y.value),tr(o,u,y.children,p),u.child;case 9:return C=u.type._context,y=u.pendingProps.children,No(u),C=er(C),y=y(C),u.flags|=1,tr(o,u,y,p),u.child;case 14:return zO(o,u,u.type,u.pendingProps,p);case 15:return $O(o,u,u.type,u.pendingProps,p);case 19:return YO(o,u,p);case 31:return PX(o,u,p);case 22:return qO(o,u,p,u.pendingProps);case 24:return No(u),y=er(Nn),o===null?(C=Gy(),C===null&&(C=Kt,N=Hy(),C.pooledCache=N,N.refCount++,N!==null&&(C.pooledCacheLanes|=p),C=N),u.memoizedState={parent:y,cache:C},Ky(u),ks(u,Nn,C)):((o.lanes&p)!==0&&(Yy(o,u),Hc(u,null,null,p),Fc()),C=o.memoizedState,N=u.memoizedState,C.parent!==y?(C={parent:y,cache:y},u.memoizedState=C,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=C),ks(u,Nn,y)):(y=N.cache,ks(u,Nn,y),y!==C.cache&&Fy(u,[Nn],p,!0))),tr(o,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Mi(o){o.flags|=4}function Ax(o,u,p,y,C){if((u=(o.mode&32)!==0)&&(u=!1),u){if(o.flags|=16777216,(C&335544128)===C)if(o.stateNode.complete)o.flags|=8192;else if(SM())o.flags|=8192;else throw To=Ph,Vy}else o.flags&=-16777217}function XO(o,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!dP(u))if(SM())o.flags|=8192;else throw To=Ph,Vy}function Xh(o,u){u!==null&&(o.flags|=4),o.flags&16384&&(u=o.tag!==22?Se():536870912,o.lanes|=u,su|=u)}function Wc(o,u){if(!kt)switch(o.tailMode){case"hidden":u=o.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:y.sibling=null}}function tn(o){var u=o.alternate!==null&&o.alternate.child===o.child,p=0,y=0;if(u)for(var C=o.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags&65011712,y|=C.flags&65011712,C.return=o,C=C.sibling;else for(C=o.child;C!==null;)p|=C.lanes|C.childLanes,y|=C.subtreeFlags,y|=C.flags,C.return=o,C=C.sibling;return o.subtreeFlags|=y,o.childLanes=p,u}function RX(o,u,p){var y=u.pendingProps;switch(Ly(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(u),null;case 1:return tn(u),null;case 3:return p=u.stateNode,y=null,o!==null&&(y=o.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Ei(Nn),Z(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(Kl(u)?Mi(u):o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,$y())),tn(u),null;case 26:var C=u.type,N=u.memoizedState;return o===null?(Mi(u),N!==null?(tn(u),XO(u,N)):(tn(u),Ax(u,C,null,y,p))):N?N!==o.memoizedState?(Mi(u),tn(u),XO(u,N)):(tn(u),u.flags&=-16777217):(o=o.memoizedProps,o!==y&&Mi(u),tn(u),Ax(u,C,o,y,p)),null;case 27:if(ie(u),p=J.current,C=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Mi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return tn(u),null}o=W.current,Kl(u)?AT(u):(o=rP(C,y,p),u.stateNode=o,Mi(u))}return tn(u),null;case 5:if(ie(u),C=u.type,o!==null&&u.stateNode!=null)o.memoizedProps!==y&&Mi(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return tn(u),null}if(N=W.current,Kl(u))AT(u);else{var $=dm(J.current);switch(N){case 1:N=$.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:N=$.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":N=$.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":N=$.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":N=$.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof y.is=="string"?$.createElement("select",{is:y.is}):$.createElement("select"),y.multiple?N.multiple=!0:y.size&&(N.size=y.size);break;default:N=typeof y.is=="string"?$.createElement(C,{is:y.is}):$.createElement(C)}}N[jn]=u,N[Gn]=y;e:for($=u.child;$!==null;){if($.tag===5||$.tag===6)N.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===u)break e;for(;$.sibling===null;){if($.return===null||$.return===u)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}u.stateNode=N;e:switch(nr(N,C,y),C){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&Mi(u)}}return tn(u),Ax(u,u.type,o===null?null:o.memoizedProps,u.pendingProps,p),null;case 6:if(o&&u.stateNode!=null)o.memoizedProps!==y&&Mi(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(o=J.current,Kl(u)){if(o=u.stateNode,p=u.memoizedProps,y=null,C=Jn,C!==null)switch(C.tag){case 27:case 5:y=C.memoizedProps}o[jn]=u,o=!!(o.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||VM(o.nodeValue,p)),o||_s(u,!0)}else o=dm(o).createTextNode(y),o[jn]=u,u.stateNode=o}return tn(u),null;case 31:if(p=u.memoizedState,o===null||o.memoizedState!==null){if(y=Kl(u),p!==null){if(o===null){if(!y)throw Error(r(318));if(o=u.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[jn]=u}else ko(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;tn(u),o=!1}else p=$y(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=p),o=!0;if(!o)return u.flags&256?(qr(u),u):(qr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return tn(u),null;case 13:if(y=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(C=Kl(u),y!==null&&y.dehydrated!==null){if(o===null){if(!C)throw Error(r(318));if(C=u.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[jn]=u}else ko(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;tn(u),C=!1}else C=$y(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=C),C=!0;if(!C)return u.flags&256?(qr(u),u):(qr(u),null)}return qr(u),(u.flags&128)!==0?(u.lanes=p,u):(p=y!==null,o=o!==null&&o.memoizedState!==null,p&&(y=u.child,C=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(C=y.alternate.memoizedState.cachePool.pool),N=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(N=y.memoizedState.cachePool.pool),N!==C&&(y.flags|=2048)),p!==o&&p&&(u.child.flags|=8192),Xh(u,u.updateQueue),tn(u),null);case 4:return Z(),o===null&&Zx(u.stateNode.containerInfo),tn(u),null;case 10:return Ei(u.type),tn(u),null;case 19:if(X(_n),y=u.memoizedState,y===null)return tn(u),null;if(C=(u.flags&128)!==0,N=y.rendering,N===null)if(C)Wc(y,!1);else{if(xn!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(N=Lh(o),N!==null){for(u.flags|=128,Wc(y,!1),o=N.updateQueue,u.updateQueue=o,Xh(u,o),u.subtreeFlags=0,o=p,p=u.child;p!==null;)_T(p,o),p=p.sibling;return H(_n,_n.current&1|2),kt&&Ci(u,y.treeForkCount),u.child}o=o.sibling}y.tail!==null&&He()>tm&&(u.flags|=128,C=!0,Wc(y,!1),u.lanes=4194304)}else{if(!C)if(o=Lh(N),o!==null){if(u.flags|=128,C=!0,o=o.updateQueue,u.updateQueue=o,Xh(u,o),Wc(y,!0),y.tail===null&&y.tailMode==="hidden"&&!N.alternate&&!kt)return tn(u),null}else 2*He()-y.renderingStartTime>tm&&p!==536870912&&(u.flags|=128,C=!0,Wc(y,!1),u.lanes=4194304);y.isBackwards?(N.sibling=u.child,u.child=N):(o=y.last,o!==null?o.sibling=N:u.child=N,y.last=N)}return y.tail!==null?(o=y.tail,y.rendering=o,y.tail=o.sibling,y.renderingStartTime=He(),o.sibling=null,p=_n.current,H(_n,C?p&1|2:p&1),kt&&Ci(u,y.treeForkCount),o):(tn(u),null);case 22:case 23:return qr(u),Qy(),y=u.memoizedState!==null,o!==null?o.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(p&536870912)!==0&&(u.flags&128)===0&&(tn(u),u.subtreeFlags&6&&(u.flags|=8192)):tn(u),p=u.updateQueue,p!==null&&Xh(u,p.retryQueue),p=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048),o!==null&&X(Eo),null;case 24:return p=null,o!==null&&(p=o.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Ei(Nn),tn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function IX(o,u){switch(Ly(u),u.tag){case 1:return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return Ei(Nn),Z(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 26:case 27:case 5:return ie(u),null;case 31:if(u.memoizedState!==null){if(qr(u),u.alternate===null)throw Error(r(340));ko()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 13:if(qr(u),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));ko()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return X(_n),null;case 4:return Z(),null;case 10:return Ei(u.type),null;case 22:case 23:return qr(u),Qy(),o!==null&&X(Eo),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 24:return Ei(Nn),null;case 25:return null;default:return null}}function ZO(o,u){switch(Ly(u),u.tag){case 3:Ei(Nn),Z();break;case 26:case 27:case 5:ie(u);break;case 4:Z();break;case 31:u.memoizedState!==null&&qr(u);break;case 13:qr(u);break;case 19:X(_n);break;case 10:Ei(u.type);break;case 22:case 23:qr(u),Qy(),o!==null&&X(Eo);break;case 24:Ei(Nn)}}function Xc(o,u){try{var p=u.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var C=y.next;p=C;do{if((p.tag&o)===o){y=void 0;var N=p.create,$=p.inst;y=N(),$.destroy=y}p=p.next}while(p!==C)}}catch(V){Bt(u,u.return,V)}}function Os(o,u,p){try{var y=u.updateQueue,C=y!==null?y.lastEffect:null;if(C!==null){var N=C.next;y=N;do{if((y.tag&o)===o){var $=y.inst,V=$.destroy;if(V!==void 0){$.destroy=void 0,C=u;var te=p,pe=V;try{pe()}catch(ke){Bt(C,te,ke)}}}y=y.next}while(y!==N)}}catch(ke){Bt(u,u.return,ke)}}function QO(o){var u=o.updateQueue;if(u!==null){var p=o.stateNode;try{FT(u,p)}catch(y){Bt(o,o.return,y)}}}function JO(o,u,p){p.props=Po(o.type,o.memoizedProps),p.state=o.memoizedState;try{p.componentWillUnmount()}catch(y){Bt(o,u,y)}}function Zc(o,u){try{var p=o.ref;if(p!==null){switch(o.tag){case 26:case 27:case 5:var y=o.stateNode;break;case 30:y=o.stateNode;break;default:y=o.stateNode}typeof p=="function"?o.refCleanup=p(y):p.current=y}}catch(C){Bt(o,u,C)}}function Xa(o,u){var p=o.ref,y=o.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(C){Bt(o,u,C)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(C){Bt(o,u,C)}else p.current=null}function eM(o){var u=o.type,p=o.memoizedProps,y=o.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break e;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(C){Bt(o,o.return,C)}}function Tx(o,u,p){try{var y=o.stateNode;aZ(y,o.type,p,u),y[Gn]=u}catch(C){Bt(o,o.return,C)}}function tM(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&zs(o.type)||o.tag===4}function Ox(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||tM(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&zs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Mx(o,u,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(o,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(o),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=ji));else if(y!==4&&(y===27&&zs(o.type)&&(p=o.stateNode,u=null),o=o.child,o!==null))for(Mx(o,u,p),o=o.sibling;o!==null;)Mx(o,u,p),o=o.sibling}function Zh(o,u,p){var y=o.tag;if(y===5||y===6)o=o.stateNode,u?p.insertBefore(o,u):p.appendChild(o);else if(y!==4&&(y===27&&zs(o.type)&&(p=o.stateNode),o=o.child,o!==null))for(Zh(o,u,p),o=o.sibling;o!==null;)Zh(o,u,p),o=o.sibling}function nM(o){var u=o.stateNode,p=o.memoizedProps;try{for(var y=o.type,C=u.attributes;C.length;)u.removeAttributeNode(C[0]);nr(u,y,p),u[jn]=o,u[Gn]=p}catch(N){Bt(o,o.return,N)}}var Pi=!1,Tn=!1,Px=!1,rM=typeof WeakSet=="function"?WeakSet:Set,Kn=null;function LX(o,u){if(o=o.containerInfo,e0=ym,o=pT(o),Cy(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var C=y.anchorOffset,N=y.focusNode;y=y.focusOffset;try{p.nodeType,N.nodeType}catch{p=null;break e}var $=0,V=-1,te=-1,pe=0,ke=0,Ee=o,ve=null;t:for(;;){for(var je;Ee!==p||C!==0&&Ee.nodeType!==3||(V=$+C),Ee!==N||y!==0&&Ee.nodeType!==3||(te=$+y),Ee.nodeType===3&&($+=Ee.nodeValue.length),(je=Ee.firstChild)!==null;)ve=Ee,Ee=je;for(;;){if(Ee===o)break t;if(ve===p&&++pe===C&&(V=$),ve===N&&++ke===y&&(te=$),(je=Ee.nextSibling)!==null)break;Ee=ve,ve=Ee.parentNode}Ee=je}p=V===-1||te===-1?null:{start:V,end:te}}else p=null}p=p||{start:0,end:0}}else p=null;for(t0={focusedElem:o,selectionRange:p},ym=!1,Kn=u;Kn!==null;)if(u=Kn,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,Kn=o;else for(;Kn!==null;){switch(u=Kn,N=u.alternate,o=u.flags,u.tag){case 0:if((o&4)!==0&&(o=u.updateQueue,o=o!==null?o.events:null,o!==null))for(p=0;p<o.length;p++)C=o[p],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&N!==null){o=void 0,p=u,C=N.memoizedProps,N=N.memoizedState,y=p.stateNode;try{var Ue=Po(p.type,C);o=y.getSnapshotBeforeUpdate(Ue,N),y.__reactInternalSnapshotBeforeUpdate=o}catch(rt){Bt(p,p.return,rt)}}break;case 3:if((o&1024)!==0){if(o=u.stateNode.containerInfo,p=o.nodeType,p===9)a0(o);else if(p===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":a0(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=u.sibling,o!==null){o.return=u.return,Kn=o;break}Kn=u.return}}function aM(o,u,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:Ri(o,p),y&4&&Xc(5,p);break;case 1:if(Ri(o,p),y&4)if(o=p.stateNode,u===null)try{o.componentDidMount()}catch($){Bt(p,p.return,$)}else{var C=Po(p.type,u.memoizedProps);u=u.memoizedState;try{o.componentDidUpdate(C,u,o.__reactInternalSnapshotBeforeUpdate)}catch($){Bt(p,p.return,$)}}y&64&&QO(p),y&512&&Zc(p,p.return);break;case 3:if(Ri(o,p),y&64&&(o=p.updateQueue,o!==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{FT(o,u)}catch($){Bt(p,p.return,$)}}break;case 27:u===null&&y&4&&nM(p);case 26:case 5:Ri(o,p),u===null&&y&4&&eM(p),y&512&&Zc(p,p.return);break;case 12:Ri(o,p);break;case 31:Ri(o,p),y&4&&oM(o,p);break;case 13:Ri(o,p),y&4&&lM(o,p),y&64&&(o=p.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(p=VX.bind(null,p),fZ(o,p))));break;case 22:if(y=p.memoizedState!==null||Pi,!y){u=u!==null&&u.memoizedState!==null||Tn,C=Pi;var N=Tn;Pi=y,(Tn=u)&&!N?Ii(o,p,(p.subtreeFlags&8772)!==0):Ri(o,p),Pi=C,Tn=N}break;case 30:break;default:Ri(o,p)}}function iM(o){var u=o.alternate;u!==null&&(o.alternate=null,iM(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&po(u)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var an=null,jr=!1;function Di(o,u,p){for(p=p.child;p!==null;)sM(o,u,p),p=p.sibling}function sM(o,u,p){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(_t,p)}catch{}switch(p.tag){case 26:Tn||Xa(p,u),Di(o,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Tn||Xa(p,u);var y=an,C=jr;zs(p.type)&&(an=p.stateNode,jr=!1),Di(o,u,p),sd(p.stateNode),an=y,jr=C;break;case 5:Tn||Xa(p,u);case 6:if(y=an,C=jr,an=null,Di(o,u,p),an=y,jr=C,an!==null)if(jr)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(p.stateNode)}catch(N){Bt(p,u,N)}else try{an.removeChild(p.stateNode)}catch(N){Bt(p,u,N)}break;case 18:an!==null&&(jr?(o=an,QM(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,p.stateNode),mu(o)):QM(an,p.stateNode));break;case 4:y=an,C=jr,an=p.stateNode.containerInfo,jr=!0,Di(o,u,p),an=y,jr=C;break;case 0:case 11:case 14:case 15:Os(2,p,u),Tn||Os(4,p,u),Di(o,u,p);break;case 1:Tn||(Xa(p,u),y=p.stateNode,typeof y.componentWillUnmount=="function"&&JO(p,u,y)),Di(o,u,p);break;case 21:Di(o,u,p);break;case 22:Tn=(y=Tn)||p.memoizedState!==null,Di(o,u,p),Tn=y;break;default:Di(o,u,p)}}function oM(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{mu(o)}catch(p){Bt(u,u.return,p)}}}function lM(o,u){if(u.memoizedState===null&&(o=u.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{mu(o)}catch(p){Bt(u,u.return,p)}}function zX(o){switch(o.tag){case 31:case 13:case 19:var u=o.stateNode;return u===null&&(u=o.stateNode=new rM),u;case 22:return o=o.stateNode,u=o._retryCache,u===null&&(u=o._retryCache=new rM),u;default:throw Error(r(435,o.tag))}}function Qh(o,u){var p=zX(o);u.forEach(function(y){if(!p.has(y)){p.add(y);var C=KX.bind(null,o,y);y.then(C,C)}})}function _r(o,u){var p=u.deletions;if(p!==null)for(var y=0;y<p.length;y++){var C=p[y],N=o,$=u,V=$;e:for(;V!==null;){switch(V.tag){case 27:if(zs(V.type)){an=V.stateNode,jr=!1;break e}break;case 5:an=V.stateNode,jr=!1;break e;case 3:case 4:an=V.stateNode.containerInfo,jr=!0;break e}V=V.return}if(an===null)throw Error(r(160));sM(N,$,C),an=null,jr=!1,N=C.alternate,N!==null&&(N.return=null),C.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)uM(u,o),u=u.sibling}var Ca=null;function uM(o,u){var p=o.alternate,y=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:_r(u,o),kr(o),y&4&&(Os(3,o,o.return),Xc(3,o),Os(5,o,o.return));break;case 1:_r(u,o),kr(o),y&512&&(Tn||p===null||Xa(p,p.return)),y&64&&Pi&&(o=o.updateQueue,o!==null&&(y=o.callbacks,y!==null&&(p=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var C=Ca;if(_r(u,o),kr(o),y&512&&(Tn||p===null||Xa(p,p.return)),y&4){var N=p!==null?p.memoizedState:null;if(y=o.memoizedState,p===null)if(y===null)if(o.stateNode===null){e:{y=o.type,p=o.memoizedProps,C=C.ownerDocument||C;t:switch(y){case"title":N=C.getElementsByTagName("title")[0],(!N||N[Si]||N[jn]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=C.createElement(y),C.head.insertBefore(N,C.querySelector("head > title"))),nr(N,y,p),N[jn]=o,gn(N),y=N;break e;case"link":var $=uP("link","href",C).get(y+(p.href||""));if($){for(var V=0;V<$.length;V++)if(N=$[V],N.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&N.getAttribute("rel")===(p.rel==null?null:p.rel)&&N.getAttribute("title")===(p.title==null?null:p.title)&&N.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){$.splice(V,1);break t}}N=C.createElement(y),nr(N,y,p),C.head.appendChild(N);break;case"meta":if($=uP("meta","content",C).get(y+(p.content||""))){for(V=0;V<$.length;V++)if(N=$[V],N.getAttribute("content")===(p.content==null?null:""+p.content)&&N.getAttribute("name")===(p.name==null?null:p.name)&&N.getAttribute("property")===(p.property==null?null:p.property)&&N.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&N.getAttribute("charset")===(p.charSet==null?null:p.charSet)){$.splice(V,1);break t}}N=C.createElement(y),nr(N,y,p),C.head.appendChild(N);break;default:throw Error(r(468,y))}N[jn]=o,gn(N),y=N}o.stateNode=y}else cP(C,o.type,o.stateNode);else o.stateNode=lP(C,y,o.memoizedProps);else N!==y?(N===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):N.count--,y===null?cP(C,o.type,o.stateNode):lP(C,y,o.memoizedProps)):y===null&&o.stateNode!==null&&Tx(o,o.memoizedProps,p.memoizedProps)}break;case 27:_r(u,o),kr(o),y&512&&(Tn||p===null||Xa(p,p.return)),p!==null&&y&4&&Tx(o,o.memoizedProps,p.memoizedProps);break;case 5:if(_r(u,o),kr(o),y&512&&(Tn||p===null||Xa(p,p.return)),o.flags&32){C=o.stateNode;try{Ll(C,"")}catch(Ue){Bt(o,o.return,Ue)}}y&4&&o.stateNode!=null&&(C=o.memoizedProps,Tx(o,C,p!==null?p.memoizedProps:C)),y&1024&&(Px=!0);break;case 6:if(_r(u,o),kr(o),y&4){if(o.stateNode===null)throw Error(r(162));y=o.memoizedProps,p=o.stateNode;try{p.nodeValue=y}catch(Ue){Bt(o,o.return,Ue)}}break;case 3:if(mm=null,C=Ca,Ca=fm(u.containerInfo),_r(u,o),Ca=C,kr(o),y&4&&p!==null&&p.memoizedState.isDehydrated)try{mu(u.containerInfo)}catch(Ue){Bt(o,o.return,Ue)}Px&&(Px=!1,cM(o));break;case 4:y=Ca,Ca=fm(o.stateNode.containerInfo),_r(u,o),kr(o),Ca=y;break;case 12:_r(u,o),kr(o);break;case 31:_r(u,o),kr(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,Qh(o,y)));break;case 13:_r(u,o),kr(o),o.child.flags&8192&&o.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(em=He()),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,Qh(o,y)));break;case 22:C=o.memoizedState!==null;var te=p!==null&&p.memoizedState!==null,pe=Pi,ke=Tn;if(Pi=pe||C,Tn=ke||te,_r(u,o),Tn=ke,Pi=pe,kr(o),y&8192)e:for(u=o.stateNode,u._visibility=C?u._visibility&-2:u._visibility|1,C&&(p===null||te||Pi||Tn||Do(o)),p=null,u=o;;){if(u.tag===5||u.tag===26){if(p===null){te=p=u;try{if(N=te.stateNode,C)$=N.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{V=te.stateNode;var Ee=te.memoizedProps.style,ve=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;V.style.display=ve==null||typeof ve=="boolean"?"":(""+ve).trim()}}catch(Ue){Bt(te,te.return,Ue)}}}else if(u.tag===6){if(p===null){te=u;try{te.stateNode.nodeValue=C?"":te.memoizedProps}catch(Ue){Bt(te,te.return,Ue)}}}else if(u.tag===18){if(p===null){te=u;try{var je=te.stateNode;C?JM(je,!0):JM(te.stateNode,!1)}catch(Ue){Bt(te,te.return,Ue)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===o)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break e;for(;u.sibling===null;){if(u.return===null||u.return===o)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=o.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,Qh(o,p))));break;case 19:_r(u,o),kr(o),y&4&&(y=o.updateQueue,y!==null&&(o.updateQueue=null,Qh(o,y)));break;case 30:break;case 21:break;default:_r(u,o),kr(o)}}function kr(o){var u=o.flags;if(u&2){try{for(var p,y=o.return;y!==null;){if(tM(y)){p=y;break}y=y.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var C=p.stateNode,N=Ox(o);Zh(o,N,C);break;case 5:var $=p.stateNode;p.flags&32&&(Ll($,""),p.flags&=-33);var V=Ox(o);Zh(o,V,$);break;case 3:case 4:var te=p.stateNode.containerInfo,pe=Ox(o);Mx(o,pe,te);break;default:throw Error(r(161))}}catch(ke){Bt(o,o.return,ke)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function cM(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var u=o;cM(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),o=o.sibling}}function Ri(o,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)aM(o,u.alternate,u),u=u.sibling}function Do(o){for(o=o.child;o!==null;){var u=o;switch(u.tag){case 0:case 11:case 14:case 15:Os(4,u,u.return),Do(u);break;case 1:Xa(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&JO(u,u.return,p),Do(u);break;case 27:sd(u.stateNode);case 26:case 5:Xa(u,u.return),Do(u);break;case 22:u.memoizedState===null&&Do(u);break;case 30:Do(u);break;default:Do(u)}o=o.sibling}}function Ii(o,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,C=o,N=u,$=N.flags;switch(N.tag){case 0:case 11:case 15:Ii(C,N,p),Xc(4,N);break;case 1:if(Ii(C,N,p),y=N,C=y.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(pe){Bt(y,y.return,pe)}if(y=N,C=y.updateQueue,C!==null){var V=y.stateNode;try{var te=C.shared.hiddenCallbacks;if(te!==null)for(C.shared.hiddenCallbacks=null,C=0;C<te.length;C++)BT(te[C],V)}catch(pe){Bt(y,y.return,pe)}}p&&$&64&&QO(N),Zc(N,N.return);break;case 27:nM(N);case 26:case 5:Ii(C,N,p),p&&y===null&&$&4&&eM(N),Zc(N,N.return);break;case 12:Ii(C,N,p);break;case 31:Ii(C,N,p),p&&$&4&&oM(C,N);break;case 13:Ii(C,N,p),p&&$&4&&lM(C,N);break;case 22:N.memoizedState===null&&Ii(C,N,p),Zc(N,N.return);break;case 30:break;default:Ii(C,N,p)}u=u.sibling}}function Dx(o,u){var p=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),o=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(o=u.memoizedState.cachePool.pool),o!==p&&(o!=null&&o.refCount++,p!=null&&Lc(p))}function Rx(o,u){o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Lc(o))}function Na(o,u,p,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)dM(o,u,p,y),u=u.sibling}function dM(o,u,p,y){var C=u.flags;switch(u.tag){case 0:case 11:case 15:Na(o,u,p,y),C&2048&&Xc(9,u);break;case 1:Na(o,u,p,y);break;case 3:Na(o,u,p,y),C&2048&&(o=null,u.alternate!==null&&(o=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==o&&(u.refCount++,o!=null&&Lc(o)));break;case 12:if(C&2048){Na(o,u,p,y),o=u.stateNode;try{var N=u.memoizedProps,$=N.id,V=N.onPostCommit;typeof V=="function"&&V($,u.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(te){Bt(u,u.return,te)}}else Na(o,u,p,y);break;case 31:Na(o,u,p,y);break;case 13:Na(o,u,p,y);break;case 23:break;case 22:N=u.stateNode,$=u.alternate,u.memoizedState!==null?N._visibility&2?Na(o,u,p,y):Qc(o,u):N._visibility&2?Na(o,u,p,y):(N._visibility|=2,ru(o,u,p,y,(u.subtreeFlags&10256)!==0||!1)),C&2048&&Dx($,u);break;case 24:Na(o,u,p,y),C&2048&&Rx(u.alternate,u);break;default:Na(o,u,p,y)}}function ru(o,u,p,y,C){for(C=C&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var N=o,$=u,V=p,te=y,pe=$.flags;switch($.tag){case 0:case 11:case 15:ru(N,$,V,te,C),Xc(8,$);break;case 23:break;case 22:var ke=$.stateNode;$.memoizedState!==null?ke._visibility&2?ru(N,$,V,te,C):Qc(N,$):(ke._visibility|=2,ru(N,$,V,te,C)),C&&pe&2048&&Dx($.alternate,$);break;case 24:ru(N,$,V,te,C),C&&pe&2048&&Rx($.alternate,$);break;default:ru(N,$,V,te,C)}u=u.sibling}}function Qc(o,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=o,y=u,C=y.flags;switch(y.tag){case 22:Qc(p,y),C&2048&&Dx(y.alternate,y);break;case 24:Qc(p,y),C&2048&&Rx(y.alternate,y);break;default:Qc(p,y)}u=u.sibling}}var Jc=8192;function au(o,u,p){if(o.subtreeFlags&Jc)for(o=o.child;o!==null;)fM(o,u,p),o=o.sibling}function fM(o,u,p){switch(o.tag){case 26:au(o,u,p),o.flags&Jc&&o.memoizedState!==null&&_Z(p,Ca,o.memoizedState,o.memoizedProps);break;case 5:au(o,u,p);break;case 3:case 4:var y=Ca;Ca=fm(o.stateNode.containerInfo),au(o,u,p),Ca=y;break;case 22:o.memoizedState===null&&(y=o.alternate,y!==null&&y.memoizedState!==null?(y=Jc,Jc=16777216,au(o,u,p),Jc=y):au(o,u,p));break;default:au(o,u,p)}}function hM(o){var u=o.alternate;if(u!==null&&(o=u.child,o!==null)){u.child=null;do u=o.sibling,o.sibling=null,o=u;while(o!==null)}}function ed(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];Kn=y,pM(y,o)}hM(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)mM(o),o=o.sibling}function mM(o){switch(o.tag){case 0:case 11:case 15:ed(o),o.flags&2048&&Os(9,o,o.return);break;case 3:ed(o);break;case 12:ed(o);break;case 22:var u=o.stateNode;o.memoizedState!==null&&u._visibility&2&&(o.return===null||o.return.tag!==13)?(u._visibility&=-3,Jh(o)):ed(o);break;default:ed(o)}}function Jh(o){var u=o.deletions;if((o.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];Kn=y,pM(y,o)}hM(o)}for(o=o.child;o!==null;){switch(u=o,u.tag){case 0:case 11:case 15:Os(8,u,u.return),Jh(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Jh(u));break;default:Jh(u)}o=o.sibling}}function pM(o,u){for(;Kn!==null;){var p=Kn;switch(p.tag){case 0:case 11:case 15:Os(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Lc(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,Kn=y;else e:for(p=o;Kn!==null;){y=Kn;var C=y.sibling,N=y.return;if(iM(y),y===p){Kn=null;break e}if(C!==null){C.return=N,Kn=C;break e}Kn=N}}}var $X={getCacheForType:function(o){var u=er(Nn),p=u.data.get(o);return p===void 0&&(p=o(),u.data.set(o,p)),p},cacheSignal:function(){return er(Nn).controller.signal}},qX=typeof WeakMap=="function"?WeakMap:Map,It=0,Kt=null,yt=null,St=0,qt=0,Br=null,Ms=!1,iu=!1,Ix=!1,Li=0,xn=0,Ps=0,Ro=0,Lx=0,Fr=0,su=0,td=null,Cr=null,zx=!1,em=0,gM=0,tm=1/0,nm=null,Ds=null,Ln=0,Rs=null,ou=null,zi=0,$x=0,qx=null,vM=null,nd=0,Bx=null;function Hr(){return(It&2)!==0&&St!==0?St&-St:q.T!==null?Kx():Ml()}function yM(){if(Fr===0)if((St&536870912)===0||kt){var o=Ze;Ze<<=1,(Ze&3932160)===0&&(Ze=262144),Fr=o}else Fr=536870912;return o=$r.current,o!==null&&(o.flags|=32),Fr}function Nr(o,u,p){(o===Kt&&(qt===2||qt===9)||o.cancelPendingCommit!==null)&&(lu(o,0),Is(o,St,Fr,!1)),Le(o,p),((It&2)===0||o!==Kt)&&(o===Kt&&((It&2)===0&&(Ro|=p),xn===4&&Is(o,St,Fr,!1)),Za(o))}function xM(o,u,p){if((It&6)!==0)throw Error(r(327));var y=!p&&(u&127)===0&&(u&o.expiredLanes)===0||ne(o,u),C=y?HX(o,u):Hx(o,u,!0),N=y;do{if(C===0){iu&&!y&&Is(o,u,0,!1);break}else{if(p=o.current.alternate,N&&!BX(p)){C=Hx(o,u,!1),N=!1;continue}if(C===2){if(N=u,o.errorRecoveryDisabledLanes&N)var $=0;else $=o.pendingLanes&-536870913,$=$!==0?$:$&536870912?536870912:0;if($!==0){u=$;e:{var V=o;C=td;var te=V.current.memoizedState.isDehydrated;if(te&&(lu(V,$).flags|=256),$=Hx(V,$,!1),$!==2){if(Ix&&!te){V.errorRecoveryDisabledLanes|=N,Ro|=N,C=4;break e}N=Cr,Cr=C,N!==null&&(Cr===null?Cr=N:Cr.push.apply(Cr,N))}C=$}if(N=!1,C!==2)continue}}if(C===1){lu(o,0),Is(o,u,0,!0);break}e:{switch(y=o,N=C,N){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Is(y,u,Fr,!Ms);break e;case 2:Cr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(C=em+300-He(),10<C)){if(Is(y,u,Fr,!Ms),hn(y,0,!0)!==0)break e;zi=u,y.timeoutHandle=XM(bM.bind(null,y,p,Cr,nm,zx,u,Fr,Ro,su,Ms,N,"Throttled",-0,0),C);break e}bM(y,p,Cr,nm,zx,u,Fr,Ro,su,Ms,N,null,-0,0)}}break}while(!0);Za(o)}function bM(o,u,p,y,C,N,$,V,te,pe,ke,Ee,ve,je){if(o.timeoutHandle=-1,Ee=u.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ji},fM(u,N,Ee);var Ue=(N&62914560)===N?em-He():(N&4194048)===N?gM-He():0;if(Ue=kZ(Ee,Ue),Ue!==null){zi=N,o.cancelPendingCommit=Ue(EM.bind(null,o,u,N,p,y,C,$,V,te,ke,Ee,null,ve,je)),Is(o,N,$,!pe);return}}EM(o,u,N,p,y,C,$,V,te)}function BX(o){for(var u=o;;){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 y=0;y<p.length;y++){var C=p[y],N=C.getSnapshot;C=C.value;try{if(!Lr(N(),C))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Is(o,u,p,y){u&=~Lx,u&=~Ro,o.suspendedLanes|=u,o.pingedLanes&=~u,y&&(o.warmLanes|=u),y=o.expirationTimes;for(var C=u;0<C;){var N=31-$e(C),$=1<<N;y[N]=-1,C&=~$}p!==0&&Vt(o,p,u)}function rm(){return(It&6)===0?(rd(0),!1):!0}function Fx(){if(yt!==null){if(qt===0)var o=yt.return;else o=yt,Ni=Co=null,ax(o),Ql=null,$c=0,o=yt;for(;o!==null;)ZO(o.alternate,o),o=o.return;yt=null}}function lu(o,u){var p=o.timeoutHandle;p!==-1&&(o.timeoutHandle=-1,oZ(p)),p=o.cancelPendingCommit,p!==null&&(o.cancelPendingCommit=null,p()),zi=0,Fx(),Kt=o,yt=p=ki(o.current,null),St=u,qt=0,Br=null,Ms=!1,iu=ne(o,u),Ix=!1,su=Fr=Lx=Ro=Ps=xn=0,Cr=td=null,zx=!1,(u&8)!==0&&(u|=u&32);var y=o.entangledLanes;if(y!==0)for(o=o.entanglements,y&=u;0<y;){var C=31-$e(y),N=1<<C;u|=o[C],y&=~N}return Li=u,_h(),p}function wM(o,u){lt=null,q.H=Kc,u===Zl||u===Mh?(u=LT(),qt=3):u===Vy?(u=LT(),qt=4):qt=u===bx?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Br=u,yt===null&&(xn=1,Vh(o,ra(u,o.current)))}function SM(){var o=$r.current;return o===null?!0:(St&4194048)===St?oa===null:(St&62914560)===St||(St&536870912)!==0?o===oa:!1}function jM(){var o=q.H;return q.H=Kc,o===null?Kc:o}function _M(){var o=q.A;return q.A=$X,o}function am(){xn=4,Ms||(St&4194048)!==St&&$r.current!==null||(iu=!0),(Ps&134217727)===0&&(Ro&134217727)===0||Kt===null||Is(Kt,St,Fr,!1)}function Hx(o,u,p){var y=It;It|=2;var C=jM(),N=_M();(Kt!==o||St!==u)&&(nm=null,lu(o,u)),u=!1;var $=xn;e:do try{if(qt!==0&&yt!==null){var V=yt,te=Br;switch(qt){case 8:Fx(),$=6;break e;case 3:case 2:case 9:case 6:$r.current===null&&(u=!0);var pe=qt;if(qt=0,Br=null,uu(o,V,te,pe),p&&iu){$=0;break e}break;default:pe=qt,qt=0,Br=null,uu(o,V,te,pe)}}FX(),$=xn;break}catch(ke){wM(o,ke)}while(!0);return u&&o.shellSuspendCounter++,Ni=Co=null,It=y,q.H=C,q.A=N,yt===null&&(Kt=null,St=0,_h()),$}function FX(){for(;yt!==null;)kM(yt)}function HX(o,u){var p=It;It|=2;var y=jM(),C=_M();Kt!==o||St!==u?(nm=null,tm=He()+500,lu(o,u)):iu=ne(o,u);e:do try{if(qt!==0&&yt!==null){u=yt;var N=Br;t:switch(qt){case 1:qt=0,Br=null,uu(o,u,N,1);break;case 2:case 9:if(RT(N)){qt=0,Br=null,CM(u);break}u=function(){qt!==2&&qt!==9||Kt!==o||(qt=7),Za(o)},N.then(u,u);break e;case 3:qt=7;break e;case 4:qt=5;break e;case 7:RT(N)?(qt=0,Br=null,CM(u)):(qt=0,Br=null,uu(o,u,N,7));break;case 5:var $=null;switch(yt.tag){case 26:$=yt.memoizedState;case 5:case 27:var V=yt;if($?dP($):V.stateNode.complete){qt=0,Br=null;var te=V.sibling;if(te!==null)yt=te;else{var pe=V.return;pe!==null?(yt=pe,im(pe)):yt=null}break t}}qt=0,Br=null,uu(o,u,N,5);break;case 6:qt=0,Br=null,uu(o,u,N,6);break;case 8:Fx(),xn=6;break e;default:throw Error(r(462))}}UX();break}catch(ke){wM(o,ke)}while(!0);return Ni=Co=null,q.H=y,q.A=C,It=p,yt!==null?0:(Kt=null,St=0,_h(),xn)}function UX(){for(;yt!==null&&!it();)kM(yt)}function kM(o){var u=WO(o.alternate,o,Li);o.memoizedProps=o.pendingProps,u===null?im(o):yt=u}function CM(o){var u=o,p=u.alternate;switch(u.tag){case 15:case 0:u=HO(p,u,u.pendingProps,u.type,void 0,St);break;case 11:u=HO(p,u,u.pendingProps,u.type.render,u.ref,St);break;case 5:ax(u);default:ZO(p,u),u=yt=_T(u,Li),u=WO(p,u,Li)}o.memoizedProps=o.pendingProps,u===null?im(o):yt=u}function uu(o,u,p,y){Ni=Co=null,ax(u),Ql=null,$c=0;var C=u.return;try{if(MX(o,C,u,p,St)){xn=1,Vh(o,ra(p,o.current)),yt=null;return}}catch(N){if(C!==null)throw yt=C,N;xn=1,Vh(o,ra(p,o.current)),yt=null;return}u.flags&32768?(kt||y===1?o=!0:iu||(St&536870912)!==0?o=!1:(Ms=o=!0,(y===2||y===9||y===3||y===6)&&(y=$r.current,y!==null&&y.tag===13&&(y.flags|=16384))),NM(u,o)):im(u)}function im(o){var u=o;do{if((u.flags&32768)!==0){NM(u,Ms);return}o=u.return;var p=RX(u.alternate,u,Li);if(p!==null){yt=p;return}if(u=u.sibling,u!==null){yt=u;return}yt=u=o}while(u!==null);xn===0&&(xn=5)}function NM(o,u){do{var p=IX(o.alternate,o);if(p!==null){p.flags&=32767,yt=p;return}if(p=o.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(o=o.sibling,o!==null)){yt=o;return}yt=o=p}while(o!==null);xn=6,yt=null}function EM(o,u,p,y,C,N,$,V,te){o.cancelPendingCommit=null;do sm();while(Ln!==0);if((It&6)!==0)throw Error(r(327));if(u!==null){if(u===o.current)throw Error(r(177));if(N=u.lanes|u.childLanes,N|=Oy,ot(o,p,N,$,V,te),o===Kt&&(yt=Kt=null,St=0),ou=u,Rs=o,zi=p,$x=N,qx=C,vM=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,YX(fe,function(){return PM(),null})):(o.callbackNode=null,o.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=q.T,q.T=null,C=G.p,G.p=2,$=It,It|=4;try{LX(o,u,p)}finally{It=$,G.p=C,q.T=y}}Ln=1,AM(),TM(),OM()}}function AM(){if(Ln===1){Ln=0;var o=Rs,u=ou,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=q.T,q.T=null;var y=G.p;G.p=2;var C=It;It|=4;try{uM(u,o);var N=t0,$=pT(o.containerInfo),V=N.focusedElem,te=N.selectionRange;if($!==V&&V&&V.ownerDocument&&mT(V.ownerDocument.documentElement,V)){if(te!==null&&Cy(V)){var pe=te.start,ke=te.end;if(ke===void 0&&(ke=pe),"selectionStart"in V)V.selectionStart=pe,V.selectionEnd=Math.min(ke,V.value.length);else{var Ee=V.ownerDocument||document,ve=Ee&&Ee.defaultView||window;if(ve.getSelection){var je=ve.getSelection(),Ue=V.textContent.length,rt=Math.min(te.start,Ue),Ut=te.end===void 0?rt:Math.min(te.end,Ue);!je.extend&&rt>Ut&&($=Ut,Ut=rt,rt=$);var ce=hT(V,rt),se=hT(V,Ut);if(ce&&se&&(je.rangeCount!==1||je.anchorNode!==ce.node||je.anchorOffset!==ce.offset||je.focusNode!==se.node||je.focusOffset!==se.offset)){var me=Ee.createRange();me.setStart(ce.node,ce.offset),je.removeAllRanges(),rt>Ut?(je.addRange(me),je.extend(se.node,se.offset)):(me.setEnd(se.node,se.offset),je.addRange(me))}}}}for(Ee=[],je=V;je=je.parentNode;)je.nodeType===1&&Ee.push({element:je,left:je.scrollLeft,top:je.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ee.length;V++){var Ne=Ee[V];Ne.element.scrollLeft=Ne.left,Ne.element.scrollTop=Ne.top}}ym=!!e0,t0=e0=null}finally{It=C,G.p=y,q.T=p}}o.current=u,Ln=2}}function TM(){if(Ln===2){Ln=0;var o=Rs,u=ou,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=q.T,q.T=null;var y=G.p;G.p=2;var C=It;It|=4;try{aM(o,u.alternate,u)}finally{It=C,G.p=y,q.T=p}}Ln=3}}function OM(){if(Ln===4||Ln===3){Ln=0,Ce();var o=Rs,u=ou,p=zi,y=vM;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Ln=5:(Ln=0,ou=Rs=null,MM(o,o.pendingLanes));var C=o.pendingLanes;if(C===0&&(Ds=null),Dr(p),u=u.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(_t,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=q.T,C=G.p,G.p=2,q.T=null;try{for(var N=o.onRecoverableError,$=0;$<y.length;$++){var V=y[$];N(V.value,{componentStack:V.stack})}}finally{q.T=u,G.p=C}}(zi&3)!==0&&sm(),Za(o),C=o.pendingLanes,(p&261930)!==0&&(C&42)!==0?o===Bx?nd++:(nd=0,Bx=o):nd=0,rd(0)}}function MM(o,u){(o.pooledCacheLanes&=u)===0&&(u=o.pooledCache,u!=null&&(o.pooledCache=null,Lc(u)))}function sm(){return AM(),TM(),OM(),PM()}function PM(){if(Ln!==5)return!1;var o=Rs,u=$x;$x=0;var p=Dr(zi),y=q.T,C=G.p;try{G.p=32>p?32:p,q.T=null,p=qx,qx=null;var N=Rs,$=zi;if(Ln=0,ou=Rs=null,zi=0,(It&6)!==0)throw Error(r(331));var V=It;if(It|=4,mM(N.current),dM(N,N.current,$,p),It=V,rd(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(_t,N)}catch{}return!0}finally{G.p=C,q.T=y,MM(o,u)}}function DM(o,u,p){u=ra(p,u),u=xx(o.stateNode,u,2),o=Es(o,u,2),o!==null&&(Le(o,2),Za(o))}function Bt(o,u,p){if(o.tag===3)DM(o,o,p);else for(;u!==null;){if(u.tag===3){DM(u,o,p);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ds===null||!Ds.has(y))){o=ra(p,o),p=RO(2),y=Es(u,p,2),y!==null&&(IO(p,y,u,o),Le(y,2),Za(y));break}}u=u.return}}function Ux(o,u,p){var y=o.pingCache;if(y===null){y=o.pingCache=new qX;var C=new Set;y.set(u,C)}else C=y.get(u),C===void 0&&(C=new Set,y.set(u,C));C.has(p)||(Ix=!0,C.add(p),o=GX.bind(null,o,u,p),u.then(o,o))}function GX(o,u,p){var y=o.pingCache;y!==null&&y.delete(u),o.pingedLanes|=o.suspendedLanes&p,o.warmLanes&=~p,Kt===o&&(St&p)===p&&(xn===4||xn===3&&(St&62914560)===St&&300>He()-em?(It&2)===0&&lu(o,0):Lx|=p,su===St&&(su=0)),Za(o)}function RM(o,u){u===0&&(u=Se()),o=jo(o,u),o!==null&&(Le(o,u),Za(o))}function VX(o){var u=o.memoizedState,p=0;u!==null&&(p=u.retryLane),RM(o,p)}function KX(o,u){var p=0;switch(o.tag){case 31:case 13:var y=o.stateNode,C=o.memoizedState;C!==null&&(p=C.retryLane);break;case 19:y=o.stateNode;break;case 22:y=o.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),RM(o,p)}function YX(o,u){return Je(o,u)}var om=null,cu=null,Gx=!1,lm=!1,Vx=!1,Ls=0;function Za(o){o!==cu&&o.next===null&&(cu===null?om=cu=o:cu=cu.next=o),lm=!0,Gx||(Gx=!0,XX())}function rd(o,u){if(!Vx&&lm){Vx=!0;do for(var p=!1,y=om;y!==null;){if(o!==0){var C=y.pendingLanes;if(C===0)var N=0;else{var $=y.suspendedLanes,V=y.pingedLanes;N=(1<<31-$e(42|o)+1)-1,N&=C&~($&~V),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(p=!0,$M(y,N))}else N=St,N=hn(y,y===Kt?N:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(N&3)===0||ne(y,N)||(p=!0,$M(y,N));y=y.next}while(p);Vx=!1}}function WX(){IM()}function IM(){lm=Gx=!1;var o=0;Ls!==0&&sZ()&&(o=Ls);for(var u=He(),p=null,y=om;y!==null;){var C=y.next,N=LM(y,u);N===0?(y.next=null,p===null?om=C:p.next=C,C===null&&(cu=p)):(p=y,(o!==0||(N&3)!==0)&&(lm=!0)),y=C}Ln!==0&&Ln!==5||rd(o),Ls!==0&&(Ls=0)}function LM(o,u){for(var p=o.suspendedLanes,y=o.pingedLanes,C=o.expirationTimes,N=o.pendingLanes&-62914561;0<N;){var $=31-$e(N),V=1<<$,te=C[$];te===-1?((V&p)===0||(V&y)!==0)&&(C[$]=be(V,u)):te<=u&&(o.expiredLanes|=V),N&=~V}if(u=Kt,p=St,p=hn(o,o===u?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y=o.callbackNode,p===0||o===u&&(qt===2||qt===9)||o.cancelPendingCommit!==null)return y!==null&&y!==null&&We(y),o.callbackNode=null,o.callbackPriority=0;if((p&3)===0||ne(o,p)){if(u=p&-p,u===o.callbackPriority)return u;switch(y!==null&&We(y),Dr(p)){case 2:case 8:p=_e;break;case 32:p=fe;break;case 268435456:p=ze;break;default:p=fe}return y=zM.bind(null,o),p=Je(p,y),o.callbackPriority=u,o.callbackNode=p,u}return y!==null&&y!==null&&We(y),o.callbackPriority=2,o.callbackNode=null,2}function zM(o,u){if(Ln!==0&&Ln!==5)return o.callbackNode=null,o.callbackPriority=0,null;var p=o.callbackNode;if(sm()&&o.callbackNode!==p)return null;var y=St;return y=hn(o,o===Kt?y:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),y===0?null:(xM(o,y,u),LM(o,He()),o.callbackNode!=null&&o.callbackNode===p?zM.bind(null,o):null)}function $M(o,u){if(sm())return null;xM(o,u,!0)}function XX(){lZ(function(){(It&6)!==0?Je(ue,WX):IM()})}function Kx(){if(Ls===0){var o=Wl;o===0&&(o=Et,Et<<=1,(Et&261888)===0&&(Et=256)),Ls=o}return Ls}function qM(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:gh(""+o)}function BM(o,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,o.id&&p.setAttribute("form",o.id),u.parentNode.insertBefore(p,u),o=new FormData(o),p.parentNode.removeChild(p),o}function ZX(o,u,p,y,C){if(u==="submit"&&p&&p.stateNode===C){var N=qM((C[Gn]||null).action),$=y.submitter;$&&(u=(u=$[Gn]||null)?qM(u.formAction):$.getAttribute("formAction"),u!==null&&(N=u,$=null));var V=new bh("action","action",null,y,C);o.push({event:V,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Ls!==0){var te=$?BM(C,$):new FormData(C);hx(p,{pending:!0,data:te,method:C.method,action:N},null,te)}}else typeof N=="function"&&(V.preventDefault(),te=$?BM(C,$):new FormData(C),hx(p,{pending:!0,data:te,method:C.method,action:N},N,te))},currentTarget:C}]})}}for(var Yx=0;Yx<Ty.length;Yx++){var Wx=Ty[Yx],QX=Wx.toLowerCase(),JX=Wx[0].toUpperCase()+Wx.slice(1);ka(QX,"on"+JX)}ka(yT,"onAnimationEnd"),ka(xT,"onAnimationIteration"),ka(bT,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(pX,"onTransitionRun"),ka(gX,"onTransitionStart"),ka(vX,"onTransitionCancel"),ka(wT,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ad="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(" "),eZ=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ad));function FM(o,u){u=(u&4)!==0;for(var p=0;p<o.length;p++){var y=o[p],C=y.event;y=y.listeners;e:{var N=void 0;if(u)for(var $=y.length-1;0<=$;$--){var V=y[$],te=V.instance,pe=V.currentTarget;if(V=V.listener,te!==N&&C.isPropagationStopped())break e;N=V,C.currentTarget=pe;try{N(C)}catch(ke){jh(ke)}C.currentTarget=null,N=te}else for($=0;$<y.length;$++){if(V=y[$],te=V.instance,pe=V.currentTarget,V=V.listener,te!==N&&C.isPropagationStopped())break e;N=V,C.currentTarget=pe;try{N(C)}catch(ke){jh(ke)}C.currentTarget=null,N=te}}}}function xt(o,u){var p=u[ys];p===void 0&&(p=u[ys]=new Set);var y=o+"__bubble";p.has(y)||(HM(u,o,2,!1),p.add(y))}function Xx(o,u,p){var y=0;u&&(y|=4),HM(p,o,y,u)}var um="_reactListening"+Math.random().toString(36).slice(2);function Zx(o){if(!o[um]){o[um]=!0,go.forEach(function(p){p!=="selectionchange"&&(eZ.has(p)||Xx(p,!1,o),Xx(p,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[um]||(u[um]=!0,Xx("selectionchange",!1,u))}}function HM(o,u,p,y){switch(yP(u)){case 2:var C=EZ;break;case 8:C=AZ;break;default:C=f0}p=C.bind(null,u,p,o),C=void 0,!vy||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(C=!0),y?C!==void 0?o.addEventListener(u,p,{capture:!0,passive:C}):o.addEventListener(u,p,!0):C!==void 0?o.addEventListener(u,p,{passive:C}):o.addEventListener(u,p,!1)}function Qx(o,u,p,y,C){var N=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var $=y.tag;if($===3||$===4){var V=y.stateNode.containerInfo;if(V===C)break;if($===4)for($=y.return;$!==null;){var te=$.tag;if((te===3||te===4)&&$.stateNode.containerInfo===C)return;$=$.return}for(;V!==null;){if($=Ua(V),$===null)return;if(te=$.tag,te===5||te===6||te===26||te===27){y=N=$;continue e}V=V.parentNode}}y=y.return}YA(function(){var pe=N,ke=py(p),Ee=[];e:{var ve=ST.get(o);if(ve!==void 0){var je=bh,Ue=o;switch(o){case"keypress":if(yh(p)===0)break e;case"keydown":case"keyup":je=KW;break;case"focusin":Ue="focus",je=wy;break;case"focusout":Ue="blur",je=wy;break;case"beforeblur":case"afterblur":je=wy;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":je=ZA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=RW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=XW;break;case yT:case xT:case bT:je=zW;break;case wT:je=QW;break;case"scroll":case"scrollend":je=PW;break;case"wheel":je=eX;break;case"copy":case"cut":case"paste":je=qW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=JA;break;case"toggle":case"beforetoggle":je=nX}var rt=(u&4)!==0,Ut=!rt&&(o==="scroll"||o==="scrollend"),ce=rt?ve!==null?ve+"Capture":null:ve;rt=[];for(var se=pe,me;se!==null;){var Ne=se;if(me=Ne.stateNode,Ne=Ne.tag,Ne!==5&&Ne!==26&&Ne!==27||me===null||ce===null||(Ne=Cc(se,ce),Ne!=null&&rt.push(id(se,Ne,me))),Ut)break;se=se.return}0<rt.length&&(ve=new je(ve,Ue,null,p,ke),Ee.push({event:ve,listeners:rt}))}}if((u&7)===0){e:{if(ve=o==="mouseover"||o==="pointerover",je=o==="mouseout"||o==="pointerout",ve&&p!==my&&(Ue=p.relatedTarget||p.fromElement)&&(Ua(Ue)||Ue[Sa]))break e;if((je||ve)&&(ve=ke.window===ke?ke:(ve=ke.ownerDocument)?ve.defaultView||ve.parentWindow:window,je?(Ue=p.relatedTarget||p.toElement,je=pe,Ue=Ue?Ua(Ue):null,Ue!==null&&(Ut=i(Ue),rt=Ue.tag,Ue!==Ut||rt!==5&&rt!==27&&rt!==6)&&(Ue=null)):(je=null,Ue=pe),je!==Ue)){if(rt=ZA,Ne="onMouseLeave",ce="onMouseEnter",se="mouse",(o==="pointerout"||o==="pointerover")&&(rt=JA,Ne="onPointerLeave",ce="onPointerEnter",se="pointer"),Ut=je==null?ve:Va(je),me=Ue==null?ve:Va(Ue),ve=new rt(Ne,se+"leave",je,p,ke),ve.target=Ut,ve.relatedTarget=me,Ne=null,Ua(ke)===pe&&(rt=new rt(ce,se+"enter",Ue,p,ke),rt.target=me,rt.relatedTarget=Ut,Ne=rt),Ut=Ne,je&&Ue)t:{for(rt=tZ,ce=je,se=Ue,me=0,Ne=ce;Ne;Ne=rt(Ne))me++;Ne=0;for(var et=se;et;et=rt(et))Ne++;for(;0<me-Ne;)ce=rt(ce),me--;for(;0<Ne-me;)se=rt(se),Ne--;for(;me--;){if(ce===se||se!==null&&ce===se.alternate){rt=ce;break t}ce=rt(ce),se=rt(se)}rt=null}else rt=null;je!==null&&UM(Ee,ve,je,rt,!1),Ue!==null&&Ut!==null&&UM(Ee,Ut,Ue,rt,!0)}}e:{if(ve=pe?Va(pe):window,je=ve.nodeName&&ve.nodeName.toLowerCase(),je==="select"||je==="input"&&ve.type==="file")var Mt=oT;else if(iT(ve))if(lT)Mt=fX;else{Mt=cX;var Ye=uX}else je=ve.nodeName,!je||je.toLowerCase()!=="input"||ve.type!=="checkbox"&&ve.type!=="radio"?pe&&hy(pe.elementType)&&(Mt=oT):Mt=dX;if(Mt&&(Mt=Mt(o,pe))){sT(Ee,Mt,p,ke);break e}Ye&&Ye(o,ve,pe),o==="focusout"&&pe&&ve.type==="number"&&pe.memoizedProps.value!=null&&xo(ve,"number",ve.value)}switch(Ye=pe?Va(pe):window,o){case"focusin":(iT(Ye)||Ye.contentEditable==="true")&&(Bl=Ye,Ny=pe,Dc=null);break;case"focusout":Dc=Ny=Bl=null;break;case"mousedown":Ey=!0;break;case"contextmenu":case"mouseup":case"dragend":Ey=!1,gT(Ee,p,ke);break;case"selectionchange":if(mX)break;case"keydown":case"keyup":gT(Ee,p,ke)}var ft;if(jy)e:{switch(o){case"compositionstart":var jt="onCompositionStart";break e;case"compositionend":jt="onCompositionEnd";break e;case"compositionupdate":jt="onCompositionUpdate";break e}jt=void 0}else ql?rT(o,p)&&(jt="onCompositionEnd"):o==="keydown"&&p.keyCode===229&&(jt="onCompositionStart");jt&&(eT&&p.locale!=="ko"&&(ql||jt!=="onCompositionStart"?jt==="onCompositionEnd"&&ql&&(ft=WA()):(ws=ke,yy="value"in ws?ws.value:ws.textContent,ql=!0)),Ye=cm(pe,jt),0<Ye.length&&(jt=new QA(jt,o,null,p,ke),Ee.push({event:jt,listeners:Ye}),ft?jt.data=ft:(ft=aT(p),ft!==null&&(jt.data=ft)))),(ft=aX?iX(o,p):sX(o,p))&&(jt=cm(pe,"onBeforeInput"),0<jt.length&&(Ye=new QA("onBeforeInput","beforeinput",null,p,ke),Ee.push({event:Ye,listeners:jt}),Ye.data=ft)),ZX(Ee,o,pe,p,ke)}FM(Ee,u)})}function id(o,u,p){return{instance:o,listener:u,currentTarget:p}}function cm(o,u){for(var p=u+"Capture",y=[];o!==null;){var C=o,N=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||N===null||(C=Cc(o,p),C!=null&&y.unshift(id(o,C,N)),C=Cc(o,u),C!=null&&y.push(id(o,C,N))),o.tag===3)return y;o=o.return}return[]}function tZ(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function UM(o,u,p,y,C){for(var N=u._reactName,$=[];p!==null&&p!==y;){var V=p,te=V.alternate,pe=V.stateNode;if(V=V.tag,te!==null&&te===y)break;V!==5&&V!==26&&V!==27||pe===null||(te=pe,C?(pe=Cc(p,N),pe!=null&&$.unshift(id(p,pe,te))):C||(pe=Cc(p,N),pe!=null&&$.push(id(p,pe,te)))),p=p.return}$.length!==0&&o.push({event:u,listeners:$})}var nZ=/\r\n?/g,rZ=/\u0000|\uFFFD/g;function GM(o){return(typeof o=="string"?o:""+o).replace(nZ,`
49
+ `).replace(rZ,"")}function VM(o,u){return u=GM(u),GM(o)===u}function Ht(o,u,p,y,C,N){switch(p){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||Ll(o,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&Ll(o,""+y);break;case"className":bs(o,"class",y);break;case"tabIndex":bs(o,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":bs(o,p,y);break;case"style":VA(o,y,N);break;case"data":if(u!=="object"){bs(o,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||p!=="href")){o.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(p);break}y=gh(""+y),o.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){o.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 N=="function"&&(p==="formAction"?(u!=="input"&&Ht(o,u,"name",C.name,C,null),Ht(o,u,"formEncType",C.formEncType,C,null),Ht(o,u,"formMethod",C.formMethod,C,null),Ht(o,u,"formTarget",C.formTarget,C,null)):(Ht(o,u,"encType",C.encType,C,null),Ht(o,u,"method",C.method,C,null),Ht(o,u,"target",C.target,C,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){o.removeAttribute(p);break}y=gh(""+y),o.setAttribute(p,y);break;case"onClick":y!=null&&(o.onclick=ji);break;case"onScroll":y!=null&&xt("scroll",o);break;case"onScrollEnd":y!=null&&xt("scrollend",o);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"multiple":o.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":o.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){o.removeAttribute("xlink:href");break}p=gh(""+y),o.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":y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,""+y):o.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":y&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,""):o.removeAttribute(p);break;case"capture":case"download":y===!0?o.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?o.setAttribute(p,y):o.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?o.setAttribute(p,y):o.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?o.removeAttribute(p):o.setAttribute(p,y);break;case"popover":xt("beforetoggle",o),xt("toggle",o),xs(o,"popover",y);break;case"xlinkActuate":Ir(o,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Ir(o,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Ir(o,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Ir(o,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Ir(o,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Ir(o,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Ir(o,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":xs(o,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=OW.get(p)||p,xs(o,p,y))}}function Jx(o,u,p,y,C,N){switch(p){case"style":VA(o,y,N);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(C.children!=null)throw Error(r(60));o.innerHTML=p}}break;case"children":typeof y=="string"?Ll(o,y):(typeof y=="number"||typeof y=="bigint")&&Ll(o,""+y);break;case"onScroll":y!=null&&xt("scroll",o);break;case"onScrollEnd":y!=null&&xt("scrollend",o);break;case"onClick":y!=null&&(o.onclick=ji);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ja.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(C=p.endsWith("Capture"),u=p.slice(2,C?p.length-7:void 0),N=o[Gn]||null,N=N!=null?N[p]:null,typeof N=="function"&&o.removeEventListener(u,N,C),typeof y=="function")){typeof N!="function"&&N!==null&&(p in o?o[p]=null:o.hasAttribute(p)&&o.removeAttribute(p)),o.addEventListener(u,y,C);break e}p in o?o[p]=y:y===!0?o.setAttribute(p,""):xs(o,p,y)}}}function nr(o,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xt("error",o),xt("load",o);var y=!1,C=!1,N;for(N in p)if(p.hasOwnProperty(N)){var $=p[N];if($!=null)switch(N){case"src":y=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ht(o,u,N,$,p,null)}}C&&Ht(o,u,"srcSet",p.srcSet,p,null),y&&Ht(o,u,"src",p.src,p,null);return;case"input":xt("invalid",o);var V=N=$=C=null,te=null,pe=null;for(y in p)if(p.hasOwnProperty(y)){var ke=p[y];if(ke!=null)switch(y){case"name":C=ke;break;case"type":$=ke;break;case"checked":te=ke;break;case"defaultChecked":pe=ke;break;case"value":N=ke;break;case"defaultValue":V=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,u));break;default:Ht(o,u,y,ke,p,null)}}Il(o,N,V,te,pe,$,C,!1);return;case"select":xt("invalid",o),y=$=N=null;for(C in p)if(p.hasOwnProperty(C)&&(V=p[C],V!=null))switch(C){case"value":N=V;break;case"defaultValue":$=V;break;case"multiple":y=V;default:Ht(o,u,C,V,p,null)}u=N,p=$,o.multiple=!!y,u!=null?ta(o,!!y,u,!1):p!=null&&ta(o,!!y,p,!0);return;case"textarea":xt("invalid",o),N=C=y=null;for($ in p)if(p.hasOwnProperty($)&&(V=p[$],V!=null))switch($){case"value":y=V;break;case"defaultValue":C=V;break;case"children":N=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:Ht(o,u,$,V,p,null)}UA(o,y,C,N);return;case"option":for(te in p)if(p.hasOwnProperty(te)&&(y=p[te],y!=null))switch(te){case"selected":o.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Ht(o,u,te,y,p,null)}return;case"dialog":xt("beforetoggle",o),xt("toggle",o),xt("cancel",o),xt("close",o);break;case"iframe":case"object":xt("load",o);break;case"video":case"audio":for(y=0;y<ad.length;y++)xt(ad[y],o);break;case"image":xt("error",o),xt("load",o);break;case"details":xt("toggle",o);break;case"embed":case"source":case"link":xt("error",o),xt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in p)if(p.hasOwnProperty(pe)&&(y=p[pe],y!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Ht(o,u,pe,y,p,null)}return;default:if(hy(u)){for(ke in p)p.hasOwnProperty(ke)&&(y=p[ke],y!==void 0&&Jx(o,u,ke,y,p,void 0));return}}for(V in p)p.hasOwnProperty(V)&&(y=p[V],y!=null&&Ht(o,u,V,y,p,null))}function aZ(o,u,p,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,N=null,$=null,V=null,te=null,pe=null,ke=null;for(je in p){var Ee=p[je];if(p.hasOwnProperty(je)&&Ee!=null)switch(je){case"checked":break;case"value":break;case"defaultValue":te=Ee;default:y.hasOwnProperty(je)||Ht(o,u,je,null,y,Ee)}}for(var ve in y){var je=y[ve];if(Ee=p[ve],y.hasOwnProperty(ve)&&(je!=null||Ee!=null))switch(ve){case"type":N=je;break;case"name":C=je;break;case"checked":pe=je;break;case"defaultChecked":ke=je;break;case"value":$=je;break;case"defaultValue":V=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(r(137,u));break;default:je!==Ee&&Ht(o,u,ve,je,y,Ee)}}_a(o,$,V,te,pe,ke,N,C);return;case"select":je=$=V=ve=null;for(N in p)if(te=p[N],p.hasOwnProperty(N)&&te!=null)switch(N){case"value":break;case"multiple":je=te;default:y.hasOwnProperty(N)||Ht(o,u,N,null,y,te)}for(C in y)if(N=y[C],te=p[C],y.hasOwnProperty(C)&&(N!=null||te!=null))switch(C){case"value":ve=N;break;case"defaultValue":V=N;break;case"multiple":$=N;default:N!==te&&Ht(o,u,C,N,y,te)}u=V,p=$,y=je,ve!=null?ta(o,!!p,ve,!1):!!y!=!!p&&(u!=null?ta(o,!!p,u,!0):ta(o,!!p,p?[]:"",!1));return;case"textarea":je=ve=null;for(V in p)if(C=p[V],p.hasOwnProperty(V)&&C!=null&&!y.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Ht(o,u,V,null,y,C)}for($ in y)if(C=y[$],N=p[$],y.hasOwnProperty($)&&(C!=null||N!=null))switch($){case"value":ve=C;break;case"defaultValue":je=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==N&&Ht(o,u,$,C,y,N)}HA(o,ve,je);return;case"option":for(var Ue in p)if(ve=p[Ue],p.hasOwnProperty(Ue)&&ve!=null&&!y.hasOwnProperty(Ue))switch(Ue){case"selected":o.selected=!1;break;default:Ht(o,u,Ue,null,y,ve)}for(te in y)if(ve=y[te],je=p[te],y.hasOwnProperty(te)&&ve!==je&&(ve!=null||je!=null))switch(te){case"selected":o.selected=ve&&typeof ve!="function"&&typeof ve!="symbol";break;default:Ht(o,u,te,ve,y,je)}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 rt in p)ve=p[rt],p.hasOwnProperty(rt)&&ve!=null&&!y.hasOwnProperty(rt)&&Ht(o,u,rt,null,y,ve);for(pe in y)if(ve=y[pe],je=p[pe],y.hasOwnProperty(pe)&&ve!==je&&(ve!=null||je!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,u));break;default:Ht(o,u,pe,ve,y,je)}return;default:if(hy(u)){for(var Ut in p)ve=p[Ut],p.hasOwnProperty(Ut)&&ve!==void 0&&!y.hasOwnProperty(Ut)&&Jx(o,u,Ut,void 0,y,ve);for(ke in y)ve=y[ke],je=p[ke],!y.hasOwnProperty(ke)||ve===je||ve===void 0&&je===void 0||Jx(o,u,ke,ve,y,je);return}}for(var ce in p)ve=p[ce],p.hasOwnProperty(ce)&&ve!=null&&!y.hasOwnProperty(ce)&&Ht(o,u,ce,null,y,ve);for(Ee in y)ve=y[Ee],je=p[Ee],!y.hasOwnProperty(Ee)||ve===je||ve==null&&je==null||Ht(o,u,Ee,ve,y,je)}function KM(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iZ(){if(typeof performance.getEntriesByType=="function"){for(var o=0,u=0,p=performance.getEntriesByType("resource"),y=0;y<p.length;y++){var C=p[y],N=C.transferSize,$=C.initiatorType,V=C.duration;if(N&&V&&KM($)){for($=0,V=C.responseEnd,y+=1;y<p.length;y++){var te=p[y],pe=te.startTime;if(pe>V)break;var ke=te.transferSize,Ee=te.initiatorType;ke&&KM(Ee)&&(te=te.responseEnd,$+=ke*(te<V?1:(V-pe)/(te-pe)))}if(--y,u+=8*(N+$)/(C.duration/1e3),o++,10<o)break}}if(0<o)return u/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var e0=null,t0=null;function dm(o){return o.nodeType===9?o:o.ownerDocument}function YM(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WM(o,u){if(o===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&u==="foreignObject"?0:o}function n0(o,u){return o==="textarea"||o==="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 r0=null;function sZ(){var o=window.event;return o&&o.type==="popstate"?o===r0?!1:(r0=o,!0):(r0=null,!1)}var XM=typeof setTimeout=="function"?setTimeout:void 0,oZ=typeof clearTimeout=="function"?clearTimeout:void 0,ZM=typeof Promise=="function"?Promise:void 0,lZ=typeof queueMicrotask=="function"?queueMicrotask:typeof ZM<"u"?function(o){return ZM.resolve(null).then(o).catch(uZ)}:XM;function uZ(o){setTimeout(function(){throw o})}function zs(o){return o==="head"}function QM(o,u){var p=u,y=0;do{var C=p.nextSibling;if(o.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"||p==="/&"){if(y===0){o.removeChild(C),mu(u);return}y--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")y++;else if(p==="html")sd(o.ownerDocument.documentElement);else if(p==="head"){p=o.ownerDocument.head,sd(p);for(var N=p.firstChild;N;){var $=N.nextSibling,V=N.nodeName;N[Si]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&N.rel.toLowerCase()==="stylesheet"||p.removeChild(N),N=$}}else p==="body"&&sd(o.ownerDocument.body);p=C}while(p);mu(u)}function JM(o,u){var p=o;o=0;do{var y=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||""),y&&y.nodeType===8)if(p=y.data,p==="/$"){if(o===0)break;o--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||o++;p=y}while(p)}function a0(o){var u=o.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":a0(p),po(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}o.removeChild(p)}}function cZ(o,u,p,y){for(;o.nodeType===1;){var C=p;if(o.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(y){if(!o[Si])switch(u){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(N=o.getAttribute("rel"),N==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(N!==C.rel||o.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||o.getAttribute("title")!==(C.title==null?null:C.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(N=o.getAttribute("src"),(N!==(C.src==null?null:C.src)||o.getAttribute("type")!==(C.type==null?null:C.type)||o.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&N&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(u==="input"&&o.type==="hidden"){var N=C.name==null?null:""+C.name;if(C.type==="hidden"&&o.getAttribute("name")===N)return o}else return o;if(o=la(o.nextSibling),o===null)break}return null}function dZ(o,u,p){if(u==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!p||(o=la(o.nextSibling),o===null))return null;return o}function eP(o,u){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!u||(o=la(o.nextSibling),o===null))return null;return o}function i0(o){return o.data==="$?"||o.data==="$~"}function s0(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function fZ(o,u){var p=o.ownerDocument;if(o.data==="$~")o._reactRetry=u;else if(o.data!=="$?"||p.readyState!=="loading")u();else{var y=function(){u(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),o._reactRetry=y}}function la(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return o}var o0=null;function tP(o){o=o.nextSibling;for(var u=0;o;){if(o.nodeType===8){var p=o.data;if(p==="/$"||p==="/&"){if(u===0)return la(o.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}o=o.nextSibling}return null}function nP(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var p=o.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return o;u--}else p!=="/$"&&p!=="/&"||u++}o=o.previousSibling}return null}function rP(o,u,p){switch(u=dm(p),o){case"html":if(o=u.documentElement,!o)throw Error(r(452));return o;case"head":if(o=u.head,!o)throw Error(r(453));return o;case"body":if(o=u.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function sd(o){for(var u=o.attributes;u.length;)o.removeAttributeNode(u[0]);po(o)}var ua=new Map,aP=new Set;function fm(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var $i=G.d;G.d={f:hZ,r:mZ,D:pZ,C:gZ,L:vZ,m:yZ,X:bZ,S:xZ,M:wZ};function hZ(){var o=$i.f(),u=rm();return o||u}function mZ(o){var u=Ga(o);u!==null&&u.tag===5&&u.type==="form"?wO(u):$i.r(o)}var du=typeof document>"u"?null:document;function iP(o,u,p){var y=du;if(y&&typeof u=="string"&&u){var C=vt(u);C='link[rel="'+o+'"][href="'+C+'"]',typeof p=="string"&&(C+='[crossorigin="'+p+'"]'),aP.has(C)||(aP.add(C),o={rel:o,crossOrigin:p,href:u},y.querySelector(C)===null&&(u=y.createElement("link"),nr(u,"link",o),gn(u),y.head.appendChild(u)))}}function pZ(o){$i.D(o),iP("dns-prefetch",o,null)}function gZ(o,u){$i.C(o,u),iP("preconnect",o,u)}function vZ(o,u,p){$i.L(o,u,p);var y=du;if(y&&o&&u){var C='link[rel="preload"][as="'+vt(u)+'"]';u==="image"&&p&&p.imageSrcSet?(C+='[imagesrcset="'+vt(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(C+='[imagesizes="'+vt(p.imageSizes)+'"]')):C+='[href="'+vt(o)+'"]';var N=C;switch(u){case"style":N=fu(o);break;case"script":N=hu(o)}ua.has(N)||(o=m({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:o,as:u},p),ua.set(N,o),y.querySelector(C)!==null||u==="style"&&y.querySelector(od(N))||u==="script"&&y.querySelector(ld(N))||(u=y.createElement("link"),nr(u,"link",o),gn(u),y.head.appendChild(u)))}}function yZ(o,u){$i.m(o,u);var p=du;if(p&&o){var y=u&&typeof u.as=="string"?u.as:"script",C='link[rel="modulepreload"][as="'+vt(y)+'"][href="'+vt(o)+'"]',N=C;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=hu(o)}if(!ua.has(N)&&(o=m({rel:"modulepreload",href:o},u),ua.set(N,o),p.querySelector(C)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ld(N)))return}y=p.createElement("link"),nr(y,"link",o),gn(y),p.head.appendChild(y)}}}function xZ(o,u,p){$i.S(o,u,p);var y=du;if(y&&o){var C=Ka(y).hoistableStyles,N=fu(o);u=u||"default";var $=C.get(N);if(!$){var V={loading:0,preload:null};if($=y.querySelector(od(N)))V.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":u},p),(p=ua.get(N))&&l0(o,p);var te=$=y.createElement("link");gn(te),nr(te,"link",o),te._p=new Promise(function(pe,ke){te.onload=pe,te.onerror=ke}),te.addEventListener("load",function(){V.loading|=1}),te.addEventListener("error",function(){V.loading|=2}),V.loading|=4,hm($,u,y)}$={type:"stylesheet",instance:$,count:1,state:V},C.set(N,$)}}}function bZ(o,u){$i.X(o,u);var p=du;if(p&&o){var y=Ka(p).hoistableScripts,C=hu(o),N=y.get(C);N||(N=p.querySelector(ld(C)),N||(o=m({src:o,async:!0},u),(u=ua.get(C))&&u0(o,u),N=p.createElement("script"),gn(N),nr(N,"link",o),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},y.set(C,N))}}function wZ(o,u){$i.M(o,u);var p=du;if(p&&o){var y=Ka(p).hoistableScripts,C=hu(o),N=y.get(C);N||(N=p.querySelector(ld(C)),N||(o=m({src:o,async:!0,type:"module"},u),(u=ua.get(C))&&u0(o,u),N=p.createElement("script"),gn(N),nr(N,"link",o),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},y.set(C,N))}}function sP(o,u,p,y){var C=(C=J.current)?fm(C):null;if(!C)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=fu(p.href),p=Ka(C).hoistableStyles,y=p.get(u),y||(y={type:"style",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){o=fu(p.href);var N=Ka(C).hoistableStyles,$=N.get(o);if($||(C=C.ownerDocument||C,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(o,$),(N=C.querySelector(od(o)))&&!N._p&&($.instance=N,$.state.loading=5),ua.has(o)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},ua.set(o,p),N||SZ(C,o,p,$.state))),u&&y===null)throw Error(r(528,""));return $}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=hu(p),p=Ka(C).hoistableScripts,y=p.get(u),y||(y={type:"script",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function fu(o){return'href="'+vt(o)+'"'}function od(o){return'link[rel="stylesheet"]['+o+"]"}function oP(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function SZ(o,u,p,y){o.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=o.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),nr(u,"link",p),gn(u),o.head.appendChild(u))}function hu(o){return'[src="'+vt(o)+'"]'}function ld(o){return"script[async]"+o}function lP(o,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var y=o.querySelector('style[data-href~="'+vt(p.href)+'"]');if(y)return u.instance=y,gn(y),y;var C=m({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(o.ownerDocument||o).createElement("style"),gn(y),nr(y,"style",C),hm(y,p.precedence,o),u.instance=y;case"stylesheet":C=fu(p.href);var N=o.querySelector(od(C));if(N)return u.state.loading|=4,u.instance=N,gn(N),N;y=oP(p),(C=ua.get(C))&&l0(y,C),N=(o.ownerDocument||o).createElement("link"),gn(N);var $=N;return $._p=new Promise(function(V,te){$.onload=V,$.onerror=te}),nr(N,"link",y),u.state.loading|=4,hm(N,p.precedence,o),u.instance=N;case"script":return N=hu(p.src),(C=o.querySelector(ld(N)))?(u.instance=C,gn(C),C):(y=p,(C=ua.get(N))&&(y=m({},p),u0(y,C)),o=o.ownerDocument||o,C=o.createElement("script"),gn(C),nr(C,"link",y),o.head.appendChild(C),u.instance=C);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,hm(y,p.precedence,o));return u.instance}function hm(o,u,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=y.length?y[y.length-1]:null,N=C,$=0;$<y.length;$++){var V=y[$];if(V.dataset.precedence===u)N=V;else if(N!==C)break}N?N.parentNode.insertBefore(o,N.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(o,u.firstChild))}function l0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.title==null&&(o.title=u.title)}function u0(o,u){o.crossOrigin==null&&(o.crossOrigin=u.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=u.referrerPolicy),o.integrity==null&&(o.integrity=u.integrity)}var mm=null;function uP(o,u,p){if(mm===null){var y=new Map,C=mm=new Map;C.set(p,y)}else C=mm,y=C.get(p),y||(y=new Map,C.set(p,y));if(y.has(o))return y;for(y.set(o,null),p=p.getElementsByTagName(o),C=0;C<p.length;C++){var N=p[C];if(!(N[Si]||N[jn]||o==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var $=N.getAttribute(u)||"";$=o+$;var V=y.get($);V?V.push(N):y.set($,[N])}}return y}function cP(o,u,p){o=o.ownerDocument||o,o.head.insertBefore(p,u==="title"?o.querySelector("head > title"):null)}function jZ(o,u,p){if(p===1||u.itemProp!=null)return!1;switch(o){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 o=u.disabled,typeof u.precedence=="string"&&o==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 dP(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function _Z(o,u,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var C=fu(y.href),N=u.querySelector(od(C));if(N){u=N._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(o.count++,o=pm.bind(o),u.then(o,o)),p.state.loading|=4,p.instance=N,gn(N);return}N=u.ownerDocument||u,y=oP(y),(C=ua.get(C))&&l0(y,C),N=N.createElement("link"),gn(N);var $=N;$._p=new Promise(function(V,te){$.onload=V,$.onerror=te}),nr(N,"link",y),p.instance=N}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(o.count++,p=pm.bind(o),u.addEventListener("load",p),u.addEventListener("error",p))}}var c0=0;function kZ(o,u){return o.stylesheets&&o.count===0&&vm(o,o.stylesheets),0<o.count||0<o.imgCount?function(p){var y=setTimeout(function(){if(o.stylesheets&&vm(o,o.stylesheets),o.unsuspend){var N=o.unsuspend;o.unsuspend=null,N()}},6e4+u);0<o.imgBytes&&c0===0&&(c0=62500*iZ());var C=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&vm(o,o.stylesheets),o.unsuspend)){var N=o.unsuspend;o.unsuspend=null,N()}},(o.imgBytes>c0?50:800)+u);return o.unsuspend=p,function(){o.unsuspend=null,clearTimeout(y),clearTimeout(C)}}:null}function pm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vm(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var gm=null;function vm(o,u){o.stylesheets=null,o.unsuspend!==null&&(o.count++,gm=new Map,u.forEach(CZ,o),gm=null,pm.call(o))}function CZ(o,u){if(!(u.state.loading&4)){var p=gm.get(o);if(p)var y=p.get(null);else{p=new Map,gm.set(o,p);for(var C=o.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<C.length;N++){var $=C[N];($.nodeName==="LINK"||$.getAttribute("media")!=="not all")&&(p.set($.dataset.precedence,$),y=$)}y&&p.set(null,y)}C=u.instance,$=C.getAttribute("data-precedence"),N=p.get($)||y,N===y&&p.set(null,C),p.set($,C),this.count++,y=pm.bind(this),C.addEventListener("load",y),C.addEventListener("error",y),N?N.parentNode.insertBefore(C,N.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(C,o.firstChild)),u.state.loading|=4}}var ud={$$typeof:_,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function NZ(o,u,p,y,C,N,$,V,te){this.tag=1,this.containerInfo=o,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=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=y,this.onUncaughtError=C,this.onCaughtError=N,this.onRecoverableError=$,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function fP(o,u,p,y,C,N,$,V,te,pe,ke,Ee){return o=new NZ(o,u,p,$,te,pe,ke,Ee,V),u=1,N===!0&&(u|=24),N=zr(3,null,null,u),o.current=N,N.stateNode=o,u=Hy(),u.refCount++,o.pooledCache=u,u.refCount++,N.memoizedState={element:y,isDehydrated:p,cache:u},Ky(N),o}function hP(o){return o?(o=Ul,o):Ul}function mP(o,u,p,y,C,N){C=hP(C),y.context===null?y.context=C:y.pendingContext=C,y=Ns(u),y.payload={element:p},N=N===void 0?null:N,N!==null&&(y.callback=N),p=Es(o,y,u),p!==null&&(Nr(p,o,u),Bc(p,o,u))}function pP(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var p=o.retryLane;o.retryLane=p!==0&&p<u?p:u}}function d0(o,u){pP(o,u),(o=o.alternate)&&pP(o,u)}function gP(o){if(o.tag===13||o.tag===31){var u=jo(o,67108864);u!==null&&Nr(u,o,67108864),d0(o,67108864)}}function vP(o){if(o.tag===13||o.tag===31){var u=Hr();u=Cn(u);var p=jo(o,u);p!==null&&Nr(p,o,u),d0(o,u)}}var ym=!0;function EZ(o,u,p,y){var C=q.T;q.T=null;var N=G.p;try{G.p=2,f0(o,u,p,y)}finally{G.p=N,q.T=C}}function AZ(o,u,p,y){var C=q.T;q.T=null;var N=G.p;try{G.p=8,f0(o,u,p,y)}finally{G.p=N,q.T=C}}function f0(o,u,p,y){if(ym){var C=h0(y);if(C===null)Qx(o,u,y,xm,p),xP(o,y);else if(OZ(C,o,u,p,y))y.stopPropagation();else if(xP(o,y),u&4&&-1<TZ.indexOf(o)){for(;C!==null;){var N=Ga(C);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var $=zt(N.pendingLanes);if($!==0){var V=N;for(V.pendingLanes|=2,V.entangledLanes|=2;$;){var te=1<<31-$e($);V.entanglements[1]|=te,$&=~te}Za(N),(It&6)===0&&(tm=He()+500,rd(0))}}break;case 31:case 13:V=jo(N,2),V!==null&&Nr(V,N,2),rm(),d0(N,2)}if(N=h0(y),N===null&&Qx(o,u,y,xm,p),N===C)break;C=N}C!==null&&y.stopPropagation()}else Qx(o,u,y,null,p)}}function h0(o){return o=py(o),m0(o)}var xm=null;function m0(o){if(xm=null,o=Ua(o),o!==null){var u=i(o);if(u===null)o=null;else{var p=u.tag;if(p===13){if(o=s(u),o!==null)return o;o=null}else if(p===31){if(o=l(u),o!==null)return o;o=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null)}}return xm=o,null}function yP(o){switch(o){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(ge()){case ue:return 2;case _e:return 8;case fe:case Oe:return 32;case ze:return 268435456;default:return 32}default:return 32}}var p0=!1,$s=null,qs=null,Bs=null,cd=new Map,dd=new Map,Fs=[],TZ="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 xP(o,u){switch(o){case"focusin":case"focusout":$s=null;break;case"dragenter":case"dragleave":qs=null;break;case"mouseover":case"mouseout":Bs=null;break;case"pointerover":case"pointerout":cd.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(u.pointerId)}}function fd(o,u,p,y,C,N){return o===null||o.nativeEvent!==N?(o={blockedOn:u,domEventName:p,eventSystemFlags:y,nativeEvent:N,targetContainers:[C]},u!==null&&(u=Ga(u),u!==null&&gP(u)),o):(o.eventSystemFlags|=y,u=o.targetContainers,C!==null&&u.indexOf(C)===-1&&u.push(C),o)}function OZ(o,u,p,y,C){switch(u){case"focusin":return $s=fd($s,o,u,p,y,C),!0;case"dragenter":return qs=fd(qs,o,u,p,y,C),!0;case"mouseover":return Bs=fd(Bs,o,u,p,y,C),!0;case"pointerover":var N=C.pointerId;return cd.set(N,fd(cd.get(N)||null,o,u,p,y,C)),!0;case"gotpointercapture":return N=C.pointerId,dd.set(N,fd(dd.get(N)||null,o,u,p,y,C)),!0}return!1}function bP(o){var u=Ua(o.target);if(u!==null){var p=i(u);if(p!==null){if(u=p.tag,u===13){if(u=s(p),u!==null){o.blockedOn=u,Pl(o.priority,function(){vP(p)});return}}else if(u===31){if(u=l(p),u!==null){o.blockedOn=u,Pl(o.priority,function(){vP(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){o.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}o.blockedOn=null}function bm(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var p=h0(o.nativeEvent);if(p===null){p=o.nativeEvent;var y=new p.constructor(p.type,p);my=y,p.target.dispatchEvent(y),my=null}else return u=Ga(p),u!==null&&gP(u),o.blockedOn=p,!1;u.shift()}return!0}function wP(o,u,p){bm(o)&&p.delete(u)}function MZ(){p0=!1,$s!==null&&bm($s)&&($s=null),qs!==null&&bm(qs)&&(qs=null),Bs!==null&&bm(Bs)&&(Bs=null),cd.forEach(wP),dd.forEach(wP)}function wm(o,u){o.blockedOn===u&&(o.blockedOn=null,p0||(p0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MZ)))}var Sm=null;function SP(o){Sm!==o&&(Sm=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Sm===o&&(Sm=null);for(var u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],C=o[u+2];if(typeof y!="function"){if(m0(y||p)===null)continue;break}var N=Ga(p);N!==null&&(o.splice(u,3),u-=3,hx(N,{pending:!0,data:C,method:p.method,action:y},y,C))}}))}function mu(o){function u(te){return wm(te,o)}$s!==null&&wm($s,o),qs!==null&&wm(qs,o),Bs!==null&&wm(Bs,o),cd.forEach(u),dd.forEach(u);for(var p=0;p<Fs.length;p++){var y=Fs[p];y.blockedOn===o&&(y.blockedOn=null)}for(;0<Fs.length&&(p=Fs[0],p.blockedOn===null);)bP(p),p.blockedOn===null&&Fs.shift();if(p=(o.ownerDocument||o).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var C=p[y],N=p[y+1],$=C[Gn]||null;if(typeof N=="function")$||SP(p);else if($){var V=null;if(N&&N.hasAttribute("formAction")){if(C=N,$=N[Gn]||null)V=$.formAction;else if(m0(C)!==null)continue}else V=$.action;typeof V=="function"?p[y+1]=V:(p.splice(y,3),y-=3),SP(p)}}}function jP(){function o(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function($){return C=$})},focusReset:"manual",scroll:"manual"})}function u(){C!==null&&(C(),C=null),y||setTimeout(p,20)}function p(){if(!y&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,C=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){y=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),C!==null&&(C(),C=null)}}}function g0(o){this._internalRoot=o}jm.prototype.render=g0.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,y=Hr();mP(p,y,o,u,null,null)},jm.prototype.unmount=g0.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;mP(o.current,2,null,o,null,null),rm(),u[Sa]=null}};function jm(o){this._internalRoot=o}jm.prototype.unstable_scheduleHydration=function(o){if(o){var u=Ml();o={blockedOn:null,target:o,priority:u};for(var p=0;p<Fs.length&&u!==0&&u<Fs[p].priority;p++);Fs.splice(p,0,o),p===0&&bP(o)}};var _P=t.version;if(_P!=="19.2.4")throw Error(r(527,_P,"19.2.4"));G.findDOMNode=function(o){var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=d(u),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var PZ={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_m.isDisabled&&_m.supportsFiber)try{_t=_m.inject(PZ),ct=_m}catch{}}return md.createRoot=function(o,u){if(!a(o))throw Error(r(299));var p=!1,y="",C=OO,N=MO,$=PO;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(C=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&($=u.onRecoverableError)),u=fP(o,1,!1,null,null,p,y,null,C,N,$,jP),o[Sa]=u.current,Zx(o),new g0(u)},md.hydrateRoot=function(o,u,p){if(!a(o))throw Error(r(299));var y=!1,C="",N=OO,$=MO,V=PO,te=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(C=p.identifierPrefix),p.onUncaughtError!==void 0&&(N=p.onUncaughtError),p.onCaughtError!==void 0&&($=p.onCaughtError),p.onRecoverableError!==void 0&&(V=p.onRecoverableError),p.formState!==void 0&&(te=p.formState)),u=fP(o,1,!0,u,p??null,y,C,te,N,$,V,jP),u.context=hP(null),p=u.current,y=Hr(),y=Cn(y),C=Ns(y),C.callback=null,Es(p,C,y),p=y,u.current.lanes=p,Le(u,p),Za(u),o[Sa]=u.current,Zx(o),new jm(u)},md.version="19.2.4",md}var DP;function VZ(){if(DP)return b0.exports;DP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),b0.exports=GZ(),b0.exports}var KZ=VZ();const YZ=ea(KZ);/**
50
+ * react-router v7.13.2
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 RP="popstate";function IP(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function WZ(e={}){function t(r,a){var d;let i=(d=a.state)==null?void 0:d.masked,{pathname:s,search:l,hash:c}=i||r.location;return tC("",{pathname:s,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Zd(a)}return ZZ(t,n,null,e)}function mn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ia(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function XZ(){return Math.random().toString(36).substring(2,10)}function LP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function tC(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ac(t):t,state:n,key:t&&t.key||r||XZ(),unstable_mask:a}}function Zd({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ac(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ZZ(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,l="POP",c=null,d=h();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function h(){return(s.state||{idx:null}).idx}function m(){l="POP";let S=h(),j=S==null?null:S-d;d=S,c&&c({action:l,location:w.location,delta:j})}function g(S,j){l="PUSH";let k=IP(S)?S:tC(w.location,S,j);d=h()+1;let _=LP(k,d),E=w.createHref(k.unstable_mask||k);try{s.pushState(_,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;a.location.assign(E)}i&&c&&c({action:l,location:w.location,delta:1})}function v(S,j){l="REPLACE";let k=IP(S)?S:tC(w.location,S,j);d=h();let _=LP(k,d),E=w.createHref(k.unstable_mask||k);s.replaceState(_,"",E),i&&c&&c({action:l,location:w.location,delta:0})}function b(S){return QZ(S)}let w={get action(){return l},get location(){return e(a,s)},listen(S){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(RP,m),c=S,()=>{a.removeEventListener(RP,m),c=null}},createHref(S){return t(a,S)},createURL:b,encodeLocation(S){let j=b(S);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:g,replace:v,go(S){return s.go(S)}};return w}function QZ(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Zd(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function jF(e,t,n="/"){return JZ(e,t,n,!1)}function JZ(e,t,n,r){let a=typeof t=="string"?ac(t):t,i=Ji(a.pathname||"/",n);if(i==null)return null;let s=_F(e);eQ(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let d=dQ(i);l=uQ(s[c],d,r)}return l}function _F(e,t=[],n=[],r="",a=!1){let i=(s,l,c=a,d)=>{let h={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&c)return;mn(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let m=oi([r,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(mn(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),_F(s.children,t,g,m,c)),!(s.path==null&&!s.index)&&t.push({path:m,score:oQ(m,s.index),routesMeta:g})};return e.forEach((s,l)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))i(s,l);else for(let d of kF(s.path))i(s,l,!0,d)}),t}function kF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=kF(r.join("/")),l=[];return l.push(...s.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...s),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function eQ(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lQ(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var tQ=/^:[\w-]+$/,nQ=3,rQ=2,aQ=1,iQ=10,sQ=-2,zP=e=>e==="*";function oQ(e,t){let n=e.split("/"),r=n.length;return n.some(zP)&&(r+=sQ),t&&(r+=rQ),n.filter(a=>!zP(a)).reduce((a,i)=>a+(tQ.test(i)?nQ:i===""?aQ:iQ),r)}function lQ(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function uQ(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let l=0;l<r.length;++l){let c=r[l],d=l===r.length-1,h=i==="/"?t:t.slice(i.length)||"/",m=kp({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),g=c.route;if(!m&&d&&n&&!r[r.length-1].route.index&&(m=kp({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!m)return null;Object.assign(a,m.params),s.push({params:a,pathname:oi([i,m.pathname]),pathnameBase:pQ(oi([i,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(i=oi([i,m.pathnameBase]))}return s}function kp(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cQ(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((d,{paramName:h,isOptional:m},g)=>{if(h==="*"){let b=l[g]||"";s=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const v=l[g];return m&&!v?d[h]=void 0:d[h]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:s,pattern:e}}function cQ(e,t=!1,n=!0){Ia(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c,d,h)=>{if(r.push({paramName:l,isOptional:c!=null}),c){let m=h.charAt(d+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function dQ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ia(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ji(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var fQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hQ(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?ac(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=$P(n.substring(1),"/"):i=$P(n,t)):i=t,{pathname:i,search:gQ(r),hash:vQ(a)}}function $P(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function _0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mQ(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function CF(e){let t=mQ(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function MN(e,t,n,r=!1){let a;typeof e=="string"?a=ac(e):(a={...e},mn(!a.pathname||!a.pathname.includes("?"),_0("?","pathname","search",a)),mn(!a.pathname||!a.pathname.includes("#"),_0("#","pathname","hash",a)),mn(!a.search||!a.search.includes("#"),_0("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,l;if(s==null)l=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),m-=1;a.pathname=g.join("/")}l=m>=0?t[m]:"/"}let c=hQ(a,l),d=s&&s!=="/"&&s.endsWith("/"),h=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}var oi=e=>e.join("/").replace(/\/\/+/g,"/"),pQ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gQ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vQ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yQ=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function xQ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bQ(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var NF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function EF(e,t){let n=e;if(typeof n!="string"||!fQ.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(NF)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),l=Ji(s.pathname,t);s.origin===i.origin&&l!=null?n=l+s.search+s.hash:a=!0}catch{Ia(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var AF=["POST","PUT","PATCH","DELETE"];new Set(AF);var wQ=["GET",...AF];new Set(wQ);var ic=x.createContext(null);ic.displayName="DataRouter";var Rg=x.createContext(null);Rg.displayName="DataRouterState";var SQ=x.createContext(!1),TF=x.createContext({isTransitioning:!1});TF.displayName="ViewTransition";var jQ=x.createContext(new Map);jQ.displayName="Fetchers";var _Q=x.createContext(null);_Q.displayName="Await";var ya=x.createContext(null);ya.displayName="Navigation";var Ef=x.createContext(null);Ef.displayName="Location";var gi=x.createContext({outlet:null,matches:[],isDataRoute:!1});gi.displayName="Route";var PN=x.createContext(null);PN.displayName="RouteError";var OF="REACT_ROUTER_ERROR",kQ="REDIRECT",CQ="ROUTE_ERROR_RESPONSE";function NQ(e){if(e.startsWith(`${OF}:${kQ}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function EQ(e){if(e.startsWith(`${OF}:${CQ}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new yQ(t.status,t.statusText,t.data)}catch{}}function AQ(e,{relative:t}={}){mn(Af(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(ya),{hash:a,pathname:i,search:s}=Tf(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:oi([n,i])),r.createHref({pathname:l,search:s,hash:a})}function Af(){return x.useContext(Ef)!=null}function vi(){return mn(Af(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Ef).location}var MF="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PF(e){x.useContext(ya).static||x.useLayoutEffect(e)}function Ig(){let{isDataRoute:e}=x.useContext(gi);return e?FQ():TQ()}function TQ(){mn(Af(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(ic),{basename:t,navigator:n}=x.useContext(ya),{matches:r}=x.useContext(gi),{pathname:a}=vi(),i=JSON.stringify(CF(r)),s=x.useRef(!1);return PF(()=>{s.current=!0}),x.useCallback((c,d={})=>{if(Ia(s.current,MF),!s.current)return;if(typeof c=="number"){n.go(c);return}let h=MN(c,JSON.parse(i),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:oi([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,i,a,e])}x.createContext(null);function DF(){let{matches:e}=x.useContext(gi),t=e[e.length-1];return t?t.params:{}}function Tf(e,{relative:t}={}){let{matches:n}=x.useContext(gi),{pathname:r}=vi(),a=JSON.stringify(CF(n));return x.useMemo(()=>MN(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function OQ(e,t){return RF(e,t)}function RF(e,t,n){var S;mn(Af(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=x.useContext(ya),{matches:a}=x.useContext(gi),i=a[a.length-1],s=i?i.params:{},l=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let j=d&&d.path||"";LF(l,!d||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${j}">) 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="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let h=vi(),m;if(t){let j=typeof t=="string"?ac(t):t;mn(c==="/"||((S=j.pathname)==null?void 0:S.startsWith(c)),`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 "${c}" but pathname "${j.pathname}" was given in the \`location\` prop.`),m=j}else m=h;let g=m.pathname||"/",v=g;if(c!=="/"){let j=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(j.length).join("/")}let b=jF(e,{pathname:v});Ia(d||b!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),Ia(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.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 w=IQ(b&&b.map(j=>Object.assign({},j,{params:Object.assign({},s,j.params),pathname:oi([c,r.encodeLocation?r.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?c:oi([c,r.encodeLocation?r.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),a,n);return t&&w?x.createElement(Ef.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},w):w}function MQ(){let e=BQ(),t=xQ(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:i},"ErrorBoundary")," or"," ",x.createElement("code",{style:i},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:a},n):null,s)}var PQ=x.createElement(MQ,null),IF=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=EQ(e.digest);n&&(e=n)}let t=e!==void 0?x.createElement(gi.Provider,{value:this.props.routeContext},x.createElement(PN.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?x.createElement(DQ,{error:e},t):t}};IF.contextType=SQ;var k0=new WeakMap;function DQ({children:e,error:t}){let{basename:n}=x.useContext(ya);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=NQ(t.digest);if(r){let a=k0.get(t);if(a)throw a;let i=EF(r.location,n);if(NF&&!k0.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw k0.set(t,s),s}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function RQ({routeContext:e,match:t,children:n}){let r=x.useContext(ic);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(gi.Provider,{value:e},n)}function IQ(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let h=a.findIndex(m=>m.route.id&&(i==null?void 0:i[m.route.id])!==void 0);mn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let s=!1,l=-1;if(n&&r){s=r.renderFallback;for(let h=0;h<a.length;h++){let m=a[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(l=h),m.route.id){let{loaderData:g,errors:v}=r,b=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||b){n.isStatic&&(s=!0),l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,d=r&&c?(h,m)=>{var g,v;c(h,{location:r.location,params:((v=(g=r.matches)==null?void 0:g[0])==null?void 0:v.params)??{},unstable_pattern:bQ(r.matches),errorInfo:m})}:void 0;return a.reduceRight((h,m,g)=>{let v,b=!1,w=null,S=null;r&&(v=i&&m.route.id?i[m.route.id]:void 0,w=m.route.errorElement||PQ,s&&(l<0&&g===0?(LF("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):l===g&&(b=!0,S=m.route.hydrateFallbackElement||null)));let j=t.concat(a.slice(0,g+1)),k=()=>{let _;return v?_=w:b?_=S:m.route.Component?_=x.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=h,x.createElement(RQ,{match:m,routeContext:{outlet:h,matches:j,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?x.createElement(IF,{location:r.location,revalidation:r.revalidation,component:w,error:v,children:k(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:d}):k()},null)}function DN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function LQ(e){let t=x.useContext(ic);return mn(t,DN(e)),t}function zQ(e){let t=x.useContext(Rg);return mn(t,DN(e)),t}function $Q(e){let t=x.useContext(gi);return mn(t,DN(e)),t}function RN(e){let t=$Q(e),n=t.matches[t.matches.length-1];return mn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qQ(){return RN("useRouteId")}function BQ(){var r;let e=x.useContext(PN),t=zQ("useRouteError"),n=RN("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function FQ(){let{router:e}=LQ("useNavigate"),t=RN("useNavigate"),n=x.useRef(!1);return PF(()=>{n.current=!0}),x.useCallback(async(a,i={})=>{Ia(n.current,MF),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var qP={};function LF(e,t,n){!t&&!qP[e]&&(qP[e]=!0,Ia(!1,n))}x.memo(HQ);function HQ({routes:e,future:t,state:n,isStatic:r,onError:a}){return RF(e,void 0,{state:n,isStatic:r,onError:a})}function up(e){mn(!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 UQ({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){mn(!Af(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[l,a,i,s]);typeof n=="string"&&(n=ac(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:v="default",unstable_mask:b}=n,w=x.useMemo(()=>{let S=Ji(d,l);return S==null?null:{location:{pathname:S,search:h,hash:m,state:g,key:v,unstable_mask:b},navigationType:r}},[l,d,h,m,g,v,r,b]);return Ia(w!=null,`<Router basename="${l}"> 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.`),w==null?null:x.createElement(ya.Provider,{value:c},x.createElement(Ef.Provider,{children:t,value:w}))}function GQ({children:e,location:t}){return OQ(nC(e),t)}function nC(e,t=[]){let n=[];return x.Children.forEach(e,(r,a)=>{if(!x.isValidElement(r))return;let i=[...t,a];if(r.type===x.Fragment){n.push.apply(n,nC(r.props.children,i));return}mn(r.type===up,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=nC(r.props.children,i)),n.push(s)}),n}var cp="get",dp="application/x-www-form-urlencoded";function Lg(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function VQ(e){return Lg(e)&&e.tagName.toLowerCase()==="button"}function KQ(e){return Lg(e)&&e.tagName.toLowerCase()==="form"}function YQ(e){return Lg(e)&&e.tagName.toLowerCase()==="input"}function WQ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function XQ(e,t){return e.button===0&&(!t||t==="_self")&&!WQ(e)}function rC(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function ZQ(e,t){let n=rC(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var Cm=null;function QQ(){if(Cm===null)try{new FormData(document.createElement("form"),0),Cm=!1}catch{Cm=!0}return Cm}var JQ=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function C0(e){return e!=null&&!JQ.has(e)?(Ia(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dp}"`),null):e}function eJ(e,t){let n,r,a,i,s;if(KQ(e)){let l=e.getAttribute("action");r=l?Ji(l,t):null,n=e.getAttribute("method")||cp,a=C0(e.getAttribute("enctype"))||dp,i=new FormData(e)}else if(VQ(e)||YQ(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?Ji(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||cp,a=C0(e.getAttribute("formenctype"))||C0(l.getAttribute("enctype"))||dp,i=new FormData(l,e),!QQ()){let{name:d,type:h,value:m}=e;if(h==="image"){let g=d?`${d}.`:"";i.append(`${g}x`,"0"),i.append(`${g}y`,"0")}else d&&i.append(d,m)}}else{if(Lg(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=cp,r=null,a=dp,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function IN(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function tJ(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Ji(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function nJ(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rJ(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 aJ(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await nJ(i,n);return s.links?s.links():[]}return[]}));return lJ(r.flat(1).filter(rJ).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function BP(e,t,n,r,a,i){let s=(c,d)=>n[d]?c.route.id!==n[d].route.id:!0,l=(c,d)=>{var h;return n[d].pathname!==c.pathname||((h=n[d].route.path)==null?void 0:h.endsWith("*"))&&n[d].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,d)=>s(c,d)||l(c,d)):i==="data"?t.filter((c,d)=>{var m;let h=r.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(s(c,d)||l(c,d))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function iJ(e,t,{includeHydrateFallback:n}={}){return sJ(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function sJ(e){return[...new Set(e)]}function oJ(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function lJ(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(oJ(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function zF(){let e=x.useContext(ic);return IN(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function uJ(){let e=x.useContext(Rg);return IN(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var LN=x.createContext(void 0);LN.displayName="FrameworkContext";function $F(){let e=x.useContext(LN);return IN(e,"You must render this element inside a <HydratedRouter> element"),e}function cJ(e,t){let n=x.useContext(LN),[r,a]=x.useState(!1),[i,s]=x.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:h,onTouchStart:m}=t,g=x.useRef(null);x.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let w=j=>{j.forEach(k=>{s(k.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return g.current&&S.observe(g.current),()=>{S.disconnect()}}},[e]),x.useEffect(()=>{if(r){let w=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(w)}}},[r]);let v=()=>{a(!0)},b=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,g,{}]:[i,g,{onFocus:pd(l,v),onBlur:pd(c,b),onMouseEnter:pd(d,v),onMouseLeave:pd(h,b),onTouchStart:pd(m,v)}]:[!1,g,{}]}function pd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function dJ({page:e,...t}){let{router:n}=zF(),r=x.useMemo(()=>jF(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?x.createElement(hJ,{page:e,matches:r,...t}):null}function fJ(e){let{manifest:t,routeModules:n}=$F(),[r,a]=x.useState([]);return x.useEffect(()=>{let i=!1;return aJ(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function hJ({page:e,matches:t,...n}){let r=vi(),{future:a,manifest:i,routeModules:s}=$F(),{basename:l}=zF(),{loaderData:c,matches:d}=uJ(),h=x.useMemo(()=>BP(e,t,d,i,r,"data"),[e,t,d,i,r]),m=x.useMemo(()=>BP(e,t,d,i,r,"assets"),[e,t,d,i,r]),g=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(t.forEach(k=>{var E;let _=i.routes[k.route.id];!_||!_.hasLoader||(!h.some(T=>T.route.id===k.route.id)&&k.route.id in c&&((E=s[k.route.id])!=null&&E.shouldRevalidate)||_.hasClientLoader?S=!0:w.add(k.route.id))}),w.size===0)return[];let j=tJ(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&j.searchParams.set("_routes",t.filter(k=>w.has(k.route.id)).map(k=>k.route.id).join(",")),[j.pathname+j.search]},[l,a.unstable_trailingSlashAwareDataRequests,c,r,i,h,t,e,s]),v=x.useMemo(()=>iJ(m,i),[m,i]),b=fJ(m);return x.createElement(x.Fragment,null,g.map(w=>x.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>x.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:S})=>x.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function mJ(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var pJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pJ&&(window.__reactRouterVersion="7.13.2")}catch{}function gJ({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=x.useRef();a.current==null&&(a.current=WZ({window:r,v5Compat:!0}));let i=a.current,[s,l]=x.useState({action:i.action,location:i.location}),c=x.useCallback(d=>{n===!1?l(d):x.startTransition(()=>l(d))},[n]);return x.useLayoutEffect(()=>i.listen(c),[i,c]),x.createElement(UQ,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n})}var qF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ki=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,unstable_mask:l,state:c,target:d,to:h,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:v,...b},w){let{basename:S,navigator:j,unstable_useTransitions:k}=x.useContext(ya),_=typeof h=="string"&&qF.test(h),E=EF(h,S);h=E.to;let T=AQ(h,{relative:a}),A=vi(),O=null;if(l){let I=MN(l,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);S!=="/"&&(I.pathname=I.pathname==="/"?S:oi([S,I.pathname])),O=j.createHref(I)}let[D,P,M]=cJ(r,b),z=bJ(h,{replace:s,unstable_mask:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:k});function L(I){t&&t(I),I.defaultPrevented||z(I)}let F=!(E.isExternal||i),R=x.createElement("a",{...b,...M,href:(F?O:void 0)||E.absoluteURL||T,onClick:F?L:t,ref:mJ(w,P),target:d,"data-discover":!_&&n==="render"?"true":void 0});return D&&!_?x.createElement(x.Fragment,null,R,x.createElement(dJ,{page:T})):R});Ki.displayName="Link";var vJ=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:l,children:c,...d},h){let m=Tf(s,{relative:d.relative}),g=vi(),v=x.useContext(Rg),{navigator:b,basename:w}=x.useContext(ya),S=v!=null&&CJ(m)&&l===!0,j=b.encodeLocation?b.encodeLocation(m).pathname:m.pathname,k=g.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(k=k.toLowerCase(),_=_?_.toLowerCase():null,j=j.toLowerCase()),_&&w&&(_=Ji(_,w)||_);const E=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let T=k===j||!a&&k.startsWith(j)&&k.charAt(E)==="/",A=_!=null&&(_===j||!a&&_.startsWith(j)&&_.charAt(j.length)==="/"),O={isActive:T,isPending:A,isTransitioning:S},D=T?t:void 0,P;typeof r=="function"?P=r(O):P=[r,T?"active":null,A?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(O):i;return x.createElement(Ki,{...d,"aria-current":D,className:P,ref:h,style:M,to:s,viewTransition:l},typeof c=="function"?c(O):c)});vJ.displayName="NavLink";var yJ=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=cp,action:l,onSubmit:c,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,...v},b)=>{let{unstable_useTransitions:w}=x.useContext(ya),S=_J(),j=kJ(l,{relative:d}),k=s.toLowerCase()==="get"?"get":"post",_=typeof l=="string"&&qF.test(l),E=T=>{if(c&&c(T),T.defaultPrevented)return;T.preventDefault();let A=T.nativeEvent.submitter,O=(A==null?void 0:A.getAttribute("formmethod"))||s,D=()=>S(A||T.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g});w&&n!==!1?x.startTransition(()=>D()):D()};return x.createElement("form",{ref:b,method:k,action:j,onSubmit:r?c:E,...v,"data-discover":!_&&e==="render"?"true":void 0})});yJ.displayName="Form";function xJ(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function BF(e){let t=x.useContext(ic);return mn(t,xJ(e)),t}function bJ(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:d}={}){let h=Ig(),m=vi(),g=Tf(e,{relative:s});return x.useCallback(v=>{if(XQ(v,t)){v.preventDefault();let b=n!==void 0?n:Zd(m)===Zd(g),w=()=>h(e,{replace:b,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});d?x.startTransition(()=>w()):w()}},[m,h,g,n,r,a,t,e,i,s,l,c,d])}function wJ(e){Ia(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=x.useRef(rC(e)),n=x.useRef(!1),r=vi(),a=x.useMemo(()=>ZQ(r.search,n.current?null:t.current),[r.search]),i=Ig(),s=x.useCallback((l,c)=>{const d=rC(typeof l=="function"?l(new URLSearchParams(a)):l);n.current=!0,i("?"+d,c)},[i,a]);return[a,s]}var SJ=0,jJ=()=>`__${String(++SJ)}__`;function _J(){let{router:e}=BF("useSubmit"),{basename:t}=x.useContext(ya),n=qQ(),r=e.fetch,a=e.navigate;return x.useCallback(async(i,s={})=>{let{action:l,method:c,encType:d,formData:h,body:m}=eJ(i,t);if(s.navigate===!1){let g=s.fetcherKey||jJ();await r(g,n,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||c,formEncType:s.encType||d,flushSync:s.flushSync})}else await a(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||c,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function kJ(e,{relative:t}={}){let{basename:n}=x.useContext(ya),r=x.useContext(gi);mn(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...Tf(e||".",{relative:t})},s=vi();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let h=l.toString();i.search=h?`?${h}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:oi([n,i.pathname])),Zd(i)}function CJ(e,{relative:t}={}){let n=x.useContext(TF);mn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=BF("useViewTransitionState"),a=Tf(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ji(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ji(n.nextLocation.pathname,r)||n.nextLocation.pathname;return kp(a.pathname,s)!=null||kp(a.pathname,i)!=null}var vl=SF();class FP extends Error{constructor(t,n){super(n),this.status=t}}async function zg(e,t,n){const r={method:e,credentials:"include",headers:{"Content-Type":"application/json"}};n!==void 0&&(r.body=JSON.stringify(n));const a=await fetch(t,r);if(a.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new FP(401,"Unauthorized");if(!a.ok){const i=await a.text().catch(()=>a.statusText);let s=i;try{const l=JSON.parse(i);l.error&&(s=l.error)}catch{}throw new FP(a.status,s)}if(a.status!==204)return a.json()}function mt(e){return zg("GET",e)}function qe(e,t){return zg("POST",e,t)}function oo(e,t){return zg("PUT",e,t)}function $a(e){return zg("DELETE",e)}function NJ(e){return qe("/api/auth/login",{password:e})}function EJ(){return qe("/api/auth/logout")}function AJ(){return mt("/api/auth/status")}function TJ(){const[e,t]=x.useState(!1),[n,r]=x.useState(!0),[a,i]=x.useState(!0);x.useEffect(()=>{AJ().then(c=>{t(c.authenticated),r(c.authRequired)}).catch(()=>t(!1)).finally(()=>i(!1))},[]),x.useEffect(()=>{const c=()=>t(!1);return window.addEventListener("auth:unauthorized",c),()=>window.removeEventListener("auth:unauthorized",c)},[]);const s=x.useCallback(async c=>{await NJ(c),t(!0)},[]),l=x.useCallback(async()=>{await EJ(),t(!1)},[]);return{authenticated:e,authRequired:n,loading:a,login:s,logout:l}}function OJ(e){const[t,n]=x.useState(!1),r=x.useRef(null),a=x.useRef(new Set),i=x.useRef(void 0),s=x.useRef(0),l=x.useCallback(()=>{if(!e)return;const m=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,g=new WebSocket(m);r.current=g,g.onopen=()=>{n(!0),s.current=0},g.onmessage=v=>{try{const b=JSON.parse(v.data);a.current.forEach(w=>w(b))}catch{}},g.onclose=()=>{n(!1),r.current=null;const v=Math.min(1e3*2**s.current,3e4);s.current++,i.current=setTimeout(l,v)},g.onerror=()=>{g.close()}},[e]);x.useEffect(()=>(l(),()=>{i.current&&clearTimeout(i.current),r.current&&r.current.close()}),[l]);const c=x.useCallback(h=>(a.current.add(h),()=>{a.current.delete(h)}),[]),d=x.useCallback(h=>{r.current&&r.current.readyState===WebSocket.OPEN&&r.current.send(JSON.stringify(h))},[]);return{connected:t,onEvent:c,sendMessage:d}}const zN=new Map;function Nm(e){zN.set(e.id,e)}function aC(){return Array.from(zN.values())}function HP(e){return aC().filter(t=>t.hasTab&&t.isEnabled(e))}function MJ(){const e={},t={};for(const n of zN.values())Object.assign(e,n.translations.en),Object.assign(t,n.translations.ko);return{en:e,ko:t}}const PJ={en:{"login.title":"CLITrigger","login.subtitle":"Authentication Required","login.password":"Enter password","login.submit":"Sign In","login.loading":"Authenticating...","login.error":"Access denied. Please try again.","login.footer":"Secure Access","login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"sidebar.home":"Home","sidebar.workspaces":"Workspaces","projects.title":"All Projects","projects.subtitle":"Project Console","projects.new":"New Project","projects.logout":"Sign Out","projects.loading":"Loading projects...","projects.empty":"No projects yet","projects.emptyHint":"Create your first project to get started.","projects.tasks":"tasks","projects.active":"active","projects.done":"done","projects.search":"Search projects...","projects.delete":"Delete project","projects.deleteConfirm":"Are you sure you want to delete this project?","projects.pathMissing":"Path not found","projects.pathMissingConfirm":"The local folder for this project no longer exists. Delete it?","projects.noGit":"No Git","detail.back":"Projects","detail.loading":"Loading...","detail.notFound":"Project not found","detail.backToProjects":"Back to Projects","detail.live":"Connected","header.branch":"Branch","header.editName":"Click to rename project","header.openFolder":"Open folder","header.workers":"Workers","header.model":"Model","header.settings":"Settings","header.runAll":"Run All","header.stopAll":"Stop All","header.config":"Project Settings","header.maxWorkers":"Max Workers","settings.defaultMaxTurns":"Default Max Turns","settings.defaultMaxTurnsHint":"Default turn limit per task. Tasks can override individually.","header.cliTool":"CLI Tool","header.aiModel":"AI Model","header.cliFlags":"CLI Flags","header.cancel":"Cancel","header.save":"Save","header.saving":"Saving...","header.noGit":"No Git","header.noGitHint":'This project is not a git repository. Tasks will run directly without worktree isolation. Run "git init" in the project path, then re-check.',"header.recheckGit":"Re-check Git Status","header.fallbackChainTitle":"CLI Fallback Chain","header.fallbackChainHint":"When a CLI tool runs out of context, automatically switch to the next tool in the chain.","header.sandboxTitle":"Sandbox Mode","header.sandboxBadgeStrict":"Sandbox: Strict","header.sandboxBadgePermissive":"Sandbox: Permissive","header.sandboxStrict":"Strict (Recommended)","header.sandboxStrictDesc":"CLI tools can only access files within the worktree directory.","header.sandboxPermissive":"Permissive","header.sandboxPermissiveDesc":"CLI tools can access any file on the system.","header.sandboxWarning":"Warning: In permissive mode, CLI tools can access files outside the worktree. Use with caution.","header.worktreeTitle":"Worktree Isolation","header.worktreeEnabled":"Worktree (Recommended)","header.worktreeEnabledDesc":"Each task runs in its own branch. Safe for parallel tasks.","header.worktreeDisabled":"Direct (Main Branch)","header.worktreeDisabledDesc":"Tasks run on the main branch. Max workers forced to 1.","header.worktreeWarning":"Warning: Tasks will modify the main branch directly. Concurrent execution is disabled.","header.noWorktreeBadge":"No Worktree","header.debugBadge":"Debug Logs","header.showTokenUsageTitle":"Token Usage Display","header.showTokenUsageDesc":"Show token usage (input/output) after task completion.","header.showTokenUsageEnable":"Show token usage","header.debugLoggingTitle":"Debug Logging","header.debugLoggingDesc":"Save full CLI input/output to .debug-logs/ for each task execution.","header.debugLoggingEnable":"Enable debug log files","header.gstackTitle":"gstack Skills","header.gstackEnabled":"Enable gstack skill injection","header.gstackCredit":"Powered by gstack (MIT License, Garry Tan)","header.usageLimit":"Usage","header.cliNotInstalled":"{tool} is not installed","header.cliInstalled":"Installed","header.cliNotFound":"Not installed","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.gemini":"npm install -g @anthropic-ai/gemini-cli","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"Re-check","header.gstackClaudeOnly":"gstack skills are only available with Claude CLI.","header.modelSettings":"AI Model Settings","header.modelValue":"Model ID","header.modelLabel":"Display Name","header.addModel":"Add","header.modelSettingsHint":"Add custom models here. They will appear in model dropdowns across all projects.","header.modelDeprecated":"deprecated","header.modelDeprecatedWarning":"This model is no longer supported by the installed CLI. It will fall back to the default at execution time.","header.modelDeprecatedTitle":"Model marked as deprecated","header.modelDeprecatedReason":"The installed CLI no longer reports this model in --help, and it is not listed in the bundled model registry. At execution time it will silently fall back to the CLI default.","header.modelDeprecatedFixHeading":"How to fix","header.modelDeprecatedFix1":"Pick a currently-supported model in project settings → Config.","header.modelDeprecatedFix2":"Or upgrade the CLI so it reports this model again.","header.modelDeprecatedFix3":"Or add it as a custom model in AI Model Settings if you know it is still valid.","header.modelDeprecatedOpenSettings":"Open settings","header.jiraTitle":"Jira Integration","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://yoursite.atlassian.net","header.jiraEmail":"Email","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API Token","header.jiraApiTokenPlaceholder":"Atlassian API token","header.jiraProjectKey":"Project Key","header.jiraProjectKeyPlaceholder":"e.g. PROJ","header.jiraTestConnection":"Test Connection","header.jiraTesting":"Testing...","header.jiraConnected":"Connected","header.jiraFailed":"Connection failed","header.jiraTokenHint":"Generate at id.atlassian.com > Security > API tokens","form.newProject":"New Project","form.projectName":"Project Name","form.folderPath":"Folder Path","form.cancel":"Cancel","form.create":"Create","browse.title":"Browse Folder","browse.select":"Select","browse.loading":"Loading...","browse.error":"Failed to load directory","browse.empty":"No folders found","todos.title":"Tasks","todos.add":"Add Task","todos.empty":"No tasks yet","todos.emptyHint":"Add a task to begin.","todos.merge":"Merge","todos.filterAll":"All","todos.filterActive":"In Progress","todos.filterCompleted":"Completed","todos.filterCancelled":"Cancelled","todos.filterEmpty":"No tasks in this filter.","todos.stackModeOn":"Stack mode on — click ✕ to disable","todos.stackModeOff":"Enable stack mode (iOS-style collapse)","todos.collapseStack":"Collapse to stack","todos.expandStack":"Click to expand","todo.description":"Description","todo.noDescription":"No description provided.","todo.attachedImages":"Attached Images","todo.branch":"Branch","todo.path":"Path","todo.worktree":"Worktree","todo.result":"Result","todo.mergeFailed":"Merge failed","todo.diffError":"Diff error","todo.diffOutput":"Changes","todo.files":"files","todo.systemLog":"Activity Log","todo.start":"Start","todo.startHeadless":"Headless","todo.startHeadlessDesc":"Runs autonomously. All permissions auto-approved. No user input needed.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"Keeps stdin open so you can send messages during execution.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"Auto-approved + full raw log output in real-time.","todo.sendPlaceholder":"Type a message...","todo.startWithDependency":"Start parent task first","todo.stop":"Stop","todo.viewDiff":"View Diff","todo.hideDiff":"Hide Diff","todo.viewDebugLog":"Debug Log","todo.merge":"Merge","todo.mergeChain":"Merge Chain","todo.mergeChainDesc":"Merge all tasks in this chain to main branch","todo.chainComplete":"Chain Complete","todo.chainTasks":"{count} tasks","todo.edit":"Edit","todo.delete":"Delete","todo.cleanup":"Clean up worktree","todo.cleanupFailed":"Cleanup failed","cleanup.confirmDeleteBranch":`Worktree will be removed. Also delete branch "{name}"?
61
+
62
+ OK = delete worktree + branch
63
+ Cancel = delete worktree only`,"todo.retry":"Retry","todo.retryDesc":"Cleans up previous worktree, clears logs, and re-runs from scratch.","todo.retryFailed":"Retry failed","todo.continue":"Continue","todo.continueDesc":"Run a follow-up prompt in the same worktree, preserving prior work.","todo.continuing":"Continuing...","todo.confirmContinue":"Run follow-up","todo.continuePromptLabel":"Follow-up prompt","todo.continuePromptPlaceholder":"Describe the next step or fix to apply in this worktree...","todo.continuePromptRequired":"Follow-up prompt is required.","todo.roundLabel":"round","todo.dependsOn":"Depends on","todo.mergedFrom":"Inherited from","todo.transferredTo":"Transferred to","todo.schedule":"Schedule","todo.scheduleDesc":"Convert this task into a one-time scheduled run.","todo.scheduleAt":"Run at","todo.scheduling":"Scheduling...","todo.confirmSchedule":"Schedule","todo.scheduleKeepOriginal":"Keep original task","todo.scheduleOnReset":"Run on Reset","todo.scheduleOnResetDesc":"Auto-run a new task when the rate limit resets.","todo.scheduleOnResetLabel":"Rate limit resets at","todo.resetPromptPlaceholder":"Enter the prompt to run after rate limit resets...","todo.confirmResetSchedule":"Schedule on Reset","todoForm.titlePlaceholder":"Task title...","todoForm.descPlaceholder":"Description (optional)...","todoForm.cliTool":"CLI Tool","todoForm.aiModel":"AI Model","todoForm.addImage":"Add Image","todoForm.pasteHint":"Ctrl+V to paste image","todoForm.images":"Images","todoForm.maxTurns":"Max Turns","todoForm.maxTurnsPlaceholder":"No limit","todoForm.maxTurnsHint":"Limit the number of agentic turns to prevent excessive token usage.","todoForm.dependsOn":"Depends On","todoForm.noDependency":"None (independent task)","todoForm.dependsOnHint":"This task will wait for the dependency to complete, then squash merge its changes into a new branch.","todoForm.worktreeMode":"Execution Branch","todoForm.worktreeInherit":"Follow project setting","todoForm.worktreeForceOn":"Use worktree (isolated branch)","todoForm.worktreeForceOff":"Run on main branch","todoForm.worktreeProjectDefaultOn":"Project default: worktree","todoForm.worktreeProjectDefaultOff":"Project default: main branch","todoForm.worktreeMainWarning":"Running on main branch blocks other todos from running concurrently.","todoForm.cancel":"Cancel","todoForm.save":"Save","dnd.dropHint":"Run after this task","dnd.removeDep":"Remove dependency","dnd.dropToRemoveDep":"Drop here to remove dependency","dnd.cyclicWarning":"Cannot link: circular dependency","graph.autoLayout":"Auto Layout","graph.listView":"List View","graph.graphView":"Graph View","status.pending":"Idle","status.running":"Running","status.completed":"Done","status.failed":"Failed","status.stopped":"Stopped","status.merged":"Merged","progress.complete":"complete","progress.done":"Done","progress.live":"Running","progress.idle":"Idle","progress.fail":"Failed","progress.stop":"Stopped","progress.merged":"Merged","failure.title":"Failure Reason","failure.exitCode":"Exit code","failure.fix":"Fix This: Creates a new task that analyzes the failure and attempts to fix the issue.","failure.fixPrefix":"[Fix] ","result.duration":"Duration","result.commits":"commits","result.filesChanged":"files changed","result.commitHistory":"Commit History","result.changedFiles":"Changed Files","result.tokenUsage":"Token Usage","result.inputTokens":"input","result.outputTokens":"output","result.totalCost":"Cost","result.cacheTokens":"cache","result.turns":"turns","result.contextUsed":"ctx","result.levelLight":"Light","result.levelModerate":"Moderate","result.levelHigh":"High","result.levelHeavy":"Heavy","log.awaiting":"Awaiting output...","log.waitingResponse":"Waiting for response...","log.noChanges":"No changes detected.","log.copy":"Copy","log.copied":"Copied!","log.viewChat":"Chat","log.viewRaw":"Raw","schedules.title":"Schedules","schedules.add":"New Schedule","schedules.empty":"No schedules yet","schedules.emptyHint":"Create a schedule to automate recurring tasks.","schedule.type":"Schedule Type","schedule.recurring":"Recurring","schedule.once":"One-time","schedule.runAtLabel":"Run at","schedule.cronExpression":"Frequency","schedule.cronHint":"e.g. */30 * * * * (every 30min), 0 9 * * * (daily 9am), 0 9 * * 1-5 (weekdays 9am)","cron.everyMinutes":"Minutes","cron.hourly":"Hourly","cron.daily":"Daily","cron.weekly":"Weekly","cron.monthly":"Monthly","cron.custom":"Custom","cron.every":"Every","cron.minutesLabel":"minutes","cron.everyHourAt":"Every hour at","cron.minutesPast":"min past","cron.everyDayAt":"Every day at","cron.at":"at","cron.everyMonthOn":"Every month on day","cron.dayAt":"at","cron.expression":"Cron","cron.mon":"Mon","cron.tue":"Tue","cron.wed":"Wed","cron.thu":"Thu","cron.fri":"Fri","cron.sat":"Sat","cron.sun":"Sun","schedule.skipIfRunning":"Skip if previous run still active","schedule.active":"Active","schedule.paused":"Paused","schedule.lastRun":"Last run","schedule.never":"Never","schedule.trigger":"Run Now","schedule.activate":"Activate","schedule.pause":"Pause","schedule.edit":"Edit","schedule.delete":"Delete","schedule.runs":"Run History","schedule.runTriggered":"Triggered","schedule.runSkipped":"Skipped","schedule.runCompleted":"Completed","schedule.runFailed":"Failed","schedule.noRuns":"No runs yet","scheduleForm.titlePlaceholder":"Schedule title...","scheduleForm.descPlaceholder":"Task description template...","scheduleForm.cliTool":"CLI Tool","scheduleForm.aiModel":"AI Model","scheduleForm.cancel":"Cancel","scheduleForm.save":"Save","jira.title":"Jira Issues","jira.search":"Search issues...","jira.allStatuses":"All Statuses","jira.refresh":"Refresh","jira.import":"Import as Task","jira.importing":"Importing...","jira.imported":"Imported!","jira.noIssues":"No issues found","jira.noIssuesHint":"Try changing the filter or search query.","jira.loadMore":"Load More","jira.total":"total","jira.transition":"Change Status","jira.comment":"Comment","jira.commentPlaceholder":"Add a comment...","jira.commentSend":"Send","jira.createIssue":"Create Issue","jira.createSummary":"Summary","jira.createDesc":"Description","jira.createType":"Issue Type","jira.creating":"Creating...","jira.notConfigured":"Jira is not configured. Enable it in project settings.","jira.assignee":"Assignee","jira.unassigned":"Unassigned","jira.updated":"Updated","notion.title":"Notion Pages","notion.search":"Search pages...","notion.refresh":"Refresh","notion.import":"Import as Task","notion.importing":"Importing...","notion.imported":"Imported!","notion.noPages":"No pages found","notion.noPagesHint":"Try changing the search query.","notion.loadMore":"Load More","notion.createPage":"Create Page","notion.pageTitle":"Title","notion.creating":"Creating...","notion.notConfigured":"Notion is not configured. Enable it in project settings.","notion.loadingContent":"Loading content...","notion.noContent":"No content","header.notionTitle":"Notion Integration","header.notionApiKey":"Integration Token","header.notionApiKeyPlaceholder":"ntn_...","header.notionDatabaseId":"Database ID","header.notionDatabaseIdPlaceholder":"e.g. abc123def456...","header.notionTestConnection":"Test Connection","header.notionTesting":"Testing...","header.notionConnected":"Connected","header.notionFailed":"Connection failed","header.notionTokenHint":"Create an integration at notion.so/my-integrations and share the database with it","github.title":"GitHub Issues","github.search":"Search issues...","github.refresh":"Refresh","github.import":"Import as Task","github.importing":"Importing...","github.imported":"Imported!","github.noIssues":"No issues found","github.noIssuesHint":"Try changing the filter or search query.","github.loadMore":"Load More","github.createIssue":"Create Issue","github.issueTitle":"Title","github.issueBody":"Description","github.creating":"Creating...","github.notConfigured":"GitHub is not configured. Enable it in project settings.","github.loadingComments":"Loading comments...","github.comments":"Comments","github.noBody":"No description provided.","github.open":"Open","github.closed":"Closed","github.all":"All","header.githubTitle":"GitHub Integration","header.githubToken":"Personal Access Token","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"Repository Owner","header.githubOwnerPlaceholder":"username or org","header.githubRepo":"Repository Name","header.githubRepoPlaceholder":"repo-name","header.githubTestConnection":"Test Connection","header.githubTesting":"Testing...","header.githubConnected":"Connected","header.githubFailed":"Connection failed","header.githubTokenHint":"Create a token at github.com/settings/tokens with repo scope","tabs.tasks":"Auto Tasks","tabs.sessions":"Sessions","tabs.discussions":"Discussions","tabs.schedules":"Schedules","tabs.jira":"Jira","tabs.notion":"Notion","tabs.github":"GitHub","tabs.git":"Git","tabs.planner":"Planner","tabs.analytics":"Analytics","planner.title":"Planner","planner.add":"New Item","planner.empty":"No planner items yet","planner.emptyHint":"Add ideas, tasks, and plans to your planner.","planner.filterTag":"All Tags","planner.filterStatus":"All Statuses","planner.col.title":"Title","planner.col.tags":"Tags","planner.col.dueDate":"Due Date","planner.col.status":"Status","planner.col.actions":"","planner.edit":"Edit","planner.delete":"Delete","planner.deleteConfirm":"Delete this planner item?","planner.convertToTask":"Convert to Task","planner.convertToSchedule":"Convert to Schedule","planner.movedToTodo":"Moved to Tasks","planner.movedToSchedule":"Moved to Schedules","planner.noDueDate":"—","planner.export":"Export","planner.exportTooltip":"Export planner items to a JSON file","planner.exportError":"Export failed","planner.import":"Import","planner.importTooltip":"Import planner items from a JSON file","planner.importSuccess":"Imported {items} item(s) and {tags} tag(s).","planner.importError":"Import failed","planner.importInvalidJson":"File is not valid JSON","planner.importNoImages":"Note: images are not included in exported files.","plannerForm.titlePlaceholder":"Planner item title...","plannerForm.descPlaceholder":"Description or details...","plannerForm.tags":"Tags","plannerForm.tagsPlaceholder":"Type and press Enter","plannerForm.dueDate":"Due Date","plannerForm.priority":"Priority","plannerForm.priorityLow":"Low","plannerForm.priorityNormal":"Normal","plannerForm.priorityHigh":"High","plannerForm.priorityCritical":"Critical","plannerForm.status":"Status","plannerForm.addImage":"Add Image","plannerForm.pasteHint":"Ctrl+V to paste image","plannerForm.images":"Images","plannerForm.cancel":"Cancel","plannerForm.save":"Save","plannerStatus.pending":"Pending","plannerStatus.in_progress":"In Progress","plannerStatus.done":"Done","plannerStatus.moved":"Moved","plannerConvert.toTask":"Convert to Task","plannerConvert.toSchedule":"Convert to Schedule","plannerConvert.cliTool":"CLI Tool","plannerConvert.model":"Model","plannerConvert.maxTurns":"Max Turns","plannerConvert.scheduleType":"Schedule Type","plannerConvert.recurring":"Recurring","plannerConvert.once":"One-time","plannerConvert.cronExpression":"Cron Expression","plannerConvert.runAt":"Run At","plannerConvert.cancel":"Cancel","plannerConvert.convert":"Convert","plannerConvert.projectDefault":"Project Default","plannerTag.selectOrCreate":"Select or create","plannerTag.delete":"Delete","plannerTag.deleteConfirm":"Remove this tag from all items?","plannerTag.color":"Color","plannerTag.rename":"Rename","plannerTag.color.default":"Default","plannerTag.color.gray":"Gray","plannerTag.color.brown":"Brown","plannerTag.color.orange":"Orange","plannerTag.color.yellow":"Yellow","plannerTag.color.green":"Green","plannerTag.color.blue":"Blue","plannerTag.color.purple":"Purple","plannerTag.color.pink":"Pink","plannerTag.color.red":"Red","session.new":"New Session","session.title":"Session Title","session.description":"Initial Prompt (Optional)","session.start":"Start","session.stop":"Stop","session.delete":"Delete","session.empty":"No sessions yet","session.emptyHint":"Start an interactive AI conversation.","session.create":"Create Session","session.cliTool":"CLI Tool","session.model":"Model","session.worktree":"Use worktree (isolated branch)","session.cleanup":"Clean up worktree","analytics.title":"Execution Analytics","analytics.loading":"Loading analytics...","analytics.noData":"No data available","analytics.totalTasks":"Total Tasks","analytics.successRate":"Success Rate","analytics.totalCost":"Total Cost","analytics.totalTokens":"Total Tokens","analytics.avgPerTask":"Avg / Task","analytics.byStatus":"By Status","analytics.byCliTool":"By CLI Tool","analytics.dailyActivity":"Daily Activity","analytics.dailyCost":"Daily Cost","analytics.costBreakdown":"Cost Summary","analytics.tasks":"tasks","analytics.period.7d":"7D","analytics.period.30d":"30D","analytics.period.90d":"90D","analytics.period.all":"All","discussions.title":"Discussions","discussions.add":"New Discussion","discussions.empty":"No discussions yet","discussions.emptyHint":"Create a discussion to have agents collaborate on a feature.","discussions.round":"Round","discussions.maxRounds":"Max Rounds","discussions.agents":"Agents","discussions.speaking":"Speaking...","discussions.inject":"Send Message","discussions.skipTurn":"Skip Turn","discussions.implement":"Start Implementation","discussions.implementHint":"Select an agent to implement the discussed feature.","discussions.selectAgent":"Select Implementer","discussions.notFound":"Discussion not found","discussions.back":"Back to Discussions","discussions.userMessage":"Your message...","discussions.implementation":"Implementation","discussions.resume":"Resume","discussions.retry":"Retry","discussions.failureTitle":"Discussion Failed","discussions.noErrorLogs":"No error details available","discussions.pause":"Pause","discussions.waiting":"Waiting...","discussions.roundExplain":"One round = each agent speaks once.","discussions.autoImplement":"Auto-implement after discussion","discussions.autoImplementHint":"Automatically start implementation when all rounds complete.","discussions.collapse":"Collapse","discussions.expand":"Expand","discussions.collapseAll":"Collapse All","discussions.expandAll":"Expand All","status.skipped":"Skipped","status.paused":"Paused","agents.title":"Agent Personas","agents.add":"Add Agent","agents.name":"Name","agents.role":"Role","agents.systemPrompt":"System Prompt","agents.cliTool":"CLI Tool","agents.cliModel":"Model","agents.color":"Color","agents.empty":"No agents yet. Create agent personas to start a discussion.","agents.manage":"Manage Agents","agents.presets":"Preset Templates","agents.roles.architect":"Architect","agents.roles.developer":"Developer","agents.roles.reviewer":"Reviewer","agents.roles.pm":"Product Manager","agents.roles.tester":"Tester","agents.roles.custom":"Custom","agents.canImplement":"Implement during discussion","agents.canImplementHelp":"When it is this agent's turn, they can write code and commit to the discussion branch — not just talk. Useful for developer-style agents that should demonstrate ideas mid-discussion.","agents.canImplementBadge":"Implementer","git.ahead":"ahead","git.behind":"behind","git.staged":"Staged","git.unstaged":"Unstaged","git.noChanges":"Working tree clean","git.refresh":"Refresh","git.files":"files","git.commitHistory":"Commit History","git.branches":"Branches","git.remotes":"Remotes","git.tags":"Tags","git.stashes":"Stashes","git.noCommits":"No commits yet","git.loadMore":"Loading more...","git.author":"Author","git.hash":"Hash","git.graph":"Graph","git.description":"Description","git.date":"Date","git.commit":"Commit","git.pull":"Pull","git.push":"Push","git.fetch":"Fetch","git.branch":"Branch","git.merge":"Merge","git.stash":"Stash","git.discard":"Discard","git.tag":"Tag","git.untracked":"Untracked","git.fileStatus":"File Status","git.stageAll":"Stage All","git.unstageAll":"Unstage All","git.stage":"Stage","git.unstage":"Unstage","git.commitMessage":"Commit message...","git.branchName":"Branch name...","git.tagName":"Tag name...","git.tagMessage":"Tag message (optional)...","git.stashMessage":"Stash message (optional)...","git.selectBranch":"Select branch...","git.discardAll":"Discard All","git.confirmDiscard":"Discard all changes? This cannot be undone.","git.confirmDiscardFile":"Discard changes to this file?","git.newBranch":"New Branch","git.deleteBranch":"Delete Branch","git.stashPop":"Pop","git.noStashes":"No stashes","git.actions":"Actions","git.close":"Close","git.create":"Create","git.delete":"Delete","git.modified":"Modified","git.added":"Added","git.deleted":"Deleted","git.renamed":"Renamed","git.copied":"Copied","git.checkout":"Checkout","git.mergeInto":"Merge into current branch","git.rebaseOnto":"Rebase current onto","git.renameBranch":"Rename branch","git.confirmDelete":"Delete branch {name}?","git.newBranchName":"New branch name...","git.rename":"Rename","git.checkoutRemote":"Checkout as local branch","git.commitDetail":"Commit Detail","git.changedFiles":"Changed Files","git.selectFileToViewDiff":"Select a file to view diff","git.noFilesChanged":"No files changed","git.loadingFiles":"Loading files...","git.loadingDiff":"Loading diff...","git.worktrees":"Worktrees","git.cleanupWorktree":"Cleanup","git.confirmCleanupWorktree":"Remove worktree and branch {name}?","lang.toggle":"KO","theme.light":"Light","theme.dark":"Dark","notification.taskCompleted":"Task Completed","notification.taskFailed":"Task Failed","notification.discussionCompleted":"Discussion Completed","notification.discussionFailed":"Discussion Failed","notification.toggle":"Toggle notifications","notification.blocked":"Notifications blocked by browser"},ko:{"login.title":"CLITrigger","login.subtitle":"인증이 필요합니다","login.password":"비밀번호 입력","login.submit":"로그인","login.loading":"인증 중...","login.error":"접근이 거부되었습니다. 다시 시도해주세요.","login.footer":"보안 접속","login.disclaimer":'This software is provided "as is" without any warranties. Users are solely responsible for all actions taken using this tool, including any costs incurred from AI CLI usage, data loss, or unintended code changes. The developers assume no liability for any direct, indirect, or consequential damages arising from use.',"sidebar.home":"홈","sidebar.workspaces":"워크스페이스","projects.title":"전체 프로젝트","projects.subtitle":"프로젝트 콘솔","projects.new":"새 프로젝트","projects.logout":"로그아웃","projects.loading":"프로젝트 로딩 중...","projects.empty":"프로젝트가 없습니다","projects.emptyHint":"첫 번째 프로젝트를 만들어보세요.","projects.tasks":"작업","projects.active":"실행 중","projects.done":"완료","projects.search":"프로젝트 검색...","projects.delete":"프로젝트 삭제","projects.deleteConfirm":"이 프로젝트를 삭제하시겠습니까?","projects.pathMissing":"경로 없음","projects.pathMissingConfirm":"이 프로젝트의 로컬 폴더가 존재하지 않습니다. 삭제하시겠습니까?","projects.noGit":"Git 없음","detail.back":"프로젝트","detail.loading":"로딩 중...","detail.notFound":"프로젝트를 찾을 수 없습니다","detail.backToProjects":"프로젝트 목록으로","detail.live":"연결됨","header.branch":"브랜치","header.editName":"클릭하여 프로젝트 이름 변경","header.openFolder":"폴더 열기","header.workers":"워커","header.model":"모델","header.settings":"설정","header.runAll":"전체 실행","header.stopAll":"전체 중지","header.config":"프로젝트 설정","header.maxWorkers":"최대 워커 수","settings.defaultMaxTurns":"기본 턴 제한","settings.defaultMaxTurnsHint":"작업별 기본 턴 제한. 개별 작업에서 재설정 가능.","header.cliTool":"CLI 도구","header.aiModel":"AI 모델","header.cliFlags":"CLI 플래그","header.cancel":"취소","header.save":"저장","header.saving":"저장 중...","header.noGit":"Git 없음","header.noGitHint":'이 프로젝트는 Git 저장소가 아닙니다. 작업은 워크트리 격리 없이 직접 실행됩니다. 프로젝트 경로에서 "git init" 실행 후 재확인하세요.',"header.recheckGit":"Git 상태 재확인","header.fallbackChainTitle":"CLI 폴백 체인","header.fallbackChainHint":"CLI 도구의 컨텍스트가 소진되면 체인의 다음 도구로 자동 전환합니다.","header.sandboxTitle":"샌드박스 모드","header.sandboxBadgeStrict":"샌드박스: 엄격","header.sandboxBadgePermissive":"샌드박스: 허용","header.sandboxStrict":"엄격 (권장)","header.sandboxStrictDesc":"CLI 도구가 워크트리 디렉토리 내 파일만 접근할 수 있습니다.","header.sandboxPermissive":"허용","header.sandboxPermissiveDesc":"CLI 도구가 시스템의 모든 파일에 접근할 수 있습니다.","header.sandboxWarning":"경고: 허용 모드에서는 CLI 도구가 워크트리 밖 파일에도 접근할 수 있습니다. 주의해서 사용하세요.","header.worktreeTitle":"워크트리 격리","header.worktreeEnabled":"워크트리 (권장)","header.worktreeEnabledDesc":"각 작업이 독립 브랜치에서 실행됩니다. 병렬 작업에 안전합니다.","header.worktreeDisabled":"직접 실행 (메인 브랜치)","header.worktreeDisabledDesc":"메인 브랜치에서 직접 실행합니다. 최대 워커 1개로 제한됩니다.","header.worktreeWarning":"경고: 메인 브랜치를 직접 수정합니다. 동시 실행이 비활성화됩니다.","header.noWorktreeBadge":"워크트리 없음","header.debugBadge":"디버그 로그","header.showTokenUsageTitle":"토큰 사용량 표시","header.showTokenUsageDesc":"작업 완료 후 토큰 사용량(입력/출력)을 표시합니다.","header.showTokenUsageEnable":"토큰 사용량 표시","header.debugLoggingTitle":"디버그 로깅","header.debugLoggingDesc":"각 태스크 실행 시 CLI 입출력 전체를 .debug-logs/ 파일로 저장합니다.","header.debugLoggingEnable":"디버그 로그 파일 활성화","header.gstackTitle":"gstack 스킬","header.gstackEnabled":"gstack 스킬 주입 활성화","header.gstackCredit":"gstack 기반 (MIT 라이선스, Garry Tan)","header.usageLimit":"사용량","header.cliNotInstalled":"{tool}이(가) 설치되지 않았습니다","header.cliInstalled":"설치됨","header.cliNotFound":"미설치","header.cliInstallHint.claude":"npm install -g @anthropic-ai/claude-code","header.cliInstallHint.gemini":"npm install -g @anthropic-ai/gemini-cli","header.cliInstallHint.codex":"npm install -g @openai/codex","header.cliRefresh":"재확인","header.gstackClaudeOnly":"gstack 스킬은 Claude CLI에서만 사용 가능합니다.","header.modelSettings":"AI 모델 설정","header.modelValue":"모델 ID","header.modelLabel":"표시 이름","header.addModel":"추가","header.modelSettingsHint":"커스텀 모델을 추가하세요. 모든 프로젝트의 모델 드롭다운에 표시됩니다.","header.modelDeprecated":"사용 중단됨","header.modelDeprecatedWarning":"설치된 CLI가 더 이상 지원하지 않는 모델입니다. 실행 시 기본 모델로 자동 대체됩니다.","header.modelDeprecatedTitle":"사용 중단된 모델","header.modelDeprecatedReason":"설치된 CLI의 --help 출력에 더 이상 이 모델이 보이지 않고, 번들 모델 레지스트리에도 없어서 표시된 경고입니다. 실행 시 CLI 기본 모델로 조용히 대체됩니다.","header.modelDeprecatedFixHeading":"해결 방법","header.modelDeprecatedFix1":"프로젝트 설정 → 실행 설정에서 현재 지원되는 모델로 변경하세요.","header.modelDeprecatedFix2":"또는 CLI를 업그레이드해서 이 모델이 다시 지원 목록에 나타나게 하세요.","header.modelDeprecatedFix3":"여전히 유효한 모델이라고 확신한다면 AI 모델 설정에서 커스텀 모델로 추가하세요.","header.modelDeprecatedOpenSettings":"설정 열기","header.jiraTitle":"Jira 연동","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://yoursite.atlassian.net","header.jiraEmail":"이메일","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API 토큰","header.jiraApiTokenPlaceholder":"Atlassian API 토큰","header.jiraProjectKey":"프로젝트 키","header.jiraProjectKeyPlaceholder":"예: PROJ","header.jiraTestConnection":"연결 테스트","header.jiraTesting":"테스트 중...","header.jiraConnected":"연결 성공","header.jiraFailed":"연결 실패","header.jiraTokenHint":"id.atlassian.com > 보안 > API 토큰에서 생성","form.newProject":"새 프로젝트","form.projectName":"프로젝트 이름","form.folderPath":"폴더 경로","form.cancel":"취소","form.create":"생성","browse.title":"폴더 찾아보기","browse.select":"선택","browse.loading":"불러오는 중...","browse.error":"디렉토리를 불러올 수 없습니다","browse.empty":"폴더가 없습니다","todos.title":"작업 목록","todos.add":"작업 추가","todos.empty":"작업이 없습니다","todos.emptyHint":"작업을 추가해보세요.","todos.filterAll":"전체","todos.filterActive":"작업중","todos.filterCompleted":"완료","todos.filterCancelled":"취소","todos.filterEmpty":"해당 상태의 작업이 없습니다.","todos.stackModeOn":"스택 모드 켜짐 — 다시 누르면 해제","todos.stackModeOff":"스택 모드 켜기 (iOS 알림 스타일)","todos.collapseStack":"스택으로 접기","todos.expandStack":"클릭하면 펼쳐집니다","todos.merge":"병합","todo.description":"설명","todo.noDescription":"설명이 없습니다.","todo.attachedImages":"첨부 이미지","todo.branch":"브랜치","todo.path":"경로","todo.worktree":"워크트리","todo.result":"실행 결과","todo.mergeFailed":"병합 실패","todo.diffError":"Diff 오류","todo.diffOutput":"변경사항","todo.files":"파일","todo.systemLog":"활동 로그","todo.start":"시작","todo.startHeadless":"Headless","todo.startHeadlessDesc":"자율 실행. 모든 권한 자동 승인.","todo.startInteractive":"Interactive","todo.startInteractiveDesc":"stdin을 열어두고 실행 중 메시지 전송 가능.","todo.startVerbose":"Verbose","todo.startVerboseDesc":"자동 승인 + 모든 로그 실시간 출력.","todo.sendPlaceholder":"메시지 입력...","todo.startWithDependency":"선행 작업 먼저 시작","todo.stop":"중지","todo.viewDiff":"Diff 보기","todo.hideDiff":"Diff 접기","todo.viewDebugLog":"디버그 로그","todo.merge":"병합","todo.mergeChain":"체인 병합","todo.mergeChainDesc":"이 체인의 모든 작업을 메인 브랜치에 병합","todo.chainComplete":"체인 완료","todo.chainTasks":"{count}개 작업","todo.edit":"편집","todo.delete":"삭제","todo.cleanup":"워크트리 삭제","todo.cleanupFailed":"정리 실패","cleanup.confirmDeleteBranch":`워크트리를 삭제합니다. 브랜치 "{name}"도 함께 삭제할까요?
64
+
65
+ 확인 = 워크트리 + 브랜치 삭제
66
+ 취소 = 워크트리만 삭제`,"todo.retry":"재시도","todo.retryDesc":"이전 워크트리를 정리하고 처음부터 다시 실행합니다.","todo.retryFailed":"재시도 실패","todo.continue":"이어서","todo.continueDesc":"같은 워크트리에서 후속 프롬프트를 실행합니다.","todo.continuing":"이어가는 중...","todo.confirmContinue":"이어서 실행","todo.continuePromptLabel":"후속 프롬프트","todo.continuePromptPlaceholder":"이 워크트리에 적용할 다음 지시사항을 입력하세요...","todo.continuePromptRequired":"후속 프롬프트를 입력해주세요.","todo.roundLabel":"라운드","todo.dependsOn":"선행 작업","todo.mergedFrom":"이전 작업에서 병합","todo.transferredTo":"작업 이전됨","todo.schedule":"예약","todo.scheduleDesc":"특정 시간에 1회 실행되도록 스케줄로 변환합니다.","todo.scheduleAt":"실행 시각","todo.scheduling":"예약 중...","todo.confirmSchedule":"예약","todo.scheduleKeepOriginal":"원본 작업 유지","todo.scheduleOnReset":"리셋 시 실행","todo.scheduleOnResetDesc":"토큰 한도 리셋 시 자동으로 새 작업을 실행합니다.","todo.scheduleOnResetLabel":"리셋 시각","todo.resetPromptPlaceholder":"리셋 후 실행할 프롬프트를 입력하세요...","todo.confirmResetSchedule":"리셋 시 실행 예약","todoForm.titlePlaceholder":"작업 제목...","todoForm.descPlaceholder":"설명 (선택사항)...","todoForm.cliTool":"CLI 도구","todoForm.aiModel":"AI 모델","todoForm.addImage":"이미지 추가","todoForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","todoForm.images":"이미지","todoForm.maxTurns":"최대 턴 수","todoForm.maxTurnsPlaceholder":"제한 없음","todoForm.maxTurnsHint":"에이전트 턴 수를 제한하여 과도한 토큰 사용을 방지합니다.","todoForm.dependsOn":"선행 작업","todoForm.noDependency":"없음 (독립 작업)","todoForm.dependsOnHint":"선행 작업이 완료되면 변경사항을 스쿼시 머지하고 새 브랜치에서 실행됩니다.","todoForm.worktreeMode":"실행 브랜치","todoForm.worktreeInherit":"프로젝트 설정 따름","todoForm.worktreeForceOn":"워크트리 사용 (격리 브랜치)","todoForm.worktreeForceOff":"메인 브랜치에서 실행","todoForm.worktreeProjectDefaultOn":"프로젝트 기본: 워크트리","todoForm.worktreeProjectDefaultOff":"프로젝트 기본: 메인 브랜치","todoForm.worktreeMainWarning":"메인 브랜치에서 실행 시 다른 작업의 동시 실행이 차단됩니다.","todoForm.cancel":"취소","todoForm.save":"저장","dnd.dropHint":"이 작업 이후에 실행","dnd.removeDep":"의존성 제거","dnd.dropToRemoveDep":"여기에 놓으면 의존성 제거","dnd.cyclicWarning":"순환 의존성으로 연결할 수 없습니다","graph.autoLayout":"자동 정렬","graph.listView":"리스트 보기","graph.graphView":"그래프 보기","status.pending":"대기","status.running":"실행 중","status.completed":"완료","status.failed":"실패","status.stopped":"중지","status.merged":"병합됨","progress.complete":"완료","progress.done":"완료","progress.live":"실행 중","progress.idle":"대기","progress.fail":"실패","progress.stop":"중지","progress.merged":"병합됨","failure.title":"실패 원인","failure.exitCode":"종료 코드","failure.fix":"수정하기: 실패 원인을 분석하고 문제를 수정하는 새 작업을 생성합니다.","failure.fixPrefix":"[수정] ","result.duration":"소요 시간","result.commits":"커밋","result.filesChanged":"파일 변경","result.commitHistory":"커밋 이력","result.changedFiles":"변경된 파일","result.tokenUsage":"토큰 사용량","result.inputTokens":"입력","result.outputTokens":"출력","result.totalCost":"비용","result.cacheTokens":"캐시","result.turns":"턴","result.contextUsed":"사용","result.levelLight":"가벼움","result.levelModerate":"보통","result.levelHigh":"많음","result.levelHeavy":"과다","log.awaiting":"출력 대기 중...","log.waitingResponse":"응답 대기 중...","log.noChanges":"변경사항이 없습니다.","log.copy":"복사","log.copied":"복사됨!","log.viewChat":"대화","log.viewRaw":"원시","schedules.title":"스케줄","schedules.add":"새 스케줄","schedules.empty":"스케줄이 없습니다","schedules.emptyHint":"반복 작업을 자동화할 스케줄을 만들어보세요.","schedule.type":"스케줄 유형","schedule.recurring":"반복","schedule.once":"1회","schedule.runAtLabel":"실행 시각","schedule.cronExpression":"실행 주기","schedule.cronHint":"예: */30 * * * * (30분마다), 0 9 * * * (매일 9시), 0 9 * * 1-5 (평일 9시)","cron.everyMinutes":"분 간격","cron.hourly":"매시간","cron.daily":"매일","cron.weekly":"매주","cron.monthly":"매월","cron.custom":"직접 입력","cron.every":"매","cron.minutesLabel":"분마다","cron.everyHourAt":"매시간","cron.minutesPast":"분에","cron.everyDayAt":"매일","cron.at":"시간","cron.everyMonthOn":"매월","cron.dayAt":"일","cron.expression":"Cron","cron.mon":"월","cron.tue":"화","cron.wed":"수","cron.thu":"목","cron.fri":"금","cron.sat":"토","cron.sun":"일","schedule.skipIfRunning":"이전 실행이 진행 중이면 건너뛰기","schedule.active":"활성","schedule.paused":"일시정지","schedule.lastRun":"마지막 실행","schedule.never":"없음","schedule.trigger":"즉시 실행","schedule.activate":"활성화","schedule.pause":"일시정지","schedule.edit":"편집","schedule.delete":"삭제","schedule.runs":"실행 이력","schedule.runTriggered":"실행됨","schedule.runSkipped":"건너뜀","schedule.runCompleted":"완료","schedule.runFailed":"실패","schedule.noRuns":"실행 이력이 없습니다","scheduleForm.titlePlaceholder":"스케줄 제목...","scheduleForm.descPlaceholder":"작업 설명 템플릿...","scheduleForm.cliTool":"CLI 도구","scheduleForm.aiModel":"AI 모델","scheduleForm.cancel":"취소","scheduleForm.save":"저장","jira.title":"Jira 이슈","jira.search":"이슈 검색...","jira.allStatuses":"모든 상태","jira.refresh":"새로고침","jira.import":"작업으로 가져오기","jira.importing":"가져오는 중...","jira.imported":"가져옴!","jira.noIssues":"이슈가 없습니다","jira.noIssuesHint":"필터나 검색어를 변경해보세요.","jira.loadMore":"더 보기","jira.total":"건","jira.transition":"상태 변경","jira.comment":"댓글","jira.commentPlaceholder":"댓글 입력...","jira.commentSend":"전송","jira.createIssue":"이슈 생성","jira.createSummary":"제목","jira.createDesc":"설명","jira.createType":"이슈 유형","jira.creating":"생성 중...","jira.notConfigured":"Jira가 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","jira.assignee":"담당자","jira.unassigned":"미배정","jira.updated":"업데이트","notion.title":"Notion 페이지","notion.search":"페이지 검색...","notion.refresh":"새로고침","notion.import":"작업으로 가져오기","notion.importing":"가져오는 중...","notion.imported":"가져옴!","notion.noPages":"페이지가 없습니다","notion.noPagesHint":"검색어를 변경해보세요.","notion.loadMore":"더 보기","notion.createPage":"페이지 생성","notion.pageTitle":"제목","notion.creating":"생성 중...","notion.notConfigured":"Notion이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","notion.loadingContent":"콘텐츠 로딩 중...","notion.noContent":"콘텐츠 없음","header.notionTitle":"Notion 연동","header.notionApiKey":"통합 토큰","header.notionApiKeyPlaceholder":"ntn_...","header.notionDatabaseId":"데이터베이스 ID","header.notionDatabaseIdPlaceholder":"예: abc123def456...","header.notionTestConnection":"연결 테스트","header.notionTesting":"테스트 중...","header.notionConnected":"연결 성공","header.notionFailed":"연결 실패","header.notionTokenHint":"notion.so/my-integrations에서 통합을 생성하고 데이터베이스를 공유하세요","github.title":"GitHub 이슈","github.search":"이슈 검색...","github.refresh":"새로고침","github.import":"작업으로 가져오기","github.importing":"가져오는 중...","github.imported":"가져옴!","github.noIssues":"이슈가 없습니다","github.noIssuesHint":"필터나 검색어를 변경해보세요.","github.loadMore":"더 보기","github.createIssue":"이슈 생성","github.issueTitle":"제목","github.issueBody":"설명","github.creating":"생성 중...","github.notConfigured":"GitHub이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","github.loadingComments":"댓글 로딩 중...","github.comments":"댓글","github.noBody":"설명이 없습니다.","github.open":"열림","github.closed":"닫힘","github.all":"전체","header.githubTitle":"GitHub 연동","header.githubToken":"개인 액세스 토큰","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"저장소 소유자","header.githubOwnerPlaceholder":"사용자명 또는 조직","header.githubRepo":"저장소 이름","header.githubRepoPlaceholder":"repo-name","header.githubTestConnection":"연결 테스트","header.githubTesting":"테스트 중...","header.githubConnected":"연결 성공","header.githubFailed":"연결 실패","header.githubTokenHint":"github.com/settings/tokens에서 repo 권한으로 토큰을 생성하세요","tabs.tasks":"자동 작업","tabs.sessions":"세션","tabs.discussions":"토론","tabs.schedules":"스케줄","tabs.jira":"Jira","tabs.notion":"Notion","tabs.github":"GitHub","tabs.git":"Git","tabs.planner":"플래너","tabs.analytics":"통계","planner.title":"플래너","planner.add":"새 항목","planner.empty":"플래너 항목이 없습니다","planner.emptyHint":"아이디어, 작업, 계획을 플래너에 추가하세요.","planner.filterTag":"모든 태그","planner.filterStatus":"모든 상태","planner.col.title":"제목","planner.col.tags":"태그","planner.col.dueDate":"마감일","planner.col.status":"상태","planner.col.actions":"","planner.edit":"수정","planner.delete":"삭제","planner.deleteConfirm":"이 플래너 항목을 삭제하시겠습니까?","planner.convertToTask":"작업으로 변환","planner.convertToSchedule":"스케줄로 변환","planner.movedToTodo":"작업으로 이동됨","planner.movedToSchedule":"스케줄로 이동됨","planner.noDueDate":"—","planner.export":"내보내기","planner.exportTooltip":"플래너 항목을 JSON 파일로 내보내기","planner.exportError":"내보내기 실패","planner.import":"가져오기","planner.importTooltip":"JSON 파일에서 플래너 항목 가져오기","planner.importSuccess":"{items}개 항목과 {tags}개 태그를 가져왔습니다.","planner.importError":"가져오기 실패","planner.importInvalidJson":"유효한 JSON 파일이 아닙니다","planner.importNoImages":"참고: 이미지는 내보낸 파일에 포함되지 않습니다.","plannerForm.titlePlaceholder":"플래너 항목 제목...","plannerForm.descPlaceholder":"설명 또는 세부 사항...","plannerForm.tags":"태그","plannerForm.tagsPlaceholder":"태그를 입력하고 Enter를 누르세요","plannerForm.dueDate":"마감일","plannerForm.priority":"우선순위","plannerForm.priorityLow":"낮음","plannerForm.priorityNormal":"보통","plannerForm.priorityHigh":"높음","plannerForm.priorityCritical":"긴급","plannerForm.status":"상태","plannerForm.addImage":"이미지 추가","plannerForm.pasteHint":"Ctrl+V로 이미지 붙여넣기","plannerForm.images":"이미지","plannerForm.cancel":"취소","plannerForm.save":"저장","plannerStatus.pending":"대기","plannerStatus.in_progress":"진행 중","plannerStatus.done":"완료","plannerStatus.moved":"이동됨","plannerConvert.toTask":"작업으로 변환","plannerConvert.toSchedule":"스케줄로 변환","plannerConvert.cliTool":"CLI 도구","plannerConvert.model":"모델","plannerConvert.maxTurns":"최대 턴","plannerConvert.scheduleType":"스케줄 유형","plannerConvert.recurring":"반복","plannerConvert.once":"일회성","plannerConvert.cronExpression":"Cron 표현식","plannerConvert.runAt":"실행 시각","plannerConvert.cancel":"취소","plannerConvert.convert":"변환","plannerConvert.projectDefault":"프로젝트 기본값","plannerTag.selectOrCreate":"옵션 선택 또는 생성","plannerTag.delete":"삭제","plannerTag.deleteConfirm":"이 태그를 모든 항목에서 제거하시겠습니까?","plannerTag.color":"색","plannerTag.rename":"이름 변경","plannerTag.color.default":"기본","plannerTag.color.gray":"회색","plannerTag.color.brown":"갈색","plannerTag.color.orange":"주황색","plannerTag.color.yellow":"노란색","plannerTag.color.green":"초록색","plannerTag.color.blue":"파란색","plannerTag.color.purple":"보라색","plannerTag.color.pink":"분홍색","plannerTag.color.red":"빨간색","session.new":"새 세션","session.title":"세션 제목","session.description":"초기 프롬프트 (선택)","session.start":"시작","session.stop":"중지","session.delete":"삭제","session.empty":"세션이 없습니다","session.emptyHint":"대화형 AI 세션을 시작하세요.","session.create":"세션 생성","session.cliTool":"CLI 도구","session.model":"모델","session.worktree":"워크트리 사용 (격리된 브랜치)","session.cleanup":"워크트리 삭제","analytics.title":"실행 통계","analytics.loading":"통계 로딩 중...","analytics.noData":"데이터 없음","analytics.totalTasks":"총 작업","analytics.successRate":"성공률","analytics.totalCost":"총 비용","analytics.totalTokens":"총 토큰","analytics.avgPerTask":"작업당 평균","analytics.byStatus":"상태별","analytics.byCliTool":"CLI 도구별","analytics.dailyActivity":"일별 활동","analytics.dailyCost":"일별 비용","analytics.costBreakdown":"비용 요약","analytics.tasks":"작업","analytics.period.7d":"7일","analytics.period.30d":"30일","analytics.period.90d":"90일","analytics.period.all":"전체","discussions.title":"에이전트 토론","discussions.add":"새 토론","discussions.empty":"아직 토론이 없습니다","discussions.emptyHint":"에이전트들이 피쳐를 함께 토론하도록 새 토론을 만드세요.","discussions.round":"라운드","discussions.maxRounds":"최대 라운드","discussions.agents":"에이전트","discussions.speaking":"발언 중...","discussions.inject":"메시지 전송","discussions.skipTurn":"턴 건너뛰기","discussions.implement":"구현 시작","discussions.implementHint":"토론된 기능을 구현할 에이전트를 선택하세요.","discussions.selectAgent":"구현 에이전트 선택","discussions.notFound":"토론을 찾을 수 없습니다","discussions.back":"토론 목록으로","discussions.userMessage":"메시지를 입력하세요...","discussions.implementation":"구현","discussions.resume":"재개","discussions.retry":"다시 실행","discussions.failureTitle":"토론 실패","discussions.noErrorLogs":"에러 상세 정보가 없습니다","discussions.pause":"일시 중지","discussions.waiting":"대기 중...","discussions.roundExplain":"에이전트 전원이 한 번씩 발언하는 단위입니다.","discussions.autoImplement":"토론 후 자동 구현","discussions.autoImplementHint":"모든 라운드 완료 후 자동으로 구현을 시작합니다.","discussions.collapse":"접기","discussions.expand":"펼치기","discussions.collapseAll":"전체 접기","discussions.expandAll":"전체 펼치기","status.skipped":"건너뜀","status.paused":"일시 중지","agents.title":"에이전트 페르소나","agents.add":"에이전트 추가","agents.name":"이름","agents.role":"역할","agents.systemPrompt":"시스템 프롬프트","agents.cliTool":"CLI 도구","agents.cliModel":"모델","agents.color":"색상","agents.empty":"에이전트가 없습니다. 토론을 시작하려면 에이전트 페르소나를 만드세요.","agents.manage":"에이전트 관리","agents.presets":"프리셋 템플릿","agents.roles.architect":"아키텍트","agents.roles.developer":"개발자","agents.roles.reviewer":"리뷰어","agents.roles.pm":"PM","agents.roles.tester":"테스터","agents.roles.custom":"사용자 정의","agents.canImplement":"토론 중 구현 수행","agents.canImplementHelp":"이 에이전트의 턴에서 발언뿐 아니라 실제 코드 작성·커밋까지 수행합니다. 개발자 역할 에이전트가 아이디어를 즉석에서 시연하도록 할 때 유용합니다.","agents.canImplementBadge":"구현자","git.ahead":"앞섬","git.behind":"뒤처짐","git.staged":"스테이징","git.unstaged":"변경됨","git.noChanges":"작업 트리 깨끗","git.refresh":"새로고침","git.files":"파일","git.commitHistory":"커밋 히스토리","git.branches":"브랜치","git.remotes":"원격","git.tags":"태그","git.stashes":"스태시","git.noCommits":"아직 커밋이 없습니다","git.loadMore":"더 불러오는 중...","git.author":"작성자","git.hash":"해시","git.graph":"그래프","git.description":"설명","git.date":"날짜","git.commit":"커밋","git.pull":"Pull","git.push":"Push","git.fetch":"패치","git.branch":"브랜치","git.merge":"병합","git.stash":"스태시","git.discard":"폐기","git.tag":"태그","git.untracked":"추적 안 됨","git.fileStatus":"파일 상태","git.stageAll":"모두 스테이지","git.unstageAll":"모두 언스테이지","git.stage":"스테이지","git.unstage":"언스테이지","git.commitMessage":"커밋 메시지...","git.branchName":"브랜치 이름...","git.tagName":"태그 이름...","git.tagMessage":"태그 메시지 (선택)...","git.stashMessage":"스태시 메시지 (선택)...","git.selectBranch":"브랜치 선택...","git.discardAll":"모두 폐기","git.confirmDiscard":"모든 변경 사항을 폐기하시겠습니까? 되돌릴 수 없습니다.","git.confirmDiscardFile":"이 파일의 변경 사항을 폐기하시겠습니까?","git.newBranch":"새 브랜치","git.deleteBranch":"브랜치 삭제","git.stashPop":"꺼내기","git.noStashes":"스태시 없음","git.actions":"작업","git.close":"닫기","git.create":"생성","git.delete":"삭제","git.modified":"수정됨","git.added":"추가됨","git.deleted":"삭제됨","git.renamed":"이름변경","git.copied":"복사됨","git.checkout":"체크아웃","git.mergeInto":"현재 브랜치로 병합","git.rebaseOnto":"현재 변경사항을 재배치","git.renameBranch":"브랜치 이름 변경","git.confirmDelete":"브랜치 {name}을(를) 삭제하시겠습니까?","git.newBranchName":"새 브랜치 이름...","git.rename":"이름 변경","git.checkoutRemote":"로컬 브랜치로 체크아웃","git.commitDetail":"커밋 상세","git.changedFiles":"변경된 파일","git.selectFileToViewDiff":"파일을 선택하면 차이를 볼 수 있습니다","git.noFilesChanged":"변경된 파일 없음","git.loadingFiles":"파일 불러오는 중...","git.loadingDiff":"차이 불러오는 중...","git.worktrees":"워크트리","git.cleanupWorktree":"정리","git.confirmCleanupWorktree":"워크트리와 브랜치 {name}을(를) 삭제하시겠습니까?","lang.toggle":"EN","theme.light":"라이트","theme.dark":"다크","notification.taskCompleted":"작업 완료","notification.taskFailed":"작업 실패","notification.discussionCompleted":"토론 완료","notification.discussionFailed":"토론 실패","notification.toggle":"알림 토글","notification.blocked":"브라우저에서 알림이 차단되었습니다"}},FF=x.createContext(null);function DJ({children:e}){const[t,n]=x.useState(()=>{const s=localStorage.getItem("clitrigger-lang");return s==="ko"||s==="en"?s:"ko"}),r=x.useCallback(()=>{n(s=>{const l=s==="en"?"ko":"en";return localStorage.setItem("clitrigger-lang",l),l})},[]),a=x.useMemo(()=>MJ(),[]),i=x.useCallback(s=>PJ[t][s]??a[t][s]??s,[t,a]);return f.jsx(FF.Provider,{value:{lang:t,toggleLang:r,t:i},children:e})}function tt(){const e=x.useContext(FF);if(!e)throw new Error("useI18n must be used within I18nProvider");return e}const Ke=({className:e="",variant:t="text",width:n,height:r,count:a=1})=>{const i="animate-pulse bg-warm-200",s={text:"rounded h-3 mb-2 last:mb-0",circular:"rounded-full",rectangular:"rounded-none",rounded:"rounded-xl"},l={width:n,height:r},c=Array.from({length:a});return f.jsx(f.Fragment,{children:c.map((d,h)=>f.jsx("div",{className:`${i} ${s[t]} ${e}`,style:l},h))})};/**
67
+ * @license lucide-react v1.8.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const HF=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
72
+ * @license lucide-react v1.8.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const RJ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
77
+ * @license lucide-react v1.8.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const IJ=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
82
+ * @license lucide-react v1.8.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const UP=e=>{const t=IJ(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
87
+ * @license lucide-react v1.8.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */var N0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
92
+ * @license lucide-react v1.8.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const LJ=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},zJ=x.createContext({}),$J=()=>x.useContext(zJ),qJ=x.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...l},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:v=""}=$J()??{},b=r??m?Number(n??h)*24/Number(t??d):n??h;return x.createElement("svg",{ref:c,...N0,width:t??d??N0.width,height:t??d??N0.height,stroke:e??g,strokeWidth:b,className:HF("lucide",v,a),...!i&&!LJ(l)&&{"aria-hidden":"true"},...l},[...s.map(([w,S])=>x.createElement(w,S)),...Array.isArray(i)?i:[i]])});/**
97
+ * @license lucide-react v1.8.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Ge=(e,t)=>{const n=x.forwardRef(({className:r,...a},i)=>x.createElement(qJ,{ref:i,iconNode:t,className:HF(`lucide-${RJ(UP(e))}`,`lucide-${e}`,r),...a}));return n.displayName=UP(e),n};/**
102
+ * @license lucide-react v1.8.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const BJ=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],$N=Ge("archive",BJ);/**
107
+ * @license lucide-react v1.8.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const FJ=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],HJ=Ge("arrow-down",FJ);/**
112
+ * @license lucide-react v1.8.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const UJ=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],GJ=Ge("arrow-left-right",UJ);/**
117
+ * @license lucide-react v1.8.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const VJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],KJ=Ge("arrow-right",VJ);/**
122
+ * @license lucide-react v1.8.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const YJ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],WJ=Ge("arrow-up",YJ);/**
127
+ * @license lucide-react v1.8.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const XJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],ZJ=Ge("ban",XJ);/**
132
+ * @license lucide-react v1.8.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const QJ=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],JJ=Ge("bell-off",QJ);/**
137
+ * @license lucide-react v1.8.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const eee=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],tee=Ge("bell",eee);/**
142
+ * @license lucide-react v1.8.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const nee=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],ree=Ge("calendar-clock",nee);/**
147
+ * @license lucide-react v1.8.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const aee=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],iee=Ge("calendar",aee);/**
152
+ * @license lucide-react v1.8.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const see=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],oee=Ge("chart-column",see);/**
157
+ * @license lucide-react v1.8.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const lee=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uee=Ge("check",lee);/**
162
+ * @license lucide-react v1.8.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const cee=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],dee=Ge("chevron-left",cee);/**
167
+ * @license lucide-react v1.8.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const fee=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zu=Ge("chevron-right",fee);/**
172
+ * @license lucide-react v1.8.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const hee=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],mee=Ge("chevrons-right",hee);/**
177
+ * @license lucide-react v1.8.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const pee=[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]],gee=Ge("chevrons-up",pee);/**
182
+ * @license lucide-react v1.8.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const vee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],UF=Ge("circle-check",vee);/**
187
+ * @license lucide-react v1.8.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const yee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],xee=Ge("circle-dot",yee);/**
192
+ * @license lucide-react v1.8.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const bee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],wee=Ge("circle-pause",bee);/**
197
+ * @license lucide-react v1.8.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const See=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],jee=Ge("circle-x",See);/**
202
+ * @license lucide-react v1.8.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const _ee=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],kee=Ge("clipboard-list",_ee);/**
207
+ * @license lucide-react v1.8.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const Cee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Qd=Ge("clock",Cee);/**
212
+ * @license lucide-react v1.8.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const Nee=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Eee=Ge("code",Nee);/**
217
+ * @license lucide-react v1.8.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const Aee=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Tee=Ge("download",Aee);/**
222
+ * @license lucide-react v1.8.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const Oee=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],GF=Ge("ellipsis-vertical",Oee);/**
227
+ * @license lucide-react v1.8.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const Mee=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Pee=Ge("eye",Mee);/**
232
+ * @license lucide-react v1.8.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const Dee=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cp=Ge("file-text",Dee);/**
237
+ * @license lucide-react v1.8.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const Ree=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],qN=Ge("folder-open",Ree);/**
242
+ * @license lucide-react v1.8.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const Iee=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Lee=Ge("git-commit-horizontal",Iee);/**
247
+ * @license lucide-react v1.8.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const zee=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],BN=Ge("git-branch",zee);/**
252
+ * @license lucide-react v1.8.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const $ee=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],qee=Ge("git-fork",$ee);/**
257
+ * @license lucide-react v1.8.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const Bee=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Of=Ge("git-merge",Bee);/**
262
+ * @license lucide-react v1.8.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const Fee=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Hee=Ge("grip-vertical",Fee);/**
267
+ * @license lucide-react v1.8.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const Uee=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],GP=Ge("hammer",Uee);/**
272
+ * @license lucide-react v1.8.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const Gee=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Jd=Ge("image",Gee);/**
277
+ * @license lucide-react v1.8.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const Vee=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Kee=Ge("layers",Vee);/**
282
+ * @license lucide-react v1.8.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const Yee=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Wee=Ge("layout-dashboard",Yee);/**
287
+ * @license lucide-react v1.8.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const Xee=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],iC=Ge("layout-grid",Xee);/**
292
+ * @license lucide-react v1.8.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const Zee=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],Qee=Ge("layout-list",Zee);/**
297
+ * @license lucide-react v1.8.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const Jee=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],ef=Ge("link",Jee);/**
302
+ * @license lucide-react v1.8.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const ete=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],VP=Ge("list",ete);/**
307
+ * @license lucide-react v1.8.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const tte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],VF=Ge("loader-circle",tte);/**
312
+ * @license lucide-react v1.8.0 - ISC
313
+ *
314
+ * This source code is licensed under the ISC license.
315
+ * See the LICENSE file in the root directory of this source tree.
316
+ */const nte=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],rte=Ge("log-out",nte);/**
317
+ * @license lucide-react v1.8.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const ate=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ite=Ge("menu",ate);/**
322
+ * @license lucide-react v1.8.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */const ste=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ote=Ge("message-square",ste);/**
327
+ * @license lucide-react v1.8.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */const lte=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ute=Ge("moon",lte);/**
332
+ * @license lucide-react v1.8.0 - ISC
333
+ *
334
+ * This source code is licensed under the ISC license.
335
+ * See the LICENSE file in the root directory of this source tree.
336
+ */const cte=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],FN=Ge("pause",cte);/**
337
+ * @license lucide-react v1.8.0 - ISC
338
+ *
339
+ * This source code is licensed under the ISC license.
340
+ * See the LICENSE file in the root directory of this source tree.
341
+ */const dte=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Mf=Ge("pencil",dte);/**
342
+ * @license lucide-react v1.8.0 - ISC
343
+ *
344
+ * This source code is licensed under the ISC license.
345
+ * See the LICENSE file in the root directory of this source tree.
346
+ */const fte=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],yl=Ge("play",fte);/**
347
+ * @license lucide-react v1.8.0 - ISC
348
+ *
349
+ * This source code is licensed under the ISC license.
350
+ * See the LICENSE file in the root directory of this source tree.
351
+ */const hte=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],sc=Ge("plus",hte);/**
352
+ * @license lucide-react v1.8.0 - ISC
353
+ *
354
+ * This source code is licensed under the ISC license.
355
+ * See the LICENSE file in the root directory of this source tree.
356
+ */const mte=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$g=Ge("rotate-ccw",mte);/**
357
+ * @license lucide-react v1.8.0 - ISC
358
+ *
359
+ * This source code is licensed under the ISC license.
360
+ * See the LICENSE file in the root directory of this source tree.
361
+ */const pte=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],qg=Ge("search",pte);/**
362
+ * @license lucide-react v1.8.0 - ISC
363
+ *
364
+ * This source code is licensed under the ISC license.
365
+ * See the LICENSE file in the root directory of this source tree.
366
+ */const gte=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vte=Ge("settings",gte);/**
367
+ * @license lucide-react v1.8.0 - ISC
368
+ *
369
+ * This source code is licensed under the ISC license.
370
+ * See the LICENSE file in the root directory of this source tree.
371
+ */const yte=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],xte=Ge("sliders-horizontal",yte);/**
372
+ * @license lucide-react v1.8.0 - ISC
373
+ *
374
+ * This source code is licensed under the ISC license.
375
+ * See the LICENSE file in the root directory of this source tree.
376
+ */const bte=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],KF=Ge("square-terminal",bte);/**
377
+ * @license lucide-react v1.8.0 - ISC
378
+ *
379
+ * This source code is licensed under the ISC license.
380
+ * See the LICENSE file in the root directory of this source tree.
381
+ */const wte=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Bg=Ge("square",wte);/**
382
+ * @license lucide-react v1.8.0 - ISC
383
+ *
384
+ * This source code is licensed under the ISC license.
385
+ * See the LICENSE file in the root directory of this source tree.
386
+ */const Ste=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],jte=Ge("sun",Ste);/**
387
+ * @license lucide-react v1.8.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ */const _te=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],kte=Ge("terminal",_te);/**
392
+ * @license lucide-react v1.8.0 - ISC
393
+ *
394
+ * This source code is licensed under the ISC license.
395
+ * See the LICENSE file in the root directory of this source tree.
396
+ */const Cte=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],es=Ge("trash-2",Cte);/**
397
+ * @license lucide-react v1.8.0 - ISC
398
+ *
399
+ * This source code is licensed under the ISC license.
400
+ * See the LICENSE file in the root directory of this source tree.
401
+ */const Nte=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Np=Ge("triangle-alert",Nte);/**
402
+ * @license lucide-react v1.8.0 - ISC
403
+ *
404
+ * This source code is licensed under the ISC license.
405
+ * See the LICENSE file in the root directory of this source tree.
406
+ */const Ete=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],Ate=Ge("unlink",Ete);/**
407
+ * @license lucide-react v1.8.0 - ISC
408
+ *
409
+ * This source code is licensed under the ISC license.
410
+ * See the LICENSE file in the root directory of this source tree.
411
+ */const Tte=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ote=Ge("upload",Tte);/**
412
+ * @license lucide-react v1.8.0 - ISC
413
+ *
414
+ * This source code is licensed under the ISC license.
415
+ * See the LICENSE file in the root directory of this source tree.
416
+ */const Mte=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Pte=Ge("users",Mte);/**
417
+ * @license lucide-react v1.8.0 - ISC
418
+ *
419
+ * This source code is licensed under the ISC license.
420
+ * See the LICENSE file in the root directory of this source tree.
421
+ */const Dte=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ga=Ge("x",Dte);function Rte({onLogin:e}){const[t,n]=x.useState(""),[r,a]=x.useState(""),[i,s]=x.useState(!1),{t:l,toggleLang:c}=tt(),d=async h=>{if(h.preventDefault(),!!t){a(""),s(!0);try{await e(t)}catch{a(l("login.error"))}finally{s(!1)}}};return f.jsxs("div",{className:"min-h-screen bg-theme-bg flex items-center justify-center px-4 relative",children:[f.jsx("button",{onClick:c,className:"lang-toggle absolute top-6 right-6",children:l("lang.toggle")}),f.jsxs("div",{className:"w-full max-w-sm animate-fade-in",children:[f.jsxs("div",{className:"text-center mb-10",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-accent/10 mb-5",children:f.jsx(KF,{size:32,className:"text-accent",strokeWidth:1.5})}),f.jsx("h1",{className:"text-2xl font-semibold text-theme-text",children:l("login.title")}),f.jsx("p",{className:"text-theme-muted text-sm mt-2",children:l("login.subtitle")})]}),f.jsx("form",{onSubmit:d,children:f.jsxs("div",{className:"card p-8",children:[f.jsx("label",{className:"block text-sm font-medium text-theme-text-secondary mb-2",children:l("login.password")}),f.jsx("input",{type:"password",value:t,onChange:h=>n(h.target.value),placeholder:"*************",className:"input-field text-base",autoFocus:!0}),r&&f.jsx("div",{className:"mt-4 py-2.5 px-4 bg-status-error/5 border border-status-error/20 rounded-xl text-sm text-status-error",children:r}),f.jsx("button",{type:"submit",disabled:!t||i,className:"btn-primary w-full mt-6 py-3",children:l(i?"login.loading":"login.submit")})]})}),f.jsx("div",{className:"mt-6 text-center text-xs text-theme-text-tertiary",children:l("login.footer")}),f.jsx("div",{className:"mt-4 px-2 py-3 rounded-xl text-xs text-theme-text-tertiary border leading-relaxed text-center",children:l("login.disclaimer")})]})]})}function Ite(e){return qe("/api/projects/browse",{initialPath:e})}function Lte(e){return qe("/api/projects/open-folder",{path:e})}function YF(){return mt("/api/projects")}function zte(e){return mt(`/api/projects/${e}`)}function WF(e){return qe("/api/projects",e)}function KP(e,t){return oo(`/api/projects/${e}`,t)}function XF(e,t){const n=t?`?todoId=${encodeURIComponent(t)}`:"";return mt(`/api/projects/${e}/debug-logs${n}`)}function ZF(e){return $a(`/api/projects/${e}`)}function $te(e){return qe(`/api/projects/${e}/start`)}function qte(e){return qe(`/api/projects/${e}/stop`)}function QF(e){return mt(`/api/projects/${e}/status`)}function Bte(e){return qe(`/api/projects/${e}/check-git`)}function Fte(e,t){return mt(`/api/projects/${e}/git-status`)}function Hte(e,t=0,n=50,r){const a=new URLSearchParams({skip:String(t),limit:String(n)});return mt(`/api/projects/${e}/git-log?${a}`)}function Ute(e,t){return mt(`/api/projects/${e}/git-refs`)}function Em(e,t){return qe(`/api/projects/${e}/git-stage`,{files:t})}function YP(e,t){return qe(`/api/projects/${e}/git-unstage`,{files:t})}function Gte(e,t){return qe(`/api/projects/${e}/git-commit`,{message:t})}function JF(e,t,n){return qe(`/api/projects/${e}/git-pull`,{remote:t,branch:n})}function e8(e,t,n,r){return qe(`/api/projects/${e}/git-push`,{remote:t,branch:n,setUpstream:r})}function t8(e,t,n){return qe(`/api/projects/${e}/git-fetch`,{remote:t,prune:n})}function Vte(e,t,n){return qe(`/api/projects/${e}/git-branch`,{name:t,startPoint:n})}function n8(e,t,n){return qe(`/api/projects/${e}/git-branch-delete`,{name:t,force:n})}function sC(e,t){return qe(`/api/projects/${e}/git-checkout`,{branch:t})}function r8(e,t){return qe(`/api/projects/${e}/git-merge`,{branch:t})}function Kte(e,t){return qe(`/api/projects/${e}/git-stash`,{message:t})}function Yte(e,t){return qe(`/api/projects/${e}/git-stash-pop`,{index:t})}function Wte(e){return mt(`/api/projects/${e}/git-stash-list`)}function a8(e,t,n){return qe(`/api/projects/${e}/git-discard`,{files:t,all:n})}function Xte(e,t,n,r){return qe(`/api/projects/${e}/git-tag`,{name:t,message:n,commit:r})}function WP(e,t,n){return qe(`/api/projects/${e}/git-branch-rename`,{oldName:t,newName:n})}function Zte(e,t){return qe(`/api/projects/${e}/git-rebase`,{onto:t})}function Qte(e,t){const n=new URLSearchParams({hash:t});return mt(`/api/projects/${e}/git-commit-files?${n}`)}function XP(e,t,n){const r=new URLSearchParams({hash:t});return n&&r.set("file",n),mt(`/api/projects/${e}/git-commit-diff?${r}`)}function ZP(e){return mt(`/api/projects/${e}/worktrees`)}function Jte(e,t,n){return qe(`/api/projects/${e}/worktree-cleanup`,{worktreePath:t,branchName:n})}const i8=x.createContext({theme:"light",toggleTheme:()=>{}});function ene(){const[e,t]=x.useState(()=>{const r=localStorage.getItem("theme");return r==="light"||r==="dark"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"});x.useEffect(()=>{document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e)},[e]);const n=x.useCallback(()=>{t(r=>r==="light"?"dark":"light")},[]);return{theme:e,toggleTheme:n}}function s8(){return x.useContext(i8)}const o8=x.createContext({enabled:!1,supported:!1,toggleNotification:()=>{},sendNotification:()=>{}});function tne(){const e="Notification"in window,[t,n]=x.useState(()=>e?localStorage.getItem("clitrigger-notifications")==="on"&&Notification.permission==="granted":!1),r=x.useRef(t);x.useEffect(()=>{r.current=t},[t]);const a=x.useCallback(async()=>{if(e)if(r.current)localStorage.setItem("clitrigger-notifications","off"),n(!1);else{if(Notification.permission==="denied"||Notification.permission==="default"&&await Notification.requestPermission()!=="granted")return;localStorage.setItem("clitrigger-notifications","on"),n(!0)}},[e]),i=x.useCallback((s,l)=>{if(!r.current)return;const c=new Notification(s,{body:l});c.onclick=()=>{window.focus(),c.close()}},[]);return{enabled:t,supported:e,toggleNotification:a,sendNotification:i}}function HN(){return x.useContext(o8)}function Eu(...e){return e.filter(Boolean).join(" ")}const nne={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},rne={scale:"animate-scale-in","slide-up":"animate-slide-up"};function ts({open:e,onClose:t,size:n="md",position:r="center",animation:a="scale",disableEscClose:i=!1,disableBackdropClose:s=!1,children:l}){const c=x.useRef(null);return x.useEffect(()=>{if(!e||i)return;const d=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,i,t]),e?vl.createPortal(f.jsx("div",{ref:c,className:Eu("fixed inset-0 bg-black/50 backdrop-blur-sm z-modal flex",r==="center"?"items-center justify-center p-4":"items-start justify-center px-4 pt-[20vh]"),onClick:d=>{!s&&d.target===c.current&&t()},children:f.jsx("div",{className:Eu("w-full",nne[n],rne[a]),children:l})}),document.body):null}function l8({onSubmit:e,onCancel:t}){const[n,r]=x.useState(""),[a,i]=x.useState(""),[s,l]=x.useState(!1),{t:c}=tt(),d=m=>{m.preventDefault(),!(!n.trim()||!a.trim())&&e(n.trim(),a.trim())},h=async()=>{l(!0);try{const m=await Ite(a||void 0);m.path&&i(m.path)}catch{}l(!1)};return f.jsx(ts,{open:!0,onClose:t,size:"md",children:f.jsxs("div",{className:"card p-8 shadow-2xl rounded-2xl",children:[f.jsx("h2",{className:"text-lg font-semibold text-warm-800 mb-6",children:c("form.newProject")}),f.jsxs("form",{onSubmit:d,children:[f.jsxs("div",{className:"mb-5",children:[f.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:c("form.projectName")}),f.jsx("input",{type:"text",placeholder:"my-project",value:n,onChange:m=>r(m.target.value),className:"input-field",autoFocus:!0})]}),f.jsxs("div",{className:"mb-8",children:[f.jsx("label",{className:"block text-sm font-medium text-warm-600 mb-2",children:c("form.folderPath")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",placeholder:"C:/Projects/my-project",value:a,onChange:m=>i(m.target.value),className:"input-field text-sm flex-1"}),f.jsx("button",{type:"button",onClick:h,disabled:s,className:"btn-ghost text-sm px-3 shrink-0",title:c("browse.title"),children:s?f.jsx(VF,{size:16,className:"animate-spin"}):f.jsx(qN,{size:16})})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:c("form.cancel")}),f.jsx("button",{type:"submit",disabled:!n.trim()||!a.trim(),className:"btn-primary text-sm",children:c("form.create")})]})]})]})})}function ane({onLogout:e,authRequired:t,connected:n,onEvent:r,onClose:a}){var P;const[i,s]=x.useState([]),[l,c]=x.useState({}),[d,h]=x.useState(!1),m=vi(),g=Ig(),{t:v,toggleLang:b}=tt(),{theme:w,toggleTheme:S}=s8(),{enabled:j,supported:k,toggleNotification:_}=HN(),E=((P=m.pathname.match(/^\/projects\/([^/]+)/))==null?void 0:P[1])||null;x.useEffect(()=>{T()},[]),x.useEffect(()=>{const M=()=>T();return window.addEventListener("projects:changed",M),()=>window.removeEventListener("projects:changed",M)},[]),x.useEffect(()=>r(M=>{M.type==="project:status-changed"&&M.projectId&&c(z=>({...z,[M.projectId]:{running:M.running??0,completed:M.completed??0,total:M.total??0}}))}),[r]);function T(){YF().then(M=>{s(M),M.forEach(z=>{QF(z.id).then(L=>{c(F=>({...F,[z.id]:L}))}).catch(()=>{})})}).catch(()=>{})}const A=()=>{a==null||a()},O=async(M,z)=>{try{await WF({name:M,path:z}),h(!1),window.dispatchEvent(new Event("projects:changed"))}catch{}},D=async(M,z)=>{if(z.preventDefault(),z.stopPropagation(),!!confirm(v("projects.deleteConfirm")))try{await ZF(M),s(L=>L.filter(F=>F.id!==M)),window.dispatchEvent(new Event("projects:changed")),E===String(M)&&g("/")}catch{}};return f.jsxs("div",{className:"flex flex-col h-full glass border-none",children:[f.jsx("div",{className:"px-4 pt-5 pb-3",children:f.jsx(Ki,{to:"/",onClick:A,className:"block",children:f.jsxs("svg",{viewBox:"0 0 200 32",fill:"none",className:"h-6 w-auto",children:[f.jsxs("text",{x:"0",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"500",fill:"var(--color-accent)",opacity:"0.5",children:[">","_"]}),f.jsx("text",{x:"38",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"700",fill:"var(--color-accent)",children:"CLI"}),f.jsx("text",{x:"96",y:"24",fontFamily:"'JetBrains Mono', monospace",fontSize:"22",fontWeight:"500",fill:"var(--color-text-primary)",children:"Trigger"})]})})}),f.jsx("nav",{className:"px-3 mb-2",children:f.jsxs(Ki,{to:"/",onClick:A,className:`relative flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 active:scale-95 ${m.pathname==="/"?"font-medium":""}`,style:m.pathname==="/"?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[m.pathname==="/"&&f.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),f.jsx(Wee,{size:16}),v("sidebar.home")]})}),f.jsx("div",{className:"mx-4 border-t",style:{borderColor:"var(--color-border)"}}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-3 pt-3",children:[f.jsxs("div",{className:"px-3 mb-2 flex items-center justify-between",children:[f.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider",style:{color:"var(--color-text-muted)"},children:v("sidebar.workspaces")}),f.jsx("button",{onClick:()=>h(!0),className:"flex items-center justify-center w-5 h-5 rounded-md transition-colors hover:bg-theme-hover",style:{color:"var(--color-text-tertiary)"},title:v("projects.new"),children:f.jsx(sc,{size:14,strokeWidth:2})})]}),f.jsx("div",{className:"space-y-0.5",children:i.map(M=>{const z=l[M.id],L=E===String(M.id),F=z&&z.running>0;return f.jsxs(Ki,{to:`/projects/${M.id}`,onClick:A,className:`relative flex items-center gap-2.5 px-3 py-1.5 rounded-lg text-sm transition-all duration-200 hover:bg-theme-hover active:scale-95 group ${L?"font-medium":""}`,style:L?{backgroundColor:"var(--color-bg-hover)",color:"var(--color-text-primary)",boxShadow:"var(--shadow-soft)"}:{color:"var(--color-text-tertiary)"},children:[L&&f.jsx("span",{className:"absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full",style:{backgroundColor:"var(--color-accent)"}}),f.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${F?"bg-status-running animate-pulse":""}`,style:F?void 0:{backgroundColor:L?"var(--color-accent)":"var(--color-text-faint)"}}),f.jsx("span",{className:"truncate flex-1",children:M.name}),f.jsx("button",{onClick:R=>D(M.id,R),className:"flex-shrink-0 p-0.5 rounded opacity-0 group-hover:opacity-100 transition-all hover:bg-status-error/10",style:{color:"var(--color-text-muted)"},title:v("projects.delete"),children:f.jsx(ga,{size:12,strokeWidth:2})})]},M.id)})})]}),d&&f.jsx(l8,{onSubmit:(M,z)=>O(M,z),onCancel:()=>h(!1)}),f.jsx("div",{className:"px-3 pb-4 pt-2",style:{borderTop:"1px solid var(--color-border)"},children:f.jsxs("div",{className:"flex items-center gap-1 px-1",children:[f.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 mr-1 ${n?"bg-status-success":"bg-status-error"}`,title:n?v("detail.live"):"Disconnected"}),f.jsx("button",{onClick:S,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors",style:{color:"var(--color-text-tertiary)"},title:v(w==="light"?"theme.dark":"theme.light"),children:w==="light"?f.jsx(ute,{size:16}):f.jsx(jte,{size:16})}),f.jsx("button",{onClick:b,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors text-xs font-medium",style:{color:"var(--color-text-tertiary)"},children:v("lang.toggle")}),k&&f.jsx("button",{onClick:_,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors",style:{color:j?"var(--color-accent)":"var(--color-text-tertiary)"},title:"Notification"in window&&Notification.permission==="denied"?v("notification.blocked"):v("notification.toggle"),children:j?f.jsx(tee,{size:16}):f.jsx(JJ,{size:16})}),t&&f.jsx("button",{onClick:e,className:"flex items-center justify-center w-8 h-8 rounded-lg transition-colors ml-auto",style:{color:"var(--color-text-tertiary)"},title:v("projects.logout"),children:f.jsx(rte,{size:16})})]})})]})}const ine=80,QP=120,qi=180,JP=.03,eD=8;function sne(){const e=x.useRef(null),t=x.useRef({x:-1e3,y:-1e3}),n=x.useRef([]),r=x.useRef(0);return x.useEffect(()=>{const a=e.current;if(!a)return;const i=a.getContext("2d");if(!i)return;let s=0,l=0;function c(){const v=a.parentElement;v&&(s=v.clientWidth,l=v.clientHeight,a.width=s*window.devicePixelRatio,a.height=l*window.devicePixelRatio,a.style.width=`${s}px`,a.style.height=`${l}px`,i.setTransform(window.devicePixelRatio,0,0,window.devicePixelRatio,0,0),d())}function d(){n.current=[];for(let v=0;v<ine;v++){const b=Math.random()*s,w=Math.random()*l;n.current.push({x:b,y:w,baseX:b,baseY:w,vx:(Math.random()-.5)*.3,vy:(Math.random()-.5)*.3,size:Math.random()*1.5+.5,alpha:Math.random()*.4+.1})}}function h(v){const b=a.getBoundingClientRect();t.current.x=v.clientX-b.left,t.current.y=v.clientY-b.top}function m(){t.current.x=-1e3,t.current.y=-1e3}function g(){if(!i)return;i.clearRect(0,0,s,l);const v=n.current,b=t.current;for(const w of v){const S=w.x-b.x,j=w.y-b.y,k=Math.sqrt(S*S+j*j);if(k<qi&&k>0){const _=(qi-k)/qi,E=Math.atan2(j,S);w.vx+=Math.cos(E)*_*eD*.05,w.vy+=Math.sin(E)*_*eD*.05}w.vx+=(w.baseX-w.x)*JP,w.vy+=(w.baseY-w.y)*JP,w.baseX+=(Math.random()-.5)*.1,w.baseY+=(Math.random()-.5)*.1,w.baseX<0&&(w.baseX=0),w.baseX>s&&(w.baseX=s),w.baseY<0&&(w.baseY=0),w.baseY>l&&(w.baseY=l),w.vx*=.92,w.vy*=.92,w.x+=w.vx,w.y+=w.vy}for(let w=0;w<v.length;w++){for(let _=w+1;_<v.length;_++){const E=v[w].x-v[_].x,T=v[w].y-v[_].y,A=Math.sqrt(E*E+T*T);if(A<QP){const O=(1-A/QP)*.15;i.beginPath(),i.strokeStyle=`rgba(75, 141, 255, ${O})`,i.lineWidth=.5,i.moveTo(v[w].x,v[w].y),i.lineTo(v[_].x,v[_].y),i.stroke()}}const S=v[w].x-b.x,j=v[w].y-b.y,k=Math.sqrt(S*S+j*j);if(k<qi){const _=(1-k/qi)*.3;i.beginPath(),i.strokeStyle=`rgba(75, 141, 255, ${_})`,i.lineWidth=.8,i.moveTo(v[w].x,v[w].y),i.lineTo(b.x,b.y),i.stroke()}}for(const w of v){const S=w.x-b.x,j=w.y-b.y,k=Math.sqrt(S*S+j*j),_=k<qi?w.alpha+(1-k/qi)*.5:w.alpha;i.beginPath(),i.arc(w.x,w.y,w.size,0,Math.PI*2),i.fillStyle=`rgba(75, 141, 255, ${_})`,i.fill(),k<qi&&(i.beginPath(),i.arc(w.x,w.y,w.size*3,0,Math.PI*2),i.fillStyle=`rgba(75, 141, 255, ${(1-k/qi)*.08})`,i.fill())}r.current=requestAnimationFrame(g)}return c(),a.addEventListener("mousemove",h),a.addEventListener("mouseleave",m),window.addEventListener("resize",c),r.current=requestAnimationFrame(g),()=>{cancelAnimationFrame(r.current),a.removeEventListener("mousemove",h),a.removeEventListener("mouseleave",m),window.removeEventListener("resize",c)}},[]),f.jsx("canvas",{ref:e,className:"absolute inset-0 pointer-events-auto",style:{zIndex:0}})}function one({children:e,onLogout:t,authRequired:n,connected:r,onEvent:a}){const[i,s]=x.useState(!1);return f.jsxs("div",{className:"flex h-screen bg-theme-bg",children:[f.jsx("aside",{className:`
422
+ fixed inset-y-0 left-0 z-40 w-60 flex-shrink-0
423
+ transform transition-transform duration-200 ease-in-out
424
+ md:translate-x-0 md:static md:z-auto
425
+ ${i?"translate-x-0":"-translate-x-full"}
426
+ `,children:f.jsx(ane,{onLogout:t,authRequired:n,connected:r,onEvent:a,onClose:()=>s(!1)})}),i&&f.jsx("div",{className:"fixed inset-0 z-overlay bg-black/50 backdrop-blur-sm md:hidden",onClick:()=>s(!1)}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[f.jsxs("div",{className:"md:hidden flex items-center px-4 py-3 border-b border-theme-border glass z-20",children:[f.jsx("button",{onClick:()=>s(!0),className:"p-1.5 rounded-lg hover:bg-theme-hover transition-colors text-theme-text-secondary",children:f.jsx(ite,{size:20})}),f.jsx("span",{className:"ml-3 text-sm font-semibold text-theme-text",children:"CLITrigger"})]}),f.jsxs("main",{className:"flex-1 overflow-y-auto relative",children:[f.jsx(sne,{}),f.jsx("div",{className:"relative",style:{zIndex:1},children:e})]})]})]})}const lne={sm:{wrapper:"py-8",iconBox:"w-10 h-10 rounded-xl",iconSize:20,title:"text-sm",desc:"text-xs"},md:{wrapper:"py-12",iconBox:"w-14 h-14 rounded-2xl",iconSize:28,title:"text-sm",desc:"text-xs"},lg:{wrapper:"py-20",iconBox:"w-16 h-16 rounded-2xl",iconSize:32,title:"text-base",desc:"text-sm"}};function xl({icon:e,title:t,description:n,action:r,size:a="md",className:i}){const s=lne[a],l=r==null?void 0:r.icon;return f.jsxs("div",{className:Eu("text-center animate-fade-in",s.wrapper,i),children:[e&&f.jsx("div",{className:Eu("inline-flex items-center justify-center mb-4 bg-theme-hover",s.iconBox),children:f.jsx(e,{size:s.iconSize,strokeWidth:1.5,className:"text-theme-muted"})}),f.jsx("p",{className:Eu("font-medium text-theme-text-secondary",s.title),children:t}),n&&f.jsx("p",{className:Eu("mt-1 text-theme-muted",s.desc),children:n}),r&&f.jsxs("button",{onClick:r.onClick,className:"btn-primary btn-sm mt-4 inline-flex items-center gap-1.5",children:[l&&f.jsx(l,{size:14}),r.label]})]})}function une({onEvent:e}){const[t,n]=x.useState([]),[r,a]=x.useState({}),[i,s]=x.useState(!1),[l,c]=x.useState(!0),[d,h]=x.useState(""),{t:m}=tt();x.useEffect(()=>{YF().then(w=>{n(w),w.forEach(S=>{QF(S.id).then(j=>{a(k=>({...k,[S.id]:j}))}).catch(()=>{})})}).catch(()=>{}).finally(()=>c(!1))},[]),x.useEffect(()=>e(w=>{w.type==="project:status-changed"&&w.projectId&&a(S=>({...S,[w.projectId]:{running:w.running??0,completed:w.completed??0,total:w.total??0}}))}),[e]);const g=async(w,S)=>{try{const j=await WF({name:w,path:S});n(k=>[...k,j]),s(!1),window.dispatchEvent(new Event("projects:changed"))}catch{}},v=async(w,S,j=!1)=>{if(S.preventDefault(),S.stopPropagation(),!(!j&&!confirm(m("projects.deleteConfirm"))))try{await ZF(w),n(k=>k.filter(_=>_.id!==w)),window.dispatchEvent(new Event("projects:changed"))}catch{}},b=d?t.filter(w=>w.name.toLowerCase().includes(d.toLowerCase())||w.path.toLowerCase().includes(d.toLowerCase())):t;return f.jsx("div",{className:"px-6 py-6 sm:px-8 sm:py-8 min-h-full",children:f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between gap-4 mb-8",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-3xl font-bold tracking-tight text-primary",children:m("projects.title")}),f.jsxs("p",{className:"text-sm mt-1 text-secondary",children:[b.length," ",m("projects.tasks")]})]}),f.jsxs("button",{onClick:()=>s(!0),className:"btn-primary",children:[f.jsx(sc,{size:20,strokeWidth:2.5}),f.jsx("span",{className:"hidden sm:inline font-bold",children:m("projects.new")})]})]}),f.jsxs("div",{className:"mb-8 relative group",children:[f.jsx(qg,{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted group-focus-within:text-accent transition-colors",size:20,strokeWidth:2}),f.jsx("input",{type:"text",value:d,onChange:w=>h(w.target.value),placeholder:m("projects.search"),className:"input-field pl-12 py-3 text-base shadow-soft"})]}),l?f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[...Array(6)].map((w,S)=>f.jsxs("div",{className:"card p-5 space-y-3",children:[f.jsx(Ke,{className:"h-5 w-2/3"}),f.jsx(Ke,{className:"h-3 w-full"}),f.jsx("div",{className:"flex gap-2",children:f.jsx(Ke,{className:"h-5 w-12 rounded-full"})}),f.jsxs("div",{className:"flex gap-2 pt-2",children:[f.jsx(Ke,{className:"h-6 w-16"}),f.jsx(Ke,{className:"h-6 w-16"})]}),f.jsx(Ke,{className:"h-1 w-full mt-2"})]},S))}):b.length===0?f.jsx(xl,{icon:qN,title:m("projects.empty"),description:m("projects.emptyHint"),size:"lg"}):f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map((w,S)=>{const j=r[w.id]||{total:0,completed:0,running:0},k=w.path_exists===!1,_=k?"div":Ki,E=k?{onClick:T=>{confirm(m("projects.pathMissingConfirm"))&&v(w.id,T,!0)},className:"card group block p-5 opacity-50 relative cursor-pointer animate-fade-in"}:{to:`/projects/${w.id}`,className:"card group block p-5 relative hover:border-accent/30 animate-fade-in"};return f.jsxs(_,{...E,style:{animationDelay:`${S*50}ms`},children:[f.jsx("button",{onClick:T=>v(w.id,T),className:"absolute top-3 right-3 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 transition-all hover:bg-status-error/10 text-theme-muted",title:m("projects.delete"),children:f.jsx(ga,{size:14,strokeWidth:2})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center text-sm font-bold flex-shrink-0 bg-theme-bg-tertiary text-theme-text-secondary",children:w.name.charAt(0).toUpperCase()}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("h3",{className:"text-sm font-semibold truncate text-theme-text",children:w.name}),f.jsx("p",{className:"text-2xs font-mono truncate text-theme-muted",children:w.path.split(/[/\\]/).slice(-2).join("/")})]})]}),f.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[j.running>0&&f.jsxs("span",{className:"inline-flex items-center gap-1 text-status-running font-medium",children:[f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-running"}),j.running]}),f.jsxs("span",{className:"text-theme-muted",children:[j.completed,"/",j.total]})]}),j.total>0&&f.jsxs("span",{className:"text-2xs font-medium text-theme-muted",children:[Math.round(j.completed/j.total*100),"%"]})]}),j.total>0&&f.jsx("div",{className:"mt-1.5 h-1 rounded-full overflow-hidden bg-theme-bg-tertiary",children:f.jsx("div",{className:"h-full rounded-full transition-all duration-500 bg-accent",style:{width:`${j.completed/j.total*100}%`}})})]},w.id)})}),i&&f.jsx(l8,{onSubmit:(w,S)=>g(w,S),onCancel:()=>s(!1)})]})})}function E0(e){return mt(`/api/projects/${e}/todos`)}function A0(e,t){return qe(`/api/projects/${e}/todos`,t)}function Am(e,t){return oo(`/api/todos/${e}`,t)}function cne(e){return $a(`/api/todos/${e}`)}function tD(e,t="headless"){return qe(`/api/todos/${e}/start`,{mode:t})}function dne(e){return qe(`/api/todos/${e}/stop`)}function u8(e){return mt(`/api/todos/${e}/logs`)}function c8(e){return mt(`/api/todos/${e}/diff`)}function d8(e){return mt(`/api/todos/${e}/result`)}function fne(e){return qe(`/api/todos/${e}/merge`)}function hne(e){return qe(`/api/todos/${e}/merge-chain`)}function mne(e,t=!0){return qe(`/api/todos/${e}/cleanup`,{delete_branch:t})}function pne(e,t="headless"){return qe(`/api/todos/${e}/retry`,{mode:t})}function gne(e,t,n="headless"){return qe(`/api/todos/${e}/continue`,{prompt:t,mode:n})}function UN(e,t){return qe(`/api/todos/${e}/images`,{images:t})}function f8(e,t){return $a(`/api/todos/${e}/images/${t}`)}function tf(e,t){return`/api/todos/${e}/images/${t}`}function nD(e){return mt(`/api/projects/${e}/schedules`)}function vne(e,t){return qe(`/api/projects/${e}/schedules`,t)}function yne(e,t){return oo(`/api/schedules/${e}`,t)}function xne(e,t,n=!1){return qe(`/api/todos/${e}/schedule`,{run_at:t,keep_original:n})}function bne(e){return $a(`/api/schedules/${e}`)}function wne(e){return qe(`/api/schedules/${e}/activate`)}function Sne(e){return qe(`/api/schedules/${e}/pause`)}function T0(e){return mt(`/api/schedules/${e}/runs`)}function jne(e){return qe(`/api/schedules/${e}/trigger`)}function _ne(){return mt("/api/rate-limit")}function kne(e,t){return qe(`/api/todos/${e}/schedule-on-reset`,{prompt:t})}function h8(e){return mt(`/api/projects/${e}/agents`)}function Cne(e,t){return qe(`/api/projects/${e}/agents`,t)}function Nne(e,t){return oo(`/api/agents/${e}`,t)}function Ene(e){return $a(`/api/agents/${e}`)}function rD(e){return mt(`/api/projects/${e}/discussions`)}function Ane(e,t){return qe(`/api/projects/${e}/discussions`,t)}function Io(e){return mt(`/api/discussions/${e}`)}function Tne(e,t){return oo(`/api/discussions/${e}`,t)}function One(e){return $a(`/api/discussions/${e}`)}function m8(e){return qe(`/api/discussions/${e}/start`)}function p8(e){return qe(`/api/discussions/${e}/stop`)}function Mne(e,t){return qe(`/api/discussions/${e}/inject`,{content:t})}function Pne(e){return qe(`/api/discussions/${e}/skip-turn`)}function Dne(e,t){return qe(`/api/discussions/${e}/implement`,{agent_id:t})}function Rne(e,t){return mt(`/api/discussions/${e}/logs`)}function Ine(e){return qe(`/api/discussions/${e}/merge`)}function Lne(e){return qe(`/api/discussions/${e}/cleanup`)}function zne(e){return mt(`/api/projects/${e}/sessions`)}function $ne(e,t){return qe(`/api/projects/${e}/sessions`,t)}function qne(e){return $a(`/api/sessions/${e}`)}function Bne(e){return qe(`/api/sessions/${e}/start`)}function Fne(e){return qe(`/api/sessions/${e}/stop`)}function Hne(e){return mt(`/api/sessions/${e}/logs`)}function Une(e,t=!0){return qe(`/api/sessions/${e}/cleanup`,{delete_branch:t})}function Tm(e){return mt(`/api/projects/${e}/planner`)}function Om(e){return mt(`/api/projects/${e}/planner/tags`)}function Gne(e,t,n){return oo(`/api/projects/${e}/planner/tags/${encodeURIComponent(t)}`,n)}function Vne(e,t){return $a(`/api/projects/${e}/planner/tags/${encodeURIComponent(t)}`)}function Kne(e,t){return qe(`/api/projects/${e}/planner`,t)}function Yne(e,t){return oo(`/api/planner/${e}`,t)}function Wne(e){return $a(`/api/planner/${e}`)}function Xne(e,t){return qe(`/api/planner/${e}/convert-to-todo`,t)}function g8(e,t){return qe(`/api/planner/${e}/images`,{images:t})}function v8(e,t){return $a(`/api/planner/${e}/images/${t}`)}function y8(e,t){return`/api/planner/${e}/images/${t}`}function Zne(e,t){return qe(`/api/planner/${e}/convert-to-schedule`,t)}async function Qne(e){const t=await fetch(`/api/projects/${e}/planner/export`,{credentials:"include"});if(t.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Unauthorized");if(!t.ok){const s=await t.text().catch(()=>t.statusText);let l=s;try{const c=JSON.parse(s);c.error&&(l=c.error)}catch{}throw new Error(l||"Export failed")}const r=(t.headers.get("Content-Disposition")||"").match(/filename="?([^"]+)"?/i),a=r?r[1]:`planner-${e}.json`;return{blob:await t.blob(),filename:a}}function Jne(e,t){return qe(`/api/projects/${e}/planner/import`,t)}function ere(e,t){return mt(`/api/plugins/${e}/config/${t}`)}function tre(e,t,n){return oo(`/api/plugins/${e}/config/${t}`,n)}function nre(){return mt("/api/cli/status")}function rre(){return qe("/api/cli/status/refresh")}function x8(){return mt("/api/models")}function are(e,t,n){return qe("/api/models",{cliTool:e,modelValue:t,modelLabel:n})}function ire(e){return $a(`/api/models/${e}`)}const oC=[{value:"claude",label:"Claude Code",supportsInteractive:!0,models:[{value:"",label:"Default"},{value:"claude-sonnet-4-6",label:"Claude Sonnet 4.6"},{value:"claude-opus-4-6",label:"Claude Opus 4.6"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5"}]},{value:"gemini",label:"Gemini CLI",supportsInteractive:!0,models:[{value:"",label:"Default (Gemini 2.5 Pro)"}]},{value:"codex",label:"Codex CLI",supportsInteractive:!0,models:[{value:"",label:"Default"},{value:"gpt-4.1",label:"GPT-4.1"},{value:"gpt-4.1-mini",label:"GPT-4.1 Mini"},{value:"gpt-4.1-nano",label:"GPT-4.1 Nano"},{value:"o3",label:"o3"},{value:"o4-mini",label:"o4-mini"}]}],ai=oC;let Yi=null,Pd=null;function b8(){return Pd||(Pd=x8().then(e=>{Yi=e}).catch(()=>{Yi=null}),Pd)}function sre(){return Pd=null,Yi=null,b8()}function $u(e){const t=oC.find(n=>n.value===e)??oC[0];if(Yi&&Yi[e]){const n=[],r=[];for(const a of Yi[e])a.deprecated?r.push({value:a.value,label:`${a.label} (deprecated)`,deprecated:!0}):n.push({value:a.value,label:a.label});return{...t,models:[...n,...r]}}return t}function ore(e,t){if(!Yi||!Yi[e])return!1;const n=Yi[e].find(r=>r.value===t);return!!(n!=null&&n.deprecated)}function oc(){const[e,t]=x.useState(!1),[,n]=x.useState(0);x.useEffect(()=>{b8().then(()=>t(!0))},[]);const r=x.useCallback(()=>{sre().then(()=>n(i=>i+1))},[]),a=x.useCallback(i=>$u(i),[e]);return{loaded:e,refresh:r,getToolConfig:a}}function lre(){const{t:e}=tt(),{refresh:t}=oc(),[n,r]=x.useState({}),[a,i]=x.useState("claude"),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState(!1),[g,v]=x.useState(""),b=()=>{x8().then(r).catch(()=>{})};x.useEffect(()=>{b()},[]);const w=async()=>{if(!(!s.trim()||!c.trim())){m(!0),v("");try{await are(a,s.trim(),c.trim()),l(""),d(""),b(),t()}catch(k){k instanceof Error&&v(k.message)}finally{m(!1)}}},S=async k=>{try{await ire(k),b(),t()}catch{}},j=n[a]||[];return f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-3",children:e("header.modelSettings")||"AI Model Settings"}),f.jsx("div",{className:"flex gap-1.5 mb-4",children:ai.map(k=>f.jsx("button",{type:"button",onClick:()=>{i(k.value),v("")},className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${a===k.value?"bg-accent text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:k.label},k.value))}),f.jsx("div",{className:"space-y-1.5 mb-4",children:j.map(k=>f.jsxs("div",{className:`flex items-center justify-between px-3 py-2 rounded-lg bg-warm-50 ${k.deprecated?"opacity-60":""}`,children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:`text-xs font-medium ${k.deprecated?"text-warm-400 line-through":"text-warm-700"}`,children:k.label}),k.value&&f.jsx("span",{className:"ml-2 text-2xs text-warm-400 font-mono",children:k.value}),k.isDefault&&f.jsx("span",{className:"ml-2 text-2xs text-warm-300",children:"(built-in)"}),k.deprecated&&f.jsx("span",{className:"ml-2 text-2xs text-status-warning font-medium",children:e("header.modelDeprecated")||"(deprecated)"})]}),!k.isDefault&&f.jsx("button",{type:"button",onClick:()=>S(k.id),className:"text-warm-300 hover:text-status-error transition-colors p-1",children:f.jsx(ga,{size:14})})]},k.id))}),f.jsxs("div",{className:"flex gap-2 items-end",children:[f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{className:"block text-2xs font-medium text-warm-400 mb-1",children:e("header.modelValue")||"Model ID"}),f.jsx("input",{type:"text",value:s,onChange:k=>l(k.target.value),placeholder:"e.g. claude-sonnet-4-7",className:"input-field text-xs"})]}),f.jsxs("div",{className:"flex-1",children:[f.jsx("label",{className:"block text-2xs font-medium text-warm-400 mb-1",children:e("header.modelLabel")||"Display Name"}),f.jsx("input",{type:"text",value:c,onChange:k=>d(k.target.value),placeholder:"e.g. Claude Sonnet 4.7",className:"input-field text-xs"})]}),f.jsx("button",{type:"button",onClick:w,disabled:h||!s.trim()||!c.trim(),className:"btn-primary text-xs px-3 py-2 flex-shrink-0",children:h?"...":e("header.addModel")||"Add"})]}),g&&f.jsx("p",{className:"text-xs text-status-error mt-1.5",children:g}),f.jsx("p",{className:"text-2xs text-warm-300 mt-3",children:e("header.modelSettingsHint")||"Add custom models here. They will appear in model dropdowns across all projects."})]})}function ure({model:e,onOpenSettings:t}){const{t:n}=tt(),[r,a]=x.useState(!1),[i,s]=x.useState(!1),l=x.useRef(null),c=x.useRef(null),[d,h]=x.useState({top:0,left:0}),m=x.useCallback(()=>{if(!l.current)return;const g=l.current.getBoundingClientRect(),v=window.innerWidth,b=window.innerHeight,w=c.current,S=(w==null?void 0:w.offsetWidth)??320,j=(w==null?void 0:w.offsetHeight)??200;let k=g.bottom+6,_=g.left;_+S>v-8&&(_=v-8-S),_<8&&(_=8),k+j>b-8&&(k=g.top-j-6),k<8&&(k=8),h({top:k,left:_}),s(!0)},[]);return x.useEffect(()=>{if(!r){s(!1);return}m();const g=requestAnimationFrame(m);return window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{cancelAnimationFrame(g),window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[r,m]),f.jsxs(f.Fragment,{children:[f.jsxs("span",{ref:l,className:"badge bg-status-warning/15 text-status-warning inline-flex items-center gap-1 cursor-help",tabIndex:0,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[f.jsx(Np,{size:10}),n("header.modelDeprecated")||"Model deprecated"]}),r&&vl.createPortal(f.jsxs("div",{ref:c,role:"tooltip",className:"fixed w-80 p-3 rounded-lg shadow-elevated text-xs leading-relaxed z-tooltip",style:{top:d.top,left:d.left,opacity:i?1:0,backgroundColor:"var(--color-bg-card)",borderColor:"var(--color-border)",borderWidth:"1px",color:"var(--color-text-primary)"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[f.jsxs("div",{className:"flex items-center gap-1.5 font-semibold text-status-warning mb-1.5 flex-wrap",children:[f.jsx(Np,{size:12}),n("header.modelDeprecatedTitle"),f.jsx("code",{className:"ml-1 px-1 py-0.5 rounded text-[10px] font-mono",style:{backgroundColor:"var(--color-bg-tertiary)"},children:e})]}),f.jsx("p",{className:"mb-2",style:{color:"var(--color-text-secondary)"},children:n("header.modelDeprecatedReason")}),f.jsx("div",{className:"font-semibold mb-1",children:n("header.modelDeprecatedFixHeading")}),f.jsxs("ul",{className:"list-disc pl-4 space-y-0.5 mb-2",style:{color:"var(--color-text-secondary)"},children:[f.jsx("li",{children:n("header.modelDeprecatedFix1")}),f.jsx("li",{children:n("header.modelDeprecatedFix2")}),f.jsx("li",{children:n("header.modelDeprecatedFix3")})]}),f.jsx("button",{type:"button",onMouseDown:g=>{g.preventDefault(),t(),a(!1)},className:"btn-primary text-xs px-2.5 py-1",children:n("header.modelDeprecatedOpenSettings")})]}),document.body)]})}function cre({project:e,todos:t,onStartAll:n,onStopAll:r,onProjectUpdate:a}){var _e;const i=t.some(fe=>fe.status==="pending"||fe.status==="failed"||fe.status==="stopped"),s=t.some(fe=>fe.status==="running"),{t:l}=tt(),[c,d]=x.useState(!1),[h,m]=x.useState("execution"),[g,v]=x.useState(!1),[b,w]=x.useState(e.name),S=x.useRef(null),[j,k]=x.useState(e.max_concurrent??3),[_,E]=x.useState(e.default_max_turns??30),[T,A]=x.useState(e.cli_tool||"claude"),[O,D]=x.useState(e.claude_model??""),[P,M]=x.useState(e.claude_options??""),[z,L]=x.useState(e.sandbox_mode||"strict"),[F,R]=x.useState(!!e.debug_logging),[I,q]=x.useState(!!e.show_token_usage),[G,Y]=x.useState(e.use_worktree!==0),[K,B]=x.useState(!1),[U,X]=x.useState(!1),[H,W]=x.useState(!1),[Q,J]=x.useState([]),[re,oe]=x.useState(!1),[Z,le]=x.useState({}),[ie,ee]=x.useState(()=>{try{return e.cli_fallback_chain?JSON.parse(e.cli_fallback_chain):[]}catch{return[]}});x.useEffect(()=>{const fe=aC();Promise.all(fe.map(async Oe=>{try{const ze=await ere(Oe.id,e.id);return[Oe.id,ze]}catch{return[Oe.id,{}]}})).then(Oe=>{const ze={};for(const[ut,gt]of Oe)ze[ut]=gt;le(ze)})},[e.id]);const{getToolConfig:ae,refresh:xe}=oc();x.useEffect(()=>{c&&nre().then(fe=>{J(fe),xe()}).catch(()=>{}).finally(()=>oe(!0))},[c,xe]);const ye=Q.find(fe=>fe.tool===T),Te=x.useCallback(()=>{oe(!1),rre().then(fe=>{J(fe),xe()}).catch(()=>{}).finally(()=>oe(!0))},[xe]),Me=fe=>{A(fe),D("")},he=ae(T),Ie=x.useCallback(async()=>{W(!0);try{const fe=await Bte(e.id);a(fe)}catch{}finally{W(!1)}},[e.id,a]),Je=(fe,Oe)=>{le(ze=>({...ze,[fe]:{...ze[fe],...Oe}}))},We=async()=>{var fe,Oe,ze,ut,gt,_t,ct,Ae,$e,Xe,pt,at,Et,Ze;X(!0);try{const Ot=!G&&e.is_git_repo?1:j,zt=await KP(e.id,{max_concurrent:Ot,default_max_turns:_,cli_tool:T,sandbox_mode:z,debug_logging:F?1:0,use_worktree:G?1:0,show_token_usage:I?1:0,claude_model:O||null,claude_options:P||null,cli_fallback_chain:ie.length>0?JSON.stringify(ie):null,gstack_enabled:((fe=Z.gstack)==null?void 0:fe.enabled)==="1"?1:0,gstack_skills:((Oe=Z.gstack)==null?void 0:Oe.skills)||null,jira_enabled:((ze=Z.jira)==null?void 0:ze.enabled)==="1"?1:0,jira_base_url:((ut=Z.jira)==null?void 0:ut.base_url)||null,jira_email:((gt=Z.jira)==null?void 0:gt.email)||null,jira_api_token:((_t=Z.jira)==null?void 0:_t.api_token)||null,jira_project_key:((ct=Z.jira)==null?void 0:ct.project_key)||null,notion_enabled:((Ae=Z.notion)==null?void 0:Ae.enabled)==="1"?1:0,notion_api_key:(($e=Z.notion)==null?void 0:$e.api_key)||null,notion_database_id:((Xe=Z.notion)==null?void 0:Xe.database_id)||null,github_enabled:((pt=Z.github)==null?void 0:pt.enabled)==="1"?1:0,github_token:((at=Z.github)==null?void 0:at.token)||null,github_owner:((Et=Z.github)==null?void 0:Et.owner)||null,github_repo:((Ze=Z.github)==null?void 0:Ze.repo)||null});await Promise.all(Object.entries(Z).map(([hn,ne])=>tre(hn,e.id,ne))),a(zt),d(!1)}catch{}finally{X(!1)}},it=async()=>{const fe=b.trim();if(!fe||fe===e.name){w(e.name),v(!1);return}try{const Oe=await KP(e.id,{name:fe});a(Oe)}catch{w(e.name)}v(!1)},Ce=t.length,He=t.filter(fe=>fe.status==="completed"||fe.status==="merged").length,ge=t.filter(fe=>fe.status==="running").length,ue=Ce>0?Math.round(He/Ce*100):0;return f.jsxs("div",{className:"mb-6",children:[f.jsxs("div",{className:"card p-5 sm:p-6",children:[f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[g?f.jsx("input",{ref:S,type:"text",value:b,onChange:fe=>w(fe.target.value),onBlur:it,onKeyDown:fe=>{fe.key==="Enter"&&it(),fe.key==="Escape"&&(w(e.name),v(!1))},className:"text-lg sm:text-xl font-semibold text-warm-800 bg-transparent border-b-2 border-accent outline-none w-full max-w-md",autoFocus:!0}):f.jsxs("h1",{className:"text-lg sm:text-xl font-semibold text-warm-800 truncate cursor-pointer hover:text-accent transition-colors group flex items-center gap-2",onClick:()=>{v(!0),w(e.name)},title:l("header.editName"),children:[e.name,f.jsx(Mf,{size:14,className:"opacity-0 group-hover:opacity-50 transition-opacity flex-shrink-0"})]}),f.jsxs("button",{type:"button",className:"mt-0.5 text-[11px] text-warm-400 font-mono truncate hover:text-accent transition-colors cursor-pointer flex items-center gap-1 max-w-full",title:l("header.openFolder"),onClick:()=>Lte(e.path),children:[f.jsx(qN,{size:12,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:e.path})]})]}),f.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[f.jsx("button",{onClick:()=>d(!c),className:"btn-ghost text-sm",title:l("header.settings"),children:f.jsx(vte,{size:16})}),f.jsxs("button",{onClick:n,disabled:!i,className:"btn-ghost text-sm",children:[f.jsx(yl,{size:16}),l("header.runAll")]}),f.jsxs("button",{onClick:r,disabled:!s,className:"btn-ghost text-sm",children:[f.jsx(Bg,{size:16}),l("header.stopAll")]})]})]}),f.jsx("div",{className:"my-4 border-t",style:{borderColor:"var(--color-border)"}}),f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[f.jsxs("div",{className:"flex flex-wrap gap-1.5 flex-1",children:[e.is_git_repo?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:"Git"}),f.jsxs("span",{className:"badge bg-warm-200/60 text-warm-600",children:[l("header.branch"),": ",e.default_branch]})]}):f.jsx("span",{className:"badge bg-status-warning/10 text-status-warning",children:l("header.noGit")}),f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:ae(e.cli_tool||"claude").label}),f.jsx("span",{className:"badge bg-warm-200/60 text-warm-600",children:(e.sandbox_mode||"strict")==="strict"?l("header.sandboxBadgeStrict"):l("header.sandboxBadgePermissive")}),e.claude_model&&ore(e.cli_tool||"claude",e.claude_model)&&f.jsx(ure,{model:e.claude_model,onOpenSettings:()=>{m("execution"),d(!0)}})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[ge>0&&f.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-status-running font-medium",children:[f.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-status-running animate-pulse"}),ge," ",l("projects.active")]}),f.jsxs("span",{className:"text-xs font-medium text-warm-500",children:[ue,"% ",f.jsxs("span",{className:"text-warm-400",children:[He,"/",Ce]})]})]})]})]}),c&&f.jsxs("div",{className:"mt-5 card p-6 animate-fade-in",children:[f.jsx("div",{className:"flex gap-1 mb-5 p-0.5 rounded-lg",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[{key:"execution",label:l("header.config")},{key:"security",label:l("header.sandboxTitle")},{key:"plugins",label:l("tabs.plugins")||"Plugins"}].map(fe=>f.jsx("button",{onClick:()=>m(fe.key),className:`px-3 py-1.5 text-xs font-medium rounded-md transition-all ${h===fe.key?"text-warm-800 shadow-soft":"text-warm-500 hover:text-warm-700"}`,style:h===fe.key?{backgroundColor:"var(--color-bg-card)"}:void 0,children:fe.label},fe.key))}),h==="execution"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.maxWorkers")}),f.jsx("input",{type:"number",min:1,max:10,value:j,onChange:fe=>k(Math.min(10,Math.max(1,parseInt(fe.target.value,10)||1))),className:"input-field"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("settings.defaultMaxTurns")}),f.jsx("input",{type:"number",min:5,max:200,value:_,onChange:fe=>E(Math.min(200,Math.max(5,parseInt(fe.target.value,10)||30))),className:"input-field"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:l("settings.defaultMaxTurnsHint")})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.cliTool")}),f.jsx("select",{value:T,onChange:fe=>Me(fe.target.value),className:"input-field",children:ai.map(fe=>f.jsx("option",{value:fe.value,children:fe.label},fe.value))}),T==="claude"&&f.jsxs("a",{href:"https://claude.ai/settings/usage",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-1.5 text-xs text-accent hover:text-accent-dark transition-colors",children:[f.jsx(oee,{size:12}),l("header.usageLimit")]}),re&&ye&&f.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${ye.installed?"bg-status-success":"bg-status-error"}`}),f.jsx("span",{className:"text-2xs text-warm-400",children:ye.installed?ye.version||l("header.cliInstalled"):l("header.cliNotFound")}),f.jsx("button",{type:"button",onClick:Te,className:"text-warm-400 hover:text-warm-600 transition-colors ml-1",title:l("header.cliRefresh"),children:f.jsx($g,{size:12})})]}),re&&ye&&!ye.installed&&f.jsx("div",{className:"mt-2 p-2.5 bg-status-warning/5 border border-status-warning/20 rounded-xl",children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Np,{size:16,className:"text-status-warning flex-shrink-0 mt-0.5"}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs font-medium text-status-warning",children:l("header.cliNotInstalled").replace("{tool}",((_e=ai.find(fe=>fe.value===T))==null?void 0:_e.label)||T)}),f.jsx("code",{className:"block mt-1 text-2xs text-warm-500 bg-warm-100 px-2 py-1 rounded select-all",children:l(`header.cliInstallHint.${T}`)})]})]})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.aiModel")}),f.jsx("select",{value:O,onChange:fe=>D(fe.target.value),className:"input-field",children:he.models.map(fe=>f.jsx("option",{value:fe.value,children:fe.label},fe.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("header.cliFlags")}),f.jsx("input",{type:"text",value:P,onChange:fe=>M(fe.target.value),placeholder:"--verbose",className:"input-field"})]})]}),f.jsxs("div",{className:"mt-5 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-600 mb-2",children:l("header.fallbackChainTitle")}),f.jsx("p",{className:"text-2xs text-warm-400 mb-3",children:l("header.fallbackChainHint")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:ai.map(fe=>{const Oe=ie.indexOf(fe.value),ze=Oe!==-1;return f.jsxs("button",{type:"button",onClick:()=>{ee(ut=>ze?ut.filter(gt=>gt!==fe.value):[...ut,fe.value])},className:`px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${ze?"bg-accent/10 border-accent text-accent":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[ze&&f.jsxs("span",{className:"mr-1 font-bold",children:[Oe+1,"."]}),fe.label]},fe.value)})}),ie.length>0&&f.jsx("p",{className:"text-2xs text-warm-500 mt-2",children:ie.map(fe=>{var Oe;return((Oe=ai.find(ze=>ze.value===fe))==null?void 0:Oe.label)??fe}).join(" → ")})]})]}),h==="security"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.sandboxTitle")}),f.jsxs("div",{className:"flex gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>L("strict"),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${z==="strict"?"bg-status-success/10 border-status-success text-status-success":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.sandboxStrict")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.sandboxStrictDesc")})]}),f.jsxs("button",{type:"button",onClick:()=>{z!=="permissive"&&B(!0)},className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${z==="permissive"?"bg-status-warning/10 border-status-warning text-status-warning":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.sandboxPermissive")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.sandboxPermissiveDesc")})]})]}),z==="permissive"&&f.jsx("p",{className:"text-2xs text-status-warning mt-2",children:l("header.sandboxWarning")})]}),K&&f.jsx(ts,{open:!0,onClose:()=>B(!1),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-2xl p-6 shadow-xl",children:[f.jsx("p",{className:"text-sm text-warm-700 mb-4",children:l("header.sandboxWarning")}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{onClick:()=>B(!1),className:"btn-ghost text-sm",children:l("header.cancel")}),f.jsx("button",{onClick:()=>{L("permissive"),B(!1)},className:"btn-danger text-sm",children:l("header.sandboxPermissive")})]})]})}),e.is_git_repo?f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.worktreeTitle")}),f.jsxs("div",{className:"flex gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>Y(!0),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${G?"bg-status-success/10 border-status-success text-status-success":"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.worktreeEnabled")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.worktreeEnabledDesc")})]}),f.jsxs("button",{type:"button",onClick:()=>Y(!1),className:`flex-1 px-4 py-3 rounded-lg border text-left transition-colors ${G?"bg-warm-50 border-warm-200 text-warm-500 hover:border-warm-300":"bg-status-warning/10 border-status-warning text-status-warning"}`,children:[f.jsx("div",{className:"text-xs font-semibold",children:l("header.worktreeDisabled")}),f.jsx("div",{className:"text-2xs mt-1 opacity-80",children:l("header.worktreeDisabledDesc")})]})]}),!G&&f.jsx("p",{className:"text-2xs text-status-warning mt-2",children:l("header.worktreeWarning")})]}):null,f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.showTokenUsageTitle")}),f.jsx("p",{className:"text-2xs text-warm-500 mb-3",children:l("header.showTokenUsageDesc")}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:I,onChange:fe=>q(fe.target.checked),className:"rounded"}),f.jsx("span",{className:"text-xs text-warm-600",children:l("header.showTokenUsageEnable")})]})]}),f.jsxs("div",{className:"mt-6 p-4 border border-warm-200 rounded-xl",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700 mb-2",children:l("header.debugLoggingTitle")}),f.jsx("p",{className:"text-2xs text-warm-500 mb-3",children:l("header.debugLoggingDesc")}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:F,onChange:fe=>R(fe.target.checked),className:"rounded"}),f.jsx("span",{className:"text-xs text-warm-600",children:l("header.debugLoggingEnable")})]})]})]}),h==="plugins"&&f.jsxs(f.Fragment,{children:[aC().map(fe=>f.jsx("div",{className:"mt-6",children:f.jsx(fe.SettingsComponent,{project:e,config:Z[fe.id]||{},onConfigChange:Oe=>Je(fe.id,Oe)})},fe.id)),f.jsx(lre,{})]}),!e.is_git_repo&&f.jsxs("div",{className:"mt-5 p-3 bg-status-warning/5 border border-status-warning/20 rounded-xl",children:[f.jsx("p",{className:"text-xs text-warm-600 mb-2",children:l("header.noGitHint")}),f.jsx("button",{onClick:Ie,disabled:H,className:"btn-ghost text-xs",children:H?"...":l("header.recheckGit")})]}),f.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[f.jsx("button",{onClick:()=>d(!1),className:"btn-ghost text-sm",children:l("header.cancel")}),f.jsx("button",{onClick:We,disabled:U,className:"btn-primary text-sm",children:l(U?"header.saving":"header.save")})]})]})]})}function GN({status:e}){const{t}=tt(),n={pending:{labelKey:"status.pending",classes:"bg-warm-200 text-warm-500",icon:f.jsx(Qd,{size:10})},running:{labelKey:"status.running",classes:"bg-status-running/10 text-status-running",icon:f.jsx(VF,{size:10,className:"animate-spin"})},completed:{labelKey:"status.completed",classes:"bg-status-success/10 text-status-success",icon:f.jsx(UF,{size:10})},failed:{labelKey:"status.failed",classes:"bg-status-error/10 text-status-error",icon:f.jsx(jee,{size:10})},stopped:{labelKey:"status.stopped",classes:"bg-status-warning/10 text-status-warning",icon:f.jsx(wee,{size:10})},merged:{labelKey:"status.merged",classes:"bg-status-merged/10 text-status-merged",icon:f.jsx(Of,{size:10})}},{labelKey:r,classes:a,icon:i}=n[e];return f.jsxs("span",{className:`badge text-2xs font-semibold ${a}`,children:[i,t(r)]})}function dre(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mre={};function aD(e,t){return(mre.jsx?hre:fre).test(e)}const pre=/[ \t\n\f\r]/g;function gre(e){return typeof e=="object"?e.type==="text"?iD(e.value):!1:iD(e)}function iD(e){return e.replace(pre,"")===""}class Pf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Pf.prototype.normal={};Pf.prototype.property={};Pf.prototype.space=void 0;function w8(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Pf(n,r,t)}function lC(e){return e.toLowerCase()}class Mr{constructor(t,n){this.attribute=n,this.property=t}}Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let vre=0;const ht=bl(),On=bl(),uC=bl(),De=bl(),Zt=bl(),Pu=bl(),Ur=bl();function bl(){return 2**++vre}const cC=Object.freeze(Object.defineProperty({__proto__:null,boolean:ht,booleanish:On,commaOrSpaceSeparated:Ur,commaSeparated:Pu,number:De,overloadedBoolean:uC,spaceSeparated:Zt},Symbol.toStringTag,{value:"Module"})),O0=Object.keys(cC);class VN extends Mr{constructor(t,n,r,a){let i=-1;if(super(t,n),sD(this,"space",a),typeof r=="number")for(;++i<O0.length;){const s=O0[i];sD(this,O0[i],(r&cC[s])===cC[s])}}}VN.prototype.defined=!0;function sD(e,t,n){n&&(e[t]=n)}function lc(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new VN(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[lC(r)]=r,n[lC(i.attribute)]=r}return new Pf(t,n,e.space)}const S8=lc({properties:{ariaActiveDescendant:null,ariaAtomic:On,ariaAutoComplete:null,ariaBusy:On,ariaChecked:On,ariaColCount:De,ariaColIndex:De,ariaColSpan:De,ariaControls:Zt,ariaCurrent:null,ariaDescribedBy:Zt,ariaDetails:null,ariaDisabled:On,ariaDropEffect:Zt,ariaErrorMessage:null,ariaExpanded:On,ariaFlowTo:Zt,ariaGrabbed:On,ariaHasPopup:null,ariaHidden:On,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Zt,ariaLevel:De,ariaLive:null,ariaModal:On,ariaMultiLine:On,ariaMultiSelectable:On,ariaOrientation:null,ariaOwns:Zt,ariaPlaceholder:null,ariaPosInSet:De,ariaPressed:On,ariaReadOnly:On,ariaRelevant:null,ariaRequired:On,ariaRoleDescription:Zt,ariaRowCount:De,ariaRowIndex:De,ariaRowSpan:De,ariaSelected:On,ariaSetSize:De,ariaSort:null,ariaValueMax:De,ariaValueMin:De,ariaValueNow:De,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function j8(e,t){return t in e?e[t]:t}function _8(e,t){return j8(e,t.toLowerCase())}const yre=lc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pu,acceptCharset:Zt,accessKey:Zt,action:null,allow:null,allowFullScreen:ht,allowPaymentRequest:ht,allowUserMedia:ht,alt:null,as:null,async:ht,autoCapitalize:null,autoComplete:Zt,autoFocus:ht,autoPlay:ht,blocking:Zt,capture:null,charSet:null,checked:ht,cite:null,className:Zt,cols:De,colSpan:null,content:null,contentEditable:On,controls:ht,controlsList:Zt,coords:De|Pu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ht,defer:ht,dir:null,dirName:null,disabled:ht,download:uC,draggable:On,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ht,formTarget:null,headers:Zt,height:De,hidden:uC,high:De,href:null,hrefLang:null,htmlFor:Zt,httpEquiv:Zt,id:null,imageSizes:null,imageSrcSet:null,inert:ht,inputMode:null,integrity:null,is:null,isMap:ht,itemId:null,itemProp:Zt,itemRef:Zt,itemScope:ht,itemType:Zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ht,low:De,manifest:null,max:null,maxLength:De,media:null,method:null,min:null,minLength:De,multiple:ht,muted:ht,name:null,nonce:null,noModule:ht,noValidate:ht,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ht,optimum:De,pattern:null,ping:Zt,placeholder:null,playsInline:ht,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ht,referrerPolicy:null,rel:Zt,required:ht,reversed:ht,rows:De,rowSpan:De,sandbox:Zt,scope:null,scoped:ht,seamless:ht,selected:ht,shadowRootClonable:ht,shadowRootDelegatesFocus:ht,shadowRootMode:null,shape:null,size:De,sizes:null,slot:null,span:De,spellCheck:On,src:null,srcDoc:null,srcLang:null,srcSet:null,start:De,step:null,style:null,tabIndex:De,target:null,title:null,translate:null,type:null,typeMustMatch:ht,useMap:null,value:On,width:De,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Zt,axis:null,background:null,bgColor:null,border:De,borderColor:null,bottomMargin:De,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ht,declare:ht,event:null,face:null,frame:null,frameBorder:null,hSpace:De,leftMargin:De,link:null,longDesc:null,lowSrc:null,marginHeight:De,marginWidth:De,noResize:ht,noHref:ht,noShade:ht,noWrap:ht,object:null,profile:null,prompt:null,rev:null,rightMargin:De,rules:null,scheme:null,scrolling:On,standby:null,summary:null,text:null,topMargin:De,valueType:null,version:null,vAlign:null,vLink:null,vSpace:De,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ht,disableRemotePlayback:ht,prefix:null,property:null,results:De,security:null,unselectable:null},space:"html",transform:_8}),xre=lc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ur,accentHeight:De,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:De,amplitude:De,arabicForm:null,ascent:De,attributeName:null,attributeType:null,azimuth:De,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:De,by:null,calcMode:null,capHeight:De,className:Zt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:De,diffuseConstant:De,direction:null,display:null,dur:null,divisor:De,dominantBaseline:null,download:ht,dx:null,dy:null,edgeMode:null,editable:null,elevation:De,enableBackground:null,end:null,event:null,exponent:De,externalResourcesRequired:null,fill:null,fillOpacity:De,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pu,g2:Pu,glyphName:Pu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:De,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:De,horizOriginX:De,horizOriginY:De,id:null,ideographic:De,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:De,k:De,k1:De,k2:De,k3:De,k4:De,kernelMatrix:Ur,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:De,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:De,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:De,overlineThickness:De,paintOrder:null,panose1:null,path:null,pathLength:De,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:De,pointsAtY:De,pointsAtZ:De,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ur,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ur,rev:Ur,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ur,requiredFeatures:Ur,requiredFonts:Ur,requiredFormats:Ur,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:De,specularExponent:De,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:De,strikethroughThickness:De,string:null,stroke:null,strokeDashArray:Ur,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:De,strokeOpacity:De,strokeWidth:null,style:null,surfaceScale:De,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ur,tabIndex:De,tableValues:null,target:null,targetX:De,targetY:De,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ur,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:De,underlineThickness:De,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:De,values:null,vAlphabetic:De,vMathematical:De,vectorEffect:null,vHanging:De,vIdeographic:De,version:null,vertAdvY:De,vertOriginX:De,vertOriginY:De,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:De,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j8}),k8=lc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),C8=lc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_8}),N8=lc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),bre={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},wre=/[A-Z]/g,oD=/-[a-z]/g,Sre=/^data[-\w.:]+$/i;function jre(e,t){const n=lC(t);let r=t,a=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Sre.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(oD,kre);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!oD.test(i)){let s=i.replace(wre,_re);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=VN}return new a(r,t)}function _re(e){return"-"+e.toLowerCase()}function kre(e){return e.charAt(1).toUpperCase()}const Cre=w8([S8,yre,k8,C8,N8],"html"),KN=w8([S8,xre,k8,C8,N8],"svg");function Nre(e){return e.join(" ").trim()}var pu={},M0,lD;function Ere(){if(lD)return M0;lD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
427
+ `,d="/",h="*",m="",g="comment",v="declaration";function b(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var k=1,_=1;function E(R){var I=R.match(t);I&&(k+=I.length);var q=R.lastIndexOf(c);_=~q?R.length-q:_+R.length}function T(){var R={line:k,column:_};return function(I){return I.position=new A(R),P(),I}}function A(R){this.start=R,this.end={line:k,column:_},this.source=j.source}A.prototype.content=S;function O(R){var I=new Error(j.source+":"+k+":"+_+": "+R);if(I.reason=R,I.filename=j.source,I.line=k,I.column=_,I.source=S,!j.silent)throw I}function D(R){var I=R.exec(S);if(I){var q=I[0];return E(q),S=S.slice(q.length),I}}function P(){D(n)}function M(R){var I;for(R=R||[];I=z();)I!==!1&&R.push(I);return R}function z(){var R=T();if(!(d!=S.charAt(0)||h!=S.charAt(1))){for(var I=2;m!=S.charAt(I)&&(h!=S.charAt(I)||d!=S.charAt(I+1));)++I;if(I+=2,m===S.charAt(I-1))return O("End of comment missing");var q=S.slice(2,I-2);return _+=2,E(q),S=S.slice(I),_+=2,R({type:g,comment:q})}}function L(){var R=T(),I=D(r);if(I){if(z(),!D(a))return O("property missing ':'");var q=D(i),G=R({type:v,property:w(I[0].replace(e,m)),value:q?w(q[0].replace(e,m)):m});return D(s),G}}function F(){var R=[];M(R);for(var I;I=L();)I!==!1&&(R.push(I),M(R));return R}return P(),F()}function w(S){return S?S.replace(l,m):m}return M0=b,M0}var uD;function Are(){if(uD)return pu;uD=1;var e=pu&&pu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pu,"__esModule",{value:!0}),pu.default=n;const t=e(Ere());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),l=typeof a=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:h}=c;l?a(d,h,c):h&&(i=i||{},i[d]=h)}),i}return pu}var gd={},cD;function Tre(){if(cD)return gd;cD=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(d){return!d||n.test(d)||e.test(d)},s=function(d,h){return h.toUpperCase()},l=function(d,h){return"".concat(h,"-")},c=function(d,h){return h===void 0&&(h={}),i(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(a,l):d=d.replace(r,l),d.replace(t,s))};return gd.camelCase=c,gd}var vd,dD;function Ore(){if(dD)return vd;dD=1;var e=vd&&vd.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Are()),n=Tre();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(l,c){l&&c&&(s[(0,n.camelCase)(l,i)]=c)}),s}return r.default=r,vd=r,vd}var Mre=Ore();const Pre=ea(Mre),E8=A8("end"),YN=A8("start");function A8(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Dre(e){const t=YN(e),n=E8(e);if(t&&n)return{start:t,end:n}}function Hd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fD(e.position):"start"in e||"end"in e?fD(e):"line"in e||"column"in e?dC(e):""}function dC(e){return hD(e&&e.line)+":"+hD(e&&e.column)}function fD(e){return dC(e&&e.start)+"-"+dC(e&&e.end)}function hD(e){return e&&typeof e=="number"?e:1}class fr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=Hd(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}fr.prototype.file="";fr.prototype.name="";fr.prototype.reason="";fr.prototype.message="";fr.prototype.stack="";fr.prototype.column=void 0;fr.prototype.line=void 0;fr.prototype.ancestors=void 0;fr.prototype.cause=void 0;fr.prototype.fatal=void 0;fr.prototype.place=void 0;fr.prototype.ruleId=void 0;fr.prototype.source=void 0;const WN={}.hasOwnProperty,Rre=new Map,Ire=/[A-Z]/g,Lre=new Set(["table","tbody","thead","tfoot","tr"]),zre=new Set(["td","th"]),T8="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $re(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Kre(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Vre(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?KN:Cre,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=O8(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function O8(e,t,n){if(t.type==="element")return qre(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Bre(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hre(e,t,n);if(t.type==="mdxjsEsm")return Fre(e,t);if(t.type==="root")return Ure(e,t,n);if(t.type==="text")return Gre(e,t)}function qre(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=KN,e.schema=a),e.ancestors.push(t);const i=P8(e,t.tagName,!1),s=Yre(e,t);let l=ZN(e,t);return Lre.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!gre(c):!0})),M8(e,s,i,t),XN(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Bre(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}nf(e,t.position)}function Fre(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);nf(e,t.position)}function Hre(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=KN,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:P8(e,t.name,!0),s=Wre(e,t),l=ZN(e,t);return M8(e,s,i,t),XN(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function Ure(e,t,n){const r={};return XN(r,ZN(e,t)),e.create(t,e.Fragment,r,n)}function Gre(e,t){return t.value}function M8(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function XN(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Vre(e,t,n){return r;function r(a,i,s,l){const d=Array.isArray(s.children)?n:t;return l?d(i,s,l):d(i,s)}}function Kre(e,t){return n;function n(r,a,i,s){const l=Array.isArray(i.children),c=YN(r);return t(a,i,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Yre(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&WN.call(t.properties,a)){const i=Xre(e,a,t.properties[a]);if(i){const[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&zre.has(t.tagName)?r=l:n[s]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Wre(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else nf(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else nf(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function ZN(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Rre;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const d=a.get(c)||0;s=c+"-"+d,a.set(c,d+1)}}const l=O8(e,i,s);l!==void 0&&n.push(l)}return n}function Xre(e,t,n){const r=jre(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dre(n):Nre(n)),r.property==="style"){let a=typeof n=="object"?n:Zre(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Qre(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?bre[r.property]||r.property:r.attribute,n]}}function Zre(e,t){try{return Pre(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new fr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=T8+"#cannot-parse-style-attribute",a}}function P8(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const l=aD(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=s}else r=aD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return WN.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);nf(e)}function nf(e,t){const n=new fr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=T8+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qre(e){const t={};let n;for(n in e)WN.call(e,n)&&(t[Jre(n)]=e[n]);return t}function Jre(e){let t=e.replace(Ire,eae);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eae(e){return"-"+e.toLowerCase()}const P0={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tae={};function QN(e,t){const n=tae,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return D8(e,r,a)}function D8(e,t,n){if(nae(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return mD(e.children,t,n)}return Array.isArray(e)?mD(e,t,n):""}function mD(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=D8(e[a],t,n);return r.join("")}function nae(e){return!!(e&&typeof e=="object")}const pD=document.createElement("i");function JN(e){const t="&"+e+";";pD.innerHTML=t;const n=pD.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Yr(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function ha(e,t){return e.length>0?(Yr(e,e.length,0,t),e):t}const gD={}.hasOwnProperty;function R8(e){const t={};let n=-1;for(;++n<e.length;)rae(t,e[n]);return t}function rae(e,t){let n;for(n in t){const a=(gD.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){gD.call(a,s)||(a[s]=[]);const l=i[s];aae(a[s],Array.isArray(l)?l:l?[l]:[])}}}function aae(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Yr(e,0,0,r)}function I8(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vr=lo(/[A-Za-z]/),cr=lo(/[\dA-Za-z]/),iae=lo(/[#-'*+\--9=?A-Z^-~]/);function Ep(e){return e!==null&&(e<32||e===127)}const fC=lo(/\d/),sae=lo(/[\dA-Fa-f]/),oae=lo(/[!-/:-@[-`{-~]/);function nt(e){return e!==null&&e<-2}function Xt(e){return e!==null&&(e<0||e===32)}function bt(e){return e===-2||e===-1||e===32}const Fg=lo(new RegExp("\\p{P}|\\p{S}","u")),nl=lo(/\s/);function lo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function uc(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&cr(e.charCodeAt(n+1))&&cr(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function At(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return bt(c)?(e.enter(n),l(c)):t(c)}function l(c){return bt(c)&&i++<a?(e.consume(c),l):(e.exit(n),t(c))}}const lae={tokenize:uae};function uae(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),At(e,t,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return nt(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const cae={tokenize:dae},vD={tokenize:fae};function dae(e){const t=this,n=[];let r=0,a,i,s;return l;function l(_){if(r<n.length){const E=n[r];return t.containerState=E[1],e.attempt(E[0].continuation,c,d)(_)}return d(_)}function c(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&k();const E=t.events.length;let T=E,A;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){A=t.events[T][1].end;break}j(r);let O=E;for(;O<t.events.length;)t.events[O][1].end={...A},O++;return Yr(t.events,T+1,0,t.events.slice(E)),t.events.length=O,d(_)}return l(_)}function d(_){if(r===n.length){if(!a)return g(_);if(a.currentConstruct&&a.currentConstruct.concrete)return b(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vD,h,m)(_)}function h(_){return a&&k(),j(r),g(_)}function m(_){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(_)}function g(_){return t.containerState={},e.attempt(vD,v,b)(_)}function v(_){return r++,n.push([t.currentConstruct,t.containerState]),g(_)}function b(_){if(_===null){a&&k(),j(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),w(_)}function w(_){if(_===null){S(e.exit("chunkFlow"),!0),j(0),e.consume(_);return}return nt(_)?(e.consume(_),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(_),w)}function S(_,E){const T=t.sliceStream(_);if(E&&T.push(null),_.previous=i,i&&(i.next=_),i=_,a.defineSkip(_.start),a.write(T),t.parser.lazy[_.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<s&&(!a.events[A][1].end||a.events[A][1].end.offset>s))return;const O=t.events.length;let D=O,P,M;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(P){M=t.events[D][1].end;break}P=!0}for(j(r),A=O;A<t.events.length;)t.events[A][1].end={...M},A++;Yr(t.events,D+1,0,t.events.slice(O)),t.events.length=A}}function j(_){let E=n.length;for(;E-- >_;){const T=n[E];t.containerState=T[1],T[0].exit.call(t,e)}n.length=_}function k(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function fae(e,t,n){return At(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qu(e){if(e===null||Xt(e)||nl(e))return 1;if(Fg(e))return 2}function Hg(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const hC={name:"attention",resolveAll:hae,tokenize:mae};function hae(e,t){let n=-1,r,a,i,s,l,c,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},g={...e[n][1].start};yD(m,-c),yD(g,c),s={type:c>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ha(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ha(d,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),d=ha(d,Hg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ha(d,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=ha(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Yr(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function mae(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=qu(r);let i;return s;function s(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const d=e.exit("attentionSequence"),h=qu(c),m=!h||h===2&&a||n.includes(c),g=!a||a===2&&h||n.includes(r);return d._open=!!(i===42?m:m&&(a||!g)),d._close=!!(i===42?g:g&&(h||!m)),t(c)}}function yD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pae={name:"autolink",tokenize:gae};function gae(e,t,n){let r=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(v){return vr(v)?(e.consume(v),s):v===64?n(v):d(v)}function s(v){return v===43||v===45||v===46||cr(v)?(r=1,l(v)):d(v)}function l(v){return v===58?(e.consume(v),r=0,c):(v===43||v===45||v===46||cr(v))&&r++<32?(e.consume(v),l):(r=0,d(v))}function c(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Ep(v)?n(v):(e.consume(v),c)}function d(v){return v===64?(e.consume(v),h):iae(v)?(e.consume(v),d):n(v)}function h(v){return cr(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),r=0,h):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||cr(v))&&r++<63){const b=v===45?g:m;return e.consume(v),b}return n(v)}}const Df={partial:!0,tokenize:vae};function vae(e,t,n){return r;function r(i){return bt(i)?At(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||nt(i)?t(i):n(i)}}const L8={continuation:{tokenize:xae},exit:bae,name:"blockQuote",tokenize:yae};function yae(e,t,n){const r=this;return a;function a(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return bt(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function xae(e,t,n){const r=this;return a;function a(s){return bt(s)?At(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(L8,t,n)(s)}}function bae(e){e.exit("blockQuote")}const z8={name:"characterEscape",tokenize:wae};function wae(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return oae(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const $8={name:"characterReference",tokenize:Sae};function Sae(e,t,n){const r=this;let a=0,i,s;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),c}function c(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),i=31,s=cr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=sae,h):(e.enter("characterReferenceValue"),i=7,s=fC,h(m))}function h(m){if(m===59&&a){const g=e.exit("characterReferenceValue");return s===cr&&!JN(r.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(m)&&a++<i?(e.consume(m),h):n(m)}}const xD={partial:!0,tokenize:_ae},bD={concrete:!0,name:"codeFenced",tokenize:jae};function jae(e,t,n){const r=this,a={partial:!0,tokenize:T};let i=0,s=0,l;return c;function c(A){return d(A)}function d(A){const O=r.events[r.events.length-1];return i=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===l?(s++,e.consume(A),h):s<3?n(A):(e.exit("codeFencedFenceSequence"),bt(A)?At(e,m,"whitespace")(A):m(A))}function m(A){return A===null||nt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(xD,w,E)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(A))}function g(A){return A===null||nt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):bt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),At(e,v,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),g)}function v(A){return A===null||nt(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||nt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===l?n(A):(e.consume(A),b)}function w(A){return e.attempt(a,E,S)(A)}function S(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),j}function j(A){return i>0&&bt(A)?At(e,k,"linePrefix",i+1)(A):k(A)}function k(A){return A===null||nt(A)?e.check(xD,w,E)(A):(e.enter("codeFlowValue"),_(A))}function _(A){return A===null||nt(A)?(e.exit("codeFlowValue"),k(A)):(e.consume(A),_)}function E(A){return e.exit("codeFenced"),t(A)}function T(A,O,D){let P=0;return M;function M(I){return A.enter("lineEnding"),A.consume(I),A.exit("lineEnding"),z}function z(I){return A.enter("codeFencedFence"),bt(I)?At(A,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):L(I)}function L(I){return I===l?(A.enter("codeFencedFenceSequence"),F(I)):D(I)}function F(I){return I===l?(P++,A.consume(I),F):P>=s?(A.exit("codeFencedFenceSequence"),bt(I)?At(A,R,"whitespace")(I):R(I)):D(I)}function R(I){return I===null||nt(I)?(A.exit("codeFencedFence"),O(I)):D(I)}}}function _ae(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const D0={name:"codeIndented",tokenize:Cae},kae={partial:!0,tokenize:Nae};function Cae(e,t,n){const r=this;return a;function a(d){return e.enter("codeIndented"),At(e,i,"linePrefix",5)(d)}function i(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):nt(d)?e.attempt(kae,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||nt(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),t(d)}}function Nae(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):nt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):At(e,i,"linePrefix",5)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):nt(s)?a(s):n(s)}}const Eae={name:"codeText",previous:Tae,resolve:Aae,tokenize:Oae};function Aae(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Tae(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Oae(e,t,n){let r=0,a,i;return s;function s(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),c(m))}function c(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),c):m===96?(i=e.enter("codeTextSequence"),a=0,h(m)):nt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||nt(m)?(e.exit("codeTextData"),c(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),a++,h):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(i.type="codeTextData",d(m))}}class Mae{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&yd(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),yd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),yd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);yd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);yd(this.left,n.reverse())}}}function yd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function q8(e){const t={};let n=-1,r,a,i,s,l,c,d;const h=new Mae(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Pae(h,n)),n=t[n],d=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=h.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(h.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...h.get(a)[1].start},l=h.slice(a,n),l.unshift(r),h.splice(a,n-a+1,l))}}return Yr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function Pae(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],d={};let h,m,g=-1,v=n,b=0,w=0;const S=[w];for(;v;){for(;e.get(++a)[1]!==v;);i.push(a),v._tokenizer||(h=r.sliceStream(v),v.next||h.push(null),m&&s.defineSkip(v.start),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),v._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<l.length;)l[g][0]==="exit"&&l[g-1][0]==="enter"&&l[g][1].type===l[g-1][1].type&&l[g][1].start.line!==l[g][1].end.line&&(w=g+1,S.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(s.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),g=S.length;g--;){const j=l.slice(S[g],S[g+1]),k=i.pop();c.push([k,k+j.length-1]),e.splice(k,2,j)}for(c.reverse(),g=-1;++g<c.length;)d[b+c[g][0]]=b+c[g][1],b+=c[g][1]-c[g][0]-1;return d}const Dae={resolve:Iae,tokenize:Lae},Rae={partial:!0,tokenize:zae};function Iae(e){return q8(e),e}function Lae(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(l)}function a(l){return l===null?i(l):nt(l)?e.check(Rae,s,i)(l):(e.consume(l),a)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function zae(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),At(e,i,"linePrefix")}function i(s){if(s===null||nt(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function B8(e,t,n,r,a,i,s,l,c){const d=c||Number.POSITIVE_INFINITY;let h=0;return m;function m(j){return j===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(j),e.exit(i),g):j===null||j===32||j===41||Ep(j)?n(j):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(j))}function g(j){return j===62?(e.enter(i),e.consume(j),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(e.exit("chunkString"),e.exit(l),g(j)):j===null||j===60||nt(j)?n(j):(e.consume(j),j===92?b:v)}function b(j){return j===60||j===62||j===92?(e.consume(j),v):v(j)}function w(j){return!h&&(j===null||j===41||Xt(j))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(j)):h<d&&j===40?(e.consume(j),h++,w):j===41?(e.consume(j),h--,w):j===null||j===32||j===40||Ep(j)?n(j):(e.consume(j),j===92?S:w)}function S(j){return j===40||j===41||j===92?(e.consume(j),w):w(j)}}function F8(e,t,n,r,a,i){const s=this;let l=0,c;return d;function d(v){return e.enter(r),e.enter(a),e.consume(v),e.exit(a),e.enter(i),h}function h(v){return l>999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(v):v===93?(e.exit(i),e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):nt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||nt(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),c||(c=!bt(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),l++,m):m(v)}}function H8(e,t,n,r,a,i){let s;return l;function l(g){return g===34||g===39||g===40?(e.enter(r),e.enter(a),e.consume(g),e.exit(a),s=g===40?41:g,c):n(g)}function c(g){return g===s?(e.enter(a),e.consume(g),e.exit(a),e.exit(r),t):(e.enter(i),d(g))}function d(g){return g===s?(e.exit(i),c(s)):g===null?n(g):nt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),At(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===s||g===null||nt(g)?(e.exit("chunkString"),d(g)):(e.consume(g),g===92?m:h)}function m(g){return g===s||g===92?(e.consume(g),h):h(g)}}function Ud(e,t){let n;return r;function r(a){return nt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):bt(a)?At(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const $ae={name:"definition",tokenize:Bae},qae={partial:!0,tokenize:Fae};function Bae(e,t,n){const r=this;let a;return i;function i(v){return e.enter("definition"),s(v)}function s(v){return F8.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return a=Ra(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):n(v)}function c(v){return Xt(v)?Ud(e,d)(v):d(v)}function d(v){return B8(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(qae,m,m)(v)}function m(v){return bt(v)?At(e,g,"whitespace")(v):g(v)}function g(v){return v===null||nt(v)?(e.exit("definition"),r.parser.defined.push(a),t(v)):n(v)}}function Fae(e,t,n){return r;function r(l){return Xt(l)?Ud(e,a)(l):n(l)}function a(l){return H8(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return bt(l)?At(e,s,"whitespace")(l):s(l)}function s(l){return l===null||nt(l)?t(l):n(l)}}const Hae={name:"hardBreakEscape",tokenize:Uae};function Uae(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return nt(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const Gae={name:"headingAtx",resolve:Vae,tokenize:Kae};function Vae(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yr(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function Kae(e,t,n){let r=0;return a;function a(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||Xt(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||nt(h)?(e.exit("atxHeading"),t(h)):bt(h)?At(e,l,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function d(h){return h===null||h===35||Xt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),d)}}const Yae=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],wD=["pre","script","style","textarea"],Wae={concrete:!0,name:"htmlFlow",resolveTo:Qae,tokenize:Jae},Xae={partial:!0,tokenize:tie},Zae={partial:!0,tokenize:eie};function Qae(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Jae(e,t,n){const r=this;let a,i,s,l,c;return d;function d(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),m}function m(H){return H===33?(e.consume(H),g):H===47?(e.consume(H),i=!0,w):H===63?(e.consume(H),a=3,r.interrupt?t:B):vr(H)?(e.consume(H),s=String.fromCharCode(H),S):n(H)}function g(H){return H===45?(e.consume(H),a=2,v):H===91?(e.consume(H),a=5,l=0,b):vr(H)?(e.consume(H),a=4,r.interrupt?t:B):n(H)}function v(H){return H===45?(e.consume(H),r.interrupt?t:B):n(H)}function b(H){const W="CDATA[";return H===W.charCodeAt(l++)?(e.consume(H),l===W.length?r.interrupt?t:L:b):n(H)}function w(H){return vr(H)?(e.consume(H),s=String.fromCharCode(H),S):n(H)}function S(H){if(H===null||H===47||H===62||Xt(H)){const W=H===47,Q=s.toLowerCase();return!W&&!i&&wD.includes(Q)?(a=1,r.interrupt?t(H):L(H)):Yae.includes(s.toLowerCase())?(a=6,W?(e.consume(H),j):r.interrupt?t(H):L(H)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(H):i?k(H):_(H))}return H===45||cr(H)?(e.consume(H),s+=String.fromCharCode(H),S):n(H)}function j(H){return H===62?(e.consume(H),r.interrupt?t:L):n(H)}function k(H){return bt(H)?(e.consume(H),k):M(H)}function _(H){return H===47?(e.consume(H),M):H===58||H===95||vr(H)?(e.consume(H),E):bt(H)?(e.consume(H),_):M(H)}function E(H){return H===45||H===46||H===58||H===95||cr(H)?(e.consume(H),E):T(H)}function T(H){return H===61?(e.consume(H),A):bt(H)?(e.consume(H),T):_(H)}function A(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),c=H,O):bt(H)?(e.consume(H),A):D(H)}function O(H){return H===c?(e.consume(H),c=null,P):H===null||nt(H)?n(H):(e.consume(H),O)}function D(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||Xt(H)?T(H):(e.consume(H),D)}function P(H){return H===47||H===62||bt(H)?_(H):n(H)}function M(H){return H===62?(e.consume(H),z):n(H)}function z(H){return H===null||nt(H)?L(H):bt(H)?(e.consume(H),z):n(H)}function L(H){return H===45&&a===2?(e.consume(H),q):H===60&&a===1?(e.consume(H),G):H===62&&a===4?(e.consume(H),U):H===63&&a===3?(e.consume(H),B):H===93&&a===5?(e.consume(H),K):nt(H)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Xae,X,F)(H)):H===null||nt(H)?(e.exit("htmlFlowData"),F(H)):(e.consume(H),L)}function F(H){return e.check(Zae,R,X)(H)}function R(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),I}function I(H){return H===null||nt(H)?F(H):(e.enter("htmlFlowData"),L(H))}function q(H){return H===45?(e.consume(H),B):L(H)}function G(H){return H===47?(e.consume(H),s="",Y):L(H)}function Y(H){if(H===62){const W=s.toLowerCase();return wD.includes(W)?(e.consume(H),U):L(H)}return vr(H)&&s.length<8?(e.consume(H),s+=String.fromCharCode(H),Y):L(H)}function K(H){return H===93?(e.consume(H),B):L(H)}function B(H){return H===62?(e.consume(H),U):H===45&&a===2?(e.consume(H),B):L(H)}function U(H){return H===null||nt(H)?(e.exit("htmlFlowData"),X(H)):(e.consume(H),U)}function X(H){return e.exit("htmlFlow"),t(H)}}function eie(e,t,n){const r=this;return a;function a(s){return nt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function tie(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Df,t,n)}}const nie={name:"htmlText",tokenize:rie};function rie(e,t,n){const r=this;let a,i,s;return l;function l(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),c}function c(B){return B===33?(e.consume(B),d):B===47?(e.consume(B),T):B===63?(e.consume(B),_):vr(B)?(e.consume(B),D):n(B)}function d(B){return B===45?(e.consume(B),h):B===91?(e.consume(B),i=0,b):vr(B)?(e.consume(B),k):n(B)}function h(B){return B===45?(e.consume(B),v):n(B)}function m(B){return B===null?n(B):B===45?(e.consume(B),g):nt(B)?(s=m,G(B)):(e.consume(B),m)}function g(B){return B===45?(e.consume(B),v):m(B)}function v(B){return B===62?q(B):B===45?g(B):m(B)}function b(B){const U="CDATA[";return B===U.charCodeAt(i++)?(e.consume(B),i===U.length?w:b):n(B)}function w(B){return B===null?n(B):B===93?(e.consume(B),S):nt(B)?(s=w,G(B)):(e.consume(B),w)}function S(B){return B===93?(e.consume(B),j):w(B)}function j(B){return B===62?q(B):B===93?(e.consume(B),j):w(B)}function k(B){return B===null||B===62?q(B):nt(B)?(s=k,G(B)):(e.consume(B),k)}function _(B){return B===null?n(B):B===63?(e.consume(B),E):nt(B)?(s=_,G(B)):(e.consume(B),_)}function E(B){return B===62?q(B):_(B)}function T(B){return vr(B)?(e.consume(B),A):n(B)}function A(B){return B===45||cr(B)?(e.consume(B),A):O(B)}function O(B){return nt(B)?(s=O,G(B)):bt(B)?(e.consume(B),O):q(B)}function D(B){return B===45||cr(B)?(e.consume(B),D):B===47||B===62||Xt(B)?P(B):n(B)}function P(B){return B===47?(e.consume(B),q):B===58||B===95||vr(B)?(e.consume(B),M):nt(B)?(s=P,G(B)):bt(B)?(e.consume(B),P):q(B)}function M(B){return B===45||B===46||B===58||B===95||cr(B)?(e.consume(B),M):z(B)}function z(B){return B===61?(e.consume(B),L):nt(B)?(s=z,G(B)):bt(B)?(e.consume(B),z):P(B)}function L(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),a=B,F):nt(B)?(s=L,G(B)):bt(B)?(e.consume(B),L):(e.consume(B),R)}function F(B){return B===a?(e.consume(B),a=void 0,I):B===null?n(B):nt(B)?(s=F,G(B)):(e.consume(B),F)}function R(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||Xt(B)?P(B):(e.consume(B),R)}function I(B){return B===47||B===62||Xt(B)?P(B):n(B)}function q(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function G(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),Y}function Y(B){return bt(B)?At(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):K(B)}function K(B){return e.enter("htmlTextData"),s(B)}}const e2={name:"labelEnd",resolveAll:oie,resolveTo:lie,tokenize:uie},aie={tokenize:cie},iie={tokenize:die},sie={tokenize:fie};function oie(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Yr(e,0,e.length,n),e}function lie(e,t){let n=e.length,r=0,a,i,s,l;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",d,t]],l=ha(l,e.slice(i+1,i+r+3)),l=ha(l,[["enter",h,t]]),l=ha(l,Hg(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),l=ha(l,[["exit",h,t],e[s-2],e[s-1],["exit",d,t]]),l=ha(l,e.slice(s+1)),l=ha(l,[["exit",c,t]]),Yr(e,i,e.length,l),e}function uie(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(g){return i?i._inactive?m(g):(s=r.parser.defined.includes(Ra(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):n(g)}function c(g){return g===40?e.attempt(aie,h,s?h:m)(g):g===91?e.attempt(iie,h,s?d:m)(g):s?h(g):m(g)}function d(g){return e.attempt(sie,h,m)(g)}function h(g){return t(g)}function m(g){return i._balanced=!0,n(g)}}function cie(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return Xt(m)?Ud(e,i)(m):i(m)}function i(m){return m===41?h(m):B8(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function s(m){return Xt(m)?Ud(e,c)(m):h(m)}function l(m){return n(m)}function c(m){return m===34||m===39||m===40?H8(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return Xt(m)?Ud(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function die(e,t,n){const r=this;return a;function a(l){return F8.call(r,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(Ra(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function fie(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const hie={name:"labelStartImage",resolveAll:e2.resolveAll,tokenize:mie};function mie(e,t,n){const r=this;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const pie={name:"labelStartLink",resolveAll:e2.resolveAll,tokenize:gie};function gie(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const R0={name:"lineEnding",tokenize:vie};function vie(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),At(e,t,"linePrefix")}}const fp={name:"thematicBreak",tokenize:yie};function yie(e,t,n){let r=0,a;return i;function i(d){return e.enter("thematicBreak"),s(d)}function s(d){return a=d,l(d)}function l(d){return d===a?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||nt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===a?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),bt(d)?At(e,l,"whitespace")(d):l(d))}}const Er={continuation:{tokenize:Sie},exit:_ie,name:"list",tokenize:wie},xie={partial:!0,tokenize:kie},bie={partial:!0,tokenize:jie};function wie(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(v){const b=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:fC(v)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(fp,n,d)(v):d(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return n(v)}function c(v){return fC(v)&&++s<10?(e.consume(v),c):(!r.interrupt||s<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),d(v)):n(v)}function d(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(Df,r.interrupt?n:h,e.attempt(xie,g,m))}function h(v){return r.containerState.initialBlankLine=!0,i++,g(v)}function m(v){return bt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function Sie(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Df,a,i);function a(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,At(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!bt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bie,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,At(e,e.attempt(Er,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function jie(e,t,n){const r=this;return At(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function _ie(e){e.exit(this.containerState.type)}function kie(e,t,n){const r=this;return At(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!bt(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const SD={name:"setextUnderline",resolveTo:Cie,tokenize:Nie};function Cie(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Nie(e,t,n){const r=this;let a;return i;function i(d){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),a=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===a?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),bt(d)?At(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||nt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Eie={tokenize:Aie};function Aie(e){const t=this,n=e.attempt(Df,r,e.attempt(this.parser.constructs.flowInitial,a,At(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Dae,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Tie={resolveAll:G8()},Oie=U8("string"),Mie=U8("text");function U8(e){return{resolveAll:G8(e==="text"?Pie:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,l);return s;function s(h){return d(h)?i(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return d(h)?(n.exit("data"),i(h)):(n.consume(h),c)}function d(h){if(h===null)return!0;const m=a[h];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function G8(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function Pie(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,l=0,c;for(;i--;){const d=a[i];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(d===-2)c=!0,l++;else if(d!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const d={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const Die={42:Er,43:Er,45:Er,48:Er,49:Er,50:Er,51:Er,52:Er,53:Er,54:Er,55:Er,56:Er,57:Er,62:L8},Rie={91:$ae},Iie={[-2]:D0,[-1]:D0,32:D0},Lie={35:Gae,42:fp,45:[SD,fp],60:Wae,61:SD,95:fp,96:bD,126:bD},zie={38:$8,92:z8},$ie={[-5]:R0,[-4]:R0,[-3]:R0,33:hie,38:$8,42:hC,60:[pae,nie],91:pie,92:[Hae,z8],93:e2,95:hC,96:Eae},qie={null:[hC,Tie]},Bie={null:[42,95]},Fie={null:[]},Hie=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bie,contentInitial:Rie,disable:Fie,document:Die,flow:Lie,flowInitial:Iie,insideSpan:qie,string:zie,text:$ie},Symbol.toStringTag,{value:"Module"}));function Uie(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],l=[];const c={attempt:O(T),check:O(A),consume:k,enter:_,exit:E,interrupt:O(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:w,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let h=t.tokenize.call(d,c);return t.resolveAll&&i.push(t),d;function m(z){return s=ha(s,z),S(),s[s.length-1]!==null?[]:(D(t,0),d.events=Hg(i,d.events,d),d.events)}function g(z,L){return Vie(v(z),L)}function v(z){return Gie(s,z)}function b(){const{_bufferIndex:z,_index:L,line:F,column:R,offset:I}=r;return{_bufferIndex:z,_index:L,line:F,column:R,offset:I}}function w(z){a[z.line]=z.column,M()}function S(){let z;for(;r._index<s.length;){const L=s[r._index];if(typeof L=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<L.length;)j(L.charCodeAt(r._bufferIndex));else j(L)}}function j(z){h=h(z)}function k(z){nt(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,M()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=z}function _(z,L){const F=L||{};return F.type=z,F.start=b(),d.events.push(["enter",F,d]),l.push(F),F}function E(z){const L=l.pop();return L.end=b(),d.events.push(["exit",L,d]),L}function T(z,L){D(z,L.from)}function A(z,L){L.restore()}function O(z,L){return F;function F(R,I,q){let G,Y,K,B;return Array.isArray(R)?X(R):"tokenize"in R?X([R]):U(R);function U(J){return re;function re(oe){const Z=oe!==null&&J[oe],le=oe!==null&&J.null,ie=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(le)?le:le?[le]:[]];return X(ie)(oe)}}function X(J){return G=J,Y=0,J.length===0?q:H(J[Y])}function H(J){return re;function re(oe){return B=P(),K=J,J.partial||(d.currentConstruct=J),J.name&&d.parser.constructs.disable.null.includes(J.name)?Q():J.tokenize.call(L?Object.assign(Object.create(d),L):d,c,W,Q)(oe)}}function W(J){return z(K,B),I}function Q(J){return B.restore(),++Y<G.length?H(G[Y]):q}}}function D(z,L){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&Yr(d.events,L,d.events.length-L,z.resolve(d.events.slice(L),d)),z.resolveTo&&(d.events=z.resolveTo(d.events,d))}function P(){const z=b(),L=d.previous,F=d.currentConstruct,R=d.events.length,I=Array.from(l);return{from:R,restore:q};function q(){r=z,d.previous=L,d.currentConstruct=F,d.events.length=R,l=I,M()}}function M(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Gie(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function Vie(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
428
+ `;break}case-3:{s=`\r
429
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function Kie(e){const r={constructs:R8([Hie,...(e||{}).extensions||[]]),content:a(lae),defined:[],document:a(cae),flow:a(Eie),lazy:{},string:a(Oie),text:a(Mie)};return r;function a(i){return s;function s(l){return Uie(r,i,l)}}}function Yie(e){for(;!q8(e););return e}const jD=/[\0\t\n\r]/g;function Wie(){let e=1,t="",n=!0,r;return a;function a(i,s,l){const c=[];let d,h,m,g,v;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),m=0,t="",n&&(i.charCodeAt(0)===65279&&m++,n=void 0);m<i.length;){if(jD.lastIndex=m,d=jD.exec(i),g=d&&d.index!==void 0?d.index:i.length,v=i.charCodeAt(g),!d){t=i.slice(m);break}if(v===10&&m===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),m<g&&(c.push(i.slice(m,g)),e+=g-m),v){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}m=g+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Xie=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zie(e){return e.replace(Xie,Qie)}function Qie(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return I8(n.slice(i?2:1),i?16:10)}return JN(n)||e}const V8={}.hasOwnProperty;function Jie(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ese(n)(Yie(Kie(n).document().write(Wie()(e,t,!0))))}function ese(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ie),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(ye),blockQuote:i(le),characterEscape:P,characterReference:P,codeFenced:i(ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(ie,s),codeText:i(ee,s),codeTextData:P,data:P,codeFlowValue:P,definition:i(ae),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(xe),hardBreakEscape:i(Te),hardBreakTrailing:i(Te),htmlFlow:i(Me,s),htmlFlowData:P,htmlText:i(Me,s),htmlTextData:P,image:i(he),label:s,link:i(Ie),listItem:i(We),listItemValue:g,listOrdered:i(Je,m),listUnordered:i(Je),paragraph:i(it),reference:H,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(ye),strong:i(Ce),thematicBreak:i(ge)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Z,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:J,characterReference:re,codeFenced:c(S),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:b,codeFlowValue:M,codeIndented:c(j),codeText:c(I),codeTextData:M,data:M,definition:c(),definitionDestinationString:E,definitionLabelString:k,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(L),hardBreakTrailing:c(L),htmlFlow:c(F),htmlFlowData:M,htmlText:c(R),htmlTextData:M,image:c(G),label:K,labelText:Y,lineEnding:z,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:W,resourceDestinationString:B,resourceTitleString:U,resource:X,setextHeading:c(D),setextHeadingLineSequence:O,setextHeadingText:A,strong:c(),thematicBreak:c()}};K8(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let _e={type:"root",children:[]};const fe={stack:[_e],tokenStack:[],config:t,enter:l,exit:d,buffer:s,resume:h,data:n},Oe=[];let ze=-1;for(;++ze<ue.length;)if(ue[ze][1].type==="listOrdered"||ue[ze][1].type==="listUnordered")if(ue[ze][0]==="enter")Oe.push(ze);else{const ut=Oe.pop();ze=a(ue,ut,ze)}for(ze=-1;++ze<ue.length;){const ut=t[ue[ze][0]];V8.call(ut,ue[ze][1].type)&&ut[ue[ze][1].type].call(Object.assign({sliceSerialize:ue[ze][2].sliceSerialize},fe),ue[ze][1])}if(fe.tokenStack.length>0){const ut=fe.tokenStack[fe.tokenStack.length-1];(ut[1]||_D).call(fe,void 0,ut[0])}for(_e.position={start:Us(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Us(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<t.transforms.length;)_e=t.transforms[ze](_e)||_e;return _e}function a(ue,_e,fe){let Oe=_e-1,ze=-1,ut=!1,gt,_t,ct,Ae;for(;++Oe<=fe;){const $e=ue[Oe];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?ze++:ze--,Ae=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(gt&&!Ae&&!ze&&!ct&&(ct=Oe),Ae=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ae=void 0}if(!ze&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||ze===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(gt){let Xe=Oe;for(_t=void 0;Xe--;){const pt=ue[Xe];if(pt[1].type==="lineEnding"||pt[1].type==="lineEndingBlank"){if(pt[0]==="exit")continue;_t&&(ue[_t][1].type="lineEndingBlank",ut=!0),pt[1].type="lineEnding",_t=Xe}else if(!(pt[1].type==="linePrefix"||pt[1].type==="blockQuotePrefix"||pt[1].type==="blockQuotePrefixWhitespace"||pt[1].type==="blockQuoteMarker"||pt[1].type==="listItemIndent"))break}ct&&(!_t||ct<_t)&&(gt._spread=!0),gt.end=Object.assign({},_t?ue[_t][1].start:$e[1].end),ue.splice(_t||Oe,0,["exit",gt,$e[2]]),Oe++,fe++}if($e[1].type==="listItemPrefix"){const Xe={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};gt=Xe,ue.splice(Oe,0,["enter",Xe,$e[2]]),Oe++,fe++,ct=void 0,Ae=!0}}}return ue[_e][1]._spread=ut,fe}function i(ue,_e){return fe;function fe(Oe){l.call(this,ue(Oe),Oe),_e&&_e.call(this,Oe)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(ue,_e,fe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([_e,fe||void 0]),ue.position={start:Us(_e.start),end:void 0}}function c(ue){return _e;function _e(fe){ue&&ue.call(this,fe),d.call(this,fe)}}function d(ue,_e){const fe=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==ue.type&&(_e?_e.call(this,ue,Oe[0]):(Oe[1]||_D).call(this,ue,Oe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Hd({start:ue.start,end:ue.end})+"): it’s not open");fe.position.end=Us(ue.end)}function h(){return QN(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(ue){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=ue}function b(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=ue}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue.replace(/(\r?\n|\r)$/g,"")}function k(ue){const _e=this.resume(),fe=this.stack[this.stack.length-1];fe.label=_e,fe.identifier=Ra(this.sliceSerialize(ue)).toLowerCase()}function _(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ue}function E(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ue}function T(ue){const _e=this.stack[this.stack.length-1];if(!_e.depth){const fe=this.sliceSerialize(ue).length;_e.depth=fe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function P(ue){const fe=this.stack[this.stack.length-1].children;let Oe=fe[fe.length-1];(!Oe||Oe.type!=="text")&&(Oe=He(),Oe.position={start:Us(ue.start),end:void 0},fe.push(Oe)),this.stack.push(Oe)}function M(ue){const _e=this.stack.pop();_e.value+=this.sliceSerialize(ue),_e.position.end=Us(ue.end)}function z(ue){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const fe=_e.children[_e.children.length-1];fe.position.end=Us(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(P.call(this,ue),M.call(this,ue))}function L(){this.data.atHardBreak=!0}function F(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function R(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function I(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.value=ue}function q(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=_e,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function G(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=_e,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Y(ue){const _e=this.sliceSerialize(ue),fe=this.stack[this.stack.length-2];fe.label=Zie(_e),fe.identifier=Ra(_e).toLowerCase()}function K(){const ue=this.stack[this.stack.length-1],_e=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){const Oe=ue.children;fe.children=Oe}else fe.alt=_e}function B(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.url=ue}function U(){const ue=this.resume(),_e=this.stack[this.stack.length-1];_e.title=ue}function X(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function W(ue){const _e=this.resume(),fe=this.stack[this.stack.length-1];fe.label=_e,fe.identifier=Ra(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Q(ue){this.data.characterReferenceType=ue.type}function J(ue){const _e=this.sliceSerialize(ue),fe=this.data.characterReferenceType;let Oe;fe?(Oe=I8(_e,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=JN(_e);const ze=this.stack[this.stack.length-1];ze.value+=Oe}function re(ue){const _e=this.stack.pop();_e.position.end=Us(ue.end)}function oe(ue){M.call(this,ue);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(ue)}function Z(ue){M.call(this,ue);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(ue)}function le(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function ee(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function Te(){return{type:"break"}}function Me(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Je(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function We(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function it(){return{type:"paragraph",children:[]}}function Ce(){return{type:"strong",children:[]}}function He(){return{type:"text",value:""}}function ge(){return{type:"thematicBreak"}}}function Us(e){return{line:e.line,column:e.column,offset:e.offset}}function K8(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?K8(e,r):tse(e,r)}}function tse(e,t){let n;for(n in t)if(V8.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function _D(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hd({start:t.start,end:t.end})+") is still open")}function nse(e){const t=this;t.parser=n;function n(r){return Jie(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rse(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ase(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
430
+ `}]}function ise(e,t){const n=t.value?t.value+`
431
+ `:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function sse(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ose(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lse(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=uc(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function use(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cse(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Y8(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=r:a.push({type:"text",value:r}),a}function dse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Y8(e,t);const a={src:uc(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function fse(e,t){const n={src:uc(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function hse(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Y8(e,t);const a={href:uc(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function pse(e,t){const n={href:uc(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gse(e,t,n){const r=e.all(t),a=n?vse(n):W8(t),i={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(a||l!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
432
+ `}),h.type==="element"&&h.tagName==="p"&&!a?s.push(...h.children):s.push(h)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
433
+ `});const d={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,d),e.applyData(t,d)}function vse(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=W8(n[r])}return t}function W8(e){const t=e.spread;return t??e.children.length>1}function yse(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function xse(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bse(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wse(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sse(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=YN(t.children[1]),c=E8(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function jse(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<l;){const m=t.children[c],g={},v=s?s[c]:void 0;v&&(g.align=v);let b={type:"element",tagName:i,properties:g,children:[]};m&&(b.children=e.all(m),e.patch(m,b),b=e.applyData(m,b)),d.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function _se(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const kD=9,CD=32;function kse(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(ND(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(ND(t.slice(a),a>0,!1)),i.join("")}function ND(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===kD||i===CD;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===kD||i===CD;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Cse(e,t){const n={type:"text",value:kse(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Nse(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ese={blockquote:rse,break:ase,code:ise,delete:sse,emphasis:ose,footnoteReference:lse,heading:use,html:cse,imageReference:dse,image:fse,inlineCode:hse,linkReference:mse,link:pse,listItem:gse,list:yse,paragraph:xse,root:bse,strong:wse,table:Sse,tableCell:_se,tableRow:jse,text:Cse,thematicBreak:Nse,toml:Mm,yaml:Mm,definition:Mm,footnoteDefinition:Mm};function Mm(){}const X8=-1,Ug=0,Gd=1,Ap=2,t2=3,n2=4,r2=5,a2=6,Z8=7,Q8=8,ED=typeof self=="object"?self:globalThis,Ase=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case Ug:case X8:return n(s,a);case Gd:{const l=n([],a);for(const c of s)l.push(r(c));return l}case Ap:{const l=n({},a);for(const[c,d]of s)l[r(c)]=r(d);return l}case t2:return n(new Date(s),a);case n2:{const{source:l,flags:c}=s;return n(new RegExp(l,c),a)}case r2:{const l=n(new Map,a);for(const[c,d]of s)l.set(r(c),r(d));return l}case a2:{const l=n(new Set,a);for(const c of s)l.add(r(c));return l}case Z8:{const{name:l,message:c}=s;return n(new ED[l](c),a)}case Q8:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new ED[i](s),a)};return r},AD=e=>Ase(new Map,e)(0),gu="",{toString:Tse}={},{keys:Ose}=Object,xd=e=>{const t=typeof e;if(t!=="object"||!e)return[Ug,t];const n=Tse.call(e).slice(8,-1);switch(n){case"Array":return[Gd,gu];case"Object":return[Ap,gu];case"Date":return[t2,gu];case"RegExp":return[n2,gu];case"Map":return[r2,gu];case"Set":return[a2,gu];case"DataView":return[Gd,n]}return n.includes("Array")?[Gd,n]:n.includes("Error")?[Z8,n]:[Ap,n]},Pm=([e,t])=>e===Ug&&(t==="function"||t==="symbol"),Mse=(e,t,n,r)=>{const a=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},i=s=>{if(n.has(s))return n.get(s);let[l,c]=xd(s);switch(l){case Ug:{let h=s;switch(c){case"bigint":l=Q8,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return a([X8],s)}return a([l,h],s)}case Gd:{if(c){let g=s;return c==="DataView"?g=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(s)),a([c,[...g]],s)}const h=[],m=a([l,h],s);for(const g of s)h.push(i(g));return m}case Ap:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const h=[],m=a([l,h],s);for(const g of Ose(s))(e||!Pm(xd(s[g])))&&h.push([i(g),i(s[g])]);return m}case t2:return a([l,s.toISOString()],s);case n2:{const{source:h,flags:m}=s;return a([l,{source:h,flags:m}],s)}case r2:{const h=[],m=a([l,h],s);for(const[g,v]of s)(e||!(Pm(xd(g))||Pm(xd(v))))&&h.push([i(g),i(v)]);return m}case a2:{const h=[],m=a([l,h],s);for(const g of s)(e||!Pm(xd(g)))&&h.push(i(g));return m}}const{message:d}=s;return a([l,{name:c,message:d}],s)};return i},TD=(e,{json:t,lossy:n}={})=>{const r=[];return Mse(!(t||n),!!t,new Map,r)(e),r},Tp=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?AD(TD(e,t)):structuredClone(e):(e,t)=>AD(TD(e,t));function Pse(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Dse(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Rse(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Pse,r=e.options.footnoteBackLabel||Dse,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),g=uc(m.toLowerCase());let v=0;const b=[],w=e.footnoteCounts.get(m);for(;w!==void 0&&++v<=w;){b.length>0&&b.push({type:"text",value:" "});let k=typeof n=="string"?n:n(c,v);typeof k=="string"&&(k={type:"text",value:k}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,v),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const k=S.children[S.children.length-1];k&&k.type==="text"?k.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(d,j),l.push(j)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Tp(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
434
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
435
+ `}]}}const Gg=(function(e){if(e==null)return $se;if(typeof e=="function")return Vg(e);if(typeof e=="object")return Array.isArray(e)?Ise(e):Lse(e);if(typeof e=="string")return zse(e);throw new Error("Expected function, string, or object as test")});function Ise(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gg(e[n]);return Vg(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Lse(e){const t=e;return Vg(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function zse(e){return Vg(t);function t(n){return n&&n.type===e}}function Vg(e){return t;function t(n,r,a){return!!(qse(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function $se(){return!0}function qse(e){return e!==null&&typeof e=="object"&&"type"in e}const J8=[],Bse=!0,mC=!1,Fse="skip";function eH(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Gg(a),s=r?-1:1;l(e,void 0,[])();function l(c,d,h){const m=c&&typeof c=="object"?c:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(c.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=J8,b,w,S;if((!t||i(c,d,h[h.length-1]||void 0))&&(v=Hse(n(c,h)),v[0]===mC))return v;if("children"in c&&c.children){const j=c;if(j.children&&v[0]!==Fse)for(w=(r?j.children.length:-1)+s,S=h.concat(j);w>-1&&w<j.children.length;){const k=j.children[w];if(b=l(k,w,S)(),b[0]===mC)return b;w=typeof b[1]=="number"?b[1]:w+s}}return v}}}function Hse(e){return Array.isArray(e)?e:typeof e=="number"?[Bse,e]:e==null?J8:[e]}function i2(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),eH(e,i,l,a);function l(c,d){const h=d[d.length-1],m=h?h.children.indexOf(c):void 0;return s(c,m,h)}}const pC={}.hasOwnProperty,Use={};function Gse(e,t){const n=t||Use,r=new Map,a=new Map,i=new Map,s={...Ese,...n.handlers},l={all:d,applyData:Kse,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:Vse,wrap:Wse};return i2(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:a,g=String(h.identifier).toUpperCase();m.has(g)||m.set(g,h)}}),l;function c(h,m){const g=h.type,v=l.handlers[g];if(pC.call(l.handlers,g)&&v)return v(l,h,m);if(l.options.passThrough&&l.options.passThrough.includes(g)){if("children"in h){const{children:w,...S}=h,j=Tp(S);return j.children=l.all(h),j}return Tp(h)}return(l.options.unknownHandler||Yse)(l,h,m)}function d(h){const m=[];if("children"in h){const g=h.children;let v=-1;for(;++v<g.length;){const b=l.one(g[v],h);if(b){if(v&&g[v-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=OD(b.value)),!Array.isArray(b)&&b.type==="element")){const w=b.children[0];w&&w.type==="text"&&(w.value=OD(w.value))}Array.isArray(b)?m.push(...b):m.push(b)}}}return m}}function Vse(e,t){e.position&&(t.position=Dre(e))}function Kse(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,Tp(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Yse(e,t){const n=t.data||{},r="value"in t&&!(pC.call(n,"hProperties")||pC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wse(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
436
+ `});++r<e.length;)r&&n.push({type:"text",value:`
437
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
438
+ `}),n}function OD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function MD(e,t){const n=Gse(e,t),r=n.one(e,void 0),a=Rse(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
439
+ `},a),i}function Xse(e,t){return e&&"run"in e?async function(n,r){const a=MD(n,{file:r,...t});await e.run(a,r)}:function(n,r){return MD(n,{file:r,...e||t})}}function PD(e){if(e)throw e}var I0,DD;function Zse(){if(DD)return I0;DD=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},i=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var g;for(g in d);return typeof g>"u"||e.call(d,g)},s=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},l=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return I0=function c(){var d,h,m,g,v,b,w=arguments[0],S=1,j=arguments.length,k=!1;for(typeof w=="boolean"&&(k=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<j;++S)if(d=arguments[S],d!=null)for(h in d)m=l(w,h),g=l(d,h),w!==g&&(k&&g&&(i(g)||(v=a(g)))?(v?(v=!1,b=m&&a(m)?m:[]):b=m&&i(m)?m:{},s(w,{name:h,newValue:c(k,b,g)})):typeof g<"u"&&s(w,{name:h,newValue:g}));return w},I0}var Qse=Zse();const L0=ea(Qse);function gC(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jse(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(c,...d){const h=e[++i];let m=-1;if(c){s(c);return}for(;++m<a.length;)(d[m]===null||d[m]===void 0)&&(d[m]=a[m]);a=d,h?eoe(h,l)(...d):s(null,...d)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function eoe(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(d){const h=d;if(l&&n)throw h;return a(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){n||(n=!0,t(s,...l))}function i(s){a(null,s)}}const ni={basename:toe,dirname:noe,extname:roe,join:aoe,sep:"/"};function toe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Rf(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(r=a):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function noe(e){if(Rf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function roe(e){Rf(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function aoe(...e){let t=-1,n;for(;++t<e.length;)Rf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ioe(n)}function ioe(e){Rf(e);const t=e.codePointAt(0)===47;let n=soe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function soe(e,t){let n="",r=0,a=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Rf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ooe={cwd:loe};function loe(){return"/"}function vC(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uoe(e){if(typeof e=="string")e=new URL(e);else if(!vC(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return coe(e)}function coe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const z0=["history","path","basename","stem","extname","dirname"];class tH{constructor(t){let n;t?vC(t)?n={path:t}:typeof t=="string"||doe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ooe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<z0.length;){const i=z0[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)z0.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?ni.basename(this.path):void 0}set basename(t){q0(t,"basename"),$0(t,"basename"),this.path=ni.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ni.dirname(this.path):void 0}set dirname(t){RD(this.basename,"dirname"),this.path=ni.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ni.extname(this.path):void 0}set extname(t){if($0(t,"extname"),RD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ni.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vC(t)&&(t=uoe(t)),q0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ni.basename(this.path,this.extname):void 0}set stem(t){q0(t,"stem"),$0(t,"stem"),this.path=ni.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new fr(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function $0(e,t){if(e&&e.includes(ni.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ni.sep+"`")}function q0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function RD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function doe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const foe=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),hoe={}.hasOwnProperty;class s2 extends foe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Jse()}copy(){const t=new s2;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(L0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(H0("data",this.frozen),this.namespace[t]=n,this):hoe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(H0("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Dm(t),r=this.parser||this.Parser;return B0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),B0("process",this.parser||this.Parser),F0("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const l=Dm(t),c=r.parse(l);r.run(c,l,function(h,m,g){if(h||!m||!g)return d(h);const v=m,b=r.stringify(v,g);goe(b)?g.value=b:g.result=b,d(h,g)});function d(h,m){h||!m?s(h):i?i(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),B0("processSync",this.parser||this.Parser),F0("processSync",this.compiler||this.Compiler),this.process(t,a),LD("processSync","process",n),r;function a(i,s){n=!0,PD(i),r=s}}run(t,n,r){ID(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,l){const c=Dm(n);a.run(t,c,d);function d(h,m,g){const v=m||t;h?l(h):s?s(v):r(void 0,v,g)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),LD("runSync","run",r),a;function i(s,l){PD(s),a=l,r=!0}}stringify(t,n){this.freeze();const r=Dm(n),a=this.compiler||this.Compiler;return F0("stringify",a),ID(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(H0("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;c(h,m)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(d.plugins),d.settings&&(a.settings=L0(!0,a.settings,d.settings))}function l(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];i(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,h){let m=-1,g=-1;for(;++m<r.length;)if(r[m][0]===d){g=m;break}if(g===-1)r.push([d,...h]);else if(h.length>0){let[v,...b]=h;const w=r[g][1];gC(w)&&gC(v)&&(v=L0(!0,w,v)),r[g]=[d,v,...b]}}}}const moe=new s2().freeze();function B0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function F0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function H0(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ID(e){if(!gC(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function LD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dm(e){return poe(e)?e:new tH(e)}function poe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function goe(e){return typeof e=="string"||voe(e)}function voe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yoe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zD=[],$D={allowDangerousHtml:!0},xoe=/^(https?|ircs?|mailto|xmpp)$/i,boe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function woe(e){const t=Soe(e),n=joe(e);return _oe(t.runSync(t.parse(n),n),e)}function Soe(e){const t=e.rehypePlugins||zD,n=e.remarkPlugins||zD,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$D}:$D;return moe().use(nse).use(n).use(Xse,r).use(t)}function joe(e){const t=e.children||"",n=new tH;return typeof t=="string"&&(n.value=t),n}function _oe(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||koe;for(const h of boe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+yoe+h.id,void 0);return i2(e,d),$re(e,{Fragment:f.Fragment,components:a,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function d(h,m,g){if(h.type==="raw"&&g&&typeof m=="number")return s?g.children.splice(m,1):g.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let v;for(v in P0)if(Object.hasOwn(P0,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=P0[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=c(String(b||""),v,h))}}if(h.type==="element"){let v=n?!n.includes(h.tagName):i?i.includes(h.tagName):!1;if(!v&&r&&typeof m=="number"&&(v=!r(h,m,g)),v&&g&&typeof m=="number")return l&&h.children?g.children.splice(m,1,...h.children):g.children.splice(m,1),m}}}function koe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||xoe.test(e.slice(0,t))?e:""}function qD(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function Coe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Noe(e,t,n){const a=Gg((n||{}).ignore||[]),i=Eoe(t);let s=-1;for(;++s<i.length;)eH(e,"text",l);function l(d,h){let m=-1,g;for(;++m<h.length;){const v=h[m],b=g?g.children:void 0;if(a(v,b?b.indexOf(v):void 0,g))return;g=v}if(g)return c(d,h)}function c(d,h){const m=h[h.length-1],g=i[s][0],v=i[s][1];let b=0;const S=m.children.indexOf(d);let j=!1,k=[];g.lastIndex=0;let _=g.exec(d.value);for(;_;){const E=_.index,T={index:_.index,input:_.input,stack:[...h,d]};let A=v(..._,T);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?g.lastIndex=E+1:(b!==E&&k.push({type:"text",value:d.value.slice(b,E)}),Array.isArray(A)?k.push(...A):A&&k.push(A),b=E+_[0].length,j=!0),!g.global)break;_=g.exec(d.value)}return j?(b<d.value.length&&k.push({type:"text",value:d.value.slice(b)}),m.children.splice(S,1,...k)):k=[d],S+k.length}}function Eoe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([Aoe(a[0]),Toe(a[1])])}return t}function Aoe(e){return typeof e=="string"?new RegExp(Coe(e),"g"):e}function Toe(e){return typeof e=="function"?e:function(){return e}}const U0="phrasing",G0=["autolink","link","image","label"];function Ooe(){return{transforms:[zoe],enter:{literalAutolink:Poe,literalAutolinkEmail:V0,literalAutolinkHttp:V0,literalAutolinkWww:V0},exit:{literalAutolink:Loe,literalAutolinkEmail:Ioe,literalAutolinkHttp:Doe,literalAutolinkWww:Roe}}}function Moe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:U0,notInConstruct:G0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:U0,notInConstruct:G0},{character:":",before:"[ps]",after:"\\/",inConstruct:U0,notInConstruct:G0}]}}function Poe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function V0(e){this.config.enter.autolinkProtocol.call(this,e)}function Doe(e){this.config.exit.autolinkProtocol.call(this,e)}function Roe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Ioe(e){this.config.exit.autolinkEmail.call(this,e)}function Loe(e){this.exit(e)}function zoe(e){Noe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$oe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qoe]],{ignore:["link","linkReference"]})}function $oe(e,t,n,r,a){let i="";if(!nH(a)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!Boe(n)))return!1;const s=Foe(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function qoe(e,t,n,r){return!nH(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Boe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Foe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=qD(e,"(");let i=qD(e,")");for(;r!==-1&&a>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function nH(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||nl(n)||Fg(n))&&(!t||n!==47)}rH.peek=Zoe;function Hoe(){this.buffer()}function Uoe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Goe(){this.buffer()}function Voe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Koe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ra(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Yoe(e){this.exit(e)}function Woe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ra(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xoe(e){this.exit(e)}function Zoe(){return"["}function rH(e,t,n,r){const a=n.createTracker(r);let i=a.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),s(),i+=a.move("]"),i}function Qoe(){return{enter:{gfmFootnoteCallString:Hoe,gfmFootnoteCall:Uoe,gfmFootnoteDefinitionLabelString:Goe,gfmFootnoteDefinition:Voe},exit:{gfmFootnoteCallString:Koe,gfmFootnoteCall:Yoe,gfmFootnoteDefinitionLabelString:Woe,gfmFootnoteDefinition:Xoe}}}function Joe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:rH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,i,s){const l=i.createTracker(s);let c=l.move("[^");const d=i.enter("footnoteDefinition"),h=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
440
+ `:" ")+i.indentLines(i.containerFlow(r,l.current()),t?aH:ele))),d(),c}}function ele(e,t,n){return t===0?e:aH(e,t,n)}function aH(e,t,n){return(n?"":" ")+e}const tle=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];iH.peek=sle;function nle(){return{canContainEols:["delete"],enter:{strikethrough:ale},exit:{strikethrough:ile}}}function rle(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tle}],handlers:{delete:iH}}}function ale(e){this.enter({type:"delete",children:[]},e)}function ile(e){this.exit(e)}function iH(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function sle(){return"~"}function ole(e){return e.length}function lle(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||ole,i=[],s=[],l=[],c=[];let d=0,h=-1;for(;++h<e.length;){const w=[],S=[];let j=-1;for(e[h].length>d&&(d=e[h].length);++j<e[h].length;){const k=ule(e[h][j]);if(n.alignDelimiters!==!1){const _=a(k);S[j]=_,(c[j]===void 0||_>c[j])&&(c[j]=_)}w.push(k)}s[h]=w,l[h]=S}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<d;)i[m]=BD(r[m]);else{const w=BD(r);for(;++m<d;)i[m]=w}m=-1;const g=[],v=[];for(;++m<d;){const w=i[m];let S="",j="";w===99?(S=":",j=":"):w===108?S=":":w===114&&(j=":");let k=n.alignDelimiters===!1?1:Math.max(1,c[m]-S.length-j.length);const _=S+"-".repeat(k)+j;n.alignDelimiters!==!1&&(k=S.length+k+j.length,k>c[m]&&(c[m]=k),v[m]=k),g[m]=_}s.splice(1,0,g),l.splice(1,0,v),h=-1;const b=[];for(;++h<s.length;){const w=s[h],S=l[h];m=-1;const j=[];for(;++m<d;){const k=w[m]||"";let _="",E="";if(n.alignDelimiters!==!1){const T=c[m]-(S[m]||0),A=i[m];A===114?_=" ".repeat(T):A===99?T%2?(_=" ".repeat(T/2+.5),E=" ".repeat(T/2-.5)):(_=" ".repeat(T/2),E=_):E=" ".repeat(T)}n.delimiterStart!==!1&&!m&&j.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&j.push(" "),n.alignDelimiters!==!1&&j.push(_),j.push(k),n.alignDelimiters!==!1&&j.push(E),n.padding!==!1&&j.push(" "),(n.delimiterEnd!==!1||m!==d-1)&&j.push("|")}b.push(n.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return b.join(`
441
+ `)}function ule(e){return e==null?"":String(e)}function BD(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function cle(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),dle);return a(),s}function dle(e,t,n){return">"+(n?"":" ")+e}function fle(e,t){return FD(e,t.inConstruct,!0)&&!FD(e,t.notInConstruct,!1)}function FD(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function HD(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
442
+ `&&fle(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
443
+ `}function hle(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>s&&(s=i):i=1,a=r+t.length,r=n.indexOf(t,a);return s}function mle(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function ple(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function gle(e,t,n,r){const a=ple(n),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(mle(e,n)){const m=n.enter("codeIndented"),g=n.indentLines(i,vle);return m(),g}const l=n.createTracker(r),c=a.repeat(Math.max(hle(i,a)+1,3)),d=n.enter("codeFenced");let h=l.move(c);if(e.lang){const m=n.enter(`codeFencedLang${s}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${s}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
444
+ `,encode:["`"],...l.current()})),m()}return h+=l.move(`
445
+ `),i&&(h+=l.move(i+`
446
+ `)),h+=l.move(c),d(),h}function vle(e,t,n){return(n?"":" ")+e}function o2(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yle(e,t,n,r){const a=o2(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
447
+ `,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),s(),d}function xle(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function rf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Op(e,t,n){const r=qu(e),a=qu(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sH.peek=ble;function sH(e,t,n,r){const a=xle(n),i=n.enter("emphasis"),s=n.createTracker(r),l=s.move(a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),h=Op(r.before.charCodeAt(r.before.length-1),d,a);h.inside&&(c=rf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),g=Op(r.after.charCodeAt(0),m,a);g.inside&&(c=c.slice(0,-1)+rf(m));const v=s.move(a);return i(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function ble(e,t,n){return n.options.emphasis||"*"}function wle(e,t){let n=!1;return i2(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,mC}),!!((!e.depth||e.depth<3)&&QN(e)&&(t.options.setext||n))}function Sle(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(wle(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),g=n.containerPhrasing(e,{...i.current(),before:`
448
+ `,after:`
449
+ `});return m(),h(),g+`
450
+ `+(a===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
451
+ `))+1))}const s="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
452
+ `,...i.current()});return/^[\t ]/.test(d)&&(d=rf(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}oH.peek=jle;function oH(e){return e.value||""}function jle(){return"<"}lH.peek=_le;function lH(e,t,n,r){const a=o2(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),d+=c.move(")"),s(),d}function _le(){return"!"}uH.peek=kle;function uH(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,i(),a==="full"||!d||d!==m?c+=l.move(m+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function kle(){return"!"}cH.peek=Cle;function cH(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const s=n.unsafe[i],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(r);){let d=c.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(c.index+1)}}return a+r+a}function Cle(){return"`"}function dH(e,t){const n=QN(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fH.peek=Nle;function fH(e,t,n,r){const a=o2(n),i=a==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,c;if(dH(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let m=s.move("<");return m+=s.move(n.containerPhrasing(e,{before:m,after:">",...s.current()})),m+=s.move(">"),l(),n.stack=h,m}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),d+=s.move(" "+a),d+=s.move(n.safe(e.title,{before:d,after:a,...s.current()})),d+=s.move(a),c()),d+=s.move(")"),l(),d}function Nle(e,t,n){return dH(e,n)?"<":"["}hH.peek=Ele;function hH(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const m=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=h,i(),a==="full"||!d||d!==m?c+=l.move(m+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Ele(){return"["}function l2(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ale(e){const t=l2(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Tle(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mH(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Ole(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?Tle(n):l2(n);const l=e.ordered?s==="."?")":".":Ale(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),mH(n)===s&&h){let m=-1;for(;++m<e.children.length;){const g=e.children[m];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=l),n.bulletCurrent=s;const d=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=i,a(),d}function Mle(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ple(e,t,n,r){const a=Mle(n);let i=n.bulletCurrent||l2(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),h);return c(),d;function h(m,g,v){return g?(v?"":" ".repeat(s))+m:(v?i:i+" ".repeat(s-i.length))+m}}function Dle(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,r);return i(),a(),s}const Rle=Gg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ile(e,t,n,r){return(e.children.some(function(s){return Rle(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Lle(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pH.peek=zle;function pH(e,t,n,r){const a=Lle(n),i=n.enter("strong"),s=n.createTracker(r),l=s.move(a+a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),h=Op(r.before.charCodeAt(r.before.length-1),d,a);h.inside&&(c=rf(d)+c.slice(1));const m=c.charCodeAt(c.length-1),g=Op(r.after.charCodeAt(0),m,a);g.inside&&(c=c.slice(0,-1)+rf(m));const v=s.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function zle(e,t,n){return n.options.strong||"*"}function $le(e,t,n,r){return n.safe(e.value,r)}function qle(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Ble(e,t,n){const r=(mH(n)+(n.options.ruleSpaces?" ":"")).repeat(qle(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gH={blockquote:cle,break:HD,code:gle,definition:yle,emphasis:sH,hardBreak:HD,heading:Sle,html:oH,image:lH,imageReference:uH,inlineCode:cH,link:fH,linkReference:hH,list:Ole,listItem:Ple,paragraph:Dle,root:Ile,strong:pH,text:$le,thematicBreak:Ble};function Fle(){return{enter:{table:Hle,tableData:UD,tableHeader:UD,tableRow:Gle},exit:{codeText:Vle,table:Ule,tableData:K0,tableHeader:K0,tableRow:K0}}}function Hle(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Ule(e){this.exit(e),this.data.inTable=void 0}function Gle(e){this.enter({type:"tableRow",children:[]},e)}function K0(e){this.exit(e)}function UD(e){this.enter({type:"tableCell",children:[]},e)}function Vle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kle(e,t){return t==="|"?t:e}function Yle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
453
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:s,tableCell:c,tableRow:l}};function s(v,b,w,S){return d(h(v,w,S),v.align)}function l(v,b,w,S){const j=m(v,w,S),k=d([j]);return k.slice(0,k.indexOf(`
454
+ `))}function c(v,b,w,S){const j=w.enter("tableCell"),k=w.enter("phrasing"),_=w.containerPhrasing(v,{...S,before:i,after:i});return k(),j(),_}function d(v,b){return lle(v,{align:b,alignDelimiters:r,padding:n,stringLength:a})}function h(v,b,w){const S=v.children;let j=-1;const k=[],_=b.enter("table");for(;++j<S.length;)k[j]=m(S[j],b,w);return _(),k}function m(v,b,w){const S=v.children;let j=-1;const k=[],_=b.enter("tableRow");for(;++j<S.length;)k[j]=c(S[j],v,b,w);return _(),k}function g(v,b,w){let S=gH.inlineCode(v,b,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Wle(){return{exit:{taskListCheckValueChecked:GD,taskListCheckValueUnchecked:GD,paragraph:Zle}}}function Xle(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qle}}}function GD(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Zle(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,s;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Qle(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(s);let c=gH.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),c;function d(h){return h+s}}function Jle(){return[Ooe(),Qoe(),nle(),Fle(),Wle()]}function eue(e){return{extensions:[Moe(),Joe(e),rle(),Yle(e),Xle()]}}const tue={tokenize:oue,partial:!0},vH={tokenize:lue,partial:!0},yH={tokenize:uue,partial:!0},xH={tokenize:cue,partial:!0},nue={tokenize:due,partial:!0},bH={name:"wwwAutolink",tokenize:iue,previous:SH},wH={name:"protocolAutolink",tokenize:sue,previous:jH},os={name:"emailAutolink",tokenize:aue,previous:_H},yi={};function rue(){return{text:yi}}let Lo=48;for(;Lo<123;)yi[Lo]=os,Lo++,Lo===58?Lo=65:Lo===91&&(Lo=97);yi[43]=os;yi[45]=os;yi[46]=os;yi[95]=os;yi[72]=[os,wH];yi[104]=[os,wH];yi[87]=[os,bH];yi[119]=[os,bH];function aue(e,t,n){const r=this;let a,i;return s;function s(m){return!yC(m)||!_H.call(r,r.previous)||u2(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return yC(m)?(e.consume(m),l):m===64?(e.consume(m),c):n(m)}function c(m){return m===46?e.check(nue,h,d)(m):m===45||m===95||cr(m)?(i=!0,e.consume(m),c):h(m)}function d(m){return e.consume(m),a=!0,c}function h(m){return i&&a&&vr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function iue(e,t,n){const r=this;return a;function a(s){return s!==87&&s!==119||!SH.call(r,r.previous)||u2(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tue,e.attempt(vH,e.attempt(yH,i),n),n)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function sue(e,t,n){const r=this;let a="",i=!1;return s;function s(m){return(m===72||m===104)&&jH.call(r,r.previous)&&!u2(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(vr(m)&&a.length<5)return a+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const g=a.toLowerCase();if(g==="http"||g==="https")return e.consume(m),c}return n(m)}function c(m){return m===47?(e.consume(m),i?d:(i=!0,c)):n(m)}function d(m){return m===null||Ep(m)||Xt(m)||nl(m)||Fg(m)?n(m):e.attempt(vH,e.attempt(yH,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function oue(e,t,n){let r=0;return a;function a(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),a):s===46&&r===3?(e.consume(s),i):n(s)}function i(s){return s===null?n(s):t(s)}}function lue(e,t,n){let r,a,i;return s;function s(d){return d===46||d===95?e.check(xH,c,l)(d):d===null||Xt(d)||nl(d)||d!==45&&Fg(d)?c(d):(i=!0,e.consume(d),s)}function l(d){return d===95?r=!0:(a=r,r=void 0),e.consume(d),s}function c(d){return a||r||!i?n(d):t(d)}}function uue(e,t){let n=0,r=0;return a;function a(s){return s===40?(n++,e.consume(s),a):s===41&&r<n?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(xH,t,i)(s):s===null||Xt(s)||nl(s)?t(s):(e.consume(s),a)}function i(s){return s===41&&r++,e.consume(s),a}}function cue(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),a):l===60||l===null||Xt(l)||nl(l)?t(l):n(l)}function a(l){return l===null||l===40||l===91||Xt(l)||nl(l)?t(l):r(l)}function i(l){return vr(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):vr(l)?(e.consume(l),s):n(l)}}function due(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return cr(i)?n(i):t(i)}}function SH(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xt(e)}function jH(e){return!vr(e)}function _H(e){return!(e===47||yC(e))}function yC(e){return e===43||e===45||e===46||e===95||cr(e)}function u2(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fue={tokenize:bue,partial:!0};function hue(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vue,continuation:{tokenize:yue},exit:xue}},text:{91:{name:"gfmFootnoteCall",tokenize:gue},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mue,resolveTo:pue}}}}function mue(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;a--;){const c=r.events[a][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=Ra(r.sliceSerialize({start:s.end,end:r.now()}));return d.codePointAt(0)!==94||!i.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function pue(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function gue(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,s;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),c}function c(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(i>999||m===93&&!s||m===null||m===91||Xt(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return a.includes(Ra(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Xt(m)||(s=!0),i++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),i++,d):d(m)}}function vue(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!l||b===null||b===91||Xt(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return i=Ra(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return Xt(b)||(l=!0),s++,e.consume(b),b===92?m:h}function m(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function g(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),At(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function yue(e,t,n){return e.check(Df,t,e.attempt(fue,t,n))}function xue(e){e.exit("gfmFootnoteDefinition")}function bue(e,t,n){const r=this;return At(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):n(i)}}function wue(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(s,l){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let d=c;for(;d--;)if(s[d][0]==="exit"&&s[d][1].type==="strikethroughSequenceTemporary"&&s[d][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[d][1].end.offset-s[d][1].start.offset){s[c][1].type="strikethroughSequence",s[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[d][1].start),end:Object.assign({},s[c][1].end)},m={type:"strikethroughText",start:Object.assign({},s[d][1].end),end:Object.assign({},s[c][1].start)},g=[["enter",h,l],["enter",s[d][1],l],["exit",s[d][1],l],["enter",m,l]],v=l.parser.constructs.insideSpan.null;v&&Yr(g,g.length,0,Hg(v,s.slice(d+1,c),l)),Yr(g,g.length,0,[["exit",m,l],["enter",s[c][1],l],["exit",s[c][1],l],["exit",h,l]]),Yr(s,d-1,c-d+3,g),c=d+g.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function i(s,l,c){const d=this.previous,h=this.events;let m=0;return g;function g(b){return d===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(s.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const w=qu(d);if(b===126)return m>1?c(b):(s.consume(b),m++,v);if(m<2&&!n)return c(b);const S=s.exit("strikethroughSequenceTemporary"),j=qu(b);return S._open=!j||j===2&&!!w,S._close=!w||w===2&&!!j,l(b)}}}class Sue{constructor(){this.map=[]}add(t,n,r){jue(this,t,n,r)}consume(t){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function jue(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function _ue(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function kue(){return{flow:{null:{name:"table",tokenize:Cue,resolveAll:Nue}}}}function Cue(e,t,n){const r=this;let a=0,i=0,s;return l;function l(M){let z=r.events.length-1;for(;z>-1;){const R=r.events[z][1].type;if(R==="lineEnding"||R==="linePrefix")z--;else break}const L=z>-1?r.events[z][1].type:null,F=L==="tableHead"||L==="tableRow"?A:c;return F===A&&r.parser.lazy[r.now().line]?n(M):F(M)}function c(M){return e.enter("tableHead"),e.enter("tableRow"),d(M)}function d(M){return M===124||(s=!0,i+=1),h(M)}function h(M){return M===null?n(M):nt(M)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),v):n(M):bt(M)?At(e,h,"whitespace")(M):(i+=1,s&&(s=!1,a+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),m(M)))}function m(M){return M===null||M===124||Xt(M)?(e.exit("data"),h(M)):(e.consume(M),M===92?g:m)}function g(M){return M===92||M===124?(e.consume(M),m):m(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),s=!1,bt(M)?At(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):b(M))}function b(M){return M===45||M===58?S(M):M===124?(s=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),w):T(M)}function w(M){return bt(M)?At(e,S,"whitespace")(M):S(M)}function S(M){return M===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),j):M===45?(i+=1,j(M)):M===null||nt(M)?E(M):T(M)}function j(M){return M===45?(e.enter("tableDelimiterFiller"),k(M)):T(M)}function k(M){return M===45?(e.consume(M),k):M===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(M))}function _(M){return bt(M)?At(e,E,"whitespace")(M):E(M)}function E(M){return M===124?b(M):M===null||nt(M)?!s||a!==i?T(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):T(M)}function T(M){return n(M)}function A(M){return e.enter("tableRow"),O(M)}function O(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),O):M===null||nt(M)?(e.exit("tableRow"),t(M)):bt(M)?At(e,O,"whitespace")(M):(e.enter("data"),D(M))}function D(M){return M===null||M===124||Xt(M)?(e.exit("data"),O(M)):(e.consume(M),M===92?P:D)}function P(M){return M===92||M===124?(e.consume(M),D):D(M)}}function Nue(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,h,m;const g=new Sue;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(VD(g,t,c,d,h),h=void 0,c=0),d={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",d,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,m=void 0,i=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",h,t]])),a=b.type==="tableDelimiterRow"?2:h?3:1):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],m=Rm(g,t,i,a,void 0,m),i=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(s[0]=s[1],m=Rm(g,t,i,a,void 0,m)),i=s,s=[i[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,i[1]!==0?(s[0]=s[1],m=Rm(g,t,i,a,n,m)):s[1]!==0&&(m=Rm(g,t,s,a,n,m)),a=0):a&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&VD(g,t,c,d,h),g.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=_ue(t.events,n))}return e}function Rm(e,t,n,r,a,i){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},Cu(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Cu(t.events,n[1]);if(i={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const d=Cu(t.events,n[2]),h=Cu(t.events,n[3]),m={type:l,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const g=t.events[n[2]],v=t.events[n[3]];if(g[1].end=Object.assign({},v[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return a!==void 0&&(i.end=Object.assign({},Cu(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function VD(e,t,n,r,a){const i=[],s=Cu(t.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,t])),r.end=Object.assign({},s),i.push(["exit",r,t]),e.add(n+1,0,i)}function Cu(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Eue={name:"tasklistCheck",tokenize:Tue};function Aue(){return{text:{91:Eue}}}function Tue(e,t,n){const r=this;return a;function a(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Xt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return nt(c)?t(c):bt(c)?e.check({tokenize:Oue},t,n)(c):n(c)}}function Oue(e,t,n){return At(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function Mue(e){return R8([rue(),hue(),wue(e),kue(),Aue()])}const Pue={};function Due(e){const t=this,n=e||Pue,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(Mue(n)),i.push(Jle()),s.push(eue(n))}function kH({content:e,className:t}){return f.jsx("div",{className:`markdown-content ${t??""}`,children:f.jsx(woe,{remarkPlugins:[Due],components:{a:({href:n,children:r})=>f.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:r})},children:e})})}const Qa={bg:"#1e1e1e",border:"#3c3c3c",cursor:"#aeafad",timestamp:"#6a9955",prefix:{info:"#569cd6",error:"#f44747",output:"#9cdcfe",commit:"#4ec9b0",input:"#c586c0",prompt:"#c586c0",warning:"#dcdcaa",assistant:"#b392f0",tool_use:"#79c0ff",tool_result:"#56d364"},message:{info:"#9cdcfe",error:"#f1807e",output:"#d4d4d4",commit:"#a8c990",input:"#ce9178",prompt:"#c586c0",warning:"#dcdcaa",assistant:"#e6e6e6",tool_use:"#8b949e",tool_result:"#7ee787"}},KD={info:"[INF]",error:"[ERR]",output:"[OUT]",commit:"[GIT]",input:"[>>>]",prompt:"[PRM]",warning:"[WRN]",assistant:"[CLU]",tool_use:"[USE]",tool_result:"[RES]"};function Rue(e,t){const n=[],r=/(\*\*(.+?)\*\*)|(`(.+?)`)|(\*(.+?)\*)/g;let a=0,i,s=0;for(;(i=r.exec(e))!==null;)i.index>a&&n.push(e.slice(a,i.index)),i[1]?n.push(f.jsx("strong",{style:{color:"#d7ba7d",fontWeight:700},children:i[2]},s++)):i[3]?n.push(f.jsx("code",{style:{color:"#ce9178",background:"rgba(255,255,255,0.07)",padding:"0 3px",borderRadius:3,fontSize:"0.7rem"},children:i[4]},s++)):i[5]&&n.push(f.jsx("em",{style:{color:t,opacity:.75,fontStyle:"italic"},children:i[6]},s++)),a=i.index+i[0].length;return a<e.length&&n.push(e.slice(a)),n.length>0?n:[e]}function Y0(e){try{const n=JSON.parse(e);if(n&&typeof n.tool=="string")return n}catch{}const t=e.match(/^\[Tool:\s*(\w+)\](.*)$/);return t?{tool:t[1],summary:t[2].trim()}:null}function c2({logs:e,interactive:t,todoId:n,onSendInput:r,embedded:a}){const i=x.useRef(null),[s,l]=x.useState(""),[c,d]=x.useState(!1),[h,m]=x.useState(!1),g=x.useRef(0),[v,b]=x.useState(new Set),{t:w}=tt(),S=x.useMemo(()=>e.some(P=>P.log_type==="assistant"||P.log_type==="tool_use"),[e]),[j,k]=x.useState("chat");x.useEffect(()=>{k(S?"chat":"raw")},[S]),x.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),x.useEffect(()=>{if(!h||e.length===0)return;const P=Date.now()-g.current,M=e[e.length-1];if(M.log_type==="output"||M.log_type==="error"||M.log_type==="commit"||M.log_type==="assistant")if(P>=1e3)m(!1);else{const z=setTimeout(()=>m(!1),1e3-P);return()=>clearTimeout(z)}},[e,h]);const _=P=>{P.preventDefault(),!(!s.trim()||!n||!r)&&(r(n,s),l(""),m(!0),g.current=Date.now())},E=async()=>{const P=e.map(M=>{const z=new Date(M.created_at).toLocaleTimeString();if(j==="chat"){if(M.log_type==="assistant")return`${z} [Claude]
455
+ ${M.message}
456
+ `;if(M.log_type==="tool_use"){const L=Y0(M.message);return L?`${z} [Tool: ${L.tool}] ${L.summary}`:`${z} [USE] ${M.message}`}if(M.log_type==="tool_result")return`${z} [Result] ${M.message.slice(0,200)}`}return`${z} ${KD[M.log_type]||"[???]"} ${M.message}`}).join(`
457
+ `);await navigator.clipboard.writeText(P),d(!0),setTimeout(()=>d(!1),2e3)},T=P=>{b(M=>{const z=new Set(M);return z.has(P)?z.delete(P):z.add(P),z})},A=P=>{const M=new Date(P.created_at).toLocaleTimeString(),z=Qa.prefix[P.log_type]||Qa.prefix.output,L=Qa.message[P.log_type]||Qa.message.output;return f.jsxs("div",{className:"mb-0.5 leading-relaxed",children:[f.jsx("span",{style:{color:Qa.timestamp},children:M})," ",f.jsx("span",{style:{color:z,fontWeight:700},children:KD[P.log_type]||"[???]"})," ",f.jsx("span",{style:{color:L},children:Rue(P.message,L)})]},P.id)},O=P=>{if(P.log_type==="assistant")return f.jsx("div",{style:{borderLeft:"3px solid #b392f0",background:"rgba(179, 146, 240, 0.06)",borderRadius:8,padding:"8px 12px",margin:"6px 0"},children:f.jsx(kH,{content:P.message,className:"markdown-content-dark"})},P.id);if(P.log_type==="tool_use"){const M=Y0(P.message),z=v.has(P.id);return M?f.jsxs("div",{style:{margin:"2px 0",fontSize:"0.7rem"},children:[f.jsxs("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontFamily:"monospace",fontSize:"0.7rem",display:"flex",alignItems:"center",gap:6,width:"100%",textAlign:"left",borderRadius:4,transition:"background 0.15s"},onMouseEnter:L=>L.currentTarget.style.background="rgba(255,255,255,0.05)",onMouseLeave:L=>L.currentTarget.style.background="none",children:[f.jsx("span",{style:{color:"#6a9955",fontSize:"0.6rem"},children:z?"▾":"▸"}),f.jsx("span",{style:{color:"#79c0ff",fontWeight:600},children:M.tool}),f.jsx("span",{style:{color:"#8b949e",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.summary})]}),z&&M.input&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.25)",border:"1px solid #3c3c3c",borderRadius:6,padding:"6px 10px",margin:"2px 0 2px 18px",fontSize:"0.65rem",color:"#8b949e",overflow:"auto",maxHeight:200},children:JSON.stringify(M.input,null,2)})]},P.id):A(P)}if(P.log_type==="tool_result"){const M=v.has(P.id),z=P.message.split(`
458
+ `).slice(0,3).join(`
459
+ `);return f.jsxs("div",{style:{margin:"1px 0 1px 18px",fontSize:"0.65rem"},children:[f.jsx("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"1px 4px",fontFamily:"monospace",fontSize:"0.65rem",color:"#56d364",opacity:.5},children:M?"▾ Result":"▸ Result"}),M&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.2)",border:"1px solid #3c3c3c",borderRadius:6,padding:"4px 8px",margin:"2px 0",fontSize:"0.6rem",color:"#7ee787",opacity:.6,overflow:"auto",maxHeight:300},children:P.message}),!M&&z!==P.message&&f.jsxs("span",{style:{color:"#56d364",opacity:.3,marginLeft:8},children:[z.slice(0,80),"..."]})]},P.id)}if(P.log_type==="output"){const M=Y0(P.message);if(M){const z=v.has(P.id);return f.jsxs("div",{style:{margin:"2px 0",fontSize:"0.7rem"},children:[f.jsxs("button",{onClick:()=>T(P.id),style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontFamily:"monospace",fontSize:"0.7rem",display:"flex",alignItems:"center",gap:6},onMouseEnter:L=>L.currentTarget.style.background="rgba(255,255,255,0.05)",onMouseLeave:L=>L.currentTarget.style.background="none",children:[f.jsx("span",{style:{color:"#6a9955",fontSize:"0.6rem"},children:z?"▾":"▸"}),f.jsx("span",{style:{color:"#79c0ff",fontWeight:600},children:M.tool}),f.jsx("span",{style:{color:"#8b949e"},children:M.summary})]}),z&&M.input&&f.jsx("pre",{style:{background:"rgba(0,0,0,0.25)",border:"1px solid #3c3c3c",borderRadius:6,padding:"6px 10px",margin:"2px 0 2px 18px",fontSize:"0.65rem",color:"#8b949e",overflow:"auto",maxHeight:200},children:JSON.stringify(M.input,null,2)})]},P.id)}}return A(P)},D=P=>({padding:"1px 6px",fontSize:"9px",fontFamily:"monospace",borderRadius:3,background:P?"#3c3c3c":"transparent",color:P?"#d4d4d4":"#858585",border:"none",cursor:"pointer",transition:"all 0.15s"});return f.jsxs("div",{className:"flex flex-col",children:[f.jsxs("div",{className:"relative",children:[e.length>0&&!a&&f.jsxs("div",{style:{position:"absolute",top:8,right:8,zIndex:10,display:"flex",alignItems:"center",gap:4},children:[f.jsxs("div",{style:{display:"flex",borderRadius:4,border:"1px solid #3c3c3c",overflow:"hidden"},children:[f.jsx("button",{onClick:()=>k("chat"),style:D(j==="chat"),children:w("log.viewChat")}),f.jsx("button",{onClick:()=>k("raw"),style:D(j==="raw"),children:w("log.viewRaw")})]}),f.jsx("button",{onClick:E,style:{padding:"2px 8px",fontSize:"10px",fontFamily:"monospace",borderRadius:4,background:"#2d2d2d",color:"#858585",border:"1px solid #3c3c3c",cursor:"pointer",transition:"color 0.15s"},onMouseEnter:P=>P.currentTarget.style.color="#d4d4d4",onMouseLeave:P=>P.currentTarget.style.color="#858585",children:w(c?"log.copied":"log.copy")})]}),f.jsxs("div",{ref:i,className:a?"max-h-64 overflow-y-auto overflow-x-auto font-mono text-xs":"h-48 sm:h-64 overflow-y-auto overflow-x-auto rounded-xl p-3 sm:p-4 font-mono text-xs",style:a?void 0:{backgroundColor:Qa.bg,border:`1px solid ${Qa.border}`},children:[e.length===0?f.jsx("p",{style:{color:"#6a9955"},children:w("log.awaiting")}):e.map(P=>j==="chat"?O(P):A(P)),t&&h&&f.jsxs("div",{className:"mb-0.5 leading-relaxed",children:[f.jsxs("span",{className:"inline-flex gap-1",style:{color:"#569cd6"},children:[f.jsx("span",{className:"animate-bounce",style:{animationDelay:"0ms",animationDuration:"1.2s"},children:"●"}),f.jsx("span",{className:"animate-bounce",style:{animationDelay:"200ms",animationDuration:"1.2s"},children:"●"}),f.jsx("span",{className:"animate-bounce",style:{animationDelay:"400ms",animationDuration:"1.2s"},children:"●"})]}),f.jsx("span",{className:"ml-2",style:{color:"#6a9955",fontSize:"0.65rem"},children:w("log.waitingResponse")})]}),f.jsx("span",{style:{color:Qa.cursor},className:"animate-pulse",children:"_"})]})]}),t&&f.jsxs("form",{onSubmit:_,style:a?{display:"flex",alignItems:"center",gap:8,padding:"4px 0",marginTop:4}:{display:"flex",alignItems:"center",gap:8,backgroundColor:Qa.bg,border:`1px solid ${Qa.border}`,borderTop:"none",borderBottomLeftRadius:12,borderBottomRightRadius:12,padding:"6px 16px"},children:[f.jsx("span",{style:{color:"#569cd6",fontFamily:"monospace",fontWeight:700,fontSize:12},children:"$"}),f.jsx("input",{type:"text",value:s,onChange:P=>l(P.target.value),style:{flex:1,background:"transparent",border:"none",outline:"none",color:"#ce9178",fontFamily:"monospace",fontSize:12},placeholder:w("todo.sendPlaceholder"),autoFocus:!0}),f.jsx("button",{type:"submit",style:{color:"#569cd6",fontFamily:"monospace",fontWeight:700,fontSize:12,letterSpacing:"0.05em",background:"none",border:"none",cursor:"pointer"},onMouseEnter:P=>P.currentTarget.style.color="#9cdcfe",onMouseLeave:P=>P.currentTarget.style.color="#569cd6",children:"SEND"})]})]})}let Iue=0;function Kg({onSave:e,onCancel:t,initialTitle:n="",initialDescription:r="",initialCliTool:a,initialCliModel:i,initialDependsOn:s,initialMaxTurns:l,initialUseWorktree:c=null,projectCliTool:d="claude",projectCliModel:h="",projectIsGitRepo:m=!1,projectUseWorktree:g=!0,existingImages:v=[],todoId:b,onDeleteImage:w,availableTodos:S=[]}){const[j,k]=x.useState(n),[_,E]=x.useState(r),[T,A]=x.useState(a||d||"claude"),[O,D]=x.useState(i??h??""),[P,M]=x.useState(s??""),[z,L]=x.useState((l==null?void 0:l.toString())??""),[F,R]=x.useState(c===1?"force-on":c===0?"force-off":"inherit"),[I,q]=x.useState([]),[G,Y]=x.useState(v),K=x.useRef(null),B=x.useRef(null),{t:U}=tt(),{getToolConfig:X}=oc(),H=X(T),W=ae=>{A(ae),D("")},Q=x.useCallback(ae=>{const xe=Array.from(ae).filter(ye=>ye.type.startsWith("image/"));for(const ye of xe){const Te=new FileReader;Te.onload=()=>{const Me=Te.result,he=`pending-${++Iue}`;q(Ie=>[...Ie,{id:he,name:ye.name,data:Me,preview:Me}])},Te.readAsDataURL(ye)}},[]),J=x.useCallback(ae=>{var Me;const xe=(Me=ae.clipboardData)==null?void 0:Me.items;if(!xe)return;const ye=[];for(let he=0;he<xe.length;he++)xe[he].type.startsWith("image/")&&ye.push(xe[he]);if(ye.length===0)return;ae.preventDefault();const Te=[];for(const he of ye){const Ie=he.getAsFile();Ie&&Te.push(Ie)}Q(Te)},[Q]),re=x.useCallback(ae=>{var xe;ae.preventDefault(),ae.stopPropagation(),(xe=ae.dataTransfer)!=null&&xe.files&&Q(ae.dataTransfer.files)},[Q]),oe=x.useCallback(ae=>{ae.preventDefault(),ae.stopPropagation()},[]),Z=ae=>{q(xe=>xe.filter(ye=>ye.id!==ae))},le=ae=>{w&&w(ae),Y(xe=>xe.filter(ye=>ye.id!==ae))},ie=ae=>{if(ae.preventDefault(),!j.trim())return;const xe=z?parseInt(z,10):void 0,ye=F==="force-on"?1:F==="force-off"?0:null;e(j.trim(),_.trim(),T,O||void 0,I.length>0?I:void 0,P||void 0,xe||void 0,ye)},ee=G.length+I.length;return f.jsxs("form",{onSubmit:ie,className:"card p-5 border-accent/30",children:[f.jsx("div",{className:"mb-3",children:f.jsx("input",{type:"text",placeholder:U("todoForm.titlePlaceholder"),value:j,onChange:ae=>k(ae.target.value),className:"input-field",autoFocus:!0})}),f.jsxs("div",{className:"mb-4",children:[f.jsx("textarea",{ref:K,placeholder:U("todoForm.descPlaceholder"),value:_,onChange:ae=>E(ae.target.value),onPaste:J,onDrop:re,onDragOver:oe,rows:3,className:"input-field resize-none"}),f.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[f.jsxs("button",{type:"button",onClick:()=>{var ae;return(ae=B.current)==null?void 0:ae.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded text-2xs font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(Jd,{size:14}),U("todoForm.addImage")]}),f.jsx("span",{className:"text-2xs text-warm-300",children:U("todoForm.pasteHint")})]}),f.jsx("input",{ref:B,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ae=>{ae.target.files&&Q(ae.target.files),ae.target.value=""}})]}),ee>0&&f.jsxs("div",{className:"mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider",children:U("todoForm.images")}),f.jsxs("span",{className:"text-2xs text-warm-400",children:["(",ee,")"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[G.map(ae=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:b?tf(b,ae.id):"",alt:ae.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>le(ae.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(ga,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ae.originalName})})]},ae.id)),I.map(ae=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:ae.preview,alt:ae.name,className:"h-20 w-20 object-cover rounded-lg border border-accent/30"}),f.jsx("button",{type:"button",onClick:()=>Z(ae.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-status-error text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(ga,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ae.name})})]},ae.id))]})]}),f.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:U("todoForm.cliTool")}),f.jsx("select",{value:T,onChange:ae=>W(ae.target.value),className:"input-field text-sm",children:ai.map(ae=>f.jsx("option",{value:ae.value,children:ae.label},ae.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:U("todoForm.aiModel")}),f.jsx("select",{value:O,onChange:ae=>D(ae.target.value),className:"input-field text-sm",children:H.models.map(ae=>f.jsx("option",{value:ae.value,children:ae.label},ae.value))})]})]}),T==="claude"&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:U("todoForm.maxTurns")}),f.jsx("input",{type:"number",min:"1",max:"500",placeholder:U("todoForm.maxTurnsPlaceholder"),value:z,onChange:ae=>L(ae.target.value),className:"input-field text-sm w-32"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:U("todoForm.maxTurnsHint")})]}),m&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:U("todoForm.worktreeMode")}),f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="inherit",onChange:()=>R("inherit")}),f.jsxs("span",{children:[U("todoForm.worktreeInherit"),f.jsxs("span",{className:"text-2xs text-warm-400 ml-1",children:["(",U(g?"todoForm.worktreeProjectDefaultOn":"todoForm.worktreeProjectDefaultOff"),")"]})]})]}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="force-on",onChange:()=>R("force-on")}),f.jsx("span",{children:U("todoForm.worktreeForceOn")})]}),f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm",children:[f.jsx("input",{type:"radio",name:"useWorktreeMode",checked:F==="force-off",onChange:()=>R("force-off")}),f.jsx("span",{children:U("todoForm.worktreeForceOff")})]})]}),(F==="force-off"||F==="inherit"&&!g)&&f.jsx("p",{className:"text-2xs text-status-warning mt-1.5",children:U("todoForm.worktreeMainWarning")})]}),S.length>0&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:U("todoForm.dependsOn")}),f.jsxs("select",{value:P,onChange:ae=>M(ae.target.value),className:"input-field text-sm",children:[f.jsx("option",{value:"",children:U("todoForm.noDependency")}),S.map(ae=>f.jsxs("option",{value:ae.id,children:[ae.title," (",U(`status.${ae.status}`),")"]},ae.id))]}),P&&f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:U("todoForm.dependsOnHint")})]}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:U("todoForm.cancel")}),f.jsx("button",{type:"submit",disabled:!j.trim(),className:"btn-primary text-sm",children:U("todoForm.save")})]})]})}const Yt={titleBg:"#2d2d2d",titleText:"#999",bg:"#0c0c0c",text:"#cccccc",dim:"#666666",bright:"#f2f2f2",prompt:"#16c60c",success:"#16c60c",error:"#f14c4c",warning:"#cca700",info:"#569cd6",separator:"#333333"},Vd="'Cascadia Code', 'Cascadia Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace";function Lue({children:e}){const[t,n]=x.useState(!1),[r,a]=x.useState(!1),i=x.useRef(null),s=x.useRef(null),[l,c]=x.useState({top:0,left:0}),d=x.useCallback(()=>{if(!i.current)return;const m=i.current.getBoundingClientRect(),g=window.innerWidth,v=window.innerHeight;let b=m.bottom+4;const w=s.current;if(w){const S=w.offsetWidth,j=w.offsetHeight;let k=m.right-S;k<8&&(k=8),k+S>g-8&&(k=g-8-S),b+j>v-8&&(b=m.top-j-4),c({top:b,left:k}),a(!0)}else c({top:b,left:Math.max(8,m.right-180)})},[]);x.useEffect(()=>{if(!t){a(!1);return}d();const m=requestAnimationFrame(d),g=v=>{var w,S;const b=v.target;(w=i.current)!=null&&w.contains(b)||(S=s.current)!=null&&S.contains(b)||n(!1)};return document.addEventListener("mousedown",g),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{cancelAnimationFrame(m),document.removeEventListener("mousedown",g),window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[t,d]);const h=(Array.isArray(e)?e:[e]).filter(Boolean);return h.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx("button",{ref:i,onClick:()=>n(!t),className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-theme-hover rounded-lg transition-colors",title:"More",children:f.jsx(GF,{size:14})}),t&&vl.createPortal(f.jsx("div",{ref:s,className:`fixed z-tooltip min-w-[160px] rounded-xl py-1 shadow-elevated${r?" animate-scale-in":""}`,style:{top:l.top,left:l.left,opacity:r?1:0,backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},onClick:()=>n(!1),children:h}),document.body)]})}function zue({todo:e,allTodos:t=[],projectCliTool:n,projectIsGitRepo:r,projectUseWorktree:a,onStart:i,onStop:s,onDelete:l,onEdit:c,onMerge:d,onCleanup:h,onRetry:m,onContinue:g,onFix:v,onSchedule:b,onScheduleOnReset:w,resetsAt:S,onEvent:j,isInteractive:k,onSendInput:_,isDragSource:E,isDragging:T,isDragOver:A,isValidDropTarget:O,onDragStart:D,onDragEnd:P,onDragOverTarget:M,onDragLeaveTarget:z,onDropTarget:L,onRemoveDependency:F,debugLogging:R,showTokenUsage:I,isChainMember:q}){const[G,Y]=x.useState(!1),[K,B]=x.useState(!1),[U,X]=x.useState([]),[H,W]=x.useState(!1),[Q,J]=x.useState(!1),[re,oe]=x.useState(null),[Z,le]=x.useState(!1),[ie,ee]=x.useState(null),[ae,xe]=x.useState(!1),[ye,Te]=x.useState(null),[Me,he]=x.useState(!1),[Ie,Je]=x.useState(null),[We,it]=x.useState(!1),[Ce,He]=x.useState(null),[ge,ue]=x.useState(!1),[_e,fe]=x.useState(""),[Oe,ze]=x.useState(!1),[ut,gt]=x.useState(null),[_t,ct]=x.useState(!1),[Ae,$e]=x.useState(""),[Xe,pt]=x.useState(!1),[at,Et]=x.useState(null),[Ze,Ot]=x.useState(null),[zt,hn]=x.useState(!1),[ne,be]=x.useState(!1),[Se,Pe]=x.useState(!1),[Le,ot]=x.useState(()=>{const we=new Date;we.setHours(we.getHours()+1),we.setMinutes(0,0,0);const dt=we.getFullYear(),wt=String(we.getMonth()+1).padStart(2,"0"),vn=String(we.getDate()).padStart(2,"0"),vt=String(we.getHours()).padStart(2,"0"),_a=String(we.getMinutes()).padStart(2,"0");return`${dt}-${wt}-${vn}T${vt}:${_a}`}),[Vt,ir]=x.useState(!1),{t:Re}=tt(),Cn=e.status==="pending"||e.status==="failed"||e.status==="stopped",Dr=(e.status==="pending"||e.status==="failed"||e.status==="stopped")&&!!b,Ml=(e.status==="pending"||e.status==="completed"||e.status==="failed"||e.status==="stopped")&&!!w&&!!S&&S>Math.floor(Date.now()/1e3),Pl=e.status==="running",Rr=e.status==="completed"||e.status==="stopped"||e.status==="merged",jn=e.status==="completed"&&!q&&!!e.branch_name,Gn=e.status==="completed"||e.status==="failed"||e.status==="stopped",Sa=!!g&&e.status==="completed"&&!!e.worktree_path,ys=e.status!=="running"&&e.status!=="pending"&&!!e.worktree_path&&!q,wi=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged";x.useEffect(()=>{k&&e.status==="running"&&!G&&Y(!0)},[k,e.status]),x.useEffect(()=>{G&&!H&&u8(e.id).then(we=>{X(we),W(!0)}).catch(()=>{})},[G,H,e.id]),x.useEffect(()=>{G&&wi&&!zt&&d8(e.id).then(we=>{Ot(we),hn(!0)}).catch(()=>{hn(!0)})},[G,wi,zt,e.id]),x.useEffect(()=>j(we=>{if(we.type==="todo:log"&&we.todoId===e.id&&we.message){const dt={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:we.logType||"output",message:we.message,created_at:new Date().toISOString()};X(wt=>[...wt,dt])}if(we.type==="todo:commit"&&we.todoId===e.id&&we.message){const dt={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${we.commitHash?`[${we.commitHash}] `:""}${we.message}`,created_at:new Date().toISOString()};X(wt=>[...wt,dt])}}),[j,e.id]);const jc=async()=>{try{const{files:we}=await XF(e.project_id,e.id);we.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(we[0].name)}`,"_blank")}catch{}},mo=async()=>{if(Q){J(!1);return}le(!0),ee(null);try{const we=await c8(e.id);oe(we),J(!0),Y(!0)}catch(we){ee(we instanceof Error?we.message:"Failed to load diff"),Y(!0)}finally{le(!1)}},Si=async()=>{xe(!0),Te(null);try{await d(e.id)}catch(we){Te(we instanceof Error?we.message:"Merge failed")}finally{xe(!1)}},po=async()=>{const we=e.branch_name?confirm(Re("cleanup.confirmDeleteBranch").replace("{name}",e.branch_name)):!1;he(!0),Je(null);try{await h(e.id,we)}catch(dt){Je(dt instanceof Error?dt.message:"Cleanup failed")}finally{he(!1)}},Ua=async(we="headless")=>{it(!0),He(null),X([]),W(!1),oe(null),J(!1),Ot(null),hn(!1);try{await m(e.id,we)}catch(dt){He(dt instanceof Error?dt.message:"Retry failed")}finally{it(!1)}},Ga=async(we="headless")=>{if(!g)return;const dt=_e.trim();if(!dt){gt(Re("todo.continuePromptRequired"));return}ze(!0),gt(null);try{await g(e.id,dt,we),ue(!1),fe(""),X([]),W(!1)}catch(wt){gt(wt instanceof Error?wt.message:"Continue failed")}finally{ze(!1)}},Va=async()=>{if(!(!w||!Ae.trim())){pt(!0),Et(null);try{await w(e.id,Ae.trim()),ct(!1),$e("")}catch(we){Et(we instanceof Error?we.message:"Failed")}finally{pt(!1)}}},Ka=async()=>{if(!(!b||!Le)){ir(!0);try{await b(e.id,new Date(Le).toISOString(),Se),be(!1)}catch{}finally{ir(!1)}}},gn=we=>{if(we<60)return`${we}s`;const dt=Math.floor(we/60),wt=we%60;if(dt<60)return wt>0?`${dt}m ${wt}s`:`${dt}m`;const vn=Math.floor(dt/60),vt=dt%60;return vt>0?`${vn}h ${vt}m`:`${vn}h`},go=we=>we>=1e6?`${(we/1e6).toFixed(1)}M`:we>=1e3?`${(we/1e3).toFixed(1)}k`:String(we),ja=e.images?JSON.parse(e.images):[],Vn=e.depends_on?t.find(we=>we.id===e.depends_on):null,wr=t.find(we=>we.depends_on===e.id&&we.merged_from_branch),_c=e.cli_tool||n||"claude",vo=$u(_c).supportsInteractive;if(K)return f.jsx(Kg,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:r,projectUseWorktree:a,existingImages:ja,todoId:e.id,availableTodos:t.filter(we=>we.id!==e.id),onDeleteImage:async we=>{await f8(e.id,we)},onSave:async(we,dt,wt,vn,vt,_a,Il,xo)=>{await c(e.id,we,dt,wt,vn,_a,Il,xo),vt&&vt.length>0&&await UN(e.id,vt.map(ta=>({name:ta.name,data:ta.data}))),B(!1)},onCancel:()=>B(!1)});const Dl={pending:"border-l-warm-300",running:"border-l-status-running",completed:"border-l-status-success",failed:"border-l-status-error",stopped:"border-l-status-warning",merged:"border-l-status-merged"}[e.status],kc=we=>{we.dataTransfer.setData("text/plain",e.id),we.dataTransfer.effectAllowed="link",D==null||D(e.id)},xs=()=>{P==null||P()},bs=we=>{!T||E||(we.preventDefault(),we.dataTransfer.dropEffect=O?"link":"none",M==null||M(e.id))},Ir=()=>{z==null||z(e.id)},sr=we=>{we.preventDefault(),!(!T||E||!O)&&(L==null||L(e.id))},yo=T&&!E&&A&&O,Rl=T&&!E&&A&&!O;return f.jsxs("div",{className:`relative transition-opacity duration-200 ${E?"opacity-40":""}`,onDragOver:bs,onDragLeave:Ir,onDrop:sr,children:[f.jsxs("div",{className:`card border-l-4 ${Dl} overflow-hidden transition-all duration-200 ${yo?"ring-2 ring-cyan-400 ring-offset-1":""} ${Rl?"ring-2 ring-red-300 ring-offset-1":""}`,children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 md:flex-nowrap md:gap-3 px-3 md:px-4 py-3 md:py-3.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>Y(!G),children:[f.jsx("div",{draggable:!0,onDragStart:kc,onDragEnd:xs,onClick:we=>we.stopPropagation(),className:"flex-shrink-0 cursor-grab active:cursor-grabbing text-warm-300 hover:text-warm-500 transition-colors p-0.5 -ml-1",title:Re("dnd.dropHint"),children:f.jsx(Hee,{size:16})}),f.jsx("button",{className:"text-warm-400 hover:text-accent flex-shrink-0 transition-colors",children:f.jsx(zu,{size:14,className:`transition-transform duration-200 ${G?"rotate-90":""}`})}),f.jsxs("span",{className:"text-2xs font-mono text-warm-400 w-6 flex-shrink-0",children:["#",e.priority]}),f.jsx("span",{className:"flex-1 basis-[calc(100%-100px)] md:basis-auto min-w-0 text-sm text-warm-800 font-medium truncate order-none",children:e.title}),ja.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-2xs font-mono text-warm-400 bg-warm-100 flex-shrink-0",children:[f.jsx(Jd,{size:12}),ja.length]}),Vn&&f.jsxs("span",{className:"hidden md:inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-cyan-500/10 text-cyan-600 flex-shrink-0 group/dep",title:`${Re("todo.dependsOn")}: ${Vn.title}`,children:[f.jsx(ef,{size:12}),Vn.title.length>20?Vn.title.slice(0,20)+"...":Vn.title,F&&f.jsx("button",{onClick:we=>{we.stopPropagation(),F(e.id)},className:"ml-0.5 h-3.5 w-3.5 rounded-full hover:bg-cyan-500/20 inline-flex items-center justify-center opacity-0 group-hover/dep:opacity-100 transition-opacity",title:Re("dnd.removeDep"),children:f.jsx(ga,{size:10})})]}),e.cli_tool&&f.jsxs("span",{className:"hidden md:inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-status-merged/10 text-status-merged flex-shrink-0",children:[$u(e.cli_tool||"claude").label,e.cli_model&&f.jsxs("span",{className:"text-warm-400",children:["/ ",e.cli_model]})]}),f.jsx(GN,{status:e.status}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-auto md:ml-2 flex-shrink-0",onClick:we=>we.stopPropagation(),children:[Cn&&f.jsx("button",{onClick:()=>i(e.id,"headless"),className:"p-1.5 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded-lg transition-colors",title:Re("todo.startHeadless"),children:f.jsx(yl,{size:14})}),Pl&&f.jsx("button",{onClick:()=>s(e.id),className:"p-1.5 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded-lg transition-colors",title:Re("todo.stop"),children:f.jsx(Bg,{size:14})}),jn&&f.jsx("button",{onClick:Si,disabled:ae,className:"p-1.5 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded-lg transition-colors disabled:opacity-30",title:Re("todo.merge"),children:f.jsx(Of,{size:14})}),Sa&&f.jsx("button",{onClick:()=>{ue(we=>!we),gt(null)},disabled:Oe,className:"p-1.5 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded-lg transition-colors disabled:opacity-30",title:Re("todo.continue"),children:f.jsx(mee,{size:14})}),Gn&&f.jsx("button",{onClick:()=>Ua("headless"),disabled:We,className:"p-1.5 text-accent/60 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors disabled:opacity-30",title:Re("todo.retry"),children:f.jsx($g,{size:14})}),f.jsxs(Lue,{children:[Cn&&vo&&f.jsxs("button",{onClick:()=>i(e.id,"interactive"),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Re("todo.startInteractiveDesc"),children:[f.jsx(kte,{size:14}),Re("todo.startInteractive")]}),Cn&&f.jsxs("button",{onClick:()=>i(e.id,"verbose"),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Re("todo.startVerboseDesc"),children:[f.jsx(Pee,{size:14}),Re("todo.startVerbose")]}),Dr&&f.jsxs("button",{onClick:()=>be(!ne),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Re("todo.scheduleDesc"),children:[f.jsx(iee,{size:14}),Re("todo.schedule")]}),Ml&&f.jsxs("button",{onClick:()=>{ct(we=>!we),Et(null)},className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",title:Re("todo.scheduleOnResetDesc"),children:[f.jsx(Qd,{size:14}),Re("todo.scheduleOnReset")]}),Rr&&f.jsxs("button",{onClick:mo,disabled:Z,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left disabled:opacity-30",children:[f.jsx(Cp,{size:14}),Re("todo.viewDiff")]}),R&&wi&&f.jsxs("button",{onClick:jc,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",children:[f.jsx(xte,{size:14}),Re("todo.viewDebugLog")]}),ys&&f.jsxs("button",{onClick:po,disabled:Me,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left disabled:opacity-30",children:[f.jsx($N,{size:14}),Re("todo.cleanup")]}),f.jsxs("button",{onClick:()=>B(!0),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-warm-600 hover:bg-theme-hover rounded-md transition-colors text-left",children:[f.jsx(Mf,{size:14}),Re("todo.edit")]}),f.jsxs("button",{onClick:()=>l(e.id),className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-status-error hover:bg-status-error/10 rounded-md transition-colors text-left",children:[f.jsx(es,{size:14}),Re("todo.delete")]})]})]})]}),ne&&f.jsx("div",{className:"border-t border-blue-200 px-5 py-3 bg-blue-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsx("label",{className:"text-xs font-medium text-blue-600",children:Re("todo.scheduleAt")}),f.jsx("input",{type:"datetime-local",value:Le,onChange:we=>ot(we.target.value),className:"bg-theme-card border border-blue-200 rounded-lg px-2 py-1.5 text-sm font-mono text-warm-800 focus:border-blue-400 focus:outline-none focus:ring-2 focus:ring-blue-400/20",min:new Date().toISOString().slice(0,16)}),f.jsx("button",{onClick:Ka,disabled:Vt||!Le,className:"btn-primary text-xs py-1.5 !bg-blue-500 hover:!bg-blue-600 disabled:opacity-30",children:Re(Vt?"todo.scheduling":"todo.confirmSchedule")}),f.jsx("button",{onClick:()=>be(!1),className:"btn-ghost text-xs py-1.5",children:Re("scheduleForm.cancel")}),f.jsxs("label",{className:"flex items-center gap-2 text-xs text-blue-700",children:[f.jsx("input",{type:"checkbox",checked:Se,onChange:we=>Pe(we.target.checked),className:"rounded border-blue-300 text-blue-500 focus:ring-blue-400"}),Re("todo.scheduleKeepOriginal")]})]})}),ge&&f.jsx("div",{className:"border-t border-emerald-200 px-5 py-3 bg-emerald-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[Re("todo.continuePromptLabel"),(e.round_count??1)>1&&f.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",Re("todo.roundLabel")," ",e.round_count,")"]})]}),f.jsx("textarea",{value:_e,onChange:we=>fe(we.target.value),placeholder:Re("todo.continuePromptPlaceholder"),rows:3,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-3 py-2 text-sm text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y",disabled:Oe}),ut&&f.jsx("p",{className:"text-xs text-status-error",children:ut}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:()=>Ga("headless"),disabled:Oe||!_e.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:Re(Oe?"todo.continuing":"todo.confirmContinue")}),f.jsx("button",{onClick:()=>{ue(!1),gt(null)},disabled:Oe,className:"btn-ghost text-xs py-1.5",children:Re("scheduleForm.cancel")})]})]})}),_t&&S&&f.jsx("div",{className:"border-t border-amber-200 px-5 py-3 bg-amber-50/50 animate-fade-in",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("label",{className:"text-xs font-medium text-amber-600",children:Re("todo.scheduleOnResetLabel")}),f.jsx("span",{className:"text-xs text-amber-500/80 font-mono",children:new Date(S*1e3).toLocaleString()})]}),f.jsx("textarea",{value:Ae,onChange:we=>$e(we.target.value),placeholder:Re("todo.resetPromptPlaceholder"),rows:3,className:"w-full bg-theme-card border border-amber-200 rounded-lg px-3 py-2 text-sm text-warm-800 focus:border-amber-400 focus:outline-none focus:ring-2 focus:ring-amber-400/20 resize-y",disabled:Xe}),at&&f.jsx("p",{className:"text-xs text-status-error",children:at}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:Va,disabled:Xe||!Ae.trim(),className:"btn-primary text-xs py-1.5 !bg-amber-500 hover:!bg-amber-600 disabled:opacity-30",children:Re(Xe?"todo.scheduling":"todo.confirmResetSchedule")}),f.jsx("button",{onClick:()=>{ct(!1),Et(null)},disabled:Xe,className:"btn-ghost text-xs py-1.5",children:Re("scheduleForm.cancel")})]})]})}),G&&f.jsx("div",{className:"animate-fade-in overflow-hidden border-t border-theme-border",children:f.jsxs("div",{className:"px-4 py-3 space-y-3",children:[f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Re("todo.description")}),f.jsx("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2",children:e.description?f.jsx("p",{className:"text-sm text-warm-700 whitespace-pre-wrap",children:e.description}):f.jsx("p",{className:"text-sm text-warm-400 italic",children:Re("todo.noDescription")})})]}),ja.length>0&&f.jsxs("section",{children:[f.jsxs("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:[Re("todo.attachedImages")," ",f.jsxs("span",{className:"text-warm-400 normal-case",children:["(",ja.length,")"]})]}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:ja.map(we=>f.jsx("a",{href:tf(e.id,we.id),target:"_blank",rel:"noopener noreferrer",children:f.jsx("img",{src:tf(e.id,we.id),alt:we.originalName,className:"h-16 w-16 object-cover rounded-md border border-theme-border"})},we.id))})]}),(Vn||e.branch_name||wr)&&f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Re("todo.branch")}),f.jsxs("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 space-y-1.5",children:[Vn&&f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0 pt-0.5",children:Re("todo.dependsOn")}),f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-accent/10 text-accent text-2xs font-medium",children:Vn.title})]}),e.branch_name&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Re("todo.branch")}),f.jsx(BN,{size:12,className:"text-status-success flex-shrink-0"}),f.jsx("code",{className:"font-mono text-xs text-warm-700 break-all",children:e.branch_name})]}),e.worktree_path&&f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0 pt-0.5",children:Re("todo.worktree")}),f.jsx("code",{className:"font-mono text-2xs text-warm-500 break-all",children:e.worktree_path})]}),e.merged_from_branch&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Re("todo.mergedFrom")}),f.jsx("code",{className:"font-mono text-xs text-status-merged break-all",children:e.merged_from_branch})]}),!e.worktree_path&&wr&&f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-400 w-24 flex-shrink-0",children:Re("todo.transferredTo")}),f.jsx("span",{className:"text-warm-700 truncate",children:wr.title.length>30?wr.title.slice(0,27)+"...":wr.title})]})]})]}),e.status==="failed"&&U.length>0&&(()=>{var vn;const we=U.filter(vt=>vt.log_type==="error");if(we.length===0)return null;const dt=we.find(vt=>/exited with code (\d+)/.test(vt.message)),wt=dt?(vn=dt.message.match(/exited with code (\d+)/))==null?void 0:vn[1]:null;return f.jsxs("div",{style:{background:Yt.bg,fontFamily:Vd,fontSize:12,lineHeight:"1.5",padding:"10px 12px",borderRadius:8,border:`1px solid ${Yt.separator}`,color:Yt.text},children:[f.jsxs("div",{children:[f.jsx("span",{style:{color:Yt.error},children:">"})," ",f.jsx("span",{style:{color:Yt.error,fontWeight:700},children:"FAILED"}),wt&&f.jsxs("span",{style:{color:Yt.dim},children:[" (exit code: ",wt,")"]}),v&&f.jsx("button",{onClick:()=>v(e,we),style:{marginLeft:12,color:Yt.warning,background:"none",border:`1px solid ${Yt.warning}`,padding:"1px 8px",borderRadius:2,cursor:"pointer",fontSize:11,fontFamily:Vd},children:Re("failure.fix")})]}),f.jsx("div",{style:{maxHeight:192,overflowY:"auto",marginTop:4},children:we.map(vt=>f.jsxs("div",{children:[f.jsx("span",{style:{color:Yt.dim},children:new Date(vt.created_at).toLocaleTimeString()})," ",f.jsx("span",{style:{color:Yt.error},children:vt.message})]},vt.id))})]})})(),wi&&Ze&&f.jsxs("section",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1.5",children:Re("todo.result")}),f.jsxs("div",{className:"rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 space-y-2.5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[Ze.duration_seconds!==null&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Qd,{size:12,className:"text-warm-400"}),f.jsx("span",{className:"text-warm-400",children:Re("result.duration")}),f.jsx("span",{className:"text-warm-700 font-medium",children:gn(Ze.duration_seconds)})]}),Ze.commits.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Lee,{size:12,className:"text-status-success"}),f.jsx("span",{className:"text-status-success font-medium",children:Ze.commits.length}),f.jsx("span",{className:"text-warm-400",children:Re("result.commits")})]}),Ze.diff_stats.files_changed>0&&f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Cp,{size:12,className:"text-warm-400"}),f.jsx("span",{className:"text-warm-700 font-medium",children:Ze.diff_stats.files_changed}),f.jsx("span",{className:"text-warm-400",children:Re("result.filesChanged")}),f.jsxs("span",{className:"text-status-success font-mono",children:["+",Ze.diff_stats.insertions]}),f.jsxs("span",{className:"text-status-error font-mono",children:["-",Ze.diff_stats.deletions]})]}),I&&Ze.token_usage&&(()=>{const we=Ze.token_usage,dt=(we.input_tokens??0)+(we.cache_read_input_tokens??0)+(we.cache_creation_input_tokens??0),wt=dt+(we.output_tokens??0);let vn,vt;return wt>=5e5?(vn=Re("result.levelHeavy"),vt="text-status-error"):wt>=3e5?(vn=Re("result.levelHigh"),vt="text-orange-500"):wt>=1e5?(vn=Re("result.levelModerate"),vt="text-status-warning"):(vn=Re("result.levelLight"),vt="text-status-info"),f.jsxs("span",{className:"inline-flex items-center gap-1",children:[dt>0&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:Re("result.inputTokens")}),f.jsx("span",{className:"text-warm-700 font-medium",children:go(dt)})]}),dt>0&&we.output_tokens!==null&&f.jsx("span",{className:"text-warm-400",children:"·"}),we.output_tokens!==null&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:Re("result.outputTokens")}),f.jsx("span",{className:"text-warm-700 font-medium",children:go(we.output_tokens)})]}),we.num_turns!=null&&we.num_turns>1&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-warm-400",children:"·"}),f.jsxs("span",{className:"text-warm-700",children:[we.num_turns,Re("result.turns")]})]}),f.jsx("span",{className:"text-warm-400",children:"·"}),f.jsx("span",{className:`font-medium ${vt}`,children:vn})]})})()]}),Ze.commits.length>0&&f.jsxs("div",{children:[f.jsx("h5",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider mb-1",children:Re("result.commitHistory")}),f.jsx("div",{className:"space-y-0.5",children:Ze.commits.map((we,dt)=>f.jsxs("div",{className:"flex items-center gap-2 px-1.5 py-1 text-xs rounded hover:bg-theme-hover",children:[f.jsx("code",{className:"font-mono text-accent flex-shrink-0",children:we.hash.slice(0,7)||"-------"}),f.jsx("span",{className:"text-warm-700 truncate flex-1",children:we.message}),f.jsx("span",{className:"text-2xs text-warm-400 flex-shrink-0",children:new Date(we.date).toLocaleTimeString()})]},dt))})]}),Ze.changed_files.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h5",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider",children:Re("result.changedFiles")}),Rr&&f.jsxs("button",{onClick:mo,disabled:Z,className:"flex items-center gap-1 text-2xs text-warm-500 hover:text-accent transition-colors disabled:opacity-30",children:[f.jsx(zu,{size:10,className:`transition-transform ${Q?"rotate-90":""}`}),f.jsx("span",{children:Re(Q?"todo.hideDiff":"todo.viewDiff")})]})]}),f.jsx("div",{className:"space-y-0.5",children:Ze.changed_files.map((we,dt)=>{const wt=we.status==="A"?"bg-status-success/15 text-status-success":we.status==="D"?"bg-status-error/15 text-status-error":we.status==="M"?"bg-status-warning/15 text-status-warning":"bg-warm-200 text-warm-600";return f.jsxs("div",{className:"flex items-center gap-2 px-1.5 py-0.5 text-xs",children:[f.jsx("span",{className:`inline-flex items-center justify-center w-5 h-4 rounded text-[10px] font-bold ${wt}`,children:we.status}),f.jsx("span",{className:"text-warm-700 font-mono text-2xs break-all flex-1",children:we.file}),we.renamedFrom&&f.jsxs("span",{className:"text-warm-400 text-2xs flex-shrink-0",children:["← ",we.renamedFrom]})]},dt)})})]})]})]}),ye&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Re("todo.mergeFailed"),": ",ye]}),Ie&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Re("todo.cleanupFailed"),": ",Ie]}),Ce&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Re("todo.retryFailed"),": ",Ce]}),ie&&f.jsxs("div",{className:"rounded-md bg-status-error/10 text-status-error text-xs px-3 py-2",children:[Re("todo.diffError"),": ",ie]}),Q&&re&&f.jsxs("section",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:Re("todo.diffOutput")}),f.jsxs("div",{className:"flex items-center gap-1.5 text-2xs",children:[f.jsxs("span",{className:"text-warm-500",children:[re.stats.files_changed," ",Re("todo.files")]}),f.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-status-success/10 text-status-success font-mono",children:["+",re.stats.insertions]}),f.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-status-error/10 text-status-error font-mono",children:["-",re.stats.deletions]})]})]}),f.jsx("div",{className:"max-h-80 overflow-y-auto rounded-lg border border-theme-border bg-theme-card/50 px-3 py-2 font-mono text-xs leading-tight",children:re.diff?re.diff.split(`
460
+ `).map((we,dt)=>{let wt="text-warm-500",vn="";return we.startsWith("+")&&!we.startsWith("+++")?wt="text-status-success":we.startsWith("-")&&!we.startsWith("---")?wt="text-status-error":we.startsWith("@@")?wt="text-accent":we.startsWith("diff ")&&(wt="text-warm-700",vn="font-semibold"),f.jsx("div",{className:`whitespace-pre ${wt} ${vn}`,children:we},dt)}):f.jsx("span",{className:"text-warm-400 italic",children:Re("log.noChanges")})})]}),f.jsxs("div",{className:"rounded-lg overflow-hidden",style:{background:Yt.bg,fontFamily:Vd,border:`1px solid ${Yt.separator}`},children:[f.jsxs("div",{style:{padding:"8px 12px",borderBottom:`1px solid ${Yt.separator}`,fontSize:12,color:Yt.text},children:[f.jsx("span",{style:{color:Yt.prompt},children:"$"})," ",f.jsx("span",{style:{color:Yt.bright},children:"tail"})," ",f.jsx("span",{style:{color:Yt.dim},children:"-f task.log"})]}),f.jsx(c2,{logs:U,interactive:k&&e.status==="running",todoId:e.id,onSendInput:_,embedded:!0})]})]})})]}),yo&&f.jsxs("div",{className:"mt-1.5 flex items-center gap-2 px-4 py-2 rounded-lg border-2 border-dashed border-cyan-400 bg-cyan-50/50 animate-fade-in",children:[f.jsx(ef,{size:14,className:"text-cyan-500 flex-shrink-0"}),f.jsx("span",{className:"text-xs font-medium text-cyan-600",children:Re("dnd.dropHint")})]}),Rl&&f.jsxs("div",{className:"mt-1.5 flex items-center gap-2 px-4 py-2 rounded-lg border-2 border-dashed border-red-300 bg-red-50/50 animate-fade-in",children:[f.jsx(ZJ,{size:14,className:"text-red-400 flex-shrink-0"}),f.jsx("span",{className:"text-xs font-medium text-red-400",children:Re("dnd.cyclicWarning")})]})]})}function Rn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Rn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var $ue={value:()=>{}};function Yg(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new hp(n)}function hp(e){this._=e}function que(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}hp.prototype=Yg.prototype={constructor:hp,on:function(e,t){var n=this._,r=que(e+"",n),a,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((a=(e=r[i]).type)&&(a=Bue(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=r[i]).type)n[a]=YD(n[a],e.name,t);else if(t==null)for(a in n)n[a]=YD(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new hp(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function Bue(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function YD(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=$ue,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var xC="http://www.w3.org/1999/xhtml";const WD={svg:"http://www.w3.org/2000/svg",xhtml:xC,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wg(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),WD.hasOwnProperty(t)?{space:WD[t],local:e}:e}function Fue(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===xC&&t.documentElement.namespaceURI===xC?t.createElement(e):t.createElementNS(n,e)}}function Hue(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function CH(e){var t=Wg(e);return(t.local?Hue:Fue)(t)}function Uue(){}function d2(e){return e==null?Uue:function(){return this.querySelector(e)}}function Gue(e){typeof e!="function"&&(e=d2(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=new Array(s),c,d,h=0;h<s;++h)(c=i[h])&&(d=e.call(c,c.__data__,h,i))&&("__data__"in c&&(d.__data__=c.__data__),l[h]=d);return new Xr(r,this._parents)}function Vue(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Kue(){return[]}function NH(e){return e==null?Kue:function(){return this.querySelectorAll(e)}}function Yue(e){return function(){return Vue(e.apply(this,arguments))}}function Wue(e){typeof e=="function"?e=Yue(e):e=NH(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var s=t[i],l=s.length,c,d=0;d<l;++d)(c=s[d])&&(r.push(e.call(c,c.__data__,d,s)),a.push(c));return new Xr(r,a)}function EH(e){return function(){return this.matches(e)}}function AH(e){return function(t){return t.matches(e)}}var Xue=Array.prototype.find;function Zue(e){return function(){return Xue.call(this.children,e)}}function Que(){return this.firstElementChild}function Jue(e){return this.select(e==null?Que:Zue(typeof e=="function"?e:AH(e)))}var ece=Array.prototype.filter;function tce(){return Array.from(this.children)}function nce(e){return function(){return ece.call(this.children,e)}}function rce(e){return this.selectAll(e==null?tce:nce(typeof e=="function"?e:AH(e)))}function ace(e){typeof e!="function"&&(e=EH(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=[],c,d=0;d<s;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&l.push(c);return new Xr(r,this._parents)}function TH(e){return new Array(e.length)}function ice(){return new Xr(this._enter||this._groups.map(TH),this._parents)}function Mp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Mp.prototype={constructor:Mp,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function sce(e){return function(){return e}}function oce(e,t,n,r,a,i){for(var s=0,l,c=t.length,d=i.length;s<d;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new Mp(e,i[s]);for(;s<c;++s)(l=t[s])&&(a[s]=l)}function lce(e,t,n,r,a,i,s){var l,c,d=new Map,h=t.length,m=i.length,g=new Array(h),v;for(l=0;l<h;++l)(c=t[l])&&(g[l]=v=s.call(c,c.__data__,l,t)+"",d.has(v)?a[l]=c:d.set(v,c));for(l=0;l<m;++l)v=s.call(e,i[l],l,i)+"",(c=d.get(v))?(r[l]=c,c.__data__=i[l],d.delete(v)):n[l]=new Mp(e,i[l]);for(l=0;l<h;++l)(c=t[l])&&d.get(g[l])===c&&(a[l]=c)}function uce(e){return e.__data__}function cce(e,t){if(!arguments.length)return Array.from(this,uce);var n=t?lce:oce,r=this._parents,a=this._groups;typeof e!="function"&&(e=sce(e));for(var i=a.length,s=new Array(i),l=new Array(i),c=new Array(i),d=0;d<i;++d){var h=r[d],m=a[d],g=m.length,v=dce(e.call(h,h&&h.__data__,d,r)),b=v.length,w=l[d]=new Array(b),S=s[d]=new Array(b),j=c[d]=new Array(g);n(h,m,w,S,j,v,t);for(var k=0,_=0,E,T;k<b;++k)if(E=w[k]){for(k>=_&&(_=k+1);!(T=S[_])&&++_<b;);E._next=T||null}}return s=new Xr(s,r),s._enter=l,s._exit=c,s}function dce(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fce(){return new Xr(this._exit||this._groups.map(TH),this._parents)}function hce(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function mce(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,s=Math.min(a,i),l=new Array(a),c=0;c<s;++c)for(var d=n[c],h=r[c],m=d.length,g=l[c]=new Array(m),v,b=0;b<m;++b)(v=d[b]||h[b])&&(g[b]=v);for(;c<a;++c)l[c]=n[c];return new Xr(l,this._parents)}function pce(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],s;--a>=0;)(s=r[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function gce(e){e||(e=vce);function t(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,c=a[i]=new Array(l),d,h=0;h<l;++h)(d=s[h])&&(c[h]=d);c.sort(t)}return new Xr(a,this._parents).order()}function vce(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xce(){return Array.from(this)}function bce(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var s=r[a];if(s)return s}return null}function wce(){let e=0;for(const t of this)++e;return e}function Sce(){return!this.node()}function jce(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,s=a.length,l;i<s;++i)(l=a[i])&&e.call(l,l.__data__,i,a);return this}function _ce(e){return function(){this.removeAttribute(e)}}function kce(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cce(e,t){return function(){this.setAttribute(e,t)}}function Nce(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ece(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ace(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Tce(e,t){var n=Wg(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?kce:_ce:typeof t=="function"?n.local?Ace:Ece:n.local?Nce:Cce)(n,t))}function OH(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Oce(e){return function(){this.style.removeProperty(e)}}function Mce(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Pce(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Dce(e,t,n){return arguments.length>1?this.each((t==null?Oce:typeof t=="function"?Pce:Mce)(e,t,n??"")):Bu(this.node(),e)}function Bu(e,t){return e.style.getPropertyValue(t)||OH(e).getComputedStyle(e,null).getPropertyValue(t)}function Rce(e){return function(){delete this[e]}}function Ice(e,t){return function(){this[e]=t}}function Lce(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zce(e,t){return arguments.length>1?this.each((t==null?Rce:typeof t=="function"?Lce:Ice)(e,t)):this.node()[e]}function MH(e){return e.trim().split(/^|\s+/)}function f2(e){return e.classList||new PH(e)}function PH(e){this._node=e,this._names=MH(e.getAttribute("class")||"")}PH.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function DH(e,t){for(var n=f2(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function RH(e,t){for(var n=f2(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function $ce(e){return function(){DH(this,e)}}function qce(e){return function(){RH(this,e)}}function Bce(e,t){return function(){(t.apply(this,arguments)?DH:RH)(this,e)}}function Fce(e,t){var n=MH(e+"");if(arguments.length<2){for(var r=f2(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?Bce:t?$ce:qce)(n,t))}function Hce(){this.textContent=""}function Uce(e){return function(){this.textContent=e}}function Gce(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Vce(e){return arguments.length?this.each(e==null?Hce:(typeof e=="function"?Gce:Uce)(e)):this.node().textContent}function Kce(){this.innerHTML=""}function Yce(e){return function(){this.innerHTML=e}}function Wce(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Xce(e){return arguments.length?this.each(e==null?Kce:(typeof e=="function"?Wce:Yce)(e)):this.node().innerHTML}function Zce(){this.nextSibling&&this.parentNode.appendChild(this)}function Qce(){return this.each(Zce)}function Jce(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ede(){return this.each(Jce)}function tde(e){var t=typeof e=="function"?e:CH(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function nde(){return null}function rde(e,t){var n=typeof e=="function"?e:CH(e),r=t==null?nde:typeof t=="function"?t:d2(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ade(){var e=this.parentNode;e&&e.removeChild(this)}function ide(){return this.each(ade)}function sde(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ode(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lde(e){return this.select(e?ode:sde)}function ude(e){return arguments.length?this.property("__data__",e):this.node().__data__}function cde(e){return function(t){e.call(this,t,this.__data__)}}function dde(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function fde(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function hde(e,t,n){return function(){var r=this.__on,a,i=cde(t);if(r){for(var s=0,l=r.length;s<l;++s)if((a=r[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function mde(e,t,n){var r=dde(e+""),a,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,d=l.length,h;c<d;++c)for(a=0,h=l[c];a<i;++a)if((s=r[a]).type===h.type&&s.name===h.name)return h.value}return}for(l=t?hde:fde,a=0;a<i;++a)this.each(l(r[a],t,n));return this}function IH(e,t,n){var r=OH(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function pde(e,t){return function(){return IH(this,e,t)}}function gde(e,t){return function(){return IH(this,e,t.apply(this,arguments))}}function vde(e,t){return this.each((typeof t=="function"?gde:pde)(e,t))}function*yde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,s;a<i;++a)(s=r[a])&&(yield s)}var LH=[null];function Xr(e,t){this._groups=e,this._parents=t}function If(){return new Xr([[document.documentElement]],LH)}function xde(){return this}Xr.prototype=If.prototype={constructor:Xr,select:Gue,selectAll:Wue,selectChild:Jue,selectChildren:rce,filter:ace,data:cce,enter:ice,exit:fce,join:hce,merge:mce,selection:xde,order:pce,sort:gce,call:yce,nodes:xce,node:bce,size:wce,empty:Sce,each:jce,attr:Tce,style:Dce,property:zce,classed:Fce,text:Vce,html:Xce,raise:Qce,lower:ede,append:tde,insert:rde,remove:ide,clone:lde,datum:ude,on:mde,dispatch:vde,[Symbol.iterator]:yde};function Gr(e){return typeof e=="string"?new Xr([[document.querySelector(e)]],[document.documentElement]):new Xr([[e]],LH)}function bde(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ea(e,t){if(e=bde(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const wde={passive:!1},af={capture:!0,passive:!1};function W0(e){e.stopImmediatePropagation()}function Du(e){e.preventDefault(),e.stopImmediatePropagation()}function zH(e){var t=e.document.documentElement,n=Gr(e).on("dragstart.drag",Du,af);"onselectstart"in t?n.on("selectstart.drag",Du,af):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $H(e,t){var n=e.document.documentElement,r=Gr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Du,af),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Im=e=>()=>e;function bC(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:i,x:s,y:l,dx:c,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}bC.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Sde(e){return!e.ctrlKey&&!e.button}function jde(){return this.parentNode}function _de(e,t){return t??{x:e.x,y:e.y}}function kde(){return navigator.maxTouchPoints||"ontouchstart"in this}function qH(){var e=Sde,t=jde,n=_de,r=kde,a={},i=Yg("start","drag","end"),s=0,l,c,d,h,m=0;function g(E){E.on("mousedown.drag",v).filter(r).on("touchstart.drag",S).on("touchmove.drag",j,wde).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,T){if(!(h||!e.call(this,E,T))){var A=_(this,t.call(this,E,T),E,T,"mouse");A&&(Gr(E.view).on("mousemove.drag",b,af).on("mouseup.drag",w,af),zH(E.view),W0(E),d=!1,l=E.clientX,c=E.clientY,A("start",E))}}function b(E){if(Du(E),!d){var T=E.clientX-l,A=E.clientY-c;d=T*T+A*A>m}a.mouse("drag",E)}function w(E){Gr(E.view).on("mousemove.drag mouseup.drag",null),$H(E.view,d),Du(E),a.mouse("end",E)}function S(E,T){if(e.call(this,E,T)){var A=E.changedTouches,O=t.call(this,E,T),D=A.length,P,M;for(P=0;P<D;++P)(M=_(this,O,E,T,A[P].identifier,A[P]))&&(W0(E),M("start",E,A[P]))}}function j(E){var T=E.changedTouches,A=T.length,O,D;for(O=0;O<A;++O)(D=a[T[O].identifier])&&(Du(E),D("drag",E,T[O]))}function k(E){var T=E.changedTouches,A=T.length,O,D;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),O=0;O<A;++O)(D=a[T[O].identifier])&&(W0(E),D("end",E,T[O]))}function _(E,T,A,O,D,P){var M=i.copy(),z=Ea(P||A,T),L,F,R;if((R=n.call(E,new bC("beforestart",{sourceEvent:A,target:g,identifier:D,active:s,x:z[0],y:z[1],dx:0,dy:0,dispatch:M}),O))!=null)return L=R.x-z[0]||0,F=R.y-z[1]||0,function I(q,G,Y){var K=z,B;switch(q){case"start":a[D]=I,B=s++;break;case"end":delete a[D],--s;case"drag":z=Ea(Y||G,T),B=s;break}M.call(q,E,new bC(q,{sourceEvent:G,subject:R,target:g,identifier:D,active:B,x:z[0]+L,y:z[1]+F,dx:z[0]-K[0],dy:z[1]-K[1],dispatch:M}),O)}}return g.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Im(!!E),g):e},g.container=function(E){return arguments.length?(t=typeof E=="function"?E:Im(E),g):t},g.subject=function(E){return arguments.length?(n=typeof E=="function"?E:Im(E),g):n},g.touchable=function(E){return arguments.length?(r=typeof E=="function"?E:Im(!!E),g):r},g.on=function(){var E=i.on.apply(i,arguments);return E===i?g:E},g.clickDistance=function(E){return arguments.length?(m=(E=+E)*E,g):Math.sqrt(m)},g}function h2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function BH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Lf(){}var sf=.7,Pp=1/sf,Ru="\\s*([+-]?\\d+)\\s*",of="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",li="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cde=/^#([0-9a-f]{3,8})$/,Nde=new RegExp(`^rgb\\(${Ru},${Ru},${Ru}\\)$`),Ede=new RegExp(`^rgb\\(${li},${li},${li}\\)$`),Ade=new RegExp(`^rgba\\(${Ru},${Ru},${Ru},${of}\\)$`),Tde=new RegExp(`^rgba\\(${li},${li},${li},${of}\\)$`),Ode=new RegExp(`^hsl\\(${of},${li},${li}\\)$`),Mde=new RegExp(`^hsla\\(${of},${li},${li},${of}\\)$`),XD={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};h2(Lf,rl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ZD,formatHex:ZD,formatHex8:Pde,formatHsl:Dde,formatRgb:QD,toString:QD});function ZD(){return this.rgb().formatHex()}function Pde(){return this.rgb().formatHex8()}function Dde(){return FH(this).formatHsl()}function QD(){return this.rgb().formatRgb()}function rl(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cde.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?JD(t):n===3?new Ar(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lm(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lm(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nde.exec(e))?new Ar(t[1],t[2],t[3],1):(t=Ede.exec(e))?new Ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ade.exec(e))?Lm(t[1],t[2],t[3],t[4]):(t=Tde.exec(e))?Lm(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ode.exec(e))?nR(t[1],t[2]/100,t[3]/100,1):(t=Mde.exec(e))?nR(t[1],t[2]/100,t[3]/100,t[4]):XD.hasOwnProperty(e)?JD(XD[e]):e==="transparent"?new Ar(NaN,NaN,NaN,0):null}function JD(e){return new Ar(e>>16&255,e>>8&255,e&255,1)}function Lm(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ar(e,t,n,r)}function Rde(e){return e instanceof Lf||(e=rl(e)),e?(e=e.rgb(),new Ar(e.r,e.g,e.b,e.opacity)):new Ar}function wC(e,t,n,r){return arguments.length===1?Rde(e):new Ar(e,t,n,r??1)}function Ar(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}h2(Ar,wC,BH(Lf,{brighter(e){return e=e==null?Pp:Math.pow(Pp,e),new Ar(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sf:Math.pow(sf,e),new Ar(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ar(Qo(this.r),Qo(this.g),Qo(this.b),Dp(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:eR,formatHex:eR,formatHex8:Ide,formatRgb:tR,toString:tR}));function eR(){return`#${Yo(this.r)}${Yo(this.g)}${Yo(this.b)}`}function Ide(){return`#${Yo(this.r)}${Yo(this.g)}${Yo(this.b)}${Yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function tR(){const e=Dp(this.opacity);return`${e===1?"rgb(":"rgba("}${Qo(this.r)}, ${Qo(this.g)}, ${Qo(this.b)}${e===1?")":`, ${e})`}`}function Dp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Qo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yo(e){return e=Qo(e),(e<16?"0":"")+e.toString(16)}function nR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ta(e,t,n,r)}function FH(e){if(e instanceof Ta)return new Ta(e.h,e.s,e.l,e.opacity);if(e instanceof Lf||(e=rl(e)),!e)return new Ta;if(e instanceof Ta)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-a,c=(i+a)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=c<.5?i+a:2-i-a,s*=60):l=c>0&&c<1?0:s,new Ta(s,l,c,e.opacity)}function Lde(e,t,n,r){return arguments.length===1?FH(e):new Ta(e,t,n,r??1)}function Ta(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}h2(Ta,Lde,BH(Lf,{brighter(e){return e=e==null?Pp:Math.pow(Pp,e),new Ta(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sf:Math.pow(sf,e),new Ta(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Ar(X0(e>=240?e-240:e+120,a,r),X0(e,a,r),X0(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ta(rR(this.h),zm(this.s),zm(this.l),Dp(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=Dp(this.opacity);return`${e===1?"hsl(":"hsla("}${rR(this.h)}, ${zm(this.s)*100}%, ${zm(this.l)*100}%${e===1?")":`, ${e})`}`}}));function rR(e){return e=(e||0)%360,e<0?e+360:e}function zm(e){return Math.max(0,Math.min(1,e||0))}function X0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const m2=e=>()=>e;function zde(e,t){return function(n){return e+n*t}}function $de(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qde(e){return(e=+e)==1?HH:function(t,n){return n-t?$de(t,n,e):m2(isNaN(t)?n:t)}}function HH(e,t){var n=t-e;return n?zde(e,n):m2(isNaN(e)?t:e)}const Rp=(function e(t){var n=qde(t);function r(a,i){var s=n((a=wC(a)).r,(i=wC(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),d=HH(a.opacity,i.opacity);return function(h){return a.r=s(h),a.g=l(h),a.b=c(h),a.opacity=d(h),a+""}}return r.gamma=e,r})(1);function Bde(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function Fde(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Hde(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=Wi(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=a[s](l);return i}}function Ude(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Aa(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Gde(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=Wi(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var SC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Z0=new RegExp(SC.source,"g");function Vde(e){return function(){return e}}function Kde(e){return function(t){return e(t)+""}}function UH(e,t){var n=SC.lastIndex=Z0.lastIndex=0,r,a,i,s=-1,l=[],c=[];for(e=e+"",t=t+"";(r=SC.exec(e))&&(a=Z0.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:Aa(r,a)})),n=Z0.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?Kde(c[0].x):Vde(t):(t=c.length,function(d){for(var h=0,m;h<t;++h)l[(m=c[h]).i]=m.x(d);return l.join("")})}function Wi(e,t){var n=typeof t,r;return t==null||n==="boolean"?m2(t):(n==="number"?Aa:n==="string"?(r=rl(t))?(t=r,Rp):UH:t instanceof rl?Rp:t instanceof Date?Ude:Fde(t)?Bde:Array.isArray(t)?Hde:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gde:Aa)(e,t)}function p2(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var aR=180/Math.PI,jC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function GH(e,t,n,r,a,i){var s,l,c;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*aR,skewX:Math.atan(c)*aR,scaleX:s,scaleY:l}}var $m;function Yde(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?jC:GH(t.a,t.b,t.c,t.d,t.e,t.f)}function Wde(e){return e==null||($m||($m=document.createElementNS("http://www.w3.org/2000/svg","g")),$m.setAttribute("transform",e),!(e=$m.transform.baseVal.consolidate()))?jC:(e=e.matrix,GH(e.a,e.b,e.c,e.d,e.e,e.f))}function VH(e,t,n,r){function a(d){return d.length?d.pop()+" ":""}function i(d,h,m,g,v,b){if(d!==m||h!==g){var w=v.push("translate(",null,t,null,n);b.push({i:w-4,x:Aa(d,m)},{i:w-2,x:Aa(h,g)})}else(m||g)&&v.push("translate("+m+t+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(a(m)+"rotate(",null,r)-2,x:Aa(d,h)})):h&&m.push(a(m)+"rotate("+h+r)}function l(d,h,m,g){d!==h?g.push({i:m.push(a(m)+"skewX(",null,r)-2,x:Aa(d,h)}):h&&m.push(a(m)+"skewX("+h+r)}function c(d,h,m,g,v,b){if(d!==m||h!==g){var w=v.push(a(v)+"scale(",null,",",null,")");b.push({i:w-4,x:Aa(d,m)},{i:w-2,x:Aa(h,g)})}else(m!==1||g!==1)&&v.push(a(v)+"scale("+m+","+g+")")}return function(d,h){var m=[],g=[];return d=e(d),h=e(h),i(d.translateX,d.translateY,h.translateX,h.translateY,m,g),s(d.rotate,h.rotate,m,g),l(d.skewX,h.skewX,m,g),c(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,g),d=h=null,function(v){for(var b=-1,w=g.length,S;++b<w;)m[(S=g[b]).i]=S.x(v);return m.join("")}}}var Xde=VH(Yde,"px, ","px)","deg)"),Zde=VH(Wde,", ",")",")"),Qde=1e-12;function iR(e){return((e=Math.exp(e))+1/e)/2}function Jde(e){return((e=Math.exp(e))-1/e)/2}function efe(e){return((e=Math.exp(2*e))-1)/(e+1)}const mp=(function e(t,n,r){function a(i,s){var l=i[0],c=i[1],d=i[2],h=s[0],m=s[1],g=s[2],v=h-l,b=m-c,w=v*v+b*b,S,j;if(w<Qde)j=Math.log(g/d)/t,S=function(O){return[l+O*v,c+O*b,d*Math.exp(t*O*j)]};else{var k=Math.sqrt(w),_=(g*g-d*d+r*w)/(2*d*n*k),E=(g*g-d*d-r*w)/(2*g*n*k),T=Math.log(Math.sqrt(_*_+1)-_),A=Math.log(Math.sqrt(E*E+1)-E);j=(A-T)/t,S=function(O){var D=O*j,P=iR(T),M=d/(n*k)*(P*efe(t*D+T)-Jde(T));return[l+M*v,c+M*b,d*P/iR(t*D+T)]}}return S.duration=j*1e3*t/Math.SQRT2,S}return a.rho=function(i){var s=Math.max(.001,+i),l=s*s,c=l*l;return e(s,l,c)},a})(Math.SQRT2,2,4);function tfe(e,t){t===void 0&&(t=e,e=Wi);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var l=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[l](s-l)}}var Fu=0,Dd=0,bd=0,KH=1e3,Ip,Rd,Lp=0,al=0,Xg=0,lf=typeof performance=="object"&&performance.now?performance:Date,YH=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function g2(){return al||(YH(nfe),al=lf.now()+Xg)}function nfe(){al=0}function zp(){this._call=this._time=this._next=null}zp.prototype=WH.prototype={constructor:zp,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?g2():+n)+(t==null?0:+t),!this._next&&Rd!==this&&(Rd?Rd._next=this:Ip=this,Rd=this),this._call=e,this._time=n,_C()},stop:function(){this._call&&(this._call=null,this._time=1/0,_C())}};function WH(e,t,n){var r=new zp;return r.restart(e,t,n),r}function rfe(){g2(),++Fu;for(var e=Ip,t;e;)(t=al-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fu}function sR(){al=(Lp=lf.now())+Xg,Fu=Dd=0;try{rfe()}finally{Fu=0,ife(),al=0}}function afe(){var e=lf.now(),t=e-Lp;t>KH&&(Xg-=t,Lp=e)}function ife(){for(var e,t=Ip,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ip=n);Rd=e,_C(r)}function _C(e){if(!Fu){Dd&&(Dd=clearTimeout(Dd));var t=e-al;t>24?(e<1/0&&(Dd=setTimeout(sR,e-lf.now()-Xg)),bd&&(bd=clearInterval(bd))):(bd||(Lp=lf.now(),bd=setInterval(afe,KH)),Fu=1,YH(sR))}}function oR(e,t,n){var r=new zp;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var sfe=Yg("start","end","cancel","interrupt"),ofe=[],XH=0,lR=1,kC=2,pp=3,uR=4,CC=5,gp=6;function Zg(e,t,n,r,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;lfe(e,n,{name:t,index:r,group:a,on:sfe,tween:ofe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:XH})}function v2(e,t){var n=qa(e,t);if(n.state>XH)throw new Error("too late; already scheduled");return n}function xi(e,t){var n=qa(e,t);if(n.state>pp)throw new Error("too late; already running");return n}function qa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lfe(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=WH(i,0,n.time);function i(d){n.state=lR,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var h,m,g,v;if(n.state!==lR)return c();for(h in r)if(v=r[h],v.name===n.name){if(v.state===pp)return oR(s);v.state===uR?(v.state=gp,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[h]):+h<t&&(v.state=gp,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[h])}if(oR(function(){n.state===pp&&(n.state=uR,n.timer.restart(l,n.delay,n.time),l(d))}),n.state=kC,n.on.call("start",e,e.__data__,n.index,n.group),n.state===kC){for(n.state=pp,a=new Array(g=n.tween.length),h=0,m=-1;h<g;++h)(v=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(a[++m]=v);a.length=m+1}}function l(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(c),n.state=CC,1),m=-1,g=a.length;++m<g;)a[m].call(e,h);n.state===CC&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=gp,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function vp(e,t){var n=e.__transition,r,a,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}a=r.state>kC&&r.state<CC,r.state=gp,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function ufe(e){return this.each(function(){vp(this,e)})}function cfe(e,t){var n,r;return function(){var a=xi(this,e),i=a.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}a.tween=r}}function dfe(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=xi(this,e),s=i.tween;if(s!==r){a=(r=s).slice();for(var l={name:t,value:n},c=0,d=a.length;c<d;++c)if(a[c].name===t){a[c]=l;break}c===d&&a.push(l)}i.tween=a}}function ffe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=qa(this.node(),n).tween,a=0,i=r.length,s;a<i;++a)if((s=r[a]).name===e)return s.value;return null}return this.each((t==null?cfe:dfe)(n,e,t))}function y2(e,t,n){var r=e._id;return e.each(function(){var a=xi(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return qa(a,r).value[t]}}function ZH(e,t){var n;return(typeof t=="number"?Aa:t instanceof rl?Rp:(n=rl(t))?(t=n,Rp):UH)(e,t)}function hfe(e){return function(){this.removeAttribute(e)}}function mfe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pfe(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===r?i:i=t(r=s,n)}}function gfe(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===r?i:i=t(r=s,n)}}function vfe(e,t,n){var r,a,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),c=l+"",s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l)))}}function yfe(e,t,n){var r,a,i;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),c=l+"",s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l)))}}function xfe(e,t){var n=Wg(e),r=n==="transform"?Zde:ZH;return this.attrTween(e,typeof t=="function"?(n.local?yfe:vfe)(n,r,y2(this,"attr."+e,t)):t==null?(n.local?mfe:hfe)(n):(n.local?gfe:pfe)(n,r,t))}function bfe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wfe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Sfe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&wfe(e,i)),n}return a._value=t,a}function jfe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&bfe(e,i)),n}return a._value=t,a}function _fe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Wg(e);return this.tween(n,(r.local?Sfe:jfe)(r,t))}function kfe(e,t){return function(){v2(this,e).delay=+t.apply(this,arguments)}}function Cfe(e,t){return t=+t,function(){v2(this,e).delay=t}}function Nfe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?kfe:Cfe)(t,e)):qa(this.node(),t).delay}function Efe(e,t){return function(){xi(this,e).duration=+t.apply(this,arguments)}}function Afe(e,t){return t=+t,function(){xi(this,e).duration=t}}function Tfe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Efe:Afe)(t,e)):qa(this.node(),t).duration}function Ofe(e,t){if(typeof t!="function")throw new Error;return function(){xi(this,e).ease=t}}function Mfe(e){var t=this._id;return arguments.length?this.each(Ofe(t,e)):qa(this.node(),t).ease}function Pfe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;xi(this,e).ease=n}}function Dfe(e){if(typeof e!="function")throw new Error;return this.each(Pfe(this._id,e))}function Rfe(e){typeof e!="function"&&(e=EH(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,l=r[a]=[],c,d=0;d<s;++d)(c=i[d])&&e.call(c,c.__data__,d,i)&&l.push(c);return new ns(r,this._parents,this._name,this._id)}function Ife(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),s=new Array(r),l=0;l<i;++l)for(var c=t[l],d=n[l],h=c.length,m=s[l]=new Array(h),g,v=0;v<h;++v)(g=c[v]||d[v])&&(m[v]=g);for(;l<r;++l)s[l]=t[l];return new ns(s,this._parents,this._name,this._id)}function Lfe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function zfe(e,t,n){var r,a,i=Lfe(t)?v2:xi;return function(){var s=i(this,e),l=s.on;l!==r&&(a=(r=l).copy()).on(t,n),s.on=a}}function $fe(e,t){var n=this._id;return arguments.length<2?qa(this.node(),n).on.on(e):this.each(zfe(n,e,t))}function qfe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Bfe(){return this.on("end.remove",qfe(this._id))}function Ffe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=d2(e));for(var r=this._groups,a=r.length,i=new Array(a),s=0;s<a;++s)for(var l=r[s],c=l.length,d=i[s]=new Array(c),h,m,g=0;g<c;++g)(h=l[g])&&(m=e.call(h,h.__data__,g,l))&&("__data__"in h&&(m.__data__=h.__data__),d[g]=m,Zg(d[g],t,n,g,d,qa(h,n)));return new ns(i,this._parents,t,n)}function Hfe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=NH(e));for(var r=this._groups,a=r.length,i=[],s=[],l=0;l<a;++l)for(var c=r[l],d=c.length,h,m=0;m<d;++m)if(h=c[m]){for(var g=e.call(h,h.__data__,m,c),v,b=qa(h,n),w=0,S=g.length;w<S;++w)(v=g[w])&&Zg(v,t,n,w,g,b);i.push(g),s.push(h)}return new ns(i,s,t,n)}var Ufe=If.prototype.constructor;function Gfe(){return new Ufe(this._groups,this._parents)}function Vfe(e,t){var n,r,a;return function(){var i=Bu(this,e),s=(this.style.removeProperty(e),Bu(this,e));return i===s?null:i===n&&s===r?a:a=t(n=i,r=s)}}function QH(e){return function(){this.style.removeProperty(e)}}function Kfe(e,t,n){var r,a=n+"",i;return function(){var s=Bu(this,e);return s===a?null:s===r?i:i=t(r=s,n)}}function Yfe(e,t,n){var r,a,i;return function(){var s=Bu(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Bu(this,e))),s===c?null:s===r&&c===a?i:(a=c,i=t(r=s,l))}}function Wfe(e,t){var n,r,a,i="style."+t,s="end."+i,l;return function(){var c=xi(this,e),d=c.on,h=c.value[i]==null?l||(l=QH(t)):void 0;(d!==n||a!==h)&&(r=(n=d).copy()).on(s,a=h),c.on=r}}function Xfe(e,t,n){var r=(e+="")=="transform"?Xde:ZH;return t==null?this.styleTween(e,Vfe(e,r)).on("end.style."+e,QH(e)):typeof t=="function"?this.styleTween(e,Yfe(e,r,y2(this,"style."+e,t))).each(Wfe(this._id,e)):this.styleTween(e,Kfe(e,r,t),n).on("end.style."+e,null)}function Zfe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Qfe(e,t,n){var r,a;function i(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&Zfe(e,s,n)),r}return i._value=t,i}function Jfe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Qfe(e,t,n??""))}function ehe(e){return function(){this.textContent=e}}function the(e){return function(){var t=e(this);this.textContent=t??""}}function nhe(e){return this.tween("text",typeof e=="function"?the(y2(this,"text",e)):ehe(e==null?"":e+""))}function rhe(e){return function(t){this.textContent=e.call(this,t)}}function ahe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&rhe(a)),t}return r._value=e,r}function ihe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ahe(e))}function she(){for(var e=this._name,t=this._id,n=JH(),r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],l=s.length,c,d=0;d<l;++d)if(c=s[d]){var h=qa(c,t);Zg(c,e,n,d,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new ns(r,this._parents,e,n)}function ohe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,s){var l={value:s},c={value:function(){--a===0&&i()}};n.each(function(){var d=xi(this,r),h=d.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),d.on=t}),a===0&&i()})}var lhe=0;function ns(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function JH(){return++lhe}var Bi=If.prototype;ns.prototype={constructor:ns,select:Ffe,selectAll:Hfe,selectChild:Bi.selectChild,selectChildren:Bi.selectChildren,filter:Rfe,merge:Ife,selection:Gfe,transition:she,call:Bi.call,nodes:Bi.nodes,node:Bi.node,size:Bi.size,empty:Bi.empty,each:Bi.each,on:$fe,attr:xfe,attrTween:_fe,style:Xfe,styleTween:Jfe,text:nhe,textTween:ihe,remove:Bfe,tween:ffe,delay:Nfe,duration:Tfe,ease:Mfe,easeVarying:Dfe,end:ohe,[Symbol.iterator]:Bi[Symbol.iterator]};function uhe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var che={time:null,delay:0,duration:250,ease:uhe};function dhe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function fhe(e){var t,n;e instanceof ns?(t=e._id,e=e._name):(t=JH(),(n=che).time=g2(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],l=s.length,c,d=0;d<l;++d)(c=s[d])&&Zg(c,e,t,d,s,n||dhe(c,t));return new ns(r,this._parents,e,t)}If.prototype.interrupt=ufe;If.prototype.transition=fhe;const qm=e=>()=>e;function hhe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function Ui(e,t,n){this.k=e,this.x=t,this.y=n}Ui.prototype={constructor:Ui,scale:function(e){return e===1?this:new Ui(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ui(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Qg=new Ui(1,0,0);e9.prototype=Ui.prototype;function e9(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Qg;return e.__zoom}function Q0(e){e.stopImmediatePropagation()}function wd(e){e.preventDefault(),e.stopImmediatePropagation()}function mhe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function phe(){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 cR(){return this.__zoom||Qg}function ghe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vhe(){return navigator.maxTouchPoints||"ontouchstart"in this}function yhe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function t9(){var e=mhe,t=phe,n=yhe,r=ghe,a=vhe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=mp,d=Yg("start","zoom","end"),h,m,g,v=500,b=150,w=0,S=10;function j(R){R.property("__zoom",cR).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",M).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}j.transform=function(R,I,q,G){var Y=R.selection?R.selection():R;Y.property("__zoom",cR),R!==Y?T(R,I,q,G):Y.interrupt().each(function(){A(this,arguments).event(G).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},j.scaleBy=function(R,I,q,G){j.scaleTo(R,function(){var Y=this.__zoom.k,K=typeof I=="function"?I.apply(this,arguments):I;return Y*K},q,G)},j.scaleTo=function(R,I,q,G){j.transform(R,function(){var Y=t.apply(this,arguments),K=this.__zoom,B=q==null?E(Y):typeof q=="function"?q.apply(this,arguments):q,U=K.invert(B),X=typeof I=="function"?I.apply(this,arguments):I;return n(_(k(K,X),B,U),Y,s)},q,G)},j.translateBy=function(R,I,q,G){j.transform(R,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),s)},null,G)},j.translateTo=function(R,I,q,G,Y){j.transform(R,function(){var K=t.apply(this,arguments),B=this.__zoom,U=G==null?E(K):typeof G=="function"?G.apply(this,arguments):G;return n(Qg.translate(U[0],U[1]).scale(B.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof q=="function"?-q.apply(this,arguments):-q),K,s)},G,Y)};function k(R,I){return I=Math.max(i[0],Math.min(i[1],I)),I===R.k?R:new Ui(I,R.x,R.y)}function _(R,I,q){var G=I[0]-q[0]*R.k,Y=I[1]-q[1]*R.k;return G===R.x&&Y===R.y?R:new Ui(R.k,G,Y)}function E(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function T(R,I,q,G){R.on("start.zoom",function(){A(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(G).end()}).tween("zoom",function(){var Y=this,K=arguments,B=A(Y,K).event(G),U=t.apply(Y,K),X=q==null?E(U):typeof q=="function"?q.apply(Y,K):q,H=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),W=Y.__zoom,Q=typeof I=="function"?I.apply(Y,K):I,J=c(W.invert(X).concat(H/W.k),Q.invert(X).concat(H/Q.k));return function(re){if(re===1)re=Q;else{var oe=J(re),Z=H/oe[2];re=new Ui(Z,X[0]-oe[0]*Z,X[1]-oe[1]*Z)}B.zoom(null,re)}})}function A(R,I,q){return!q&&R.__zooming||new O(R,I)}function O(R,I){this.that=R,this.args=I,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,I),this.taps=0}O.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,I){return this.mouse&&R!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var I=Gr(this.that).datum();d.call(R,this.that,new hhe(R,{sourceEvent:this.sourceEvent,target:j,transform:this.that.__zoom,dispatch:d}),I)}};function D(R,...I){if(!e.apply(this,arguments))return;var q=A(this,I).event(R),G=this.__zoom,Y=Math.max(i[0],Math.min(i[1],G.k*Math.pow(2,r.apply(this,arguments)))),K=Ea(R);if(q.wheel)(q.mouse[0][0]!==K[0]||q.mouse[0][1]!==K[1])&&(q.mouse[1]=G.invert(q.mouse[0]=K)),clearTimeout(q.wheel);else{if(G.k===Y)return;q.mouse=[K,G.invert(K)],vp(this),q.start()}wd(R),q.wheel=setTimeout(B,b),q.zoom("mouse",n(_(k(G,Y),q.mouse[0],q.mouse[1]),q.extent,s));function B(){q.wheel=null,q.end()}}function P(R,...I){if(g||!e.apply(this,arguments))return;var q=R.currentTarget,G=A(this,I,!0).event(R),Y=Gr(R.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",H,!0),K=Ea(R,q),B=R.clientX,U=R.clientY;zH(R.view),Q0(R),G.mouse=[K,this.__zoom.invert(K)],vp(this),G.start();function X(W){if(wd(W),!G.moved){var Q=W.clientX-B,J=W.clientY-U;G.moved=Q*Q+J*J>w}G.event(W).zoom("mouse",n(_(G.that.__zoom,G.mouse[0]=Ea(W,q),G.mouse[1]),G.extent,s))}function H(W){Y.on("mousemove.zoom mouseup.zoom",null),$H(W.view,G.moved),wd(W),G.event(W).end()}}function M(R,...I){if(e.apply(this,arguments)){var q=this.__zoom,G=Ea(R.changedTouches?R.changedTouches[0]:R,this),Y=q.invert(G),K=q.k*(R.shiftKey?.5:2),B=n(_(k(q,K),G,Y),t.apply(this,I),s);wd(R),l>0?Gr(this).transition().duration(l).call(T,B,G,R):Gr(this).call(j.transform,B,G,R)}}function z(R,...I){if(e.apply(this,arguments)){var q=R.touches,G=q.length,Y=A(this,I,R.changedTouches.length===G).event(R),K,B,U,X;for(Q0(R),B=0;B<G;++B)U=q[B],X=Ea(U,this),X=[X,this.__zoom.invert(X),U.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==X[2]&&(Y.touch1=X,Y.taps=0):(Y.touch0=X,K=!0,Y.taps=1+!!h);h&&(h=clearTimeout(h)),K&&(Y.taps<2&&(m=X[0],h=setTimeout(function(){h=null},v)),vp(this),Y.start())}}function L(R,...I){if(this.__zooming){var q=A(this,I).event(R),G=R.changedTouches,Y=G.length,K,B,U,X;for(wd(R),K=0;K<Y;++K)B=G[K],U=Ea(B,this),q.touch0&&q.touch0[2]===B.identifier?q.touch0[0]=U:q.touch1&&q.touch1[2]===B.identifier&&(q.touch1[0]=U);if(B=q.that.__zoom,q.touch1){var H=q.touch0[0],W=q.touch0[1],Q=q.touch1[0],J=q.touch1[1],re=(re=Q[0]-H[0])*re+(re=Q[1]-H[1])*re,oe=(oe=J[0]-W[0])*oe+(oe=J[1]-W[1])*oe;B=k(B,Math.sqrt(re/oe)),U=[(H[0]+Q[0])/2,(H[1]+Q[1])/2],X=[(W[0]+J[0])/2,(W[1]+J[1])/2]}else if(q.touch0)U=q.touch0[0],X=q.touch0[1];else return;q.zoom("touch",n(_(B,U,X),q.extent,s))}}function F(R,...I){if(this.__zooming){var q=A(this,I).event(R),G=R.changedTouches,Y=G.length,K,B;for(Q0(R),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),K=0;K<Y;++K)B=G[K],q.touch0&&q.touch0[2]===B.identifier?delete q.touch0:q.touch1&&q.touch1[2]===B.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(B=Ea(B,this),Math.hypot(m[0]-B[0],m[1]-B[1])<S)){var U=Gr(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return j.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:qm(+R),j):r},j.filter=function(R){return arguments.length?(e=typeof R=="function"?R:qm(!!R),j):e},j.touchable=function(R){return arguments.length?(a=typeof R=="function"?R:qm(!!R),j):a},j.extent=function(R){return arguments.length?(t=typeof R=="function"?R:qm([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),j):t},j.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],j):[i[0],i[1]]},j.translateExtent=function(R){return arguments.length?(s[0][0]=+R[0][0],s[1][0]=+R[1][0],s[0][1]=+R[0][1],s[1][1]=+R[1][1],j):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},j.constrain=function(R){return arguments.length?(n=R,j):n},j.duration=function(R){return arguments.length?(l=+R,j):l},j.interpolate=function(R){return arguments.length?(c=R,j):c},j.on=function(){var R=d.on.apply(d,arguments);return R===d?j:R},j.clickDistance=function(R){return arguments.length?(w=(R=+R)*R,j):Math.sqrt(w)},j.tapDistance=function(R){return arguments.length?(S=+R,j):S},j}const ci={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},uf=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],n9=["Enter"," ","Escape"],r9={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Hu;(function(e){e.Strict="strict",e.Loose="loose"})(Hu||(Hu={}));var Jo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Jo||(Jo={}));var cf;(function(e){e.Partial="partial",e.Full="full"})(cf||(cf={}));const a9={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Zs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Zs||(Zs={}));var df;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(df||(df={}));var Qe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Qe||(Qe={}));const dR={[Qe.Left]:Qe.Right,[Qe.Right]:Qe.Left,[Qe.Top]:Qe.Bottom,[Qe.Bottom]:Qe.Top};function i9(e){return e===null?null:e?"valid":"invalid"}const s9=e=>"id"in e&&"source"in e&&"target"in e,xhe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),x2=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zf=(e,t=[0,0])=>{const{width:n,height:r}=ls(e),a=e.origin??t,i=n*a[0],s=r*a[1];return{x:e.position.x-i,y:e.position.y-s}},bhe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const i=typeof a=="string";let s=!t.nodeLookup&&!i?a:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(a):x2(a)?a:t.nodeLookup.get(a.id));const l=s?$p(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Jg(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ev(n)},$f=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=Jg(n,$p(a)),r=!0)}),r?ev(n):{x:0,y:0,width:0,height:0}},b2=(e,t,[n,r,a]=[0,0,1],i=!1,s=!1)=>{const l={...Bf(t,[n,r,a]),width:t.width/a,height:t.height/a},c=[];for(const d of e.values()){const{measured:h,selectable:m=!0,hidden:g=!1}=d;if(s&&!m||g)continue;const v=h.width??d.width??d.initialWidth??null,b=h.height??d.height??d.initialHeight??null,w=ff(l,Gu(d)),S=(v??0)*(b??0),j=i&&w>0;(!d.internals.handleBounds||j||w>=S||d.dragging)&&c.push(d)}return c},whe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function She(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function jhe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=She(e,s),c=$f(l),d=w2(c,t,n,(s==null?void 0:s.minZoom)??a,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(d,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function o9({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},h=s.origin??r;let m=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",ci.error005());else{const v=l.measured.width,b=l.measured.height;v&&b&&(m=[[c,d],[c+v,d+b]])}else l&&Vu(s.extent)&&(m=[[s.extent[0][0]+c,s.extent[0][1]+d],[s.extent[1][0]+c,s.extent[1][1]+d]]);const g=Vu(m)?il(t,m,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",ci.error015())),{position:{x:g.x-c+(s.measured.width??0)*h[0],y:g.y-d+(s.measured.height??0)*h[1]},positionAbsolute:g}}async function _he({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const i=new Set(e.map(g=>g.id)),s=[];for(const g of n){if(g.deletable===!1)continue;const v=i.has(g.id),b=!v&&g.parentId&&s.find(w=>w.id===g.parentId);(v||b)&&s.push(g)}const l=new Set(t.map(g=>g.id)),c=r.filter(g=>g.deletable!==!1),h=whe(s,c);for(const g of c)l.has(g.id)&&!h.find(b=>b.id===g.id)&&h.push(g);if(!a)return{edges:h,nodes:s};const m=await a({nodes:s,edges:h});return typeof m=="boolean"?m?{edges:h,nodes:s}:{edges:[],nodes:[]}:m}const Uu=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),il=(e={x:0,y:0},t,n)=>({x:Uu(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Uu(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function l9(e,t,n){const{width:r,height:a}=ls(n),{x:i,y:s}=n.internals.positionAbsolute;return il(e,[[i,s],[i+r,s+a]],t)}const fR=(e,t,n)=>e<t?Uu(Math.abs(e-t),1,t)/t:e>n?-Uu(Math.abs(e-n),1,t)/t:0,u9=(e,t,n=15,r=40)=>{const a=fR(e.x,r,t.width-r)*n,i=fR(e.y,r,t.height-r)*n;return[a,i]},Jg=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),NC=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ev=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Gu=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=x2(e)?e.internals.positionAbsolute:zf(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},$p=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=x2(e)?e.internals.positionAbsolute:zf(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},c9=(e,t)=>ev(Jg(NC(e),NC(t))),ff=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},hR=e=>Pa(e.width)&&Pa(e.height)&&Pa(e.x)&&Pa(e.y),Pa=e=>!isNaN(e)&&isFinite(e),khe=(e,t)=>{},qf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Bf=({x:e,y:t},[n,r,a],i=!1,s=[1,1])=>{const l={x:(e-n)/a,y:(t-r)/a};return i?qf(l,s):l},qp=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function vu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Che(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=vu(e,n),a=vu(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=vu(e.top??e.y??0,n),a=vu(e.bottom??e.y??0,n),i=vu(e.left??e.x??0,t),s=vu(e.right??e.x??0,t);return{top:r,right:s,bottom:a,left:i,x:i+s,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Nhe(e,t,n,r,a,i){const{x:s,y:l}=qp(e,[t,n,r]),{x:c,y:d}=qp({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=a-c,m=i-d;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(m)}}const w2=(e,t,n,r,a,i)=>{const s=Che(i,t,n),l=(t-s.x)/e.width,c=(n-s.y)/e.height,d=Math.min(l,c),h=Uu(d,r,a),m=e.x+e.width/2,g=e.y+e.height/2,v=t/2-m*h,b=n/2-g*h,w=Nhe(e,v,b,h,t,n),S={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:v-S.left+S.right,y:b-S.top+S.bottom,zoom:h}},hf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Vu(e){return e!=null&&e!=="parent"}function ls(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function d9(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function f9(e,t={width:0,height:0},n,r,a){const i={...e},s=r.get(n);if(s){const l=s.origin||a;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function mR(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ehe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function Ahe(e){return{...r9,...e||{}}}function Kd(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:s}=Da(e),l=Bf({x:i-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)},r),{x:c,y:d}=n?qf(l,t):l;return{xSnapped:c,ySnapped:d,...l}}const S2=e=>({width:e.offsetWidth,height:e.offsetHeight}),h9=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},The=["INPUT","SELECT","TEXTAREA"];function m9(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:The.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const p9=e=>"clientX"in e,Da=(e,t)=>{var i,s;const n=p9(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},pR=(e,t,n,r,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:a,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...S2(s)}})};function g9({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:l}){const c=e*.125+a*.375+s*.375+n*.125,d=t*.125+i*.375+l*.375+r*.125,h=Math.abs(c-e),m=Math.abs(d-t);return[c,d,h,m]}function Bm(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function gR({pos:e,x1:t,y1:n,x2:r,y2:a,c:i}){switch(e){case Qe.Left:return[t-Bm(t-r,i),n];case Qe.Right:return[t+Bm(r-t,i),n];case Qe.Top:return[t,n-Bm(n-a,i)];case Qe.Bottom:return[t,n+Bm(a-n,i)]}}function v9({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:a,targetPosition:i=Qe.Top,curvature:s=.25}){const[l,c]=gR({pos:n,x1:e,y1:t,x2:r,y2:a,c:s}),[d,h]=gR({pos:i,x1:r,y1:a,x2:e,y2:t,c:s}),[m,g,v,b]=g9({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:h});return[`M${e},${t} C${l},${c} ${d},${h} ${r},${a}`,m,g,v,b]}function y9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,i=n<e?n+a:n-a,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,a,s]}function Ohe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=a&&n?r+1e3:r,l=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return s+l}function Mhe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=Jg($p(e),$p(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return ff(s,ev(i))>0}const Phe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Dhe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Rhe=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||Phe;let a;return s9(e)?a={...e}:a={...e,id:r(e)},Dhe(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function x9({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,s,l]=y9({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,s,l]}const vR={[Qe.Left]:{x:-1,y:0},[Qe.Right]:{x:1,y:0},[Qe.Top]:{x:0,y:-1},[Qe.Bottom]:{x:0,y:1}},Ihe=({source:e,sourcePosition:t=Qe.Bottom,target:n})=>t===Qe.Left||t===Qe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},yR=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Lhe({source:e,sourcePosition:t=Qe.Bottom,target:n,targetPosition:r=Qe.Top,center:a,offset:i,stepPosition:s}){const l=vR[t],c=vR[r],d={x:e.x+l.x*i,y:e.y+l.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},m=Ihe({source:d,sourcePosition:t,target:h}),g=m.x!==0?"x":"y",v=m[g];let b=[],w,S;const j={x:0,y:0},k={x:0,y:0},[,,_,E]=y9({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[g]*c[g]===-1){g==="x"?(w=a.x??d.x+(h.x-d.x)*s,S=a.y??(d.y+h.y)/2):(w=a.x??(d.x+h.x)/2,S=a.y??d.y+(h.y-d.y)*s);const D=[{x:w,y:d.y},{x:w,y:h.y}],P=[{x:d.x,y:S},{x:h.x,y:S}];l[g]===v?b=g==="x"?D:P:b=g==="x"?P:D}else{const D=[{x:d.x,y:h.y}],P=[{x:h.x,y:d.y}];if(g==="x"?b=l.x===v?P:D:b=l.y===v?D:P,t===r){const R=Math.abs(e[g]-n[g]);if(R<=i){const I=Math.min(i-1,i-R);l[g]===v?j[g]=(d[g]>e[g]?-1:1)*I:k[g]=(h[g]>n[g]?-1:1)*I}}if(t!==r){const R=g==="x"?"y":"x",I=l[g]===c[R],q=d[R]>h[R],G=d[R]<h[R];(l[g]===1&&(!I&&q||I&&G)||l[g]!==1&&(!I&&G||I&&q))&&(b=g==="x"?D:P)}const M={x:d.x+j.x,y:d.y+j.y},z={x:h.x+k.x,y:h.y+k.y},L=Math.max(Math.abs(M.x-b[0].x),Math.abs(z.x-b[0].x)),F=Math.max(Math.abs(M.y-b[0].y),Math.abs(z.y-b[0].y));L>=F?(w=(M.x+z.x)/2,S=b[0].y):(w=b[0].x,S=(M.y+z.y)/2)}const T={x:d.x+j.x,y:d.y+j.y},A={x:h.x+k.x,y:h.y+k.y};return[[e,...T.x!==b[0].x||T.y!==b[0].y?[T]:[],...b,...A.x!==b[b.length-1].x||A.y!==b[b.length-1].y?[A]:[],n],w,S,_,E]}function zhe(e,t,n,r){const a=Math.min(yR(e,t)/2,yR(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const d=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+a*d},${s}Q ${i},${s} ${i},${s+a*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${s+a*c}Q ${i},${s} ${i+a*l},${s}`}function EC({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:a,targetPosition:i=Qe.Top,borderRadius:s=5,centerX:l,centerY:c,offset:d=20,stepPosition:h=.5}){const[m,g,v,b,w]=Lhe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:l,y:c},offset:d,stepPosition:h});let S=`M${m[0].x} ${m[0].y}`;for(let j=1;j<m.length-1;j++)S+=zhe(m[j-1],m[j],m[j+1],s);return S+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[S,g,v,b,w]}function xR(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function $he(e){var m;const{sourceNode:t,targetNode:n}=e;if(!xR(t)||!xR(n))return null;const r=t.internals.handleBounds||bR(t.handles),a=n.internals.handleBounds||bR(n.handles),i=wR((r==null?void 0:r.source)??[],e.sourceHandle),s=wR(e.connectionMode===Hu.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!i||!s)return(m=e.onError)==null||m.call(e,"008",ci.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||Qe.Bottom,c=(s==null?void 0:s.position)||Qe.Top,d=sl(t,i,l),h=sl(n,s,c);return{sourceX:d.x,sourceY:d.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function bR(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function sl(e,t,n=Qe.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??ls(e);if(r)return{x:a+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case Qe.Top:return{x:a+s/2,y:i};case Qe.Right:return{x:a+s,y:i+l/2};case Qe.Bottom:return{x:a+s/2,y:i+l};case Qe.Left:return{x:a,y:i+l/2}}}function wR(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function AC(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function qhe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const d=AC(c,t);i.has(d)||(s.push({id:d,color:c.color||n,...c}),i.add(d))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const b9=1e3,Bhe=10,j2={nodeOrigin:[0,0],nodeExtent:uf,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Fhe={...j2,checkEquality:!0};function _2(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Hhe(e,t,n){const r=_2(j2,n);for(const a of e.values())if(a.parentId)C2(a,e,t,r);else{const i=zf(a,r.nodeOrigin),s=Vu(a.extent)?a.extent:r.nodeExtent,l=il(i,s,ls(a));a.internals.positionAbsolute=l}}function Uhe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(i):a.type==="target"&&r.push(i)}return{source:n,target:r}}function k2(e){return e==="manual"}function TC(e,t,n,r={}){var h,m;const a=_2(Fhe,r),i={i:0},s=new Map(t),l=a!=null&&a.elevateNodesOnSelect&&!k2(a.zIndexMode)?b9:0;let c=e.length>0,d=!1;t.clear(),n.clear();for(const g of e){let v=s.get(g.id);if(a.checkEquality&&g===(v==null?void 0:v.internals.userNode))t.set(g.id,v);else{const b=zf(g,a.nodeOrigin),w=Vu(g.extent)?g.extent:a.nodeExtent,S=il(b,w,ls(g));v={...a.defaults,...g,measured:{width:(h=g.measured)==null?void 0:h.width,height:(m=g.measured)==null?void 0:m.height},internals:{positionAbsolute:S,handleBounds:Uhe(g,v),z:w9(g,l,a.zIndexMode),userNode:g}},t.set(g.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(c=!1),g.parentId&&C2(v,t,n,r,i),d||(d=g.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function Ghe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function C2(e,t,n,r,a){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:c}=_2(j2,r),d=e.parentId,h=t.get(d);if(!h){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Ghe(e,n),a&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++a.i,h.internals.z=h.internals.z+a.i*Bhe),a&&h.internals.rootParentIndex!==void 0&&(a.i=h.internals.rootParentIndex);const m=i&&!k2(c)?b9:0,{x:g,y:v,z:b}=Vhe(e,h,s,l,m,c),{positionAbsolute:w}=e.internals,S=g!==w.x||v!==w.y;(S||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:g,y:v}:w,z:b}})}function w9(e,t,n){const r=Pa(e.zIndex)?e.zIndex:0;return k2(n)?r:r+(e.selected?t:0)}function Vhe(e,t,n,r,a,i){const{x:s,y:l}=t.internals.positionAbsolute,c=ls(e),d=zf(e,n),h=Vu(e.extent)?il(d,e.extent,c):d;let m=il({x:s+h.x,y:l+h.y},r,c);e.extent==="parent"&&(m=l9(m,c,t));const g=w9(e,a,i),v=t.internals.z??0;return{x:m.x,y:m.y,z:v>=g?v+1:g}}function N2(e,t,n,r=[0,0]){var s;const a=[],i=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const d=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??Gu(c),h=c9(d,l.rect);i.set(l.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:l,parent:c},d)=>{var _;const h=c.internals.positionAbsolute,m=ls(c),g=c.origin??r,v=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,b=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,w=Math.max(m.width,Math.round(l.width)),S=Math.max(m.height,Math.round(l.height)),j=(w-m.width)*g[0],k=(S-m.height)*g[1];(v>0||b>0||j||k)&&(a.push({id:d,type:"position",position:{x:c.position.x-v+j,y:c.position.y-b+k}}),(_=n.get(d))==null||_.forEach(E=>{e.some(T=>T.id===E.id)||a.push({id:E.id,type:"position",position:{x:E.position.x+v,y:E.position.y+b}})})),(m.width<l.width||m.height<l.height||v||b)&&a.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?g[0]*v-j:0),height:S+(b?g[1]*b-k:0)}})}),a}function Khe(e,t,n,r,a,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const d=[],h=window.getComputedStyle(l),{m22:m}=new window.DOMMatrixReadOnly(h.transform),g=[];for(const v of e.values()){const b=t.get(v.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),c=!0;continue}const w=S2(v.nodeElement),S=b.measured.width!==w.width||b.measured.height!==w.height;if(!!(w.width&&w.height&&(S||!b.internals.handleBounds||v.force))){const k=v.nodeElement.getBoundingClientRect(),_=Vu(b.extent)?b.extent:i;let{positionAbsolute:E}=b.internals;b.parentId&&b.extent==="parent"?E=l9(E,w,t.get(b.parentId)):_&&(E=il(E,_,w));const T={...b,measured:w,internals:{...b.internals,positionAbsolute:E,handleBounds:{source:pR("source",v.nodeElement,k,m,b.id),target:pR("target",v.nodeElement,k,m,b.id)}}};t.set(b.id,T),b.parentId&&C2(T,t,n,{nodeOrigin:a,zIndexMode:s}),c=!0,S&&(d.push({id:b.id,type:"dimensions",dimensions:w}),b.expandParent&&b.parentId&&g.push({id:b.id,parentId:b.parentId,rect:Gu(T,a)}))}}if(g.length>0){const v=N2(g,t,n,a);d.push(...v)}return{changes:d,updatedInternals:c}}async function Yhe({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function SR(e,t,n,r,a,i){let s=a;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${a}-${e}`;const c=r.get(s)||new Map;if(r.set(s,c.set(n,t)),i){s=`${a}-${e}-${i}`;const d=r.get(s)||new Map;r.set(s,d.set(n,t))}}function S9(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:i,sourceHandle:s=null,targetHandle:l=null}=r,c={edgeId:r.id,source:a,target:i,sourceHandle:s,targetHandle:l},d=`${a}-${s}--${i}-${l}`,h=`${i}-${l}--${a}-${s}`;SR("source",c,h,e,a,s),SR("target",c,d,e,i,l),t.set(r.id,r)}}function j9(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:j9(n,t):!1}function jR(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Whe(e,t,n,r){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!j9(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&a.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function J0({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,c;const a=[];for(const[d,h]of t){const m=(s=n.get(d))==null?void 0:s.internals.userNode;m&&a.push({...m,position:h.position,dragging:r})}if(!e)return[a[0],a];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:r}:a[0],a]}function Xhe({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:r-a.distance.y},s=qf(i,t);return{x:s.x-i.x,y:s.y-i.y}}function Zhe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let i={x:null,y:null},s=0,l=new Map,c=!1,d={x:0,y:0},h=null,m=!1,g=null,v=!1,b=!1,w=null;function S({noDragClassName:k,handleSelector:_,domNode:E,isSelectable:T,nodeId:A,nodeClickDistance:O=0}){g=Gr(E);function D({x:L,y:F}){const{nodeLookup:R,nodeExtent:I,snapGrid:q,snapToGrid:G,nodeOrigin:Y,onNodeDrag:K,onSelectionDrag:B,onError:U,updateNodePositions:X}=t();i={x:L,y:F};let H=!1;const W=l.size>1,Q=W&&I?NC($f(l)):null,J=W&&G?Xhe({dragItems:l,snapGrid:q,x:L,y:F}):null;for(const[re,oe]of l){if(!R.has(re))continue;let Z={x:L-oe.distance.x,y:F-oe.distance.y};G&&(Z=J?{x:Math.round(Z.x+J.x),y:Math.round(Z.y+J.y)}:qf(Z,q));let le=null;if(W&&I&&!oe.extent&&Q){const{positionAbsolute:ae}=oe.internals,xe=ae.x-Q.x+I[0][0],ye=ae.x+oe.measured.width-Q.x2+I[1][0],Te=ae.y-Q.y+I[0][1],Me=ae.y+oe.measured.height-Q.y2+I[1][1];le=[[xe,Te],[ye,Me]]}const{position:ie,positionAbsolute:ee}=o9({nodeId:re,nextPosition:Z,nodeLookup:R,nodeExtent:le||I,nodeOrigin:Y,onError:U});H=H||oe.position.x!==ie.x||oe.position.y!==ie.y,oe.position=ie,oe.internals.positionAbsolute=ee}if(b=b||H,!!H&&(X(l,!0),w&&(r||K||!A&&B))){const[re,oe]=J0({nodeId:A,dragItems:l,nodeLookup:R});r==null||r(w,l,re,oe),K==null||K(w,re,oe),A||B==null||B(w,oe)}}async function P(){if(!h)return;const{transform:L,panBy:F,autoPanSpeed:R,autoPanOnNodeDrag:I}=t();if(!I){c=!1,cancelAnimationFrame(s);return}const[q,G]=u9(d,h,R);(q!==0||G!==0)&&(i.x=(i.x??0)-q/L[2],i.y=(i.y??0)-G/L[2],await F({x:q,y:G})&&D(i)),s=requestAnimationFrame(P)}function M(L){var W;const{nodeLookup:F,multiSelectionActive:R,nodesDraggable:I,transform:q,snapGrid:G,snapToGrid:Y,selectNodesOnDrag:K,onNodeDragStart:B,onSelectionDragStart:U,unselectNodesAndEdges:X}=t();m=!0,(!K||!T)&&!R&&A&&((W=F.get(A))!=null&&W.selected||X()),T&&K&&A&&(e==null||e(A));const H=Kd(L.sourceEvent,{transform:q,snapGrid:G,snapToGrid:Y,containerBounds:h});if(i=H,l=Whe(F,I,H,A),l.size>0&&(n||B||!A&&U)){const[Q,J]=J0({nodeId:A,dragItems:l,nodeLookup:F});n==null||n(L.sourceEvent,l,Q,J),B==null||B(L.sourceEvent,Q,J),A||U==null||U(L.sourceEvent,J)}}const z=qH().clickDistance(O).on("start",L=>{const{domNode:F,nodeDragThreshold:R,transform:I,snapGrid:q,snapToGrid:G}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,v=!1,b=!1,w=L.sourceEvent,R===0&&M(L),i=Kd(L.sourceEvent,{transform:I,snapGrid:q,snapToGrid:G,containerBounds:h}),d=Da(L.sourceEvent,h)}).on("drag",L=>{const{autoPanOnNodeDrag:F,transform:R,snapGrid:I,snapToGrid:q,nodeDragThreshold:G,nodeLookup:Y}=t(),K=Kd(L.sourceEvent,{transform:R,snapGrid:I,snapToGrid:q,containerBounds:h});if(w=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||A&&!Y.has(A))&&(v=!0),!v){if(!c&&F&&m&&(c=!0,P()),!m){const B=Da(L.sourceEvent,h),U=B.x-d.x,X=B.y-d.y;Math.sqrt(U*U+X*X)>G&&M(L)}(i.x!==K.xSnapped||i.y!==K.ySnapped)&&l&&m&&(d=Da(L.sourceEvent,h),D(K))}}).on("end",L=>{if(!(!m||v)&&(c=!1,m=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:F,updateNodePositions:R,onNodeDragStop:I,onSelectionDragStop:q}=t();if(b&&(R(l,!1),b=!1),a||I||!A&&q){const[G,Y]=J0({nodeId:A,dragItems:l,nodeLookup:F,dragging:!1});a==null||a(L.sourceEvent,l,G,Y),I==null||I(L.sourceEvent,G,Y),A||q==null||q(L.sourceEvent,Y)}}}).filter(L=>{const F=L.target;return!L.button&&(!k||!jR(F,`.${k}`,E))&&(!_||jR(F,_,E))});g.call(z)}function j(){g==null||g.on(".drag",null)}return{update:S,destroy:j}}function Qhe(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())ff(a,Gu(i))>0&&r.push(i);return r}const Jhe=250;function eme(e,t,n,r){var l,c;let a=[],i=1/0;const s=Qhe(e,n,t+Jhe);for(const d of s){const h=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const m of h){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:g,y:v}=sl(d,m,m.position,!0),b=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));b>t||(b<i?(a=[{...m,x:g,y:v}],i=b):b===i&&a.push({...m,x:g,y:v}))}}if(!a.length)return null;if(a.length>1){const d=r.type==="source"?"target":"source";return a.find(h=>h.type===d)??a[0]}return a[0]}function _9(e,t,n,r,a,i=!1){var d,h,m;const s=r.get(e);if(!s)return null;const l=a==="strict"?(d=s.internals.handleBounds)==null?void 0:d[t]:[...((h=s.internals.handleBounds)==null?void 0:h.source)??[],...((m=s.internals.handleBounds)==null?void 0:m.target)??[]],c=(n?l==null?void 0:l.find(g=>g.id===n):l==null?void 0:l[0])??null;return c&&i?{...c,...sl(s,c,c.position,!0)}:c}function k9(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function tme(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const C9=()=>!0;function nme(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:h,flowId:m,panBy:g,cancelConnection:v,onConnectStart:b,onConnect:w,onConnectEnd:S,isValidConnection:j=C9,onReconnectEnd:k,updateConnection:_,getTransform:E,getFromHandle:T,autoPanSpeed:A,dragThreshold:O=1,handleDomNode:D}){const P=h9(e.target);let M=0,z;const{x:L,y:F}=Da(e),R=k9(i,D),I=l==null?void 0:l.getBoundingClientRect();let q=!1;if(!I||!R)return;const G=_9(a,R,r,c,t);if(!G)return;let Y=Da(e,I),K=!1,B=null,U=!1,X=null;function H(){if(!h||!I)return;const[ie,ee]=u9(Y,I,A);g({x:ie,y:ee}),M=requestAnimationFrame(H)}const W={...G,nodeId:a,type:R,position:G.position},Q=c.get(a);let re={inProgress:!0,isValid:null,from:sl(Q,W,Qe.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:Q,to:Y,toHandle:null,toPosition:dR[W.position],toNode:null,pointer:Y};function oe(){q=!0,_(re),b==null||b(e,{nodeId:a,handleId:r,handleType:R})}O===0&&oe();function Z(ie){if(!q){const{x:Me,y:he}=Da(ie),Ie=Me-L,Je=he-F;if(!(Ie*Ie+Je*Je>O*O))return;oe()}if(!T()||!W){le(ie);return}const ee=E();Y=Da(ie,I),z=eme(Bf(Y,ee,!1,[1,1]),n,c,W),K||(H(),K=!0);const ae=N9(ie,{handle:z,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:s?"target":"source",isValidConnection:j,doc:P,lib:d,flowId:m,nodeLookup:c});X=ae.handleDomNode,B=ae.connection,U=tme(!!z,ae.isValid);const xe=c.get(a),ye=xe?sl(xe,W,Qe.Left,!0):re.from,Te={...re,from:ye,isValid:U,to:ae.toHandle&&U?qp({x:ae.toHandle.x,y:ae.toHandle.y},ee):Y,toHandle:ae.toHandle,toPosition:U&&ae.toHandle?ae.toHandle.position:dR[W.position],toNode:ae.toHandle?c.get(ae.toHandle.nodeId):null,pointer:Y};_(Te),re=Te}function le(ie){if(!("touches"in ie&&ie.touches.length>0)){if(q){(z||X)&&B&&U&&(w==null||w(B));const{inProgress:ee,...ae}=re,xe={...ae,toPosition:re.toHandle?re.toPosition:null};S==null||S(ie,xe),i&&(k==null||k(ie,xe))}v(),cancelAnimationFrame(M),K=!1,U=!1,B=null,X=null,P.removeEventListener("mousemove",Z),P.removeEventListener("mouseup",le),P.removeEventListener("touchmove",Z),P.removeEventListener("touchend",le)}}P.addEventListener("mousemove",Z),P.addEventListener("mouseup",le),P.addEventListener("touchmove",Z),P.addEventListener("touchend",le)}function N9(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:s,lib:l,flowId:c,isValidConnection:d=C9,nodeLookup:h}){const m=i==="target",g=t?s.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:b}=Da(e),w=s.elementFromPoint(v,b),S=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:g,j={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const k=k9(void 0,S),_=S.getAttribute("data-nodeid"),E=S.getAttribute("data-handleid"),T=S.classList.contains("connectable"),A=S.classList.contains("connectableend");if(!_||!k)return j;const O={source:m?_:r,sourceHandle:m?E:a,target:m?r:_,targetHandle:m?a:E};j.connection=O;const P=T&&A&&(n===Hu.Strict?m&&k==="source"||!m&&k==="target":_!==r||E!==a);j.isValid=P&&d(O),j.toHandle=_9(_,k,E,h,n,!0)}return j}const OC={onPointerDown:nme,isValid:N9};function rme({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Gr(e);function i({translateExtent:l,width:c,height:d,zoomStep:h=1,pannable:m=!0,zoomable:g=!0,inversePan:v=!1}){const b=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const E=n(),T=_.sourceEvent.ctrlKey&&hf()?10:1,A=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*h,O=E[2]*Math.pow(2,A*T);t.scaleTo(O)};let w=[0,0];const S=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},j=_=>{const E=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const T=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],A=[T[0]-w[0],T[1]-w[1]];w=T;const O=r()*Math.max(E[2],Math.log(E[2]))*(v?-1:1),D={x:E[0]-A[0]*O,y:E[1]-A[1]*O},P=[[0,0],[c,d]];t.setViewportConstrained({x:D.x,y:D.y,zoom:E[2]},P,l)},k=t9().on("start",S).on("zoom",m?j:null).on("zoom.wheel",g?b:null);a.call(k,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:Ea}}const tv=e=>({x:e.x,y:e.y,zoom:e.k}),eb=({x:e,y:t,zoom:n})=>Qg.translate(e,t).scale(n),Au=(e,t)=>e.target.closest(`.${t}`),E9=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),ame=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,tb=(e,t=0,n=ame,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},A9=e=>{const t=e.ctrlKey&&hf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function ime({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return h=>{if(Au(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(h.ctrlKey&&s){const S=Ea(h),j=A9(h),k=m*Math.pow(2,j);r.scaleTo(n,k,S,h);return}const g=h.deltaMode===1?20:1;let v=a===Jo.Vertical?0:h.deltaX*g,b=a===Jo.Horizontal?0:h.deltaY*g;!hf()&&h.shiftKey&&a!==Jo.Vertical&&(v=h.deltaY*g,b=0),r.translateBy(n,-(v/m)*i,-(b/m)*i,{internal:!0});const w=tv(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,w),e.panScrollTimeout=setTimeout(()=>{d==null||d(h,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,w))}}function sme({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Au(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,a)}}function ome({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const a=tv(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function lme({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&E9(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),a&&!((l=i.sourceEvent)!=null&&l.internal)&&(a==null||a(i.sourceEvent,tv(i.transform)))}}function ume({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&E9(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const c=tv(s.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(s.sourceEvent,c)},n?150:0)}}}function cme({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:h}){return m=>{var S;const g=e||t,v=n&&m.ctrlKey,b=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Au(m,`${d}-flow__node`)||Au(m,`${d}-flow__edge`)))return!0;if(!r&&!g&&!a&&!i&&!n||s||h&&!b||Au(m,l)&&b||Au(m,c)&&(!b||a&&b&&!e)||!n&&m.ctrlKey&&b)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!g&&!a&&!v&&b||!r&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(r)&&!r.includes(m.button)&&m.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||b)&&w}}function dme({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),m=t9().scaleExtent([t,n]).translateExtent(r),g=Gr(e).call(m);k({x:a.x,y:a.y,zoom:Uu(a.zoom,t,n)},[[0,0],[h.width,h.height]],r);const v=g.on("wheel.zoom"),b=g.on("dblclick.zoom");m.wheelDelta(A9);function w(z,L){return g?new Promise(F=>{m==null||m.interpolate((L==null?void 0:L.interpolate)==="linear"?Wi:mp).transform(tb(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>F(!0)),z)}):Promise.resolve(!1)}function S({noWheelClassName:z,noPanClassName:L,onPaneContextMenu:F,userSelectionActive:R,panOnScroll:I,panOnDrag:q,panOnScrollMode:G,panOnScrollSpeed:Y,preventScrolling:K,zoomOnPinch:B,zoomOnScroll:U,zoomOnDoubleClick:X,zoomActivationKeyPressed:H,lib:W,onTransformChange:Q,connectionInProgress:J,paneClickDistance:re,selectionOnDrag:oe}){R&&!d.isZoomingOrPanning&&j();const Z=I&&!H&&!R;m.clickDistance(oe?1/0:!Pa(re)||re<0?0:re);const le=Z?ime({zoomPanValues:d,noWheelClassName:z,d3Selection:g,d3Zoom:m,panOnScrollMode:G,panOnScrollSpeed:Y,zoomOnPinch:B,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):sme({noWheelClassName:z,preventScrolling:K,d3ZoomHandler:v});if(g.on("wheel.zoom",le,{passive:!1}),!R){const ee=ome({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:s});m.on("start",ee);const ae=lme({zoomPanValues:d,panOnDrag:q,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:Q});m.on("zoom",ae);const xe=ume({zoomPanValues:d,panOnDrag:q,panOnScroll:I,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});m.on("end",xe)}const ie=cme({zoomActivationKeyPressed:H,panOnDrag:q,zoomOnScroll:U,panOnScroll:I,zoomOnDoubleClick:X,zoomOnPinch:B,userSelectionActive:R,noPanClassName:L,noWheelClassName:z,lib:W,connectionInProgress:J});m.filter(ie),X?g.on("dblclick.zoom",b):g.on("dblclick.zoom",null)}function j(){m.on("zoom",null)}async function k(z,L,F){const R=eb(z),I=m==null?void 0:m.constrain()(R,L,F);return I&&await w(I),new Promise(q=>q(I))}async function _(z,L){const F=eb(z);return await w(F,L),new Promise(R=>R(F))}function E(z){if(g){const L=eb(z),F=g.property("__zoom");(F.k!==z.zoom||F.x!==z.x||F.y!==z.y)&&(m==null||m.transform(g,L,null,{sync:!0}))}}function T(){const z=g?e9(g.node()):{x:0,y:0,k:1};return{x:z.x,y:z.y,zoom:z.k}}function A(z,L){return g?new Promise(F=>{m==null||m.interpolate((L==null?void 0:L.interpolate)==="linear"?Wi:mp).scaleTo(tb(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>F(!0)),z)}):Promise.resolve(!1)}function O(z,L){return g?new Promise(F=>{m==null||m.interpolate((L==null?void 0:L.interpolate)==="linear"?Wi:mp).scaleBy(tb(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>F(!0)),z)}):Promise.resolve(!1)}function D(z){m==null||m.scaleExtent(z)}function P(z){m==null||m.translateExtent(z)}function M(z){const L=!Pa(z)||z<0?0:z;m==null||m.clickDistance(L)}return{update:S,destroy:j,setViewport:_,setViewportConstrained:k,getViewport:T,scaleTo:A,scaleBy:O,setScaleExtent:D,setTranslateExtent:P,syncViewport:E,setClickDistance:M}}var Ku;(function(e){e.Line="line",e.Handle="handle"})(Ku||(Ku={}));function fme({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:i}){const s=e-t,l=n-r,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&a&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function _R(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Gs(e,t){return Math.max(0,t-e)}function Vs(e,t){return Math.max(0,e-t)}function Fm(e,t,n){return Math.max(0,t-e,e-n)}function kR(e,t){return e?!t:t}function hme(e,t,n,r,a,i,s,l){let{affectsX:c,affectsY:d}=t;const{isHorizontal:h,isVertical:m}=t,g=h&&m,{xSnapped:v,ySnapped:b}=n,{minWidth:w,maxWidth:S,minHeight:j,maxHeight:k}=r,{x:_,y:E,width:T,height:A,aspectRatio:O}=e;let D=Math.floor(h?v-e.pointerX:0),P=Math.floor(m?b-e.pointerY:0);const M=T+(c?-D:D),z=A+(d?-P:P),L=-i[0]*T,F=-i[1]*A;let R=Fm(M,w,S),I=Fm(z,j,k);if(s){let Y=0,K=0;c&&D<0?Y=Gs(_+D+L,s[0][0]):!c&&D>0&&(Y=Vs(_+M+L,s[1][0])),d&&P<0?K=Gs(E+P+F,s[0][1]):!d&&P>0&&(K=Vs(E+z+F,s[1][1])),R=Math.max(R,Y),I=Math.max(I,K)}if(l){let Y=0,K=0;c&&D>0?Y=Vs(_+D,l[0][0]):!c&&D<0&&(Y=Gs(_+M,l[1][0])),d&&P>0?K=Vs(E+P,l[0][1]):!d&&P<0&&(K=Gs(E+z,l[1][1])),R=Math.max(R,Y),I=Math.max(I,K)}if(a){if(h){const Y=Fm(M/O,j,k)*O;if(R=Math.max(R,Y),s){let K=0;!c&&!d||c&&!d&&g?K=Vs(E+F+M/O,s[1][1])*O:K=Gs(E+F+(c?D:-D)/O,s[0][1])*O,R=Math.max(R,K)}if(l){let K=0;!c&&!d||c&&!d&&g?K=Gs(E+M/O,l[1][1])*O:K=Vs(E+(c?D:-D)/O,l[0][1])*O,R=Math.max(R,K)}}if(m){const Y=Fm(z*O,w,S)/O;if(I=Math.max(I,Y),s){let K=0;!c&&!d||d&&!c&&g?K=Vs(_+z*O+L,s[1][0])/O:K=Gs(_+(d?P:-P)*O+L,s[0][0])/O,I=Math.max(I,K)}if(l){let K=0;!c&&!d||d&&!c&&g?K=Gs(_+z*O,l[1][0])/O:K=Vs(_+(d?P:-P)*O,l[0][0])/O,I=Math.max(I,K)}}}P=P+(P<0?I:-I),D=D+(D<0?R:-R),a&&(g?M>z*O?P=(kR(c,d)?-D:D)/O:D=(kR(c,d)?-P:P)*O:h?(P=D/O,d=c):(D=P*O,c=d));const q=c?_+D:_,G=d?E+P:E;return{width:T+(c?-D:D),height:A+(d?-P:P),x:i[0]*D*(c?-1:1)+q,y:i[1]*P*(d?-1:1)+G}}const T9={width:0,height:0,x:0,y:0},mme={...T9,pointerX:0,pointerY:0,aspectRatio:1};function pme(e){return[[0,0],[e.measured.width,e.measured.height]]}function gme(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,c=n[1]*s;return[[r-l,a-c],[r+i-l,a+s-c]]}function vme({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=Gr(e);let s={controlDirection:_R("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:h,keepAspectRatio:m,resizeDirection:g,onResizeStart:v,onResize:b,onResizeEnd:w,shouldResize:S}){let j={...T9},k={...mme};s={boundaries:h,resizeDirection:g,keepAspectRatio:m,controlDirection:_R(d)};let _,E=null,T=[],A,O,D,P=!1;const M=qH().on("start",z=>{const{nodeLookup:L,transform:F,snapGrid:R,snapToGrid:I,nodeOrigin:q,paneDomNode:G}=n();if(_=L.get(t),!_)return;E=(G==null?void 0:G.getBoundingClientRect())??null;const{xSnapped:Y,ySnapped:K}=Kd(z.sourceEvent,{transform:F,snapGrid:R,snapToGrid:I,containerBounds:E});j={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},k={...j,pointerX:Y,pointerY:K,aspectRatio:j.width/j.height},A=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(A=L.get(_.parentId),O=A&&_.extent==="parent"?pme(A):void 0),T=[],D=void 0;for(const[B,U]of L)if(U.parentId===t&&(T.push({id:B,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){const X=gme(U,_,U.origin??q);D?D=[[Math.min(X[0][0],D[0][0]),Math.min(X[0][1],D[0][1])],[Math.max(X[1][0],D[1][0]),Math.max(X[1][1],D[1][1])]]:D=X}v==null||v(z,{...j})}).on("drag",z=>{const{transform:L,snapGrid:F,snapToGrid:R,nodeOrigin:I}=n(),q=Kd(z.sourceEvent,{transform:L,snapGrid:F,snapToGrid:R,containerBounds:E}),G=[];if(!_)return;const{x:Y,y:K,width:B,height:U}=j,X={},H=_.origin??I,{width:W,height:Q,x:J,y:re}=hme(k,s.controlDirection,q,s.boundaries,s.keepAspectRatio,H,O,D),oe=W!==B,Z=Q!==U,le=J!==Y&&oe,ie=re!==K&&Z;if(!le&&!ie&&!oe&&!Z)return;if((le||ie||H[0]===1||H[1]===1)&&(X.x=le?J:j.x,X.y=ie?re:j.y,j.x=X.x,j.y=X.y,T.length>0)){const ye=J-Y,Te=re-K;for(const Me of T)Me.position={x:Me.position.x-ye+H[0]*(W-B),y:Me.position.y-Te+H[1]*(Q-U)},G.push(Me)}if((oe||Z)&&(X.width=oe&&(!s.resizeDirection||s.resizeDirection==="horizontal")?W:j.width,X.height=Z&&(!s.resizeDirection||s.resizeDirection==="vertical")?Q:j.height,j.width=X.width,j.height=X.height),A&&_.expandParent){const ye=H[0]*(X.width??0);X.x&&X.x<ye&&(j.x=ye,k.x=k.x-(X.x-ye));const Te=H[1]*(X.height??0);X.y&&X.y<Te&&(j.y=Te,k.y=k.y-(X.y-Te))}const ee=fme({width:j.width,prevWidth:B,height:j.height,prevHeight:U,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ae={...j,direction:ee};(S==null?void 0:S(z,ae))!==!1&&(P=!0,b==null||b(z,ae),r(X,G))}).on("end",z=>{P&&(w==null||w(z,{...j}),a==null||a({...j}),P=!1)});i.call(M)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var nb={exports:{}},rb={},ab={exports:{}},ib={};/**
461
+ * @license React
462
+ * use-sync-external-store-shim.production.js
463
+ *
464
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
465
+ *
466
+ * This source code is licensed under the MIT license found in the
467
+ * LICENSE file in the root directory of this source tree.
468
+ */var CR;function yme(){if(CR)return ib;CR=1;var e=rc();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(m,g){var v=g(),b=r({inst:{value:v,getSnapshot:g}}),w=b[0].inst,S=b[1];return i(function(){w.value=v,w.getSnapshot=g,c(w)&&S({inst:w})},[m,v,g]),a(function(){return c(w)&&S({inst:w}),m(function(){c(w)&&S({inst:w})})},[m]),s(v),v}function c(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return ib.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ib}var NR;function xme(){return NR||(NR=1,ab.exports=yme()),ab.exports}/**
469
+ * @license React
470
+ * use-sync-external-store-shim/with-selector.production.js
471
+ *
472
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
473
+ *
474
+ * This source code is licensed under the MIT license found in the
475
+ * LICENSE file in the root directory of this source tree.
476
+ */var ER;function bme(){if(ER)return rb;ER=1;var e=rc(),t=xme();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return rb.useSyncExternalStoreWithSelector=function(d,h,m,g,v){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function j(A){if(!k){if(k=!0,_=A,A=g(A),v!==void 0&&w.hasValue){var O=w.value;if(v(O,A))return E=O}return E=A}if(O=E,r(_,A))return O;var D=g(A);return v!==void 0&&v(O,D)?(_=A,O):(_=A,E=D)}var k=!1,_,E,T=m===void 0?null:m;return[function(){return j(h())},T===null?void 0:function(){return j(T())}]},[h,m,g,v]);var S=a(d,b[0],b[1]);return s(function(){w.hasValue=!0,w.value=S},[S]),c(S),S},rb}var AR;function wme(){return AR||(AR=1,nb.exports=bme()),nb.exports}var O9=wme();const Sme=ea(O9),jme={},TR=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,v))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(jme?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,a,c);return c},_me=e=>e?TR(e):TR,{useDebugValue:kme}=ON,{useSyncExternalStoreWithSelector:Cme}=Sme,Nme=e=>e;function M9(e,t=Nme,n){const r=Cme(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return kme(r),r}const OR=(e,t)=>{const n=_me(e),r=(a,i=t)=>M9(n,a,i);return Object.assign(r,n),r},Eme=(e,t)=>e?OR(e,t):OR;function un(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const nv=x.createContext(null),Ame=nv.Provider,P9=ci.error001();function Tt(e,t){const n=x.useContext(nv);if(n===null)throw new Error(P9);return M9(n,e,t)}function dn(){const e=x.useContext(nv);if(e===null)throw new Error(P9);return x.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const MR={display:"none"},Tme={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},D9="react-flow__node-desc",R9="react-flow__edge-desc",Ome="react-flow__aria-live",Mme=e=>e.ariaLiveMessage,Pme=e=>e.ariaLabelConfig;function Dme({rfId:e}){const t=Tt(Mme);return f.jsx("div",{id:`${Ome}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Tme,children:t})}function Rme({rfId:e,disableKeyboardA11y:t}){const n=Tt(Pme);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${D9}-${e}`,style:MR,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${R9}-${e}`,style:MR,children:n["edge.a11yDescription.default"]}),!t&&f.jsx(Dme,{rfId:e})]})}const rv=x.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const s=`${e}`.split("-");return f.jsx("div",{className:Rn(["react-flow__panel",n,...s]),style:r,ref:i,...a,children:t})});rv.displayName="Panel";function Ime({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(rv,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:f.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Lme=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Hm=e=>e.id;function zme(e,t){return un(e.selectedNodes.map(Hm),t.selectedNodes.map(Hm))&&un(e.selectedEdges.map(Hm),t.selectedEdges.map(Hm))}function $me({onSelectionChange:e}){const t=dn(),{selectedNodes:n,selectedEdges:r}=Tt(Lme,zme);return x.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const qme=e=>!!e.onSelectionChangeHandlers;function Bme({onSelectionChange:e}){const t=Tt(qme);return e||t?f.jsx($me,{onSelectionChange:e}):null}const MC=typeof window<"u"?x.useLayoutEffect:x.useEffect,I9=[0,0],Fme={x:0,y:0,zoom:1},Hme=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],PR=[...Hme,"rfId"],Ume=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),DR={translateExtent:uf,nodeOrigin:I9,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Gme(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c}=Tt(Ume,un),d=dn();MC(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=DR,l()}),[]);const h=x.useRef(DR);return MC(()=>{for(const m of PR){const g=e[m],v=h.current[m];g!==v&&(typeof e[m]>"u"||(m==="nodes"?t(g):m==="edges"?n(g):m==="minZoom"?r(g):m==="maxZoom"?a(g):m==="translateExtent"?i(g):m==="nodeExtent"?s(g):m==="ariaLabelConfig"?d.setState({ariaLabelConfig:Ahe(g)}):m==="fitView"?d.setState({fitViewQueued:g}):m==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[m]:g})))}h.current=e},PR.map(m=>e[m])),null}function RR(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Vme(e){var r;const[t,n]=x.useState(e==="system"?null:e);return x.useEffect(()=>{if(e!=="system"){n(e);return}const a=RR(),i=()=>n(a!=null&&a.matches?"dark":"light");return i(),a==null||a.addEventListener("change",i),()=>{a==null||a.removeEventListener("change",i)}},[e]),t!==null?t:(r=RR())!=null&&r.matches?"dark":"light"}const IR=typeof document<"u"?document:null;function mf(e=null,t={target:IR,actInsideInputWithModifier:!0}){const[n,r]=x.useState(!1),a=x.useRef(!1),i=x.useRef(new Set([])),[s,l]=x.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
477
+ `).replace(`
478
+
479
+ `,`
480
+ +`).split(`
481
+ `)),h=d.reduce((m,g)=>m.concat(...g),[]);return[d,h]}return[[],[]]},[e]);return x.useEffect(()=>{const c=(t==null?void 0:t.target)??IR,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=v=>{var S,j;if(a.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!a.current||a.current&&!d)&&m9(v))return!1;const w=zR(v.code,l);if(i.current.add(v[w]),LR(s,i.current,!1)){const k=((j=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:j[0])||v.target,_=(k==null?void 0:k.nodeName)==="BUTTON"||(k==null?void 0:k.nodeName)==="A";t.preventDefault!==!1&&(a.current||!_)&&v.preventDefault(),r(!0)}},m=v=>{const b=zR(v.code,l);LR(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(v[b]),v.key==="Meta"&&i.current.clear(),a.current=!1},g=()=>{i.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",m),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",m),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function LR(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function zR(e,t){return t.includes(e)?"code":"key"}const Kme=()=>{const e=dn();return x.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=w2(t,r,a,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:c}=s.getBoundingClientRect(),d={x:t.x-l,y:t.y-c},h=n.snapGrid??a,m=n.snapToGrid??i;return Bf(d,r,m,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),s=qp(t,n);return{x:s.x+a,y:s.y+i}}}),[])};function L9(e,t){const n=[],r=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)Yme(c,l);n.push(l)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function Yme(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function z9(e,t){return L9(e,t)}function $9(e,t){return L9(e,t)}function Uo(e,t){return{id:e,type:"select",selected:t}}function Tu(e,t=new Set,n=!1){const r=[];for(const[a,i]of e){const s=t.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(Uo(i.id,s)))}return r}function $R({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),c=((a=l==null?void 0:l.internals)==null?void 0:a.userNode)??l;c!==void 0&&c!==s&&n.push({id:s.id,item:s,type:"replace"}),c===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function qR(e){return{id:e.id,type:"remove"}}const BR=e=>xhe(e),Wme=e=>s9(e);function q9(e){return x.forwardRef(e)}function FR(e){const[t,n]=x.useState(BigInt(0)),[r]=x.useState(()=>Xme(()=>n(a=>a+BigInt(1))));return MC(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function Xme(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const B9=x.createContext(null);function Zme({children:e}){const t=dn(),n=x.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:h,onNodesChange:m,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:b}=t.getState();let w=c;for(const j of l)w=typeof j=="function"?j(w):j;let S=$R({items:w,lookup:g});for(const j of b.values())S=j(S);h&&d(w),S.length>0?m==null||m(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:j,nodes:k,setNodes:_}=t.getState();j&&_(k)})},[]),r=FR(n),a=x.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:h,onEdgesChange:m,edgeLookup:g}=t.getState();let v=c;for(const b of l)v=typeof b=="function"?b(v):b;h?d(v):m&&m($R({items:v,lookup:g}))},[]),i=FR(a),s=x.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(B9.Provider,{value:s,children:e})}function Qme(){const e=x.useContext(B9);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Jme=e=>!!e.panZoom;function E2(){const e=Kme(),t=dn(),n=Qme(),r=Tt(Jme),a=x.useMemo(()=>{const i=m=>t.getState().nodeLookup.get(m),s=m=>{n.nodeQueue.push(m)},l=m=>{n.edgeQueue.push(m)},c=m=>{var j,k;const{nodeLookup:g,nodeOrigin:v}=t.getState(),b=BR(m)?m:g.get(m.id),w=b.parentId?f9(b.position,b.measured,b.parentId,g,v):b.position,S={...b,position:w,width:((j=b.measured)==null?void 0:j.width)??b.width,height:((k=b.measured)==null?void 0:k.height)??b.height};return Gu(S)},d=(m,g,v={replace:!1})=>{s(b=>b.map(w=>{if(w.id===m){const S=typeof g=="function"?g(w):g;return v.replace&&BR(S)?S:{...w,...S}}return w}))},h=(m,g,v={replace:!1})=>{l(b=>b.map(w=>{if(w.id===m){const S=typeof g=="function"?g(w):g;return v.replace&&Wme(S)?S:{...w,...S}}return w}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var g;return(g=i(m))==null?void 0:g.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(g=>({...g}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:s,setEdges:l,addNodes:m=>{const g=Array.isArray(m)?m:[m];n.nodeQueue.push(v=>[...v,...g])},addEdges:m=>{const g=Array.isArray(m)?m:[m];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:m=[],edges:g=[],transform:v}=t.getState(),[b,w,S]=v;return{nodes:m.map(j=>({...j})),edges:g.map(j=>({...j})),viewport:{x:b,y:w,zoom:S}}},deleteElements:async({nodes:m=[],edges:g=[]})=>{const{nodes:v,edges:b,onNodesDelete:w,onEdgesDelete:S,triggerNodeChanges:j,triggerEdgeChanges:k,onDelete:_,onBeforeDelete:E}=t.getState(),{nodes:T,edges:A}=await _he({nodesToRemove:m,edgesToRemove:g,nodes:v,edges:b,onBeforeDelete:E}),O=A.length>0,D=T.length>0;if(O){const P=A.map(qR);S==null||S(A),k(P)}if(D){const P=T.map(qR);w==null||w(T),j(P)}return(D||O)&&(_==null||_({nodes:T,edges:A})),{deletedNodes:T,deletedEdges:A}},getIntersectingNodes:(m,g=!0,v)=>{const b=hR(m),w=b?m:c(m),S=v!==void 0;return w?(v||t.getState().nodes).filter(j=>{const k=t.getState().nodeLookup.get(j.id);if(k&&!b&&(j.id===m.id||!k.internals.positionAbsolute))return!1;const _=Gu(S?j:k),E=ff(_,w);return g&&E>0||E>=_.width*_.height||E>=w.width*w.height}):[]},isNodeIntersecting:(m,g,v=!0)=>{const w=hR(m)?m:c(m);if(!w)return!1;const S=ff(w,g);return v&&S>0||S>=g.width*g.height||S>=w.width*w.height},updateNode:d,updateNodeData:(m,g,v={replace:!1})=>{d(m,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},updateEdge:h,updateEdgeData:(m,g,v={replace:!1})=>{h(m,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},getNodesBounds:m=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return bhe(m,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:m,id:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}-${m}${g?`-${g}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:m,handleId:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}${m?g?`-${m}-${g}`:`-${m}`:""}`))==null?void 0:b.values())??[])},fitView:async m=>{const g=t.getState().fitViewResolver??Ehe();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return x.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const HR=e=>e.selected,epe=typeof window<"u"?window:void 0;function tpe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=dn(),{deleteElements:r}=E2(),a=mf(e,{actInsideInputWithModifier:!1}),i=mf(t,{target:epe});x.useEffect(()=>{if(a){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(HR),edges:s.filter(HR)}),n.setState({nodesSelectionActive:!1})}},[a]),x.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function npe(e){const t=dn();x.useEffect(()=>{const n=()=>{var a,i,s,l;if(!e.current||!(((i=(a=e.current).checkVisibility)==null?void 0:i.call(a))??!0))return!1;const r=S2(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",ci.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const av={position:"absolute",width:"100%",height:"100%",top:0,left:0},rpe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function ape({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=Jo.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:h,maxZoom:m,zoomActivationKeyCode:g,preventScrolling:v=!0,children:b,noWheelClassName:w,noPanClassName:S,onViewportChange:j,isControlledViewport:k,paneClickDistance:_,selectionOnDrag:E}){const T=dn(),A=x.useRef(null),{userSelectionActive:O,lib:D,connectionInProgress:P}=Tt(rpe,un),M=mf(g),z=x.useRef();npe(A);const L=x.useCallback(F=>{j==null||j({x:F[0],y:F[1],zoom:F[2]}),k||T.setState({transform:F})},[j,k]);return x.useEffect(()=>{if(A.current){z.current=dme({domNode:A.current,minZoom:h,maxZoom:m,translateExtent:d,viewport:c,onDraggingChange:q=>T.setState(G=>G.paneDragging===q?G:{paneDragging:q}),onPanZoomStart:(q,G)=>{const{onViewportChangeStart:Y,onMoveStart:K}=T.getState();K==null||K(q,G),Y==null||Y(G)},onPanZoom:(q,G)=>{const{onViewportChange:Y,onMove:K}=T.getState();K==null||K(q,G),Y==null||Y(G)},onPanZoomEnd:(q,G)=>{const{onViewportChangeEnd:Y,onMoveEnd:K}=T.getState();K==null||K(q,G),Y==null||Y(G)}});const{x:F,y:R,zoom:I}=z.current.getViewport();return T.setState({panZoom:z.current,transform:[F,R,I],domNode:A.current.closest(".react-flow")}),()=>{var q;(q=z.current)==null||q.destroy()}}},[]),x.useEffect(()=>{var F;(F=z.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:M,preventScrolling:v,noPanClassName:S,userSelectionActive:O,noWheelClassName:w,lib:D,onTransformChange:L,connectionInProgress:P,selectionOnDrag:E,paneClickDistance:_})},[e,t,n,r,a,i,s,l,M,v,S,O,w,D,L,P,E,_]),f.jsx("div",{className:"react-flow__renderer",ref:A,style:av,children:b})}const ipe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function spe(){const{userSelectionActive:e,userSelectionRect:t}=Tt(ipe,un);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const sb=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},ope=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function lpe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=cf.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:d,onPaneScroll:h,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:v,children:b}){const w=dn(),{userSelectionActive:S,elementsSelectable:j,dragging:k,connectionInProgress:_}=Tt(ope,un),E=j&&(e||S),T=x.useRef(null),A=x.useRef(),O=x.useRef(new Set),D=x.useRef(new Set),P=x.useRef(!1),M=Y=>{if(P.current||_){P.current=!1;return}c==null||c(Y),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},z=Y=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){Y.preventDefault();return}d==null||d(Y)},L=h?Y=>h(Y):void 0,F=Y=>{P.current&&(Y.stopPropagation(),P.current=!1)},R=Y=>{var Q,J;const{domNode:K}=w.getState();if(A.current=K==null?void 0:K.getBoundingClientRect(),!A.current)return;const B=Y.target===T.current;if(!B&&!!Y.target.closest(".nokey")||!e||!(i&&B||t)||Y.button!==0||!Y.isPrimary)return;(J=(Q=Y.target)==null?void 0:Q.setPointerCapture)==null||J.call(Q,Y.pointerId),P.current=!1;const{x:H,y:W}=Da(Y.nativeEvent,A.current);w.setState({userSelectionRect:{width:0,height:0,startX:H,startY:W,x:H,y:W}}),B||(Y.stopPropagation(),Y.preventDefault())},I=Y=>{const{userSelectionRect:K,transform:B,nodeLookup:U,edgeLookup:X,connectionLookup:H,triggerNodeChanges:W,triggerEdgeChanges:Q,defaultEdgeOptions:J,resetSelectedElements:re}=w.getState();if(!A.current||!K)return;const{x:oe,y:Z}=Da(Y.nativeEvent,A.current),{startX:le,startY:ie}=K;if(!P.current){const Te=t?0:a;if(Math.hypot(oe-le,Z-ie)<=Te)return;re(),s==null||s(Y)}P.current=!0;const ee={startX:le,startY:ie,x:oe<le?oe:le,y:Z<ie?Z:ie,width:Math.abs(oe-le),height:Math.abs(Z-ie)},ae=O.current,xe=D.current;O.current=new Set(b2(U,ee,B,n===cf.Partial,!0).map(Te=>Te.id)),D.current=new Set;const ye=(J==null?void 0:J.selectable)??!0;for(const Te of O.current){const Me=H.get(Te);if(Me)for(const{edgeId:he}of Me.values()){const Ie=X.get(he);Ie&&(Ie.selectable??ye)&&D.current.add(he)}}if(!mR(ae,O.current)){const Te=Tu(U,O.current,!0);W(Te)}if(!mR(xe,D.current)){const Te=Tu(X,D.current);Q(Te)}w.setState({userSelectionRect:ee,userSelectionActive:!0,nodesSelectionActive:!1})},q=Y=>{var K,B;Y.button===0&&((B=(K=Y.target)==null?void 0:K.releasePointerCapture)==null||B.call(K,Y.pointerId),!S&&Y.target===T.current&&w.getState().userSelectionRect&&(M==null||M(Y)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(l==null||l(Y),w.setState({nodesSelectionActive:O.current.size>0})))},G=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:Rn(["react-flow__pane",{draggable:G,dragging:k,selection:e}]),onClick:E?void 0:sb(M,T),onContextMenu:sb(z,T),onWheel:sb(L,T),onPointerEnter:E?void 0:m,onPointerMove:E?I:g,onPointerUp:E?q:void 0,onPointerDownCapture:E?R:void 0,onClickCapture:E?F:void 0,onPointerLeave:v,ref:T,style:av,children:[b,f.jsx(spe,{})]})}function PC({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:c}=t.getState(),d=l.get(e);if(!d){c==null||c("012",ci.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&s)&&(i({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):a([e])}function F9({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:s}){const l=dn(),[c,d]=x.useState(!1),h=x.useRef();return x.useEffect(()=>{h.current=Zhe({getStoreItems:()=>l.getState(),onNodeMouseDown:m=>{PC({id:m,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),x.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:a,nodeClickDistance:s}),()=>{var m;(m=h.current)==null||m.destroy()}},[n,r,t,i,e,a,s]),c}const upe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function H9(){const e=dn();return x.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:h}=e.getState(),m=new Map,g=upe(s),v=a?i[0]:5,b=a?i[1]:5,w=n.direction.x*v*n.factor,S=n.direction.y*b*n.factor;for(const[,j]of d){if(!g(j))continue;let k={x:j.internals.positionAbsolute.x+w,y:j.internals.positionAbsolute.y+S};a&&(k=qf(k,i));const{position:_,positionAbsolute:E}=o9({nodeId:j.id,nextPosition:k,nodeLookup:d,nodeExtent:r,nodeOrigin:h,onError:l});j.position=_,j.internals.positionAbsolute=E,m.set(j.id,j)}c(m)},[])}const A2=x.createContext(null),cpe=A2.Provider;A2.Consumer;const U9=()=>x.useContext(A2),dpe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),fpe=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:c,isValid:d}=s,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:h,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:i===Hu.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!a,valid:h&&d}};function hpe({type:e="source",position:t=Qe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:c,className:d,onMouseDown:h,onTouchStart:m,...g},v){var I,q;const b=s||null,w=e==="target",S=dn(),j=U9(),{connectOnClick:k,noPanClassName:_,rfId:E}=Tt(dpe,un),{connectingFrom:T,connectingTo:A,clickConnecting:O,isPossibleEndHandle:D,connectionInProcess:P,clickConnectionInProcess:M,valid:z}=Tt(fpe(j,b,e),un);j||(q=(I=S.getState()).onError)==null||q.call(I,"010",ci.error010());const L=G=>{const{defaultEdgeOptions:Y,onConnect:K,hasDefaultEdges:B}=S.getState(),U={...Y,...G};if(B){const{edges:X,setEdges:H}=S.getState();H(Rhe(U,X))}K==null||K(U),l==null||l(U)},F=G=>{if(!j)return;const Y=p9(G.nativeEvent);if(a&&(Y&&G.button===0||!Y)){const K=S.getState();OC.onPointerDown(G.nativeEvent,{handleDomNode:G.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:w,handleId:b,nodeId:j,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...B)=>{var U,X;return(X=(U=S.getState()).onConnectEnd)==null?void 0:X.call(U,...B)},updateConnection:K.updateConnection,onConnect:L,isValidConnection:n||((...B)=>{var U,X;return((X=(U=S.getState()).isValidConnection)==null?void 0:X.call(U,...B))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}Y?h==null||h(G):m==null||m(G)},R=G=>{const{onClickConnectStart:Y,onClickConnectEnd:K,connectionClickStartHandle:B,connectionMode:U,isValidConnection:X,lib:H,rfId:W,nodeLookup:Q,connection:J}=S.getState();if(!j||!B&&!a)return;if(!B){Y==null||Y(G.nativeEvent,{nodeId:j,handleId:b,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:j,type:e,id:b}});return}const re=h9(G.target),oe=n||X,{connection:Z,isValid:le}=OC.isValid(G.nativeEvent,{handle:{nodeId:j,id:b,type:e},connectionMode:U,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:oe,flowId:W,doc:re,lib:H,nodeLookup:Q});le&&Z&&L(Z);const ie=structuredClone(J);delete ie.inProgress,ie.toPosition=ie.toHandle?ie.toHandle.position:null,K==null||K(G,ie),S.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":b,"data-nodeid":j,"data-handlepos":t,"data-id":`${E}-${j}-${b}-${e}`,className:Rn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,d,{source:!w,target:w,connectable:r,connectablestart:a,connectableend:i,clickconnecting:O,connectingfrom:T,connectingto:A,valid:z,connectionindicator:r&&(!P||D)&&(P||M?i:a)}]),onMouseDown:F,onTouchStart:F,onClick:k?R:void 0,ref:v,...g,children:c})}const Yu=x.memo(q9(hpe));function mpe({data:e,isConnectable:t,sourcePosition:n=Qe.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Yu,{type:"source",position:n,isConnectable:t})]})}function ppe({data:e,isConnectable:t,targetPosition:n=Qe.Top,sourcePosition:r=Qe.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Yu,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(Yu,{type:"source",position:r,isConnectable:t})]})}function gpe(){return null}function vpe({data:e,isConnectable:t,targetPosition:n=Qe.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Yu,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Bp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},UR={input:mpe,default:ppe,output:vpe,group:gpe};function ype(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const xpe=e=>{const{width:t,height:n,x:r,y:a}=$f(e.nodeLookup,{filter:i=>!!i.selected});return{width:Pa(t)?t:null,height:Pa(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function bpe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=dn(),{width:a,height:i,transformString:s,userSelectionActive:l}=Tt(xpe,un),c=H9(),d=x.useRef(null);x.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]);const h=!l&&a!==null&&i!==null;if(F9({nodeRef:d,disabled:!h}),!h)return null;const m=e?v=>{const b=r.getState().nodes.filter(w=>w.selected);e(v,b)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Bp,v.key)&&(v.preventDefault(),c({direction:Bp[v.key],factor:v.shiftKey?4:1}))};return f.jsx("div",{className:Rn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:f.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:a,height:i}})})}const GR=typeof window<"u"?window:void 0,wpe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function G9({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:b,panActivationKeyCode:w,zoomActivationKeyCode:S,elementsSelectable:j,zoomOnScroll:k,zoomOnPinch:_,panOnScroll:E,panOnScrollSpeed:T,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:D,defaultViewport:P,translateExtent:M,minZoom:z,maxZoom:L,preventScrolling:F,onSelectionContextMenu:R,noWheelClassName:I,noPanClassName:q,disableKeyboardA11y:G,onViewportChange:Y,isControlledViewport:K}){const{nodesSelectionActive:B,userSelectionActive:U}=Tt(wpe,un),X=mf(d,{target:GR}),H=mf(w,{target:GR}),W=H||D,Q=H||E,J=h&&W!==!0,re=X||U||J;return tpe({deleteKeyCode:c,multiSelectionKeyCode:b}),f.jsx(ape,{onPaneContextMenu:i,elementsSelectable:j,zoomOnScroll:k,zoomOnPinch:_,panOnScroll:Q,panOnScrollSpeed:T,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:!X&&W,defaultViewport:P,translateExtent:M,minZoom:z,maxZoom:L,zoomActivationKeyCode:S,preventScrolling:F,noWheelClassName:I,noPanClassName:q,onViewportChange:Y,isControlledViewport:K,paneClickDistance:l,selectionOnDrag:J,children:f.jsxs(lpe,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:W,isSelecting:!!re,selectionMode:m,selectionKeyPressed:X,paneClickDistance:l,selectionOnDrag:J,children:[e,B&&f.jsx(bpe,{onSelectionContextMenu:R,noPanClassName:q,disableKeyboardA11y:G})]})})}G9.displayName="FlowRenderer";const Spe=x.memo(G9),jpe=e=>t=>e?b2(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function _pe(e){return Tt(x.useCallback(jpe(e),[e]),un)}const kpe=e=>e.updateNodeInternals;function Cpe(){const e=Tt(kpe),[t]=x.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const i=a.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:a.target,force:!0})}),e(r)}));return x.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Npe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=dn(),i=x.useRef(null),s=x.useRef(null),l=x.useRef(e.sourcePosition),c=x.useRef(e.targetPosition),d=x.useRef(t),h=n&&!!e.internals.handleBounds;return x.useEffect(()=>{i.current&&!e.hidden&&(!h||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[h,e.hidden]),x.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),x.useEffect(()=>{if(i.current){const m=d.current!==t,g=l.current!==e.sourcePosition,v=c.current!==e.targetPosition;(m||g||v)&&(d.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function Epe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:h,resizeObserver:m,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:b,rfId:w,nodeTypes:S,nodeClickDistance:j,onError:k}){const{node:_,internals:E,isParent:T}=Tt(oe=>{const Z=oe.nodeLookup.get(e),le=oe.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:le}},un);let A=_.type||"default",O=(S==null?void 0:S[A])||UR[A];O===void 0&&(k==null||k("003",ci.error003(A)),A="default",O=(S==null?void 0:S.default)||UR.default);const D=!!(_.draggable||l&&typeof _.draggable>"u"),P=!!(_.selectable||c&&typeof _.selectable>"u"),M=!!(_.connectable||d&&typeof _.connectable>"u"),z=!!(_.focusable||h&&typeof _.focusable>"u"),L=dn(),F=d9(_),R=Npe({node:_,nodeType:A,hasDimensions:F,resizeObserver:m}),I=F9({nodeRef:R,disabled:_.hidden||!D,noDragClassName:g,handleSelector:_.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:j}),q=H9();if(_.hidden)return null;const G=ls(_),Y=ype(_),K=P||D||t||n||r||a,B=n?oe=>n(oe,{...E.userNode}):void 0,U=r?oe=>r(oe,{...E.userNode}):void 0,X=a?oe=>a(oe,{...E.userNode}):void 0,H=i?oe=>i(oe,{...E.userNode}):void 0,W=s?oe=>s(oe,{...E.userNode}):void 0,Q=oe=>{const{selectNodesOnDrag:Z,nodeDragThreshold:le}=L.getState();P&&(!Z||!D||le>0)&&PC({id:e,store:L,nodeRef:R}),t&&t(oe,{...E.userNode})},J=oe=>{if(!(m9(oe.nativeEvent)||b)){if(n9.includes(oe.key)&&P){const Z=oe.key==="Escape";PC({id:e,store:L,unselect:Z,nodeRef:R})}else if(D&&_.selected&&Object.prototype.hasOwnProperty.call(Bp,oe.key)){oe.preventDefault();const{ariaLabelConfig:Z}=L.getState();L.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~E.positionAbsolute.x,y:~~E.positionAbsolute.y})}),q({direction:Bp[oe.key],factor:oe.shiftKey?4:1})}}},re=()=>{var xe;if(b||!((xe=R.current)!=null&&xe.matches(":focus-visible")))return;const{transform:oe,width:Z,height:le,autoPanOnNodeFocus:ie,setCenter:ee}=L.getState();if(!ie)return;b2(new Map([[e,_]]),{x:0,y:0,width:Z,height:le},oe,!0).length>0||ee(_.position.x+G.width/2,_.position.y+G.height/2,{zoom:oe[2]})};return f.jsx("div",{className:Rn(["react-flow__node",`react-flow__node-${A}`,{[v]:D},_.className,{selected:_.selected,selectable:P,parent:T,draggable:D,dragging:I}]),ref:R,style:{zIndex:E.z,transform:`translate(${E.positionAbsolute.x}px,${E.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:F?"visible":"hidden",..._.style,...Y},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:B,onMouseMove:U,onMouseLeave:X,onContextMenu:H,onClick:Q,onDoubleClick:W,onKeyDown:z?J:void 0,tabIndex:z?0:void 0,onFocus:z?re:void 0,role:_.ariaRole??(z?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${D9}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:f.jsx(cpe,{value:e,children:f.jsx(O,{id:e,data:_.data,type:A,positionAbsoluteX:E.positionAbsolute.x,positionAbsoluteY:E.positionAbsolute.y,selected:_.selected??!1,selectable:P,draggable:D,deletable:_.deletable??!0,isConnectable:M,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:I,dragHandle:_.dragHandle,zIndex:E.z,parentId:_.parentId,...G})})})}var Ape=x.memo(Epe);const Tpe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function V9(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=Tt(Tpe,un),s=_pe(e.onlyRenderVisibleElements),l=Cpe();return f.jsx("div",{className:"react-flow__nodes",style:av,children:s.map(c=>f.jsx(Ape,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}V9.displayName="NodeRenderer";const Ope=x.memo(V9);function Mpe(e){return Tt(x.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const i=n.nodeLookup.get(a.source),s=n.nodeLookup.get(a.target);i&&s&&Mhe({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),un)}const Ppe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Dpe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},VR={[df.Arrow]:Ppe,[df.ArrowClosed]:Dpe};function Rpe(e){const t=dn();return x.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(VR,e)?VR[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",ci.error009(e)),null)},[e])}const Ipe=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const c=Rpe(t);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:f.jsx(c,{color:n,strokeWidth:s})}):null},K9=({defaultColor:e,rfId:t})=>{const n=Tt(i=>i.edges),r=Tt(i=>i.defaultEdgeOptions),a=x.useMemo(()=>qhe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:a.map(i=>f.jsx(Ipe,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};K9.displayName="MarkerDefinitions";var Lpe=x.memo(K9);function Y9({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:c,className:d,...h}){const[m,g]=x.useState({x:1,y:0,width:0,height:0}),v=Rn(["react-flow__edge-textwrapper",d]),b=x.useRef(null);return x.useEffect(()=>{if(b.current){const w=b.current.getBBox();g({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:v,visibility:m.width?"visible":"hidden",...h,children:[a&&f.jsx("rect",{width:m.width+2*s[0],x:-s[0],y:-s[1],height:m.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),f.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:b,style:r,children:n}),c]}):null}Y9.displayName="EdgeText";const zpe=x.memo(Y9);function iv({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:Rn(["react-flow__edge-path",h.className])}),d?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Pa(t)&&Pa(n)?f.jsx(zpe,{x:t,y:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function KR({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===Qe.Left||e===Qe.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function W9({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:a,targetPosition:i=Qe.Top}){const[s,l]=KR({pos:n,x1:e,y1:t,x2:r,y2:a}),[c,d]=KR({pos:i,x1:r,y1:a,x2:e,y2:t}),[h,m,g,v]=g9({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${s},${l} ${c},${d} ${r},${a}`,h,m,g,v]}function X9(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:j})=>{const[k,_,E]=W9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:l}),T=e.isInternal?void 0:t;return f.jsx(iv,{id:T,path:k,labelX:_,labelY:E,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:j})})}const $pe=X9({isInternal:!1}),Z9=X9({isInternal:!0});$pe.displayName="SimpleBezierEdge";Z9.displayName="SimpleBezierEdgeInternal";function Q9(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,sourcePosition:v=Qe.Bottom,targetPosition:b=Qe.Top,markerEnd:w,markerStart:S,pathOptions:j,interactionWidth:k})=>{const[_,E,T]=EC({sourceX:n,sourceY:r,sourcePosition:v,targetX:a,targetY:i,targetPosition:b,borderRadius:j==null?void 0:j.borderRadius,offset:j==null?void 0:j.offset,stepPosition:j==null?void 0:j.stepPosition}),A=e.isInternal?void 0:t;return f.jsx(iv,{id:A,path:_,labelX:E,labelY:T,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:w,markerStart:S,interactionWidth:k})})}const J9=Q9({isInternal:!1}),eU=Q9({isInternal:!0});J9.displayName="SmoothStepEdge";eU.displayName="SmoothStepEdgeInternal";function tU(e){return x.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return f.jsx(J9,{...n,id:r,pathOptions:x.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const qpe=tU({isInternal:!1}),nU=tU({isInternal:!0});qpe.displayName="StepEdge";nU.displayName="StepEdgeInternal";function rU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:w})=>{const[S,j,k]=x9({sourceX:n,sourceY:r,targetX:a,targetY:i}),_=e.isInternal?void 0:t;return f.jsx(iv,{id:_,path:S,labelX:j,labelY:k,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:b,interactionWidth:w})})}const Bpe=rU({isInternal:!1}),aU=rU({isInternal:!0});Bpe.displayName="StraightEdge";aU.displayName="StraightEdgeInternal";function iU(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s=Qe.Bottom,targetPosition:l=Qe.Top,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,pathOptions:j,interactionWidth:k})=>{const[_,E,T]=v9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:l,curvature:j==null?void 0:j.curvature}),A=e.isInternal?void 0:t;return f.jsx(iv,{id:A,path:_,labelX:E,labelY:T,label:c,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:k})})}const Fpe=iU({isInternal:!1}),sU=iU({isInternal:!0});Fpe.displayName="BezierEdge";sU.displayName="BezierEdgeInternal";const YR={default:sU,straight:aU,step:nU,smoothstep:eU,simplebezier:Z9},WR={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Hpe=(e,t,n)=>n===Qe.Left?e-t:n===Qe.Right?e+t:e,Upe=(e,t,n)=>n===Qe.Top?e-t:n===Qe.Bottom?e+t:e,XR="react-flow__edgeupdater";function ZR({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:l}){return f.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:Rn([XR,`${XR}-${l}`]),cx:Hpe(t,r,e),cy:Upe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Gpe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:s,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:h,onReconnectEnd:m,setReconnecting:g,setUpdateHover:v}){const b=dn(),w=(E,T)=>{if(E.button!==0)return;const{autoPanOnConnect:A,domNode:O,connectionMode:D,connectionRadius:P,lib:M,onConnectStart:z,cancelConnection:L,nodeLookup:F,rfId:R,panBy:I,updateConnection:q}=b.getState(),G=T.type==="target",Y=(U,X)=>{g(!1),m==null||m(U,n,T.type,X)},K=U=>d==null?void 0:d(n,U),B=(U,X)=>{g(!0),h==null||h(E,n,T.type),z==null||z(U,X)};OC.onPointerDown(E.nativeEvent,{autoPanOnConnect:A,connectionMode:D,connectionRadius:P,domNode:O,handleId:T.id,nodeId:T.nodeId,nodeLookup:F,isTarget:G,edgeUpdaterType:T.type,lib:M,flowId:R,cancelConnection:L,panBy:I,isValidConnection:(...U)=>{var X,H;return((H=(X=b.getState()).isValidConnection)==null?void 0:H.call(X,...U))??!0},onConnect:K,onConnectStart:B,onConnectEnd:(...U)=>{var X,H;return(H=(X=b.getState()).onConnectEnd)==null?void 0:H.call(X,...U)},onReconnectEnd:Y,updateConnection:q,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:E.currentTarget})},S=E=>w(E,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),j=E=>w(E,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),k=()=>v(!0),_=()=>v(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(ZR,{position:l,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:k,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&f.jsx(ZR,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:j,onMouseEnter:k,onMouseOut:_,type:"target"})]})}function Vpe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:h,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,rfId:b,edgeTypes:w,noPanClassName:S,onError:j,disableKeyboardA11y:k}){let _=Tt(ee=>ee.edgeLookup.get(e));const E=Tt(ee=>ee.defaultEdgeOptions);_=E?{...E,..._}:_;let T=_.type||"default",A=(w==null?void 0:w[T])||YR[T];A===void 0&&(j==null||j("011",ci.error011(T)),T="default",A=(w==null?void 0:w.default)||YR.default);const O=!!(_.focusable||t&&typeof _.focusable>"u"),D=typeof m<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),P=!!(_.selectable||r&&typeof _.selectable>"u"),M=x.useRef(null),[z,L]=x.useState(!1),[F,R]=x.useState(!1),I=dn(),{zIndex:q,sourceX:G,sourceY:Y,targetX:K,targetY:B,sourcePosition:U,targetPosition:X}=Tt(x.useCallback(ee=>{const ae=ee.nodeLookup.get(_.source),xe=ee.nodeLookup.get(_.target);if(!ae||!xe)return{zIndex:_.zIndex,...WR};const ye=$he({id:e,sourceNode:ae,targetNode:xe,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:ee.connectionMode,onError:j});return{zIndex:Ohe({selected:_.selected,zIndex:_.zIndex,sourceNode:ae,targetNode:xe,elevateOnSelect:ee.elevateEdgesOnSelect,zIndexMode:ee.zIndexMode}),...ye||WR}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),un),H=x.useMemo(()=>_.markerStart?`url('#${AC(_.markerStart,b)}')`:void 0,[_.markerStart,b]),W=x.useMemo(()=>_.markerEnd?`url('#${AC(_.markerEnd,b)}')`:void 0,[_.markerEnd,b]);if(_.hidden||G===null||Y===null||K===null||B===null)return null;const Q=ee=>{var Te;const{addSelectedEdges:ae,unselectNodesAndEdges:xe,multiSelectionActive:ye}=I.getState();P&&(I.setState({nodesSelectionActive:!1}),_.selected&&ye?(xe({nodes:[],edges:[_]}),(Te=M.current)==null||Te.blur()):ae([e])),a&&a(ee,_)},J=i?ee=>{i(ee,{..._})}:void 0,re=s?ee=>{s(ee,{..._})}:void 0,oe=l?ee=>{l(ee,{..._})}:void 0,Z=c?ee=>{c(ee,{..._})}:void 0,le=d?ee=>{d(ee,{..._})}:void 0,ie=ee=>{var ae;if(!k&&n9.includes(ee.key)&&P){const{unselectNodesAndEdges:xe,addSelectedEdges:ye}=I.getState();ee.key==="Escape"?((ae=M.current)==null||ae.blur(),xe({edges:[_]})):ye([e])}};return f.jsx("svg",{style:{zIndex:q},children:f.jsxs("g",{className:Rn(["react-flow__edge",`react-flow__edge-${T}`,_.className,S,{selected:_.selected,animated:_.animated,inactive:!P&&!a,updating:z,selectable:P}]),onClick:Q,onDoubleClick:J,onContextMenu:re,onMouseEnter:oe,onMouseMove:Z,onMouseLeave:le,onKeyDown:O?ie:void 0,tabIndex:O?0:void 0,role:_.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":O?`${R9}-${b}`:void 0,ref:M,..._.domAttributes,children:[!F&&f.jsx(A,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:P,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:G,sourceY:Y,targetX:K,targetY:B,sourcePosition:U,targetPosition:X,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:H,markerEnd:W,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),D&&f.jsx(Gpe,{edge:_,isReconnectable:D,reconnectRadius:h,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,sourceX:G,sourceY:Y,targetX:K,targetY:B,sourcePosition:U,targetPosition:X,setUpdateHover:L,setReconnecting:R})]})})}var Kpe=x.memo(Vpe);const Ype=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function oU({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:h,reconnectRadius:m,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,disableKeyboardA11y:w}){const{edgesFocusable:S,edgesReconnectable:j,elementsSelectable:k,onError:_}=Tt(Ype,un),E=Mpe(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(Lpe,{defaultColor:e,rfId:n}),E.map(T=>f.jsx(Kpe,{id:T,edgesFocusable:S,edgesReconnectable:j,elementsSelectable:k,noPanClassName:a,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:h,reconnectRadius:m,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},T))]})}oU.displayName="EdgeRenderer";const Wpe=x.memo(oU),Xpe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Zpe({children:e}){const t=Tt(Xpe);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Qpe(e){const t=E2(),n=x.useRef(!1);x.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Jpe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function ege(e){const t=Tt(Jpe),n=dn();return x.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function tge(e){return e.connection.inProgress?{...e.connection,to:Bf(e.connection.to,e.transform)}:{...e.connection}}function nge(e){return tge}function rge(e){const t=nge();return Tt(t,un)}const age=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function ige({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:s,isValid:l,inProgress:c}=Tt(age,un);return!(i&&a&&c)?null:f.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Rn(["react-flow__connection",i9(l)]),children:f.jsx(lU,{style:t,type:n,CustomComponent:r,isValid:l})})})}const lU=({style:e,type:t=Zs.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:s,fromHandle:l,fromPosition:c,to:d,toNode:h,toHandle:m,toPosition:g,pointer:v}=rge();if(!a)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:g,connectionStatus:i9(r),toNode:h,toHandle:m,pointer:v});let b="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case Zs.Bezier:[b]=v9(w);break;case Zs.SimpleBezier:[b]=W9(w);break;case Zs.Step:[b]=EC({...w,borderRadius:0});break;case Zs.SmoothStep:[b]=EC(w);break;default:[b]=x9(w)}return f.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};lU.displayName="ConnectionLine";const sge={};function QR(e=sge){x.useRef(e),dn(),x.useEffect(()=>{},[e])}function oge(){dn(),x.useRef(!1),x.useEffect(()=>{},[])}function uU({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:v,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:j,selectionKeyCode:k,selectionOnDrag:_,selectionMode:E,multiSelectionKeyCode:T,panActivationKeyCode:A,zoomActivationKeyCode:O,deleteKeyCode:D,onlyRenderVisibleElements:P,elementsSelectable:M,defaultViewport:z,translateExtent:L,minZoom:F,maxZoom:R,preventScrolling:I,defaultMarkerColor:q,zoomOnScroll:G,zoomOnPinch:Y,panOnScroll:K,panOnScrollSpeed:B,panOnScrollMode:U,zoomOnDoubleClick:X,panOnDrag:H,onPaneClick:W,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneScroll:oe,onPaneContextMenu:Z,paneClickDistance:le,nodeClickDistance:ie,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:xe,onEdgeMouseLeave:ye,reconnectRadius:Te,onReconnect:Me,onReconnectStart:he,onReconnectEnd:Ie,noDragClassName:Je,noWheelClassName:We,noPanClassName:it,disableKeyboardA11y:Ce,nodeExtent:He,rfId:ge,viewport:ue,onViewportChange:_e}){return QR(e),QR(t),oge(),Qpe(n),ege(ue),f.jsx(Spe,{onPaneClick:W,onPaneMouseEnter:Q,onPaneMouseMove:J,onPaneMouseLeave:re,onPaneContextMenu:Z,onPaneScroll:oe,paneClickDistance:le,deleteKeyCode:D,selectionKeyCode:k,selectionOnDrag:_,selectionMode:E,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:T,panActivationKeyCode:A,zoomActivationKeyCode:O,elementsSelectable:M,zoomOnScroll:G,zoomOnPinch:Y,zoomOnDoubleClick:X,panOnScroll:K,panOnScrollSpeed:B,panOnScrollMode:U,panOnDrag:H,defaultViewport:z,translateExtent:L,minZoom:F,maxZoom:R,onSelectionContextMenu:m,preventScrolling:I,noDragClassName:Je,noWheelClassName:We,noPanClassName:it,disableKeyboardA11y:Ce,onViewportChange:_e,isControlledViewport:!!ue,children:f.jsxs(Zpe,{children:[f.jsx(Wpe,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:s,onReconnect:Me,onReconnectStart:he,onReconnectEnd:Ie,onlyRenderVisibleElements:P,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:xe,onEdgeMouseLeave:ye,reconnectRadius:Te,defaultMarkerColor:q,noPanClassName:it,disableKeyboardA11y:Ce,rfId:ge}),f.jsx(ige,{style:w,type:b,component:S,containerStyle:j}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(Ope,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:h,nodeClickDistance:ie,onlyRenderVisibleElements:P,noPanClassName:it,noDragClassName:Je,disableKeyboardA11y:Ce,nodeExtent:He,rfId:ge}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}uU.displayName="GraphView";const lge=x.memo(uU),JR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:h,nodeExtent:m,zIndexMode:g="basic"}={})=>{const v=new Map,b=new Map,w=new Map,S=new Map,j=r??t??[],k=n??e??[],_=h??[0,0],E=m??uf;S9(w,S,j);const{nodesInitialized:T}=TC(k,v,b,{nodeOrigin:_,nodeExtent:E,zIndexMode:g});let A=[0,0,1];if(s&&a&&i){const O=$f(v,{filter:z=>!!((z.width||z.initialWidth)&&(z.height||z.initialHeight))}),{x:D,y:P,zoom:M}=w2(O,a,i,c,d,(l==null?void 0:l.padding)??.1);A=[D,P,M]}return{rfId:"1",width:a??0,height:i??0,transform:A,nodes:k,nodesInitialized:T,nodeLookup:v,parentLookup:b,edges:j,edgeLookup:S,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:uf,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Hu.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...a9},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:khe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:r9,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},uge=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g})=>Eme((v,b)=>{async function w(){const{nodeLookup:S,panZoom:j,fitViewOptions:k,fitViewResolver:_,width:E,height:T,minZoom:A,maxZoom:O}=b();j&&(await jhe({nodes:S,width:E,height:T,panZoom:j,minZoom:A,maxZoom:O},k),_==null||_.resolve(!0),v({fitViewResolver:null}))}return{...JR({nodes:e,edges:t,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:h,nodeExtent:m,defaultNodes:n,defaultEdges:r,zIndexMode:g}),setNodes:S=>{const{nodeLookup:j,parentLookup:k,nodeOrigin:_,elevateNodesOnSelect:E,fitViewQueued:T,zIndexMode:A,nodesSelectionActive:O}=b(),{nodesInitialized:D,hasSelectedNodes:P}=TC(S,j,k,{nodeOrigin:_,nodeExtent:m,elevateNodesOnSelect:E,checkEquality:!0,zIndexMode:A}),M=O&&P;T&&D?(w(),v({nodes:S,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:M})):v({nodes:S,nodesInitialized:D,nodesSelectionActive:M})},setEdges:S=>{const{connectionLookup:j,edgeLookup:k}=b();S9(j,k,S),v({edges:S})},setDefaultNodesAndEdges:(S,j)=>{if(S){const{setNodes:k}=b();k(S),v({hasDefaultNodes:!0})}if(j){const{setEdges:k}=b();k(j),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:j,nodeLookup:k,parentLookup:_,domNode:E,nodeOrigin:T,nodeExtent:A,debug:O,fitViewQueued:D,zIndexMode:P}=b(),{changes:M,updatedInternals:z}=Khe(S,k,_,E,T,A,P);z&&(Hhe(k,_,{nodeOrigin:T,nodeExtent:A,zIndexMode:P}),D?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(M==null?void 0:M.length)>0&&(O&&console.log("React Flow: trigger node changes",M),j==null||j(M)))},updateNodePositions:(S,j=!1)=>{const k=[];let _=[];const{nodeLookup:E,triggerNodeChanges:T,connection:A,updateConnection:O,onNodesChangeMiddlewareMap:D}=b();for(const[P,M]of S){const z=E.get(P),L=!!(z!=null&&z.expandParent&&(z!=null&&z.parentId)&&(M!=null&&M.position)),F={id:P,type:"position",position:L?{x:Math.max(0,M.position.x),y:Math.max(0,M.position.y)}:M.position,dragging:j};if(z&&A.inProgress&&A.fromNode.id===z.id){const R=sl(z,A.fromHandle,Qe.Left,!0);O({...A,from:R})}L&&z.parentId&&k.push({id:P,parentId:z.parentId,rect:{...M.internals.positionAbsolute,width:M.measured.width??0,height:M.measured.height??0}}),_.push(F)}if(k.length>0){const{parentLookup:P,nodeOrigin:M}=b(),z=N2(k,E,P,M);_.push(...z)}for(const P of D.values())_=P(_);T(_)},triggerNodeChanges:S=>{const{onNodesChange:j,setNodes:k,nodes:_,hasDefaultNodes:E,debug:T}=b();if(S!=null&&S.length){if(E){const A=z9(S,_);k(A)}T&&console.log("React Flow: trigger node changes",S),j==null||j(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:j,setEdges:k,edges:_,hasDefaultEdges:E,debug:T}=b();if(S!=null&&S.length){if(E){const A=$9(S,_);k(A)}T&&console.log("React Flow: trigger edge changes",S),j==null||j(S)}},addSelectedNodes:S=>{const{multiSelectionActive:j,edgeLookup:k,nodeLookup:_,triggerNodeChanges:E,triggerEdgeChanges:T}=b();if(j){const A=S.map(O=>Uo(O,!0));E(A);return}E(Tu(_,new Set([...S]),!0)),T(Tu(k))},addSelectedEdges:S=>{const{multiSelectionActive:j,edgeLookup:k,nodeLookup:_,triggerNodeChanges:E,triggerEdgeChanges:T}=b();if(j){const A=S.map(O=>Uo(O,!0));T(A);return}T(Tu(k,new Set([...S]))),E(Tu(_,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:j}={})=>{const{edges:k,nodes:_,nodeLookup:E,triggerNodeChanges:T,triggerEdgeChanges:A}=b(),O=S||_,D=j||k,P=[];for(const z of O){if(!z.selected)continue;const L=E.get(z.id);L&&(L.selected=!1),P.push(Uo(z.id,!1))}const M=[];for(const z of D)z.selected&&M.push(Uo(z.id,!1));T(P),A(M)},setMinZoom:S=>{const{panZoom:j,maxZoom:k}=b();j==null||j.setScaleExtent([S,k]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:j,minZoom:k}=b();j==null||j.setScaleExtent([k,S]),v({maxZoom:S})},setTranslateExtent:S=>{var j;(j=b().panZoom)==null||j.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:j,triggerNodeChanges:k,triggerEdgeChanges:_,elementsSelectable:E}=b();if(!E)return;const T=j.reduce((O,D)=>D.selected?[...O,Uo(D.id,!1)]:O,[]),A=S.reduce((O,D)=>D.selected?[...O,Uo(D.id,!1)]:O,[]);k(T),_(A)},setNodeExtent:S=>{const{nodes:j,nodeLookup:k,parentLookup:_,nodeOrigin:E,elevateNodesOnSelect:T,nodeExtent:A,zIndexMode:O}=b();S[0][0]===A[0][0]&&S[0][1]===A[0][1]&&S[1][0]===A[1][0]&&S[1][1]===A[1][1]||(TC(j,k,_,{nodeOrigin:E,nodeExtent:S,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:O}),v({nodeExtent:S}))},panBy:S=>{const{transform:j,width:k,height:_,panZoom:E,translateExtent:T}=b();return Yhe({delta:S,panZoom:E,transform:j,translateExtent:T,width:k,height:_})},setCenter:async(S,j,k)=>{const{width:_,height:E,maxZoom:T,panZoom:A}=b();if(!A)return Promise.resolve(!1);const O=typeof(k==null?void 0:k.zoom)<"u"?k.zoom:T;return await A.setViewport({x:_/2-S*O,y:E/2-j*O,zoom:O},{duration:k==null?void 0:k.duration,ease:k==null?void 0:k.ease,interpolate:k==null?void 0:k.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...a9}})},updateConnection:S=>{v({connection:S})},reset:()=>v({...JR()})}},Object.is);function cge({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:v}){const[b]=x.useState(()=>uge({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:d,minZoom:s,maxZoom:l,fitViewOptions:c,nodeOrigin:h,nodeExtent:m,zIndexMode:g}));return f.jsx(Ame,{value:b,children:f.jsx(Zme,{children:v})})}function dge({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:s,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:h,nodeOrigin:m,nodeExtent:g,zIndexMode:v}){return x.useContext(nv)?f.jsx(f.Fragment,{children:e}):f.jsx(cge,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:h,nodeOrigin:m,nodeExtent:g,zIndexMode:v,children:e})}const fge={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function hge({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:h,onMoveStart:m,onMoveEnd:g,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:j,onNodeMouseEnter:k,onNodeMouseMove:_,onNodeMouseLeave:E,onNodeContextMenu:T,onNodeDoubleClick:A,onNodeDragStart:O,onNodeDrag:D,onNodeDragStop:P,onNodesDelete:M,onEdgesDelete:z,onDelete:L,onSelectionChange:F,onSelectionDragStart:R,onSelectionDrag:I,onSelectionDragStop:q,onSelectionContextMenu:G,onSelectionStart:Y,onSelectionEnd:K,onBeforeDelete:B,connectionMode:U,connectionLineType:X=Zs.Bezier,connectionLineStyle:H,connectionLineComponent:W,connectionLineContainerStyle:Q,deleteKeyCode:J="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:oe=!1,selectionMode:Z=cf.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ie=hf()?"Meta":"Control",zoomActivationKeyCode:ee=hf()?"Meta":"Control",snapToGrid:ae,snapGrid:xe,onlyRenderVisibleElements:ye=!1,selectNodesOnDrag:Te,nodesDraggable:Me,autoPanOnNodeFocus:he,nodesConnectable:Ie,nodesFocusable:Je,nodeOrigin:We=I9,edgesFocusable:it,edgesReconnectable:Ce,elementsSelectable:He=!0,defaultViewport:ge=Fme,minZoom:ue=.5,maxZoom:_e=2,translateExtent:fe=uf,preventScrolling:Oe=!0,nodeExtent:ze,defaultMarkerColor:ut="#b1b1b7",zoomOnScroll:gt=!0,zoomOnPinch:_t=!0,panOnScroll:ct=!1,panOnScrollSpeed:Ae=.5,panOnScrollMode:$e=Jo.Free,zoomOnDoubleClick:Xe=!0,panOnDrag:pt=!0,onPaneClick:at,onPaneMouseEnter:Et,onPaneMouseMove:Ze,onPaneMouseLeave:Ot,onPaneScroll:zt,onPaneContextMenu:hn,paneClickDistance:ne=1,nodeClickDistance:be=0,children:Se,onReconnect:Pe,onReconnectStart:Le,onReconnectEnd:ot,onEdgeContextMenu:Vt,onEdgeDoubleClick:ir,onEdgeMouseEnter:Re,onEdgeMouseMove:Cn,onEdgeMouseLeave:Dr,reconnectRadius:Ml=10,onNodesChange:Pl,onEdgesChange:Rr,noDragClassName:jn="nodrag",noWheelClassName:Gn="nowheel",noPanClassName:Sa="nopan",fitView:ys,fitViewOptions:wi,connectOnClick:jc,attributionPosition:mo,proOptions:Si,defaultEdgeOptions:po,elevateNodesOnSelect:Ua=!0,elevateEdgesOnSelect:Ga=!1,disableKeyboardA11y:Va=!1,autoPanOnConnect:Ka,autoPanOnNodeDrag:gn,autoPanSpeed:go,connectionRadius:ja,isValidConnection:Vn,onError:wr,style:_c,id:vo,nodeDragThreshold:Dl,connectionDragThreshold:kc,viewport:xs,onViewportChange:bs,width:Ir,height:sr,colorMode:yo="light",debug:Rl,onScroll:we,ariaLabelConfig:dt,zIndexMode:wt="basic",...vn},vt){const _a=vo||"1",Il=Vme(yo),xo=x.useCallback(ta=>{ta.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),we==null||we(ta)},[we]);return f.jsx("div",{"data-testid":"rf__wrapper",...vn,onScroll:xo,style:{..._c,...fge},ref:vt,className:Rn(["react-flow",a,Il]),id:vo,role:"application",children:f.jsxs(dge,{nodes:e,edges:t,width:Ir,height:sr,fitView:ys,fitViewOptions:wi,minZoom:ue,maxZoom:_e,nodeOrigin:We,nodeExtent:ze,zIndexMode:wt,children:[f.jsx(Gme,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:j,nodesDraggable:Me,autoPanOnNodeFocus:he,nodesConnectable:Ie,nodesFocusable:Je,edgesFocusable:it,edgesReconnectable:Ce,elementsSelectable:He,elevateNodesOnSelect:Ua,elevateEdgesOnSelect:Ga,minZoom:ue,maxZoom:_e,nodeExtent:ze,onNodesChange:Pl,onEdgesChange:Rr,snapToGrid:ae,snapGrid:xe,connectionMode:U,translateExtent:fe,connectOnClick:jc,defaultEdgeOptions:po,fitView:ys,fitViewOptions:wi,onNodesDelete:M,onEdgesDelete:z,onDelete:L,onNodeDragStart:O,onNodeDrag:D,onNodeDragStop:P,onSelectionDrag:I,onSelectionDragStart:R,onSelectionDragStop:q,onMove:h,onMoveStart:m,onMoveEnd:g,noPanClassName:Sa,nodeOrigin:We,rfId:_a,autoPanOnConnect:Ka,autoPanOnNodeDrag:gn,autoPanSpeed:go,onError:wr,connectionRadius:ja,isValidConnection:Vn,selectNodesOnDrag:Te,nodeDragThreshold:Dl,connectionDragThreshold:kc,onBeforeDelete:B,debug:Rl,ariaLabelConfig:dt,zIndexMode:wt}),f.jsx(lge,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:k,onNodeMouseMove:_,onNodeMouseLeave:E,onNodeContextMenu:T,onNodeDoubleClick:A,nodeTypes:i,edgeTypes:s,connectionLineType:X,connectionLineStyle:H,connectionLineComponent:W,connectionLineContainerStyle:Q,selectionKeyCode:re,selectionOnDrag:oe,selectionMode:Z,deleteKeyCode:J,multiSelectionKeyCode:ie,panActivationKeyCode:le,zoomActivationKeyCode:ee,onlyRenderVisibleElements:ye,defaultViewport:ge,translateExtent:fe,minZoom:ue,maxZoom:_e,preventScrolling:Oe,zoomOnScroll:gt,zoomOnPinch:_t,zoomOnDoubleClick:Xe,panOnScroll:ct,panOnScrollSpeed:Ae,panOnScrollMode:$e,panOnDrag:pt,onPaneClick:at,onPaneMouseEnter:Et,onPaneMouseMove:Ze,onPaneMouseLeave:Ot,onPaneScroll:zt,onPaneContextMenu:hn,paneClickDistance:ne,nodeClickDistance:be,onSelectionContextMenu:G,onSelectionStart:Y,onSelectionEnd:K,onReconnect:Pe,onReconnectStart:Le,onReconnectEnd:ot,onEdgeContextMenu:Vt,onEdgeDoubleClick:ir,onEdgeMouseEnter:Re,onEdgeMouseMove:Cn,onEdgeMouseLeave:Dr,reconnectRadius:Ml,defaultMarkerColor:ut,noDragClassName:jn,noWheelClassName:Gn,noPanClassName:Sa,rfId:_a,disableKeyboardA11y:Va,nodeExtent:ze,viewport:xs,onViewportChange:bs}),f.jsx(Bme,{onSelectionChange:F}),Se,f.jsx(Ime,{proOptions:Si,position:mo}),f.jsx(Rme,{rfId:_a,disableKeyboardA11y:Va})]})})}var mge=q9(hge);function pge(e){const[t,n]=x.useState(e),r=x.useCallback(a=>n(i=>z9(a,i)),[]);return[t,n,r]}function gge(e){const[t,n]=x.useState(e),r=x.useCallback(a=>n(i=>$9(a,i)),[]);return[t,n,r]}function vge({dimensions:e,lineWidth:t,variant:n,className:r}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Rn(["react-flow__background-pattern",n,r])})}function yge({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Rn(["react-flow__background-pattern","dots",t])})}var Xi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Xi||(Xi={}));const xge={[Xi.Dots]:1,[Xi.Lines]:1,[Xi.Cross]:6},bge=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function cU({id:e,variant:t=Xi.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:s,bgColor:l,style:c,className:d,patternClassName:h}){const m=x.useRef(null),{transform:g,patternId:v}=Tt(bge,un),b=r||xge[t],w=t===Xi.Dots,S=t===Xi.Cross,j=Array.isArray(n)?n:[n,n],k=[j[0]*g[2]||1,j[1]*g[2]||1],_=b*g[2],E=Array.isArray(i)?i:[i,i],T=S?[_,_]:k,A=[E[0]*g[2]||1+T[0]/2,E[1]*g[2]||1+T[1]/2],O=`${v}${e||""}`;return f.jsxs("svg",{className:Rn(["react-flow__background",d]),style:{...c,...av,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:m,"data-testid":"rf__background",children:[f.jsx("pattern",{id:O,x:g[0]%k[0],y:g[1]%k[1],width:k[0],height:k[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:w?f.jsx(yge,{radius:_/2,className:h}):f.jsx(vge,{dimensions:T,lineWidth:a,variant:t,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}cU.displayName="Background";const wge=x.memo(cU);function Sge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function jge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function _ge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function kge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Cge(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Um({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:Rn(["react-flow__controls-button",t]),...n,children:e})}const Nge=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function dU({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:c,className:d,children:h,position:m="bottom-left",orientation:g="vertical","aria-label":v}){const b=dn(),{isInteractive:w,minZoomReached:S,maxZoomReached:j,ariaLabelConfig:k}=Tt(Nge,un),{zoomIn:_,zoomOut:E,fitView:T}=E2(),A=()=>{_(),i==null||i()},O=()=>{E(),s==null||s()},D=()=>{T(a),l==null||l()},P=()=>{b.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},M=g==="horizontal"?"horizontal":"vertical";return f.jsxs(rv,{className:Rn(["react-flow__controls",M,d]),position:m,style:e,"data-testid":"rf__controls","aria-label":v??k["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Um,{onClick:A,className:"react-flow__controls-zoomin",title:k["controls.zoomIn.ariaLabel"],"aria-label":k["controls.zoomIn.ariaLabel"],disabled:j,children:f.jsx(Sge,{})}),f.jsx(Um,{onClick:O,className:"react-flow__controls-zoomout",title:k["controls.zoomOut.ariaLabel"],"aria-label":k["controls.zoomOut.ariaLabel"],disabled:S,children:f.jsx(jge,{})})]}),n&&f.jsx(Um,{className:"react-flow__controls-fitview",onClick:D,title:k["controls.fitView.ariaLabel"],"aria-label":k["controls.fitView.ariaLabel"],children:f.jsx(_ge,{})}),r&&f.jsx(Um,{className:"react-flow__controls-interactive",onClick:P,title:k["controls.interactive.ariaLabel"],"aria-label":k["controls.interactive.ariaLabel"],children:w?f.jsx(Cge,{}):f.jsx(kge,{})}),h]})}dU.displayName="Controls";const Ege=x.memo(dU);function Age({id:e,x:t,y:n,width:r,height:a,style:i,color:s,strokeColor:l,strokeWidth:c,className:d,borderRadius:h,shapeRendering:m,selected:g,onClick:v}){const{background:b,backgroundColor:w}=i||{},S=s||b||w;return f.jsx("rect",{className:Rn(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:h,ry:h,width:r,height:a,style:{fill:S,stroke:l,strokeWidth:c},shapeRendering:m,onClick:v?j=>v(j,e):void 0})}const Tge=x.memo(Age),Oge=e=>e.nodes.map(t=>t.id),ob=e=>e instanceof Function?e:()=>e;function Mge({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=Tge,onClick:s}){const l=Tt(Oge,un),c=ob(t),d=ob(e),h=ob(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:l.map(g=>f.jsx(Dge,{id:g,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:s,shapeRendering:m},g))})}function Pge({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:c}){const{node:d,x:h,y:m,width:g,height:v}=Tt(b=>{const w=b.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const S=w.internals.userNode,{x:j,y:k}=w.internals.positionAbsolute,{width:_,height:E}=ls(S);return{node:S,x:j,y:k,width:_,height:E}},un);return!d||d.hidden||!d9(d)?null:f.jsx(l,{x:h,y:m,width:g,height:v,style:d.style,selected:!!d.selected,className:r(d),color:t(d),borderRadius:a,strokeColor:n(d),strokeWidth:i,shapeRendering:s,onClick:c,id:d.id})}const Dge=x.memo(Pge);var Rge=x.memo(Mge);const Ige=200,Lge=150,zge=e=>!e.hidden,$ge=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?c9($f(e.nodeLookup,{filter:zge}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},qge="react-flow__minimap-desc";function fU({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:h,maskStrokeWidth:m,position:g="bottom-right",onClick:v,onNodeClick:b,pannable:w=!1,zoomable:S=!1,ariaLabel:j,inversePan:k,zoomStep:_=1,offsetScale:E=5}){const T=dn(),A=x.useRef(null),{boundingRect:O,viewBB:D,rfId:P,panZoom:M,translateExtent:z,flowWidth:L,flowHeight:F,ariaLabelConfig:R}=Tt($ge,un),I=(e==null?void 0:e.width)??Ige,q=(e==null?void 0:e.height)??Lge,G=O.width/I,Y=O.height/q,K=Math.max(G,Y),B=K*I,U=K*q,X=E*K,H=O.x-(B-O.width)/2-X,W=O.y-(U-O.height)/2-X,Q=B+X*2,J=U+X*2,re=`${qge}-${P}`,oe=x.useRef(0),Z=x.useRef();oe.current=K,x.useEffect(()=>{if(A.current&&M)return Z.current=rme({domNode:A.current,panZoom:M,getTransform:()=>T.getState().transform,getViewScale:()=>oe.current}),()=>{var ae;(ae=Z.current)==null||ae.destroy()}},[M]),x.useEffect(()=>{var ae;(ae=Z.current)==null||ae.update({translateExtent:z,width:L,height:F,inversePan:k,pannable:w,zoomStep:_,zoomable:S})},[w,S,k,_,z,L,F]);const le=v?ae=>{var Te;const[xe,ye]=((Te=Z.current)==null?void 0:Te.pointer(ae))||[0,0];v(ae,{x:xe,y:ye})}:void 0,ie=b?x.useCallback((ae,xe)=>{const ye=T.getState().nodeLookup.get(xe).internals.userNode;b(ae,ye)},[]):void 0,ee=j??R["minimap.ariaLabel"];return f.jsx(rv,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Rn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:I,height:q,viewBox:`${H} ${W} ${Q} ${J}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:A,onClick:le,children:[ee&&f.jsx("title",{id:re,children:ee}),f.jsx(Rge,{onClick:ie,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:l}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${H-X},${W-X}h${Q+X*2}v${J+X*2}h${-Q-X*2}z
482
+ M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}fU.displayName="MiniMap";const Bge=x.memo(fU),Fge=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Hge={[Ku.Line]:"right",[Ku.Handle]:"bottom-right"};function Uge({nodeId:e,position:t,variant:n=Ku.Handle,className:r,style:a=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:g,autoScale:v=!0,shouldResize:b,onResizeStart:w,onResize:S,onResizeEnd:j}){const k=U9(),_=typeof e=="string"?e:k,E=dn(),T=x.useRef(null),A=n===Ku.Handle,O=Tt(x.useCallback(Fge(A&&v),[A,v]),un),D=x.useRef(null),P=t??Hge[n];x.useEffect(()=>{if(!(!T.current||!_))return D.current||(D.current=vme({domNode:T.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:z,transform:L,snapGrid:F,snapToGrid:R,nodeOrigin:I,domNode:q}=E.getState();return{nodeLookup:z,transform:L,snapGrid:F,snapToGrid:R,nodeOrigin:I,paneDomNode:q}},onChange:(z,L)=>{const{triggerNodeChanges:F,nodeLookup:R,parentLookup:I,nodeOrigin:q}=E.getState(),G=[],Y={x:z.x,y:z.y},K=R.get(_);if(K&&K.expandParent&&K.parentId){const B=K.origin??q,U=z.width??K.measured.width??0,X=z.height??K.measured.height??0,H={id:K.id,parentId:K.parentId,rect:{width:U,height:X,...f9({x:z.x??K.position.x,y:z.y??K.position.y},{width:U,height:X},K.parentId,R,B)}},W=N2([H],R,I,q);G.push(...W),Y.x=z.x?Math.max(B[0]*U,z.x):void 0,Y.y=z.y?Math.max(B[1]*X,z.y):void 0}if(Y.x!==void 0&&Y.y!==void 0){const B={id:_,type:"position",position:{...Y}};G.push(B)}if(z.width!==void 0&&z.height!==void 0){const U={id:_,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:z.width,height:z.height}};G.push(U)}for(const B of L){const U={...B,type:"position"};G.push(U)}F(G)},onEnd:({width:z,height:L})=>{const F={id:_,type:"dimensions",resizing:!1,dimensions:{width:z,height:L}};E.getState().triggerNodeChanges([F])}})),D.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:h},keepAspectRatio:m,resizeDirection:g,onResizeStart:w,onResize:S,onResizeEnd:j,shouldResize:b}),()=>{var z;(z=D.current)==null||z.destroy()}},[P,l,c,d,h,m,w,S,j,b]);const M=P.split("-");return f.jsx("div",{className:Rn(["react-flow__resize-control","nodrag",...M,n,r]),ref:T,style:{...a,scale:O,...s&&{[A?"backgroundColor":"borderColor"]:s}},children:i})}x.memo(Uge);function T2(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 lb,e5;function Gge(){if(e5)return lb;e5=1;function e(){this.__data__=[],this.size=0}return lb=e,lb}var ub,t5;function cc(){if(t5)return ub;t5=1;function e(t,n){return t===n||t!==t&&n!==n}return ub=e,ub}var cb,n5;function sv(){if(n5)return cb;n5=1;var e=cc();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return cb=t,cb}var db,r5;function Vge(){if(r5)return db;r5=1;var e=sv(),t=Array.prototype,n=t.splice;function r(a){var i=this.__data__,s=e(i,a);if(s<0)return!1;var l=i.length-1;return s==l?i.pop():n.call(i,s,1),--this.size,!0}return db=r,db}var fb,a5;function Kge(){if(a5)return fb;a5=1;var e=sv();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return fb=t,fb}var hb,i5;function Yge(){if(i5)return hb;i5=1;var e=sv();function t(n){return e(this.__data__,n)>-1}return hb=t,hb}var mb,s5;function Wge(){if(s5)return mb;s5=1;var e=sv();function t(n,r){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return mb=t,mb}var pb,o5;function ov(){if(o5)return pb;o5=1;var e=Gge(),t=Vge(),n=Kge(),r=Yge(),a=Wge();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,pb=i,pb}var gb,l5;function Xge(){if(l5)return gb;l5=1;var e=ov();function t(){this.__data__=new e,this.size=0}return gb=t,gb}var vb,u5;function Zge(){if(u5)return vb;u5=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return vb=e,vb}var yb,c5;function Qge(){if(c5)return yb;c5=1;function e(t){return this.__data__.get(t)}return yb=e,yb}var xb,d5;function Jge(){if(d5)return xb;d5=1;function e(t){return this.__data__.has(t)}return xb=e,xb}var bb,f5;function hU(){if(f5)return bb;f5=1;var e=typeof km=="object"&&km&&km.Object===Object&&km;return bb=e,bb}var wb,h5;function Ba(){if(h5)return wb;h5=1;var e=hU(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return wb=n,wb}var Sb,m5;function dc(){if(m5)return Sb;m5=1;var e=Ba(),t=e.Symbol;return Sb=t,Sb}var jb,p5;function eve(){if(p5)return jb;p5=1;var e=dc(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function i(s){var l=n.call(s,a),c=s[a];try{s[a]=void 0;var d=!0}catch{}var h=r.call(s);return d&&(l?s[a]=c:delete s[a]),h}return jb=i,jb}var _b,g5;function tve(){if(g5)return _b;g5=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return _b=n,_b}var kb,v5;function wl(){if(v5)return kb;v5=1;var e=dc(),t=eve(),n=tve(),r="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?a:r:i&&i in Object(l)?t(l):n(l)}return kb=s,kb}var Cb,y5;function xa(){if(y5)return Cb;y5=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Cb=e,Cb}var Nb,x5;function Ff(){if(x5)return Nb;x5=1;var e=wl(),t=xa(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(l){if(!t(l))return!1;var c=e(l);return c==r||c==a||c==n||c==i}return Nb=s,Nb}var Eb,b5;function nve(){if(b5)return Eb;b5=1;var e=Ba(),t=e["__core-js_shared__"];return Eb=t,Eb}var Ab,w5;function rve(){if(w5)return Ab;w5=1;var e=nve(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Ab=n,Ab}var Tb,S5;function mU(){if(S5)return Tb;S5=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Tb=n,Tb}var Ob,j5;function ave(){if(j5)return Ob;j5=1;var e=Ff(),t=rve(),n=xa(),r=mU(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,d=l.hasOwnProperty,h=RegExp("^"+c.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?h:i;return v.test(r(g))}return Ob=m,Ob}var Mb,_5;function ive(){if(_5)return Mb;_5=1;function e(t,n){return t==null?void 0:t[n]}return Mb=e,Mb}var Pb,k5;function Sl(){if(k5)return Pb;k5=1;var e=ave(),t=ive();function n(r,a){var i=t(r,a);return e(i)?i:void 0}return Pb=n,Pb}var Db,C5;function O2(){if(C5)return Db;C5=1;var e=Sl(),t=Ba(),n=e(t,"Map");return Db=n,Db}var Rb,N5;function lv(){if(N5)return Rb;N5=1;var e=Sl(),t=e(Object,"create");return Rb=t,Rb}var Ib,E5;function sve(){if(E5)return Ib;E5=1;var e=lv();function t(){this.__data__=e?e(null):{},this.size=0}return Ib=t,Ib}var Lb,A5;function ove(){if(A5)return Lb;A5=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Lb=e,Lb}var zb,T5;function lve(){if(T5)return zb;T5=1;var e=lv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(i){var s=this.__data__;if(e){var l=s[i];return l===t?void 0:l}return r.call(s,i)?s[i]:void 0}return zb=a,zb}var $b,O5;function uve(){if(O5)return $b;O5=1;var e=lv(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return $b=r,$b}var qb,M5;function cve(){if(M5)return qb;M5=1;var e=lv(),t="__lodash_hash_undefined__";function n(r,a){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&a===void 0?t:a,this}return qb=n,qb}var Bb,P5;function dve(){if(P5)return Bb;P5=1;var e=sve(),t=ove(),n=lve(),r=uve(),a=cve();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Bb=i,Bb}var Fb,D5;function fve(){if(D5)return Fb;D5=1;var e=dve(),t=ov(),n=O2();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Fb=r,Fb}var Hb,R5;function hve(){if(R5)return Hb;R5=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Hb=e,Hb}var Ub,I5;function uv(){if(I5)return Ub;I5=1;var e=hve();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return Ub=t,Ub}var Gb,L5;function mve(){if(L5)return Gb;L5=1;var e=uv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Gb=t,Gb}var Vb,z5;function pve(){if(z5)return Vb;z5=1;var e=uv();function t(n){return e(this,n).get(n)}return Vb=t,Vb}var Kb,$5;function gve(){if($5)return Kb;$5=1;var e=uv();function t(n){return e(this,n).has(n)}return Kb=t,Kb}var Yb,q5;function vve(){if(q5)return Yb;q5=1;var e=uv();function t(n,r){var a=e(this,n),i=a.size;return a.set(n,r),this.size+=a.size==i?0:1,this}return Yb=t,Yb}var Wb,B5;function M2(){if(B5)return Wb;B5=1;var e=fve(),t=mve(),n=pve(),r=gve(),a=vve();function i(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var d=s[l];this.set(d[0],d[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,Wb=i,Wb}var Xb,F5;function yve(){if(F5)return Xb;F5=1;var e=ov(),t=O2(),n=M2(),r=200;function a(i,s){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([i,s]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(i,s),this.size=l.size,this}return Xb=a,Xb}var Zb,H5;function cv(){if(H5)return Zb;H5=1;var e=ov(),t=Xge(),n=Zge(),r=Qge(),a=Jge(),i=yve();function s(l){var c=this.__data__=new e(l);this.size=c.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=a,s.prototype.set=i,Zb=s,Zb}var Qb,U5;function P2(){if(U5)return Qb;U5=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a&&n(t[r],r,t)!==!1;);return t}return Qb=e,Qb}var Jb,G5;function pU(){if(G5)return Jb;G5=1;var e=Sl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Jb=t,Jb}var e1,V5;function dv(){if(V5)return e1;V5=1;var e=pU();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return e1=t,e1}var t1,K5;function fv(){if(K5)return t1;K5=1;var e=dv(),t=cc(),n=Object.prototype,r=n.hasOwnProperty;function a(i,s,l){var c=i[s];(!(r.call(i,s)&&t(c,l))||l===void 0&&!(s in i))&&e(i,s,l)}return t1=a,t1}var n1,Y5;function Hf(){if(Y5)return n1;Y5=1;var e=fv(),t=dv();function n(r,a,i,s){var l=!i;i||(i={});for(var c=-1,d=a.length;++c<d;){var h=a[c],m=s?s(i[h],r[h],h,i,r):void 0;m===void 0&&(m=r[h]),l?t(i,h,m):e(i,h,m)}return i}return n1=n,n1}var r1,W5;function xve(){if(W5)return r1;W5=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return r1=e,r1}var a1,X5;function bi(){if(X5)return a1;X5=1;function e(t){return t!=null&&typeof t=="object"}return a1=e,a1}var i1,Z5;function bve(){if(Z5)return i1;Z5=1;var e=wl(),t=bi(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return i1=r,i1}var s1,Q5;function Uf(){if(Q5)return s1;Q5=1;var e=bve(),t=bi(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(s){return t(s)&&r.call(s,"callee")&&!a.call(s,"callee")};return s1=i,s1}var o1,J5;function In(){if(J5)return o1;J5=1;var e=Array.isArray;return o1=e,o1}var Id={exports:{}},l1,eI;function wve(){if(eI)return l1;eI=1;function e(){return!1}return l1=e,l1}Id.exports;var tI;function fc(){return tI||(tI=1,(function(e,t){var n=Ba(),r=wve(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,l=s?n.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||r;e.exports=d})(Id,Id.exports)),Id.exports}var u1,nI;function hv(){if(nI)return u1;nI=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var i=typeof r;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return u1=n,u1}var c1,rI;function D2(){if(rI)return c1;rI=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return c1=t,c1}var d1,aI;function Sve(){if(aI)return d1;aI=1;var e=wl(),t=D2(),n=bi(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",S="[object ArrayBuffer]",j="[object DataView]",k="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",O="[object Uint8Array]",D="[object Uint8ClampedArray]",P="[object Uint16Array]",M="[object Uint32Array]",z={};z[k]=z[_]=z[E]=z[T]=z[A]=z[O]=z[D]=z[P]=z[M]=!0,z[r]=z[a]=z[S]=z[i]=z[j]=z[s]=z[l]=z[c]=z[d]=z[h]=z[m]=z[g]=z[v]=z[b]=z[w]=!1;function L(F){return n(F)&&t(F.length)&&!!z[e(F)]}return d1=L,d1}var f1,iI;function mv(){if(iI)return f1;iI=1;function e(t){return function(n){return t(n)}}return f1=e,f1}var Ld={exports:{}};Ld.exports;var sI;function R2(){return sI||(sI=1,(function(e,t){var n=hU(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i&&n.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();e.exports=l})(Ld,Ld.exports)),Ld.exports}var h1,oI;function Gf(){if(oI)return h1;oI=1;var e=Sve(),t=mv(),n=R2(),r=n&&n.isTypedArray,a=r?t(r):e;return h1=a,h1}var m1,lI;function gU(){if(lI)return m1;lI=1;var e=xve(),t=Uf(),n=In(),r=fc(),a=hv(),i=Gf(),s=Object.prototype,l=s.hasOwnProperty;function c(d,h){var m=n(d),g=!m&&t(d),v=!m&&!g&&r(d),b=!m&&!g&&!v&&i(d),w=m||g||v||b,S=w?e(d.length,String):[],j=S.length;for(var k in d)(h||l.call(d,k))&&!(w&&(k=="length"||v&&(k=="offset"||k=="parent")||b&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||a(k,j)))&&S.push(k);return S}return m1=c,m1}var p1,uI;function pv(){if(uI)return p1;uI=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return p1=t,p1}var g1,cI;function vU(){if(cI)return g1;cI=1;function e(t,n){return function(r){return t(n(r))}}return g1=e,g1}var v1,dI;function jve(){if(dI)return v1;dI=1;var e=vU(),t=e(Object.keys,Object);return v1=t,v1}var y1,fI;function I2(){if(fI)return y1;fI=1;var e=pv(),t=jve(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var s=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&s.push(l);return s}return y1=a,y1}var x1,hI;function us(){if(hI)return x1;hI=1;var e=Ff(),t=D2();function n(r){return r!=null&&t(r.length)&&!e(r)}return x1=n,x1}var b1,mI;function uo(){if(mI)return b1;mI=1;var e=gU(),t=I2(),n=us();function r(a){return n(a)?e(a):t(a)}return b1=r,b1}var w1,pI;function _ve(){if(pI)return w1;pI=1;var e=Hf(),t=uo();function n(r,a){return r&&e(a,t(a),r)}return w1=n,w1}var S1,gI;function kve(){if(gI)return S1;gI=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return S1=e,S1}var j1,vI;function Cve(){if(vI)return j1;vI=1;var e=xa(),t=pv(),n=kve(),r=Object.prototype,a=r.hasOwnProperty;function i(s){if(!e(s))return n(s);var l=t(s),c=[];for(var d in s)d=="constructor"&&(l||!a.call(s,d))||c.push(d);return c}return j1=i,j1}var _1,yI;function jl(){if(yI)return _1;yI=1;var e=gU(),t=Cve(),n=us();function r(a){return n(a)?e(a,!0):t(a)}return _1=r,_1}var k1,xI;function Nve(){if(xI)return k1;xI=1;var e=Hf(),t=jl();function n(r,a){return r&&e(a,t(a),r)}return k1=n,k1}var zd={exports:{}};zd.exports;var bI;function yU(){return bI||(bI=1,(function(e,t){var n=Ba(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,s=i?n.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(d,h){if(h)return d.slice();var m=d.length,g=l?l(m):new d.constructor(m);return d.copy(g),g}e.exports=c})(zd,zd.exports)),zd.exports}var C1,wI;function xU(){if(wI)return C1;wI=1;function e(t,n){var r=-1,a=t.length;for(n||(n=Array(a));++r<a;)n[r]=t[r];return n}return C1=e,C1}var N1,SI;function bU(){if(SI)return N1;SI=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=0,s=[];++r<a;){var l=t[r];n(l,r,t)&&(s[i++]=l)}return s}return N1=e,N1}var E1,jI;function wU(){if(jI)return E1;jI=1;function e(){return[]}return E1=e,E1}var A1,_I;function L2(){if(_I)return A1;_I=1;var e=bU(),t=wU(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(s){return s==null?[]:(s=Object(s),e(a(s),function(l){return r.call(s,l)}))}:t;return A1=i,A1}var T1,kI;function Eve(){if(kI)return T1;kI=1;var e=Hf(),t=L2();function n(r,a){return e(r,t(r),a)}return T1=n,T1}var O1,CI;function z2(){if(CI)return O1;CI=1;function e(t,n){for(var r=-1,a=n.length,i=t.length;++r<a;)t[i+r]=n[r];return t}return O1=e,O1}var M1,NI;function gv(){if(NI)return M1;NI=1;var e=vU(),t=e(Object.getPrototypeOf,Object);return M1=t,M1}var P1,EI;function SU(){if(EI)return P1;EI=1;var e=z2(),t=gv(),n=L2(),r=wU(),a=Object.getOwnPropertySymbols,i=a?function(s){for(var l=[];s;)e(l,n(s)),s=t(s);return l}:r;return P1=i,P1}var D1,AI;function Ave(){if(AI)return D1;AI=1;var e=Hf(),t=SU();function n(r,a){return e(r,t(r),a)}return D1=n,D1}var R1,TI;function jU(){if(TI)return R1;TI=1;var e=z2(),t=In();function n(r,a,i){var s=a(r);return t(r)?s:e(s,i(r))}return R1=n,R1}var I1,OI;function _U(){if(OI)return I1;OI=1;var e=jU(),t=L2(),n=uo();function r(a){return e(a,n,t)}return I1=r,I1}var L1,MI;function Tve(){if(MI)return L1;MI=1;var e=jU(),t=SU(),n=jl();function r(a){return e(a,n,t)}return L1=r,L1}var z1,PI;function Ove(){if(PI)return z1;PI=1;var e=Sl(),t=Ba(),n=e(t,"DataView");return z1=n,z1}var $1,DI;function Mve(){if(DI)return $1;DI=1;var e=Sl(),t=Ba(),n=e(t,"Promise");return $1=n,$1}var q1,RI;function kU(){if(RI)return q1;RI=1;var e=Sl(),t=Ba(),n=e(t,"Set");return q1=n,q1}var B1,II;function Pve(){if(II)return B1;II=1;var e=Sl(),t=Ba(),n=e(t,"WeakMap");return B1=n,B1}var F1,LI;function hc(){if(LI)return F1;LI=1;var e=Ove(),t=O2(),n=Mve(),r=kU(),a=Pve(),i=wl(),s=mU(),l="[object Map]",c="[object Object]",d="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",v=s(e),b=s(t),w=s(n),S=s(r),j=s(a),k=i;return(e&&k(new e(new ArrayBuffer(1)))!=g||t&&k(new t)!=l||n&&k(n.resolve())!=d||r&&k(new r)!=h||a&&k(new a)!=m)&&(k=function(_){var E=i(_),T=E==c?_.constructor:void 0,A=T?s(T):"";if(A)switch(A){case v:return g;case b:return l;case w:return d;case S:return h;case j:return m}return E}),F1=k,F1}var H1,zI;function Dve(){if(zI)return H1;zI=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var a=r.length,i=new r.constructor(a);return a&&typeof r[0]=="string"&&t.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return H1=n,H1}var U1,$I;function CU(){if($I)return U1;$I=1;var e=Ba(),t=e.Uint8Array;return U1=t,U1}var G1,qI;function $2(){if(qI)return G1;qI=1;var e=CU();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return G1=t,G1}var V1,BI;function Rve(){if(BI)return V1;BI=1;var e=$2();function t(n,r){var a=r?e(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.byteLength)}return V1=t,V1}var K1,FI;function Ive(){if(FI)return K1;FI=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return K1=t,K1}var Y1,HI;function Lve(){if(HI)return Y1;HI=1;var e=dc(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(a){return n?Object(n.call(a)):{}}return Y1=r,Y1}var W1,UI;function NU(){if(UI)return W1;UI=1;var e=$2();function t(n,r){var a=r?e(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.length)}return W1=t,W1}var X1,GI;function zve(){if(GI)return X1;GI=1;var e=$2(),t=Rve(),n=Ive(),r=Lve(),a=NU(),i="[object Boolean]",s="[object Date]",l="[object Map]",c="[object Number]",d="[object RegExp]",h="[object Set]",m="[object String]",g="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",S="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",_="[object Int32Array]",E="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]";function D(P,M,z){var L=P.constructor;switch(M){case v:return e(P);case i:case s:return new L(+P);case b:return t(P,z);case w:case S:case j:case k:case _:case E:case T:case A:case O:return a(P,z);case l:return new L;case c:case m:return new L(P);case d:return n(P);case h:return new L;case g:return r(P)}}return X1=D,X1}var Z1,VI;function EU(){if(VI)return Z1;VI=1;var e=xa(),t=Object.create,n=(function(){function r(){}return function(a){if(!e(a))return{};if(t)return t(a);r.prototype=a;var i=new r;return r.prototype=void 0,i}})();return Z1=n,Z1}var Q1,KI;function AU(){if(KI)return Q1;KI=1;var e=EU(),t=gv(),n=pv();function r(a){return typeof a.constructor=="function"&&!n(a)?e(t(a)):{}}return Q1=r,Q1}var J1,YI;function $ve(){if(YI)return J1;YI=1;var e=hc(),t=bi(),n="[object Map]";function r(a){return t(a)&&e(a)==n}return J1=r,J1}var ew,WI;function qve(){if(WI)return ew;WI=1;var e=$ve(),t=mv(),n=R2(),r=n&&n.isMap,a=r?t(r):e;return ew=a,ew}var tw,XI;function Bve(){if(XI)return tw;XI=1;var e=hc(),t=bi(),n="[object Set]";function r(a){return t(a)&&e(a)==n}return tw=r,tw}var nw,ZI;function Fve(){if(ZI)return nw;ZI=1;var e=Bve(),t=mv(),n=R2(),r=n&&n.isSet,a=r?t(r):e;return nw=a,nw}var rw,QI;function TU(){if(QI)return rw;QI=1;var e=cv(),t=P2(),n=fv(),r=_ve(),a=Nve(),i=yU(),s=xU(),l=Eve(),c=Ave(),d=_U(),h=Tve(),m=hc(),g=Dve(),v=zve(),b=AU(),w=In(),S=fc(),j=qve(),k=xa(),_=Fve(),E=uo(),T=jl(),A=1,O=2,D=4,P="[object Arguments]",M="[object Array]",z="[object Boolean]",L="[object Date]",F="[object Error]",R="[object Function]",I="[object GeneratorFunction]",q="[object Map]",G="[object Number]",Y="[object Object]",K="[object RegExp]",B="[object Set]",U="[object String]",X="[object Symbol]",H="[object WeakMap]",W="[object ArrayBuffer]",Q="[object DataView]",J="[object Float32Array]",re="[object Float64Array]",oe="[object Int8Array]",Z="[object Int16Array]",le="[object Int32Array]",ie="[object Uint8Array]",ee="[object Uint8ClampedArray]",ae="[object Uint16Array]",xe="[object Uint32Array]",ye={};ye[P]=ye[M]=ye[W]=ye[Q]=ye[z]=ye[L]=ye[J]=ye[re]=ye[oe]=ye[Z]=ye[le]=ye[q]=ye[G]=ye[Y]=ye[K]=ye[B]=ye[U]=ye[X]=ye[ie]=ye[ee]=ye[ae]=ye[xe]=!0,ye[F]=ye[R]=ye[H]=!1;function Te(Me,he,Ie,Je,We,it){var Ce,He=he&A,ge=he&O,ue=he&D;if(Ie&&(Ce=We?Ie(Me,Je,We,it):Ie(Me)),Ce!==void 0)return Ce;if(!k(Me))return Me;var _e=w(Me);if(_e){if(Ce=g(Me),!He)return s(Me,Ce)}else{var fe=m(Me),Oe=fe==R||fe==I;if(S(Me))return i(Me,He);if(fe==Y||fe==P||Oe&&!We){if(Ce=ge||Oe?{}:b(Me),!He)return ge?c(Me,a(Ce,Me)):l(Me,r(Ce,Me))}else{if(!ye[fe])return We?Me:{};Ce=v(Me,fe,He)}}it||(it=new e);var ze=it.get(Me);if(ze)return ze;it.set(Me,Ce),_(Me)?Me.forEach(function(_t){Ce.add(Te(_t,he,Ie,_t,Me,it))}):j(Me)&&Me.forEach(function(_t,ct){Ce.set(ct,Te(_t,he,Ie,ct,Me,it))});var ut=ue?ge?h:d:ge?T:E,gt=_e?void 0:ut(Me);return t(gt||Me,function(_t,ct){gt&&(ct=_t,_t=Me[ct]),n(Ce,ct,Te(_t,he,Ie,ct,Me,it))}),Ce}return rw=Te,rw}var aw,JI;function Hve(){if(JI)return aw;JI=1;var e=TU(),t=4;function n(r){return e(r,t)}return aw=n,aw}var iw,e3;function q2(){if(e3)return iw;e3=1;function e(t){return function(){return t}}return iw=e,iw}var sw,t3;function Uve(){if(t3)return sw;t3=1;function e(t){return function(n,r,a){for(var i=-1,s=Object(n),l=a(n),c=l.length;c--;){var d=l[t?c:++i];if(r(s[d],d,s)===!1)break}return n}}return sw=e,sw}var ow,n3;function B2(){if(n3)return ow;n3=1;var e=Uve(),t=e();return ow=t,ow}var lw,r3;function F2(){if(r3)return lw;r3=1;var e=B2(),t=uo();function n(r,a){return r&&e(r,a,t)}return lw=n,lw}var uw,a3;function Gve(){if(a3)return uw;a3=1;var e=us();function t(n,r){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var s=a.length,l=r?s:-1,c=Object(a);(r?l--:++l<s)&&i(c[l],l,c)!==!1;);return a}}return uw=t,uw}var cw,i3;function vv(){if(i3)return cw;i3=1;var e=F2(),t=Gve(),n=t(e);return cw=n,cw}var dw,s3;function _l(){if(s3)return dw;s3=1;function e(t){return t}return dw=e,dw}var fw,o3;function OU(){if(o3)return fw;o3=1;var e=_l();function t(n){return typeof n=="function"?n:e}return fw=t,fw}var hw,l3;function MU(){if(l3)return hw;l3=1;var e=P2(),t=vv(),n=OU(),r=In();function a(i,s){var l=r(i)?e:t;return l(i,n(s))}return hw=a,hw}var mw,u3;function PU(){return u3||(u3=1,mw=MU()),mw}var pw,c3;function Vve(){if(c3)return pw;c3=1;var e=vv();function t(n,r){var a=[];return e(n,function(i,s,l){r(i,s,l)&&a.push(i)}),a}return pw=t,pw}var gw,d3;function Kve(){if(d3)return gw;d3=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return gw=t,gw}var vw,f3;function Yve(){if(f3)return vw;f3=1;function e(t){return this.__data__.has(t)}return vw=e,vw}var yw,h3;function DU(){if(h3)return yw;h3=1;var e=M2(),t=Kve(),n=Yve();function r(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new e;++i<s;)this.add(a[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,yw=r,yw}var xw,m3;function Wve(){if(m3)return xw;m3=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return xw=e,xw}var bw,p3;function RU(){if(p3)return bw;p3=1;function e(t,n){return t.has(n)}return bw=e,bw}var ww,g3;function IU(){if(g3)return ww;g3=1;var e=DU(),t=Wve(),n=RU(),r=1,a=2;function i(s,l,c,d,h,m){var g=c&r,v=s.length,b=l.length;if(v!=b&&!(g&&b>v))return!1;var w=m.get(s),S=m.get(l);if(w&&S)return w==l&&S==s;var j=-1,k=!0,_=c&a?new e:void 0;for(m.set(s,l),m.set(l,s);++j<v;){var E=s[j],T=l[j];if(d)var A=g?d(T,E,j,l,s,m):d(E,T,j,s,l,m);if(A!==void 0){if(A)continue;k=!1;break}if(_){if(!t(l,function(O,D){if(!n(_,D)&&(E===O||h(E,O,c,d,m)))return _.push(D)})){k=!1;break}}else if(!(E===T||h(E,T,c,d,m))){k=!1;break}}return m.delete(s),m.delete(l),k}return ww=i,ww}var Sw,v3;function Xve(){if(v3)return Sw;v3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,i){r[++n]=[i,a]}),r}return Sw=e,Sw}var jw,y3;function H2(){if(y3)return jw;y3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return jw=e,jw}var _w,x3;function Zve(){if(x3)return _w;x3=1;var e=dc(),t=CU(),n=cc(),r=IU(),a=Xve(),i=H2(),s=1,l=2,c="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",b="[object Set]",w="[object String]",S="[object Symbol]",j="[object ArrayBuffer]",k="[object DataView]",_=e?e.prototype:void 0,E=_?_.valueOf:void 0;function T(A,O,D,P,M,z,L){switch(D){case k:if(A.byteLength!=O.byteLength||A.byteOffset!=O.byteOffset)return!1;A=A.buffer,O=O.buffer;case j:return!(A.byteLength!=O.byteLength||!z(new t(A),new t(O)));case c:case d:case g:return n(+A,+O);case h:return A.name==O.name&&A.message==O.message;case v:case w:return A==O+"";case m:var F=a;case b:var R=P&s;if(F||(F=i),A.size!=O.size&&!R)return!1;var I=L.get(A);if(I)return I==O;P|=l,L.set(A,O);var q=r(F(A),F(O),P,M,z,L);return L.delete(A),q;case S:if(E)return E.call(A)==E.call(O)}return!1}return _w=T,_w}var kw,b3;function Qve(){if(b3)return kw;b3=1;var e=_U(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,s,l,c,d,h){var m=l&t,g=e(i),v=g.length,b=e(s),w=b.length;if(v!=w&&!m)return!1;for(var S=v;S--;){var j=g[S];if(!(m?j in s:r.call(s,j)))return!1}var k=h.get(i),_=h.get(s);if(k&&_)return k==s&&_==i;var E=!0;h.set(i,s),h.set(s,i);for(var T=m;++S<v;){j=g[S];var A=i[j],O=s[j];if(c)var D=m?c(O,A,j,s,i,h):c(A,O,j,i,s,h);if(!(D===void 0?A===O||d(A,O,l,c,h):D)){E=!1;break}T||(T=j=="constructor")}if(E&&!T){var P=i.constructor,M=s.constructor;P!=M&&"constructor"in i&&"constructor"in s&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(E=!1)}return h.delete(i),h.delete(s),E}return kw=a,kw}var Cw,w3;function Jve(){if(w3)return Cw;w3=1;var e=cv(),t=IU(),n=Zve(),r=Qve(),a=hc(),i=In(),s=fc(),l=Gf(),c=1,d="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function b(w,S,j,k,_,E){var T=i(w),A=i(S),O=T?h:a(w),D=A?h:a(S);O=O==d?m:O,D=D==d?m:D;var P=O==m,M=D==m,z=O==D;if(z&&s(w)){if(!s(S))return!1;T=!0,P=!1}if(z&&!P)return E||(E=new e),T||l(w)?t(w,S,j,k,_,E):n(w,S,O,j,k,_,E);if(!(j&c)){var L=P&&v.call(w,"__wrapped__"),F=M&&v.call(S,"__wrapped__");if(L||F){var R=L?w.value():w,I=F?S.value():S;return E||(E=new e),_(R,I,j,k,E)}}return z?(E||(E=new e),r(w,S,j,k,_,E)):!1}return Cw=b,Cw}var Nw,S3;function LU(){if(S3)return Nw;S3=1;var e=Jve(),t=bi();function n(r,a,i,s,l){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,i,s,n,l)}return Nw=n,Nw}var Ew,j3;function eye(){if(j3)return Ew;j3=1;var e=cv(),t=LU(),n=1,r=2;function a(i,s,l,c){var d=l.length,h=d,m=!c;if(i==null)return!h;for(i=Object(i);d--;){var g=l[d];if(m&&g[2]?g[1]!==i[g[0]]:!(g[0]in i))return!1}for(;++d<h;){g=l[d];var v=g[0],b=i[v],w=g[1];if(m&&g[2]){if(b===void 0&&!(v in i))return!1}else{var S=new e;if(c)var j=c(b,w,v,i,s,S);if(!(j===void 0?t(w,b,n|r,c,S):j))return!1}}return!0}return Ew=a,Ew}var Aw,_3;function zU(){if(_3)return Aw;_3=1;var e=xa();function t(n){return n===n&&!e(n)}return Aw=t,Aw}var Tw,k3;function tye(){if(k3)return Tw;k3=1;var e=zU(),t=uo();function n(r){for(var a=t(r),i=a.length;i--;){var s=a[i],l=r[s];a[i]=[s,l,e(l)]}return a}return Tw=n,Tw}var Ow,C3;function $U(){if(C3)return Ow;C3=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ow=e,Ow}var Mw,N3;function nye(){if(N3)return Mw;N3=1;var e=eye(),t=tye(),n=$U();function r(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(s){return s===a||e(s,a,i)}}return Mw=r,Mw}var Pw,E3;function mc(){if(E3)return Pw;E3=1;var e=wl(),t=bi(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return Pw=r,Pw}var Dw,A3;function U2(){if(A3)return Dw;A3=1;var e=In(),t=mc(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return Dw=a,Dw}var Rw,T3;function rye(){if(T3)return Rw;T3=1;var e=M2(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var s=arguments,l=a?a.apply(this,s):s[0],c=i.cache;if(c.has(l))return c.get(l);var d=r.apply(this,s);return i.cache=c.set(l,d)||c,d};return i.cache=new(n.Cache||e),i}return n.Cache=e,Rw=n,Rw}var Iw,O3;function aye(){if(O3)return Iw;O3=1;var e=rye(),t=500;function n(r){var a=e(r,function(s){return i.size===t&&i.clear(),s}),i=a.cache;return a}return Iw=n,Iw}var Lw,M3;function iye(){if(M3)return Lw;M3=1;var e=aye(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(s,l,c,d){i.push(c?d.replace(n,"$1"):l||s)}),i});return Lw=r,Lw}var zw,P3;function yv(){if(P3)return zw;P3=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=n(t[r],r,t);return i}return zw=e,zw}var $w,D3;function sye(){if(D3)return $w;D3=1;var e=dc(),t=yv(),n=In(),r=mc(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function s(l){if(typeof l=="string")return l;if(n(l))return t(l,s)+"";if(r(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return $w=s,$w}var qw,R3;function qU(){if(R3)return qw;R3=1;var e=sye();function t(n){return n==null?"":e(n)}return qw=t,qw}var Bw,I3;function xv(){if(I3)return Bw;I3=1;var e=In(),t=U2(),n=iye(),r=qU();function a(i,s){return e(i)?i:t(i,s)?[i]:n(r(i))}return Bw=a,Bw}var Fw,L3;function Vf(){if(L3)return Fw;L3=1;var e=mc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Fw=t,Fw}var Hw,z3;function bv(){if(z3)return Hw;z3=1;var e=xv(),t=Vf();function n(r,a){a=e(a,r);for(var i=0,s=a.length;r!=null&&i<s;)r=r[t(a[i++])];return i&&i==s?r:void 0}return Hw=n,Hw}var Uw,$3;function oye(){if($3)return Uw;$3=1;var e=bv();function t(n,r,a){var i=n==null?void 0:e(n,r);return i===void 0?a:i}return Uw=t,Uw}var Gw,q3;function lye(){if(q3)return Gw;q3=1;function e(t,n){return t!=null&&n in Object(t)}return Gw=e,Gw}var Vw,B3;function BU(){if(B3)return Vw;B3=1;var e=xv(),t=Uf(),n=In(),r=hv(),a=D2(),i=Vf();function s(l,c,d){c=e(c,l);for(var h=-1,m=c.length,g=!1;++h<m;){var v=i(c[h]);if(!(g=l!=null&&d(l,v)))break;l=l[v]}return g||++h!=m?g:(m=l==null?0:l.length,!!m&&a(m)&&r(v,m)&&(n(l)||t(l)))}return Vw=s,Vw}var Kw,F3;function FU(){if(F3)return Kw;F3=1;var e=lye(),t=BU();function n(r,a){return r!=null&&t(r,a,e)}return Kw=n,Kw}var Yw,H3;function uye(){if(H3)return Yw;H3=1;var e=LU(),t=oye(),n=FU(),r=U2(),a=zU(),i=$U(),s=Vf(),l=1,c=2;function d(h,m){return r(h)&&a(m)?i(s(h),m):function(g){var v=t(g,h);return v===void 0&&v===m?n(g,h):e(m,v,l|c)}}return Yw=d,Yw}var Ww,U3;function HU(){if(U3)return Ww;U3=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Ww=e,Ww}var Xw,G3;function cye(){if(G3)return Xw;G3=1;var e=bv();function t(n){return function(r){return e(r,n)}}return Xw=t,Xw}var Zw,V3;function dye(){if(V3)return Zw;V3=1;var e=HU(),t=cye(),n=U2(),r=Vf();function a(i){return n(i)?e(r(i)):t(i)}return Zw=a,Zw}var Qw,K3;function cs(){if(K3)return Qw;K3=1;var e=nye(),t=uye(),n=_l(),r=In(),a=dye();function i(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):a(s)}return Qw=i,Qw}var Jw,Y3;function UU(){if(Y3)return Jw;Y3=1;var e=bU(),t=Vve(),n=cs(),r=In();function a(i,s){var l=r(i)?e:t;return l(i,n(s,3))}return Jw=a,Jw}var eS,W3;function fye(){if(W3)return eS;W3=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,a){return r!=null&&t.call(r,a)}return eS=n,eS}var tS,X3;function GU(){if(X3)return tS;X3=1;var e=fye(),t=BU();function n(r,a){return r!=null&&t(r,a,e)}return tS=n,tS}var nS,Z3;function hye(){if(Z3)return nS;Z3=1;var e=I2(),t=hc(),n=Uf(),r=In(),a=us(),i=fc(),s=pv(),l=Gf(),c="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;function g(v){if(v==null)return!0;if(a(v)&&(r(v)||typeof v=="string"||typeof v.splice=="function"||i(v)||l(v)||n(v)))return!v.length;var b=t(v);if(b==c||b==d)return!v.size;if(s(v))return!e(v).length;for(var w in v)if(m.call(v,w))return!1;return!0}return nS=g,nS}var rS,Q3;function VU(){if(Q3)return rS;Q3=1;function e(t){return t===void 0}return rS=e,rS}var aS,J3;function KU(){if(J3)return aS;J3=1;var e=vv(),t=us();function n(r,a){var i=-1,s=t(r)?Array(r.length):[];return e(r,function(l,c,d){s[++i]=a(l,c,d)}),s}return aS=n,aS}var iS,e4;function YU(){if(e4)return iS;e4=1;var e=yv(),t=cs(),n=KU(),r=In();function a(i,s){var l=r(i)?e:n;return l(i,t(s,3))}return iS=a,iS}var sS,t4;function mye(){if(t4)return sS;t4=1;function e(t,n,r,a){var i=-1,s=t==null?0:t.length;for(a&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}return sS=e,sS}var oS,n4;function pye(){if(n4)return oS;n4=1;function e(t,n,r,a,i){return i(t,function(s,l,c){r=a?(a=!1,s):n(r,s,l,c)}),r}return oS=e,oS}var lS,r4;function WU(){if(r4)return lS;r4=1;var e=mye(),t=vv(),n=cs(),r=pye(),a=In();function i(s,l,c){var d=a(s)?e:r,h=arguments.length<3;return d(s,n(l,4),c,h,t)}return lS=i,lS}var uS,a4;function gye(){if(a4)return uS;a4=1;var e=wl(),t=In(),n=bi(),r="[object String]";function a(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return uS=a,uS}var cS,i4;function vye(){if(i4)return cS;i4=1;var e=HU(),t=e("length");return cS=t,cS}var dS,s4;function yye(){if(s4)return dS;s4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+e+a+i+"]");function c(d){return l.test(d)}return dS=c,dS}var fS,o4;function xye(){if(o4)return fS;o4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",s="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",h="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=d+"?",w="["+i+"]?",S="(?:"+v+"(?:"+[h,m,g].join("|")+")"+w+b+")*",j=w+b+S,k="(?:"+[h+l+"?",l,m,g,s].join("|")+")",_=RegExp(c+"(?="+c+")|"+k+j,"g");function E(T){for(var A=_.lastIndex=0;_.test(T);)++A;return A}return fS=E,fS}var hS,l4;function bye(){if(l4)return hS;l4=1;var e=vye(),t=yye(),n=xye();function r(a){return t(a)?n(a):e(a)}return hS=r,hS}var mS,u4;function wye(){if(u4)return mS;u4=1;var e=I2(),t=hc(),n=us(),r=gye(),a=bye(),i="[object Map]",s="[object Set]";function l(c){if(c==null)return 0;if(n(c))return r(c)?a(c):c.length;var d=t(c);return d==i||d==s?c.size:e(c).length}return mS=l,mS}var pS,c4;function Sye(){if(c4)return pS;c4=1;var e=P2(),t=EU(),n=F2(),r=cs(),a=gv(),i=In(),s=fc(),l=Ff(),c=xa(),d=Gf();function h(m,g,v){var b=i(m),w=b||s(m)||d(m);if(g=r(g,4),v==null){var S=m&&m.constructor;w?v=b?new S:[]:c(m)?v=l(S)?t(a(m)):{}:v={}}return(w?e:n)(m,function(j,k,_){return g(v,j,k,_)}),v}return pS=h,pS}var gS,d4;function jye(){if(d4)return gS;d4=1;var e=dc(),t=Uf(),n=In(),r=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(r&&i&&i[r])}return gS=a,gS}var vS,f4;function G2(){if(f4)return vS;f4=1;var e=z2(),t=jye();function n(r,a,i,s,l){var c=-1,d=r.length;for(i||(i=t),l||(l=[]);++c<d;){var h=r[c];a>0&&i(h)?a>1?n(h,a-1,i,s,l):e(l,h):s||(l[l.length]=h)}return l}return vS=n,vS}var yS,h4;function _ye(){if(h4)return yS;h4=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return yS=e,yS}var xS,m4;function XU(){if(m4)return xS;m4=1;var e=_ye(),t=Math.max;function n(r,a,i){return a=t(a===void 0?r.length-1:a,0),function(){for(var s=arguments,l=-1,c=t(s.length-a,0),d=Array(c);++l<c;)d[l]=s[a+l];l=-1;for(var h=Array(a+1);++l<a;)h[l]=s[l];return h[a]=i(d),e(r,this,h)}}return xS=n,xS}var bS,p4;function kye(){if(p4)return bS;p4=1;var e=q2(),t=pU(),n=_l(),r=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return bS=r,bS}var wS,g4;function Cye(){if(g4)return wS;g4=1;var e=800,t=16,n=Date.now;function r(a){var i=0,s=0;return function(){var l=n(),c=t-(l-s);if(s=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return wS=r,wS}var SS,v4;function ZU(){if(v4)return SS;v4=1;var e=kye(),t=Cye(),n=t(e);return SS=n,SS}var jS,y4;function wv(){if(y4)return jS;y4=1;var e=_l(),t=XU(),n=ZU();function r(a,i){return n(t(a,i,e),a+"")}return jS=r,jS}var _S,x4;function QU(){if(x4)return _S;x4=1;function e(t,n,r,a){for(var i=t.length,s=r+(a?1:-1);a?s--:++s<i;)if(n(t[s],s,t))return s;return-1}return _S=e,_S}var kS,b4;function Nye(){if(b4)return kS;b4=1;function e(t){return t!==t}return kS=e,kS}var CS,w4;function Eye(){if(w4)return CS;w4=1;function e(t,n,r){for(var a=r-1,i=t.length;++a<i;)if(t[a]===n)return a;return-1}return CS=e,CS}var NS,S4;function Aye(){if(S4)return NS;S4=1;var e=QU(),t=Nye(),n=Eye();function r(a,i,s){return i===i?n(a,i,s):e(a,t,s)}return NS=r,NS}var ES,j4;function Tye(){if(j4)return ES;j4=1;var e=Aye();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return ES=t,ES}var AS,_4;function Oye(){if(_4)return AS;_4=1;function e(t,n,r){for(var a=-1,i=t==null?0:t.length;++a<i;)if(r(n,t[a]))return!0;return!1}return AS=e,AS}var TS,k4;function Mye(){if(k4)return TS;k4=1;function e(){}return TS=e,TS}var OS,C4;function Pye(){if(C4)return OS;C4=1;var e=kU(),t=Mye(),n=H2(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return OS=a,OS}var MS,N4;function Dye(){if(N4)return MS;N4=1;var e=DU(),t=Tye(),n=Oye(),r=RU(),a=Pye(),i=H2(),s=200;function l(c,d,h){var m=-1,g=t,v=c.length,b=!0,w=[],S=w;if(h)b=!1,g=n;else if(v>=s){var j=d?null:a(c);if(j)return i(j);b=!1,g=r,S=new e}else S=d?[]:w;e:for(;++m<v;){var k=c[m],_=d?d(k):k;if(k=h||k!==0?k:0,b&&_===_){for(var E=S.length;E--;)if(S[E]===_)continue e;d&&S.push(_),w.push(k)}else g(S,_,h)||(S!==w&&S.push(_),w.push(k))}return w}return MS=l,MS}var PS,E4;function JU(){if(E4)return PS;E4=1;var e=us(),t=bi();function n(r){return t(r)&&e(r)}return PS=n,PS}var DS,A4;function Rye(){if(A4)return DS;A4=1;var e=G2(),t=wv(),n=Dye(),r=JU(),a=t(function(i){return n(e(i,1,r,!0))});return DS=a,DS}var RS,T4;function Iye(){if(T4)return RS;T4=1;var e=yv();function t(n,r){return e(r,function(a){return n[a]})}return RS=t,RS}var IS,O4;function e7(){if(O4)return IS;O4=1;var e=Iye(),t=uo();function n(r){return r==null?[]:e(r,t(r))}return IS=n,IS}var LS,M4;function ba(){if(M4)return LS;M4=1;var e;if(typeof T2=="function")try{e={clone:Hve(),constant:q2(),each:PU(),filter:UU(),has:GU(),isArray:In(),isEmpty:hye(),isFunction:Ff(),isUndefined:VU(),keys:uo(),map:YU(),reduce:WU(),size:wye(),transform:Sye(),union:Rye(),values:e7()}}catch{}return e||(e=window._),LS=e,LS}var zS,P4;function V2(){if(P4)return zS;P4=1;var e=ba();zS=a;var t="\0",n="\0",r="";function a(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={}}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(h){return this._label=h,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return e.keys(this._nodes)},a.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._in[m])})},a.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._out[m])})},a.prototype.setNodes=function(h,m){var g=arguments,v=this;return e.each(h,function(b){g.length>1?v.setNode(b,m):v.setNode(b)}),this},a.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)},a.prototype.node=function(h){return this._nodes[h]},a.prototype.hasNode=function(h){return e.has(this._nodes,h)},a.prototype.removeNode=function(h){var m=this;if(e.has(this._nodes,h)){var g=function(v){m.removeEdge(m._edgeObjs[v])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(v){m.setParent(v)}),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},a.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},a.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},a.prototype.parent=function(h){if(this._isCompound){var m=this._parent[h];if(m!==n)return m}},a.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[]}},a.prototype.predecessors=function(h){var m=this._preds[h];if(m)return e.keys(m)},a.prototype.successors=function(h){var m=this._sucs[h];if(m)return e.keys(m)},a.prototype.neighbors=function(h){var m=this.predecessors(h);if(m)return e.union(m,this.successors(h))},a.prototype.isLeaf=function(h){var m;return this.isDirected()?m=this.successors(h):m=this.neighbors(h),m.length===0},a.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(w,S){h(S)&&m.setNode(S,w)}),e.each(this._edgeObjs,function(w){m.hasNode(w.v)&&m.hasNode(w.w)&&m.setEdge(w,g.edge(w))});var v={};function b(w){var S=g.parent(w);return S===void 0||m.hasNode(S)?(v[w]=S,S):S in v?v[S]:b(S)}return this._isCompound&&e.each(m.nodes(),function(w){m.setParent(w,b(w))}),m},a.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return e.values(this._edgeObjs)},a.prototype.setPath=function(h,m){var g=this,v=arguments;return e.reduce(h,function(b,w){return v.length>1?g.setEdge(b,w,m):g.setEdge(b,w),w}),this},a.prototype.setEdge=function(){var h,m,g,v,b=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(h=w.v,m=w.w,g=w.name,arguments.length===2&&(v=arguments[1],b=!0)):(h=w,m=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],b=!0)),h=""+h,m=""+m,e.isUndefined(g)||(g=""+g);var S=l(this._isDirected,h,m,g);if(e.has(this._edgeLabels,S))return b&&(this._edgeLabels[S]=v),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[S]=b?v:this._defaultEdgeLabelFn(h,m,g);var j=c(this._isDirected,h,m,g);return h=j.v,m=j.w,Object.freeze(j),this._edgeObjs[S]=j,i(this._preds[m],h),i(this._sucs[h],m),this._in[m][S]=j,this._out[h][S]=j,this._edgeCount++,this},a.prototype.edge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g);return this._edgeLabels[v]},a.prototype.hasEdge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g);return e.has(this._edgeLabels,v)},a.prototype.removeEdge=function(h,m,g){var v=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,h,m,g),b=this._edgeObjs[v];return b&&(h=b.v,m=b.w,delete this._edgeLabels[v],delete this._edgeObjs[v],s(this._preds[m],h),s(this._sucs[h],m),delete this._in[m][v],delete this._out[h][v],this._edgeCount--),this},a.prototype.inEdges=function(h,m){var g=this._in[h];if(g){var v=e.values(g);return m?e.filter(v,function(b){return b.v===m}):v}},a.prototype.outEdges=function(h,m){var g=this._out[h];if(g){var v=e.values(g);return m?e.filter(v,function(b){return b.w===m}):v}},a.prototype.nodeEdges=function(h,m){var g=this.inEdges(h,m);if(g)return g.concat(this.outEdges(h,m))};function i(h,m){h[m]?h[m]++:h[m]=1}function s(h,m){--h[m]||delete h[m]}function l(h,m,g,v){var b=""+m,w=""+g;if(!h&&b>w){var S=b;b=w,w=S}return b+r+w+r+(e.isUndefined(v)?t:v)}function c(h,m,g,v){var b=""+m,w=""+g;if(!h&&b>w){var S=b;b=w,w=S}var j={v:b,w};return v&&(j.name=v),j}function d(h,m){return l(h,m.v,m.w,m.name)}return zS}var $S,D4;function Lye(){return D4||(D4=1,$S="2.1.8"),$S}var qS,R4;function zye(){return R4||(R4=1,qS={Graph:V2(),version:Lye()}),qS}var BS,I4;function $ye(){if(I4)return BS;I4=1;var e=ba(),t=V2();BS={write:n,read:i};function n(s){var l={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:r(s),edges:a(s)};return e.isUndefined(s.graph())||(l.value=e.clone(s.graph())),l}function r(s){return e.map(s.nodes(),function(l){var c=s.node(l),d=s.parent(l),h={v:l};return e.isUndefined(c)||(h.value=c),e.isUndefined(d)||(h.parent=d),h})}function a(s){return e.map(s.edges(),function(l){var c=s.edge(l),d={v:l.v,w:l.w};return e.isUndefined(l.name)||(d.name=l.name),e.isUndefined(c)||(d.value=c),d})}function i(s){var l=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(c){l.setNode(c.v,c.value),c.parent&&l.setParent(c.v,c.parent)}),e.each(s.edges,function(c){l.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),l}return BS}var FS,L4;function qye(){if(L4)return FS;L4=1;var e=ba();FS=t;function t(n){var r={},a=[],i;function s(l){e.has(r,l)||(r[l]=!0,i.push(l),e.each(n.successors(l),s),e.each(n.predecessors(l),s))}return e.each(n.nodes(),function(l){i=[],s(l),i.length&&a.push(i)}),a}return FS}var HS,z4;function t7(){if(z4)return HS;z4=1;var e=ba();HS=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var a=this._keyIndices;if(n=String(n),!e.has(a,n)){var i=this._arr,s=i.length;return a[n]=s,i.push({key:n,priority:r}),this._decrease(s),!0}return!1},t.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},t.prototype.decrease=function(n,r){var a=this._keyIndices[n];if(r>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[a].priority+" New: "+r);this._arr[a].priority=r,this._decrease(a)},t.prototype._heapify=function(n){var r=this._arr,a=2*n,i=a+1,s=n;a<r.length&&(s=r[a].priority<r[s].priority?a:s,i<r.length&&(s=r[i].priority<r[s].priority?i:s),s!==n&&(this._swap(n,s),this._heapify(s)))},t.prototype._decrease=function(n){for(var r=this._arr,a=r[n].priority,i;n!==0&&(i=n>>1,!(r[i].priority<a));)this._swap(n,i),n=i},t.prototype._swap=function(n,r){var a=this._arr,i=this._keyIndices,s=a[n],l=a[r];a[n]=l,a[r]=s,i[l.key]=n,i[s.key]=r},HS}var US,$4;function n7(){if($4)return US;$4=1;var e=ba(),t=t7();US=r;var n=e.constant(1);function r(i,s,l,c){return a(i,String(s),l||n,c||function(d){return i.outEdges(d)})}function a(i,s,l,c){var d={},h=new t,m,g,v=function(b){var w=b.v!==m?b.v:b.w,S=d[w],j=l(b),k=g.distance+j;if(j<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+j);k<S.distance&&(S.distance=k,S.predecessor=m,h.decrease(w,k))};for(i.nodes().forEach(function(b){var w=b===s?0:Number.POSITIVE_INFINITY;d[b]={distance:w},h.add(b,w)});h.size()>0&&(m=h.removeMin(),g=d[m],g.distance!==Number.POSITIVE_INFINITY);)c(m).forEach(v);return d}return US}var GS,q4;function Bye(){if(q4)return GS;q4=1;var e=n7(),t=ba();GS=n;function n(r,a,i){return t.transform(r.nodes(),function(s,l){s[l]=e(r,l,a,i)},{})}return GS}var VS,B4;function r7(){if(B4)return VS;B4=1;var e=ba();VS=t;function t(n){var r=0,a=[],i={},s=[];function l(c){var d=i[c]={onStack:!0,lowlink:r,index:r++};if(a.push(c),n.successors(c).forEach(function(g){e.has(i,g)?i[g].onStack&&(d.lowlink=Math.min(d.lowlink,i[g].index)):(l(g),d.lowlink=Math.min(d.lowlink,i[g].lowlink))}),d.lowlink===d.index){var h=[],m;do m=a.pop(),i[m].onStack=!1,h.push(m);while(c!==m);s.push(h)}}return n.nodes().forEach(function(c){e.has(i,c)||l(c)}),s}return VS}var KS,F4;function Fye(){if(F4)return KS;F4=1;var e=ba(),t=r7();KS=n;function n(r){return e.filter(t(r),function(a){return a.length>1||a.length===1&&r.hasEdge(a[0],a[0])})}return KS}var YS,H4;function Hye(){if(H4)return YS;H4=1;var e=ba();YS=n;var t=e.constant(1);function n(a,i,s){return r(a,i||t,s||function(l){return a.outEdges(l)})}function r(a,i,s){var l={},c=a.nodes();return c.forEach(function(d){l[d]={},l[d][d]={distance:0},c.forEach(function(h){d!==h&&(l[d][h]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(h){var m=h.v===d?h.w:h.v,g=i(h);l[d][m]={distance:g,predecessor:d}})}),c.forEach(function(d){var h=l[d];c.forEach(function(m){var g=l[m];c.forEach(function(v){var b=g[d],w=h[v],S=g[v],j=b.distance+w.distance;j<S.distance&&(S.distance=j,S.predecessor=w.predecessor)})})}),l}return YS}var WS,U4;function a7(){if(U4)return WS;U4=1;var e=ba();WS=t,t.CycleException=n;function t(r){var a={},i={},s=[];function l(c){if(e.has(i,c))throw new n;e.has(a,c)||(i[c]=!0,a[c]=!0,e.each(r.predecessors(c),l),delete i[c],s.push(c))}if(e.each(r.sinks(),l),e.size(a)!==r.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,WS}var XS,G4;function Uye(){if(G4)return XS;G4=1;var e=a7();XS=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return XS}var ZS,V4;function i7(){if(V4)return ZS;V4=1;var e=ba();ZS=t;function t(r,a,i){e.isArray(a)||(a=[a]);var s=(r.isDirected()?r.successors:r.neighbors).bind(r),l=[],c={};return e.each(a,function(d){if(!r.hasNode(d))throw new Error("Graph does not have node: "+d);n(r,d,i==="post",c,s,l)}),l}function n(r,a,i,s,l,c){e.has(s,a)||(s[a]=!0,i||c.push(a),e.each(l(a),function(d){n(r,d,i,s,l,c)}),i&&c.push(a))}return ZS}var QS,K4;function Gye(){if(K4)return QS;K4=1;var e=i7();QS=t;function t(n,r){return e(n,r,"post")}return QS}var JS,Y4;function Vye(){if(Y4)return JS;Y4=1;var e=i7();JS=t;function t(n,r){return e(n,r,"pre")}return JS}var ej,W4;function Kye(){if(W4)return ej;W4=1;var e=ba(),t=V2(),n=t7();ej=r;function r(a,i){var s=new t,l={},c=new n,d;function h(g){var v=g.v===d?g.w:g.v,b=c.priority(v);if(b!==void 0){var w=i(g);w<b&&(l[v]=d,c.decrease(v,w))}}if(a.nodeCount()===0)return s;e.each(a.nodes(),function(g){c.add(g,Number.POSITIVE_INFINITY),s.setNode(g)}),c.decrease(a.nodes()[0],0);for(var m=!1;c.size()>0;){if(d=c.removeMin(),e.has(l,d))s.setEdge(d,l[d]);else{if(m)throw new Error("Input graph is not connected: "+a);m=!0}a.nodeEdges(d).forEach(h)}return s}return ej}var tj,X4;function Yye(){return X4||(X4=1,tj={components:qye(),dijkstra:n7(),dijkstraAll:Bye(),findCycles:Fye(),floydWarshall:Hye(),isAcyclic:Uye(),postorder:Gye(),preorder:Vye(),prim:Kye(),tarjan:r7(),topsort:a7()}),tj}var nj,Z4;function Wye(){if(Z4)return nj;Z4=1;var e=zye();return nj={Graph:e.Graph,json:$ye(),alg:Yye(),version:e.version},nj}var rj,Q4;function La(){if(Q4)return rj;Q4=1;var e;if(typeof T2=="function")try{e=Wye()}catch{}return e||(e=window.graphlib),rj=e,rj}var aj,J4;function Xye(){if(J4)return aj;J4=1;var e=TU(),t=1,n=4;function r(a){return e(a,t|n)}return aj=r,aj}var ij,eL;function Sv(){if(eL)return ij;eL=1;var e=cc(),t=us(),n=hv(),r=xa();function a(i,s,l){if(!r(l))return!1;var c=typeof s;return(c=="number"?t(l)&&n(s,l.length):c=="string"&&s in l)?e(l[s],i):!1}return ij=a,ij}var sj,tL;function Zye(){if(tL)return sj;tL=1;var e=wv(),t=cc(),n=Sv(),r=jl(),a=Object.prototype,i=a.hasOwnProperty,s=e(function(l,c){l=Object(l);var d=-1,h=c.length,m=h>2?c[2]:void 0;for(m&&n(c[0],c[1],m)&&(h=1);++d<h;)for(var g=c[d],v=r(g),b=-1,w=v.length;++b<w;){var S=v[b],j=l[S];(j===void 0||t(j,a[S])&&!i.call(l,S))&&(l[S]=g[S])}return l});return sj=s,sj}var oj,nL;function Qye(){if(nL)return oj;nL=1;var e=cs(),t=us(),n=uo();function r(a){return function(i,s,l){var c=Object(i);if(!t(i)){var d=e(s,3);i=n(i),s=function(m){return d(c[m],m,c)}}var h=a(i,s,l);return h>-1?c[d?i[h]:h]:void 0}}return oj=r,oj}var lj,rL;function Jye(){if(rL)return lj;rL=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return lj=t,lj}var uj,aL;function exe(){if(aL)return uj;aL=1;var e=Jye(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return uj=n,uj}var cj,iL;function txe(){if(iL)return cj;iL=1;var e=exe(),t=xa(),n=mc(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=t(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var m=i.test(d);return m||s.test(d)?l(d.slice(2),m?2:8):a.test(d)?r:+d}return cj=c,cj}var dj,sL;function s7(){if(sL)return dj;sL=1;var e=txe(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return dj=r,dj}var fj,oL;function nxe(){if(oL)return fj;oL=1;var e=s7();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return fj=t,fj}var hj,lL;function rxe(){if(lL)return hj;lL=1;var e=QU(),t=cs(),n=nxe(),r=Math.max;function a(i,s,l){var c=i==null?0:i.length;if(!c)return-1;var d=l==null?0:n(l);return d<0&&(d=r(c+d,0)),e(i,t(s,3),d)}return hj=a,hj}var mj,uL;function axe(){if(uL)return mj;uL=1;var e=Qye(),t=rxe(),n=e(t);return mj=n,mj}var pj,cL;function o7(){if(cL)return pj;cL=1;var e=G2();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return pj=t,pj}var gj,dL;function ixe(){if(dL)return gj;dL=1;var e=B2(),t=OU(),n=jl();function r(a,i){return a==null?a:e(a,t(i),n)}return gj=r,gj}var vj,fL;function sxe(){if(fL)return vj;fL=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return vj=e,vj}var yj,hL;function oxe(){if(hL)return yj;hL=1;var e=dv(),t=F2(),n=cs();function r(a,i){var s={};return i=n(i,3),t(a,function(l,c,d){e(s,c,i(l,c,d))}),s}return yj=r,yj}var xj,mL;function K2(){if(mL)return xj;mL=1;var e=mc();function t(n,r,a){for(var i=-1,s=n.length;++i<s;){var l=n[i],c=r(l);if(c!=null&&(d===void 0?c===c&&!e(c):a(c,d)))var d=c,h=l}return h}return xj=t,xj}var bj,pL;function lxe(){if(pL)return bj;pL=1;function e(t,n){return t>n}return bj=e,bj}var wj,gL;function uxe(){if(gL)return wj;gL=1;var e=K2(),t=lxe(),n=_l();function r(a){return a&&a.length?e(a,n,t):void 0}return wj=r,wj}var Sj,vL;function l7(){if(vL)return Sj;vL=1;var e=dv(),t=cc();function n(r,a,i){(i!==void 0&&!t(r[a],i)||i===void 0&&!(a in r))&&e(r,a,i)}return Sj=n,Sj}var jj,yL;function cxe(){if(yL)return jj;yL=1;var e=wl(),t=gv(),n=bi(),r="[object Object]",a=Function.prototype,i=Object.prototype,s=a.toString,l=i.hasOwnProperty,c=s.call(Object);function d(h){if(!n(h)||e(h)!=r)return!1;var m=t(h);if(m===null)return!0;var g=l.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==c}return jj=d,jj}var _j,xL;function u7(){if(xL)return _j;xL=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return _j=e,_j}var kj,bL;function dxe(){if(bL)return kj;bL=1;var e=Hf(),t=jl();function n(r){return e(r,t(r))}return kj=n,kj}var Cj,wL;function fxe(){if(wL)return Cj;wL=1;var e=l7(),t=yU(),n=NU(),r=xU(),a=AU(),i=Uf(),s=In(),l=JU(),c=fc(),d=Ff(),h=xa(),m=cxe(),g=Gf(),v=u7(),b=dxe();function w(S,j,k,_,E,T,A){var O=v(S,k),D=v(j,k),P=A.get(D);if(P){e(S,k,P);return}var M=T?T(O,D,k+"",S,j,A):void 0,z=M===void 0;if(z){var L=s(D),F=!L&&c(D),R=!L&&!F&&g(D);M=D,L||F||R?s(O)?M=O:l(O)?M=r(O):F?(z=!1,M=t(D,!0)):R?(z=!1,M=n(D,!0)):M=[]:m(D)||i(D)?(M=O,i(O)?M=b(O):(!h(O)||d(O))&&(M=a(D))):z=!1}z&&(A.set(D,M),E(M,D,_,T,A),A.delete(D)),e(S,k,M)}return Cj=w,Cj}var Nj,SL;function hxe(){if(SL)return Nj;SL=1;var e=cv(),t=l7(),n=B2(),r=fxe(),a=xa(),i=jl(),s=u7();function l(c,d,h,m,g){c!==d&&n(d,function(v,b){if(g||(g=new e),a(v))r(c,d,b,h,l,m,g);else{var w=m?m(s(c,b),v,b+"",c,d,g):void 0;w===void 0&&(w=v),t(c,b,w)}},i)}return Nj=l,Nj}var Ej,jL;function mxe(){if(jL)return Ej;jL=1;var e=wv(),t=Sv();function n(r){return e(function(a,i){var s=-1,l=i.length,c=l>1?i[l-1]:void 0,d=l>2?i[2]:void 0;for(c=r.length>3&&typeof c=="function"?(l--,c):void 0,d&&t(i[0],i[1],d)&&(c=l<3?void 0:c,l=1),a=Object(a);++s<l;){var h=i[s];h&&r(a,h,s,c)}return a})}return Ej=n,Ej}var Aj,_L;function pxe(){if(_L)return Aj;_L=1;var e=hxe(),t=mxe(),n=t(function(r,a,i){e(r,a,i)});return Aj=n,Aj}var Tj,kL;function c7(){if(kL)return Tj;kL=1;function e(t,n){return t<n}return Tj=e,Tj}var Oj,CL;function gxe(){if(CL)return Oj;CL=1;var e=K2(),t=c7(),n=_l();function r(a){return a&&a.length?e(a,n,t):void 0}return Oj=r,Oj}var Mj,NL;function vxe(){if(NL)return Mj;NL=1;var e=K2(),t=cs(),n=c7();function r(a,i){return a&&a.length?e(a,t(i,2),n):void 0}return Mj=r,Mj}var Pj,EL;function yxe(){if(EL)return Pj;EL=1;var e=Ba(),t=function(){return e.Date.now()};return Pj=t,Pj}var Dj,AL;function xxe(){if(AL)return Dj;AL=1;var e=fv(),t=xv(),n=hv(),r=xa(),a=Vf();function i(s,l,c,d){if(!r(s))return s;l=t(l,s);for(var h=-1,m=l.length,g=m-1,v=s;v!=null&&++h<m;){var b=a(l[h]),w=c;if(b==="__proto__"||b==="constructor"||b==="prototype")return s;if(h!=g){var S=v[b];w=d?d(S,b,v):void 0,w===void 0&&(w=r(S)?S:n(l[h+1])?[]:{})}e(v,b,w),v=v[b]}return s}return Dj=i,Dj}var Rj,TL;function bxe(){if(TL)return Rj;TL=1;var e=bv(),t=xxe(),n=xv();function r(a,i,s){for(var l=-1,c=i.length,d={};++l<c;){var h=i[l],m=e(a,h);s(m,h)&&t(d,n(h,a),m)}return d}return Rj=r,Rj}var Ij,OL;function wxe(){if(OL)return Ij;OL=1;var e=bxe(),t=FU();function n(r,a){return e(r,a,function(i,s){return t(r,s)})}return Ij=n,Ij}var Lj,ML;function Sxe(){if(ML)return Lj;ML=1;var e=o7(),t=XU(),n=ZU();function r(a){return n(t(a,void 0,e),a+"")}return Lj=r,Lj}var zj,PL;function jxe(){if(PL)return zj;PL=1;var e=wxe(),t=Sxe(),n=t(function(r,a){return r==null?{}:e(r,a)});return zj=n,zj}var $j,DL;function _xe(){if(DL)return $j;DL=1;var e=Math.ceil,t=Math.max;function n(r,a,i,s){for(var l=-1,c=t(e((a-r)/(i||1)),0),d=Array(c);c--;)d[s?c:++l]=r,r+=i;return d}return $j=n,$j}var qj,RL;function kxe(){if(RL)return qj;RL=1;var e=_xe(),t=Sv(),n=s7();function r(a){return function(i,s,l){return l&&typeof l!="number"&&t(i,s,l)&&(s=l=void 0),i=n(i),s===void 0?(s=i,i=0):s=n(s),l=l===void 0?i<s?1:-1:n(l),e(i,s,l,a)}}return qj=r,qj}var Bj,IL;function Cxe(){if(IL)return Bj;IL=1;var e=kxe(),t=e();return Bj=t,Bj}var Fj,LL;function Nxe(){if(LL)return Fj;LL=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Fj=e,Fj}var Hj,zL;function Exe(){if(zL)return Hj;zL=1;var e=mc();function t(n,r){if(n!==r){var a=n!==void 0,i=n===null,s=n===n,l=e(n),c=r!==void 0,d=r===null,h=r===r,m=e(r);if(!d&&!m&&!l&&n>r||l&&c&&h&&!d&&!m||i&&c&&h||!a&&h||!s)return 1;if(!i&&!l&&!m&&n<r||m&&a&&s&&!i&&!l||d&&a&&s||!c&&s||!h)return-1}return 0}return Hj=t,Hj}var Uj,$L;function Axe(){if($L)return Uj;$L=1;var e=Exe();function t(n,r,a){for(var i=-1,s=n.criteria,l=r.criteria,c=s.length,d=a.length;++i<c;){var h=e(s[i],l[i]);if(h){if(i>=d)return h;var m=a[i];return h*(m=="desc"?-1:1)}}return n.index-r.index}return Uj=t,Uj}var Gj,qL;function Txe(){if(qL)return Gj;qL=1;var e=yv(),t=bv(),n=cs(),r=KU(),a=Nxe(),i=mv(),s=Axe(),l=_l(),c=In();function d(h,m,g){m.length?m=e(m,function(w){return c(w)?function(S){return t(S,w.length===1?w[0]:w)}:w}):m=[l];var v=-1;m=e(m,i(n));var b=r(h,function(w,S,j){var k=e(m,function(_){return _(w)});return{criteria:k,index:++v,value:w}});return a(b,function(w,S){return s(w,S,g)})}return Gj=d,Gj}var Vj,BL;function Oxe(){if(BL)return Vj;BL=1;var e=G2(),t=Txe(),n=wv(),r=Sv(),a=n(function(i,s){if(i==null)return[];var l=s.length;return l>1&&r(i,s[0],s[1])?s=[]:l>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Vj=a,Vj}var Kj,FL;function Mxe(){if(FL)return Kj;FL=1;var e=qU(),t=0;function n(r){var a=++t;return e(r)+a}return Kj=n,Kj}var Yj,HL;function Pxe(){if(HL)return Yj;HL=1;function e(t,n,r){for(var a=-1,i=t.length,s=n.length,l={};++a<i;){var c=a<s?n[a]:void 0;r(l,t[a],c)}return l}return Yj=e,Yj}var Wj,UL;function Dxe(){if(UL)return Wj;UL=1;var e=fv(),t=Pxe();function n(r,a){return t(r||[],a||[],e)}return Wj=n,Wj}var Xj,GL;function fn(){if(GL)return Xj;GL=1;var e;if(typeof T2=="function")try{e={cloneDeep:Xye(),constant:q2(),defaults:Zye(),each:PU(),filter:UU(),find:axe(),flatten:o7(),forEach:MU(),forIn:ixe(),has:GU(),isUndefined:VU(),last:sxe(),map:YU(),mapValues:oxe(),max:uxe(),merge:pxe(),min:gxe(),minBy:vxe(),now:yxe(),pick:jxe(),range:Cxe(),reduce:WU(),sortBy:Oxe(),uniqueId:Mxe(),values:e7(),zipObject:Dxe()}}catch{}return e||(e=window._),Xj=e,Xj}var Zj,VL;function Rxe(){if(VL)return Zj;VL=1,Zj=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,a=r._prev;if(a!==r)return t(a),a},e.prototype.enqueue=function(r){var a=this._sentinel;r._prev&&r._next&&t(r),r._next=a._next,a._next._prev=r,a._next=r,r._prev=a},e.prototype.toString=function(){for(var r=[],a=this._sentinel,i=a._prev;i!==a;)r.push(JSON.stringify(i,n)),i=i._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,a){if(r!=="_next"&&r!=="_prev")return a}return Zj}var Qj,KL;function Ixe(){if(KL)return Qj;KL=1;var e=fn(),t=La().Graph,n=Rxe();Qj=a;var r=e.constant(1);function a(d,h){if(d.nodeCount()<=1)return[];var m=l(d,h||r),g=i(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(v){return d.outEdges(v.v,v.w)}),!0)}function i(d,h,m){for(var g=[],v=h[h.length-1],b=h[0],w;d.nodeCount();){for(;w=b.dequeue();)s(d,h,m,w);for(;w=v.dequeue();)s(d,h,m,w);if(d.nodeCount()){for(var S=h.length-2;S>0;--S)if(w=h[S].dequeue(),w){g=g.concat(s(d,h,m,w,!0));break}}}return g}function s(d,h,m,g,v){var b=v?[]:void 0;return e.forEach(d.inEdges(g.v),function(w){var S=d.edge(w),j=d.node(w.v);v&&b.push({v:w.v,w:w.w}),j.out-=S,c(h,m,j)}),e.forEach(d.outEdges(g.v),function(w){var S=d.edge(w),j=w.w,k=d.node(j);k.in-=S,c(h,m,k)}),d.removeNode(g.v),b}function l(d,h){var m=new t,g=0,v=0;e.forEach(d.nodes(),function(S){m.setNode(S,{v:S,in:0,out:0})}),e.forEach(d.edges(),function(S){var j=m.edge(S.v,S.w)||0,k=h(S),_=j+k;m.setEdge(S.v,S.w,_),v=Math.max(v,m.node(S.v).out+=k),g=Math.max(g,m.node(S.w).in+=k)});var b=e.range(v+g+3).map(function(){return new n}),w=g+1;return e.forEach(m.nodes(),function(S){c(b,w,m.node(S))}),{graph:m,buckets:b,zeroIdx:w}}function c(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 Qj}var Jj,YL;function Lxe(){if(YL)return Jj;YL=1;var e=fn(),t=Ixe();Jj={run:n,undo:a};function n(i){var s=i.graph().acyclicer==="greedy"?t(i,l(i)):r(i);e.forEach(s,function(c){var d=i.edge(c);i.removeEdge(c),d.forwardName=c.name,d.reversed=!0,i.setEdge(c.w,c.v,d,e.uniqueId("rev"))});function l(c){return function(d){return c.edge(d).weight}}}function r(i){var s=[],l={},c={};function d(h){e.has(c,h)||(c[h]=!0,l[h]=!0,e.forEach(i.outEdges(h),function(m){e.has(l,m.w)?s.push(m):d(m.w)}),delete l[h])}return e.forEach(i.nodes(),d),s}function a(i){e.forEach(i.edges(),function(s){var l=i.edge(s);if(l.reversed){i.removeEdge(s);var c=l.forwardName;delete l.reversed,delete l.forwardName,i.setEdge(s.w,s.v,l,c)}})}return Jj}var e_,WL;function Or(){if(WL)return e_;WL=1;var e=fn(),t=La().Graph;e_={addDummyNode:n,simplify:r,asNonCompoundGraph:a,successorWeights:i,predecessorWeights:s,intersectRect:l,buildLayerMatrix:c,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:m,maxRank:g,partition:v,time:b,notime:w};function n(S,j,k,_){var E;do E=e.uniqueId(_);while(S.hasNode(E));return k.dummy=j,S.setNode(E,k),E}function r(S){var j=new t().setGraph(S.graph());return e.forEach(S.nodes(),function(k){j.setNode(k,S.node(k))}),e.forEach(S.edges(),function(k){var _=j.edge(k.v,k.w)||{weight:0,minlen:1},E=S.edge(k);j.setEdge(k.v,k.w,{weight:_.weight+E.weight,minlen:Math.max(_.minlen,E.minlen)})}),j}function a(S){var j=new t({multigraph:S.isMultigraph()}).setGraph(S.graph());return e.forEach(S.nodes(),function(k){S.children(k).length||j.setNode(k,S.node(k))}),e.forEach(S.edges(),function(k){j.setEdge(k,S.edge(k))}),j}function i(S){var j=e.map(S.nodes(),function(k){var _={};return e.forEach(S.outEdges(k),function(E){_[E.w]=(_[E.w]||0)+S.edge(E).weight}),_});return e.zipObject(S.nodes(),j)}function s(S){var j=e.map(S.nodes(),function(k){var _={};return e.forEach(S.inEdges(k),function(E){_[E.v]=(_[E.v]||0)+S.edge(E).weight}),_});return e.zipObject(S.nodes(),j)}function l(S,j){var k=S.x,_=S.y,E=j.x-k,T=j.y-_,A=S.width/2,O=S.height/2;if(!E&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var D,P;return Math.abs(T)*A>Math.abs(E)*O?(T<0&&(O=-O),D=O*E/T,P=O):(E<0&&(A=-A),D=A,P=A*T/E),{x:k+D,y:_+P}}function c(S){var j=e.map(e.range(g(S)+1),function(){return[]});return e.forEach(S.nodes(),function(k){var _=S.node(k),E=_.rank;e.isUndefined(E)||(j[E][_.order]=k)}),j}function d(S){var j=e.min(e.map(S.nodes(),function(k){return S.node(k).rank}));e.forEach(S.nodes(),function(k){var _=S.node(k);e.has(_,"rank")&&(_.rank-=j)})}function h(S){var j=e.min(e.map(S.nodes(),function(T){return S.node(T).rank})),k=[];e.forEach(S.nodes(),function(T){var A=S.node(T).rank-j;k[A]||(k[A]=[]),k[A].push(T)});var _=0,E=S.graph().nodeRankFactor;e.forEach(k,function(T,A){e.isUndefined(T)&&A%E!==0?--_:_&&e.forEach(T,function(O){S.node(O).rank+=_})})}function m(S,j,k,_){var E={width:0,height:0};return arguments.length>=4&&(E.rank=k,E.order=_),n(S,"border",E,j)}function g(S){return e.max(e.map(S.nodes(),function(j){var k=S.node(j).rank;if(!e.isUndefined(k))return k}))}function v(S,j){var k={lhs:[],rhs:[]};return e.forEach(S,function(_){j(_)?k.lhs.push(_):k.rhs.push(_)}),k}function b(S,j){var k=e.now();try{return j()}finally{console.log(S+" time: "+(e.now()-k)+"ms")}}function w(S,j){return j()}return e_}var t_,XL;function zxe(){if(XL)return t_;XL=1;var e=fn(),t=Or();t_={run:n,undo:a};function n(i){i.graph().dummyChains=[],e.forEach(i.edges(),function(s){r(i,s)})}function r(i,s){var l=s.v,c=i.node(l).rank,d=s.w,h=i.node(d).rank,m=s.name,g=i.edge(s),v=g.labelRank;if(h!==c+1){i.removeEdge(s);var b,w,S;for(S=0,++c;c<h;++S,++c)g.points=[],w={width:0,height:0,edgeLabel:g,edgeObj:s,rank:c},b=t.addDummyNode(i,"edge",w,"_d"),c===v&&(w.width=g.width,w.height=g.height,w.dummy="edge-label",w.labelpos=g.labelpos),i.setEdge(l,b,{weight:g.weight},m),S===0&&i.graph().dummyChains.push(b),l=b;i.setEdge(l,d,{weight:g.weight},m)}}function a(i){e.forEach(i.graph().dummyChains,function(s){var l=i.node(s),c=l.edgeLabel,d;for(i.setEdge(l.edgeObj,c);l.dummy;)d=i.successors(s)[0],i.removeNode(s),c.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(c.x=l.x,c.y=l.y,c.width=l.width,c.height=l.height),s=d,l=i.node(s)})}return t_}var n_,ZL;function Fp(){if(ZL)return n_;ZL=1;var e=fn();n_={longestPath:t,slack:n};function t(r){var a={};function i(s){var l=r.node(s);if(e.has(a,s))return l.rank;a[s]=!0;var c=e.min(e.map(r.outEdges(s),function(d){return i(d.w)-r.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),l.rank=c}e.forEach(r.sources(),i)}function n(r,a){return r.node(a.w).rank-r.node(a.v).rank-r.edge(a).minlen}return n_}var r_,QL;function d7(){if(QL)return r_;QL=1;var e=fn(),t=La().Graph,n=Fp().slack;r_=r;function r(l){var c=new t({directed:!1}),d=l.nodes()[0],h=l.nodeCount();c.setNode(d,{});for(var m,g;a(c,l)<h;)m=i(c,l),g=c.hasNode(m.v)?n(l,m):-n(l,m),s(c,l,g);return c}function a(l,c){function d(h){e.forEach(c.nodeEdges(h),function(m){var g=m.v,v=h===g?m.w:g;!l.hasNode(v)&&!n(c,m)&&(l.setNode(v,{}),l.setEdge(h,v,{}),d(v))})}return e.forEach(l.nodes(),d),l.nodeCount()}function i(l,c){return e.minBy(c.edges(),function(d){if(l.hasNode(d.v)!==l.hasNode(d.w))return n(c,d)})}function s(l,c,d){e.forEach(l.nodes(),function(h){c.node(h).rank+=d})}return r_}var a_,JL;function $xe(){if(JL)return a_;JL=1;var e=fn(),t=d7(),n=Fp().slack,r=Fp().longestPath,a=La().alg.preorder,i=La().alg.postorder,s=Or().simplify;a_=l,l.initLowLimValues=m,l.initCutValues=c,l.calcCutValue=h,l.leaveEdge=v,l.enterEdge=b,l.exchangeEdges=w;function l(_){_=s(_),r(_);var E=t(_);m(E),c(E,_);for(var T,A;T=v(E);)A=b(E,_,T),w(E,_,T,A)}function c(_,E){var T=i(_,_.nodes());T=T.slice(0,T.length-1),e.forEach(T,function(A){d(_,E,A)})}function d(_,E,T){var A=_.node(T),O=A.parent;_.edge(T,O).cutvalue=h(_,E,T)}function h(_,E,T){var A=_.node(T),O=A.parent,D=!0,P=E.edge(T,O),M=0;return P||(D=!1,P=E.edge(O,T)),M=P.weight,e.forEach(E.nodeEdges(T),function(z){var L=z.v===T,F=L?z.w:z.v;if(F!==O){var R=L===D,I=E.edge(z).weight;if(M+=R?I:-I,j(_,T,F)){var q=_.edge(T,F).cutvalue;M+=R?-q:q}}}),M}function m(_,E){arguments.length<2&&(E=_.nodes()[0]),g(_,{},1,E)}function g(_,E,T,A,O){var D=T,P=_.node(A);return E[A]=!0,e.forEach(_.neighbors(A),function(M){e.has(E,M)||(T=g(_,E,T,M,A))}),P.low=D,P.lim=T++,O?P.parent=O:delete P.parent,T}function v(_){return e.find(_.edges(),function(E){return _.edge(E).cutvalue<0})}function b(_,E,T){var A=T.v,O=T.w;E.hasEdge(A,O)||(A=T.w,O=T.v);var D=_.node(A),P=_.node(O),M=D,z=!1;D.lim>P.lim&&(M=P,z=!0);var L=e.filter(E.edges(),function(F){return z===k(_,_.node(F.v),M)&&z!==k(_,_.node(F.w),M)});return e.minBy(L,function(F){return n(E,F)})}function w(_,E,T,A){var O=T.v,D=T.w;_.removeEdge(O,D),_.setEdge(A.v,A.w,{}),m(_),c(_,E),S(_,E)}function S(_,E){var T=e.find(_.nodes(),function(O){return!E.node(O).parent}),A=a(_,T);A=A.slice(1),e.forEach(A,function(O){var D=_.node(O).parent,P=E.edge(O,D),M=!1;P||(P=E.edge(D,O),M=!0),E.node(O).rank=E.node(D).rank+(M?P.minlen:-P.minlen)})}function j(_,E,T){return _.hasEdge(E,T)}function k(_,E,T){return T.low<=E.lim&&E.lim<=T.lim}return a_}var i_,ez;function qxe(){if(ez)return i_;ez=1;var e=Fp(),t=e.longestPath,n=d7(),r=$xe();i_=a;function a(c){switch(c.graph().ranker){case"network-simplex":l(c);break;case"tight-tree":s(c);break;case"longest-path":i(c);break;default:l(c)}}var i=t;function s(c){t(c),n(c)}function l(c){r(c)}return i_}var s_,tz;function Bxe(){if(tz)return s_;tz=1;var e=fn();s_=t;function t(a){var i=r(a);e.forEach(a.graph().dummyChains,function(s){for(var l=a.node(s),c=l.edgeObj,d=n(a,i,c.v,c.w),h=d.path,m=d.lca,g=0,v=h[g],b=!0;s!==c.w;){if(l=a.node(s),b){for(;(v=h[g])!==m&&a.node(v).maxRank<l.rank;)g++;v===m&&(b=!1)}if(!b){for(;g<h.length-1&&a.node(v=h[g+1]).minRank<=l.rank;)g++;v=h[g]}a.setParent(s,v),s=a.successors(s)[0]}})}function n(a,i,s,l){var c=[],d=[],h=Math.min(i[s].low,i[l].low),m=Math.max(i[s].lim,i[l].lim),g,v;g=s;do g=a.parent(g),c.push(g);while(g&&(i[g].low>h||m>i[g].lim));for(v=g,g=l;(g=a.parent(g))!==v;)d.push(g);return{path:c.concat(d.reverse()),lca:v}}function r(a){var i={},s=0;function l(c){var d=s;e.forEach(a.children(c),l),i[c]={low:d,lim:s++}}return e.forEach(a.children(),l),i}return s_}var o_,nz;function Fxe(){if(nz)return o_;nz=1;var e=fn(),t=Or();o_={run:n,cleanup:s};function n(l){var c=t.addDummyNode(l,"root",{},"_root"),d=a(l),h=e.max(e.values(d))-1,m=2*h+1;l.graph().nestingRoot=c,e.forEach(l.edges(),function(v){l.edge(v).minlen*=m});var g=i(l)+1;e.forEach(l.children(),function(v){r(l,c,m,g,h,d,v)}),l.graph().nodeRankFactor=m}function r(l,c,d,h,m,g,v){var b=l.children(v);if(!b.length){v!==c&&l.setEdge(c,v,{weight:0,minlen:d});return}var w=t.addBorderNode(l,"_bt"),S=t.addBorderNode(l,"_bb"),j=l.node(v);l.setParent(w,v),j.borderTop=w,l.setParent(S,v),j.borderBottom=S,e.forEach(b,function(k){r(l,c,d,h,m,g,k);var _=l.node(k),E=_.borderTop?_.borderTop:k,T=_.borderBottom?_.borderBottom:k,A=_.borderTop?h:2*h,O=E!==T?1:m-g[v]+1;l.setEdge(w,E,{weight:A,minlen:O,nestingEdge:!0}),l.setEdge(T,S,{weight:A,minlen:O,nestingEdge:!0})}),l.parent(v)||l.setEdge(c,w,{weight:0,minlen:m+g[v]})}function a(l){var c={};function d(h,m){var g=l.children(h);g&&g.length&&e.forEach(g,function(v){d(v,m+1)}),c[h]=m}return e.forEach(l.children(),function(h){d(h,1)}),c}function i(l){return e.reduce(l.edges(),function(c,d){return c+l.edge(d).weight},0)}function s(l){var c=l.graph();l.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(l.edges(),function(d){var h=l.edge(d);h.nestingEdge&&l.removeEdge(d)})}return o_}var l_,rz;function Hxe(){if(rz)return l_;rz=1;var e=fn(),t=Or();l_=n;function n(a){function i(s){var l=a.children(s),c=a.node(s);if(l.length&&e.forEach(l,i),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var d=c.minRank,h=c.maxRank+1;d<h;++d)r(a,"borderLeft","_bl",s,c,d),r(a,"borderRight","_br",s,c,d)}}e.forEach(a.children(),i)}function r(a,i,s,l,c,d){var h={width:0,height:0,rank:d,borderType:i},m=c[i][d-1],g=t.addDummyNode(a,"border",h,s);c[i][d]=g,a.setParent(g,l),m&&a.setEdge(m,g,{weight:1})}return l_}var u_,az;function Uxe(){if(az)return u_;az=1;var e=fn();u_={adjust:t,undo:n};function t(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&r(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&i(d),(h==="lr"||h==="rl")&&(l(d),r(d))}function r(d){e.forEach(d.nodes(),function(h){a(d.node(h))}),e.forEach(d.edges(),function(h){a(d.edge(h))})}function a(d){var h=d.width;d.width=d.height,d.height=h}function i(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 l(d){e.forEach(d.nodes(),function(h){c(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,c),e.has(m,"x")&&c(m)})}function c(d){var h=d.x;d.x=d.y,d.y=h}return u_}var c_,iz;function Gxe(){if(iz)return c_;iz=1;var e=fn();c_=t;function t(n){var r={},a=e.filter(n.nodes(),function(d){return!n.children(d).length}),i=e.max(e.map(a,function(d){return n.node(d).rank})),s=e.map(e.range(i+1),function(){return[]});function l(d){if(!e.has(r,d)){r[d]=!0;var h=n.node(d);s[h.rank].push(d),e.forEach(n.successors(d),l)}}var c=e.sortBy(a,function(d){return n.node(d).rank});return e.forEach(c,l),s}return c_}var d_,sz;function Vxe(){if(sz)return d_;sz=1;var e=fn();d_=t;function t(r,a){for(var i=0,s=1;s<a.length;++s)i+=n(r,a[s-1],a[s]);return i}function n(r,a,i){for(var s=e.zipObject(i,e.map(i,function(g,v){return v})),l=e.flatten(e.map(a,function(g){return e.sortBy(e.map(r.outEdges(g),function(v){return{pos:s[v.w],weight:r.edge(v).weight}}),"pos")}),!0),c=1;c<i.length;)c<<=1;var d=2*c-1;c-=1;var h=e.map(new Array(d),function(){return 0}),m=0;return e.forEach(l.forEach(function(g){var v=g.pos+c;h[v]+=g.weight;for(var b=0;v>0;)v%2&&(b+=h[v+1]),v=v-1>>1,h[v]+=g.weight;m+=g.weight*b})),m}return d_}var f_,oz;function Kxe(){if(oz)return f_;oz=1;var e=fn();f_=t;function t(n,r){return e.map(r,function(a){var i=n.inEdges(a);if(i.length){var s=e.reduce(i,function(l,c){var d=n.edge(c),h=n.node(c.v);return{sum:l.sum+d.weight*h.order,weight:l.weight+d.weight}},{sum:0,weight:0});return{v:a,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:a}})}return f_}var h_,lz;function Yxe(){if(lz)return h_;lz=1;var e=fn();h_=t;function t(a,i){var s={};e.forEach(a,function(c,d){var h=s[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};e.isUndefined(c.barycenter)||(h.barycenter=c.barycenter,h.weight=c.weight)}),e.forEach(i.edges(),function(c){var d=s[c.v],h=s[c.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(s[c.w]))});var l=e.filter(s,function(c){return!c.indegree});return n(l)}function n(a){var i=[];function s(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&r(d,h)}}function l(d){return function(h){h.in.push(d),--h.indegree===0&&a.push(h)}}for(;a.length;){var c=a.pop();i.push(c),e.forEach(c.in.reverse(),s(c)),e.forEach(c.out,l(c))}return e.map(e.filter(i,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function r(a,i){var s=0,l=0;a.weight&&(s+=a.barycenter*a.weight,l+=a.weight),i.weight&&(s+=i.barycenter*i.weight,l+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=s/l,a.weight=l,a.i=Math.min(i.i,a.i),i.merged=!0}return h_}var m_,uz;function Wxe(){if(uz)return m_;uz=1;var e=fn(),t=Or();m_=n;function n(i,s){var l=t.partition(i,function(w){return e.has(w,"barycenter")}),c=l.lhs,d=e.sortBy(l.rhs,function(w){return-w.i}),h=[],m=0,g=0,v=0;c.sort(a(!!s)),v=r(h,d,v),e.forEach(c,function(w){v+=w.vs.length,h.push(w.vs),m+=w.barycenter*w.weight,g+=w.weight,v=r(h,d,v)});var b={vs:e.flatten(h,!0)};return g&&(b.barycenter=m/g,b.weight=g),b}function r(i,s,l){for(var c;s.length&&(c=e.last(s)).i<=l;)s.pop(),i.push(c.vs),l++;return l}function a(i){return function(s,l){return s.barycenter<l.barycenter?-1:s.barycenter>l.barycenter?1:i?l.i-s.i:s.i-l.i}}return m_}var p_,cz;function Xxe(){if(cz)return p_;cz=1;var e=fn(),t=Kxe(),n=Yxe(),r=Wxe();p_=a;function a(l,c,d,h){var m=l.children(c),g=l.node(c),v=g?g.borderLeft:void 0,b=g?g.borderRight:void 0,w={};v&&(m=e.filter(m,function(T){return T!==v&&T!==b}));var S=t(l,m);e.forEach(S,function(T){if(l.children(T.v).length){var A=a(l,T.v,d,h);w[T.v]=A,e.has(A,"barycenter")&&s(T,A)}});var j=n(S,d);i(j,w);var k=r(j,h);if(v&&(k.vs=e.flatten([v,k.vs,b],!0),l.predecessors(v).length)){var _=l.node(l.predecessors(v)[0]),E=l.node(l.predecessors(b)[0]);e.has(k,"barycenter")||(k.barycenter=0,k.weight=0),k.barycenter=(k.barycenter*k.weight+_.order+E.order)/(k.weight+2),k.weight+=2}return k}function i(l,c){e.forEach(l,function(d){d.vs=e.flatten(d.vs.map(function(h){return c[h]?c[h].vs:h}),!0)})}function s(l,c){e.isUndefined(l.barycenter)?(l.barycenter=c.barycenter,l.weight=c.weight):(l.barycenter=(l.barycenter*l.weight+c.barycenter*c.weight)/(l.weight+c.weight),l.weight+=c.weight)}return p_}var g_,dz;function Zxe(){if(dz)return g_;dz=1;var e=fn(),t=La().Graph;g_=n;function n(a,i,s){var l=r(a),c=new t({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(function(d){return a.node(d)});return e.forEach(a.nodes(),function(d){var h=a.node(d),m=a.parent(d);(h.rank===i||h.minRank<=i&&i<=h.maxRank)&&(c.setNode(d),c.setParent(d,m||l),e.forEach(a[s](d),function(g){var v=g.v===d?g.w:g.v,b=c.edge(v,d),w=e.isUndefined(b)?0:b.weight;c.setEdge(v,d,{weight:a.edge(g).weight+w})}),e.has(h,"minRank")&&c.setNode(d,{borderLeft:h.borderLeft[i],borderRight:h.borderRight[i]}))}),c}function r(a){for(var i;a.hasNode(i=e.uniqueId("_root")););return i}return g_}var v_,fz;function Qxe(){if(fz)return v_;fz=1;var e=fn();v_=t;function t(n,r,a){var i={},s;e.forEach(a,function(l){for(var c=n.parent(l),d,h;c;){if(d=n.parent(c),d?(h=i[d],i[d]=c):(h=s,s=c),h&&h!==c){r.setEdge(h,c);return}c=d}})}return v_}var y_,hz;function Jxe(){if(hz)return y_;hz=1;var e=fn(),t=Gxe(),n=Vxe(),r=Xxe(),a=Zxe(),i=Qxe(),s=La().Graph,l=Or();y_=c;function c(g){var v=l.maxRank(g),b=d(g,e.range(1,v+1),"inEdges"),w=d(g,e.range(v-1,-1,-1),"outEdges"),S=t(g);m(g,S);for(var j=Number.POSITIVE_INFINITY,k,_=0,E=0;E<4;++_,++E){h(_%2?b:w,_%4>=2),S=l.buildLayerMatrix(g);var T=n(g,S);T<j&&(E=0,k=e.cloneDeep(S),j=T)}m(g,k)}function d(g,v,b){return e.map(v,function(w){return a(g,w,b)})}function h(g,v){var b=new s;e.forEach(g,function(w){var S=w.graph().root,j=r(w,S,b,v);e.forEach(j.vs,function(k,_){w.node(k).order=_}),i(w,b,j.vs)})}function m(g,v){e.forEach(v,function(b){e.forEach(b,function(w,S){g.node(w).order=S})})}return y_}var x_,mz;function e0e(){if(mz)return x_;mz=1;var e=fn(),t=La().Graph,n=Or();x_={positionX:b,findType1Conflicts:r,findType2Conflicts:a,addConflict:s,hasConflict:l,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:g,findSmallestWidthAlignment:m,balance:v};function r(j,k){var _={};function E(T,A){var O=0,D=0,P=T.length,M=e.last(A);return e.forEach(A,function(z,L){var F=i(j,z),R=F?j.node(F).order:P;(F||z===M)&&(e.forEach(A.slice(D,L+1),function(I){e.forEach(j.predecessors(I),function(q){var G=j.node(q),Y=G.order;(Y<O||R<Y)&&!(G.dummy&&j.node(I).dummy)&&s(_,q,I)})}),D=L+1,O=R)}),A}return e.reduce(k,E),_}function a(j,k){var _={};function E(A,O,D,P,M){var z;e.forEach(e.range(O,D),function(L){z=A[L],j.node(z).dummy&&e.forEach(j.predecessors(z),function(F){var R=j.node(F);R.dummy&&(R.order<P||R.order>M)&&s(_,F,z)})})}function T(A,O){var D=-1,P,M=0;return e.forEach(O,function(z,L){if(j.node(z).dummy==="border"){var F=j.predecessors(z);F.length&&(P=j.node(F[0]).order,E(O,M,L,D,P),M=L,D=P)}E(O,M,O.length,P,A.length)}),O}return e.reduce(k,T),_}function i(j,k){if(j.node(k).dummy)return e.find(j.predecessors(k),function(_){return j.node(_).dummy})}function s(j,k,_){if(k>_){var E=k;k=_,_=E}var T=j[k];T||(j[k]=T={}),T[_]=!0}function l(j,k,_){if(k>_){var E=k;k=_,_=E}return e.has(j[k],_)}function c(j,k,_,E){var T={},A={},O={};return e.forEach(k,function(D){e.forEach(D,function(P,M){T[P]=P,A[P]=P,O[P]=M})}),e.forEach(k,function(D){var P=-1;e.forEach(D,function(M){var z=E(M);if(z.length){z=e.sortBy(z,function(q){return O[q]});for(var L=(z.length-1)/2,F=Math.floor(L),R=Math.ceil(L);F<=R;++F){var I=z[F];A[M]===M&&P<O[I]&&!l(_,M,I)&&(A[I]=M,A[M]=T[M]=T[I],P=O[I])}}})}),{root:T,align:A}}function d(j,k,_,E,T){var A={},O=h(j,k,_,T),D=T?"borderLeft":"borderRight";function P(L,F){for(var R=O.nodes(),I=R.pop(),q={};I;)q[I]?L(I):(q[I]=!0,R.push(I),R=R.concat(F(I))),I=R.pop()}function M(L){A[L]=O.inEdges(L).reduce(function(F,R){return Math.max(F,A[R.v]+O.edge(R))},0)}function z(L){var F=O.outEdges(L).reduce(function(I,q){return Math.min(I,A[q.w]-O.edge(q))},Number.POSITIVE_INFINITY),R=j.node(L);F!==Number.POSITIVE_INFINITY&&R.borderType!==D&&(A[L]=Math.max(A[L],F))}return P(M,O.predecessors.bind(O)),P(z,O.successors.bind(O)),e.forEach(E,function(L){A[L]=A[_[L]]}),A}function h(j,k,_,E){var T=new t,A=j.graph(),O=w(A.nodesep,A.edgesep,E);return e.forEach(k,function(D){var P;e.forEach(D,function(M){var z=_[M];if(T.setNode(z),P){var L=_[P],F=T.edge(L,z);T.setEdge(L,z,Math.max(O(j,M,P),F||0))}P=M})}),T}function m(j,k){return e.minBy(e.values(k),function(_){var E=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return e.forIn(_,function(A,O){var D=S(j,O)/2;E=Math.max(A+D,E),T=Math.min(A-D,T)}),E-T})}function g(j,k){var _=e.values(k),E=e.min(_),T=e.max(_);e.forEach(["u","d"],function(A){e.forEach(["l","r"],function(O){var D=A+O,P=j[D],M;if(P!==k){var z=e.values(P);M=O==="l"?E-e.min(z):T-e.max(z),M&&(j[D]=e.mapValues(P,function(L){return L+M}))}})})}function v(j,k){return e.mapValues(j.ul,function(_,E){if(k)return j[k.toLowerCase()][E];var T=e.sortBy(e.map(j,E));return(T[1]+T[2])/2})}function b(j){var k=n.buildLayerMatrix(j),_=e.merge(r(j,k),a(j,k)),E={},T;e.forEach(["u","d"],function(O){T=O==="u"?k:e.values(k).reverse(),e.forEach(["l","r"],function(D){D==="r"&&(T=e.map(T,function(L){return e.values(L).reverse()}));var P=(O==="u"?j.predecessors:j.successors).bind(j),M=c(j,T,_,P),z=d(j,T,M.root,M.align,D==="r");D==="r"&&(z=e.mapValues(z,function(L){return-L})),E[O+D]=z})});var A=m(j,E);return g(E,A),v(E,j.graph().align)}function w(j,k,_){return function(E,T,A){var O=E.node(T),D=E.node(A),P=0,M;if(P+=O.width/2,e.has(O,"labelpos"))switch(O.labelpos.toLowerCase()){case"l":M=-O.width/2;break;case"r":M=O.width/2;break}if(M&&(P+=_?M:-M),M=0,P+=(O.dummy?k:j)/2,P+=(D.dummy?k:j)/2,P+=D.width/2,e.has(D,"labelpos"))switch(D.labelpos.toLowerCase()){case"l":M=D.width/2;break;case"r":M=-D.width/2;break}return M&&(P+=_?M:-M),M=0,P}}function S(j,k){return j.node(k).width}return x_}var b_,pz;function t0e(){if(pz)return b_;pz=1;var e=fn(),t=Or(),n=e0e().positionX;b_=r;function r(i){i=t.asNonCompoundGraph(i),a(i),e.forEach(n(i),function(s,l){i.node(l).x=s})}function a(i){var s=t.buildLayerMatrix(i),l=i.graph().ranksep,c=0;e.forEach(s,function(d){var h=e.max(e.map(d,function(m){return i.node(m).height}));e.forEach(d,function(m){i.node(m).y=c+h/2}),c+=h+l})}return b_}var w_,gz;function n0e(){if(gz)return w_;gz=1;var e=fn(),t=Lxe(),n=zxe(),r=qxe(),a=Or().normalizeRanks,i=Bxe(),s=Or().removeEmptyRanks,l=Fxe(),c=Hxe(),d=Uxe(),h=Jxe(),m=t0e(),g=Or(),v=La().Graph;w_=b;function b(W,Q){var J=Q&&Q.debugTiming?g.time:g.notime;J("layout",function(){var re=J(" buildLayoutGraph",function(){return P(W)});J(" runLayout",function(){w(re,J)}),J(" updateInputGraph",function(){S(W,re)})})}function w(W,Q){Q(" makeSpaceForEdgeLabels",function(){M(W)}),Q(" removeSelfEdges",function(){K(W)}),Q(" acyclic",function(){t.run(W)}),Q(" nestingGraph.run",function(){l.run(W)}),Q(" rank",function(){r(g.asNonCompoundGraph(W))}),Q(" injectEdgeLabelProxies",function(){z(W)}),Q(" removeEmptyRanks",function(){s(W)}),Q(" nestingGraph.cleanup",function(){l.cleanup(W)}),Q(" normalizeRanks",function(){a(W)}),Q(" assignRankMinMax",function(){L(W)}),Q(" removeEdgeLabelProxies",function(){F(W)}),Q(" normalize.run",function(){n.run(W)}),Q(" parentDummyChains",function(){i(W)}),Q(" addBorderSegments",function(){c(W)}),Q(" order",function(){h(W)}),Q(" insertSelfEdges",function(){B(W)}),Q(" adjustCoordinateSystem",function(){d.adjust(W)}),Q(" position",function(){m(W)}),Q(" positionSelfEdges",function(){U(W)}),Q(" removeBorderNodes",function(){Y(W)}),Q(" normalize.undo",function(){n.undo(W)}),Q(" fixupEdgeLabelCoords",function(){q(W)}),Q(" undoCoordinateSystem",function(){d.undo(W)}),Q(" translateGraph",function(){R(W)}),Q(" assignNodeIntersects",function(){I(W)}),Q(" reversePoints",function(){G(W)}),Q(" acyclic.undo",function(){t.undo(W)})}function S(W,Q){e.forEach(W.nodes(),function(J){var re=W.node(J),oe=Q.node(J);re&&(re.x=oe.x,re.y=oe.y,Q.children(J).length&&(re.width=oe.width,re.height=oe.height))}),e.forEach(W.edges(),function(J){var re=W.edge(J),oe=Q.edge(J);re.points=oe.points,e.has(oe,"x")&&(re.x=oe.x,re.y=oe.y)}),W.graph().width=Q.graph().width,W.graph().height=Q.graph().height}var j=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],E=["width","height"],T={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],O={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},D=["labelpos"];function P(W){var Q=new v({multigraph:!0,compound:!0}),J=H(W.graph());return Q.setGraph(e.merge({},k,X(J,j),e.pick(J,_))),e.forEach(W.nodes(),function(re){var oe=H(W.node(re));Q.setNode(re,e.defaults(X(oe,E),T)),Q.setParent(re,W.parent(re))}),e.forEach(W.edges(),function(re){var oe=H(W.edge(re));Q.setEdge(re,e.merge({},O,X(oe,A),e.pick(oe,D)))}),Q}function M(W){var Q=W.graph();Q.ranksep/=2,e.forEach(W.edges(),function(J){var re=W.edge(J);re.minlen*=2,re.labelpos.toLowerCase()!=="c"&&(Q.rankdir==="TB"||Q.rankdir==="BT"?re.width+=re.labeloffset:re.height+=re.labeloffset)})}function z(W){e.forEach(W.edges(),function(Q){var J=W.edge(Q);if(J.width&&J.height){var re=W.node(Q.v),oe=W.node(Q.w),Z={rank:(oe.rank-re.rank)/2+re.rank,e:Q};g.addDummyNode(W,"edge-proxy",Z,"_ep")}})}function L(W){var Q=0;e.forEach(W.nodes(),function(J){var re=W.node(J);re.borderTop&&(re.minRank=W.node(re.borderTop).rank,re.maxRank=W.node(re.borderBottom).rank,Q=e.max(Q,re.maxRank))}),W.graph().maxRank=Q}function F(W){e.forEach(W.nodes(),function(Q){var J=W.node(Q);J.dummy==="edge-proxy"&&(W.edge(J.e).labelRank=J.rank,W.removeNode(Q))})}function R(W){var Q=Number.POSITIVE_INFINITY,J=0,re=Number.POSITIVE_INFINITY,oe=0,Z=W.graph(),le=Z.marginx||0,ie=Z.marginy||0;function ee(ae){var xe=ae.x,ye=ae.y,Te=ae.width,Me=ae.height;Q=Math.min(Q,xe-Te/2),J=Math.max(J,xe+Te/2),re=Math.min(re,ye-Me/2),oe=Math.max(oe,ye+Me/2)}e.forEach(W.nodes(),function(ae){ee(W.node(ae))}),e.forEach(W.edges(),function(ae){var xe=W.edge(ae);e.has(xe,"x")&&ee(xe)}),Q-=le,re-=ie,e.forEach(W.nodes(),function(ae){var xe=W.node(ae);xe.x-=Q,xe.y-=re}),e.forEach(W.edges(),function(ae){var xe=W.edge(ae);e.forEach(xe.points,function(ye){ye.x-=Q,ye.y-=re}),e.has(xe,"x")&&(xe.x-=Q),e.has(xe,"y")&&(xe.y-=re)}),Z.width=J-Q+le,Z.height=oe-re+ie}function I(W){e.forEach(W.edges(),function(Q){var J=W.edge(Q),re=W.node(Q.v),oe=W.node(Q.w),Z,le;J.points?(Z=J.points[0],le=J.points[J.points.length-1]):(J.points=[],Z=oe,le=re),J.points.unshift(g.intersectRect(re,Z)),J.points.push(g.intersectRect(oe,le))})}function q(W){e.forEach(W.edges(),function(Q){var J=W.edge(Q);if(e.has(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function G(W){e.forEach(W.edges(),function(Q){var J=W.edge(Q);J.reversed&&J.points.reverse()})}function Y(W){e.forEach(W.nodes(),function(Q){if(W.children(Q).length){var J=W.node(Q),re=W.node(J.borderTop),oe=W.node(J.borderBottom),Z=W.node(e.last(J.borderLeft)),le=W.node(e.last(J.borderRight));J.width=Math.abs(le.x-Z.x),J.height=Math.abs(oe.y-re.y),J.x=Z.x+J.width/2,J.y=re.y+J.height/2}}),e.forEach(W.nodes(),function(Q){W.node(Q).dummy==="border"&&W.removeNode(Q)})}function K(W){e.forEach(W.edges(),function(Q){if(Q.v===Q.w){var J=W.node(Q.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:Q,label:W.edge(Q)}),W.removeEdge(Q)}})}function B(W){var Q=g.buildLayerMatrix(W);e.forEach(Q,function(J){var re=0;e.forEach(J,function(oe,Z){var le=W.node(oe);le.order=Z+re,e.forEach(le.selfEdges,function(ie){g.addDummyNode(W,"selfedge",{width:ie.label.width,height:ie.label.height,rank:le.rank,order:Z+ ++re,e:ie.e,label:ie.label},"_se")}),delete le.selfEdges})})}function U(W){e.forEach(W.nodes(),function(Q){var J=W.node(Q);if(J.dummy==="selfedge"){var re=W.node(J.e.v),oe=re.x+re.width/2,Z=re.y,le=J.x-oe,ie=re.height/2;W.setEdge(J.e,J.label),W.removeNode(Q),J.label.points=[{x:oe+2*le/3,y:Z-ie},{x:oe+5*le/6,y:Z-ie},{x:oe+le,y:Z},{x:oe+5*le/6,y:Z+ie},{x:oe+2*le/3,y:Z+ie}],J.label.x=J.x,J.label.y=J.y}})}function X(W,Q){return e.mapValues(e.pick(W,Q),Number)}function H(W){var Q={};return e.forEach(W,function(J,re){Q[re.toLowerCase()]=J}),Q}return w_}var S_,vz;function r0e(){if(vz)return S_;vz=1;var e=fn(),t=Or(),n=La().Graph;S_={debugOrdering:r};function r(a){var i=t.buildLayerMatrix(a),s=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(a.nodes(),function(l){s.setNode(l,{label:l}),s.setParent(l,"layer"+a.node(l).rank)}),e.forEach(a.edges(),function(l){s.setEdge(l.v,l.w,{},l.name)}),e.forEach(i,function(l,c){var d="layer"+c;s.setNode(d,{rank:"same"}),e.reduce(l,function(h,m){return s.setEdge(h,m,{style:"invis"}),m})}),s}return S_}var j_,yz;function a0e(){return yz||(yz=1,j_="0.8.5"),j_}var __,xz;function i0e(){return xz||(xz=1,__={graphlib:La(),layout:n0e(),debug:r0e(),util:{time:Or().time,notime:Or().notime},version:a0e()}),__}var s0e=i0e();const bz=ea(s0e),o0e={pending:"#D4B896",running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0"},l0e={pending:"",running:"ring-2 ring-status-running/50 animate-pulse",completed:"",failed:"ring-1 ring-status-error/30",stopped:"",merged:""};function u0e({data:e}){const t=e,{todo:n,allTodos:r,selected:a,onStart:i,onStop:s,onDelete:l,onMerge:c,onCleanup:d,onRetry:h,onSelect:m}=t,{t:g}=tt(),v=n.status==="pending"||n.status==="failed"||n.status==="stopped",b=n.status==="running",w=n.status==="completed",S=n.status!=="running"&&n.status!=="pending"&&(n.worktree_path||n.branch_name),j=n.status==="completed"||n.status==="failed"||n.status==="stopped",k=n.depends_on?r.find(T=>T.id===n.depends_on):null,_=!!k&&k.status!=="completed",E=o0e[n.status];return f.jsxs("div",{className:`bg-theme-card rounded-xl shadow-card min-w-[240px] max-w-[280px] overflow-hidden transition-all duration-300 ${l0e[n.status]} ${a?"ring-2 ring-accent shadow-elevated -translate-y-1":"hover:shadow-elevated hover:-translate-y-0.5"}`,style:{borderLeft:`4px solid ${E}`,position:"relative"},children:[f.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-white/10 z-10 pointer-events-none"}),f.jsx(Yu,{type:"target",position:Qe.Top,className:"!w-3 !h-3 !bg-cyan-500 !border-2 !border-white !-top-1.5"}),f.jsxs("div",{className:"px-3 py-2.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:()=>m(n.id),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsxs("span",{className:"text-2xs font-mono text-warm-400",children:["#",n.priority]}),f.jsx("span",{className:"flex-1 text-xs text-warm-800 font-medium truncate",title:n.title,children:n.title}),f.jsx(GN,{status:n.status})]}),f.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[n.cli_tool&&f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-mono font-medium bg-status-merged/10 text-status-merged",children:$u(n.cli_tool||"claude").label}),k&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[9px] font-mono bg-cyan-500/10 text-cyan-600",children:[f.jsx(ef,{size:10}),k.title.length>15?k.title.slice(0,15)+"...":k.title]})]})]}),f.jsxs("div",{className:"flex items-center justify-end gap-0 px-2 py-1.5 border-t border-warm-100 bg-warm-50/50",children:[v&&f.jsx("button",{onClick:T=>{T.stopPropagation(),i(n.id,"headless")},className:"p-1 text-status-success/60 hover:text-status-success hover:bg-status-success/10 rounded transition-colors",title:g(_?"todo.startWithDependency":"todo.startHeadless"),children:f.jsx(yl,{size:12})}),b&&f.jsx("button",{onClick:T=>{T.stopPropagation(),s(n.id)},className:"p-1 text-status-error/60 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:g("todo.stop"),children:f.jsx(Bg,{size:12})}),w&&f.jsx("button",{onClick:T=>{T.stopPropagation(),c(n.id)},className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors",title:g("todo.merge"),children:f.jsx(Of,{size:12})}),S&&f.jsx("button",{onClick:T=>{T.stopPropagation(),d(n.id)},className:"p-1 text-orange-500/60 hover:text-orange-500 hover:bg-orange-500/10 rounded transition-colors",title:g("todo.cleanup"),children:f.jsx($N,{size:12})}),j&&f.jsx("button",{onClick:T=>{T.stopPropagation(),h(n.id,"headless")},className:"p-1 text-cyan-500/60 hover:text-cyan-500 hover:bg-cyan-500/10 rounded transition-colors",title:g("todo.retry"),children:f.jsx($g,{size:12})}),f.jsx("button",{onClick:T=>{T.stopPropagation(),l(n.id)},className:"p-1 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded transition-colors",title:g("todo.delete"),children:f.jsx(es,{size:12})})]}),f.jsx(Yu,{type:"source",position:Qe.Bottom,className:"!w-3 !h-3 !bg-accent !border-2 !border-white !-bottom-1.5"})]})}const c0e=x.memo(u0e);function d0e({todo:e,allTodos:t,projectIsGitRepo:n,projectUseWorktree:r,onClose:a,onEdit:i,onStart:s,onStop:l,onMerge:c,onCleanup:d,onRetry:h,onContinue:m,onFix:g,onEvent:v,isInteractive:b,onSendInput:w,debugLogging:S,showTokenUsage:j}){const[k,_]=x.useState([]),[E,T]=x.useState(!1),[A,O]=x.useState(!1),[D,P]=x.useState(!1),[M,z]=x.useState(null),[L,F]=x.useState(!1),[R,I]=x.useState(null),[q,G]=x.useState(!1),[Y,K]=x.useState(!1),[B,U]=x.useState(""),[X,H]=x.useState(!1),[W,Q]=x.useState(null),{t:J}=tt(),re=e.status==="pending"||e.status==="failed"||e.status==="stopped",oe=e.status==="running",Z=e.status==="completed"||e.status==="stopped"||e.status==="merged",le=e.status==="completed",ie=e.status==="completed"||e.status==="failed"||e.status==="stopped",ee=!!m&&e.status==="completed"&&!!e.worktree_path,ae=e.status!=="running"&&e.status!=="pending"&&(e.worktree_path||e.branch_name),xe=e.status==="completed"||e.status==="failed"||e.status==="stopped"||e.status==="merged",ye=e.images?JSON.parse(e.images):[],Te=e.depends_on?t.find(Ce=>Ce.id===e.depends_on):null,Me=!!Te&&Te.status!=="completed",he=t.find(Ce=>Ce.depends_on===e.id&&Ce.merged_from_branch);x.useEffect(()=>{_([]),T(!1),I(null),G(!1),z(null),P(!1),u8(e.id).then(Ce=>{_(Ce),T(!0)}).catch(()=>{T(!0)})},[e.id]),x.useEffect(()=>{xe&&!q&&d8(e.id).then(Ce=>{I(Ce),G(!0)}).catch(()=>{G(!0)})},[xe,q,e.id]),x.useEffect(()=>v(Ce=>{if(Ce.type==="todo:log"&&Ce.todoId===e.id&&Ce.message){const He={id:`ws-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:Ce.logType||"output",message:Ce.message,created_at:new Date().toISOString()};_(ge=>[...ge,He])}if(Ce.type==="todo:commit"&&Ce.todoId===e.id&&Ce.message){const He={id:`ws-commit-${Date.now()}-${Math.random()}`,todo_id:e.id,log_type:"commit",message:`${Ce.commitHash?`[${Ce.commitHash}] `:""}${Ce.message}`,created_at:new Date().toISOString()};_(ge=>[...ge,He])}}),[v,e.id]);const Ie=async()=>{if(D){P(!1);return}F(!0);try{const Ce=await c8(e.id);z(Ce),P(!0)}catch{}finally{F(!1)}},Je=async()=>{try{const{files:Ce}=await XF(e.project_id,e.id);Ce.length>0&&window.open(`/api/projects/${e.project_id}/debug-logs/${encodeURIComponent(Ce[0].name)}`,"_blank")}catch{}},We=Ce=>{if(Ce<60)return`${Ce}s`;const He=Math.floor(Ce/60),ge=Ce%60;if(He<60)return ge>0?`${He}m ${ge}s`:`${He}m`;const ue=Math.floor(He/60),_e=He%60;return _e>0?`${ue}h ${_e}m`:`${ue}h`},it=Ce=>Ce>=1e6?`${(Ce/1e6).toFixed(1)}M`:Ce>=1e3?`${(Ce/1e3).toFixed(1)}k`:String(Ce);return A?f.jsx("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto p-4",children:f.jsx(Kg,{initialTitle:e.title,initialDescription:e.description??void 0,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialDependsOn:e.depends_on??void 0,initialMaxTurns:e.max_turns??void 0,initialUseWorktree:e.use_worktree??null,projectIsGitRepo:n,projectUseWorktree:r,existingImages:ye,todoId:e.id,availableTodos:t.filter(Ce=>Ce.id!==e.id),onDeleteImage:async Ce=>{await f8(e.id,Ce)},onSave:async(Ce,He,ge,ue,_e,fe,Oe,ze)=>{await i(e.id,Ce,He,ge,ue,fe,Oe,ze),_e&&_e.length>0&&await UN(e.id,_e.map(ut=>({name:ut.name,data:ut.data}))),O(!1)},onCancel:()=>O(!1)})}):f.jsxs("div",{className:"w-[380px] border-l border-warm-200 bg-theme-card overflow-y-auto animate-slide-up",children:[f.jsxs("div",{className:"sticky top-0 bg-theme-card border-b border-warm-200 px-4 py-3 flex items-center gap-2 z-10",children:[f.jsx(GN,{status:e.status}),f.jsx("span",{className:"flex-1 text-sm font-medium text-warm-800 truncate",children:e.title}),f.jsx("button",{onClick:()=>O(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:J("todo.edit"),children:f.jsx(Mf,{size:14})}),f.jsx("button",{onClick:a,className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:f.jsx(ga,{size:16})})]}),f.jsxs("div",{className:"px-4 py-4 space-y-4",children:[f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[re&&f.jsx(f.Fragment,{children:f.jsx("button",{onClick:()=>s(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-status-success",title:J(Me?"todo.startWithDependency":"todo.startHeadless"),children:J("todo.startHeadless")})}),oe&&f.jsx("button",{onClick:()=>l(e.id),className:"btn-ghost text-xs py-1.5 text-status-error",children:J("todo.stop")}),Z&&f.jsx("button",{onClick:Ie,disabled:L,className:"btn-ghost text-xs py-1.5 text-status-info disabled:opacity-30",children:J("todo.viewDiff")}),S&&xe&&f.jsx("button",{onClick:Je,className:"btn-ghost text-xs py-1.5",children:J("todo.viewDebugLog")}),le&&f.jsx("button",{onClick:()=>c(e.id),className:"btn-ghost text-xs py-1.5 text-status-merged",children:J("todo.merge")}),ae&&f.jsx("button",{onClick:()=>d(e.id),className:"btn-ghost text-xs py-1.5 text-orange-500",children:J("todo.cleanup")}),ee&&f.jsx("button",{onClick:()=>{K(Ce=>!Ce),Q(null)},disabled:X,className:"btn-ghost text-xs py-1.5 text-emerald-500",children:J("todo.continue")}),ie&&f.jsx("button",{onClick:()=>h(e.id,"headless"),className:"btn-ghost text-xs py-1.5 text-cyan-500",children:J("todo.retry")})]}),Y&&m&&f.jsxs("div",{className:"border border-emerald-200 rounded-lg px-3 py-2 bg-emerald-50/50 space-y-2",children:[f.jsxs("label",{className:"text-xs font-medium text-emerald-600",children:[J("todo.continuePromptLabel"),(e.round_count??1)>1&&f.jsxs("span",{className:"ml-2 text-emerald-500/70",children:["(",J("todo.roundLabel")," ",e.round_count,")"]})]}),f.jsx("textarea",{value:B,onChange:Ce=>U(Ce.target.value),placeholder:J("todo.continuePromptPlaceholder"),rows:3,disabled:X,className:"w-full bg-theme-card border border-emerald-200 rounded-lg px-2 py-1.5 text-xs text-warm-800 focus:border-emerald-400 focus:outline-none focus:ring-2 focus:ring-emerald-400/20 resize-y"}),W&&f.jsx("p",{className:"text-xs text-status-error",children:W}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:async()=>{const Ce=B.trim();if(!Ce){Q(J("todo.continuePromptRequired"));return}H(!0),Q(null);try{await m(e.id,Ce,"headless"),K(!1),U("")}catch(He){Q(He instanceof Error?He.message:"Continue failed")}finally{H(!1)}},disabled:X||!B.trim(),className:"btn-primary text-xs py-1.5 !bg-emerald-500 hover:!bg-emerald-600 disabled:opacity-30",children:J(X?"todo.continuing":"todo.confirmContinue")}),f.jsx("button",{onClick:()=>{K(!1),Q(null)},disabled:X,className:"btn-ghost text-xs py-1.5",children:J("scheduleForm.cancel")})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:J("todo.description")}),f.jsx("p",{className:"text-xs text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description||J("todo.noDescription")})]}),ye.length>0&&f.jsxs("div",{children:[f.jsxs("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:[J("todo.attachedImages")," (",ye.length,")"]}),f.jsx("div",{className:"flex flex-wrap gap-2",children:ye.map(Ce=>f.jsx("a",{href:tf(e.id,Ce.id),target:"_blank",rel:"noopener noreferrer",children:f.jsx("img",{src:tf(e.id,Ce.id),alt:Ce.originalName,className:"h-16 w-16 object-cover rounded-lg border border-warm-200 hover:border-accent transition-colors"})},Ce.id))})]}),f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[f.jsxs("span",{className:"text-2xs font-mono text-warm-400 badge bg-warm-100",children:["#",e.priority]}),e.cli_tool&&f.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[$u(e.cli_tool||"claude").label,e.cli_model&&f.jsxs("span",{className:"text-warm-400 ml-1",children:["/ ",e.cli_model]})]}),Te&&f.jsxs("span",{className:"badge text-2xs font-mono bg-warm-200/60 text-warm-600",children:[J("todo.dependsOn"),": ",Te.title.length>20?Te.title.slice(0,20)+"...":Te.title]})]}),e.branch_name&&f.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[f.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[J("todo.branch"),": ",e.branch_name]}),e.merged_from_branch&&f.jsxs("span",{className:"badge text-2xs bg-warm-200/60 text-warm-600",children:[J("todo.mergedFrom"),": ",e.merged_from_branch]}),!e.worktree_path&&he&&f.jsxs("span",{className:"badge text-2xs bg-amber-500/10 text-amber-600",children:[J("todo.transferredTo"),": ",he.title.length>20?he.title.slice(0,20)+"...":he.title]})]}),e.status==="failed"&&k.length>0&&(()=>{const Ce=k.filter(He=>He.log_type==="error");return Ce.length===0?null:f.jsxs("div",{className:"rounded-lg border border-status-error/30 bg-status-error/5 overflow-hidden",children:[f.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-status-error/10 border-b border-status-error/20",children:[f.jsx("h4",{className:"text-2xs font-semibold text-status-error uppercase tracking-wider",children:J("failure.title")}),g&&f.jsx("button",{onClick:()=>g(e,Ce),className:"text-2xs font-medium text-amber-500 hover:text-amber-600",children:J("failure.fix")})]}),f.jsx("div",{className:"px-3 py-2 space-y-1 max-h-32 overflow-y-auto",children:Ce.map(He=>f.jsx("div",{className:"text-2xs font-mono text-status-error whitespace-pre-wrap break-all",children:He.message},He.id))})]})})(),xe&&R&&f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex flex-wrap gap-2",children:[R.duration_seconds!==null&&f.jsx("span",{className:"text-2xs font-mono badge bg-warm-100 text-warm-600",children:We(R.duration_seconds)}),R.commits.length>0&&f.jsxs("span",{className:"text-2xs font-mono badge bg-status-success/10 text-status-success",children:[R.commits.length," commits"]}),R.diff_stats.files_changed>0&&f.jsxs("span",{className:"text-2xs font-mono badge bg-status-info/10 text-status-info",children:[R.diff_stats.files_changed," files",f.jsxs("span",{className:"text-status-success ml-1",children:["+",R.diff_stats.insertions]}),f.jsxs("span",{className:"text-status-error ml-1",children:["-",R.diff_stats.deletions]})]}),j&&R.token_usage&&R.token_usage.input_tokens!==null&&f.jsxs("span",{className:"text-2xs font-mono badge bg-warm-200/60 text-warm-600",children:[it(R.token_usage.input_tokens)," in / ",it(R.token_usage.output_tokens??0)," out"]})]}),R.commits.length>0&&f.jsxs("div",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:J("result.commitHistory")}),f.jsx("div",{className:"space-y-0.5",children:R.commits.map((Ce,He)=>f.jsxs("div",{className:"flex items-start gap-1.5 text-2xs",children:[f.jsx("span",{className:"font-mono text-status-info flex-shrink-0",children:Ce.hash.slice(0,7)}),f.jsx("span",{className:"text-warm-700 truncate",children:Ce.message})]},He))})]})]}),D&&M&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider",children:J("todo.diffOutput")}),f.jsxs("div",{className:"flex gap-2 text-2xs",children:[f.jsxs("span",{className:"text-status-success",children:["+",M.stats.insertions]}),f.jsxs("span",{className:"text-status-error",children:["-",M.stats.deletions]})]})]}),f.jsx("pre",{className:"h-48 overflow-auto bg-warm-800 rounded-lg p-3 font-mono text-2xs leading-relaxed",children:M.diff?M.diff.split(`
483
+ `).map((Ce,He)=>{let ge="text-warm-400";return Ce.startsWith("+")&&!Ce.startsWith("+++")?ge="text-green-400":Ce.startsWith("-")&&!Ce.startsWith("---")?ge="text-red-400":Ce.startsWith("@@")?ge="text-blue-400":Ce.startsWith("diff ")&&(ge="text-amber-300 font-bold"),f.jsx("div",{className:ge,children:Ce},He)}):f.jsx("span",{className:"text-warm-500 italic",children:J("log.noChanges")})})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-2xs font-semibold text-warm-500 uppercase tracking-wider mb-1",children:J("todo.systemLog")}),f.jsx(c2,{logs:k,interactive:b&&e.status==="running",todoId:e.id,onSendInput:w})]})]})]})}const f0e={taskNode:c0e},wz=260,Sz=100;function jz(e){const t=new bz.graphlib.Graph;t.setDefaultEdgeLabel(()=>({})),t.setGraph({rankdir:"TB",nodesep:60,ranksep:100});for(const r of e)t.setNode(r.id,{width:wz,height:Sz});for(const r of e)r.depends_on&&t.setEdge(r.depends_on,r.id);bz.layout(t);const n=new Map;for(const r of e){const a=t.node(r.id);a&&n.set(r.id,{x:a.x-wz/2,y:a.y-Sz/2})}return{nodePositions:n}}function _z(e,t,n){let r=n;const a=new Set;for(;r;){if(r===t)return!0;if(a.has(r))return!1;a.add(r);const i=e.find(s=>s.id===r);r=(i==null?void 0:i.depends_on)??null}return!1}const k_={running:"#2196F3",completed:"#4CAF50",failed:"#E53935",stopped:"#FF9800",merged:"#9C27B0",pending:"#B8A88A"};function h0e({todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onCleanupTodo:m,onRetryTodo:g,onContinueTodo:v,onFixTodo:b,onUpdateDependency:w,onUpdatePosition:S,onEvent:j,onSendInput:k,interactiveTodos:_,debugLogging:E,showTokenUsage:T}){const[A,O]=x.useState(null),[D,P]=x.useState(!1),{t:M}=tt(),{theme:z}=s8(),L=z==="dark",F=x.useCallback(ie=>{O(ee=>ee===ie?null:ie)},[]),{initialNodes:R,initialEdges:I}=x.useMemo(()=>{const ee=e.some(ye=>ye.position_x==null||ye.position_y==null)?jz(e).nodePositions:null,ae=e.map(ye=>{var Te,Me;return{id:ye.id,type:"taskNode",position:{x:ye.position_x??((Te=ee==null?void 0:ee.get(ye.id))==null?void 0:Te.x)??0,y:ye.position_y??((Me=ee==null?void 0:ee.get(ye.id))==null?void 0:Me.y)??0},data:{todo:ye,allTodos:e,selected:ye.id===A,onStart:s,onStop:l,onDelete:c,onMerge:h,onCleanup:m,onRetry:g,onFix:b,onSelect:F}}}),xe=e.filter(ye=>ye.depends_on).map(ye=>{var Me;const Te=((Me=e.find(he=>he.id===ye.depends_on))==null?void 0:Me.status)??"pending";return{id:`e-${ye.depends_on}-${ye.id}`,source:ye.depends_on,target:ye.id,type:"smoothstep",animated:Te==="running",style:{stroke:k_[Te]??"#B8A88A",strokeWidth:2},markerEnd:{type:df.ArrowClosed,width:16,height:16,color:k_[Te]??"#B8A88A"}}});return{initialNodes:ae,initialEdges:xe}},[e,A,s,l,c,h,m,g,b,F]),[q,G,Y]=pge(R),[K,B,U]=gge(I);x.useEffect(()=>{G(R),B(I)},[R,I,G,B]);const X=x.useCallback(ie=>{!ie.source||!ie.target||!w||_z(e,ie.source,ie.target)||w(ie.target,ie.source)},[e,w]),H=x.useCallback(ie=>{if(w)for(const ee of ie)w(ee.target,null)},[w]),W=x.useCallback((ie,ee)=>{S&&S(ee.id,ee.position.x,ee.position.y)},[S]),Q=x.useRef(!0),J=x.useCallback(()=>{Q.current=!1},[]),re=x.useCallback((ie,ee)=>{Q.current=!0,!(!w||!ee.source||!ee.target)&&(w(ie.target,null),_z(e,ee.source,ee.target)||w(ee.target,ee.source))},[e,w]),oe=x.useCallback((ie,ee)=>{!Q.current&&w&&w(ee.target,null),Q.current=!0},[w]),Z=x.useCallback(()=>{const{nodePositions:ie}=jz(e);if(G(ee=>ee.map(ae=>{const xe=ie.get(ae.id);return xe?{...ae,position:xe}:ae})),S)for(const[ee,ae]of ie)S(ee,ae.x,ae.y)},[e,G,S]),le=A?e.find(ie=>ie.id===A):null;return f.jsxs("div",{className:"flex gap-0 h-[600px]",children:[f.jsxs("div",{className:"flex-1 rounded-xl border border-warm-200 overflow-hidden bg-warm-50 ",children:[f.jsxs(mge,{nodes:q,edges:K,onNodesChange:Y,onEdgesChange:U,onConnect:X,onEdgesDelete:H,onReconnectStart:J,onReconnect:re,onReconnectEnd:oe,onNodeDragStop:W,nodeTypes:f0e,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,deleteKeyCode:"Delete",proOptions:{hideAttribution:!0},children:[f.jsx(wge,{variant:Xi.Dots,gap:20,size:1,color:L?"#4A4A60":"#D4B896",style:{opacity:.3}}),f.jsx(Ege,{showInteractive:!1,className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"}),f.jsx(Bge,{nodeColor:ie=>{var xe;const ee=ie.data,ae=((xe=ee==null?void 0:ee.todo)==null?void 0:xe.status)??"pending";return k_[ae]??"#B8A88A"},maskColor:L?"rgba(23, 23, 31, 0.7)":"rgba(245, 241, 235, 0.7)",className:"!bg-theme-card !border-warm-200 !shadow-soft !rounded-lg"})]}),f.jsxs("div",{className:"absolute top-3 right-3 flex items-center gap-2 z-10",children:[f.jsxs("button",{onClick:Z,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-theme-card border border-warm-200 rounded-lg shadow-soft hover:bg-warm-50 text-warm-600 transition-colors",title:M("graph.autoLayout"),children:[f.jsx(iC,{size:14}),M("graph.autoLayout")]}),f.jsxs("button",{onClick:()=>P(!0),className:"btn-primary text-xs py-1.5",children:[f.jsx(sc,{size:14}),M("todos.add")]})]})]}),le&&f.jsx(d0e,{todo:le,allTodos:e,projectIsGitRepo:r,projectUseWorktree:a,onClose:()=>O(null),onEdit:d,onStart:s,onStop:l,onMerge:h,onCleanup:m,onRetry:g,onContinue:v,onFix:b,onEvent:j,isInteractive:_.has(le.id),onSendInput:k,debugLogging:E,showTokenUsage:T}),D&&f.jsx(ts,{open:!0,onClose:()=>P(!1),size:"lg",children:f.jsx(Kg,{projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,availableTodos:e,onSave:async(ie,ee,ae,xe,ye,Te,Me,he)=>{await i(ie,ee,ae,xe,ye,Te,Me,he),P(!1)},onCancel:()=>P(!1)})})]})}const Gm={all:null,active:["pending","running"],completed:["completed","merged"],cancelled:["stopped","failed"]};function kz(e,t,n){let r=n;const a=new Set;for(;r;){if(r===t)return!0;if(a.has(r))return!1;a.add(r);const i=e.find(s=>s.id===r);r=(i==null?void 0:i.depends_on)??null}return!1}function m0e({todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onMergeChain:m,onCleanupTodo:g,onRetryTodo:v,onContinueTodo:b,onFixTodo:w,onScheduleTodo:S,onScheduleOnResetTodo:j,resetsAt:k,onUpdateDependency:_,onUpdatePosition:E,onReorderTodos:T,onEvent:A,onSendInput:O,interactiveTodos:D,debugLogging:P,showTokenUsage:M}){var ct;const[z,L]=x.useState(!1),[F,R]=x.useState(null),[I,q]=x.useState(null),[G,Y]=x.useState(null),[K,B]=x.useState(()=>{try{return localStorage.getItem("todoViewMode")||"list"}catch{return"list"}}),[U,X]=x.useState(()=>{try{return localStorage.getItem("todoStatusFilter")||"all"}catch{return"all"}}),[H,W]=x.useState(()=>{try{return localStorage.getItem("todoStackModeEnabled")==="true"}catch{return!1}}),[Q,J]=x.useState(()=>{try{return localStorage.getItem("todoStackCollapsed")==="true"}catch{return!1}}),{t:re}=tt(),oe=x.useCallback(Ae=>{B(Ae);try{localStorage.setItem("todoViewMode",Ae)}catch{}},[]),Z=x.useCallback(Ae=>{X(Ae);try{localStorage.setItem("todoStatusFilter",Ae)}catch{}},[]),le=x.useCallback(()=>{W(Ae=>{const $e=!Ae;try{localStorage.setItem("todoStackModeEnabled",String($e))}catch{}if(!$e){J(!1);try{localStorage.setItem("todoStackCollapsed","false")}catch{}}return $e})},[]),ie=x.useCallback(()=>{J(Ae=>{const $e=!Ae;try{localStorage.setItem("todoStackCollapsed",String($e))}catch{}return $e})},[]),ee=H&&Q&&K==="list",ae=x.useMemo(()=>({all:e.length,active:e.filter(Ae=>Gm.active.includes(Ae.status)).length,completed:e.filter(Ae=>Gm.completed.includes(Ae.status)).length,cancelled:e.filter(Ae=>Gm.cancelled.includes(Ae.status)).length}),[e]),xe=x.useMemo(()=>{const Ae=Gm[U];return Ae?e.filter($e=>Ae.includes($e.status)):e},[e,U]),ye=(()=>{const Ae=[...xe].sort((Ze,Ot)=>Ze.priority-Ot.priority);if(U!=="all"||ee)return Ae.map(Ze=>({todo:Ze,depth:0}));const $e=new Map,Xe=[];for(const Ze of Ae)if(Ze.depends_on){const Ot=$e.get(Ze.depends_on)||[];Ot.push(Ze),$e.set(Ze.depends_on,Ot)}else Xe.push(Ze);const pt=[],at=new Set,Et=(Ze,Ot)=>{if(at.has(Ze.id))return;at.add(Ze.id),pt.push({todo:Ze,depth:Ot});const zt=$e.get(Ze.id);if(zt)for(const hn of zt)Et(hn,Ot+1)};for(const Ze of Xe)Et(Ze,0);for(const Ze of Ae)at.has(Ze.id)||pt.push({todo:Ze,depth:0});return pt})(),{completedChainRoots:Te,completedChainMembers:Me}=x.useMemo(()=>{const Ae=new Map;for(const at of e)if(at.depends_on){const Et=Ae.get(at.depends_on)||[];Et.push(at.id),Ae.set(at.depends_on,Et)}const $e=e.filter(at=>!at.depends_on&&Ae.has(at.id)),Xe=new Map,pt=new Set;for(const at of $e){const Et=[],Ze=Ot=>{if(!e.find(ne=>ne.id===Ot))return;Et.push(Ot);const hn=Ae.get(Ot)||[];for(const ne of hn)Ze(ne)};if(Ze(at.id),Et.length>=2&&Et.every(Ot=>{const zt=e.find(hn=>hn.id===Ot);return(zt==null?void 0:zt.status)==="completed"||(zt==null?void 0:zt.status)==="merged"})){Xe.set(at.id,Et.length);for(const Ot of Et)pt.add(Ot)}}return{completedChainRoots:Xe,completedChainMembers:pt}},[e]),[he,Ie]=x.useState(null),[Je,We]=x.useState(null),it=x.useCallback(async Ae=>{if(m){Ie(Ae),We(null);try{await m(Ae)}catch($e){We($e instanceof Error?$e.message:"Merge failed")}finally{Ie(null)}}},[m]),Ce=x.useRef(!1),He=x.useCallback(Ae=>{Ce.current=!1,R(Ae)},[]),ge=x.useCallback(async()=>{if(!Ce.current&&F&&_){const Ae=e.find($e=>$e.id===F);Ae!=null&&Ae.depends_on&&await _(F,null)}R(null),q(null),Y(null)},[F,e,_]),ue=x.useCallback(Ae=>{q(Ae),Y(null)},[]),_e=x.useCallback(Ae=>{q($e=>$e===Ae?null:$e)},[]),fe=x.useCallback(async Ae=>{!F||!_||F!==Ae&&(kz(e,F,Ae)||(Ce.current=!0,await _(F,Ae),R(null),q(null),Y(null)))},[F,e,_]),Oe=x.useCallback(async Ae=>{_&&await _(Ae,null)},[_]),ze=x.useCallback(Ae=>!F||F===Ae?!1:!kz(e,F,Ae),[F,e]),ut=x.useCallback(Ae=>{Y(Ae),q(null)},[]),gt=x.useCallback(Ae=>{Y($e=>$e===Ae?null:$e)},[]),_t=x.useCallback(async(Ae,$e)=>{if(!F||!T)return;const Xe=$e.indexOf(F);if(Xe<0)return;const pt=$e.filter(Ze=>Ze!==F),at=Ae>Xe?Ae-1:Ae;if(at===Xe){Y(null);return}const Et=[...pt.slice(0,at),F,...pt.slice(at)];Ce.current=!0,await T(Et),R(null),Y(null),q(null)},[F,T]);return K==="graph"?f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:re("todos.title")}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsxs("div",{className:"flex items-center bg-warm-100 rounded-lg p-0.5",children:[f.jsx("button",{onClick:()=>oe("list"),className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600",title:re("graph.listView"),children:f.jsx(VP,{size:14})}),f.jsx("button",{onClick:()=>oe("graph"),className:"p-1.5 rounded-md transition-colors bg-theme-card shadow-sm text-accent",title:re("graph.graphView"),children:f.jsx(iC,{size:14})})]})})]}),f.jsx(h0e,{todos:e,projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,onAddTodo:i,onStartTodo:s,onStopTodo:l,onDeleteTodo:c,onEditTodo:d,onMergeTodo:h,onCleanupTodo:g,onRetryTodo:v,onContinueTodo:b,onFixTodo:w,onUpdateDependency:_,onUpdatePosition:E,onEvent:A,onSendInput:O,interactiveTodos:D,debugLogging:P,showTokenUsage:M})]}):f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:re("todos.title")}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("div",{className:"flex items-center bg-warm-100 rounded-lg p-0.5",children:[f.jsx("button",{onClick:()=>oe("list"),className:"p-1.5 rounded-md transition-colors bg-theme-card shadow-sm text-accent",title:re("graph.listView"),children:f.jsx(VP,{size:14})}),f.jsx("button",{onClick:()=>oe("graph"),className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600",title:re("graph.graphView"),children:f.jsx(iC,{size:14})})]}),f.jsx("button",{onClick:le,className:`p-1.5 rounded-md transition-colors ${H?"bg-accent/10 text-accent":"text-warm-400 hover:text-warm-600 hover:bg-warm-100"}`,title:re(H?"todos.stackModeOn":"todos.stackModeOff"),children:f.jsx(Kee,{size:14})}),H&&!Q&&K==="list"&&ye.length>0&&f.jsx("button",{onClick:ie,className:"p-1.5 rounded-md transition-colors text-warm-400 hover:text-warm-600 hover:bg-warm-100",title:re("todos.collapseStack"),children:f.jsx(gee,{size:14})}),!z&&f.jsxs("button",{onClick:()=>L(!0),className:"btn-primary text-xs py-2",children:[f.jsx(sc,{size:14}),re("todos.add")]})]})]}),z&&f.jsx("div",{className:"mb-5 animate-slide-up",children:f.jsx(Kg,{projectCliTool:t,projectCliModel:n,projectIsGitRepo:r,projectUseWorktree:a,availableTodos:e,onSave:async(Ae,$e,Xe,pt,at,Et,Ze,Ot)=>{await i(Ae,$e,Xe,pt,at,Et,Ze,Ot),L(!1)},onCancel:()=>L(!1)})}),f.jsx("div",{className:"flex items-center gap-1 mb-4 bg-warm-100 rounded-lg p-0.5 w-fit",children:["all","active","completed","cancelled"].map(Ae=>{const $e=U===Ae,Xe=Ae==="all"?"todos.filterAll":Ae==="active"?"todos.filterActive":Ae==="completed"?"todos.filterCompleted":"todos.filterCancelled";return f.jsxs("button",{onClick:()=>Z(Ae),className:`inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${$e?"bg-theme-card shadow-sm text-accent":"text-warm-500 hover:text-warm-700"}`,children:[f.jsx("span",{children:re(Xe)}),f.jsx("span",{className:`text-2xs font-mono ${$e?"text-accent/70":"text-warm-400"}`,children:ae[Ae]})]},Ae)})}),f.jsx("div",{className:ee?"relative cursor-pointer":"space-y-3",onClick:ee?ie:void 0,title:ee?re("todos.expandStack"):void 0,style:ee?{height:76+Math.max(ye.length-1,0)*6}:void 0,children:ye.length===0?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:kee,title:re(U==="all"?"todos.empty":"todos.filterEmpty"),description:U==="all"?re("todos.emptyHint"):void 0})}):(()=>{const Ae=ye.map(({todo:Xe})=>Xe.id),$e=Xe=>{if(ee||!T)return null;const pt=F!==null&&G===Xe;return f.jsx("div",{onDragEnter:at=>{at.preventDefault(),ut(Xe)},onDragOver:at=>{at.preventDefault(),at.stopPropagation(),at.dataTransfer.dropEffect="link",ut(Xe)},onDragLeave:()=>gt(Xe),onDrop:at=>{at.preventDefault(),at.stopPropagation(),_t(Xe,Ae)},className:"relative",style:{height:16,marginTop:-8,marginBottom:-8},children:pt&&f.jsx("div",{className:"absolute inset-x-0 top-1/2 -translate-y-1/2 h-0.5 bg-accent rounded-full shadow-[0_0_6px_rgba(0,0,0,0.15)]"})},`gap-${Xe}`)};return f.jsxs(f.Fragment,{children:[$e(0),ye.map(({todo:Xe,depth:pt},at)=>{const Et=Te.has(Xe.id),Ze=Me.has(Xe.id),Ot=6,zt="top 400ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms ease",hn=ee?{position:"absolute",top:at*Ot,left:0,right:0,zIndex:ye.length+10-at,opacity:at===0?1:.9,pointerEvents:at===0?"auto":"none",transition:zt}:{transition:zt};return f.jsxs("div",{className:ee?"":"animate-fade-in",style:ee?hn:{animationDelay:`${at*30}ms`,...hn},children:[!ee&&Et&&f.jsxs("div",{className:"flex items-center gap-2 mb-2 px-3 py-2 rounded-lg bg-status-merged/5 border border-status-merged/20 animate-slide-up",style:{animationDelay:`${at*30}ms`},children:[f.jsx(ef,{size:16,className:"text-status-merged flex-shrink-0"}),f.jsx("span",{className:"text-xs font-semibold text-status-merged",children:re("todo.chainComplete")}),f.jsx("span",{className:"text-2xs font-mono text-warm-400",children:re("todo.chainTasks").replace("{count}",String(Te.get(Xe.id)))}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[Je&&he===null&&f.jsx("span",{className:"text-2xs text-status-error",children:Je}),f.jsxs("button",{onClick:()=>it(Xe.id),disabled:he===Xe.id,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-status-merged/15 text-status-merged hover:bg-status-merged/25 border border-status-merged/30 transition-colors disabled:opacity-50",title:re("todo.mergeChainDesc"),children:[f.jsx(GJ,{size:14}),he===Xe.id?"...":re("todo.mergeChain")]})]})]}),f.jsxs("div",{className:"relative animate-fade-in",style:{animationDelay:`${at*30}ms`,marginLeft:pt>0?`${pt*24}px`:void 0},children:[pt>0&&f.jsx("div",{className:"absolute top-0 bottom-0 w-px",style:{left:"-13px",backgroundColor:"var(--color-border)"}}),f.jsx(zue,{todo:Xe,allTodos:e,projectCliTool:t,projectIsGitRepo:r,projectUseWorktree:a,onStart:s,onStop:l,onDelete:c,onEdit:d,onMerge:h,onCleanup:g,onRetry:v,onContinue:b,onFix:w,onSchedule:S,onScheduleOnReset:j,resetsAt:k,onEvent:A,isInteractive:D.has(Xe.id),onSendInput:O,isDragSource:F===Xe.id,isDragging:F!==null,isDragOver:I===Xe.id,isValidDropTarget:ze(Xe.id),onDragStart:He,onDragEnd:ge,onDragOverTarget:ue,onDragLeaveTarget:_e,onDropTarget:fe,onRemoveDependency:_?Oe:void 0,debugLogging:P,showTokenUsage:M,isChainMember:Ze})]}),$e(at+1)]},Xe.id)})]})})()}),!ee&&F&&((ct=e.find(Ae=>Ae.id===F))==null?void 0:ct.depends_on)&&f.jsxs("div",{className:"mt-3 border-2 border-dashed border-red-300 rounded-lg p-4 text-center text-sm text-red-400 transition-colors hover:border-red-400 hover:text-red-500 hover:bg-red-50",onDragOver:Ae=>{Ae.preventDefault(),Ae.dataTransfer.dropEffect="move"},onDrop:Ae=>{Ae.preventDefault(),F&&_&&(Ce.current=!0,_(F,null))},children:[f.jsx(Ate,{size:20,className:"mx-auto mb-1"}),re("dnd.dropToRemoveDep")]})]})}const p0e=[{value:1,labelKey:"cron.mon"},{value:2,labelKey:"cron.tue"},{value:3,labelKey:"cron.wed"},{value:4,labelKey:"cron.thu"},{value:5,labelKey:"cron.fri"},{value:6,labelKey:"cron.sat"},{value:0,labelKey:"cron.sun"}];function g0e(e){const t={mode:"daily",everyMinutes:30,hourlyMinute:0,dailyHour:9,dailyMinute:0,weeklyDays:[1,2,3,4,5],weeklyHour:9,weeklyMinute:0,monthlyDay:1,monthlyHour:9,monthlyMinute:0};if(!e)return t;const n=e.trim().split(/\s+/);if(n.length!==5)return{...t,mode:"custom"};const[r,a,i,,s]=n,l=r.match(/^\*\/(\d+)$/);if(l&&a==="*"&&i==="*"&&s==="*")return{...t,mode:"minutes",everyMinutes:parseInt(l[1])};if(/^\d+$/.test(r)&&a==="*"&&i==="*"&&s==="*")return{...t,mode:"hourly",hourlyMinute:parseInt(r)};const c=/^\d+$/.test(r)?parseInt(r):-1,d=/^\d+$/.test(a)?parseInt(a):-1;if(c<0||d<0)return{...t,mode:"custom"};if(i==="*"&&s!=="*"){const h=s.split(",").map(m=>{const g=parseInt(m);return isNaN(g)?-1:g}).filter(m=>m>=0);if(h.length>0)return{...t,mode:"weekly",weeklyDays:h,weeklyHour:d,weeklyMinute:c}}return/^\d+$/.test(i)&&s==="*"?{...t,mode:"monthly",monthlyDay:parseInt(i),monthlyHour:d,monthlyMinute:c}:i==="*"&&s==="*"?{...t,mode:"daily",dailyHour:d,dailyMinute:c}:{...t,mode:"custom"}}function Cz(e){switch(e.mode){case"minutes":return`*/${e.everyMinutes} * * * *`;case"hourly":return`${e.hourlyMinute} * * * *`;case"daily":return`${e.dailyMinute} ${e.dailyHour} * * *`;case"weekly":return`${e.weeklyMinute} ${e.weeklyHour} * * ${e.weeklyDays.sort((t,n)=>t-n).join(",")}`;case"monthly":return`${e.monthlyMinute} ${e.monthlyHour} ${e.monthlyDay} * *`;default:return""}}function v0e({value:e,onChange:t}){const{t:n}=tt(),[r,a]=x.useState(()=>g0e(e)),[i,s]=x.useState(e);x.useEffect(()=>{if(r.mode==="custom")t(i);else{const v=Cz(r);t(v)}},[r,i]);const l=v=>{a(b=>({...b,...v}))},c=v=>{a(b=>{const w=b.weeklyDays.includes(v)?b.weeklyDays.filter(S=>S!==v):[...b.weeklyDays,v];return{...b,weeklyDays:w.length>0?w:b.weeklyDays}})},d=[{value:"minutes",labelKey:"cron.everyMinutes"},{value:"hourly",labelKey:"cron.hourly"},{value:"daily",labelKey:"cron.daily"},{value:"weekly",labelKey:"cron.weekly"},{value:"monthly",labelKey:"cron.monthly"},{value:"custom",labelKey:"cron.custom"}],h="bg-warm-50 border border-warm-300 rounded-lg px-2 py-1.5 text-sm text-warm-800 font-mono text-center transition-all duration-200 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20",m=(v,b,w,S)=>f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("select",{value:v,onChange:j=>w(parseInt(j.target.value)),className:`${h} w-16`,children:Array.from({length:24},(j,k)=>f.jsx("option",{value:k,children:String(k).padStart(2,"0")},k))}),f.jsx("span",{className:"text-warm-500 font-mono",children:":"}),f.jsx("select",{value:b,onChange:j=>S(parseInt(j.target.value)),className:`${h} w-16`,children:Array.from({length:12},(j,k)=>k*5).map(j=>f.jsx("option",{value:j,children:String(j).padStart(2,"0")},j))})]}),g=r.mode==="custom"?i:Cz(r);return f.jsxs("div",{className:"space-y-3",children:[f.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map(v=>f.jsx("button",{type:"button",onClick:()=>l({mode:v.value}),className:`px-2.5 py-1 rounded-md text-xs font-medium transition-colors ${r.mode===v.value?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:n(v.labelKey)},v.value))}),f.jsxs("div",{className:"bg-warm-50 rounded-lg p-3",children:[r.mode==="minutes"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.every")}),f.jsx("select",{value:r.everyMinutes,onChange:v=>l({everyMinutes:parseInt(v.target.value)}),className:`${h} w-20`,children:[5,10,15,20,30].map(v=>f.jsx("option",{value:v,children:v},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.minutesLabel")})]}),r.mode==="hourly"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyHourAt")}),f.jsx("select",{value:r.hourlyMinute,onChange:v=>l({hourlyMinute:parseInt(v.target.value)}),className:`${h} w-16`,children:Array.from({length:12},(v,b)=>b*5).map(v=>f.jsx("option",{value:v,children:String(v).padStart(2,"0")},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.minutesPast")})]}),r.mode==="daily"&&f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyDayAt")}),m(r.dailyHour,r.dailyMinute,v=>l({dailyHour:v}),v=>l({dailyMinute:v}))]}),r.mode==="weekly"&&f.jsxs("div",{className:"space-y-3",children:[f.jsx("div",{className:"flex flex-wrap gap-1.5",children:p0e.map(v=>f.jsx("button",{type:"button",onClick:()=>c(v.value),className:`w-9 h-9 rounded-lg text-xs font-medium transition-colors ${r.weeklyDays.includes(v.value)?"bg-amber-500 text-white":"bg-theme-card text-warm-500 border border-warm-200 hover:border-amber-300"}`,children:n(v.labelKey)},v.value))}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.at")}),m(r.weeklyHour,r.weeklyMinute,v=>l({weeklyHour:v}),v=>l({weeklyMinute:v}))]})]}),r.mode==="monthly"&&f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.everyMonthOn")}),f.jsx("select",{value:r.monthlyDay,onChange:v=>l({monthlyDay:parseInt(v.target.value)}),className:`${h} w-16`,children:Array.from({length:28},(v,b)=>b+1).map(v=>f.jsx("option",{value:v,children:v},v))}),f.jsx("span",{className:"text-sm text-warm-600",children:n("cron.dayAt")}),m(r.monthlyHour,r.monthlyMinute,v=>l({monthlyHour:v}),v=>l({monthlyMinute:v}))]}),r.mode==="custom"&&f.jsxs("div",{children:[f.jsx("input",{type:"text",placeholder:"*/30 * * * *",value:i,onChange:v=>s(v.target.value),className:"bg-warm-50 border border-warm-300 rounded-lg px-3 py-1.5 w-full text-sm text-warm-800 font-mono transition-all duration-200 focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1",children:n("schedule.cronHint")})]})]}),r.mode!=="custom"&&g&&f.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[f.jsxs("span",{className:"text-warm-400",children:[n("cron.expression"),":"]}),f.jsx("code",{className:"px-2 py-0.5 rounded bg-warm-100 text-warm-600 font-mono",children:g})]})]})}function y0e(){const e=new Date;e.setHours(e.getHours()+1),e.setMinutes(0,0,0);const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0");return`${t}-${n}-${r}T${a}:${i}`}function x0e(e){const t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0");return`${n}-${r}-${a}T${i}:${s}`}function f7({onSave:e,onCancel:t,initialTitle:n="",initialDescription:r="",initialCronExpression:a="",initialCliTool:i,initialCliModel:s,initialSkipIfRunning:l=!0,initialScheduleType:c="recurring",initialRunAt:d,projectCliTool:h="claude",projectCliModel:m=""}){const[g,v]=x.useState(n),[b,w]=x.useState(r),[S,j]=x.useState(a),[k,_]=x.useState(i||h||"claude"),[E,T]=x.useState(s??m??""),[A,O]=x.useState(l),[D,P]=x.useState(c),[M,z]=x.useState(d?x0e(d):y0e()),{t:L}=tt(),{getToolConfig:F}=oc(),R=F(k),I=K=>{_(K),T("")},q=D==="once",G=g.trim()&&(q?!!M:!!S.trim()),Y=K=>{K.preventDefault(),G&&e({title:g.trim(),description:b.trim(),cronExpression:q?"":S.trim(),cliTool:k,cliModel:E||void 0,skipIfRunning:A,scheduleType:D,runAt:q?new Date(M).toISOString():void 0})};return f.jsxs("form",{onSubmit:Y,className:"card p-5 border-amber-500/30",children:[f.jsx("div",{className:"mb-3",children:f.jsx("input",{type:"text",placeholder:L("scheduleForm.titlePlaceholder"),value:g,onChange:K=>v(K.target.value),className:"input-field",autoFocus:!0})}),f.jsx("div",{className:"mb-3",children:f.jsx("textarea",{placeholder:L("scheduleForm.descPlaceholder"),value:b,onChange:K=>w(K.target.value),rows:3,className:"input-field resize-none"})}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:L("schedule.type")}),f.jsxs("div",{className:"flex gap-1.5",children:[f.jsx("button",{type:"button",onClick:()=>P("recurring"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${D==="recurring"?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:L("schedule.recurring")}),f.jsx("button",{type:"button",onClick:()=>P("once"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${D==="once"?"bg-amber-500 text-white":"bg-warm-100 text-warm-500 hover:bg-warm-200"}`,children:L("schedule.once")})]})]}),q?f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:L("schedule.runAtLabel")}),f.jsx("input",{type:"datetime-local",value:M,onChange:K=>z(K.target.value),className:"input-field text-sm font-mono",min:new Date().toISOString().slice(0,16)})]}):f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:L("schedule.cronExpression")}),f.jsx(v0e,{value:S,onChange:j})]}),f.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:L("scheduleForm.cliTool")}),f.jsx("select",{value:k,onChange:K=>I(K.target.value),className:"input-field text-sm !py-2",children:ai.map(K=>f.jsx("option",{value:K.value,children:K.label},K.value))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:L("scheduleForm.aiModel")}),f.jsx("select",{value:E,onChange:K=>T(K.target.value),className:"input-field text-sm !py-2",children:R.models.map(K=>f.jsx("option",{value:K.value,children:K.label},K.value))})]})]}),!q&&f.jsx("div",{className:"mb-4",children:f.jsxs("label",{className:"flex items-center gap-2 text-sm text-warm-600 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:A,onChange:K=>O(K.target.checked),className:"rounded border-warm-300 text-amber-500 focus:ring-amber-500"}),L("schedule.skipIfRunning")]})}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-ghost text-sm",children:L("scheduleForm.cancel")}),f.jsx("button",{type:"submit",disabled:!G,className:"btn-primary text-sm",children:L("scheduleForm.save")})]})]})}function b0e({schedule:e,onToggle:t,onDelete:n,onEdit:r,onTrigger:a,onMergeRun:i,onCleanupRun:s}){const[l,c]=x.useState(!1),[d,h]=x.useState(!1),[m,g]=x.useState([]),[v,b]=x.useState(!1),[w,S]=x.useState(!1),[j,k]=x.useState(null),{t:_}=tt(),E=async()=>{try{const I=await T0(e.id);g(I)}catch{}},T=async I=>{if(!(!I.todo_id||!i)){k(I.id);try{await i(I.todo_id),await E()}finally{k(null)}}},A=async I=>{if(!(!I.todo_id||!s)){k(I.id);try{await s(I.todo_id),await E()}finally{k(null)}}},O=e.schedule_type==="once",D=async()=>{if(!v)try{const I=await T0(e.id);g(I),b(!0)}catch{}},P=()=>{const I=!l;c(I),I&&D()},M=async()=>{S(!0);try{await a(e.id);const I=await T0(e.id);g(I),b(!0)}finally{S(!1)}};if(d)return f.jsx(f7,{initialTitle:e.title,initialDescription:e.description??"",initialCronExpression:O?"":e.cron_expression,initialCliTool:e.cli_tool??void 0,initialCliModel:e.cli_model??void 0,initialSkipIfRunning:!!e.skip_if_running,initialScheduleType:e.schedule_type,initialRunAt:e.run_at??void 0,onSave:async I=>{await r(e.id,{title:I.title,description:I.description,cron_expression:I.cronExpression||void 0,cli_tool:I.cliTool,cli_model:I.cliModel,skip_if_running:I.skipIfRunning,schedule_type:I.scheduleType,run_at:I.runAt}),h(!1)},onCancel:()=>h(!1)});const z=e.is_active?"border-l-amber-500":"border-l-warm-300",L={triggered:"text-status-running",skipped:"text-status-warning",completed:"text-status-success",failed:"text-status-error"},F={triggered:_("schedule.runTriggered"),skipped:_("schedule.runSkipped"),completed:_("schedule.runCompleted"),failed:_("schedule.runFailed")},R=I=>I?new Date(I).toLocaleString():"";return f.jsxs("div",{className:`card border-l-4 ${z} overflow-hidden`,children:[f.jsxs("div",{className:"flex items-center gap-3 px-4 py-3.5 cursor-pointer hover:bg-warm-50 transition-colors",onClick:P,children:[f.jsx("button",{className:"text-warm-400 hover:text-amber-500 flex-shrink-0 transition-colors",children:f.jsx(zu,{size:14,className:`transition-transform duration-200 ${l?"rotate-90":""}`})}),f.jsx("span",{className:"flex-1 text-sm text-warm-800 font-medium truncate",children:e.title}),O?f.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-blue-500/10 text-blue-600 flex-shrink-0",children:[f.jsx(Qd,{size:12}),R(e.run_at)]}):f.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-mono font-medium bg-amber-500/10 text-amber-600 flex-shrink-0",children:e.cron_expression}),f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${O?"bg-blue-500/10 text-blue-600":"bg-amber-500/10 text-amber-600"}`,children:_(O?"schedule.once":"schedule.recurring")}),f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${e.is_active?"bg-status-success/10 text-status-success":"bg-warm-200 text-warm-500"}`,children:e.is_active?_("schedule.active"):_("schedule.paused")}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-2",onClick:I=>I.stopPropagation(),children:[f.jsx("button",{onClick:M,disabled:w,className:"p-1.5 text-amber-500/60 hover:text-amber-500 hover:bg-amber-500/10 rounded-lg transition-colors disabled:opacity-30",title:_("schedule.trigger"),children:f.jsx(yl,{size:14})}),f.jsx("button",{onClick:()=>t(e.id,!e.is_active),className:`p-1.5 rounded-lg transition-colors ${e.is_active?"text-status-warning/60 hover:text-status-warning hover:bg-status-warning/10":"text-status-success/60 hover:text-status-success hover:bg-status-success/10"}`,title:e.is_active?_("schedule.pause"):_("schedule.activate"),children:e.is_active?f.jsx(FN,{size:14}):f.jsx(uee,{size:14})}),f.jsx("button",{onClick:()=>h(!0),className:"p-1.5 text-warm-400 hover:text-accent hover:bg-accent/10 rounded-lg transition-colors",title:_("schedule.edit"),children:f.jsx(Mf,{size:14})}),f.jsx("button",{onClick:()=>n(e.id),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-status-error/10 rounded-lg transition-colors",title:_("schedule.delete"),children:f.jsx(es,{size:14})})]})]}),l&&f.jsxs("div",{className:"border-t border-warm-200 px-5 py-5 space-y-4 animate-fade-in bg-warm-50/50",children:[e.description&&f.jsx("div",{children:f.jsx("p",{className:"text-sm text-warm-600 whitespace-pre-wrap leading-relaxed",children:e.description})}),f.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[O?f.jsxs("span",{className:"badge bg-blue-500/10 text-blue-600 font-mono",children:[_("schedule.runAtLabel"),": ",R(e.run_at)]}):f.jsx("span",{className:"badge bg-amber-500/10 text-amber-600 font-mono",children:e.cron_expression}),!O&&e.skip_if_running?f.jsx("span",{className:"badge bg-status-info/10 text-status-info",children:_("schedule.skipIfRunning")}):null,f.jsxs("span",{className:"badge bg-warm-200 text-warm-600",children:[_("schedule.lastRun"),": ",e.last_run_at?new Date(e.last_run_at).toLocaleString():_("schedule.never")]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider mb-2",children:_("schedule.runs")}),m.length===0?f.jsx("p",{className:"text-xs text-warm-400 italic",children:_("schedule.noRuns")}):f.jsx("div",{className:"max-h-48 overflow-auto space-y-1",children:m.map(I=>{const q=I.todo_id&&I.todo_status==="completed"&&!!I.todo_branch_name,G=I.todo_id&&I.todo_status!=="running"&&I.todo_status!=="pending"&&(I.todo_worktree_path||I.todo_branch_name),Y=j===I.id;return f.jsxs("div",{className:"flex items-center gap-3 text-xs py-1.5 px-3 rounded-lg bg-theme-hover",children:[f.jsx("span",{className:`font-medium ${L[I.status]||"text-warm-500"}`,children:F[I.status]||I.status}),I.skipped_reason&&f.jsxs("span",{className:"text-warm-400",children:["(",I.skipped_reason,")"]}),f.jsxs("div",{className:"flex items-center gap-0.5 ml-auto",children:[q&&i&&f.jsx("button",{onClick:()=>T(I),disabled:Y,className:"p-1 text-status-merged/60 hover:text-status-merged hover:bg-status-merged/10 rounded transition-colors disabled:opacity-30",title:_("todo.merge"),children:f.jsx(Of,{size:12})}),G&&s&&f.jsx("button",{onClick:()=>A(I),disabled:Y,className:"p-1 text-status-warning/60 hover:text-status-warning hover:bg-status-warning/10 rounded transition-colors disabled:opacity-30",title:_("todo.cleanup"),children:f.jsx(es,{size:12})})]}),f.jsx("span",{className:"text-warm-400 font-mono flex-shrink-0",children:new Date(I.started_at).toLocaleString()})]},I.id)})})]})]})]})}function w0e({schedules:e,projectCliTool:t,projectCliModel:n,onAddSchedule:r,onToggleSchedule:a,onDeleteSchedule:i,onEditSchedule:s,onTriggerSchedule:l,onMergeRun:c,onCleanupRun:d}){const[h,m]=x.useState(!1),{t:g}=tt();return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:g("schedules.title")}),!h&&f.jsxs("button",{onClick:()=>m(!0),className:"btn-primary btn-sm",children:[f.jsx(sc,{size:14}),g("schedules.add")]})]}),h&&f.jsx("div",{className:"mb-5 animate-slide-up",children:f.jsx(f7,{projectCliTool:t,projectCliModel:n,onSave:async v=>{await r(v),m(!1)},onCancel:()=>m(!1)})}),f.jsx("div",{className:"space-y-3",children:e.length===0?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:ree,title:g("schedules.empty"),description:g("schedules.emptyHint")})}):e.map((v,b)=>f.jsx("div",{className:"animate-slide-up",style:{animationDelay:`${b*30}ms`},children:f.jsx(b0e,{schedule:v,onToggle:a,onDelete:i,onEdit:s,onTrigger:l,onMergeRun:c,onCleanupRun:d})},v.id))})]})}const yu=["#D4A843","#2196F3","#4CAF50","#E53935","#9C27B0","#FF9800","#00BCD4","#795548"];function S0e(e){const t=new Map;e.forEach((a,i)=>t.set(a.hash,i));const n=[],r=[];for(let a=0;a<e.length;a++){const i=e[a];let s=n.indexOf(i.hash);s===-1&&(s=n.indexOf(null),s===-1&&(s=n.length,n.push(null))),n[s]=null;const l=yu[s%yu.length],c=[];for(let d=0;d<i.parentHashes.length;d++){const h=i.parentHashes[d],m=t.get(h);if(m===void 0)continue;let g=n.indexOf(h);if(g!==-1)c.push({fromLane:s,toLane:g,toRow:m,color:yu[g%yu.length]});else if(d===0)n[s]=h,c.push({fromLane:s,toLane:s,toRow:m,color:l});else{let v=n.indexOf(null);v===-1&&(v=n.length,n.push(null)),n[v]=h,c.push({fromLane:s,toLane:v,toRow:m,color:yu[v%yu.length]})}}r.push({lane:s,color:l,connections:c})}return r}function j0e({refStr:e}){const t=e.startsWith("HEAD"),n=e.startsWith("origin/")||e.includes("remotes/"),r=e.startsWith("tag: ");let a=e,i="";return r?(a=e.replace("tag: ",""),i="bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300"):t?(a=e.replace("HEAD -> ",""),i="bg-status-success/15 text-status-success font-semibold"):n?i="bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300":i="bg-accent/15 text-accent",f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium whitespace-nowrap ${i}`,children:a})}const Ys=32,zo=16,_0e=4,k0e=10;function C0e({graphNodes:e,totalRows:t}){const r=(Math.min(k0e,e.reduce((a,i)=>{const s=i.connections.reduce((l,c)=>Math.max(l,c.fromLane,c.toLane),0);return Math.max(a,i.lane,s)},0)+1)+1)*zo+8;return f.jsxs("svg",{width:r,height:t*Ys,className:"shrink-0",style:{minWidth:r},children:[e.map((a,i)=>a.connections.map((s,l)=>{const c=s.fromLane*zo+zo/2+4,d=i*Ys+Ys/2,h=s.toLane*zo+zo/2+4,m=s.toRow*Ys+Ys/2;if(c===h)return f.jsx("line",{x1:c,y1:d,x2:h,y2:m,stroke:s.color,strokeWidth:2,strokeOpacity:.7},`${i}-${l}`);{const g=(d+m)/2;return f.jsx("path",{d:`M${c},${d} C${c},${g} ${h},${g} ${h},${m}`,fill:"none",stroke:s.color,strokeWidth:2,strokeOpacity:.7},`${i}-${l}`)}})),e.map((a,i)=>{const s=a.lane*zo+zo/2+4,l=i*Ys+Ys/2;return f.jsx("circle",{cx:s,cy:l,r:_0e,fill:a.color,stroke:"white",strokeWidth:1.5},`dot-${i}`)})]})}function Nz(e,t){return e==="?"||t==="?"?{label:"U",color:"text-warm-400"}:e==="A"||t==="A"?{label:"A",color:"text-status-success"}:e==="D"||t==="D"?{label:"D",color:"text-status-error"}:e==="R"||t==="R"?{label:"R",color:"text-purple-500"}:e==="C"||t==="C"?{label:"C",color:"text-blue-500"}:{label:"M",color:"text-accent"}}function N0e(e){switch(e){case"A":return{label:"A",color:"text-status-success"};case"D":return{label:"D",color:"text-status-error"};case"R":return{label:"R",color:"text-purple-500"};case"C":return{label:"C",color:"text-blue-500"};default:return{label:"M",color:"text-accent"}}}function E0e({files:e,loading:t,selectedFile:n,onFileClick:r,commitHash:a}){const{t:i}=tt();return f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsxs("div",{className:"px-3 py-2 border-b border-warm-100 flex items-center justify-between shrink-0",children:[f.jsx("span",{className:"text-[11px] font-semibold text-warm-500 uppercase tracking-wider",children:i("git.changedFiles")}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("span",{className:"text-2xs text-warm-400",children:[e.length," ",i("git.files")]}),f.jsx("span",{className:"text-2xs font-mono text-warm-400",children:a.substring(0,7)})]})]}),t?f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:i("git.loadingFiles")})}):e.length===0?f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:i("git.noFilesChanged")})}):f.jsx("div",{className:"flex-1 overflow-y-auto",children:e.map(s=>{const l=N0e(s.status),c=n===s.path;return f.jsxs("div",{onClick:()=>r(s.path),className:`flex items-center gap-2 px-3 py-1.5 cursor-pointer text-xs hover:bg-warm-50/50 transition-colors ${c?"bg-accent/10 border-l-2 border-accent":""}`,children:[f.jsx("span",{className:`font-mono font-bold text-2xs w-3 shrink-0 ${l.color}`,children:l.label}),f.jsxs("span",{className:"truncate flex-1 text-warm-600",title:s.path,children:[s.path.split("/").pop(),f.jsx("span",{className:"text-warm-400 ml-1 text-2xs",children:s.path.includes("/")?s.path.substring(0,s.path.lastIndexOf("/")):""})]}),f.jsxs("span",{className:"shrink-0 text-2xs text-status-success",children:["+",s.additions]}),f.jsxs("span",{className:"shrink-0 text-2xs text-status-error",children:["-",s.deletions]})]},s.path)})})]})}function A0e({diff:e,loading:t,selectedFile:n}){const{t:r}=tt();return n?t?f.jsx("div",{className:"h-full flex items-center justify-center",children:f.jsx("span",{className:"text-xs text-warm-400",children:r("git.loadingDiff")})}):f.jsxs("div",{className:"h-full flex flex-col",children:[f.jsx("div",{className:"px-3 py-2 border-b border-warm-100 shrink-0",children:f.jsx("span",{className:"text-xs font-mono text-warm-600",children:n})}),f.jsx("div",{className:"flex-1 overflow-auto",children:f.jsx("pre",{className:"p-3 font-mono text-xs leading-relaxed",children:e?e.split(`
484
+ `).map((a,i)=>{let s="text-warm-400";return a.startsWith("+")&&!a.startsWith("+++")?s="text-green-400":a.startsWith("-")&&!a.startsWith("---")?s="text-red-400":a.startsWith("@@")?s="text-blue-400":a.startsWith("diff ")&&(s="text-amber-300 font-bold"),f.jsx("div",{className:s,children:a||" "},i)}):f.jsx("span",{className:"text-warm-500 italic",children:"No changes"})})})]}):f.jsx("div",{className:"h-full flex items-center justify-center",children:f.jsx("span",{className:"text-sm text-warm-400",children:r("git.selectFileToViewDiff")})})}function T0e({projectId:e,onRefresh:t,busy:n,setBusy:r,branches:a,statusFiles:i}){const{t:s}=tt(),[l,c]=x.useState(null),[d,h]=x.useState(""),[m,g]=x.useState(""),[v,b]=x.useState(null),w=()=>{c(null),h(""),g(""),b(null)},S=async T=>{r(!0),b(null);try{await T(),w(),t()}catch(A){b(A instanceof Error?A.message:"Error")}finally{r(!1)}},j=i.some(T=>T.index!==" "&&T.index!=="?"),k=({label:T,onClick:A,icon:O,badge:D})=>f.jsxs("button",{onClick:A,disabled:n,className:"flex flex-col items-center gap-0.5 px-2.5 py-1.5 rounded hover:bg-warm-50 transition-colors disabled:opacity-50 relative",title:T,children:[f.jsx("div",{className:"h-5 w-5 flex items-center justify-center text-warm-500",children:O}),f.jsx("span",{className:"text-2xs text-warm-600 whitespace-nowrap",children:T}),D!==void 0&&D>0&&f.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-accent text-white text-[9px] font-bold rounded-full h-3.5 min-w-[14px] flex items-center justify-center px-0.5",children:D})]}),_=({title:T,children:A})=>f.jsx(ts,{open:!0,onClose:w,size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:T}),f.jsx("button",{onClick:w,className:"text-warm-400 hover:text-warm-600",children:f.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsxs("div",{className:"p-4 space-y-3",children:[v&&f.jsx("p",{className:"text-status-error text-xs",children:v}),A]})]})}),E=a.filter(T=>!T.remote);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-warm-100 overflow-x-auto",children:[f.jsx(k,{label:s("git.commit"),onClick:()=>c("commit"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})})}),f.jsx(k,{label:s("git.pull"),onClick:()=>S(()=>JF(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})})}),f.jsx(k,{label:s("git.push"),onClick:()=>S(()=>e8(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"})})}),f.jsx(k,{label:s("git.fetch"),onClick:()=>S(()=>t8(e)),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 7.5h-.75A2.25 2.25 0 004.5 9.75v7.5a2.25 2.25 0 002.25 2.25h7.5a2.25 2.25 0 002.25-2.25v-7.5a2.25 2.25 0 00-2.25-2.25h-.75m-6 3.75l3 3m0 0l3-3m-3 3V1.5"})})}),f.jsx("div",{className:"w-px h-8 bg-warm-200 mx-1"}),f.jsx(k,{label:s("git.branch"),onClick:()=>c("branch"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 3v12m0 0a3 3 0 103 3H15a3 3 0 100-3m-9 0h9m-9 0a3 3 0 01-3-3V6a3 3 0 013-3h0"})})}),f.jsx(k,{label:s("git.merge"),onClick:()=>c("merge"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}),f.jsx(k,{label:s("git.stash"),onClick:()=>c("stash"),icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})})}),f.jsx(k,{label:s("git.discard"),onClick:()=>{i.length!==0&&confirm(s("git.confirmDiscard"))&&S(()=>a8(e,void 0,!0))},icon:f.jsx("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})})}),f.jsx(k,{label:s("git.tag"),onClick:()=>c("tag"),icon:f.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,className:"h-5 w-5",children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6z"})]})})]}),l==="commit"&&f.jsxs(_,{title:s("git.commit"),children:[f.jsx("textarea",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm resize-none focus:outline-none focus:ring-1 focus:ring-accent",rows:3,placeholder:s("git.commitMessage"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsxs("button",{className:"w-full btn-primary text-sm py-2",disabled:n||!d.trim()||!j,onClick:()=>S(()=>Gte(e,d.trim())),children:[s("git.commit")," ",!j&&f.jsxs("span",{className:"text-xs opacity-70 ml-1",children:["(",s("git.staged"),": 0)"]})]})]}),l==="branch"&&f.jsxs(_,{title:s("git.newBranch"),children:[f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.branchName"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsx("div",{className:"flex gap-2",children:f.jsx("button",{className:"flex-1 btn-primary text-sm py-2",disabled:n||!d.trim(),onClick:()=>S(()=>Vte(e,d.trim())),children:s("git.create")})}),E.length>0&&f.jsxs("div",{className:"border-t border-warm-100 pt-2 mt-1",children:[f.jsx("p",{className:"text-2xs text-warm-400 uppercase tracking-wider mb-1",children:s("git.selectBranch")}),f.jsx("div",{className:"max-h-32 overflow-y-auto space-y-px",children:E.filter(T=>!T.current).map(T=>f.jsxs("div",{className:"flex items-center justify-between px-2 py-1 text-xs hover:bg-warm-50 rounded group",children:[f.jsx("button",{className:"truncate text-warm-600 hover:text-accent",onClick:()=>S(()=>sC(e,T.name)),children:T.name}),f.jsx("button",{className:"text-warm-300 hover:text-status-error opacity-0 group-hover:opacity-100 transition-opacity text-2xs",onClick:()=>{confirm(`Delete branch ${T.name}?`)&&S(()=>n8(e,T.name))},children:s("git.delete")})]},T.name))})]})]}),l==="merge"&&f.jsxs(_,{title:s("git.merge"),children:[f.jsx("p",{className:"text-xs text-warm-500",children:s("git.selectBranch")}),f.jsx("div",{className:"max-h-48 overflow-y-auto space-y-px",children:E.filter(T=>!T.current).map(T=>f.jsx("button",{className:"w-full text-left px-3 py-2 text-sm hover:bg-warm-50 rounded text-warm-600 truncate",disabled:n,onClick:()=>S(()=>r8(e,T.name)),children:T.name},T.name))})]}),l==="stash"&&f.jsx(O0e,{projectId:e,busy:n,exec:S,inputValue:d,setInputValue:h}),l==="tag"&&f.jsxs(_,{title:s("git.tag"),children:[f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.tagName"),value:d,onChange:T=>h(T.target.value),autoFocus:!0}),f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:s("git.tagMessage"),value:m,onChange:T=>g(T.target.value)}),f.jsx("button",{className:"w-full btn-primary text-sm py-2",disabled:n||!d.trim(),onClick:()=>S(()=>Xte(e,d.trim(),m.trim()||void 0)),children:s("git.create")})]})]})}function O0e({projectId:e,busy:t,exec:n,inputValue:r,setInputValue:a}){const{t:i}=tt(),[s,l]=x.useState([]);return x.useEffect(()=>{Wte(e).then(l).catch(()=>{})},[e]),f.jsx(ts,{open:!0,onClose:()=>a(""),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:i("git.stash")})}),f.jsxs("div",{className:"p-4 space-y-3",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{className:"flex-1 border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent",placeholder:i("git.stashMessage"),value:r,onChange:c=>a(c.target.value),autoFocus:!0}),f.jsx("button",{className:"btn-primary text-sm px-3 py-2",disabled:t,onClick:()=>n(()=>Kte(e,r.trim()||void 0)),children:i("git.stash")})]}),s.length>0?f.jsx("div",{className:"space-y-px max-h-40 overflow-y-auto",children:s.map(c=>f.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 text-xs hover:bg-warm-50 rounded",children:[f.jsx("span",{className:"text-warm-600 truncate flex-1",children:c.message||`stash@{${c.index}}`}),f.jsx("button",{className:"text-accent hover:underline text-[11px] ml-2 shrink-0",disabled:t,onClick:()=>n(()=>Yte(e,c.index)),children:i("git.stashPop")})]},c.index))}):f.jsx("p",{className:"text-xs text-warm-400 text-center",children:i("git.noStashes")})]})]})})}function M0e({projectId:e,files:t,busy:n,setBusy:r,onRefresh:a,onError:i}){const{t:s}=tt(),l=t.filter(g=>g.index!==" "&&g.index!=="?"),c=t.filter(g=>g.working_dir!==" "&&g.working_dir!=="?"&&(g.index===" "||g.index==="?")),d=t.filter(g=>g.index==="?"&&g.working_dir==="?"),h=async g=>{r(!0),i(null);try{await g(),a()}catch(v){i(v instanceof Error?v.message:"Operation failed")}finally{r(!1)}};if(t.length===0)return f.jsx("div",{className:"px-3 py-2 text-xs text-warm-400 text-center",children:s("git.noChanges")});const m=({file:g,type:v})=>{const b=v==="staged"?Nz(g.index," "):Nz(" ",g.working_dir);return f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-0.5 hover:bg-warm-50 rounded group text-xs",children:[f.jsx("span",{className:`font-mono font-bold text-2xs w-3 text-center ${b.color}`,children:b.label}),f.jsx("span",{className:"truncate flex-1 text-warm-600",children:g.path}),f.jsxs("div",{className:"opacity-0 group-hover:opacity-100 flex gap-1 transition-opacity",children:[v==="staged"&&f.jsx("button",{className:"text-2xs text-warm-400 hover:text-warm-600",disabled:n,onClick:()=>h(()=>YP(e,[g.path])),children:s("git.unstage")}),v==="unstaged"&&f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"text-2xs text-accent hover:underline",disabled:n,onClick:()=>h(()=>Em(e,[g.path])),children:s("git.stage")}),f.jsx("button",{className:"text-2xs text-status-error hover:underline",disabled:n,onClick:()=>{confirm(s("git.confirmDiscardFile"))&&h(()=>a8(e,[g.path]))},children:s("git.discard")})]}),v==="untracked"&&f.jsx("button",{className:"text-2xs text-accent hover:underline",disabled:n,onClick:()=>h(()=>Em(e,[g.path])),children:s("git.stage")})]})]})};return f.jsxs("div",{className:"space-y-1",children:[l.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[f.jsxs("span",{className:"text-2xs font-semibold text-status-success uppercase tracking-wider",children:[s("git.staged")," (",l.length,")"]}),f.jsx("button",{className:"text-2xs text-warm-400 hover:text-warm-600",disabled:n,onClick:()=>h(()=>YP(e,l.map(g=>g.path))),children:s("git.unstageAll")})]}),l.map(g=>f.jsx(m,{file:g,type:"staged"},`s-${g.path}`))]}),c.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[f.jsxs("span",{className:"text-2xs font-semibold text-accent uppercase tracking-wider",children:[s("git.unstaged")," (",c.length,")"]}),f.jsx("button",{className:"text-2xs text-warm-400 hover:text-warm-600",disabled:n,onClick:()=>h(()=>Em(e,c.map(g=>g.path))),children:s("git.stageAll")})]}),c.map(g=>f.jsx(m,{file:g,type:"unstaged"},`u-${g.path}`))]}),d.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[f.jsxs("span",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider",children:[s("git.untracked")," (",d.length,")"]}),f.jsx("button",{className:"text-2xs text-warm-400 hover:text-warm-600",disabled:n,onClick:()=>h(()=>Em(e,d.map(g=>g.path))),children:s("git.stageAll")})]}),d.map(g=>f.jsx(m,{file:g,type:"untracked"},`t-${g.path}`))]})]})}function P0e({branches:e,tags:t,stashCount:n,projectId:r,busy:a,setBusy:i,onRefresh:s,onError:l}){const{t:c}=tt(),[d,h]=x.useState(new Set(["local","remote"])),[m,g]=x.useState(null),[v,b]=x.useState(null),[w,S]=x.useState(""),j=x.useRef(null),[k,_]=x.useState([]),[E,T]=x.useState(null);x.useEffect(()=>{ZP(r).then(R=>_(R.worktrees)).catch(()=>{})},[r]);const A=x.useCallback(()=>{ZP(r).then(R=>_(R.worktrees)).catch(()=>{})},[r]);x.useEffect(()=>{A()},[e,A]),x.useEffect(()=>{if(!m)return;const R=q=>{j.current&&!j.current.contains(q.target)&&g(null)},I=()=>g(null);return document.addEventListener("mousedown",R),document.addEventListener("scroll",I,!0),()=>{document.removeEventListener("mousedown",R),document.removeEventListener("scroll",I,!0)}},[m]),x.useEffect(()=>{if(!m||!j.current)return;const R=j.current.getBoundingClientRect();let{x:I,y:q}=m;I+R.width>window.innerWidth&&(I=window.innerWidth-R.width-8),q+R.height>window.innerHeight&&(q=window.innerHeight-R.height-8),(I!==m.x||q!==m.y)&&g({...m,x:I,y:q})},[m]);const O=async(R,I)=>{i(!0),l(null),g(null);try{await R(),s(),I&&I()}catch(q){l(q instanceof Error?q.message:"Error")}finally{i(!1)}},D=(R,I,q,G)=>{R.preventDefault(),R.stopPropagation(),g({branch:I,isRemote:q,isCurrent:G,x:R.clientX,y:R.clientY})},P=R=>{h(I=>{const q=new Set(I);return q.has(R)?q.delete(R):q.add(R),q})},M=e.filter(R=>!R.remote),z=e.filter(R=>R.remote),L=({id:R,label:I,count:q})=>f.jsxs("button",{onClick:()=>P(R),className:"w-full flex items-center gap-1.5 py-1.5 text-[11px] font-semibold text-warm-500 uppercase tracking-wider hover:text-warm-700 transition-colors",children:[f.jsx("svg",{className:`h-3 w-3 transition-transform ${d.has(R)?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),I,f.jsx("span",{className:"text-warm-400 font-normal ml-auto",children:q})]}),F=({label:R,onClick:I,danger:q})=>f.jsx("button",{className:`w-full text-left px-3 py-1.5 hover:bg-warm-100 dark:hover:bg-warm-800 transition-colors ${q?"text-status-error":"text-warm-700 dark:text-warm-300"}`,disabled:a,onClick:I,children:R});return f.jsxs("div",{className:"space-y-1",children:[f.jsx(L,{id:"local",label:c("git.branches"),count:M.length}),d.has("local")&&f.jsx("div",{className:"pl-1 space-y-px",children:M.map(R=>f.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs truncate cursor-context-menu select-none ${R.current?"text-accent font-semibold bg-accent/10":"text-warm-600 hover:bg-warm-50"}`,onContextMenu:I=>D(I,R.name,!1,!!R.current),children:[R.current&&f.jsx("svg",{className:"h-3 w-3 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),f.jsx("span",{className:"truncate",children:R.name})]},R.name))}),z.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(L,{id:"remote",label:c("git.remotes"),count:z.length}),d.has("remote")&&f.jsx("div",{className:"pl-1 space-y-px",children:z.map(R=>f.jsx("div",{className:"px-2 py-1 text-xs text-warm-500 truncate hover:bg-warm-50 rounded cursor-context-menu select-none",onContextMenu:I=>D(I,R.name,!0,!1),children:R.name.replace("remotes/","")},R.name))})]}),t.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(L,{id:"tags",label:c("git.tags"),count:t.length}),d.has("tags")&&f.jsx("div",{className:"pl-1 space-y-px",children:t.map(R=>f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-warm-500 truncate hover:bg-warm-50 rounded",children:[f.jsxs("svg",{className:"h-3 w-3 text-purple-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6h.008v.008H6V6z"})]}),R]},R))})]}),k.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(L,{id:"worktrees",label:c("git.worktrees"),count:k.length}),d.has("worktrees")&&f.jsx("div",{className:"pl-1 space-y-px",children:k.map(R=>f.jsxs("div",{className:"group flex items-center gap-1.5 px-2 py-1 text-xs text-warm-600 hover:bg-warm-50 dark:hover:bg-warm-800/50 rounded",children:[f.jsx("svg",{className:"h-3 w-3 text-amber-500 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),f.jsx("span",{className:"truncate flex-1",title:R.path,children:R.branch}),f.jsx("button",{className:"opacity-0 group-hover:opacity-100 shrink-0 p-0.5 text-warm-400 hover:text-status-error transition-all",disabled:a||E===R.path,title:c("git.cleanupWorktree"),onClick:()=>{confirm(c("git.confirmCleanupWorktree").replace("{name}",R.branch))&&(T(R.path),i(!0),l(null),Jte(r,R.path,R.branch).then(()=>{_(I=>I.filter(q=>q.path!==R.path)),s()}).catch(I=>l(I instanceof Error?I.message:"Error")).finally(()=>{T(null),i(!1)}))},children:E===R.path?f.jsx("svg",{className:"h-3 w-3 animate-spin",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}):f.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},R.path))})]}),n>0&&f.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-semibold text-warm-500 uppercase tracking-wider",children:[c("git.stashes"),f.jsx("span",{className:"text-warm-400 font-normal ml-auto",children:n})]}),m&&vl.createPortal(f.jsxs("div",{ref:j,className:"fixed z-sticky bg-theme-card border border-warm-200 dark:border-warm-700 rounded-lg shadow-xl py-1 min-w-[220px] text-xs",style:{left:m.x,top:m.y},children:[!m.isCurrent&&!m.isRemote&&f.jsx(F,{label:`${c("git.checkout")} ${m.branch}`,onClick:()=>O(()=>sC(r,m.branch))}),!m.isCurrent&&m.isRemote&&f.jsx(F,{label:`${c("git.checkoutRemote")} ${m.branch.replace(/^(remotes\/)?origin\//,"")}`,onClick:()=>{const R=m.branch.replace(/^(remotes\/)?origin\//,"");O(()=>sC(r,R))}}),!m.isCurrent&&f.jsx(F,{label:`${c("git.mergeInto")} ${m.branch}`,onClick:()=>O(()=>r8(r,m.branch))}),!m.isCurrent&&!m.isRemote&&f.jsx(F,{label:`${c("git.rebaseOnto")} ${m.branch}`,onClick:()=>O(()=>Zte(r,m.branch))}),f.jsx("div",{className:"border-t border-warm-100 dark:border-warm-700 my-1"}),f.jsx(F,{label:`${c("git.fetch")}`,onClick:()=>O(()=>t8(r))}),!m.isRemote&&f.jsxs(f.Fragment,{children:[f.jsx(F,{label:`${c("git.pull")}`,onClick:()=>O(()=>JF(r))}),f.jsx(F,{label:`${c("git.push")}`,onClick:()=>O(()=>e8(r))})]}),!m.isRemote&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"border-t border-warm-100 dark:border-warm-700 my-1"}),f.jsx(F,{label:`${c("git.renameBranch")} ${m.branch}...`,onClick:()=>{b(m.branch),S(m.branch),g(null)}}),!m.isCurrent&&f.jsx(F,{danger:!0,label:`${c("git.delete")} ${m.branch}`,onClick:()=>{confirm(c("git.confirmDelete").replace("{name}",m.branch))?O(()=>n8(r,m.branch)):g(null)}})]})]}),document.body),v&&f.jsx(ts,{open:!0,onClose:()=>b(null),size:"sm",children:f.jsxs("div",{className:"bg-theme-card rounded-lg shadow-xl w-80 max-w-[90vw]",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:c("git.renameBranch")}),f.jsx("button",{onClick:()=>b(null),className:"text-warm-400 hover:text-warm-600",children:f.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsxs("div",{className:"p-4 space-y-3",children:[f.jsxs("p",{className:"text-xs text-warm-500",children:[v," →"]}),f.jsx("input",{className:"w-full border border-warm-200 rounded px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-accent bg-transparent",placeholder:c("git.newBranchName"),value:w,onChange:R=>S(R.target.value),onKeyDown:R=>{if(R.key==="Enter"&&w.trim()&&w.trim()!==v){const I=v;O(()=>WP(r,I,w.trim()),()=>b(null))}},autoFocus:!0}),f.jsx("button",{className:"w-full btn-primary text-sm py-2",disabled:a||!w.trim()||w.trim()===v,onClick:()=>{const R=v;O(()=>WP(r,R,w.trim()),()=>b(null))},children:c("git.rename")})]})]})})]})}function D0e(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.floor((t-n)/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const i=Math.floor(a/60);if(i<24)return`${i}h`;const s=Math.floor(i/24);if(s<30)return`${s}d`;const l=Math.floor(s/30);return l<12?`${l}mo`:`${Math.floor(s/365)}y`}function R0e({project:e,refreshTrigger:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!0),[l,c]=x.useState(!1),[d,h]=x.useState(!0),[m,g]=x.useState(null),[v,b]=x.useState([]),[w,S]=x.useState([]),[j,k]=x.useState(0),[_,E]=x.useState([]),[T,A]=x.useState(!1),[O,D]=x.useState(null),[P,M]=x.useState(null),[z,L]=x.useState([]),[F,R]=x.useState(!1),[I,q]=x.useState(null),[G,Y]=x.useState(""),[K,B]=x.useState(!1),U=x.useRef(null),X=x.useRef(null),H=x.useRef(!1),W=x.useCallback(async()=>{try{const ie=await Ute(e.id);b(ie.branches),S(ie.tags),k(ie.stashCount)}catch{}},[e.id]),Q=x.useCallback(async()=>{try{const ie=await Fte(e.id);E(ie.files)}catch{}},[e.id]),J=x.useCallback(async(ie,ee=!1)=>{if(!H.current){H.current=!0,c(!0),g(null);try{const ae=await Hte(e.id,ie,50);a(xe=>ee?ae.commits:[...xe,...ae.commits]),s(ae.hasMore)}catch(ae){g(ae instanceof Error?ae.message:"Failed to fetch git log")}finally{c(!1),h(!1),H.current=!1}}},[e.id]),re=x.useCallback(()=>{a([]),s(!0),h(!0),M(null),L([]),q(null),Y(""),J(0,!0),W(),Q()},[J,W,Q]),oe=x.useCallback(async ie=>{if((P==null?void 0:P.hash)===ie.hash){M(null),L([]),q(null),Y("");return}M(ie),q(null),Y(""),R(!0);try{const ee=await Qte(e.id,ie.hash);if(L(ee.files),ee.files.length>0){const ae=ee.files[0].path;q(ae),B(!0);try{const xe=await XP(e.id,ie.hash,ae);Y(xe.diff)}catch{Y("")}finally{B(!1)}}}catch{L([])}finally{R(!1)}},[e.id,P==null?void 0:P.hash]),Z=x.useCallback(async ie=>{if(P){q(ie),B(!0);try{const ee=await XP(e.id,P.hash,ie);Y(ee.diff)}catch{Y("")}finally{B(!1)}}},[e.id,P]);x.useEffect(()=>{J(0,!0),W(),Q()},[J,W,Q]),x.useEffect(()=>{t&&t>0&&re()},[t]),x.useEffect(()=>{const ie=U.current;if(!ie)return;const ee=new IntersectionObserver(ae=>{ae[0].isIntersecting&&i&&!H.current&&r.length>0&&J(r.length)},{rootMargin:"200px"});return ee.observe(ie),()=>ee.disconnect()},[i,r.length,J]);const le=x.useMemo(()=>S0e(r),[r]);return f.jsxs("div",{className:"animate-fade-in flex flex-col",style:{height:"calc(100vh - 260px)",minHeight:"400px"},children:[f.jsx("div",{className:"card mb-2 overflow-hidden",children:f.jsx(T0e,{projectId:e.id,onRefresh:re,busy:T,setBusy:A,branches:v,statusFiles:_})}),O&&f.jsxs("div",{className:"mb-2 px-3 py-2 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 text-xs flex items-center justify-between rounded border border-red-200 dark:border-red-800",children:[f.jsx("span",{children:O}),f.jsx("button",{onClick:()=>D(null),className:"ml-2 shrink-0 hover:text-red-800 dark:hover:text-red-300",children:"×"})]}),f.jsxs("div",{className:"flex gap-3 flex-1 min-h-0",children:[f.jsxs("div",{className:"w-56 shrink-0 flex flex-col gap-2 min-h-0",children:[f.jsx("div",{className:"card overflow-y-auto p-3 flex-shrink-0",style:{maxHeight:"45%"},children:f.jsx(P0e,{branches:v,tags:w,stashCount:j,projectId:e.id,busy:T,setBusy:A,onRefresh:re,onError:D})}),f.jsxs("div",{className:"card overflow-y-auto p-2 flex-1 min-h-0",children:[f.jsxs("div",{className:"px-2 py-1 text-[11px] font-semibold text-warm-500 uppercase tracking-wider border-b border-warm-100 mb-1",children:[n("git.fileStatus")," (",_.length,")"]}),f.jsx(M0e,{projectId:e.id,files:_,busy:T,setBusy:A,onRefresh:re,onError:D})]})]}),f.jsxs("div",{className:"card flex-1 overflow-hidden flex flex-col min-h-0",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-warm-100",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700",children:n("git.commitHistory")}),f.jsxs("button",{onClick:re,disabled:l,className:"btn-ghost text-xs flex items-center gap-1.5",children:[f.jsx("svg",{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182"})}),n("git.refresh")]})]}),f.jsxs("div",{className:"flex items-center px-4 py-1.5 border-b border-warm-50 text-2xs text-warm-400 uppercase tracking-wider",children:[f.jsx("div",{className:"w-24 shrink-0",children:n("git.graph")}),f.jsx("div",{className:"flex-1 min-w-0",children:n("git.description")}),f.jsx("div",{className:"w-14 text-right shrink-0",children:n("git.date")}),f.jsx("div",{className:"shrink-0 ml-2",children:n("git.author")}),f.jsx("div",{className:"w-16 text-right shrink-0",children:n("git.hash")})]}),m&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-status-error text-sm",children:m})}),d&&!m&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-warm-500 text-sm",children:n("detail.loading")})}),!d&&!m&&r.length===0&&f.jsx("div",{className:"p-6 text-center",children:f.jsx("p",{className:"text-warm-500 text-sm",children:n("git.noCommits")})}),r.length>0&&f.jsxs("div",{className:`overflow-y-auto ${P?"":"flex-1"}`,ref:X,style:P?{height:"50%"}:void 0,children:[f.jsxs("div",{className:"relative flex",children:[f.jsx("div",{className:"shrink-0 sticky left-0",children:f.jsx(C0e,{graphNodes:le,totalRows:r.length})}),f.jsx("div",{className:"flex-1 min-w-0",children:r.map(ie=>{const ee=(P==null?void 0:P.hash)===ie.hash;return f.jsxs("div",{onClick:()=>oe(ie),className:`flex items-center px-3 cursor-pointer transition-colors border-b border-warm-50/50 ${ee?"bg-accent/10 border-l-2 border-l-accent":"hover:bg-warm-50/50"}`,style:{height:Ys},children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-1.5",children:[ie.refs.length>0&&f.jsx("div",{className:"flex items-center gap-1 shrink-0",children:ie.refs.map((ae,xe)=>f.jsx(j0e,{refStr:ae},xe))}),f.jsx("span",{className:"text-xs text-warm-700 truncate",title:ie.message,children:ie.message})]}),f.jsx("div",{className:"w-14 text-right shrink-0",children:f.jsx("span",{className:"text-[11px] text-warm-400",title:ie.date,children:D0e(ie.date)})}),f.jsx("div",{className:"shrink-0 ml-2",children:f.jsx("span",{className:"text-[11px] text-warm-500",children:ie.author})}),f.jsx("div",{className:"w-16 text-right shrink-0",children:f.jsx("span",{className:"text-[11px] font-mono text-warm-400 cursor-pointer hover:text-accent transition-colors",title:ie.hash,onClick:ae=>{ae.stopPropagation(),navigator.clipboard.writeText(ie.hash)},children:ie.hash.substring(0,7)})})]},ie.hash)})})]}),f.jsx("div",{ref:U,className:"h-8 flex items-center justify-center",children:l&&f.jsx("span",{className:"text-xs text-warm-400",children:n("git.loadMore")})})]}),P&&f.jsxs("div",{className:"flex min-h-0 border-t border-warm-200",style:{height:"50%"},children:[f.jsx("div",{className:"w-60 shrink-0 border-r border-warm-100 overflow-hidden",children:f.jsx(E0e,{files:z,loading:F,selectedFile:I,onFileClick:Z,commitHash:P.hash})}),f.jsx("div",{className:"flex-1 min-w-0 overflow-hidden bg-warm-900",children:f.jsx(A0e,{diff:G,loading:K,selectedFile:I})})]})]})]})]})}const I0e=["architect","developer","reviewer","pm","tester","custom"],$o=["#6366f1","#8b5cf6","#ec4899","#f43f5e","#f97316","#eab308","#22c55e","#14b8a6","#06b6d4","#3b82f6"],L0e=[{name:"Architect",nameKo:"아키텍트",role:"architect",prompt:"You are a senior software architect. Focus on system design, scalability, maintainability, and separation of concerns. Evaluate proposals for architectural soundness and suggest patterns that work well."},{name:"Developer",nameKo:"개발자",role:"developer",prompt:"You are a senior full-stack developer. Focus on implementation feasibility, code quality, existing patterns in the codebase, and developer experience. Be pragmatic about what can realistically be built."},{name:"Reviewer",nameKo:"리뷰어",role:"reviewer",prompt:"You are a senior code reviewer and quality advocate. Focus on edge cases, error handling, security, performance, and testing strategy. Challenge assumptions and find potential issues."},{name:"Product Manager",nameKo:"PM",role:"pm",prompt:"You are a product manager. Focus on user experience, feature scope, priorities, and trade-offs. Ensure the discussion stays grounded in user needs and business value."},{name:"Tester",nameKo:"테스터",role:"tester",prompt:"You are a QA engineer and testing specialist. Focus on testability, test coverage strategy, edge cases, regression risks, and how to verify the feature works correctly."}];function z0e({projectId:e,agents:t,onAgentsChange:n}){const{t:r,lang:a}=tt(),[i,s]=x.useState(!1),[l,c]=x.useState(null),[d,h]=x.useState(""),[m,g]=x.useState("developer"),[v,b]=x.useState(""),[w,S]=x.useState(""),[j,k]=x.useState(""),[_,E]=x.useState($o[0]),[T,A]=x.useState(!1),[O,D]=x.useState(!1),{getToolConfig:P}=oc(),M=()=>{h(""),g("developer"),b(""),S(""),k(""),E($o[Math.floor(Math.random()*$o.length)]),A(!1),s(!1),c(null)},z=async()=>{if(!(!d.trim()||!v.trim())){D(!0);try{if(l){const I=await Nne(l,{name:d,role:m,system_prompt:v,avatar_color:_,cli_tool:w||null,cli_model:j||null,can_implement:T});n(t.map(q=>q.id===l?I:q))}else{const I=await Cne(e,{name:d,role:m,system_prompt:v,avatar_color:_,...w?{cli_tool:w}:{},...j?{cli_model:j}:{},can_implement:T});n([...t,I])}M()}finally{D(!1)}}},L=I=>{c(I.id),h(I.name),g(I.role),b(I.system_prompt),S(I.cli_tool||""),k(I.cli_model||""),E(I.avatar_color||$o[0]),A(!!I.can_implement),s(!0)},F=async I=>{await Ene(I),n(t.filter(q=>q.id!==I))},R=I=>{h(a==="ko"?I.nameKo:I.name),g(I.role),b(I.prompt),E($o[Math.floor(Math.random()*$o.length)]),s(!0)};return f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700",children:r("agents.title")}),f.jsxs("button",{onClick:()=>{M(),s(!0)},className:"btn btn-sm text-xs",children:["+ ",r("agents.add")]})]}),t.length===0&&!i&&f.jsx(xl,{icon:Pte,title:r("agents.empty"),size:"sm"}),f.jsx("div",{className:"space-y-2",children:t.map(I=>{var q;return f.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-warm-50 border border-warm-150 hover:border-warm-250 transition-colors group",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0 shadow-sm",style:{backgroundColor:I.avatar_color||"#6366f1"},children:I.name.charAt(0).toUpperCase()}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx("span",{className:"text-sm font-semibold text-warm-700 truncate",children:I.name}),!!I.can_implement&&f.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-2xs font-medium bg-amber-50 text-amber-700 border border-amber-200",title:r("agents.canImplementHelp"),children:[f.jsx(GP,{size:10}),r("agents.canImplementBadge")]})]}),f.jsxs("div",{className:"text-xs text-warm-400 mt-0.5",children:[r(`agents.roles.${I.role}`)||I.role,I.cli_tool&&f.jsxs("span",{className:"ml-1.5 text-warm-300",children:["· ",((q=ai.find(G=>G.value===I.cli_tool))==null?void 0:q.label)||I.cli_tool,I.cli_model?` / ${I.cli_model}`:""]})]})]}),f.jsxs("div",{className:"flex gap-1.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[f.jsx("button",{onClick:()=>L(I),className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100 rounded-lg transition-colors",children:f.jsx(Mf,{size:16})}),f.jsx("button",{onClick:()=>F(I.id),className:"p-1.5 text-warm-400 hover:text-status-error hover:bg-red-50 rounded-lg transition-colors",children:f.jsx(es,{size:16})})]})]},I.id)})}),i&&f.jsxs("div",{className:"space-y-5 p-5 rounded-xl border border-warm-200 bg-theme-card shadow-sm",children:[!l&&f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.presets")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:L0e.map(I=>f.jsx("button",{onClick:()=>R(I),className:"px-3 py-1.5 text-xs rounded-lg bg-warm-50 text-warm-600 hover:bg-warm-100 border border-warm-150 hover:border-warm-300 transition-colors font-medium",children:a==="ko"?I.nameKo:I.name},I.role))})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.name")}),f.jsx("input",{type:"text",value:d,onChange:I=>h(I.target.value),className:"input-field",placeholder:a==="ko"?"에이전트 이름":"Agent name"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.role")}),f.jsx("select",{value:m,onChange:I=>g(I.target.value),className:"input-field",children:I0e.map(I=>f.jsx("option",{value:I,children:r(`agents.roles.${I}`)},I))})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.systemPrompt")}),f.jsx("textarea",{value:v,onChange:I=>b(I.target.value),rows:5,className:"input-field resize-y min-h-[100px]",placeholder:a==="ko"?"이 에이전트의 전문 분야와 관점을 설명하세요...":"Describe this agent's expertise and perspective..."}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1.5",children:a==="ko"?"토론 시 이 에이전트가 어떤 관점에서 발언할지 결정합니다.":"Determines what perspective this agent brings to the discussion."})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.cliTool")}),f.jsxs("select",{value:w,onChange:I=>{S(I.target.value),k("")},className:"input-field text-sm",children:[f.jsx("option",{value:"",children:a==="ko"?"프로젝트 기본값 사용":"Use project default"}),ai.map(I=>f.jsx("option",{value:I.value,children:I.label},I.value))]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.cliModel")}),f.jsx("select",{value:j,onChange:I=>k(I.target.value),className:"input-field text-sm",disabled:!w,children:w?P(w).models.map(I=>f.jsx("option",{value:I.value,children:I.label},I.value)):f.jsx("option",{value:"",children:a==="ko"?"프로젝트 기본값 사용":"Use project default"})})]})]}),f.jsx("div",{children:f.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:T,onChange:I=>A(I.target.checked),className:"mt-0.5 w-4 h-4 rounded border-warm-300 text-warm-600 focus:ring-warm-400"}),f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium text-warm-700",children:[f.jsx(GP,{size:12}),r("agents.canImplement")]}),f.jsx("p",{className:"text-2xs text-warm-400 mt-0.5",children:r("agents.canImplementHelp")})]})]})}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:r("agents.color")}),f.jsxs("div",{className:"flex items-center gap-2.5",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0 shadow-sm",style:{backgroundColor:_},children:d?d.charAt(0).toUpperCase():"?"}),f.jsx("div",{className:"flex flex-wrap gap-2",children:$o.map(I=>f.jsx("button",{onClick:()=>E(I),className:`w-7 h-7 rounded-full transition-all ${_===I?"ring-2 ring-offset-2 ring-warm-400 scale-110":"hover:scale-105 opacity-70 hover:opacity-100"}`,style:{backgroundColor:I}},I))})]})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-2 border-t border-warm-100",children:[f.jsx("button",{onClick:M,className:"btn btn-sm text-xs text-warm-500",children:r("header.cancel")}),f.jsx("button",{onClick:z,disabled:!d.trim()||!v.trim()||O,className:"btn btn-sm btn-primary text-xs",children:r(O?"header.saving":"header.save")})]})]})]})}const Ez={title:"",description:"",agent_ids:[],max_rounds:3,auto_implement:!1,implement_agent_id:""};function h7({agents:e,initialValues:t,mode:n,allowAdvancedFields:r=!0,submitting:a=!1,onSubmit:i,onCancel:s}){const{t:l,lang:c}=tt(),[d,h]=x.useState({...Ez,...t});x.useEffect(()=>{h({...Ez,...t})},[t]);const m=(k,_)=>{h(E=>({...E,[k]:_}))},g=k=>l(`agents.roles.${k.role}`)||k.role,v=d.agent_ids.map(k=>e.find(_=>_.id===k)).filter(k=>!!k),b=k=>{h(_=>{const E=_.agent_ids.includes(k)?_.agent_ids.filter(T=>T!==k):[..._.agent_ids,k];return{..._,agent_ids:E,implement_agent_id:_.implement_agent_id&&!E.includes(_.implement_agent_id)?"":_.implement_agent_id}})},w=(k,_)=>{h(E=>{const T=E.agent_ids.indexOf(k),A=T+_;if(T===-1||A<0||A>=E.agent_ids.length)return E;const O=[...E.agent_ids];return[O[T],O[A]]=[O[A],O[T]],{...E,agent_ids:O}})},S=async()=>{!d.title.trim()||!d.description.trim()||r&&d.agent_ids.length<2||r&&d.auto_implement&&!d.implement_agent_id||await i({title:d.title.trim(),description:d.description.trim(),agent_ids:d.agent_ids,max_rounds:d.max_rounds,auto_implement:r?d.auto_implement:!1,implement_agent_id:r&&d.auto_implement?d.implement_agent_id:void 0})},j=d.title.trim()&&d.description.trim()&&(!r||d.agent_ids.length>=2)&&(!r||!d.auto_implement||!!d.implement_agent_id);return f.jsxs("div",{className:"card p-5 space-y-5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:c==="ko"?"제목":"Title"}),f.jsx("input",{type:"text",value:d.title,onChange:k=>m("title",k.target.value),className:"input-field",placeholder:c==="ko"?"토론 주제를 입력하세요":"Enter discussion topic"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:c==="ko"?"설명":"Description"}),f.jsx("textarea",{value:d.description,onChange:k=>m("description",k.target.value),rows:4,className:"input-field resize-y min-h-[80px]",placeholder:c==="ko"?"토론할 기능이나 의사결정 배경을 자세히 설명하세요":"Describe the feature to discuss in detail"})]}),r&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"block text-xs font-medium text-warm-500 mb-1.5",children:[l("discussions.agents"),f.jsx("span",{className:"ml-2 text-warm-400 font-normal",children:c==="ko"?`(${d.agent_ids.length}명 선택됨 · 최소 2명)`:`(${d.agent_ids.length} selected · min 2)`})]}),f.jsx("p",{className:"text-[11px] text-warm-400",children:c==="ko"?"참여 에이전트를 고른 뒤, 아래 발언 순서에서 실제 토론 진행 순서를 조정합니다.":"Select participants first, then adjust the actual speaking order below."})]}),f.jsxs("div",{className:"rounded-2xl border border-accent/30 bg-accent/5 p-3 space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-semibold text-warm-700",children:c==="ko"?"발언 순서":"Speaking Order"}),f.jsx("p",{className:"text-[11px] text-warm-500 mt-1",children:c==="ko"?"1라운드 기준이며, 이후 라운드에도 같은 순서로 반복됩니다.":"This order is used for round 1 and repeats in later rounds."})]}),v.length>=2&&f.jsx("div",{className:"text-2xs font-semibold text-accent-dark bg-white/70 border border-accent/30 rounded-full px-2.5 py-1",children:c==="ko"?"순서 조정 가능":"Reorder enabled"})]}),v.length===0?f.jsx("div",{className:"rounded-xl border border-dashed border-warm-200 bg-white/70 px-4 py-5 text-center text-xs text-warm-400",children:c==="ko"?"에이전트를 선택하면 여기서 발언 순서를 바로 조정할 수 있습니다.":"Select agents to adjust the speaking order here."}):f.jsx("div",{className:"space-y-2",children:v.map((k,_)=>{const E=_===0,T=_===v.length-1,A=E?c==="ko"?"첫 발언":"Opens the round":T?c==="ko"?"마지막 발언":"Closes the round":c==="ko"?`${_+1}번째 발언`:`Turn ${_+1}`;return f.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-warm-200 bg-white/85 px-3 py-3 md:flex-row md:items-center md:justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-accent text-[11px] font-bold text-white flex-shrink-0",children:_+1}),f.jsx("div",{className:"w-6 h-6 rounded-full flex-shrink-0 border border-white/80 shadow-sm",style:{backgroundColor:k.avatar_color||"#6366f1"}}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm font-semibold text-warm-700 truncate",children:k.name}),f.jsxs("div",{className:"text-[11px] text-warm-500",children:[g(k)," · ",A]})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{type:"button",onClick:()=>w(k.id,-1),disabled:E,className:"px-2.5 py-1.5 rounded-lg border border-warm-200 bg-warm-50 text-[11px] font-medium text-warm-600 hover:bg-warm-100 disabled:opacity-40 disabled:cursor-not-allowed",children:c==="ko"?"앞으로":"Earlier"}),f.jsx("button",{type:"button",onClick:()=>w(k.id,1),disabled:T,className:"px-2.5 py-1.5 rounded-lg border border-warm-200 bg-warm-50 text-[11px] font-medium text-warm-600 hover:bg-warm-100 disabled:opacity-40 disabled:cursor-not-allowed",children:c==="ko"?"뒤로":"Later"})]})]},k.id)})})]}),e.length===0?f.jsx("p",{className:"text-xs text-warm-400 py-3 px-4 bg-warm-50 rounded-xl border border-warm-150",children:l("agents.empty")}):f.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:e.map(k=>{const _=d.agent_ids.includes(k.id),E=d.agent_ids.indexOf(k.id)+1;return f.jsxs("button",{type:"button",onClick:()=>b(k.id),className:`text-left rounded-2xl border px-3.5 py-3 transition-all ${_?"border-accent bg-accent/5 shadow-sm":"border-warm-200 bg-warm-50 hover:border-warm-300 hover:bg-warm-100"}`,children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[f.jsx("div",{className:"w-6 h-6 rounded-full flex-shrink-0 border border-white/80 shadow-sm",style:{backgroundColor:k.avatar_color||"#6366f1"}}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:`text-sm font-semibold truncate ${_?"text-warm-700":"text-warm-600"}`,children:k.name}),f.jsx("div",{className:"text-[11px] text-warm-400",children:g(k)})]})]}),_&&f.jsx("div",{className:"inline-flex items-center justify-center min-w-7 h-7 rounded-full bg-accent text-[11px] font-bold text-white flex-shrink-0",children:E})]}),f.jsx("div",{className:`mt-3 text-[11px] ${_?"text-accent-dark":"text-warm-400"}`,children:_?c==="ko"?`${E}번째 발언으로 참여 중`:`Included as turn ${E}`:c==="ko"?"클릭해서 참여 에이전트에 추가":"Click to add this participant"})]},k.id)})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-2",children:l("discussions.maxRounds")}),f.jsx("input",{type:"number",min:1,max:10,value:d.max_rounds,onChange:k=>m("max_rounds",Number(k.target.value)),className:"input-field w-24 text-center"}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1.5",children:l("discussions.roundExplain")})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d.auto_implement,onChange:k=>{const _=k.target.checked;h(E=>({...E,auto_implement:_,implement_agent_id:_?E.implement_agent_id:""}))},className:"rounded border-warm-300 text-accent focus:ring-accent"}),f.jsx("span",{className:"text-xs font-medium text-warm-500",children:l("discussions.autoImplement")})]}),f.jsx("p",{className:"text-2xs text-warm-400 mt-1 ml-6",children:l("discussions.autoImplementHint")}),d.auto_implement&&f.jsxs("div",{className:"mt-2 ml-6",children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:l("discussions.selectAgent")}),f.jsxs("select",{value:d.implement_agent_id,onChange:k=>m("implement_agent_id",k.target.value),className:"input-field text-xs w-56",children:[f.jsx("option",{value:"",children:c==="ko"?"-- 에이전트 선택 --":"-- Select agent --"}),v.map(k=>f.jsxs("option",{value:k.id,children:[k.name," (",g(k),")"]},k.id))]})]})]})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-2 border-t border-warm-100",children:[f.jsx("button",{type:"button",onClick:s,className:"btn-secondary text-xs py-2",children:l("header.cancel")}),f.jsx("button",{type:"button",onClick:S,disabled:!j||a,className:"btn-primary text-xs py-2",children:l(a?"header.saving":n==="create"?"discussions.add":"header.save")})]})]})}const $0e={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",paused:"bg-amber-100 text-amber-700",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",merged:"bg-accent/10 text-accent"};function q0e({projectId:e,discussions:t,onAddDiscussion:n,onStartDiscussion:r,onStopDiscussion:a,onDeleteDiscussion:i}){const{t:s}=tt(),l=Ig(),[c,d]=x.useState([]),[h,m]=x.useState(!1),[g,v]=x.useState(!1),[b,w]=x.useState(!1);x.useEffect(()=>{h8(e).then(d).catch(()=>{})},[e]);const S=x.useCallback(async k=>{w(!0);try{const _=await Ane(e,k);n(_),m(!1)}finally{w(!1)}},[e,n]),j=k=>{try{return JSON.parse(k).map(E=>c.find(T=>T.id===E)).filter(E=>!!E)}catch{return[]}};return f.jsxs("div",{className:"space-y-4 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700 tracking-wide uppercase",children:s("discussions.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>v(!g),className:"btn-secondary text-xs py-2",children:s("agents.manage")}),f.jsxs("button",{onClick:()=>m(!h),className:"btn-primary text-xs py-2",children:["+ ",s("discussions.add")]})]})]}),g&&f.jsx("div",{className:"card p-4",children:f.jsx(z0e,{projectId:e,agents:c,onAgentsChange:d})}),h&&f.jsx(h7,{agents:c,mode:"create",submitting:b,onSubmit:S,onCancel:()=>m(!1)}),t.length===0&&!h?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:ote,title:s("discussions.empty"),description:s("discussions.emptyHint")})}):f.jsx("div",{className:"space-y-3",children:t.map((k,_)=>{const E=j(k.agent_ids),T=k.status==="pending"||k.status==="paused"||k.status==="failed",A=k.status==="running";return f.jsx("div",{className:"card p-4 hover:shadow-md transition-all cursor-pointer animate-slide-up",onClick:()=>l(`/projects/${e}/discussions/${k.id}`),style:{animationDelay:`${_*50}ms`},children:f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700 truncate",children:k.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${$0e[k.status]||""}`,children:s(`status.${k.status}`)||k.status})]}),f.jsx("p",{className:"text-xs text-warm-400 mt-1 line-clamp-1",children:k.description}),f.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[f.jsxs("span",{className:"text-2xs text-warm-400",children:[s("discussions.round")," ",k.current_round,"/",k.max_rounds]}),f.jsx("div",{className:"flex -space-x-1",children:E.slice(0,5).map(O=>f.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-white text-[8px] text-white font-bold flex items-center justify-center",style:{backgroundColor:O.avatar_color||"#6366f1"},title:O.name,children:O.name.charAt(0)},O.id))})]})]}),f.jsxs("div",{className:"flex gap-1",onClick:O=>O.stopPropagation(),children:[T&&f.jsx("button",{onClick:()=>r(k.id),className:"p-1.5 text-status-success hover:bg-status-success/10 rounded transition-colors",title:s("header.runAll"),children:f.jsx(yl,{size:16})}),A&&f.jsx("button",{onClick:()=>a(k.id),className:"p-1.5 text-amber-600 hover:bg-amber-50 rounded transition-colors",title:s("discussions.pause"),children:f.jsx(FN,{size:16})}),f.jsx("button",{onClick:()=>i(k.id),className:"p-1.5 text-warm-400 hover:text-status-error rounded transition-colors",title:s("todo.delete"),children:f.jsx(es,{size:16})})]})]})},k.id)})})]})}function B0e({onSave:e,onCancel:t,projectCliTool:n,projectCliModel:r,isGitRepo:a}){const{t:i}=tt(),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState(n||""),[g,v]=x.useState(r||""),[b,w]=x.useState(!1),S=ai.filter(E=>E.supportsInteractive),k=$u(h||n||"claude"),_=E=>{E.preventDefault(),s.trim()&&e(s.trim(),c.trim(),h||void 0,g||void 0,b)};return f.jsxs("form",{onSubmit:_,className:"card p-4 space-y-3 animate-scale-in",children:[f.jsx("input",{type:"text",value:s,onChange:E=>l(E.target.value),placeholder:i("session.title"),className:"input w-full text-sm",autoFocus:!0}),f.jsx("textarea",{value:c,onChange:E=>d(E.target.value),placeholder:i("session.description"),className:"input w-full text-sm min-h-[60px] resize-y",rows:2}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("select",{value:h,onChange:E=>{m(E.target.value),v("")},className:"input text-xs flex-1",children:[f.jsxs("option",{value:"",children:[i("session.cliTool")," (Default)"]}),S.map(E=>f.jsx("option",{value:E.value,children:E.label},E.value))]}),f.jsxs("select",{value:g,onChange:E=>v(E.target.value),className:"input text-xs flex-1",children:[f.jsxs("option",{value:"",children:[i("session.model")," (Default)"]}),k.models.filter(E=>E.value).map(E=>f.jsx("option",{value:E.value,children:E.label},E.value))]})]}),a&&f.jsxs("label",{className:"flex items-center gap-2 text-xs text-warm-500 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:b,onChange:E=>w(E.target.checked),className:"rounded border-warm-300"}),f.jsx(BN,{size:14}),i("session.worktree")]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-secondary text-xs py-1.5 px-3",children:i("form.cancel")}),f.jsx("button",{type:"submit",disabled:!s.trim(),className:"btn-primary text-xs py-1.5 px-3",children:i("session.create")})]})]})}const F0e={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",stopped:"bg-amber-100 text-amber-700"};function H0e(e){return{id:e.id,todo_id:e.session_id,log_type:e.log_type,message:e.message,created_at:e.created_at}}function U0e({projectId:e,sessions:t,projectCliTool:n,projectCliModel:r,isGitRepo:a,onAddSession:i,onStartSession:s,onStopSession:l,onDeleteSession:c,onCleanupSession:d,onSendInput:h,onEvent:m}){const{t:g}=tt(),[v,b]=x.useState(!1),[w,S]=x.useState(!1),[j,k]=x.useState(null),[_,E]=x.useState({}),T=x.useRef(_);T.current=_,x.useEffect(()=>{j&&Hne(j).then(D=>{E(P=>({...P,[j]:D.map(H0e)}))}).catch(()=>{})},[j]),x.useEffect(()=>{const D=t.find(P=>P.status==="running");D&&!j&&k(D.id)},[t,j]),x.useEffect(()=>m(D=>{if(D.type==="session:log"&&D.sessionId&&D.message){const P={id:`ws-${Date.now()}-${Math.random()}`,todo_id:D.sessionId,log_type:D.logType||"output",message:D.message,created_at:new Date().toISOString()};E(M=>({...M,[D.sessionId]:[...M[D.sessionId]||[],P]}))}}),[m]);const A=x.useCallback(async(D,P,M,z,L)=>{S(!0);try{const F=await $ne(e,{title:D,description:P||void 0,cli_tool:M,cli_model:z,use_worktree:L});i(F),b(!1)}finally{S(!1)}},[e,i]),O=x.useCallback((D,P)=>{h(D,P)},[h]);return f.jsxs("div",{className:"space-y-4 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700 tracking-wide uppercase",children:g("tabs.sessions")}),f.jsxs("button",{onClick:()=>b(!v),className:"btn-primary text-xs py-2",children:["+ ",g("session.new")]})]}),v&&f.jsx(B0e,{onSave:A,onCancel:()=>b(!1),projectCliTool:n,projectCliModel:r,isGitRepo:a}),t.length===0&&!v?f.jsx("div",{className:"card",children:f.jsx(xl,{icon:KF,title:g("session.empty"),description:g("session.emptyHint")})}):f.jsx("div",{className:"space-y-3",children:t.map((D,P)=>{const M=j===D.id,z=["pending","failed","stopped","completed"].includes(D.status),L=D.status==="running",F=_[D.id]||[];return f.jsxs("div",{className:"card overflow-hidden animate-slide-up",style:{animationDelay:`${P*50}ms`},children:[f.jsx("div",{className:"p-4 cursor-pointer hover:bg-warm-50/50 transition-colors",onClick:()=>k(M?null:D.id),children:f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(zu,{size:12,className:`text-warm-400 transition-transform ${M?"rotate-90":""}`}),f.jsx("h3",{className:"text-sm font-semibold text-warm-700 truncate",children:D.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${F0e[D.status]||""}`,children:g(`status.${D.status}`)||D.status})]}),D.description&&f.jsx("p",{className:"text-xs text-warm-400 mt-1 ml-5 line-clamp-1",children:D.description}),f.jsxs("div",{className:"flex items-center gap-2 mt-1 ml-5",children:[f.jsxs("span",{className:"text-2xs text-warm-300",children:[D.cli_tool||"claude",D.cli_model?` / ${D.cli_model}`:""]}),D.branch_name&&f.jsxs("span",{className:"text-2xs text-accent/70 flex items-center gap-0.5",children:[f.jsx(BN,{size:12}),D.branch_name]})]})]}),f.jsxs("div",{className:"flex gap-1",onClick:R=>R.stopPropagation(),children:[z&&f.jsx("button",{onClick:()=>{s(D.id),k(D.id)},className:"p-1.5 text-status-success hover:bg-status-success/10 rounded transition-colors",title:g("session.start"),children:f.jsx(yl,{size:16})}),L&&f.jsx("button",{onClick:()=>l(D.id),className:"p-1.5 text-amber-600 hover:bg-amber-50 rounded transition-colors",title:g("session.stop"),children:f.jsx(Bg,{size:16})}),D.status!=="running"&&!!D.worktree_path&&f.jsx("button",{onClick:()=>{const R=D.branch_name?confirm(g("cleanup.confirmDeleteBranch").replace("{name}",D.branch_name)):!1;d(D.id,R)},className:"p-1.5 text-warm-400 hover:text-amber-600 rounded transition-colors",title:g("session.cleanup"),children:f.jsx($N,{size:16})}),f.jsx("button",{onClick:()=>c(D.id),className:"p-1.5 text-warm-400 hover:text-status-error rounded transition-colors",title:g("session.delete"),children:f.jsx(es,{size:16})})]})]})}),M&&f.jsxs("div",{className:"overflow-hidden",style:{borderTop:`1px solid ${Yt.separator}`},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",background:Yt.titleBg,padding:"8px 12px",gap:8,userSelect:"none"},children:[f.jsxs("div",{style:{display:"flex",gap:6},children:[f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#ff5f57",display:"inline-block"}}),f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#febc2e",display:"inline-block"}}),f.jsx("span",{style:{width:12,height:12,borderRadius:"50%",background:"#28c840",display:"inline-block"}})]}),f.jsxs("span",{style:{flex:1,textAlign:"center",color:Yt.titleText,fontSize:12,fontFamily:Vd},children:[D.title,D.cli_tool?` — ${D.cli_tool}${D.cli_model?`/${D.cli_model}`:""}`:""]}),f.jsx("div",{style:{width:54}})]}),f.jsxs("div",{style:{background:Yt.bg,padding:"12px 16px",fontFamily:Vd,fontSize:12,lineHeight:"1.5",color:Yt.text},children:[D.branch_name&&f.jsxs("div",{style:{marginBottom:8},children:[f.jsx("span",{style:{color:Yt.prompt},children:"$"})," ",f.jsx("span",{style:{color:Yt.bright},children:"git"})," ",f.jsx("span",{style:{color:Yt.dim},children:"branch"}),f.jsxs("div",{children:[f.jsx("span",{style:{color:Yt.success},children:"*"})," ",f.jsx("span",{style:{color:Yt.info},children:D.branch_name})]})]}),f.jsx(c2,{logs:F,interactive:D.status==="running",todoId:D.id,onSendInput:D.status==="running"?O:void 0,embedded:!0})]})]})]},D.id)})})]})}function G0e(e,t="all"){return mt(`/api/projects/${e}/analytics?period=${t}`)}function m7(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=m7(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=m7(e))&&(r&&(r+=" "),r+=t);return r}var V0e=["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 Y2(e){if(typeof e!="string")return!1;var t=V0e;return t.includes(e)}var K0e=["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"],Y0e=new Set(K0e);function p7(e){return typeof e!="string"?!1:Y0e.has(e)}function g7(e){return typeof e=="string"&&e.startsWith("data-")}function Zr(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(p7(n)||g7(n))&&(t[n]=e[n]);return t}function ol(e){if(e==null)return null;if(x.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Zr(t)}return typeof e=="object"&&!Array.isArray(e)?Zr(e):null}function xr(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(p7(n)||g7(n)||Y2(n))&&(t[n]=e[n]);return t}function W0e(e){return e==null?null:x.isValidElement(e)?xr(e.props):typeof e=="object"&&!Array.isArray(e)?xr(e):null}var X0e=["children","width","height","viewBox","className","style","title","desc"];function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DC.apply(null,arguments)}function Z0e(e,t){if(e==null)return{};var n,r,a=Q0e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Q0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var v7=x.forwardRef((e,t)=>{var{children:n,width:r,height:a,viewBox:i,className:s,style:l,title:c,desc:d}=e,h=Z0e(e,X0e),m=i||{width:r,height:a,x:0,y:0},g=Lt("recharts-surface",s);return x.createElement("svg",DC({},xr(h),{className:g,width:r,height:a,style:l,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),x.createElement("title",null,c),x.createElement("desc",null,d),n)}),J0e=["children","className"];function RC(){return RC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RC.apply(null,arguments)}function ebe(e,t){if(e==null)return{};var n,r,a=tbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function tbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Bn=x.forwardRef((e,t)=>{var{children:n,className:r}=e,a=ebe(e,J0e),i=Lt("recharts-layer",r);return x.createElement("g",RC({className:i},xr(a),{ref:t}),n)}),nbe=x.createContext(null);function Qt(e){return function(){return e}}const y7=Math.cos,Hp=Math.sin,Fa=Math.sqrt,Up=Math.PI,jv=2*Up,IC=Math.PI,LC=2*IC,Go=1e-6,rbe=LC-Go;function x7(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function abe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return x7;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class ibe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?x7:abe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,l=this._y1,c=r-t,d=a-n,h=s-t,m=l-n,g=h*h+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Go)if(!(Math.abs(m*c-d*h)>Go)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-s,b=a-l,w=c*c+d*d,S=v*v+b*b,j=Math.sqrt(w),k=Math.sqrt(g),_=i*Math.tan((IC-Math.acos((w+g-S)/(2*j*k)))/2),E=_/k,T=_/j;Math.abs(E-1)>Go&&this._append`L${t+E*h},${n+E*m}`,this._append`A${i},${i},0,0,${+(m*v>h*b)},${this._x1=t+T*c},${this._y1=n+T*d}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),d=t+l,h=n+c,m=1^s,g=s?a-i:i-a;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>Go||Math.abs(this._y1-h)>Go)&&this._append`L${d},${h}`,r&&(g<0&&(g=g%LC+LC),g>rbe?this._append`A${r},${r},0,1,${m},${t-l},${n-c}A${r},${r},0,1,${m},${this._x1=d},${this._y1=h}`:g>Go&&this._append`A${r},${r},0,${+(g>=IC)},${m},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function W2(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new ibe(t)}function X2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b7(e){this._context=e}b7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _v(e){return new b7(e)}function w7(e){return e[0]}function S7(e){return e[1]}function j7(e,t){var n=Qt(!0),r=null,a=_v,i=null,s=W2(l);e=typeof e=="function"?e:e===void 0?w7:Qt(e),t=typeof t=="function"?t:t===void 0?S7:Qt(t);function l(c){var d,h=(c=X2(c)).length,m,g=!1,v;for(r==null&&(i=a(v=s())),d=0;d<=h;++d)!(d<h&&n(m=c[d],d,c))===g&&((g=!g)?i.lineStart():i.lineEnd()),g&&i.point(+e(m,d,c),+t(m,d,c));if(v)return i=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Qt(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Qt(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Qt(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),l):r},l}function Vm(e,t,n){var r=null,a=Qt(!0),i=null,s=_v,l=null,c=W2(d);e=typeof e=="function"?e:e===void 0?w7:Qt(+e),t=typeof t=="function"?t:Qt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?S7:Qt(+n);function d(m){var g,v,b,w=(m=X2(m)).length,S,j=!1,k,_=new Array(w),E=new Array(w);for(i==null&&(l=s(k=c())),g=0;g<=w;++g){if(!(g<w&&a(S=m[g],g,m))===j)if(j=!j)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=g-1;b>=v;--b)l.point(_[b],E[b]);l.lineEnd(),l.areaEnd()}j&&(_[g]=+e(S,g,m),E[g]=+t(S,g,m),l.point(r?+r(S,g,m):_[g],n?+n(S,g,m):E[g]))}if(k)return l=null,k+""||null}function h(){return j7().defined(a).curve(s).context(i)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:Qt(+m),r=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:Qt(+m),d):e},d.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:Qt(+m),d):r},d.y=function(m){return arguments.length?(t=typeof m=="function"?m:Qt(+m),n=null,d):t},d.y0=function(m){return arguments.length?(t=typeof m=="function"?m:Qt(+m),d):t},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:Qt(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(t)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(r).y(t)},d.defined=function(m){return arguments.length?(a=typeof m=="function"?m:Qt(!!m),d):a},d.curve=function(m){return arguments.length?(s=m,i!=null&&(l=s(i)),d):s},d.context=function(m){return arguments.length?(m==null?i=l=null:l=s(i=m),d):i},d}class _7{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function sbe(e){return new _7(e,!0)}function obe(e){return new _7(e,!1)}const Z2={draw(e,t){const n=Fa(t/Up);e.moveTo(n,0),e.arc(0,0,n,0,jv)}},lbe={draw(e,t){const n=Fa(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},k7=Fa(1/3),ube=k7*2,cbe={draw(e,t){const n=Fa(t/ube),r=n*k7;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},dbe={draw(e,t){const n=Fa(t),r=-n/2;e.rect(r,r,n,n)}},fbe=.8908130915292852,C7=Hp(Up/10)/Hp(7*Up/10),hbe=Hp(jv/10)*C7,mbe=-y7(jv/10)*C7,pbe={draw(e,t){const n=Fa(t*fbe),r=hbe*n,a=mbe*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=jv*i/5,l=y7(s),c=Hp(s);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*a,c*r+l*a)}e.closePath()}},C_=Fa(3),gbe={draw(e,t){const n=-Fa(t/(C_*3));e.moveTo(0,n*2),e.lineTo(-C_*n,-n),e.lineTo(C_*n,-n),e.closePath()}},ca=-.5,da=Fa(3)/2,zC=1/Fa(12),vbe=(zC/2+1)*3,ybe={draw(e,t){const n=Fa(t/vbe),r=n/2,a=n*zC,i=r,s=n*zC+n,l=-i,c=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(l,c),e.lineTo(ca*r-da*a,da*r+ca*a),e.lineTo(ca*i-da*s,da*i+ca*s),e.lineTo(ca*l-da*c,da*l+ca*c),e.lineTo(ca*r+da*a,ca*a-da*r),e.lineTo(ca*i+da*s,ca*s-da*i),e.lineTo(ca*l+da*c,ca*c-da*l),e.closePath()}};function xbe(e,t){let n=null,r=W2(a);e=typeof e=="function"?e:Qt(e||Z2),t=typeof t=="function"?t:Qt(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Qt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Qt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Gp(){}function Vp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function N7(e){this._context=e}N7.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:Vp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bbe(e){return new N7(e)}function E7(e){this._context=e}E7.prototype={areaStart:Gp,areaEnd:Gp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wbe(e){return new E7(e)}function A7(e){this._context=e}A7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Vp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sbe(e){return new A7(e)}function T7(e){this._context=e}T7.prototype={areaStart:Gp,areaEnd:Gp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function jbe(e){return new T7(e)}function Az(e){return e<0?-1:1}function Tz(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),l=(i*a+s*r)/(r+a);return(Az(i)+Az(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(l))||0}function Oz(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function N_(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,s-l*n,i,s)}function Kp(e){this._context=e}Kp.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:N_(this,this._t0,Oz(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,N_(this,Oz(this,n=Tz(this,e,t)),n);break;default:N_(this,this._t0,n=Tz(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function O7(e){this._context=new M7(e)}(O7.prototype=Object.create(Kp.prototype)).point=function(e,t){Kp.prototype.point.call(this,t,e)};function M7(e){this._context=e}M7.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function _be(e){return new Kp(e)}function kbe(e){return new O7(e)}function P7(e){this._context=e}P7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Mz(e),a=Mz(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Mz(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Cbe(e){return new P7(e)}function kv(e,t){this._context=e,this._t=t}kv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Nbe(e){return new kv(e,.5)}function Ebe(e){return new kv(e,0)}function Abe(e){return new kv(e,1)}function ll(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,l=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function $C(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Tbe(e,t){return e[t]}function Obe(e){const t=[];return t.key=e,t}function Mbe(){var e=Qt([]),t=$C,n=ll,r=Tbe;function a(i){var s=Array.from(e.apply(this,arguments),Obe),l,c=s.length,d=-1,h;for(const m of i)for(l=0,++d;l<c;++l)(s[l][d]=[0,+r(m,s[l].key,d,i)]).data=m;for(l=0,h=X2(t(s));l<c;++l)s[h[l]].index=l;return n(s,h),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Qt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Qt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?$C:typeof i=="function"?i:Qt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??ll,a):n},a}function Pbe(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}ll(e,t)}}function Dbe(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,l=0;s<a;++s)l+=e[s][n][1]||0;r[n][1]+=r[n][0]=-l/2}ll(e,t)}}function Rbe(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var l=0,c=0,d=0;l<s;++l){for(var h=e[t[l]],m=h[r][1]||0,g=h[r-1][1]||0,v=(m-g)/2,b=0;b<l;++b){var w=e[t[b]],S=w[r][1]||0,j=w[r-1][1]||0;v+=S-j}c+=m,d+=v*m}a[r-1][1]+=a[r-1][0]=n,c&&(n-=d/c)}a[r-1][1]+=a[r-1][0]=n,ll(e,t)}}var E_={},A_={},Pz;function Ibe(){return Pz||(Pz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(A_)),A_}var T_={},Dz;function D7(){return Dz||(Dz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(T_)),T_}var O_={},Rz;function Q2(){return Rz||(Rz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(O_)),O_}var M_={},P_={},Iz;function Lbe(){return Iz||(Iz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(P_)),P_}var Lz;function J2(){return Lz||(Lz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lbe(),n=Q2();function r(a){if(Array.isArray(a))return a.map(n.toKey);if(typeof a=="symbol")return[a];a=t.toString(a);const i=[],s=a.length;if(s===0)return i;let l=0,c="",d="",h=!1;for(a.charCodeAt(0)===46&&(i.push(""),l++);l<s;){const m=a[l];d?m==="\\"&&l+1<s?(l++,c+=a[l]):m===d?d="":c+=m:h?m==='"'||m==="'"?d=m:m==="]"?(h=!1,i.push(c),c=""):c+=m:m==="["?(h=!0,c&&(i.push(c),c="")):m==="."?c&&(i.push(c),c=""):c+=m,l++}return c&&i.push(c),i}e.toPath=r})(M_)),M_}var zz;function eE(){return zz||(zz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ibe(),n=D7(),r=Q2(),a=J2();function i(l,c,d){if(l==null)return d;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return d;const h=l[c];return h===void 0?n.isDeepKey(c)?i(l,a.toPath(c),d):d:h}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const h=l[c];return h===void 0?d:h}default:{if(Array.isArray(c))return s(l,c,d);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return d;const h=l[c];return h===void 0?d:h}}}function s(l,c,d){if(c.length===0)return d;let h=l;for(let m=0;m<c.length;m++){if(h==null||t.isUnsafeProperty(c[m]))return d;h=h[c[m]]}return h===void 0?d:h}e.get=i})(E_)),E_}var D_,$z;function zbe(){return $z||($z=1,D_=eE().get),D_}var $be=zbe();const ul=ea($be);var qbe=4;function Js(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qbe,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function wn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((a,i,s)=>{var l=n[s-1];return typeof l=="string"?a+l+i:l!==void 0?a+Js(l)+i:a+i},"")}var Wn=e=>e===0?0:e>0?1:-1,di=e=>typeof e=="number"&&e!=+e,cl=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Be=e=>(typeof e=="number"||e instanceof Number)&&!di(e),fi=e=>Be(e)||typeof e=="string",Bbe=0,pf=e=>{var t=++Bbe;return"".concat(e||"").concat(t)},dr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Be(t)&&typeof t!="string")return r;var i;if(cl(t)){if(n==null)return r;var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return di(i)&&(i=r),a&&n!=null&&i>n&&(i=n),i},R7=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function sn(e,t,n){return Be(e)&&Be(t)?Js(e+n*(t-e)):t}function I7(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):ul(r,t))===n)}var cn=e=>e===null||typeof e>"u",Kf=e=>cn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Tr(e){return e!=null}function kl(){}var Fbe=["type","size","sizeType"];function qC(){return qC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qC.apply(null,arguments)}function qz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qz(Object(n),!0).forEach(function(r){Hbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hbe(e,t,n){return(t=Ube(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ube(e){var t=Gbe(e,"string");return typeof t=="symbol"?t:t+""}function Gbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vbe(e,t){if(e==null)return{};var n,r,a=Kbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Kbe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var L7={symbolCircle:Z2,symbolCross:lbe,symbolDiamond:cbe,symbolSquare:dbe,symbolStar:pbe,symbolTriangle:gbe,symbolWye:ybe},Ybe=Math.PI/180,Wbe=e=>{var t="symbol".concat(Kf(e));return L7[t]||Z2},Xbe=(e,t,n)=>{if(t==="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 r=18*Ybe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},Zbe=(e,t)=>{L7["symbol".concat(Kf(e))]=t},z7=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,a=Vbe(e,Fbe),i=Bz(Bz({},a),{},{type:t,size:n,sizeType:r}),s="circle";typeof t=="string"&&(s=t);var l=()=>{var g=Wbe(s),v=xbe().type(g).size(Xbe(n,r,s)),b=v();if(b!==null)return b},{className:c,cx:d,cy:h}=i,m=xr(i);return Be(d)&&Be(h)&&Be(n)?x.createElement("path",qC({},m,{className:Lt("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:l()})):null};z7.registerSymbol=Zbe;var $7=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,tE=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(x.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{Y2(a)&&typeof n[a]=="function"&&(r[a]=(i=>n[a](n,i)))}),r},Qbe=(e,t,n)=>r=>(e(t,n,r),null),Cv=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(a=>{var i=e[a];Y2(a)&&typeof i=="function"&&(r||(r={}),r[a]=Qbe(i,t,n))}),r};function Fz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jbe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fz(Object(n),!0).forEach(function(r){e1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e1e(e,t,n){return(t=t1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t1e(e){var t=n1e(e,"string");return typeof t=="symbol"?t:t+""}function n1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xn(e,t){var n=Jbe({},e),r=t,a=Object.keys(t),i=a.reduce((s,l)=>(s[l]===void 0&&r[l]!==void 0&&(s[l]=r[l]),s),n);return i}var R_={},I_={},Hz;function r1e(){return Hz||(Hz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const a=new Map;for(let i=0;i<n.length;i++){const s=n[i],l=r(s,i,n);a.has(l)||a.set(l,s)}return Array.from(a.values())}e.uniqBy=t})(I_)),I_}var L_={},Uz;function a1e(){return Uz||(Uz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...a){return n.apply(this,a.slice(0,r))}}e.ary=t})(L_)),L_}var z_={},Gz;function q7(){return Gz||(Gz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(z_)),z_}var $_={},q_={},B_={},Vz;function i1e(){return Vz||(Vz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(B_)),B_}var Kz;function B7(){return Kz||(Kz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i1e();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(q_)),q_}var F_={},Yz;function s1e(){return Yz||(Yz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(F_)),F_}var Wz;function o1e(){return Wz||(Wz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=B7(),n=s1e();function r(a){return n.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=r})($_)),$_}var H_={},U_={},Xz;function l1e(){return Xz||(Xz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eE();function n(r){return function(a){return t.get(a,r)}}e.property=n})(U_)),U_}var G_={},V_={},K_={},Y_={},Zz;function F7(){return Zz||(Zz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Y_)),Y_}var W_={},Qz;function H7(){return Qz||(Qz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(W_)),W_}var X_={},Jz;function U7(){return Jz||(Jz=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(X_)),X_}var e6;function u1e(){return e6||(e6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F7(),n=H7(),r=U7();function a(h,m,g){return typeof g!="function"?a(h,m,()=>{}):i(h,m,function v(b,w,S,j,k,_){const E=g(b,w,S,j,k,_);return E!==void 0?!!E:i(b,w,v,_)},new Map)}function i(h,m,g,v){if(m===h)return!0;switch(typeof m){case"object":return s(h,m,g,v);case"function":return Object.keys(m).length>0?i(h,{...m},g,v):r.isEqualsSameValueZero(h,m);default:return t.isObject(h)?typeof m=="string"?m==="":!0:r.isEqualsSameValueZero(h,m)}}function s(h,m,g,v){if(m==null)return!0;if(Array.isArray(m))return c(h,m,g,v);if(m instanceof Map)return l(h,m,g,v);if(m instanceof Set)return d(h,m,g,v);const b=Object.keys(m);if(h==null||n.isPrimitive(h))return b.length===0;if(b.length===0)return!0;if(v!=null&&v.has(m))return v.get(m)===h;v==null||v.set(m,h);try{for(let w=0;w<b.length;w++){const S=b[w];if(!n.isPrimitive(h)&&!(S in h)||m[S]===void 0&&h[S]!==void 0||m[S]===null&&h[S]!==null||!g(h[S],m[S],S,h,m,v))return!1}return!0}finally{v==null||v.delete(m)}}function l(h,m,g,v){if(m.size===0)return!0;if(!(h instanceof Map))return!1;for(const[b,w]of m.entries()){const S=h.get(b);if(g(S,w,b,h,m,v)===!1)return!1}return!0}function c(h,m,g,v){if(m.length===0)return!0;if(!Array.isArray(h))return!1;const b=new Set;for(let w=0;w<m.length;w++){const S=m[w];let j=!1;for(let k=0;k<h.length;k++){if(b.has(k))continue;const _=h[k];let E=!1;if(g(_,S,w,h,m,v)&&(E=!0),E){b.add(k),j=!0;break}}if(!j)return!1}return!0}function d(h,m,g,v){return m.size===0?!0:h instanceof Set?c([...h],[...m],g,v):!1}e.isMatchWith=a,e.isSetMatch=d})(K_)),K_}var t6;function G7(){return t6||(t6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u1e();function n(r,a){return t.isMatchWith(r,a,()=>{})}e.isMatch=n})(V_)),V_}var Z_={},Q_={},J_={},n6;function c1e(){return n6||(n6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(J_)),J_}var ek={},r6;function nE(){return r6||(r6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(ek)),ek}var tk={},a6;function V7(){return a6||(a6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",a="[object Boolean]",i="[object Arguments]",s="[object Symbol]",l="[object Date]",c="[object Map]",d="[object Set]",h="[object Array]",m="[object Function]",g="[object ArrayBuffer]",v="[object Object]",b="[object Error]",w="[object DataView]",S="[object Uint8Array]",j="[object Uint8ClampedArray]",k="[object Uint16Array]",_="[object Uint32Array]",E="[object BigUint64Array]",T="[object Int8Array]",A="[object Int16Array]",O="[object Int32Array]",D="[object BigInt64Array]",P="[object Float32Array]",M="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=E,e.booleanTag=a,e.dataViewTag=w,e.dateTag=l,e.errorTag=b,e.float32ArrayTag=P,e.float64ArrayTag=M,e.functionTag=m,e.int16ArrayTag=A,e.int32ArrayTag=O,e.int8ArrayTag=T,e.mapTag=c,e.numberTag=r,e.objectTag=v,e.regexpTag=t,e.setTag=d,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=k,e.uint32ArrayTag=_,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=j})(tk)),tk}var nk={},i6;function d1e(){return i6||(i6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(nk)),nk}var s6;function K7(){return s6||(s6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c1e(),n=nE(),r=V7(),a=H7(),i=d1e();function s(h,m){return l(h,void 0,h,new Map,m)}function l(h,m,g,v=new Map,b=void 0){const w=b==null?void 0:b(h,m,g,v);if(w!==void 0)return w;if(a.isPrimitive(h))return h;if(v.has(h))return v.get(h);if(Array.isArray(h)){const S=new Array(h.length);v.set(h,S);for(let j=0;j<h.length;j++)S[j]=l(h[j],j,g,v,b);return Object.hasOwn(h,"index")&&(S.index=h.index),Object.hasOwn(h,"input")&&(S.input=h.input),S}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const S=new RegExp(h.source,h.flags);return S.lastIndex=h.lastIndex,S}if(h instanceof Map){const S=new Map;v.set(h,S);for(const[j,k]of h)S.set(j,l(k,j,g,v,b));return S}if(h instanceof Set){const S=new Set;v.set(h,S);for(const j of h)S.add(l(j,void 0,g,v,b));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(i.isTypedArray(h)){const S=new(Object.getPrototypeOf(h)).constructor(h.length);v.set(h,S);for(let j=0;j<h.length;j++)S[j]=l(h[j],j,g,v,b);return S}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const S=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return v.set(h,S),c(S,h,g,v,b),S}if(typeof File<"u"&&h instanceof File){const S=new File([h],h.name,{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(typeof Blob<"u"&&h instanceof Blob){const S=new Blob([h],{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Error){const S=structuredClone(h);return v.set(h,S),S.message=h.message,S.name=h.name,S.stack=h.stack,S.cause=h.cause,S.constructor=h.constructor,c(S,h,g,v,b),S}if(h instanceof Boolean){const S=new Boolean(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Number){const S=new Number(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof String){const S=new String(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(typeof h=="object"&&d(h)){const S=Object.create(Object.getPrototypeOf(h));return v.set(h,S),c(S,h,g,v,b),S}return h}function c(h,m,g=h,v,b){const w=[...Object.keys(m),...t.getSymbols(m)];for(let S=0;S<w.length;S++){const j=w[S],k=Object.getOwnPropertyDescriptor(h,j);(k==null||k.writable)&&(h[j]=l(m[j],j,g,v,b))}}function d(h){switch(n.getTag(h)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=l,e.copyProperties=c})(Q_)),Q_}var o6;function f1e(){return o6||(o6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K7();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Z_)),Z_}var l6;function h1e(){return l6||(l6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G7(),n=f1e();function r(a){return a=n.cloneDeep(a),i=>t.isMatch(i,a)}e.matches=r})(G_)),G_}var rk={},ak={},ik={},u6;function m1e(){return u6||(u6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K7(),n=nE(),r=V7();function a(i,s){return t.cloneDeepWith(i,(l,c,d,h)=>{const m=s==null?void 0:s(l,c,d,h);if(m!==void 0)return m;if(typeof i=="object"){if(n.getTag(i)===r.objectTag&&typeof i.constructor!="function"){const g={};return h.set(i,g),t.copyProperties(g,i,d,h),g}switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const g=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(g,i),g}case r.argumentsTag:{const g={};return t.copyProperties(g,i),g.length=i.length,g[Symbol.iterator]=i[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=a})(ik)),ik}var c6;function p1e(){return c6||(c6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m1e();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(ak)),ak}var sk={},ok={},d6;function Y7(){return d6||(d6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,a=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<a;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(ok)),ok}var lk={},f6;function g1e(){return f6||(f6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nE();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(lk)),lk}var h6;function v1e(){return h6||(h6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D7(),n=Y7(),r=g1e(),a=J2();function i(s,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&(s==null?void 0:s[l])==null?c=a.toPath(l):c=[l],c.length===0)return!1;let d=s;for(let h=0;h<c.length;h++){const m=c[h];if((d==null||!Object.hasOwn(d,m))&&!((Array.isArray(d)||r.isArguments(d))&&n.isIndex(m)&&m<d.length))return!1;d=d[m]}return!0}e.has=i})(sk)),sk}var m6;function y1e(){return m6||(m6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G7(),n=Q2(),r=p1e(),a=eE(),i=v1e();function s(l,c){switch(typeof l){case"object":{Object.is(l==null?void 0:l.valueOf(),-0)&&(l="-0");break}case"number":{l=n.toKey(l);break}}return c=r.cloneDeep(c),function(d){const h=a.get(d,l);return h===void 0?i.has(d,l):c===void 0?h===void 0:t.isMatch(h,c)}}e.matchesProperty=s})(rk)),rk}var p6;function x1e(){return p6||(p6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=q7(),n=l1e(),r=h1e(),a=y1e();function i(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?a.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=i})(H_)),H_}var g6;function b1e(){return g6||(g6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r1e(),n=a1e(),r=q7(),a=o1e(),i=x1e();function s(l,c=r.identity){return a.isArrayLikeObject(l)?t.uniqBy(Array.from(l),n.ary(i.iteratee(c),1)):[]}e.uniqBy=s})(R_)),R_}var uk,v6;function w1e(){return v6||(v6=1,uk=b1e().uniqBy),uk}var S1e=w1e();const y6=ea(S1e);function j1e(e,t,n){return t===!0?y6(e,n):typeof t=="function"?y6(e,t):e}var rE=x.createContext(null),_1e=e=>e,Jt=()=>{var e=x.useContext(rE);return e?e.store.dispatch:_1e},yp=()=>{},k1e=()=>yp,C1e=(e,t)=>e===t;function Ve(e){var t=x.useContext(rE),n=x.useMemo(()=>t?r=>{if(r!=null)return e(r)}:yp,[t,e]);return O9.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:k1e,t?t.store.getState:yp,t?t.store.getState:yp,n,C1e)}function N1e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function E1e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function A1e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var x6=e=>Array.isArray(e)?e:[e];function T1e(e){const t=Array.isArray(e[0])?e[0]:e;return A1e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function O1e(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var M1e=class{constructor(e){this.value=e}deref(){return this.value}},P1e=typeof WeakRef<"u"?WeakRef:M1e,D1e=0,b6=1;function Km(){return{s:D1e,v:void 0,o:null,p:null}}function W7(e,t={}){let n=Km();const{resultEqualityCheck:r}=t;let a,i=0;function s(){var m;let l=n;const{length:c}=arguments;for(let g=0,v=c;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=l.o;w===null&&(l.o=w=new WeakMap);const S=w.get(b);S===void 0?(l=Km(),w.set(b,l)):l=S}else{let w=l.p;w===null&&(l.p=w=new Map);const S=w.get(b);S===void 0?(l=Km(),w.set(b,l)):l=S}}const d=l;let h;if(l.s===b6)h=l.v;else if(h=e.apply(null,arguments),i++,r){const g=((m=a==null?void 0:a.deref)==null?void 0:m.call(a))??a;g!=null&&r(g,h)&&(h=g,i!==0&&i--),a=typeof h=="object"&&h!==null||typeof h=="function"?new P1e(h):h}return d.s=b6,d.v=h,h}return s.clearCache=()=>{n=Km(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function R1e(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...a)=>{let i=0,s=0,l,c={},d=a.pop();typeof d=="object"&&(c=d,d=a.pop()),N1e(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...c},{memoize:m,memoizeOptions:g=[],argsMemoize:v=W7,argsMemoizeOptions:b=[]}=h,w=x6(g),S=x6(b),j=T1e(a),k=m(function(){return i++,d.apply(null,arguments)},...w),_=v(function(){s++;const T=O1e(j,arguments);return l=k.apply(null,T),l},...S);return Object.assign(_,{resultFunc:d,memoizedResultFunc:k,dependencies:j,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>l,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:m,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var de=R1e(W7),I1e=Object.assign((e,t=de)=>{E1e(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),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,l,c)=>(s[n[c]]=l,s),{}))},{withTypes:()=>I1e}),ck={},dk={},fk={},w6;function L1e(){return w6||(w6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,a,i)=>{if(r!==a){const s=t(r),l=t(a);if(s===l&&s===0){if(r<a)return i==="desc"?1:-1;if(r>a)return i==="desc"?-1:1}return i==="desc"?l-s:s-l}return 0};e.compareValues=n})(fk)),fk}var hk={},mk={},S6;function X7(){return S6||(S6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(mk)),mk}var j6;function z1e(){return j6||(j6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X7(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||s!=null&&Object.hasOwn(s,i)}e.isKey=a})(hk)),hk}var _6;function $1e(){return _6||(_6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=L1e(),n=z1e(),r=J2();function a(i,s,l,c){if(i==null)return[];l=c?void 0:l,Array.isArray(i)||(i=Object.values(i)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(v=>String(v));const d=(v,b)=>{let w=v;for(let S=0;S<b.length&&w!=null;++S)w=w[b[S]];return w},h=(v,b)=>b==null||v==null?b:typeof v=="object"&&"key"in v?Object.hasOwn(b,v.key)?b[v.key]:d(b,v.path):typeof v=="function"?v(b):Array.isArray(v)?d(b,v):typeof b=="object"?b[v]:b,m=s.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||n.isKey(v)?v:{key:v,path:r.toPath(v)}));return i.map(v=>({original:v,criteria:m.map(b=>h(b,v))})).slice().sort((v,b)=>{for(let w=0;w<m.length;w++){const S=t.compareValues(v.criteria[w],b.criteria[w],l[w]);if(S!==0)return S}return 0}).map(v=>v.original)}e.orderBy=a})(dk)),dk}var pk={},k6;function q1e(){return k6||(k6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const a=[],i=Math.floor(r),s=(l,c)=>{for(let d=0;d<l.length;d++){const h=l[d];Array.isArray(h)&&c<i?s(h,c+1):a.push(h)}};return s(n,0),a}e.flatten=t})(pk)),pk}var gk={},C6;function Z7(){return C6||(C6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y7(),n=B7(),r=F7(),a=U7();function i(s,l,c){return r.isObject(c)&&(typeof l=="number"&&n.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?a.isEqualsSameValueZero(c[l],s):!1}e.isIterateeCall=i})(gk)),gk}var N6;function B1e(){return N6||(N6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$1e(),n=q1e(),r=Z7();function a(i,...s){const l=s.length;return l>1&&r.isIterateeCall(i,s[0],s[1])?s=[]:l>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(i,n.flatten(s),["asc"])}e.sortBy=a})(ck)),ck}var vk,E6;function F1e(){return E6||(E6=1,vk=B1e().sortBy),vk}var H1e=F1e();const Nv=ea(H1e);var Q7=e=>e.legend.settings,U1e=e=>e.legend.size,G1e=e=>e.legend.payload;de([G1e,Q7],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Nv(r,n):r});var Ym=1;function V1e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=x.useState({height:0,left:0,top:0,width:0}),r=x.useCallback(a=>{if(a!=null){var i=a.getBoundingClientRect(),s={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(s.height-t.height)>Ym||Math.abs(s.left-t.left)>Ym||Math.abs(s.top-t.top)>Ym||Math.abs(s.width-t.width)>Ym)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function rr(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 K1e=typeof Symbol=="function"&&Symbol.observable||"@@observable",A6=K1e,yk=()=>Math.random().toString(36).substring(7).split("").join("."),Y1e={INIT:`@@redux/INIT${yk()}`,REPLACE:`@@redux/REPLACE${yk()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yk()}`},Yp=Y1e;function aE(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function J7(e,t,n){if(typeof e!="function")throw new Error(rr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(rr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(rr(1));return n(J7)(e,t)}let r=e,a=t,i=new Map,s=i,l=0,c=!1;function d(){s===i&&(s=new Map,i.forEach((S,j)=>{s.set(j,S)}))}function h(){if(c)throw new Error(rr(3));return a}function m(S){if(typeof S!="function")throw new Error(rr(4));if(c)throw new Error(rr(5));let j=!0;d();const k=l++;return s.set(k,S),function(){if(j){if(c)throw new Error(rr(6));j=!1,d(),s.delete(k),i=null}}}function g(S){if(!aE(S))throw new Error(rr(7));if(typeof S.type>"u")throw new Error(rr(8));if(typeof S.type!="string")throw new Error(rr(17));if(c)throw new Error(rr(9));try{c=!0,a=r(a,S)}finally{c=!1}return(i=s).forEach(k=>{k()}),S}function v(S){if(typeof S!="function")throw new Error(rr(10));r=S,g({type:Yp.REPLACE})}function b(){const S=m;return{subscribe(j){if(typeof j!="object"||j===null)throw new Error(rr(11));function k(){const E=j;E.next&&E.next(h())}return k(),{unsubscribe:S(k)}},[A6](){return this}}}return g({type:Yp.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:v,[A6]:b}}function W1e(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Yp.INIT})>"u")throw new Error(rr(12));if(typeof n(void 0,{type:Yp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(rr(13))})}function eG(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const s=t[i];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let a;try{W1e(n)}catch(i){a=i}return function(s={},l){if(a)throw a;let c=!1;const d={};for(let h=0;h<r.length;h++){const m=r[h],g=n[m],v=s[m],b=g(v,l);if(typeof b>"u")throw l&&l.type,new Error(rr(14));d[m]=b,c=c||b!==v}return c=c||r.length!==Object.keys(s).length,c?d:s}}function Wp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function X1e(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(rr(15))};const s={getState:a.getState,dispatch:(c,...d)=>i(c,...d)},l=e.map(c=>c(s));return i=Wp(...l)(a.dispatch),{...a,dispatch:i}}}function tG(e){return aE(e)&&"type"in e&&typeof e.type=="string"}var nG=Symbol.for("immer-nothing"),T6=Symbol.for("immer-draftable"),br=Symbol.for("immer-state");function Oa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kr=Object,Wu=Kr.getPrototypeOf,Xp="constructor",Ev="prototype",BC="configurable",Zp="enumerable",xp="writable",gf="value",rs=e=>!!e&&!!e[br];function za(e){var t;return e?rG(e)||Tv(e)||!!e[T6]||!!((t=e[Xp])!=null&&t[T6])||Ov(e)||Mv(e):!1}var Z1e=Kr[Ev][Xp].toString(),O6=new WeakMap;function rG(e){if(!e||!iE(e))return!1;const t=Wu(e);if(t===null||t===Kr[Ev])return!0;const n=Kr.hasOwnProperty.call(t,Xp)&&t[Xp];if(n===Object)return!0;if(!Nu(n))return!1;let r=O6.get(n);return r===void 0&&(r=Function.toString.call(n),O6.set(n,r)),r===Z1e}function Av(e,t,n=!0){Yf(e)===0?(n?Reflect.ownKeys(e):Kr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Yf(e){const t=e[br];return t?t.type_:Tv(e)?1:Ov(e)?2:Mv(e)?3:0}var M6=(e,t,n=Yf(e))=>n===2?e.has(t):Kr[Ev].hasOwnProperty.call(e,t),FC=(e,t,n=Yf(e))=>n===2?e.get(t):e[t],Qp=(e,t,n,r=Yf(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Q1e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Tv=Array.isArray,Ov=e=>e instanceof Map,Mv=e=>e instanceof Set,iE=e=>typeof e=="object",Nu=e=>typeof e=="function",xk=e=>typeof e=="boolean";function J1e(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Fi=e=>e.copy_||e.base_,sE=e=>e.modified_?e.copy_:e.base_;function HC(e,t){if(Ov(e))return new Map(e);if(Mv(e))return new Set(e);if(Tv(e))return Array[Ev].slice.call(e);const n=rG(e);if(t===!0||t==="class_only"&&!n){const r=Kr.getOwnPropertyDescriptors(e);delete r[br];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],l=r[s];l[xp]===!1&&(l[xp]=!0,l[BC]=!0),(l.get||l.set)&&(r[s]={[BC]:!0,[xp]:!0,[Zp]:l[Zp],[gf]:e[s]})}return Kr.create(Wu(e),r)}else{const r=Wu(e);if(r!==null&&n)return{...e};const a=Kr.create(r);return Kr.assign(a,e)}}function oE(e,t=!1){return Pv(e)||rs(e)||!za(e)||(Yf(e)>1&&Kr.defineProperties(e,{set:Wm,add:Wm,clear:Wm,delete:Wm}),Kr.freeze(e),t&&Av(e,(n,r)=>{oE(r,!0)},!1)),e}function ewe(){Oa(2)}var Wm={[gf]:ewe};function Pv(e){return e===null||!iE(e)?!0:Kr.isFrozen(e)}var Jp="MapSet",UC="Patches",P6="ArrayMethods",aG={};function dl(e){const t=aG[e];return t||Oa(0,e),t}var D6=e=>!!aG[e],vf,iG=()=>vf,twe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:D6(Jp)?dl(Jp):void 0,arrayMethodsPlugin_:D6(P6)?dl(P6):void 0});function R6(e,t){t&&(e.patchPlugin_=dl(UC),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function GC(e){VC(e),e.drafts_.forEach(nwe),e.drafts_=null}function VC(e){e===vf&&(vf=e.parent_)}var I6=e=>vf=twe(vf,e);function nwe(e){const t=e[br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function L6(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[br].modified_&&(GC(t),Oa(4)),za(e)&&(e=z6(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[br].base_,e,t)}else e=z6(t,n);return rwe(t,e,!0),GC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nG?e:void 0}function z6(e,t){if(Pv(t))return t;const n=t[br];if(!n)return eg(t,e.handledSet_,e);if(!Dv(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);lG(n,e)}return n.copy_}function rwe(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&oE(t,n)}function sG(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Dv=(e,t)=>e.scope_===t,awe=[];function oG(e,t,n,r){const a=Fi(e),i=e.type_;if(r!==void 0&&FC(a,r,i)===t){Qp(a,r,n,i);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;Av(a,(c,d)=>{if(rs(d)){const h=l.get(d)||[];h.push(c),l.set(d,h)}})}const s=e.draftLocations_.get(t)??awe;for(const l of s)Qp(a,l,n,i)}function iwe(e,t,n){e.callbacks_.push(function(a){var l;const i=t;if(!i||!Dv(i,a))return;(l=a.mapSetPlugin_)==null||l.fixSetContents(i);const s=sE(i);oG(e,i.draft_??i,s,n),lG(i,a)})}function lG(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const i=a.getPath(e);i&&a.generatePatches_(e,i,t)}sG(e)}}function swe(e,t,n){const{scope_:r}=e;if(rs(n)){const a=n[br];Dv(a,r)&&a.callbacks_.push(function(){bp(e);const s=sE(a);oG(e,n,s,t)})}else za(n)&&e.callbacks_.push(function(){const i=Fi(e);e.type_===3?i.has(n)&&eg(n,r.handledSet_,r):FC(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&eg(FC(e.copy_,t,e.type_),r.handledSet_,r)})}function eg(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||rs(e)||t.has(e)||!za(e)||Pv(e)||(t.add(e),Av(e,(r,a)=>{if(rs(a)){const i=a[br];if(Dv(i,n)){const s=sE(i);Qp(e,r,s,e.type_),sG(i)}}else za(a)&&eg(a,t,n)})),e}function owe(e,t){const n=Tv(e),r={type_:n?1:0,scope_:t?t.scope_:iG(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=tg;n&&(a=[r],i=yf);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return r.draft_=l,r.revoke_=s,[l,r]}var tg={get(e,t){if(t===br)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=Fi(e);if(!M6(a,t,e.type_))return lwe(e,a,t);const i=a[t];if(e.finalized_||!za(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&J1e(t))return i;if(i===bk(e.base_,t)){bp(e);const s=e.type_===1?+t:t,l=YC(e.scope_,i,e,s);return e.copy_[s]=l}return i},has(e,t){return t in Fi(e)},ownKeys(e){return Reflect.ownKeys(Fi(e))},set(e,t,n){const r=uG(Fi(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=bk(Fi(e),t),i=a==null?void 0:a[br];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Q1e(n,a)&&(n!==void 0||M6(e.base_,t,e.type_)))return!0;bp(e),KC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),swe(e,t,n)),!0},deleteProperty(e,t){return bp(e),bk(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),KC(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Fi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[xp]:!0,[BC]:e.type_!==1||t!=="length",[Zp]:r[Zp],[gf]:n[t]}},defineProperty(){Oa(11)},getPrototypeOf(e){return Wu(e.base_)},setPrototypeOf(){Oa(12)}},yf={};for(let e in tg){let t=tg[e];yf[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}yf.deleteProperty=function(e,t){return yf.set.call(this,e,t,void 0)};yf.set=function(e,t,n){return tg.set.call(this,e[0],t,n,e[0])};function bk(e,t){const n=e[br];return(n?Fi(n):e)[t]}function lwe(e,t,n){var a;const r=uG(t,n);return r?gf in r?r[gf]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function uG(e,t){if(!(t in e))return;let n=Wu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Wu(n)}}function KC(e){e.modified_||(e.modified_=!0,e.parent_&&KC(e.parent_))}function bp(e){e.copy_||(e.assigned_=new Map,e.copy_=HC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var uwe=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,a)=>{if(Nu(n)&&!Nu(r)){const s=r;r=n;const l=this;return function(d=s,...h){return l.produce(d,m=>r.call(this,m,...h))}}Nu(r)||Oa(6),a!==void 0&&!Nu(a)&&Oa(7);let i;if(za(n)){const s=I6(this),l=YC(s,n,void 0);let c=!0;try{i=r(l),c=!1}finally{c?GC(s):VC(s)}return R6(s,a),L6(i,s)}else if(!n||!iE(n)){if(i=r(n),i===void 0&&(i=n),i===nG&&(i=void 0),this.autoFreeze_&&oE(i,!0),a){const s=[],l=[];dl(UC).generateReplacementPatches_(n,i,{patches_:s,inversePatches_:l}),a(s,l)}return i}else Oa(1,n)},this.produceWithPatches=(n,r)=>{if(Nu(n))return(l,...c)=>this.produceWithPatches(l,d=>n(d,...c));let a,i;return[this.produce(n,r,(l,c)=>{a=l,i=c}),a,i]},xk(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),xk(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),xk(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){za(t)||Oa(8),rs(t)&&(t=ma(t));const n=I6(this),r=YC(n,t,void 0);return r[br].isManual_=!0,VC(n),r}finishDraft(t,n){const r=t&&t[br];(!r||!r.isManual_)&&Oa(9);const{scope_:a}=r;return R6(a,n),L6(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const a=dl(UC).applyPatches_;return rs(t)?a(t,n):this.produce(t,i=>a(i,n))}};function YC(e,t,n,r){const[a,i]=Ov(t)?dl(Jp).proxyMap_(t,n):Mv(t)?dl(Jp).proxySet_(t,n):owe(t,n);return((n==null?void 0:n.scope_)??iG()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?iwe(n,i,r):i.callbacks_.push(function(c){var h;(h=c.mapSetPlugin_)==null||h.fixSetContents(i);const{patchPlugin_:d}=c;i.modified_&&d&&d.generatePatches_(i,[],c)}),a}function ma(e){return rs(e)||Oa(10,e),cG(e)}function cG(e){if(!za(e)||Pv(e))return e;const t=e[br];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=HC(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=HC(e,!0);return Av(n,(a,i)=>{Qp(n,a,cG(i))},r),t&&(t.finalized_=!1),n}var cwe=new uwe,dG=cwe.produce;function fG(e){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,e):a(i)}var dwe=fG(),fwe=fG,hwe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wp:Wp.apply(null,arguments)};function Qr(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(Wr(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>tG(r)&&r.type===e,n}var hG=class $d extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$d.prototype)}static get[Symbol.species](){return $d}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $d(...t[0].concat(this)):new $d(...t.concat(this))}};function $6(e){return za(e)?dG(e,()=>{}):e}function Xm(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function mwe(e){return typeof e=="boolean"}var pwe=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new hG;return n&&(mwe(n)?s.push(dwe):s.push(fwe(n.extraArgument))),s},mG="RTK_autoBatch",nn=()=>e=>({payload:e,meta:{[mG]:!0}}),q6=e=>t=>{setTimeout(t,e)},pG=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,i=!1,s=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:q6(10):e.type==="callback"?e.queueNotification:q6(e.timeout),d=()=>{s=!1,i&&(i=!1,l.forEach(h=>h()))};return Object.assign({},r,{subscribe(h){const m=()=>a&&h(),g=r.subscribe(m);return l.add(h),()=>{g(),l.delete(h)}},dispatch(h){var m;try{return a=!((m=h==null?void 0:h.meta)!=null&&m[mG]),i=!a,i&&(s||(s=!0,c(d))),r.dispatch(h)}finally{a=!0}}})},gwe=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new hG(e);return r&&a.push(pG(typeof r=="object"?r:void 0)),a};function vwe(e){const t=pwe(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(aE(n))l=eG(n);else throw new Error(Wr(1));let c;typeof r=="function"?c=r(t):c=t();let d=Wp;a&&(d=hwe({trace:!1,...typeof a=="object"&&a}));const h=X1e(...c),m=gwe(h);let g=typeof s=="function"?s(m):m();const v=d(...g);return J7(l,i,v)}function gG(e){const t={},n=[];let r;const a={addCase(i,s){const l=typeof i=="string"?i:i.type;if(!l)throw new Error(Wr(28));if(l in t)throw new Error(Wr(29));return t[l]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return r=i,a}};return e(a),[t,n,r]}function ywe(e){return typeof e=="function"}function xwe(e,t){let[n,r,a]=gG(t),i;if(ywe(e))i=()=>$6(e());else{const l=$6(e);i=()=>l}function s(l=i(),c){let d=[n[c.type],...r.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[a]),d.reduce((h,m)=>{if(m)if(rs(h)){const v=m(h,c);return v===void 0?h:v}else{if(za(h))return dG(h,g=>m(g,c));{const g=m(h,c);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},l)}return s.getInitialState=i,s}var bwe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wwe=(e=21)=>{let t="",n=e;for(;n--;)t+=bwe[Math.random()*64|0];return t},Swe=Symbol.for("rtk-slice-createasyncthunk");function jwe(e,t){return`${e}/${t}`}function _we({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Swe];return function(a){const{name:i,reducerPath:s=i}=a;if(!i)throw new Error(Wr(11));const l=(typeof a.reducers=="function"?a.reducers(Cwe()):a.reducers)||{},c=Object.keys(l),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(E,T){const A=typeof E=="string"?E:E.type;if(!A)throw new Error(Wr(12));if(A in d.sliceCaseReducersByType)throw new Error(Wr(13));return d.sliceCaseReducersByType[A]=T,h},addMatcher(E,T){return d.sliceMatchers.push({matcher:E,reducer:T}),h},exposeAction(E,T){return d.actionCreators[E]=T,h},exposeCaseReducer(E,T){return d.sliceCaseReducersByName[E]=T,h}};c.forEach(E=>{const T=l[E],A={reducerName:E,type:jwe(i,E),createNotation:typeof a.reducers=="function"};Ewe(T)?Twe(A,T,h,t):Nwe(A,T,h)});function m(){const[E={},T=[],A=void 0]=typeof a.extraReducers=="function"?gG(a.extraReducers):[a.extraReducers],O={...E,...d.sliceCaseReducersByType};return xwe(a.initialState,D=>{for(let P in O)D.addCase(P,O[P]);for(let P of d.sliceMatchers)D.addMatcher(P.matcher,P.reducer);for(let P of T)D.addMatcher(P.matcher,P.reducer);A&&D.addDefaultCase(A)})}const g=E=>E,v=new Map,b=new WeakMap;let w;function S(E,T){return w||(w=m()),w(E,T)}function j(){return w||(w=m()),w.getInitialState()}function k(E,T=!1){function A(D){let P=D[E];return typeof P>"u"&&T&&(P=Xm(b,A,j)),P}function O(D=g){const P=Xm(v,T,()=>new WeakMap);return Xm(P,D,()=>{const M={};for(const[z,L]of Object.entries(a.selectors??{}))M[z]=kwe(L,D,()=>Xm(b,D,j),T);return M})}return{reducerPath:E,getSelectors:O,get selectors(){return O(A)},selectSlice:A}}const _={name:i,reducer:S,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:j,...k(s),injectInto(E,{reducerPath:T,...A}={}){const O=T??s;return E.inject({reducerPath:O,reducer:S},A),{..._,...k(O,!0)}}};return _}}function kwe(e,t,n,r){function a(i,...s){let l=t(i);return typeof l>"u"&&r&&(l=n()),e(l,...s)}return a.unwrapped=e,a}var hr=_we();function Cwe(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Nwe({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!Awe(r))throw new Error(Wr(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Qr(e,s):Qr(e))}function Ewe(e){return e._reducerDefinitionType==="asyncThunk"}function Awe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Twe({type:e,reducerName:t},n,r,a){if(!a)throw new Error(Wr(18));const{payloadCreator:i,fulfilled:s,pending:l,rejected:c,settled:d,options:h}=n,m=a(e,i,h);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),l&&r.addCase(m.pending,l),c&&r.addCase(m.rejected,c),d&&r.addMatcher(m.settled,d),r.exposeCaseReducer(t,{fulfilled:s||Zm,pending:l||Zm,rejected:c||Zm,settled:d||Zm})}function Zm(){}var Owe="task",vG="listener",yG="completed",lE="cancelled",Mwe=`task-${lE}`,Pwe=`task-${yG}`,WC=`${vG}-${lE}`,Dwe=`${vG}-${yG}`,Rv=class{constructor(e){v0(this,"name","TaskAbortError");v0(this,"message");this.code=e,this.message=`${Owe} ${lE} (reason: ${e})`}},uE=(e,t)=>{if(typeof e!="function")throw new TypeError(Wr(32))},ng=()=>{},xG=(e,t=ng)=>(e.catch(t),e),bG=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),el=e=>{if(e.aborted)throw new Rv(e.reason)};function wG(e,t){let n=ng;return new Promise((r,a)=>{const i=()=>a(new Rv(e.reason));if(e.aborted){i();return}n=bG(e,i),t.finally(()=>n()).then(r,a)}).finally(()=>{n=ng})}var Rwe=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Rv?"cancelled":"rejected",error:n}}finally{t==null||t()}},rg=e=>t=>xG(wG(e,t).then(n=>(el(e),n))),SG=e=>{const t=rg(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Iu}=Object,B6={},Iv="listenerMiddleware",Iwe=(e,t)=>{const n=r=>bG(e,()=>r.abort(e.reason));return(r,a)=>{uE(r);const i=new AbortController;n(i);const s=Rwe(async()=>{el(e),el(i.signal);const l=await r({pause:rg(i.signal),delay:SG(i.signal),signal:i.signal});return el(i.signal),l},()=>i.abort(Pwe));return a!=null&&a.autoJoin&&t.push(s.catch(ng)),{result:rg(e)(s),cancel(){i.abort(Mwe)}}}},Lwe=(e,t)=>{const n=async(r,a)=>{el(t);let i=()=>{};const l=[new Promise((c,d)=>{let h=e({predicate:r,effect:(m,g)=>{g.unsubscribe(),c([m,g.getState(),g.getOriginalState()])}});i=()=>{h(),d()}})];a!=null&&l.push(new Promise(c=>setTimeout(c,a,null)));try{const c=await wG(t,Promise.race(l));return el(t),c}finally{i()}};return(r,a)=>xG(n(r,a))},jG=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=Qr(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(Wr(21));return uE(i),{predicate:a,type:t,effect:i}},_G=Iu(e=>{const{type:t,predicate:n,effect:r}=jG(e);return{id:wwe(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Wr(22))}}},{withTypes:()=>_G}),F6=(e,t)=>{const{type:n,effect:r,predicate:a}=jG(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===a)&&i.effect===r)},XC=e=>{e.pending.forEach(t=>{t.abort(WC)})},zwe=(e,t)=>()=>{for(const n of t.keys())XC(n);e.clear()},H6=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},kG=Iu(Qr(`${Iv}/add`),{withTypes:()=>kG}),$we=Qr(`${Iv}/removeAll`),CG=Iu(Qr(`${Iv}/remove`),{withTypes:()=>CG}),qwe=(...e)=>{console.error(`${Iv}/error`,...e)},Wf=(e={})=>{const t=new Map,n=new Map,r=v=>{const b=n.get(v)??0;n.set(v,b+1)},a=v=>{const b=n.get(v)??1;b===1?n.delete(v):n.set(v,b-1)},{extra:i,onError:s=qwe}=e;uE(s);const l=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),b=>{v.unsubscribe(),b!=null&&b.cancelActive&&XC(v)}),c=v=>{const b=F6(t,v)??_G(v);return l(b)};Iu(c,{withTypes:()=>c});const d=v=>{const b=F6(t,v);return b&&(b.unsubscribe(),v.cancelActive&&XC(b)),!!b};Iu(d,{withTypes:()=>d});const h=async(v,b,w,S)=>{const j=new AbortController,k=Lwe(c,j.signal),_=[];try{v.pending.add(j),r(v),await Promise.resolve(v.effect(b,Iu({},w,{getOriginalState:S,condition:(E,T)=>k(E,T).then(Boolean),take:k,delay:SG(j.signal),pause:rg(j.signal),extra:i,signal:j.signal,fork:Iwe(j.signal,_),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((E,T,A)=>{E!==j&&(E.abort(WC),A.delete(E))})},cancel:()=>{j.abort(WC),v.pending.delete(j)},throwIfCancelled:()=>{el(j.signal)}})))}catch(E){E instanceof Rv||H6(s,E,{raisedBy:"effect"})}finally{await Promise.all(_),j.abort(Dwe),a(v),v.pending.delete(j)}},m=zwe(t,n);return{middleware:v=>b=>w=>{if(!tG(w))return b(w);if(kG.match(w))return c(w.payload);if($we.match(w)){m();return}if(CG.match(w))return d(w.payload);let S=v.getState();const j=()=>{if(S===B6)throw new Error(Wr(23));return S};let k;try{if(k=b(w),t.size>0){const _=v.getState(),E=Array.from(t.values());for(const T of E){let A=!1;try{A=T.predicate(w,_,S)}catch(O){A=!1,H6(s,O,{raisedBy:"predicate"})}A&&h(T,w,v,j)}}}finally{S=B6}return k},startListening:c,stopListening:d,clearListeners:m}};function Wr(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 Bwe={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},NG=hr({name:"chartLayout",initialState:Bwe,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Fwe,setLayout:Hwe,setChartSize:Uwe,setScale:Gwe}=NG.actions,Vwe=NG.reducer;function EG(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function Nt(e){return Number.isFinite(e)}function hi(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function U6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U6(Object(n),!0).forEach(function(r){Kwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kwe(e,t,n){return(t=Ywe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ywe(e){var t=Wwe(e,"string");return typeof t=="symbol"?t:t+""}function Wwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $t(e,t,n){return cn(e)||cn(t)?n:fi(t)?ul(e,t,n):typeof t=="function"?t(e):n}var Xwe=(e,t,n)=>{if(t&&n){var{width:r,height:a}=n,{align:i,verticalAlign:s,layout:l}=t;if((l==="vertical"||l==="horizontal"&&s==="middle")&&i!=="center"&&Be(e[i]))return Ou(Ou({},e),{},{[i]:e[i]+(r||0)});if((l==="horizontal"||l==="vertical"&&i==="center")&&s!=="middle"&&Be(e[s]))return Ou(Ou({},e),{},{[s]:e[s]+(a||0)})}return e},ds=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",AG=(e,t,n,r)=>{if(r)return e.map(l=>l.coordinate);var a,i,s=e.map(l=>(l.coordinate===t&&(a=!0),l.coordinate===n&&(i=!0),l.coordinate));return a||s.push(t),i||s.push(n),s},TG=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:a,range:i,scale:s,realScaleType:l,isCategorical:c,categoricalDomain:d,tickCount:h,ticks:m,niceTicks:g,axisType:v}=e;if(!s)return null;var b=l==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,w=a==="category"&&s.bandwidth?s.bandwidth()/b:0;if(w=v==="angleAxis"&&i&&i.length>=2?Wn(i[0]-i[1])*2*w:w,m||g){var S=(m||g||[]).map((j,k)=>{var _=r?r.indexOf(j):j,E=s.map(_);return Nt(E)?{coordinate:E+w,value:j,offset:w,index:k}:null}).filter(Tr);return S}return c&&d?d.map((j,k)=>{var _=s.map(j);return Nt(_)?{coordinate:_+w,value:j,index:k,offset:w}:null}).filter(Tr):s.ticks&&h!=null?s.ticks(h).map((j,k)=>{var _=s.map(j);return Nt(_)?{coordinate:_+w,value:j,index:k,offset:w}:null}).filter(Tr):s.domain().map((j,k)=>{var _=s.map(j);return Nt(_)?{coordinate:_+w,value:r?r[j]:j,index:k,offset:w}:null}).filter(Tr)},Zwe=(e,t)=>{if(!t||t.length!==2||!Be(t[0])||!Be(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!Be(e[0])||e[0]<n)&&(a[0]=n),(!Be(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},Qwe=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0,l=0;l<n;++l){var c=e[l],d=c==null?void 0:c[a];if(d!=null){var h=d[1],m=d[0],g=di(h)?m:h;g>=0?(d[0]=i,i+=g,d[1]=i):(d[0]=s,s+=g,d[1]=s)}}}},Jwe=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0;s<n;++s){var l=e[s],c=l==null?void 0:l[a];if(c!=null){var d=di(c[1])?c[0]:c[1];d>=0?(c[0]=i,i+=d,c[1]=i):(c[0]=0,c[1]=0)}}}},eSe={sign:Qwe,expand:Pbe,none:ll,silhouette:Dbe,wiggle:Rbe,positive:Jwe},tSe=(e,t,n)=>{var r,a=(r=eSe[n])!==null&&r!==void 0?r:ll,i=Mbe().keys(t).value((l,c)=>Number($t(l,c,0))).order($C).offset(a),s=i(e);return s.forEach((l,c)=>{l.forEach((d,h)=>{var m=$t(e[h],t[c],0);Array.isArray(m)&&m.length===2&&Be(m[0])&&Be(m[1])&&(d[0]=m[0],d[1]=m[1])})}),s};function nSe(e){return e==null?void 0:String(e)}function G6(e){var{axis:t,ticks:n,bandSize:r,entry:a,index:i,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!cn(a[t.dataKey])){var l=I7(n,"value",a[t.dataKey]);if(l)return l.coordinate+r/2}return n!=null&&n[i]?n[i].coordinate+r/2:null}var c=$t(a,cn(s)?t.dataKey:s),d=t.scale.map(c);return Be(d)?d:null}var V6=e=>{var{axis:t,ticks:n,offset:r,bandSize:a,entry:i,index:s}=e;if(t.type==="category")return n[s]?n[s].coordinate+r:null;var l=$t(i,t.dataKey,t.scale.domain()[s]);if(cn(l))return null;var c=t.scale.map(l);return Be(c)?c-a/2+r:null},rSe=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},aSe=e=>{var t=e.flat(2).filter(Be);return[Math.min(...t),Math.max(...t)]},iSe=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],sSe=(e,t,n)=>{if(e!=null)return iSe(Object.keys(e).reduce((r,a)=>{var i=e[a];if(!i)return r;var{stackedData:s}=i,l=s.reduce((c,d)=>{var h=EG(d,t,n),m=aSe(h);return!Nt(m[0])||!Nt(m[1])?c:[Math.min(c[0],m[0]),Math.max(c[1],m[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]))},K6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Y6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xu=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=Nv(t,h=>h.coordinate),i=1/0,s=1,l=a.length;s<l;s++){var c=a[s],d=a[s-1];i=Math.min(((c==null?void 0:c.coordinate)||0)-((d==null?void 0:d.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function W6(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:a,name:i}=e;return Ou(Ou({},t),{},{dataKey:n,payload:r,value:a,name:i})}function pc(e,t){if(e)return String(e);if(typeof t=="string")return t}var oSe=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},lSe=(e,t)=>t==="centric"?e.angle:e.radius,fs=e=>e.layout.width,hs=e=>e.layout.height,uSe=e=>e.layout.scale,OG=e=>e.layout.margin,Lv=de(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),zv=de(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),MG="data-recharts-item-index",PG="data-recharts-item-id",Xf=60;function X6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X6(Object(n),!0).forEach(function(r){cSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cSe(e,t,n){return(t=dSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dSe(e){var t=fSe(e,"string");return typeof t=="symbol"?t:t+""}function fSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hSe=e=>e.brush.height;function mSe(e){var t=zv(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Xf;return n+a}return n},0)}function pSe(e){var t=zv(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Xf;return n+a}return n},0)}function gSe(e){var t=Lv(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function vSe(e){var t=Lv(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Fn=de([fs,hs,OG,hSe,mSe,pSe,gSe,vSe,Q7,U1e],(e,t,n,r,a,i,s,l,c,d)=>{var h={left:(n.left||0)+a,right:(n.right||0)+i},m={top:(n.top||0)+s,bottom:(n.bottom||0)+l},g=Qm(Qm({},m),h),v=g.bottom;g.bottom+=r,g=Xwe(g,c,d);var b=e-g.left-g.right,w=t-g.top-g.bottom;return Qm(Qm({brushBottom:v},g),{},{width:Math.max(b,0),height:Math.max(w,0)})}),ySe=de(Fn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),cE=de(fs,hs,(e,t)=>({x:0,y:0,width:e,height:t})),xSe=x.createContext(null),mr=()=>x.useContext(xSe)!=null,$v=e=>e.brush,qv=de([$v,Fn,OG],(e,t,n)=>({height:e.height,x:Be(e.x)?e.x:t.left,y:Be(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:Be(e.width)?e.width:t.width})),wk={},Sk={},jk={},Z6;function bSe(){return Z6||(Z6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:a,edges:i}={}){let s,l=null;const c=i!=null&&i.includes("leading"),d=i==null||i.includes("trailing"),h=()=>{l!==null&&(n.apply(s,l),s=void 0,l=null)},m=()=>{d&&h(),w()};let g=null;const v=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,m()},r)},b=()=>{g!==null&&(clearTimeout(g),g=null)},w=()=>{b(),s=void 0,l=null},S=()=>{h()},j=function(...k){if(a!=null&&a.aborted)return;s=this,l=k;const _=g==null;v(),c&&_&&h()};return j.schedule=v,j.cancel=w,j.flush=S,a==null||a.addEventListener("abort",w,{once:!0}),j}e.debounce=t})(jk)),jk}var Q6;function wSe(){return Q6||(Q6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bSe();function n(r,a=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:l=!0,maxWait:c}=i,d=Array(2);s&&(d[0]="leading"),l&&(d[1]="trailing");let h,m=null;const g=t.debounce(function(...w){h=r.apply(this,w),m=null},a,{edges:d}),v=function(...w){return c!=null&&(m===null&&(m=Date.now()),Date.now()-m>=c)?(h=r.apply(this,w),m=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,w),h)},b=()=>(g.flush(),h);return v.cancel=g.cancel,v.flush=b,v}e.debounce=n})(Sk)),Sk}var J6;function SSe(){return J6||(J6=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wSe();function n(r,a=0,i={}){const{leading:s=!0,trailing:l=!0}=i;return t.debounce(r,a,{leading:s,maxWait:a,trailing:l})}e.throttle=n})(wk)),wk}var _k,e$;function jSe(){return e$||(e$=1,_k=SSe().throttle),_k}var _Se=jSe();const kSe=ea(_Se);var ag=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))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,()=>a[s++]))}},ii={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},DG=(e,t,n)=>{var{width:r=ii.width,height:a=ii.height,aspect:i,maxHeight:s}=n,l=cl(r)?e:Number(r),c=cl(a)?t:Number(a);return i&&i>0&&(l?c=l/i:c&&(l=c*i),s&&c!=null&&c>s&&(c=s)),{calculatedWidth:l,calculatedHeight:c}},CSe={width:0,height:0,overflow:"visible"},NSe={width:0,overflowX:"visible"},ESe={height:0,overflowY:"visible"},ASe={},TSe=e=>{var{width:t,height:n}=e,r=cl(t),a=cl(n);return r&&a?CSe:r?NSe:a?ESe:ASe};function OSe(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return a===void 0&&i===void 0?(a=ii.width,i=ii.height):a===void 0?a=r&&r>0?void 0:ii.width:i===void 0&&(i=r&&r>0?void 0:ii.height),{width:a,height:i}}function ZC(){return ZC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZC.apply(null,arguments)}function t$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function n$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t$(Object(n),!0).forEach(function(r){MSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MSe(e,t,n){return(t=PSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PSe(e){var t=DSe(e,"string");return typeof t=="symbol"?t:t+""}function DSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RG=x.createContext(ii.initialDimension);function RSe(e){return hi(e.width)&&hi(e.height)}function IG(e){var{children:t,width:n,height:r}=e,a=x.useMemo(()=>({width:n,height:r}),[n,r]);return RSe(a)?x.createElement(RG.Provider,{value:a},t):null}var dE=()=>x.useContext(RG),ISe=x.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=ii.initialDimension,width:a,height:i,minWidth:s=ii.minWidth,minHeight:l,maxHeight:c,children:d,debounce:h=ii.debounce,id:m,className:g,onResize:v,style:b={}}=e,w=x.useRef(null),S=x.useRef();S.current=v,x.useImperativeHandle(t,()=>w.current);var[j,k]=x.useState({containerWidth:r.width,containerHeight:r.height}),_=x.useCallback((D,P)=>{k(M=>{var z=Math.round(D),L=Math.round(P);return M.containerWidth===z&&M.containerHeight===L?M:{containerWidth:z,containerHeight:L}})},[]);x.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return kl;var D=L=>{var F,R=L[0];if(R!=null){var{width:I,height:q}=R.contentRect;_(I,q),(F=S.current)===null||F===void 0||F.call(S,I,q)}};h>0&&(D=kSe(D,h,{trailing:!0,leading:!1}));var P=new ResizeObserver(D),{width:M,height:z}=w.current.getBoundingClientRect();return _(M,z),P.observe(w.current),()=>{P.disconnect()}},[_,h]);var{containerWidth:E,containerHeight:T}=j;ag(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:A,calculatedHeight:O}=DG(E,T,{width:a,height:i,aspect:n,maxHeight:c});return ag(A!=null&&A>0||O!=null&&O>0,`The width(%s) and height(%s) of chart should be greater than 0,
485
+ please check the style of container, or the props width(%s) and height(%s),
486
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
487
+ height and width.`,A,O,a,i,s,l,n),x.createElement("div",{id:m?"".concat(m):void 0,className:Lt("recharts-responsive-container",g),style:n$(n$({},b),{},{width:a,height:i,minWidth:s,minHeight:l,maxHeight:c}),ref:w},x.createElement("div",{style:TSe({width:a,height:i})},x.createElement(IG,{width:A,height:O},d)))}),kk=x.forwardRef((e,t)=>{var n=dE();if(hi(n.width)&&hi(n.height))return e.children;var{width:r,height:a}=OSe({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:s}=DG(void 0,void 0,{width:r,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return Be(i)&&Be(s)?x.createElement(IG,{width:i,height:s},e.children):x.createElement(ISe,ZC({},e,{width:r,height:a,ref:t}))});function fE(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 Bv=()=>{var e,t=mr(),n=Ve(ySe),r=Ve(qv),a=(e=Ve($v))===null||e===void 0?void 0:e.padding;return!t||!r||!a?n:{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}},LSe={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},LG=()=>{var e;return(e=Ve(Fn))!==null&&e!==void 0?e:LSe},zG=()=>Ve(fs),$G=()=>Ve(hs),Rt=e=>e.layout.layoutType,Cl=()=>Ve(Rt),qG=()=>{var e=Cl();if(e==="horizontal"||e==="vertical")return e},BG=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},zSe=()=>{var e=Cl();return e!==void 0},Zf=e=>{var t=Jt(),n=mr(),{width:r,height:a}=e,i=dE(),s=r,l=a;return i&&(s=i.width>0?i.width:r,l=i.height>0?i.height:a),x.useEffect(()=>{!n&&hi(s)&&hi(l)&&t(Uwe({width:s,height:l}))},[t,n,s,l]),null},FG=Symbol.for("immer-nothing"),r$=Symbol.for("immer-draftable"),Jr=Symbol.for("immer-state");function Ma(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var xf=Object.getPrototypeOf;function Zu(e){return!!e&&!!e[Jr]}function fl(e){var t;return e?HG(e)||Array.isArray(e)||!!e[r$]||!!((t=e.constructor)!=null&&t[r$])||Qf(e)||Hv(e):!1}var $Se=Object.prototype.constructor.toString(),a$=new WeakMap;function HG(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=a$.get(n);return r===void 0&&(r=Function.toString.call(n),a$.set(n,r)),r===$Se}function ig(e,t,n=!0){Fv(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Fv(e){const t=e[Jr];return t?t.type_:Array.isArray(e)?1:Qf(e)?2:Hv(e)?3:0}function QC(e,t){return Fv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function UG(e,t,n){const r=Fv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function qSe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qf(e){return e instanceof Map}function Hv(e){return e instanceof Set}function Vo(e){return e.copy_||e.base_}function JC(e,t){if(Qf(e))return new Map(e);if(Hv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=HG(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Jr];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],l=r[s];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[s]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[s]})}return Object.create(xf(e),r)}else{const r=xf(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function hE(e,t=!1){return Uv(e)||Zu(e)||!fl(e)||(Fv(e)>1&&Object.defineProperties(e,{set:Jm,add:Jm,clear:Jm,delete:Jm}),Object.freeze(e),t&&Object.values(e).forEach(n=>hE(n,!0))),e}function BSe(){Ma(2)}var Jm={value:BSe};function Uv(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var FSe={};function hl(e){const t=FSe[e];return t||Ma(0,e),t}var bf;function GG(){return bf}function HSe(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function i$(e,t){t&&(hl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eN(e){tN(e),e.drafts_.forEach(USe),e.drafts_=null}function tN(e){e===bf&&(bf=e.parent_)}function s$(e){return bf=HSe(bf,e)}function USe(e){const t=e[Jr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function o$(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Jr].modified_&&(eN(t),Ma(4)),fl(e)&&(e=sg(t,e),t.parent_||og(t,e)),t.patches_&&hl("Patches").generateReplacementPatches_(n[Jr].base_,e,t.patches_,t.inversePatches_)):e=sg(t,n,[]),eN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==FG?e:void 0}function sg(e,t,n){if(Uv(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[Jr];if(!a)return ig(t,(i,s)=>l$(e,a,t,i,s,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return og(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,l=!1;a.type_===3&&(s=new Set(i),i.clear(),l=!0),ig(s,(c,d)=>l$(e,a,i,c,d,n,l),r),og(e,i,!1),n&&e.patches_&&hl("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function l$(e,t,n,r,a,i,s){if(a==null||typeof a!="object"&&!s)return;const l=Uv(a);if(!(l&&!s)){if(Zu(a)){const c=i&&t&&t.type_!==3&&!QC(t.assigned_,r)?i.concat(r):void 0,d=sg(e,a,c);if(UG(n,r,d),Zu(d))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(fl(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===a&&l)return;sg(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Qf(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&og(e,a)}}}function og(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hE(t,n)}function GSe(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:GG(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=mE;n&&(a=[r],i=wf);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return r.draft_=l,r.revoke_=s,l}var mE={get(e,t){if(t===Jr)return e;const n=Vo(e);if(!QC(n,t))return VSe(e,n,t);const r=n[t];return e.finalized_||!fl(r)?r:r===Ck(e.base_,t)?(Nk(e),e.copy_[t]=rN(r,e)):r},has(e,t){return t in Vo(e)},ownKeys(e){return Reflect.ownKeys(Vo(e))},set(e,t,n){const r=VG(Vo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=Ck(Vo(e),t),i=a==null?void 0:a[Jr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(qSe(n,a)&&(n!==void 0||QC(e.base_,t)))return!0;Nk(e),nN(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ck(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Nk(e),nN(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ma(11)},getPrototypeOf(e){return xf(e.base_)},setPrototypeOf(){Ma(12)}},wf={};ig(mE,(e,t)=>{wf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wf.deleteProperty=function(e,t){return wf.set.call(this,e,t,void 0)};wf.set=function(e,t,n){return mE.set.call(this,e[0],t,n,e[0])};function Ck(e,t){const n=e[Jr];return(n?Vo(n):e)[t]}function VSe(e,t,n){var a;const r=VG(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function VG(e,t){if(!(t in e))return;let n=xf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=xf(n)}}function nN(e){e.modified_||(e.modified_=!0,e.parent_&&nN(e.parent_))}function Nk(e){e.copy_||(e.copy_=JC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var KSe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(c=i,...d){return s.produce(c,h=>n.call(this,h,...d))}}typeof n!="function"&&Ma(6),r!==void 0&&typeof r!="function"&&Ma(7);let a;if(fl(t)){const i=s$(this),s=rN(t,void 0);let l=!0;try{a=n(s),l=!1}finally{l?eN(i):tN(i)}return i$(i,r),o$(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===FG&&(a=void 0),this.autoFreeze_&&hE(a,!0),r){const i=[],s=[];hl("Patches").generateReplacementPatches_(t,a,i,s),r(i,s)}return a}else Ma(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...l)=>this.produceWithPatches(s,c=>t(c,...l));let r,a;return[this.produce(t,n,(s,l)=>{r=s,a=l}),r,a]},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){fl(e)||Ma(8),Zu(e)&&(e=YSe(e));const t=s$(this),n=rN(e,void 0);return n[Jr].isManual_=!0,tN(t),n}finishDraft(e,t){const n=e&&e[Jr];(!n||!n.isManual_)&&Ma(9);const{scope_:r}=n;return i$(r,t),o$(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=hl("Patches").applyPatches_;return Zu(e)?r(e,t):this.produce(e,a=>r(a,t))}};function rN(e,t){const n=Qf(e)?hl("MapSet").proxyMap_(e,t):Hv(e)?hl("MapSet").proxySet_(e,t):GSe(e,t);return(t?t.scope_:GG()).drafts_.push(n),n}function YSe(e){return Zu(e)||Ma(10,e),KG(e)}function KG(e){if(!fl(e)||Uv(e))return e;const t=e[Jr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=JC(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=JC(e,!0);return ig(n,(a,i)=>{UG(n,a,KG(i))},r),t&&(t.finalized_=!1),n}var WSe=new KSe;WSe.produce;var XSe={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},YG=hr({name:"legend",initialState:XSe,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:nn()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ma(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:nn()},removeLegendPayload:{reducer(e,t){var n=ma(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:nn()}}}),{setLegendSize:o3e,setLegendSettings:l3e,addLegendPayload:WG,replaceLegendPayload:XG,removeLegendPayload:ZG}=YG.actions,ZSe=YG.reducer,Ek={exports:{}},Ak={};/**
488
+ * @license React
489
+ * use-sync-external-store-with-selector.production.js
490
+ *
491
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
492
+ *
493
+ * This source code is licensed under the MIT license found in the
494
+ * LICENSE file in the root directory of this source tree.
495
+ */var u$;function QSe(){if(u$)return Ak;u$=1;var e=rc();function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Ak.useSyncExternalStoreWithSelector=function(c,d,h,m,g){var v=a(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=s(function(){function S(T){if(!j){if(j=!0,k=T,T=m(T),g!==void 0&&b.hasValue){var A=b.value;if(g(A,T))return _=A}return _=T}if(A=_,n(k,T))return A;var O=m(T);return g!==void 0&&g(A,O)?(k=T,A):(k=T,_=O)}var j=!1,k,_,E=h===void 0?null:h;return[function(){return S(d())},E===null?void 0:function(){return S(E())}]},[d,h,m,g]);var w=r(c,v[0],v[1]);return i(function(){b.hasValue=!0,b.value=w},[w]),l(w),w},Ak}var c$;function JSe(){return c$||(c$=1,Ek.exports=QSe()),Ek.exports}JSe();function eje(e){e()}function tje(){let e=null,t=null;return{clear(){e=null,t=null},notify(){eje(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!r||e===null||(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var d$={notify(){},get:()=>[]};function nje(e,t){let n,r=d$,a=0,i=!1;function s(w){h();const S=r.subscribe(w);let j=!1;return()=>{j||(j=!0,S(),m())}}function l(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function d(){return i}function h(){a++,n||(n=e.subscribe(c),r=tje())}function m(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=d$)}function g(){i||(i=!0,h())}function v(){i&&(i=!1,m())}const b={addNestedSub:s,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:d,trySubscribe:g,tryUnsubscribe:v,getListeners:()=>r};return b}var rje=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",aje=rje(),ije=()=>typeof navigator<"u"&&navigator.product==="ReactNative",sje=ije(),oje=()=>aje||sje?x.useLayoutEffect:x.useEffect,lje=oje();function f$(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function uje(e,t){if(f$(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!f$(e[n[a]],t[n[a]]))return!1;return!0}var Tk=Symbol.for("react-redux-context"),Ok=typeof globalThis<"u"?globalThis:{};function cje(){if(!x.createContext)return{};const e=Ok[Tk]??(Ok[Tk]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var dje=cje();function fje(e){const{children:t,context:n,serverState:r,store:a}=e,i=x.useMemo(()=>{const c=nje(a);return{store:a,subscription:c,getServerState:r?()=>r:void 0}},[a,r]),s=x.useMemo(()=>a.getState(),[a]);lje(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==a.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,s]);const l=n||dje;return x.createElement(l.Provider,{value:i},t)}var hje=fje,mje=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function pje(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Jf(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(mje.has(r)){if(e[r]==null&&t[r]==null)continue;if(!uje(e[r],t[r]))return!1}else if(!pje(e[r],t[r]))return!1;return!0}function aN(){return aN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aN.apply(null,arguments)}function h$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h$(Object(n),!0).forEach(function(r){gje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gje(e,t,n){return(t=vje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vje(e){var t=yje(e,"string");return typeof t=="symbol"?t:t+""}function yje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xje(e){return Array.isArray(e)&&fi(e[0])&&fi(e[1])?e.join(" ~ "):e}var xu={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 bje(e,t){return t==null?e:Nv(e,t)}var wje=e=>{var{separator:t=xu.separator,contentStyle:n,itemStyle:r,labelStyle:a=xu.labelStyle,payload:i,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:d,label:h,labelFormatter:m,accessibilityLayer:g=xu.accessibilityLayer}=e,v=()=>{if(i&&i.length){var T={padding:0,margin:0},A=bje(i,l),O=A.map((D,P)=>{if(!D||D.type==="none")return null;var M=D.formatter||s||xje,{value:z,name:L}=D,F=z,R=L;if(M){var I=M(z,L,D,P,i);if(Array.isArray(I))[F,R]=I;else if(I!=null)F=I;else return null}var q=Sd(Sd({},xu.itemStyle),{},{color:D.color||xu.itemStyle.color},r);return x.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(P),style:q},fi(R)?x.createElement("span",{className:"recharts-tooltip-item-name"},R):null,fi(R)?x.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,x.createElement("span",{className:"recharts-tooltip-item-value"},F),x.createElement("span",{className:"recharts-tooltip-item-unit"},D.unit||""))});return x.createElement("ul",{className:"recharts-tooltip-item-list",style:T},O)}return null},b=Sd(Sd({},xu.contentStyle),n),w=Sd({margin:0},a),S=!cn(h),j=S?h:"",k=Lt("recharts-default-tooltip",c),_=Lt("recharts-tooltip-label",d);S&&m&&i!==void 0&&i!==null&&(j=m(h,i));var E=g?{role:"status","aria-live":"assertive"}:{};return x.createElement("div",aN({className:k,style:b},E),x.createElement("p",{className:_,style:w},x.isValidElement(j)?j:"".concat(j)),v())},jd="recharts-tooltip-wrapper",Sje={visibility:"hidden"};function jje(e){var{coordinate:t,translateX:n,translateY:r}=e;return Lt(jd,{["".concat(jd,"-right")]:Be(n)&&t&&Be(t.x)&&n>=t.x,["".concat(jd,"-left")]:Be(n)&&t&&Be(t.x)&&n<t.x,["".concat(jd,"-bottom")]:Be(r)&&t&&Be(t.y)&&r>=t.y,["".concat(jd,"-top")]:Be(r)&&t&&Be(t.y)&&r<t.y})}function m$(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:a,position:i,reverseDirection:s,tooltipDimension:l,viewBox:c,viewBoxDimension:d}=e;if(i&&Be(i[r]))return i[r];var h=n[r]-l-(a>0?a:0),m=n[r]+a;if(t[r])return s[r]?h:m;var g=c[r];if(g==null)return 0;if(s[r]){var v=h,b=g;return v<b?Math.max(m,g):Math.max(h,g)}if(d==null)return 0;var w=m+l,S=g+d;return w>S?Math.max(h,g):Math.max(m,g)}function _je(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function kje(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:a,position:i,reverseDirection:s,tooltipBox:l,useTranslate3d:c,viewBox:d}=e,h,m,g;return l.height>0&&l.width>0&&n?(m=m$({allowEscapeViewBox:t,coordinate:n,key:"x",offset:a,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:d,viewBoxDimension:d.width}),g=m$({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:d,viewBoxDimension:d.height}),h=_je({translateX:m,translateY:g,useTranslate3d:c})):h=Sje,{cssProperties:h,cssClasses:jje({translateX:m,translateY:g,coordinate:n})}}var Cje=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),eh={isSsr:Cje()};function QG(){var[e,t]=x.useState(()=>eh.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return x.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function p$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p$(Object(n),!0).forEach(function(r){Nje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nje(e,t,n){return(t=Eje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eje(e){var t=Aje(e,"string");return typeof t=="symbol"?t:t+""}function Aje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tje(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Oje(e){var t,n,r,a,i,s,l=QG(),[c,d]=x.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));x.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var S,j,k,_;d({dismissed:!0,dismissedAtCoordinate:{x:(S=(j=e.coordinate)===null||j===void 0?void 0:j.x)!==null&&S!==void 0?S:0,y:(k=(_=e.coordinate)===null||_===void 0?void 0:_.y)!==null&&k!==void 0?k:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),c.dismissed&&(((r=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0)!==c.dismissedAtCoordinate.x||((i=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)!==c.dismissedAtCoordinate.y)&&d(bu(bu({},c),{},{dismissed:!1}));var{cssClasses:h,cssProperties:m}=kje({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?{}:bu(bu({transition:Tje({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},m),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),v=bu(bu({},g),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return x.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:v,ref:e.innerRef},e.children)}var Mje=x.memo(Oje),JG=()=>{var e;return(e=Ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function iN(){return iN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iN.apply(null,arguments)}function g$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function v$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g$(Object(n),!0).forEach(function(r){Pje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pje(e,t,n){return(t=Dje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dje(e){var t=Rje(e,"string");return typeof t=="symbol"?t:t+""}function Rje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y$={curveBasisClosed:wbe,curveBasisOpen:Sbe,curveBasis:bbe,curveBumpX:sbe,curveBumpY:obe,curveLinearClosed:jbe,curveLinear:_v,curveMonotoneX:_be,curveMonotoneY:kbe,curveNatural:Cbe,curveStep:Nbe,curveStepAfter:Abe,curveStepBefore:Ebe},lg=e=>Nt(e.x)&&Nt(e.y),x$=e=>e.base!=null&&lg(e.base)&&lg(e),_d=e=>e.x,kd=e=>e.y,Ije=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Kf(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=y$["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return y$[n]||_v},b$={connectNulls:!1,type:"linear"},Lje=e=>{var{type:t=b$.type,points:n=[],baseLine:r,layout:a,connectNulls:i=b$.connectNulls}=e,s=Ije(t,a),l=i?n.filter(lg):n;if(Array.isArray(r)){var c,d=n.map((b,w)=>v$(v$({},b),{},{base:r[w]}));a==="vertical"?c=Vm().y(kd).x1(_d).x0(b=>b.base.x):c=Vm().x(_d).y1(kd).y0(b=>b.base.y);var h=c.defined(x$).curve(s),m=i?d.filter(x$):d;return h(m)}var g;a==="vertical"&&Be(r)?g=Vm().y(kd).x1(_d).x0(r):Be(r)?g=Vm().x(_d).y1(kd).y0(r):g=j7().x(_d).y(kd);var v=g.defined(lg).curve(s);return v(l)},pE=e=>{var{className:t,points:n,path:r,pathRef:a}=e,i=Cl();if((!n||!n.length)&&!r)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},l=n&&n.length?Lje(s):r;return x.createElement("path",iN({},Zr(e),tE(e),{className:Lt("recharts-curve",t),d:l===null?void 0:l,ref:a}))},zje=["x","y","top","left","width","height","className"];function sN(){return sN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sN.apply(null,arguments)}function w$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w$(Object(n),!0).forEach(function(r){qje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qje(e,t,n){return(t=Bje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bje(e){var t=Fje(e,"string");return typeof t=="symbol"?t:t+""}function Fje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hje(e,t){if(e==null)return{};var n,r,a=Uje(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Uje(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Gje=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),Vje=e=>{var{x:t=0,y:n=0,top:r=0,left:a=0,width:i=0,height:s=0,className:l}=e,c=Hje(e,zje),d=$je({x:t,y:n,top:r,left:a,width:i,height:s},c);return!Be(t)||!Be(n)||!Be(i)||!Be(s)||!Be(r)||!Be(a)?null:x.createElement("path",sN({},xr(d),{className:Lt("recharts-cross",l),d:Gje(t,n,i,s,r,a)}))};function Kje(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function S$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function j$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(r){Yje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yje(e,t,n){return(t=Wje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wje(e){var t=Xje(e,"string");return typeof t=="symbol"?t:t+""}function Xje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zje=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),eV=(e,t,n)=>e.map(r=>"".concat(Zje(r)," ").concat(t,"ms ").concat(n)).join(","),Qje=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(a=>r.includes(a))),Sf=(e,t)=>Object.keys(t).reduce((n,r)=>j$(j$({},n),{},{[r]:e(r,t[r])}),{});function _$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(n),!0).forEach(function(r){Jje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jje(e,t,n){return(t=e_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e_e(e){var t=t_e(e,"string");return typeof t=="symbol"?t:t+""}function t_e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ug=(e,t,n)=>e+(t-e)*n,oN=e=>{var{from:t,to:n}=e;return t!==n},tV=(e,t,n)=>{var r=Sf((a,i)=>{if(oN(i)){var[s,l]=e(i.from,i.to,i.velocity);return qn(qn({},i),{},{from:s,velocity:l})}return i},t);return n<1?Sf((a,i)=>oN(i)&&r[a]!=null?qn(qn({},i),{},{velocity:ug(i.velocity,r[a].velocity,n),from:ug(i.from,r[a].from,n)}):i,t):tV(e,r,n-1)};function n_e(e,t,n,r,a,i){var s,l=r.reduce((g,v)=>qn(qn({},g),{},{[v]:{from:e[v],velocity:0,to:t[v]}}),{}),c=()=>Sf((g,v)=>v.from,l),d=()=>!Object.values(l).filter(oN).length,h=null,m=g=>{s||(s=g);var v=g-s,b=v/n.dt;l=tV(n,l,b),a(qn(qn(qn({},e),t),c())),s=g,d()||(h=i.setTimeout(m))};return()=>(h=i.setTimeout(m),()=>{var g;(g=h)===null||g===void 0||g()})}function r_e(e,t,n,r,a,i,s){var l=null,c=a.reduce((m,g)=>{var v=e[g],b=t[g];return v==null||b==null?m:qn(qn({},m),{},{[g]:[v,b]})},{}),d,h=m=>{d||(d=m);var g=(m-d)/r,v=Sf((w,S)=>ug(...S,n(g)),c);if(i(qn(qn(qn({},e),t),v)),g<1)l=s.setTimeout(h);else{var b=Sf((w,S)=>ug(...S,n(1)),c);i(qn(qn(qn({},e),t),b))}};return()=>(l=s.setTimeout(h),()=>{var m;(m=l)===null||m===void 0||m()})}const a_e=(e,t,n,r,a,i)=>{var s=Qje(e,t);return n==null?()=>(a(qn(qn({},e),t)),()=>{}):n.isStepper===!0?n_e(e,t,n,s,a,i):r_e(e,t,n,r,s,a,i)};var cg=1e-4,nV=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],rV=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),k$=(e,t)=>n=>{var r=nV(e,t);return rV(r,n)},i_e=(e,t)=>n=>{var r=nV(e,t),a=[...r.map((i,s)=>i*s).slice(1),0];return rV(a,n)},s_e=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var a=r.map(i=>parseFloat(i));return[a[0],a[1],a[2],a[3]]},o_e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];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 a=s_e(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},l_e=(e,t,n,r)=>{var a=k$(e,n),i=k$(t,r),s=i_e(e,n),l=d=>d>1?1:d<0?0:d,c=d=>{for(var h=d>1?1:d,m=h,g=0;g<8;++g){var v=a(m)-h,b=s(m);if(Math.abs(v-h)<cg||b<cg)return i(m);m=l(m-v/b)}return i(m)};return c.isStepper=!1,c},C$=function(){return l_e(...o_e(...arguments))},u_e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:a=17}=t,i=(s,l,c)=>{var d=-(s-l)*n,h=c*r,m=c+(d-h)*a/1e3,g=c*a/1e3+s;return Math.abs(g-l)<cg&&Math.abs(m)<cg?[l,0]:[g,m]};return i.isStepper=!0,i.dt=a,i},c_e=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return C$(e);case"spring":return u_e();default:if(e.split("(")[0]==="cubic-bezier")return C$(e)}return typeof e=="function"?e:null};function d_e(e){var t,n=()=>null,r=!1,a=null,i=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var l=s,[c,...d]=l;if(typeof c=="number"){a=e.setTimeout(i.bind(null,d),c);return}i(c),a=e.setTimeout(i.bind(null,d));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,a&&(a(),a=null),i(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class f_e{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),a=null,i=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(i))};return a=requestAnimationFrame(i),()=>{a!=null&&cancelAnimationFrame(a)}}}function h_e(){return d_e(new f_e)}var m_e=x.createContext(h_e);function p_e(e,t){var n=x.useContext(m_e);return x.useMemo(()=>t??n(e),[e,t,n])}var g_e={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},N$={t:0},Mk={t:1};function th(e){var t=Xn(e,g_e),{isActive:n,canBegin:r,duration:a,easing:i,begin:s,onAnimationEnd:l,onAnimationStart:c,children:d}=t,h=QG(),m=n==="auto"?!eh.isSsr&&!h:n,g=p_e(t.animationId,t.animationManager),[v,b]=x.useState(m?N$:Mk),w=x.useRef(null);return x.useEffect(()=>{m||b(Mk)},[m]),x.useEffect(()=>{if(!m||!r)return kl;var S=a_e(N$,Mk,c_e(i),a,b,g.getTimeoutController()),j=()=>{w.current=S()};return g.start([c,s,j,a,l]),()=>{g.stop(),w.current&&w.current(),l()}},[m,r,a,i,s,c,l,g]),d(v.t)}function nh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=x.useRef(pf(t)),r=x.useRef(e);return r.current!==e&&(n.current=pf(t),r.current=e),n.current}var v_e=["radius"],y_e=["radius"],E$,A$,T$,O$,M$,P$,D$,R$,I$,L$;function z$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z$(Object(n),!0).forEach(function(r){x_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function x_e(e,t,n){return(t=b_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b_e(e){var t=w_e(e,"string");return typeof t=="symbol"?t:t+""}function w_e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dg(){return dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dg.apply(null,arguments)}function q$(e,t){if(e==null)return{};var n,r,a=S_e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function S_e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ja(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var B$=(e,t,n,r,a)=>{var i=Js(n),s=Js(r),l=Math.min(Math.abs(i)/2,Math.abs(s)/2),c=s>=0?1:-1,d=i>=0?1:-1,h=s>=0&&i>=0||s<0&&i<0?1:0,m;if(l>0&&Array.isArray(a)){for(var g=[0,0,0,0],v=0,b=4;v<b;v++){var w,S=(w=a[v])!==null&&w!==void 0?w:0;g[v]=S>l?l:S}m=wn(E$||(E$=Ja(["M",",",""])),e,t+c*g[0]),g[0]>0&&(m+=wn(A$||(A$=Ja(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+d*g[0],t)),m+=wn(T$||(T$=Ja(["L ",",",""])),e+n-d*g[1],t),g[1]>0&&(m+=wn(O$||(O$=Ja(["A ",",",",0,0,",`,
496
+ `,",",""])),g[1],g[1],h,e+n,t+c*g[1])),m+=wn(M$||(M$=Ja(["L ",",",""])),e+n,t+r-c*g[2]),g[2]>0&&(m+=wn(P$||(P$=Ja(["A ",",",",0,0,",`,
497
+ `,",",""])),g[2],g[2],h,e+n-d*g[2],t+r)),m+=wn(D$||(D$=Ja(["L ",",",""])),e+d*g[3],t+r),g[3]>0&&(m+=wn(R$||(R$=Ja(["A ",",",",0,0,",`,
498
+ `,",",""])),g[3],g[3],h,e,t+r-c*g[3])),m+="Z"}else if(l>0&&a===+a&&a>0){var j=Math.min(l,a);m=wn(I$||(I$=Ja(["M ",",",`
499
+ A `,",",",0,0,",",",",",`
500
+ L `,",",`
501
+ A `,",",",0,0,",",",",",`
502
+ L `,",",`
503
+ A `,",",",0,0,",",",",",`
504
+ L `,",",`
505
+ A `,",",",0,0,",",",","," Z"])),e,t+c*j,j,j,h,e+d*j,t,e+n-d*j,t,j,j,h,e+n,t+c*j,e+n,t+r-c*j,j,j,h,e+n-d*j,t+r,e+d*j,t+r,j,j,h,e,t+r-c*j)}else m=wn(L$||(L$=Ja(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return m},F$={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aV=e=>{var t=Xn(e,F$),n=x.useRef(null),[r,a]=x.useState(-1);x.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var G=n.current.getTotalLength();G&&a(G)}catch{}},[]);var{x:i,y:s,width:l,height:c,radius:d,className:h}=t,{animationEasing:m,animationDuration:g,animationBegin:v,isAnimationActive:b,isUpdateAnimationActive:w}=t,S=x.useRef(l),j=x.useRef(c),k=x.useRef(i),_=x.useRef(s),E=x.useMemo(()=>({x:i,y:s,width:l,height:c,radius:d}),[i,s,l,c,d]),T=nh(E,"rectangle-");if(i!==+i||s!==+s||l!==+l||c!==+c||l===0||c===0)return null;var A=Lt("recharts-rectangle",h);if(!w){var O=xr(t),{radius:D}=O,P=q$(O,v_e);return x.createElement("path",dg({},P,{x:Js(i),y:Js(s),width:Js(l),height:Js(c),radius:typeof d=="number"?d:void 0,className:A,d:B$(i,s,l,c,d)}))}var M=S.current,z=j.current,L=k.current,F=_.current,R="0px ".concat(r===-1?1:r,"px"),I="".concat(r,"px ").concat(r,"px"),q=eV(["strokeDasharray"],g,typeof m=="string"?m:F$.animationEasing);return x.createElement(th,{animationId:T,key:T,canBegin:r>0,duration:g,easing:m,isActive:w,begin:v},G=>{var Y=sn(M,l,G),K=sn(z,c,G),B=sn(L,i,G),U=sn(F,s,G);n.current&&(S.current=Y,j.current=K,k.current=B,_.current=U);var X;b?G>0?X={transition:q,strokeDasharray:I}:X={strokeDasharray:R}:X={strokeDasharray:I};var H=xr(t),{radius:W}=H,Q=q$(H,y_e);return x.createElement("path",dg({},Q,{radius:typeof d=="number"?d:void 0,className:A,d:B$(B,U,Y,K,d),ref:n,style:$$($$({},X),t.style)}))})};function H$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function U$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(n),!0).forEach(function(r){j_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j_e(e,t,n){return(t=__e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function __e(e){var t=k_e(e,"string");return typeof t=="symbol"?t:t+""}function k_e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fg=Math.PI/180,C_e=e=>e*180/Math.PI,Mn=(e,t,n,r)=>({x:e+Math.cos(-fg*r)*n,y:t+Math.sin(-fg*r)*n}),iV=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},N_e=(e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)},E_e=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=N_e({x:n,y:r},{x:a,y:i});if(s<=0)return{radius:s,angle:0};var l=(n-a)/s,c=Math.acos(l);return r>i&&(c=2*Math.PI-c),{radius:s,angle:C_e(c),angleInRadian:c}},A_e=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-i*360,endAngle:n-i*360}},T_e=(e,t)=>{var{startAngle:n,endAngle:r}=t,a=Math.floor(n/360),i=Math.floor(r/360),s=Math.min(a,i);return e+s*360},O_e=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=E_e({x:n,y:r},t),{innerRadius:s,outerRadius:l}=t;if(a<s||a>l||a===0)return null;var{startAngle:c,endAngle:d}=A_e(t),h=i,m;if(c<=d){for(;h>d;)h-=360;for(;h<c;)h+=360;m=h>=c&&h<=d}else{for(;h>c;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=c}return m?U$(U$({},t),{},{radius:a,angle:T_e(h,t)}):null};function sV(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e,s=Mn(t,n,r,a),l=Mn(t,n,r,i);return{points:[s,l],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}var G$,V$,K$,Y$,W$,X$,Z$;function lN(){return lN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lN.apply(null,arguments)}function Wo(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var M_e=(e,t)=>{var n=Wn(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},ep=e=>{var{cx:t,cy:n,radius:r,angle:a,sign:i,isExternal:s,cornerRadius:l,cornerIsExternal:c}=e,d=l*(s?1:-1)+r,h=Math.asin(l/d)/fg,m=c?a:a+i*h,g=Mn(t,n,d,m),v=Mn(t,n,r,m),b=c?a-i*h:a,w=Mn(t,n,d*Math.cos(h*fg),b);return{center:g,circleTangency:v,lineTangency:w,theta:h}},oV=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,l=M_e(i,s),c=i+l,d=Mn(t,n,a,i),h=Mn(t,n,a,c),m=wn(G$||(G$=Wo(["M ",",",`
506
+ A `,",",`,0,
507
+ `,",",`,
508
+ `,",",`
509
+ `])),d.x,d.y,a,a,+(Math.abs(l)>180),+(i>c),h.x,h.y);if(r>0){var g=Mn(t,n,r,i),v=Mn(t,n,r,c);m+=wn(V$||(V$=Wo(["L ",",",`
510
+ A `,",",`,0,
511
+ `,",",`,
512
+ `,","," Z"])),v.x,v.y,r,r,+(Math.abs(l)>180),+(i<=c),g.x,g.y)}else m+=wn(K$||(K$=Wo(["L ",","," Z"])),t,n);return m},P_e=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:d}=e,h=Wn(d-c),{circleTangency:m,lineTangency:g,theta:v}=ep({cx:t,cy:n,radius:a,angle:c,sign:h,cornerRadius:i,cornerIsExternal:l}),{circleTangency:b,lineTangency:w,theta:S}=ep({cx:t,cy:n,radius:a,angle:d,sign:-h,cornerRadius:i,cornerIsExternal:l}),j=l?Math.abs(c-d):Math.abs(c-d)-v-S;if(j<0)return s?wn(Y$||(Y$=Wo(["M ",",",`
513
+ a`,",",",0,0,1,",`,0
514
+ a`,",",",0,0,1,",`,0
515
+ `])),g.x,g.y,i,i,i*2,i,i,-i*2):oV({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:c,endAngle:d});var k=wn(W$||(W$=Wo(["M ",",",`
516
+ A`,",",",0,0,",",",",",`
517
+ A`,",",",0,",",",",",",",`
518
+ A`,",",",0,0,",",",",",`
519
+ `])),g.x,g.y,i,i,+(h<0),m.x,m.y,a,a,+(j>180),+(h<0),b.x,b.y,i,i,+(h<0),w.x,w.y);if(r>0){var{circleTangency:_,lineTangency:E,theta:T}=ep({cx:t,cy:n,radius:r,angle:c,sign:h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),{circleTangency:A,lineTangency:O,theta:D}=ep({cx:t,cy:n,radius:r,angle:d,sign:-h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),P=l?Math.abs(c-d):Math.abs(c-d)-T-D;if(P<0&&i===0)return"".concat(k,"L").concat(t,",").concat(n,"Z");k+=wn(X$||(X$=Wo(["L",",",`
520
+ A`,",",",0,0,",",",",",`
521
+ A`,",",",0,",",",",",",",`
522
+ A`,",",",0,0,",",",",","Z"])),O.x,O.y,i,i,+(h<0),A.x,A.y,r,r,+(P>180),+(h>0),_.x,_.y,i,i,+(h<0),E.x,E.y)}else k+=wn(Z$||(Z$=Wo(["L",",","Z"])),t,n);return k},D_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},lV=e=>{var t=Xn(e,D_e),{cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:h,className:m}=t;if(i<a||d===h)return null;var g=Lt("recharts-sector",m),v=i-a,b=dr(s,v,0,!0),w;return b>0&&Math.abs(d-h)<360?w=P_e({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(b,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:h}):w=oV({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:d,endAngle:h}),x.createElement("path",lN({},xr(t),{className:g,d:w}))};function R_e(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if($7(t)){if(e==="centric"){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:l}=t,c=Mn(r,a,i,l),d=Mn(r,a,s,l);return[{x:c.x,y:c.y},{x:d.x,y:d.y}]}return sV(t)}}var Pk={},Dk={},Rk={},Q$;function I_e(){return Q$||(Q$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X7();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Rk)),Rk}var J$;function L_e(){return J$||(J$=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I_e();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Dk)),Dk}var eq;function z_e(){return eq||(eq=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Z7(),n=L_e();function r(a,i,s){s&&typeof s!="number"&&t.isIterateeCall(a,i,s)&&(i=s=void 0),a=n.toFinite(a),i===void 0?(i=a,a=0):i=n.toFinite(i),s=s===void 0?a<i?1:-1:n.toFinite(s);const l=Math.max(Math.ceil((i-a)/(s||1)),0),c=new Array(l);for(let d=0;d<l;d++)c[d]=a,a+=s;return c}e.range=r})(Pk)),Pk}var Ik,tq;function $_e(){return tq||(tq=1,Ik=z_e().range),Ik}var q_e=$_e();const uV=ea(q_e);var Ha=e=>e.chartData,rh=de([Ha],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),ah=(e,t,n,r)=>r?rh(e):Ha(e),B_e=(e,t,n)=>n?rh(e):Ha(e),F_e=de([ah],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]}),H_e=de([rh],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]}),U_e=de([Ha],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return t!=null?t.slice(n,r+1):[]});function ui(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Nt(t)&&Nt(n))return!0}return!1}function nq(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function cV(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,a,i;if(Nt(n))a=n;else if(typeof n=="function")return;if(Nt(r))i=r;else if(typeof r=="function")return;var s=[a,i];if(ui(s))return s}}function G_e(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ui(r))return nq(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[a,i]=e,s,l;if(a==="auto")t!=null&&(s=Math.min(...t));else if(Be(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&K6.test(a)){var c=K6.exec(a);if(c==null||c[1]==null||t==null)s=void 0;else{var d=+c[1];s=t[0]-d}}else s=t==null?void 0:t[0];if(i==="auto")t!=null&&(l=Math.max(...t));else if(Be(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&Y6.test(i)){var h=Y6.exec(i);if(h==null||h[1]==null||t==null)l=void 0;else{var m=+h[1];l=t[1]+m}}else l=t==null?void 0:t[1];var g=[s,l];if(ui(g))return t==null?g:nq(g,t,n)}}}var gc=1e9,V_e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},vE,ln=!0,va="[DecimalError] ",tl=va+"Invalid argument: ",gE=va+"Exponent out of range: ",vc=Math.floor,Ko=Math.pow,K_e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Vr,Yn=1e7,rn=7,dV=9007199254740991,hg=vc(dV/rn),Fe={};Fe.absoluteValue=Fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Fe.comparedTo=Fe.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Fe.decimalPlaces=Fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*rn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Fe.dividedBy=Fe.div=function(e){return Zi(this,new this.constructor(e))};Fe.dividedToIntegerBy=Fe.idiv=function(e){var t=this,n=t.constructor;return Wt(Zi(t,new n(e),0,1),n.precision)};Fe.equals=Fe.eq=function(e){return!this.cmp(e)};Fe.exponent=function(){return Dn(this)};Fe.greaterThan=Fe.gt=function(e){return this.cmp(e)>0};Fe.greaterThanOrEqualTo=Fe.gte=function(e){return this.cmp(e)>=0};Fe.isInteger=Fe.isint=function(){return this.e>this.d.length-2};Fe.isNegative=Fe.isneg=function(){return this.s<0};Fe.isPositive=Fe.ispos=function(){return this.s>0};Fe.isZero=function(){return this.s===0};Fe.lessThan=Fe.lt=function(e){return this.cmp(e)<0};Fe.lessThanOrEqualTo=Fe.lte=function(e){return this.cmp(e)<1};Fe.logarithm=Fe.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vr))throw Error(va+"NaN");if(n.s<1)throw Error(va+(n.s?"NaN":"-Infinity"));return n.eq(Vr)?new r(0):(ln=!1,t=Zi(jf(n,i),jf(e,i),i),ln=!0,Wt(t,a))};Fe.minus=Fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?mV(t,e):fV(t,(e.s=-e.s,e))};Fe.modulo=Fe.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(va+"NaN");return n.s?(ln=!1,t=Zi(n,e,0,1).times(e),ln=!0,n.minus(t)):Wt(new r(n),a)};Fe.naturalExponential=Fe.exp=function(){return hV(this)};Fe.naturalLogarithm=Fe.ln=function(){return jf(this)};Fe.negated=Fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Fe.plus=Fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fV(t,e):mV(t,(e.s=-e.s,e))};Fe.precision=Fe.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tl+e);if(t=Dn(a)+1,r=a.d.length-1,n=r*rn+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Fe.squareRoot=Fe.sqrt=function(){var e,t,n,r,a,i,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(va+"NaN")}for(e=Dn(l),ln=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=si(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=vc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=s=n+3;;)if(i=r,r=i.plus(Zi(l,i,s+2)).times(.5),si(i.d).slice(0,s)===(t=si(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Wt(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;s+=4}return ln=!0,Wt(r,n)};Fe.times=Fe.mul=function(e){var t,n,r,a,i,s,l,c,d,h=this,m=h.constructor,g=h.d,v=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,c=g.length,d=v.length,c<d&&(i=g,g=v,v=i,s=c,c=d,d=s),i=[],s=c+d,r=s;r--;)i.push(0);for(r=d;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+v[r]*g[a-r-1]+t,i[a--]=l%Yn|0,t=l/Yn|0;i[a]=(i[a]+t)%Yn|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,ln?Wt(e,m.precision):e};Fe.toDecimalPlaces=Fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(mi(e,0,gc),t===void 0?t=r.rounding:mi(t,0,8),Wt(n,e+Dn(n)+1,t))};Fe.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=ml(r,!0):(mi(e,0,gc),t===void 0?t=a.rounding:mi(t,0,8),r=Wt(new a(r),e+1,t),n=ml(r,!0,e+1)),n};Fe.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?ml(a):(mi(e,0,gc),t===void 0?t=i.rounding:mi(t,0,8),r=Wt(new i(a),e+Dn(a)+1,t),n=ml(r.abs(),!1,e+Dn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Fe.toInteger=Fe.toint=function(){var e=this,t=e.constructor;return Wt(new t(e),Dn(e)+1,t.rounding)};Fe.toNumber=function(){return+this};Fe.toPower=Fe.pow=function(e){var t,n,r,a,i,s,l=this,c=l.constructor,d=12,h=+(e=new c(e));if(!e.s)return new c(Vr);if(l=new c(l),!l.s){if(e.s<1)throw Error(va+"Infinity");return l}if(l.eq(Vr))return l;if(r=c.precision,e.eq(Vr))return Wt(l,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=l.s,s){if((n=h<0?-h:h)<=dV){for(a=new c(Vr),t=Math.ceil(r/rn+4),ln=!1;n%2&&(a=a.times(l),aq(a.d,t)),n=vc(n/2),n!==0;)l=l.times(l),aq(l.d,t);return ln=!0,e.s<0?new c(Vr).div(a):Wt(a,r)}}else if(i<0)throw Error(va+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,ln=!1,a=e.times(jf(l,r+d)),ln=!0,a=hV(a),a.s=i,a};Fe.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=Dn(a),r=ml(a,n<=i.toExpNeg||n>=i.toExpPos)):(mi(e,1,gc),t===void 0?t=i.rounding:mi(t,0,8),a=Wt(new i(a),e,t),n=Dn(a),r=ml(a,e<=n||n<=i.toExpNeg,e)),r};Fe.toSignificantDigits=Fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(mi(e,1,gc),t===void 0?t=r.rounding:mi(t,0,8)),Wt(new r(n),e,t)};Fe.toString=Fe.valueOf=Fe.val=Fe.toJSON=Fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Dn(e),n=e.constructor;return ml(e,t<=n.toExpNeg||t>=n.toExpPos)};function fV(e,t){var n,r,a,i,s,l,c,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),ln?Wt(t,m):t;if(c=e.d,d=t.d,s=e.e,a=t.e,c=c.slice(),i=s-a,i){for(i<0?(r=c,i=-i,l=d.length):(r=d,a=s,l=c.length),s=Math.ceil(m/rn),l=s>l?s+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=d.length,l-i<0&&(i=l,r=d,d=c,c=r),n=0;i;)n=(c[--i]=c[i]+d[i]+n)/Yn|0,c[i]%=Yn;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,ln?Wt(t,m):t}function mi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tl+e)}function si(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)r=e[t]+"",n=rn-r.length,n&&(i+=Ws(n)),i+=r;s=e[t],r=s+"",n=rn-r.length,n&&(i+=Ws(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var Zi=(function(){function e(r,a){var i,s=0,l=r.length;for(r=r.slice();l--;)i=r[l]*a+s,r[l]=i%Yn|0,s=i/Yn|0;return s&&r.unshift(s),r}function t(r,a,i,s){var l,c;if(i!=s)c=i>s?1:-1;else for(l=c=0;l<i;l++)if(r[l]!=a[l]){c=r[l]>a[l]?1:-1;break}return c}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]<a[i]?1:0,r[i]=s*Yn+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var l,c,d,h,m,g,v,b,w,S,j,k,_,E,T,A,O,D,P=r.constructor,M=r.s==a.s?1:-1,z=r.d,L=a.d;if(!r.s)return new P(r);if(!a.s)throw Error(va+"Division by zero");for(c=r.e-a.e,O=L.length,T=z.length,v=new P(M),b=v.d=[],d=0;L[d]==(z[d]||0);)++d;if(L[d]>(z[d]||0)&&--c,i==null?k=i=P.precision:s?k=i+(Dn(r)-Dn(a))+1:k=i,k<0)return new P(0);if(k=k/rn+2|0,d=0,O==1)for(h=0,L=L[0],k++;(d<T||h)&&k--;d++)_=h*Yn+(z[d]||0),b[d]=_/L|0,h=_%L|0;else{for(h=Yn/(L[0]+1)|0,h>1&&(L=e(L,h),z=e(z,h),O=L.length,T=z.length),E=O,w=z.slice(0,O),S=w.length;S<O;)w[S++]=0;D=L.slice(),D.unshift(0),A=L[0],L[1]>=Yn/2&&++A;do h=0,l=t(L,w,O,S),l<0?(j=w[0],O!=S&&(j=j*Yn+(w[1]||0)),h=j/A|0,h>1?(h>=Yn&&(h=Yn-1),m=e(L,h),g=m.length,S=w.length,l=t(m,w,g,S),l==1&&(h--,n(m,O<g?D:L,g))):(h==0&&(l=h=1),m=L.slice()),g=m.length,g<S&&m.unshift(0),n(w,m,S),l==-1&&(S=w.length,l=t(L,w,O,S),l<1&&(h++,n(w,O<S?D:L,S))),S=w.length):l===0&&(h++,w=[0]),b[d++]=h,l&&w[0]?w[S++]=z[E]||0:(w=[z[E]],S=1);while((E++<T||w[0]!==void 0)&&k--)}return b[0]||b.shift(),v.e=c,Wt(v,s?i+Dn(v)+1:i)}})();function hV(e,t){var n,r,a,i,s,l,c=0,d=0,h=e.constructor,m=h.precision;if(Dn(e)>16)throw Error(gE+Dn(e));if(!e.s)return new h(Vr);for(ln=!1,l=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(r=Math.log(Ko(2,d))/Math.LN10*2+5|0,l+=r,n=a=i=new h(Vr),h.precision=l;;){if(a=Wt(a.times(e),l),n=n.times(++c),s=i.plus(Zi(a,n,l)),si(s.d).slice(0,l)===si(i.d).slice(0,l)){for(;d--;)i=Wt(i.times(i),l);return h.precision=m,t==null?(ln=!0,Wt(i,m)):i}i=s}}function Dn(e){for(var t=e.e*rn,n=e.d[0];n>=10;n/=10)t++;return t}function Lk(e,t,n){if(t>e.LN10.sd())throw ln=!0,n&&(e.precision=n),Error(va+"LN10 precision limit exceeded");return Wt(new e(e.LN10),t)}function Ws(e){for(var t="";e--;)t+="0";return t}function jf(e,t){var n,r,a,i,s,l,c,d,h,m=1,g=10,v=e,b=v.d,w=v.constructor,S=w.precision;if(v.s<1)throw Error(va+(v.s?"NaN":"-Infinity"));if(v.eq(Vr))return new w(0);if(t==null?(ln=!1,d=S):d=t,v.eq(10))return t==null&&(ln=!0),Lk(w,d);if(d+=g,w.precision=d,n=si(b),r=n.charAt(0),i=Dn(v),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=si(v.d),r=n.charAt(0),m++;i=Dn(v),r>1?(v=new w("0."+n),i++):v=new w(r+"."+n.slice(1))}else return c=Lk(w,d+2,S).times(i+""),v=jf(new w(r+"."+n.slice(1)),d-g).plus(c),w.precision=S,t==null?(ln=!0,Wt(v,S)):v;for(l=s=v=Zi(v.minus(Vr),v.plus(Vr),d),h=Wt(v.times(v),d),a=3;;){if(s=Wt(s.times(h),d),c=l.plus(Zi(s,new w(a),d)),si(c.d).slice(0,d)===si(l.d).slice(0,d))return l=l.times(2),i!==0&&(l=l.plus(Lk(w,d+2,S).times(i+""))),l=Zi(l,new w(m),d),w.precision=S,t==null?(ln=!0,Wt(l,S)):l;l=c,a+=2}}function rq(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=vc(n/rn),e.d=[],r=(n+1)%rn,n<0&&(r+=rn),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=rn;r<a;)e.d.push(+t.slice(r,r+=rn));t=t.slice(r),r=rn-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),ln&&(e.e>hg||e.e<-hg))throw Error(gE+n)}else e.s=0,e.e=0,e.d=[0];return e}function Wt(e,t,n){var r,a,i,s,l,c,d,h,m=e.d;for(s=1,i=m[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=rn,a=t,d=m[h=0];else{if(h=Math.ceil((r+1)/rn),i=m.length,h>=i)return e;for(d=i=m[h],s=1;i>=10;i/=10)s++;r%=rn,a=r-rn+s}if(n!==void 0&&(i=Ko(10,s-a-1),l=d/i%10|0,c=t<0||m[h+1]!==void 0||d%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?a>0?d/Ko(10,s-a):0:m[h-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return c?(i=Dn(e),m.length=1,t=t-i-1,m[0]=Ko(10,(rn-t%rn)%rn),e.e=vc(-t/rn)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=h,i=1,h--):(m.length=h+1,i=Ko(10,rn-r),m[h]=a>0?(d/Ko(10,s-a)%Ko(10,a)|0)*i:0),c)for(;;)if(h==0){(m[0]+=i)==Yn&&(m[0]=1,++e.e);break}else{if(m[h]+=i,m[h]!=Yn)break;m[h--]=0,i=1}for(r=m.length;m[--r]===0;)m.pop();if(ln&&(e.e>hg||e.e<-hg))throw Error(gE+Dn(e));return e}function mV(e,t){var n,r,a,i,s,l,c,d,h,m,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),ln?Wt(t,v):t;if(c=e.d,m=t.d,r=t.e,d=e.e,c=c.slice(),s=d-r,s){for(h=s<0,h?(n=c,s=-s,l=m.length):(n=m,r=d,l=c.length),a=Math.max(Math.ceil(v/rn),l)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=m.length,h=a<l,h&&(l=a),a=0;a<l;a++)if(c[a]!=m[a]){h=c[a]<m[a];break}s=0}for(h&&(n=c,c=m,m=n,t.s=-t.s),l=c.length,a=m.length-l;a>0;--a)c[l++]=0;for(a=m.length;a>s;){if(c[--a]<m[a]){for(i=a;i&&c[--i]===0;)c[i]=Yn-1;--c[i],c[a]+=Yn}c[a]-=m[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,ln?Wt(t,v):t):new g(0)}function ml(e,t,n){var r,a=Dn(e),i=si(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+Ws(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ws(-a-1)+i,n&&(r=n-s)>0&&(i+=Ws(r))):a>=s?(i+=Ws(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+Ws(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=Ws(r))),e.s<0?"-"+i:i}function aq(e,t){if(e.length>t)return e.length=t,!0}function pV(e){var t,n,r;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(tl+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return rq(s,i.toString())}else if(typeof i!="string")throw Error(tl+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,K_e.test(i))rq(s,i);else throw Error(tl+i)}if(a.prototype=Fe,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=pV,a.config=a.set=Y_e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function Y_e(e){if(!e||typeof e!="object")throw Error(va+"Object expected");var t,n,r,a=["precision",1,gc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(vc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(tl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tl+n+": "+r);return this}var vE=pV(V_e);Vr=new vE(1);const Ct=vE;function gV(e){var t;return e===0?t=1:t=Math.floor(new Ct(e).abs().log(10).toNumber())+1,t}function vV(e,t,n){for(var r=new Ct(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var yV=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},yE=(e,t,n)=>{if(e.lte(0))return new Ct(0);var r=gV(e.toNumber()),a=new Ct(10).pow(r),i=e.div(a),s=r!==1?.05:.1,l=new Ct(Math.ceil(i.div(s).toNumber())).add(n).mul(s),c=l.mul(a);return t?new Ct(c.toNumber()):new Ct(Math.ceil(c.toNumber()))},xV=(e,t,n)=>{var r;if(e.lte(0))return new Ct(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new Ct(i).abs().log(10).toNumber()),l=new Ct(10).pow(s),c=e.div(l).toNumber(),d=a.findIndex(v=>v>=c-1e-10);if(d===-1&&(l=l.mul(10),d=0),d+=n,d>=a.length){var h=Math.floor(d/a.length);d%=a.length,l=l.mul(new Ct(10).pow(h))}var m=(r=a[d])!==null&&r!==void 0?r:1,g=new Ct(m).mul(l);return t?g:new Ct(Math.ceil(g.toNumber()))},W_e=(e,t,n)=>{var r=new Ct(1),a=new Ct(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Ct(10).pow(gV(e)-1),a=new Ct(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Ct(Math.floor(e)))}else e===0?a=new Ct(Math.floor((t-1)/2)):n||(a=new Ct(Math.floor(e)));for(var s=Math.floor((t-1)/2),l=[],c=0;c<t;c++)l.push(a.add(new Ct(c-s).mul(r)).toNumber());return l},bV=function(t,n,r,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:yE;if(!Number.isFinite((n-t)/(r-1)))return{step:new Ct(0),tickMin:new Ct(0),tickMax:new Ct(0)};var l=s(new Ct(n).sub(t).div(r-1),a,i),c;t<=0&&n>=0?c=new Ct(0):(c=new Ct(t).add(n).div(2),c=c.sub(new Ct(c).mod(l)));var d=Math.ceil(c.sub(t).div(l).toNumber()),h=Math.ceil(new Ct(n).sub(c).div(l).toNumber()),m=d+h+1;return m>r?bV(t,n,r,a,i+1,s):(m<r&&(h=n>0?h+(r-m):h,d=n>0?d:d+(r-m)),{step:l,tickMin:c.sub(new Ct(d).mul(l)),tickMax:c.add(new Ct(h).mul(l))})},iq=function(t){var[n,r]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",l=Math.max(a,2),[c,d]=yV([n,r]);if(c===-1/0||d===1/0){var h=d===1/0?[c,...Array(a-1).fill(1/0)]:[...Array(a-1).fill(-1/0),d];return n>r?h.reverse():h}if(c===d)return W_e(c,a,i);var m=s==="snap125"?xV:yE,{step:g,tickMin:v,tickMax:b}=bV(c,d,l,i,0,m),w=vV(v,b.add(new Ct(.1).mul(g)),g);return n>r?w.reverse():w},sq=function(t,n){var[r,a]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[l,c]=yV([r,a]);if(l===-1/0||c===1/0)return[r,a];if(l===c)return[l];var d=s==="snap125"?xV:yE,h=Math.max(n,2),m=d(new Ct(c).sub(l).div(h-1),i,0),g=[...vV(new Ct(l),new Ct(c),m),c];return i===!1&&(g=g.map(v=>Math.round(v))),r>a?g.reverse():g},wV=e=>e.rootProps.maxBarSize,X_e=e=>e.rootProps.barGap,SV=e=>e.rootProps.barCategoryGap,Z_e=e=>e.rootProps.barSize,ih=e=>e.rootProps.stackOffset,jV=e=>e.rootProps.reverseStackOrder,xE=e=>e.options.chartName,bE=e=>e.rootProps.syncId,_V=e=>e.rootProps.syncMethod,wE=e=>e.options.eventEmitter,Pn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},qo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},ei={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Gv=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Vv(e,t,n){if(n!=="auto")return n;if(e!=null)return ds(e,t)?"category":"number"}function oq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oq(Object(n),!0).forEach(function(r){Q_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q_e(e,t,n){return(t=J_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J_e(e){var t=eke(e,"string");return typeof t=="symbol"?t:t+""}function eke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lq={allowDataOverflow:qo.allowDataOverflow,allowDecimals:qo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:qo.angleAxisId,includeHidden:!1,name:void 0,reversed:qo.reversed,scale:qo.scale,tick:qo.tick,tickCount:void 0,ticks:void 0,type:qo.type,unit:void 0,niceTicks:"auto"},uq={allowDataOverflow:ei.allowDataOverflow,allowDecimals:ei.allowDecimals,allowDuplicatedCategory:ei.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ei.radiusAxisId,includeHidden:ei.includeHidden,name:void 0,reversed:ei.reversed,scale:ei.scale,tick:ei.tick,tickCount:ei.tickCount,ticks:void 0,type:ei.type,unit:void 0,niceTicks:"auto"},tke=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},SE=de([tke,BG],(e,t)=>{var n;if(e!=null)return e;var r=(n=Vv(t,"angleAxis",lq.type))!==null&&n!==void 0?n:"category";return mg(mg({},lq),{},{type:r})}),nke=(e,t)=>e.polarAxis.radiusAxis[t],jE=de([nke,BG],(e,t)=>{var n;if(e!=null)return e;var r=(n=Vv(t,"radiusAxis",uq.type))!==null&&n!==void 0?n:"category";return mg(mg({},uq),{},{type:r})}),Kv=e=>e.polarOptions,_E=de([fs,hs,Fn],iV),kV=de([Kv,_E],(e,t)=>{if(e!=null)return dr(e.innerRadius,t,0)}),CV=de([Kv,_E],(e,t)=>{if(e!=null)return dr(e.outerRadius,t,t*.8)}),rke=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},NV=de([Kv],rke);de([SE,NV],Gv);var EV=de([_E,kV,CV],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});de([jE,EV],Gv);var AV=de([Rt,Kv,kV,CV,fs,hs],(e,t,n,r,a,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:l,startAngle:c,endAngle:d}=t;return{cx:dr(s,a,a/2),cy:dr(l,i,i/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:d,clockWise:!1}}}),pn=(e,t)=>t,sh=(e,t,n)=>n;function kE(e){return e==null?void 0:e.id}function TV(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=n,s=new Map;return e.forEach(l=>{var c,d=(c=l.data)!==null&&c!==void 0?c:r;if(!(d==null||d.length===0)){var h=kE(l);d.forEach((m,g)=>{var v=i==null||a?g:String($t(m,i,null)),b=$t(m,l.dataKey,0),w;s.has(v)?w=s.get(v):w={},Object.assign(w,{[h]:b}),s.set(v,w)})}}),Array.from(s.values())}function Yv(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Wv=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xv(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function ake(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Zn=e=>{var t=Rt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},yc=e=>e.tooltip.settings.axisId;function CE(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(i){function s(){return i.apply(this,arguments)}return s.toString=function(){return i.toString()},s})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(i){var s=a[0],l=a[1];return s<=l?i>=s&&i<=l:i>=l&&i<=s},bandwidth:n?()=>n.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,s)=>{var l=e(i);if(l!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var c=e.bandwidth();switch(s.position){case"middle":l+=c/2;break;case"end":l+=c;break}}return l}}}}}var OV=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ui(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];Nt(i)&&((n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function eo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ike(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function NE(e){let t,n,r;e.length!==2?(t=eo,n=(l,c)=>eo(e(l),c),r=(l,c)=>e(l)-c):(t=e===eo||e===ike?e:ske,n=e,r=e);function a(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const m=d+h>>>1;n(l[m],c)<0?d=m+1:h=m}while(d<h)}return d}function i(l,c,d=0,h=l.length){if(d<h){if(t(c,c)!==0)return h;do{const m=d+h>>>1;n(l[m],c)<=0?d=m+1:h=m}while(d<h)}return d}function s(l,c,d=0,h=l.length){const m=a(l,c,d,h-1);return m>d&&r(l[m-1],c)>-r(l[m],c)?m-1:m}return{left:a,center:s,right:i}}function ske(){return 0}function MV(e){return e===null?NaN:+e}function*oke(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const lke=NE(eo),oh=lke.right;NE(MV).center;class cq extends Map{constructor(t,n=dke){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(dq(this,t))}has(t){return super.has(dq(this,t))}set(t,n){return super.set(uke(this,t),n)}delete(t){return super.delete(cke(this,t))}}function dq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function uke({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function cke({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function dke(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fke(e=eo){if(e===eo)return PV;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function PV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const hke=Math.sqrt(50),mke=Math.sqrt(10),pke=Math.sqrt(2);function pg(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=hke?10:i>=mke?5:i>=pke?2:1;let l,c,d;return a<0?(d=Math.pow(10,-a)/s,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,a)*s,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=n&&n<2?pg(e,t,n*2):[l,c,d]}function uN(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,s]=r?pg(t,e,n):pg(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(r)if(s<0)for(let d=0;d<l;++d)c[d]=(i-d)/-s;else for(let d=0;d<l;++d)c[d]=(i-d)*s;else if(s<0)for(let d=0;d<l;++d)c[d]=(a+d)/-s;else for(let d=0;d<l;++d)c[d]=(a+d)*s;return c}function cN(e,t,n){return t=+t,e=+e,n=+n,pg(e,t,n)[2]}function dN(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?cN(t,e,n):cN(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function fq(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function hq(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function DV(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?PV:fke(a);r>n;){if(r-n>600){const c=r-n+1,d=t-n+1,h=Math.log(c),m=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*m*(c-m)/c)*(d-c/2<0?-1:1),v=Math.max(n,Math.floor(t-d*m/c+g)),b=Math.min(r,Math.floor(t+(c-d)*m/c+g));DV(e,t,v,b,a)}const i=e[t];let s=n,l=r;for(Cd(e,n,t),a(e[r],i)>0&&Cd(e,n,r);s<l;){for(Cd(e,s,l),++s,--l;a(e[s],i)<0;)++s;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?Cd(e,n,l):(++l,Cd(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Cd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function gke(e,t,n){if(e=Float64Array.from(oke(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return hq(e);if(t>=1)return fq(e);var r,a=(r-1)*t,i=Math.floor(a),s=fq(DV(e,i).subarray(0,i+1)),l=hq(e.subarray(i+1));return s+(l-s)*(a-i)}}function vke(e,t,n=MV){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return s+(l-s)*(a-i)}}function yke(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function wa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ms(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const fN=Symbol("implicit");function EE(){var e=new cq,t=[],n=[],r=fN;function a(i){let s=e.get(i);if(s===void 0){if(r!==fN)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new cq;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return EE(t,n).unknown(r)},wa.apply(a,arguments),a}function AE(){var e=EE().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,l=!1,c=0,d=0,h=.5;delete e.unknown;function m(){var g=t().length,v=a<r,b=v?a:r,w=v?r:a;i=(w-b)/Math.max(1,g-c+d*2),l&&(i=Math.floor(i)),b+=(w-b-i*(g-c))*h,s=i*(1-c),l&&(b=Math.round(b),s=Math.round(s));var S=yke(g).map(function(j){return b+i*j});return n(v?S.reverse():S)}return e.domain=function(g){return arguments.length?(t(g),m()):t()},e.range=function(g){return arguments.length?([r,a]=g,r=+r,a=+a,m()):[r,a]},e.rangeRound=function(g){return[r,a]=g,r=+r,a=+a,l=!0,m()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(g){return arguments.length?(l=!!g,m()):l},e.padding=function(g){return arguments.length?(c=Math.min(1,d=+g),m()):c},e.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),m()):c},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 AE(t(),[r,a]).round(l).paddingInner(c).paddingOuter(d).align(h)},wa.apply(m(),arguments)}function RV(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return RV(t())},e}function xke(){return RV(AE.apply(null,arguments).paddingInner(1))}function bke(e){return function(){return e}}function gg(e){return+e}var mq=[0,1];function yr(e){return e}function hN(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:bke(isNaN(t)?NaN:.5)}function wke(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Ske(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=hN(a,r),i=n(s,i)):(r=hN(r,a),i=n(i,s)),function(l){return i(r(l))}}function jke(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=hN(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(l){var c=oh(e,l,1,r)-1;return i[c](a[c](l))}}function lh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zv(){var e=mq,t=mq,n=Wi,r,a,i,s=yr,l,c,d;function h(){var g=Math.min(e.length,t.length);return s!==yr&&(s=wke(e[0],e[g-1])),l=g>2?jke:Ske,c=d=null,m}function m(g){return g==null||isNaN(g=+g)?i:(c||(c=l(e.map(r),t,n)))(r(s(g)))}return m.invert=function(g){return s(a((d||(d=l(t,e.map(r),Aa)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,gg),h()):e.slice()},m.range=function(g){return arguments.length?(t=Array.from(g),h()):t.slice()},m.rangeRound=function(g){return t=Array.from(g),n=p2,h()},m.clamp=function(g){return arguments.length?(s=g?!0:yr,h()):s!==yr},m.interpolate=function(g){return arguments.length?(n=g,h()):n},m.unknown=function(g){return arguments.length?(i=g,m):i},function(g,v){return r=g,a=v,h()}}function TE(){return Zv()(yr,yr)}function _ke(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vg(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qu(e){return e=vg(Math.abs(e)),e?e[1]:NaN}function kke(e,t){return function(n,r){for(var a=n.length,i=[],s=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=e[s=(s+1)%e.length];return i.reverse().join(t)}}function Cke(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Nke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _f(e){if(!(t=Nke.exec(e)))throw new Error("invalid format: "+e);var t;return new OE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}_f.prototype=OE.prototype;function OE(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+""}OE.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 Eke(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var yg;function Ake(e,t){var n=vg(e,t);if(!n)return yg=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(yg=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+vg(e,Math.max(0,t+i-1))[0]}function pq(e,t){var n=vg(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const gq={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_ke,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>pq(e*100,t),r:pq,s:Ake,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vq(e){return e}var yq=Array.prototype.map,xq=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Tke(e){var t=e.grouping===void 0||e.thousands===void 0?vq:kke(yq.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?vq:Cke(yq.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(m,g){m=_f(m);var v=m.fill,b=m.align,w=m.sign,S=m.symbol,j=m.zero,k=m.width,_=m.comma,E=m.precision,T=m.trim,A=m.type;A==="n"?(_=!0,A="g"):gq[A]||(E===void 0&&(E=12),T=!0,A="g"),(j||v==="0"&&b==="=")&&(j=!0,v="0",b="=");var O=(g&&g.prefix!==void 0?g.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),D=(S==="$"?r:/[%p]/.test(A)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),P=gq[A],M=/[defgprs%]/.test(A);E=E===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function z(L){var F=O,R=D,I,q,G;if(A==="c")R=P(L)+R,L="";else{L=+L;var Y=L<0||1/L<0;if(L=isNaN(L)?c:P(Math.abs(L),E),T&&(L=Eke(L)),Y&&+L==0&&w!=="+"&&(Y=!1),F=(Y?w==="("?w:l:w==="-"||w==="("?"":w)+F,R=(A==="s"&&!isNaN(L)&&yg!==void 0?xq[8+yg/3]:"")+R+(Y&&w==="("?")":""),M){for(I=-1,q=L.length;++I<q;)if(G=L.charCodeAt(I),48>G||G>57){R=(G===46?a+L.slice(I+1):L.slice(I))+R,L=L.slice(0,I);break}}}_&&!j&&(L=t(L,1/0));var K=F.length+L.length+R.length,B=K<k?new Array(k-K+1).join(v):"";switch(_&&j&&(L=t(B+L,B.length?k-R.length:1/0),B=""),b){case"<":L=F+L+R+B;break;case"=":L=F+B+L+R;break;case"^":L=B.slice(0,K=B.length>>1)+F+L+R+B.slice(K);break;default:L=B+F+L+R;break}return i(L)}return z.toString=function(){return m+""},z}function h(m,g){var v=Math.max(-8,Math.min(8,Math.floor(Qu(g)/3)))*3,b=Math.pow(10,-v),w=d((m=_f(m),m.type="f",m),{suffix:xq[8+v/3]});return function(S){return w(b*S)}}return{format:d,formatPrefix:h}}var tp,ME,IV;Oke({thousands:",",grouping:[3],currency:["$",""]});function Oke(e){return tp=Tke(e),ME=tp.format,IV=tp.formatPrefix,tp}function Mke(e){return Math.max(0,-Qu(Math.abs(e)))}function Pke(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qu(t)/3)))*3-Qu(Math.abs(e)))}function Dke(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qu(t)-Qu(e))+1}function LV(e,t,n,r){var a=dN(e,t,n),i;switch(r=_f(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Pke(a,s))&&(r.precision=i),IV(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Dke(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Mke(a))&&(r.precision=i-(r.type==="%")*2);break}}return ME(r)}function co(e){var t=e.domain;return e.ticks=function(n){var r=t();return uN(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return LV(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],l=r[i],c,d,h=10;for(l<s&&(d=s,s=l,l=d,d=a,a=i,i=d);h-- >0;){if(d=cN(s,l,n),d===c)return r[a]=s,r[i]=l,t(r);if(d>0)s=Math.floor(s/d)*d,l=Math.ceil(l/d)*d;else if(d<0)s=Math.ceil(s*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function zV(){var e=TE();return e.copy=function(){return lh(e,zV())},wa.apply(e,arguments),co(e)}function $V(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,gg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $V(e).unknown(t)},e=arguments.length?Array.from(e,gg):[0,1],co(n)}function qV(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function bq(e){return Math.log(e)}function wq(e){return Math.exp(e)}function Rke(e){return-Math.log(-e)}function Ike(e){return-Math.exp(-e)}function Lke(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zke(e){return e===10?Lke:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $ke(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Sq(e){return(t,n)=>-e(-t,n)}function PE(e){const t=e(bq,wq),n=t.domain;let r=10,a,i;function s(){return a=$ke(r),i=zke(r),n()[0]<0?(a=Sq(a),i=Sq(i),e(Rke,Ike)):e(bq,wq),t}return t.base=function(l){return arguments.length?(r=+l,s()):r},t.domain=function(l){return arguments.length?(n(l),s()):n()},t.ticks=l=>{const c=n();let d=c[0],h=c[c.length-1];const m=h<d;m&&([d,h]=[h,d]);let g=a(d),v=a(h),b,w;const S=l==null?10:+l;let j=[];if(!(r%1)&&v-g<S){if(g=Math.floor(g),v=Math.ceil(v),d>0){for(;g<=v;++g)for(b=1;b<r;++b)if(w=g<0?b/i(-g):b*i(g),!(w<d)){if(w>h)break;j.push(w)}}else for(;g<=v;++g)for(b=r-1;b>=1;--b)if(w=g>0?b/i(-g):b*i(g),!(w<d)){if(w>h)break;j.push(w)}j.length*2<S&&(j=uN(d,h,S))}else j=uN(g,v,Math.min(v-g,S)).map(i);return m?j.reverse():j},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=_f(c)).precision==null&&(c.trim=!0),c=ME(c)),l===1/0)return c;const d=Math.max(1,r*l/t.ticks().length);return h=>{let m=h/i(Math.round(a(h)));return m*r<r-.5&&(m*=r),m<=d?c(h):""}},t.nice=()=>n(qV(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function BV(){const e=PE(Zv()).domain([1,10]);return e.copy=()=>lh(e,BV()).base(e.base()),wa.apply(e,arguments),e}function jq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function _q(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function DE(e){var t=1,n=e(jq(t),_q(t));return n.constant=function(r){return arguments.length?e(jq(t=+r),_q(t)):t},co(n)}function FV(){var e=DE(Zv());return e.copy=function(){return lh(e,FV()).constant(e.constant())},wa.apply(e,arguments)}function kq(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qke(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Bke(e){return e<0?-e*e:e*e}function RE(e){var t=e(yr,yr),n=1;function r(){return n===1?e(yr,yr):n===.5?e(qke,Bke):e(kq(n),kq(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},co(t)}function IE(){var e=RE(Zv());return e.copy=function(){return lh(e,IE()).exponent(e.exponent())},wa.apply(e,arguments),e}function Fke(){return IE.apply(null,arguments).exponent(.5)}function Cq(e){return Math.sign(e)*e*e}function Hke(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HV(){var e=TE(),t=[0,1],n=!1,r;function a(i){var s=Hke(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(Cq(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,gg)).map(Cq)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return HV(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(a,arguments),co(a)}function UV(){var e=[],t=[],n=[],r;function a(){var s=0,l=Math.max(1,t.length);for(n=new Array(l-1);++s<l;)n[s-1]=vke(e,s/l);return i}function i(s){return s==null||isNaN(s=+s)?r:t[oh(n,s)]}return i.invertExtent=function(s){var l=t.indexOf(s);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let l of s)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(eo),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return UV().domain(e).range(t).unknown(r)},wa.apply(i,arguments)}function GV(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(c){return c!=null&&c<=c?a[oh(r,c,0,n)]:i}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},s.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},s.invertExtent=function(c){var d=a.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return GV().domain([e,t]).range(a).unknown(i)},wa.apply(co(s),arguments)}function VV(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[oh(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return VV().domain(e).range(t).unknown(n)},wa.apply(a,arguments)}const zk=new Date,$k=new Date;function Hn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),l=a.ceil(i);return i-s<l-i?s:l},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<s)||!(l>0))return c;let d;do c.push(d=new Date(+i)),t(i,l),e(i);while(d<i&&i<s);return c},a.filter=i=>Hn(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!i(s););else for(;--l>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(zk.setTime(+i),$k.setTime(+s),e(zk),e($k),Math.floor(n(zk,$k))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const xg=Hn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Hn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):xg);xg.range;const Gi=1e3,pa=Gi*60,Vi=pa*60,as=Vi*24,LE=as*7,Nq=as*30,qk=as*365,Xo=Hn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCSeconds());Xo.range;const zE=Hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gi)},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getMinutes());zE.range;const $E=Hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getUTCMinutes());$E.range;const qE=Hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gi-e.getMinutes()*pa)},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getHours());qE.range;const BE=Hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Vi)},(e,t)=>(t-e)/Vi,e=>e.getUTCHours());BE.range;const uh=Hn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pa)/as,e=>e.getDate()-1);uh.range;const Qv=Hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/as,e=>e.getUTCDate()-1);Qv.range;const KV=Hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/as,e=>Math.floor(e/as));KV.range;function Nl(e){return Hn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*pa)/LE)}const Jv=Nl(0),bg=Nl(1),Uke=Nl(2),Gke=Nl(3),Ju=Nl(4),Vke=Nl(5),Kke=Nl(6);Jv.range;bg.range;Uke.range;Gke.range;Ju.range;Vke.range;Kke.range;function El(e){return Hn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/LE)}const ey=El(0),wg=El(1),Yke=El(2),Wke=El(3),ec=El(4),Xke=El(5),Zke=El(6);ey.range;wg.range;Yke.range;Wke.range;ec.range;Xke.range;Zke.range;const FE=Hn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());FE.range;const HE=Hn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());HE.range;const is=Hn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());is.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});is.range;const ss=Hn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ss.range;function YV(e,t,n,r,a,i){const s=[[Xo,1,Gi],[Xo,5,5*Gi],[Xo,15,15*Gi],[Xo,30,30*Gi],[i,1,pa],[i,5,5*pa],[i,15,15*pa],[i,30,30*pa],[a,1,Vi],[a,3,3*Vi],[a,6,6*Vi],[a,12,12*Vi],[r,1,as],[r,2,2*as],[n,1,LE],[t,1,Nq],[t,3,3*Nq],[e,1,qk]];function l(d,h,m){const g=h<d;g&&([d,h]=[h,d]);const v=m&&typeof m.range=="function"?m:c(d,h,m),b=v?v.range(d,+h+1):[];return g?b.reverse():b}function c(d,h,m){const g=Math.abs(h-d)/m,v=NE(([,,S])=>S).right(s,g);if(v===s.length)return e.every(dN(d/qk,h/qk,m));if(v===0)return xg.every(Math.max(dN(d,h,m),1));const[b,w]=s[g/s[v-1][2]<s[v][2]/g?v-1:v];return b.every(w)}return[l,c]}const[Qke,Jke]=YV(ss,HE,ey,KV,BE,$E),[eCe,tCe]=YV(is,FE,Jv,uh,qE,zE);function Bk(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Fk(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Nd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function nCe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,l=e.months,c=e.shortMonths,d=Ed(a),h=Ad(a),m=Ed(i),g=Ad(i),v=Ed(s),b=Ad(s),w=Ed(l),S=Ad(l),j=Ed(c),k=Ad(c),_={a:G,A:Y,b:K,B,c:null,d:Pq,e:Pq,f:kCe,g:RCe,G:LCe,H:SCe,I:jCe,j:_Ce,L:WV,m:CCe,M:NCe,p:U,q:X,Q:Iq,s:Lq,S:ECe,u:ACe,U:TCe,V:OCe,w:MCe,W:PCe,x:null,X:null,y:DCe,Y:ICe,Z:zCe,"%":Rq},E={a:H,A:W,b:Q,B:J,c:null,d:Dq,e:Dq,f:FCe,g:QCe,G:eNe,H:$Ce,I:qCe,j:BCe,L:ZV,m:HCe,M:UCe,p:re,q:oe,Q:Iq,s:Lq,S:GCe,u:VCe,U:KCe,V:YCe,w:WCe,W:XCe,x:null,X:null,y:ZCe,Y:JCe,Z:tNe,"%":Rq},T={a:M,A:z,b:L,B:F,c:R,d:Oq,e:Oq,f:yCe,g:Tq,G:Aq,H:Mq,I:Mq,j:mCe,L:vCe,m:hCe,M:pCe,p:P,q:fCe,Q:bCe,s:wCe,S:gCe,u:oCe,U:lCe,V:uCe,w:sCe,W:cCe,x:I,X:q,y:Tq,Y:Aq,Z:dCe,"%":xCe};_.x=A(n,_),_.X=A(r,_),_.c=A(t,_),E.x=A(n,E),E.X=A(r,E),E.c=A(t,E);function A(Z,le){return function(ie){var ee=[],ae=-1,xe=0,ye=Z.length,Te,Me,he;for(ie instanceof Date||(ie=new Date(+ie));++ae<ye;)Z.charCodeAt(ae)===37&&(ee.push(Z.slice(xe,ae)),(Me=Eq[Te=Z.charAt(++ae)])!=null?Te=Z.charAt(++ae):Me=Te==="e"?" ":"0",(he=le[Te])&&(Te=he(ie,Me)),ee.push(Te),xe=ae+1);return ee.push(Z.slice(xe,ae)),ee.join("")}}function O(Z,le){return function(ie){var ee=Nd(1900,void 0,1),ae=D(ee,Z,ie+="",0),xe,ye;if(ae!=ie.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(le&&!("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?(xe=Fk(Nd(ee.y,0,1)),ye=xe.getUTCDay(),xe=ye>4||ye===0?wg.ceil(xe):wg(xe),xe=Qv.offset(xe,(ee.V-1)*7),ee.y=xe.getUTCFullYear(),ee.m=xe.getUTCMonth(),ee.d=xe.getUTCDate()+(ee.w+6)%7):(xe=Bk(Nd(ee.y,0,1)),ye=xe.getDay(),xe=ye>4||ye===0?bg.ceil(xe):bg(xe),xe=uh.offset(xe,(ee.V-1)*7),ee.y=xe.getFullYear(),ee.m=xe.getMonth(),ee.d=xe.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?Fk(Nd(ee.y,0,1)).getUTCDay():Bk(Nd(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,Fk(ee)):Bk(ee)}}function D(Z,le,ie,ee){for(var ae=0,xe=le.length,ye=ie.length,Te,Me;ae<xe;){if(ee>=ye)return-1;if(Te=le.charCodeAt(ae++),Te===37){if(Te=le.charAt(ae++),Me=T[Te in Eq?le.charAt(ae++):Te],!Me||(ee=Me(Z,ie,ee))<0)return-1}else if(Te!=ie.charCodeAt(ee++))return-1}return ee}function P(Z,le,ie){var ee=d.exec(le.slice(ie));return ee?(Z.p=h.get(ee[0].toLowerCase()),ie+ee[0].length):-1}function M(Z,le,ie){var ee=v.exec(le.slice(ie));return ee?(Z.w=b.get(ee[0].toLowerCase()),ie+ee[0].length):-1}function z(Z,le,ie){var ee=m.exec(le.slice(ie));return ee?(Z.w=g.get(ee[0].toLowerCase()),ie+ee[0].length):-1}function L(Z,le,ie){var ee=j.exec(le.slice(ie));return ee?(Z.m=k.get(ee[0].toLowerCase()),ie+ee[0].length):-1}function F(Z,le,ie){var ee=w.exec(le.slice(ie));return ee?(Z.m=S.get(ee[0].toLowerCase()),ie+ee[0].length):-1}function R(Z,le,ie){return D(Z,t,le,ie)}function I(Z,le,ie){return D(Z,n,le,ie)}function q(Z,le,ie){return D(Z,r,le,ie)}function G(Z){return s[Z.getDay()]}function Y(Z){return i[Z.getDay()]}function K(Z){return c[Z.getMonth()]}function B(Z){return l[Z.getMonth()]}function U(Z){return a[+(Z.getHours()>=12)]}function X(Z){return 1+~~(Z.getMonth()/3)}function H(Z){return s[Z.getUTCDay()]}function W(Z){return i[Z.getUTCDay()]}function Q(Z){return c[Z.getUTCMonth()]}function J(Z){return l[Z.getUTCMonth()]}function re(Z){return a[+(Z.getUTCHours()>=12)]}function oe(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var le=A(Z+="",_);return le.toString=function(){return Z},le},parse:function(Z){var le=O(Z+="",!1);return le.toString=function(){return Z},le},utcFormat:function(Z){var le=A(Z+="",E);return le.toString=function(){return Z},le},utcParse:function(Z){var le=O(Z+="",!0);return le.toString=function(){return Z},le}}}var Eq={"-":"",_:" ",0:"0"},Qn=/^\s*\d+/,rCe=/^%/,aCe=/[\\^$*+?|[\]().{}]/g;function Dt(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function iCe(e){return e.replace(aCe,"\\$&")}function Ed(e){return new RegExp("^(?:"+e.map(iCe).join("|")+")","i")}function Ad(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function sCe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function oCe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function lCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function uCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function cCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Aq(e,t,n){var r=Qn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Tq(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function dCe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function fCe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Oq(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function mCe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Mq(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function gCe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function vCe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function yCe(e,t,n){var r=Qn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function xCe(e,t,n){var r=rCe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bCe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function wCe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Pq(e,t){return Dt(e.getDate(),t,2)}function SCe(e,t){return Dt(e.getHours(),t,2)}function jCe(e,t){return Dt(e.getHours()%12||12,t,2)}function _Ce(e,t){return Dt(1+uh.count(is(e),e),t,3)}function WV(e,t){return Dt(e.getMilliseconds(),t,3)}function kCe(e,t){return WV(e,t)+"000"}function CCe(e,t){return Dt(e.getMonth()+1,t,2)}function NCe(e,t){return Dt(e.getMinutes(),t,2)}function ECe(e,t){return Dt(e.getSeconds(),t,2)}function ACe(e){var t=e.getDay();return t===0?7:t}function TCe(e,t){return Dt(Jv.count(is(e)-1,e),t,2)}function XV(e){var t=e.getDay();return t>=4||t===0?Ju(e):Ju.ceil(e)}function OCe(e,t){return e=XV(e),Dt(Ju.count(is(e),e)+(is(e).getDay()===4),t,2)}function MCe(e){return e.getDay()}function PCe(e,t){return Dt(bg.count(is(e)-1,e),t,2)}function DCe(e,t){return Dt(e.getFullYear()%100,t,2)}function RCe(e,t){return e=XV(e),Dt(e.getFullYear()%100,t,2)}function ICe(e,t){return Dt(e.getFullYear()%1e4,t,4)}function LCe(e,t){var n=e.getDay();return e=n>=4||n===0?Ju(e):Ju.ceil(e),Dt(e.getFullYear()%1e4,t,4)}function zCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Dt(t/60|0,"0",2)+Dt(t%60,"0",2)}function Dq(e,t){return Dt(e.getUTCDate(),t,2)}function $Ce(e,t){return Dt(e.getUTCHours(),t,2)}function qCe(e,t){return Dt(e.getUTCHours()%12||12,t,2)}function BCe(e,t){return Dt(1+Qv.count(ss(e),e),t,3)}function ZV(e,t){return Dt(e.getUTCMilliseconds(),t,3)}function FCe(e,t){return ZV(e,t)+"000"}function HCe(e,t){return Dt(e.getUTCMonth()+1,t,2)}function UCe(e,t){return Dt(e.getUTCMinutes(),t,2)}function GCe(e,t){return Dt(e.getUTCSeconds(),t,2)}function VCe(e){var t=e.getUTCDay();return t===0?7:t}function KCe(e,t){return Dt(ey.count(ss(e)-1,e),t,2)}function QV(e){var t=e.getUTCDay();return t>=4||t===0?ec(e):ec.ceil(e)}function YCe(e,t){return e=QV(e),Dt(ec.count(ss(e),e)+(ss(e).getUTCDay()===4),t,2)}function WCe(e){return e.getUTCDay()}function XCe(e,t){return Dt(wg.count(ss(e)-1,e),t,2)}function ZCe(e,t){return Dt(e.getUTCFullYear()%100,t,2)}function QCe(e,t){return e=QV(e),Dt(e.getUTCFullYear()%100,t,2)}function JCe(e,t){return Dt(e.getUTCFullYear()%1e4,t,4)}function eNe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ec(e):ec.ceil(e),Dt(e.getUTCFullYear()%1e4,t,4)}function tNe(){return"+0000"}function Rq(){return"%"}function Iq(e){return+e}function Lq(e){return Math.floor(+e/1e3)}var wu,JV,eK;nNe({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 nNe(e){return wu=nCe(e),JV=wu.format,wu.parse,eK=wu.utcFormat,wu.utcParse,wu}function rNe(e){return new Date(e)}function aNe(e){return e instanceof Date?+e:+new Date(+e)}function UE(e,t,n,r,a,i,s,l,c,d){var h=TE(),m=h.invert,g=h.domain,v=d(".%L"),b=d(":%S"),w=d("%I:%M"),S=d("%I %p"),j=d("%a %d"),k=d("%b %d"),_=d("%B"),E=d("%Y");function T(A){return(c(A)<A?v:l(A)<A?b:s(A)<A?w:i(A)<A?S:r(A)<A?a(A)<A?j:k:n(A)<A?_:E)(A)}return h.invert=function(A){return new Date(m(A))},h.domain=function(A){return arguments.length?g(Array.from(A,aNe)):g().map(rNe)},h.ticks=function(A){var O=g();return e(O[0],O[O.length-1],A??10)},h.tickFormat=function(A,O){return O==null?T:d(O)},h.nice=function(A){var O=g();return(!A||typeof A.range!="function")&&(A=t(O[0],O[O.length-1],A??10)),A?g(qV(O,A)):h},h.copy=function(){return lh(h,UE(e,t,n,r,a,i,s,l,c,d))},h}function iNe(){return wa.apply(UE(eCe,tCe,is,FE,Jv,uh,qE,zE,Xo,JV).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function sNe(){return wa.apply(UE(Qke,Jke,ss,HE,ey,Qv,BE,$E,Xo,eK).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ty(){var e=0,t=1,n,r,a,i,s=yr,l=!1,c;function d(m){return m==null||isNaN(m=+m)?c:s(a===0?.5:(m=(i(m)-n)*a,l?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t]=m,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(m){return arguments.length?(l=!!m,d):l},d.interpolator=function(m){return arguments.length?(s=m,d):s};function h(m){return function(g){var v,b;return arguments.length?([v,b]=g,s=m(v,b),d):[s(0),s(1)]}}return d.range=h(Wi),d.rangeRound=h(p2),d.unknown=function(m){return arguments.length?(c=m,d):c},function(m){return i=m,n=m(e),r=m(t),a=n===r?0:1/(r-n),d}}function fo(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function tK(){var e=co(ty()(yr));return e.copy=function(){return fo(e,tK())},ms.apply(e,arguments)}function nK(){var e=PE(ty()).domain([1,10]);return e.copy=function(){return fo(e,nK()).base(e.base())},ms.apply(e,arguments)}function rK(){var e=DE(ty());return e.copy=function(){return fo(e,rK()).constant(e.constant())},ms.apply(e,arguments)}function GE(){var e=RE(ty());return e.copy=function(){return fo(e,GE()).exponent(e.exponent())},ms.apply(e,arguments)}function oNe(){return GE.apply(null,arguments).exponent(.5)}function aK(){var e=[],t=yr;function n(r){if(r!=null&&!isNaN(r=+r))return t((oh(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(eo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>gke(e,i/r))},n.copy=function(){return aK(t).domain(e)},ms.apply(n,arguments)}function ny(){var e=0,t=.5,n=1,r=1,a,i,s,l,c,d=yr,h,m=!1,g;function v(w){return isNaN(w=+w)?g:(w=.5+((w=+h(w))-i)*(r*w<r*i?l:c),d(m?Math.max(0,Math.min(1,w)):w))}v.domain=function(w){return arguments.length?([e,t,n]=w,a=h(e=+e),i=h(t=+t),s=h(n=+n),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,v):[e,t,n]},v.clamp=function(w){return arguments.length?(m=!!w,v):m},v.interpolator=function(w){return arguments.length?(d=w,v):d};function b(w){return function(S){var j,k,_;return arguments.length?([j,k,_]=S,d=tfe(w,[j,k,_]),v):[d(0),d(.5),d(1)]}}return v.range=b(Wi),v.rangeRound=b(p2),v.unknown=function(w){return arguments.length?(g=w,v):g},function(w){return h=w,a=w(e),i=w(t),s=w(n),l=a===i?0:.5/(i-a),c=i===s?0:.5/(s-i),r=i<a?-1:1,v}}function iK(){var e=co(ny()(yr));return e.copy=function(){return fo(e,iK())},ms.apply(e,arguments)}function sK(){var e=PE(ny()).domain([.1,1,10]);return e.copy=function(){return fo(e,sK()).base(e.base())},ms.apply(e,arguments)}function oK(){var e=DE(ny());return e.copy=function(){return fo(e,oK()).constant(e.constant())},ms.apply(e,arguments)}function VE(){var e=RE(ny());return e.copy=function(){return fo(e,VE()).exponent(e.exponent())},ms.apply(e,arguments)}function lNe(){return VE.apply(null,arguments).exponent(.5)}const lK=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:AE,scaleDiverging:iK,scaleDivergingLog:sK,scaleDivergingPow:VE,scaleDivergingSqrt:lNe,scaleDivergingSymlog:oK,scaleIdentity:$V,scaleImplicit:fN,scaleLinear:zV,scaleLog:BV,scaleOrdinal:EE,scalePoint:xke,scalePow:IE,scaleQuantile:UV,scaleQuantize:GV,scaleRadial:HV,scaleSequential:tK,scaleSequentialLog:nK,scaleSequentialPow:GE,scaleSequentialQuantile:aK,scaleSequentialSqrt:oNe,scaleSequentialSymlog:rK,scaleSqrt:Fke,scaleSymlog:FV,scaleThreshold:VV,scaleTime:iNe,scaleUtc:sNe,tickFormat:LV},Symbol.toStringTag,{value:"Module"}));function uNe(e){var t=lK;if(e in t&&typeof t[e]=="function")return t[e]();var n="scale".concat(Kf(e));if(n in t&&typeof t[n]=="function")return t[n]()}function zq(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=uNe(e);if(r!=null)return r.domain(t).range(n),r}}function KE(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?zq(e.scale,n,r):zq(t,n,r)}function cNe(e){return"scale".concat(Kf(e))}function dNe(e){return cNe(e)in lK}var uK=(e,t,n)=>{if(e!=null){var{scale:r,type:a}=e;if(r==="auto")return a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof r=="string")return dNe(r)?r:"point"}};function fNe(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(a?e[i]<t:e[i]>t)?n=i+1:r=i}return n}function cK(e,t){if(e){var n=t??e.domain(),r=n.map(i=>{var s;return(s=e(i))!==null&&s!==void 0?s:0}),a=e.range();if(!(n.length===0||a.length<2))return i=>{var s,l,c=fNe(r,i);if(c<=0)return n[0];if(c>=n.length)return n[n.length-1];var d=(s=r[c-1])!==null&&s!==void 0?s:0,h=(l=r[c])!==null&&l!==void 0?l:0;return Math.abs(i-d)<=Math.abs(i-h)?n[c-1]:n[c]}}}function hNe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):cK(e,void 0)}function $q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$q(Object(n),!0).forEach(function(r){mNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$q(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mNe(e,t,n){return(t=pNe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pNe(e){var t=gNe(e,"string");return typeof t=="symbol"?t:t+""}function gNe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mN=[0,"auto"],zn={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"},dK=(e,t)=>e.cartesianAxis.xAxis[t],ps=(e,t)=>{var n=dK(e,t);return n??zn},$n={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:mN,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:Xf},fK=(e,t)=>e.cartesianAxis.yAxis[t],gs=(e,t)=>{var n=fK(e,t);return n??$n},vNe={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:""},YE=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??vNe},Sn=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);case"zAxis":return YE(e,n);case"angleAxis":return SE(e,n);case"radiusAxis":return jE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},yNe=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},xc=(e,t,n)=>{switch(t){case"xAxis":return ps(e,n);case"yAxis":return gs(e,n);case"angleAxis":return SE(e,n);case"radiusAxis":return jE(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},hK=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function WE(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var ry=e=>e.graphicalItems.cartesianItems,xNe=de([pn,sh],WE),XE=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),bc=de([ry,Sn,xNe],XE,{memoizeOptions:{resultEqualityCheck:Xv}}),mK=de([bc],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Yv)),pK=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),bNe=de([bc],pK),ZE=e=>e.map(t=>t.data).filter(Boolean).flat(1),wNe=de([bc],e=>e.some(t=>!t.data)),gK=de([bc],ZE,{memoizeOptions:{resultEqualityCheck:Xv}}),QE=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},JE=de([gK,ah],QE),vK=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:$t(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:$t(a,r)}))):e.map(r=>({value:r})),yK=(e,t,n,r,a,i)=>{var{chartData:s=[],dataStartIndex:l,dataEndIndex:c}=r,d=vK(e,t,n);if(a&&(t==null?void 0:t.dataKey)!=null&&i.length>0){var h=s.slice(l,c+1),m=h.map(g=>({value:$t(g,t.dataKey)})).filter(g=>g.value!=null);return[...m,...d]}return d},ch=de([JE,Sn,bc,ah,wNe,gK],yK);function Lu(e){if(fi(e)||e instanceof Date){var t=Number(e);if(Nt(t))return t}}function qq(e){if(Array.isArray(e)){var t=[Lu(e[0]),Lu(e[1])];return ui(t)?t:void 0}var n=Lu(e);if(n!=null)return[n,n]}function pi(e){return e.map(Lu).filter(Tr)}function SNe(e,t){var n=Lu(e),r=Lu(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var jNe=de([ch],e=>e==null?void 0:e.map(t=>t.value).sort(SNe));function xK(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function _Ne(e,t,n){if(!n)return[];if(!n.length)return[];var r;if(typeof t=="number"&&!di(t))r=t;else if(Array.isArray(t)){var a=pi(t);a.length>0&&(r=Math.max(...a))}return r==null?[]:pi(n.flatMap(i=>{var s=$t(e,i.dataKey),l,c;if(Array.isArray(s)?[l,c]=s:l=c=s,!(!Nt(l)||!Nt(c)))return[r-l,r+c]}))}var Un=e=>{var t=Zn(e),n=yc(e);return xc(e,t,n)},tc=de([Un],e=>e==null?void 0:e.dataKey),kNe=de([mK,ah,Un],TV),bK=(e,t,n,r)=>{var a={},i=t.reduce((s,l)=>{if(l.stackId==null)return s;var c=s[l.stackId];return c==null&&(c=[]),c.push(l),s[l.stackId]=c,s},a);return Object.fromEntries(Object.entries(i).map(s=>{var[l,c]=s,d=r?[...c].reverse():c,h=d.map(kE);return[l,{stackedData:tSe(e,h,n),graphicalItems:d}]}))},pN=de([kNe,mK,ih,jV],bK),wK=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var s=sSe(e,a,i);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},CNe=de([Sn],e=>e.allowDataOverflow),eA=e=>{var t;if(e==null||!("domain"in e))return mN;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=pi(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:mN},tA=de([Sn],eA),nA=de([tA,CNe],cV),NNe=de([pN,Ha,pn,nA],wK,{memoizeOptions:{resultEqualityCheck:Wv}}),ay=e=>e.errorBars,ENe=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>xK(n,r)),jg=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.filter(Boolean);if(a.length!==0){var i=a.flat(),s=Math.min(...i),l=Math.max(...i);return[s,l]}},rA=function(t,n,r,a,i){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l,c;if(r.length>0&&r.forEach(d=>{var h,m=d.data!=null?[...d.data]:s,g=(h=a[d.id])===null||h===void 0?void 0:h.filter(v=>xK(i,v));m.forEach(v=>{var b,w=$t(v,(b=n.dataKey)!==null&&b!==void 0?b:d.dataKey),S=_Ne(v,w,g);if(S.length>=2){var j=Math.min(...S),k=Math.max(...S);(l==null||j<l)&&(l=j),(c==null||k>c)&&(c=k)}var _=qq(w);_!=null&&(l=l==null?_[0]:Math.min(l,_[0]),c=c==null?_[1]:Math.max(c,_[1]))})}),(n==null?void 0:n.dataKey)!=null&&r.length===0&&t.forEach(d=>{var h=qq($t(d,n.dataKey));h!=null&&(l=l==null?h[0]:Math.min(l,h[0]),c=c==null?h[1]:Math.max(c,h[1]))}),Nt(l)&&Nt(c))return[l,c]},ANe=de([JE,Sn,bNe,ay,pn,F_e],rA,{memoizeOptions:{resultEqualityCheck:Wv}});function TNe(e){var{value:t}=e;if(fi(t)||t instanceof Date)return t}var ONe=(e,t,n)=>{var r=e.map(TNe).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&R7(r))?uV(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},SK=e=>e.referenceElements.dots,wc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),MNe=de([SK,pn,sh],wc),jK=e=>e.referenceElements.areas,PNe=de([jK,pn,sh],wc),_K=e=>e.referenceElements.lines,DNe=de([_K,pn,sh],wc),kK=(e,t)=>{if(e!=null){var n=pi(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},RNe=de(MNe,pn,kK),CK=(e,t)=>{if(e!=null){var n=pi(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},INe=de([PNe,pn],CK);function LNe(e){var t;if(e.x!=null)return pi([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:pi(n)}function zNe(e){var t;if(e.y!=null)return pi([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:pi(n)}var NK=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?LNe(r):zNe(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},$Ne=de([DNe,pn],NK),qNe=de(RNe,$Ne,INe,(e,t,n)=>jg(e,n,t)),aA=(e,t,n,r,a,i,s,l)=>{if(n!=null)return n;var c=s==="vertical"&&l==="xAxis"||s==="horizontal"&&l==="yAxis",d=c?jg(r,i,a):jg(i,a);return G_e(t,d,e.allowDataOverflow)},BNe=de([Sn,tA,nA,NNe,ANe,qNe,Rt,pn],aA,{memoizeOptions:{resultEqualityCheck:Wv}}),FNe=[0,1],iA=(e,t,n,r,a,i,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:l,type:c}=e,d=ds(t,i);if(d&&l==null){var h;return uV(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return c==="category"?ONe(r,e,d):a==="expand"&&!d?FNe:s}},sA=de([Sn,Rt,JE,ch,ih,pn,BNe],iA),ho=de([Sn,hK,xE],uK),oA=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var a=eA(t),i=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&ui(e)){if(i)return iq(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return sq(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(i&&ui(e))return iq(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ui(e))return sq(e,t.tickCount,t.allowDecimals,"adaptive")}}},lA=de([sA,xc,ho],oA),uA=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ui(t)&&Array.isArray(n)&&n.length>0){var a,i,s=t[0],l=(a=n[0])!==null&&a!==void 0?a:0,c=t[1],d=(i=n[n.length-1])!==null&&i!==void 0?i:0;return[Math.min(s,l),Math.max(c,d)]}return t},HNe=de([Sn,sA,lA,pn],uA),UNe=de(ch,Sn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(pi(e.map(m=>m.value))).sort((m,g)=>m-g),a=r[0],i=r[r.length-1];if(a==null||i==null)return 1/0;var s=i-a;if(s===0)return 1/0;for(var l=0;l<r.length-1;l++){var c=r[l],d=r[l+1];if(!(c==null||d==null)){var h=d-c;n=Math.min(n,h)}}return n/s}}),EK=de(UNe,Rt,SV,Fn,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!Nt(e))return 0;var i=t==="vertical"?r.height:r.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var s=dr(n,e*i),l=e*i/2;return l-s-(l-s)/i*s}return 0}),GNe=(e,t,n)=>{var r=ps(e,t);return r==null||typeof r.padding!="string"?0:EK(e,"xAxis",t,n,r.padding)},VNe=(e,t,n)=>{var r=gs(e,t);return r==null||typeof r.padding!="string"?0:EK(e,"yAxis",t,n,r.padding)},KNe=de(ps,GNe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((n=a.left)!==null&&n!==void 0?n:0)+t,right:((r=a.right)!==null&&r!==void 0?r:0)+t}}),YNe=de(gs,VNe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((n=a.top)!==null&&n!==void 0?n:0)+t,bottom:((r=a.bottom)!==null&&r!==void 0?r:0)+t}}),WNe=de([Fn,KNe,qv,$v,(e,t,n)=>n],(e,t,n,r,a)=>{var{padding:i}=r;return a?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),XNe=de([Fn,Rt,YNe,qv,$v,(e,t,n)=>n],(e,t,n,r,a,i)=>{var{padding:s}=a;return i?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),dh=(e,t,n,r)=>{var a;switch(t){case"xAxis":return WNe(e,n,r);case"yAxis":return XNe(e,n,r);case"zAxis":return(a=YE(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return NV(e);case"radiusAxis":return EV(e,n);default:return}},AK=de([Sn,dh],Gv),ZNe=de([ho,HNe],OV),cA=de([Sn,ho,ZNe,AK],KE),TK=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:a,scale:i}=n,s=ds(e,r);if(s&&(a==="number"||i!=="auto"))return t.map(l=>l.value)}},dA=de([Rt,ch,xc,pn],TK),iy=de([cA],CE);de([cA],hNe);de([cA,jNe],cK);de([bc,ay,pn],ENe);function OK(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var sy=(e,t)=>t,oy=(e,t,n)=>n,QNe=de(Lv,sy,oy,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(OK)),JNe=de(zv,sy,oy,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(OK)),MK=(e,t)=>({width:e.width,height:t.height}),e2e=(e,t)=>{var n=typeof t.width=="number"?t.width:Xf;return{width:n,height:e.height}},PK=de(Fn,ps,MK),t2e=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},n2e=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},r2e=de(hs,Fn,QNe,sy,oy,(e,t,n,r,a)=>{var i={},s;return n.forEach(l=>{var c=MK(t,l);s==null&&(s=t2e(t,r,e));var d=r==="top"&&!a||r==="bottom"&&a;i[l.id]=s-Number(d)*c.height,s+=(d?-1:1)*c.height}),i}),a2e=de(fs,Fn,JNe,sy,oy,(e,t,n,r,a)=>{var i={},s;return n.forEach(l=>{var c=e2e(t,l);s==null&&(s=n2e(t,r,e));var d=r==="left"&&!a||r==="right"&&a;i[l.id]=s-Number(d)*c.width,s+=(d?-1:1)*c.width}),i}),i2e=(e,t)=>{var n=ps(e,t);if(n!=null)return r2e(e,n.orientation,n.mirror)},s2e=de([Fn,ps,i2e,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),o2e=(e,t)=>{var n=gs(e,t);if(n!=null)return a2e(e,n.orientation,n.mirror)},l2e=de([Fn,gs,o2e,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),DK=de(Fn,gs,(e,t)=>{var n=typeof t.width=="number"?t.width:Xf;return{width:n,height:e.height}}),Bq=(e,t,n)=>{switch(t){case"xAxis":return PK(e,n).width;case"yAxis":return DK(e,n).height;default:return}},RK=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,l=ds(e,r),c=t.map(h=>h.value),d=c.filter(h=>h!=null);if(s&&l&&i==="category"&&a&&R7(d))return c}},fA=de([Rt,ch,Sn,pn],RK),Fq=de([Rt,yNe,ho,iy,fA,dA,dh,lA,pn],(e,t,n,r,a,i,s,l,c)=>{if(t!=null){var d=ds(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:i,duplicateDomain:a,isCategorical:d,niceTicks:l,range:s,realScaleType:n,scale:r}}}),u2e=(e,t,n,r,a,i,s,l,c)=>{if(!(t==null||r==null)){var d=ds(e,c),{type:h,ticks:m,tickCount:g}=t,v=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,b=h==="category"&&r.bandwidth?r.bandwidth()/v:0;b=c==="angleAxis"&&i!=null&&i.length>=2?Wn(i[0]-i[1])*2*b:b;var w=m||a;return w?w.map((S,j)=>{var k=s?s.indexOf(S):S,_=r.map(k);return Nt(_)?{index:j,coordinate:_+b,value:S,offset:b}:null}).filter(Tr):d&&l?l.map((S,j)=>{var k=r.map(S);return Nt(k)?{coordinate:k+b,value:S,index:j,offset:b}:null}).filter(Tr):r.ticks?r.ticks(g).map((S,j)=>{var k=r.map(S);return Nt(k)?{coordinate:k+b,value:S,index:j,offset:b}:null}).filter(Tr):r.domain().map((S,j)=>{var k=r.map(S);return Nt(k)?{coordinate:k+b,value:s?s[S]:S,index:j,offset:b}:null}).filter(Tr)}},IK=de([Rt,xc,ho,iy,lA,dh,fA,dA,pn],u2e),c2e=(e,t,n,r,a,i,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var l=ds(e,s),{tickCount:c}=t,d=0;return d=s==="angleAxis"&&(r==null?void 0:r.length)>=2?Wn(r[0]-r[1])*2*d:d,l&&i?i.map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.ticks?n.ticks(c).map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Tr):n.domain().map((h,m)=>{var g=n.map(h);return Nt(g)?{coordinate:g+d,value:a?a[h]:h,index:m,offset:d}:null}).filter(Tr)}},no=de([Rt,xc,iy,dh,fA,dA,pn],c2e),ro=de(Sn,iy,(e,t)=>{if(!(e==null||t==null))return Sg(Sg({},e),{},{scale:t})}),d2e=de([Sn,ho,sA,AK],KE),f2e=de([d2e],CE);de((e,t,n)=>YE(e,n),f2e,(e,t)=>{if(!(e==null||t==null))return Sg(Sg({},e),{},{scale:t})});var h2e=de([Rt,Lv,zv],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),m2e=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};de([m2e],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,a=e[0];for(var i of e){var s=Math.abs(i.coordinate-t);s<r&&(r=s,a=i)}return(n=a)===null||n===void 0?void 0:n.value}});var LK=e=>e.options.defaultTooltipEventType,zK=e=>e.options.validateTooltipEventTypes;function $K(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function fh(e,t){var n=LK(e),r=zK(e);return $K(t,n,r)}function p2e(e){return Ve(t=>fh(t,e))}var qK=(e,t)=>{var n,r=Number(t);if(!(di(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},g2e=e=>e.tooltip.settings,Qs={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},v2e={itemInteraction:{click:Qs,hover:Qs},axisInteraction:{click:Qs,hover:Qs},keyboardInteraction:Qs,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}},BK=hr({name:"tooltip",initialState:v2e,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:nn()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ma(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:nn()},removeTooltipEntrySettings:{reducer(e,t){var n=ma(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:nn()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:y2e,replaceTooltipEntrySettings:x2e,removeTooltipEntrySettings:b2e,setTooltipSettingsState:w2e,setActiveMouseOverItemIndex:FK,mouseLeaveItem:S2e,mouseLeaveChart:HK,setActiveClickItemIndex:j2e,setMouseOverAxisIndex:UK,setMouseClickAxisIndex:_2e,setSyncInteraction:qd,setKeyboardInteraction:_g}=BK.actions,k2e=BK.reducer;function Hq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hq(Object(n),!0).forEach(function(r){C2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C2e(e,t,n){return(t=N2e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N2e(e){var t=E2e(e,"string");return typeof t=="symbol"?t:t+""}function E2e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A2e(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function T2e(e){return e.index!=null}var GK=(e,t,n,r)=>{if(t==null)return Qs;var a=A2e(e,t,n);if(a==null)return Qs;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(T2e(a)){if(i)return np(np({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return np(np({},Qs),{},{coordinate:a.coordinate})};function O2e(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function M2e(e,t){var n=O2e(e),r=t[0],a=t[1];if(n===void 0)return!1;var i=Math.min(r,a),s=Math.max(r,a);return n>=i&&n<=s}function P2e(e,t,n){if(n==null||t==null)return!0;var r=$t(e,t);return r==null||!ui(n)?!0:M2e(r,n)}var Yd=(e,t,n,r)=>{var a=e==null?void 0:e.index;if(a==null)return null;var i=Number(a);if(!Nt(i))return a;var s=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(s,Math.min(i,l)),d=t[c];return d==null||P2e(d,n,r)?String(c):null},VK=(e,t,n,r,a,i,s)=>{if(i!=null){var l=s[0],c=l==null?void 0:l.getPosition(i);if(c!=null)return c;var d=a==null?void 0:a[Number(i)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:d.coordinate}}}},KK=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(n==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&(r!=null||e.keyboardInteraction.active)){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(s=>{var l;return((l=s.settings)===null||l===void 0?void 0:l.graphicalItemId)===a})},YK=e=>e.options.tooltipPayloadSearcher,Sc=e=>e.tooltip;function Uq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uq(Object(n),!0).forEach(function(r){D2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D2e(e,t,n){return(t=R2e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R2e(e){var t=I2e(e,"string");return typeof t=="symbol"?t:t+""}function I2e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L2e(e){if(typeof e=="string"||typeof e=="number")return e}function z2e(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function $2e(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function Vq(e){if(typeof e=="string")return e}function q2e(e){if(!(e==null||typeof e!="object")){var t="name"in e?L2e(e.name):void 0,n="unit"in e?z2e(e.unit):void 0,r="dataKey"in e?$2e(e.dataKey):void 0,a="payload"in e?e.payload:void 0,i="color"in e?Vq(e.color):void 0,s="fill"in e?Vq(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:a,color:i,fill:s}}}function B2e(e,t){return e??t}var WK=(e,t,n,r,a,i,s)=>{if(!(t==null||i==null)){var{chartData:l,computedData:c,dataStartIndex:d,dataEndIndex:h}=n,m=[];return e.reduce((g,v)=>{var b,{dataDefinedOnItem:w,settings:S}=v,j=B2e(w,l),k=Array.isArray(j)?EG(j,d,h):j,_=(b=S==null?void 0:S.dataKey)!==null&&b!==void 0?b:r,E=S==null?void 0:S.nameKey,T;if(r&&Array.isArray(k)&&!Array.isArray(k[0])&&s==="axis"?T=I7(k,r,a):T=i(k,t,c,E),Array.isArray(T))T.forEach(O=>{var D,P,M=q2e(O),z=M==null?void 0:M.name,L=M==null?void 0:M.dataKey,F=M==null?void 0:M.payload,R=Gq(Gq({},S),{},{name:z,unit:M==null?void 0:M.unit,color:(D=M==null?void 0:M.color)!==null&&D!==void 0?D:S==null?void 0:S.color,fill:(P=M==null?void 0:M.fill)!==null&&P!==void 0?P:S==null?void 0:S.fill});g.push(W6({tooltipEntrySettings:R,dataKey:L,payload:F,value:$t(F,L),name:z==null?void 0:String(z)}))});else{var A;g.push(W6({tooltipEntrySettings:S,dataKey:_,payload:T,value:$t(T,_),name:(A=$t(T,E))!==null&&A!==void 0?A:S==null?void 0:S.name}))}return g},m)}},hA=de([Un,hK,xE],uK),F2e=de([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),H2e=de([Zn,yc],WE),Al=de([F2e,Un,H2e],XE,{memoizeOptions:{resultEqualityCheck:Xv}}),U2e=de([Al],e=>e.filter(Yv)),XK=de([Al],ZE,{memoizeOptions:{resultEqualityCheck:Xv}}),G2e=de([Al],e=>e.some(t=>!t.data)),pl=de([XK,Ha],QE),V2e=de([U2e,Ha,Un],TV),mA=de([pl,Un,Al,Ha,G2e,XK],yK),ZK=de([Un],eA),K2e=de([Un],e=>e.allowDataOverflow),QK=de([ZK,K2e],cV),Y2e=de([Al],e=>e.filter(Yv)),W2e=de([V2e,Y2e,ih,jV],bK),X2e=de([W2e,Ha,Zn,QK],wK),Z2e=de([Al],pK),Q2e=de([pl,Un,Z2e,ay,Zn,U_e],rA,{memoizeOptions:{resultEqualityCheck:Wv}}),J2e=de([SK,Zn,yc],wc),eEe=de([J2e,Zn],kK),tEe=de([jK,Zn,yc],wc),nEe=de([tEe,Zn],CK),rEe=de([_K,Zn,yc],wc),aEe=de([rEe,Zn],NK),iEe=de([eEe,aEe,nEe],jg),sEe=de([Un,ZK,QK,X2e,Q2e,iEe,Rt,Zn],aA),nc=de([Un,Rt,pl,mA,ih,Zn,sEe],iA),oEe=de([nc,Un,hA],oA),lEe=de([Un,nc,oEe,Zn],uA),JK=e=>{var t=Zn(e),n=yc(e),r=!1;return dh(e,t,n,r)},eY=de([Un,JK],Gv),uEe=de([Un,hA,lEe,eY],KE),tY=de([uEe],CE),cEe=de([Rt,mA,Un,Zn],RK),dEe=de([Rt,mA,Un,Zn],TK),fEe=(e,t,n,r,a,i,s,l)=>{if(t){var{type:c}=t,d=ds(e,l);if(r){var h=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,m=c==="category"&&r.bandwidth?r.bandwidth()/h:0;return m=l==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Wn(a[0]-a[1])*2*m:m,d&&s?s.map((g,v)=>{var b=r.map(g);return Nt(b)?{coordinate:b+m,value:g,index:v,offset:m}:null}).filter(Tr):r.domain().map((g,v)=>{var b=r.map(g);return Nt(b)?{coordinate:b+m,value:i?i[g]:g,index:v,offset:m}:null}).filter(Tr)}}},vs=de([Rt,Un,hA,tY,JK,cEe,dEe,Zn],fEe),pA=de([LK,zK,g2e],(e,t,n)=>$K(n.shared,e,t)),nY=e=>e.tooltip.settings.trigger,gA=e=>e.tooltip.settings.defaultIndex,hh=de([Sc,pA,nY,gA],GK),ao=de([hh,pl,tc,nc],Yd),rY=de([vs,ao],qK),vA=de([hh],e=>{if(e)return e.dataKey}),aY=de([hh],e=>{if(e)return e.graphicalItemId}),iY=de([Sc,pA,nY,gA],KK),hEe=de([fs,hs,Rt,Fn,vs,gA,iY],VK),mEe=de([hh,hEe],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),pEe=de([hh],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),gEe=de([iY,ao,Ha,tc,rY,YK,pA],WK),vEe=de([gEe],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function Kq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kq(Object(n),!0).forEach(function(r){yEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yEe(e,t,n){return(t=xEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xEe(e){var t=bEe(e,"string");return typeof t=="symbol"?t:t+""}function bEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wEe=()=>Ve(Un),SEe=()=>{var e=wEe(),t=Ve(vs),n=Ve(tY);return Xu(!e||!n?void 0:Yq(Yq({},e),{},{scale:n}),t)};function Wq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wq(Object(n),!0).forEach(function(r){jEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jEe(e,t,n){return(t=_Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ee(e){var t=kEe(e,"string");return typeof t=="symbol"?t:t+""}function kEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CEe=(e,t,n,r)=>{var a=t.find(i=>i&&i.index===n);if(a){if(e==="horizontal")return{x:a.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}},NEe=(e,t,n,r)=>{var a=t.find(d=>d&&d.index===n);if(a){if(e==="centric"){var i=a.coordinate,{radius:s}=r;return Su(Su(Su({},r),Mn(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var l=a.coordinate,{angle:c}=r;return Su(Su(Su({},r),Mn(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function EEe(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var sY=(e,t,n,r,a)=>{var i,s=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var l=0;l<s;l++){var c,d,h,m,g,v=l>0?(c=n[l-1])===null||c===void 0?void 0:c.coordinate:(d=n[s-1])===null||d===void 0?void 0:d.coordinate,b=(h=n[l])===null||h===void 0?void 0:h.coordinate,w=l>=s-1?(m=n[0])===null||m===void 0?void 0:m.coordinate:(g=n[l+1])===null||g===void 0?void 0:g.coordinate,S=void 0;if(!(v==null||b==null||w==null))if(Wn(b-v)!==Wn(w-b)){var j=[];if(Wn(w-b)===Wn(a[1]-a[0])){S=w;var k=b+a[1]-a[0];j[0]=Math.min(k,(k+v)/2),j[1]=Math.max(k,(k+v)/2)}else{S=v;var _=w+a[1]-a[0];j[0]=Math.min(b,(_+b)/2),j[1]=Math.max(b,(_+b)/2)}var E=[Math.min(b,(S+b)/2),Math.max(b,(S+b)/2)];if(e>E[0]&&e<=E[1]||e>=j[0]&&e<=j[1]){var T;return(T=n[l])===null||T===void 0?void 0:T.index}}else{var A=Math.min(v,w),O=Math.max(v,w);if(e>(A+b)/2&&e<=(O+b)/2){var D;return(D=n[l])===null||D===void 0?void 0:D.index}}}else if(t)for(var P=0;P<s;P++){var M=t[P];if(M!=null){var z=t[P+1],L=t[P-1];if(P===0&&z!=null&&e<=(M.coordinate+z.coordinate)/2||P===s-1&&L!=null&&e>(M.coordinate+L.coordinate)/2||P>0&&P<s-1&&L!=null&&z!=null&&e>(M.coordinate+L.coordinate)/2&&e<=(M.coordinate+z.coordinate)/2)return M.index}}return-1},AEe=()=>Ve(xE),yA=(e,t)=>t,oY=(e,t,n)=>n,xA=(e,t,n,r)=>r,TEe=de(vs,e=>Nv(e,t=>t.coordinate)),bA=de([Sc,yA,oY,xA],GK),wA=de([bA,pl,tc,nc],Yd),OEe=(e,t,n)=>{if(t!=null){var r=Sc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},lY=de([Sc,yA,oY,xA],KK),kg=de([fs,hs,Rt,Fn,vs,xA,lY],VK),MEe=de([bA,kg],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),uY=de([vs,wA],qK),PEe=de([lY,wA,Ha,tc,uY,YK,yA],WK),DEe=de([bA,wA],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),REe=(e,t,n,r,a,i,s)=>{if(!(!e||!n||!r||!a)&&EEe(e,s)){var l=oSe(e,t),c=sY(l,i,a,n,r),d=CEe(t,a,c,e);return{activeIndex:String(c),activeCoordinate:d}}},IEe=(e,t,n,r,a,i,s)=>{if(!(!e||!r||!a||!i||!n)){var l=O_e(e,n);if(l){var c=lSe(l,t),d=sY(c,s,i,r,a),h=NEe(t,i,d,l);return{activeIndex:String(d),activeCoordinate:h}}}},LEe=(e,t,n,r,a,i,s,l)=>{if(!(!e||!t||!r||!a||!i))return t==="horizontal"||t==="vertical"?REe(e,t,r,a,i,s,l):IEe(e,t,n,r,a,i,s)},zEe=de(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),$Ee=de(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Pn)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:ake}});function Xq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xq(Object(n),!0).forEach(function(r){qEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qEe(e,t,n){return(t=BEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BEe(e){var t=FEe(e,"string");return typeof t=="symbol"?t:t+""}function FEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HEe={},UEe={zIndexMap:Object.values(Pn).reduce((e,t)=>Zq(Zq({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),HEe)},GEe=new Set(Object.values(Pn));function VEe(e){return GEe.has(e)}var cY=hr({name:"zIndex",initialState:UEe,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:nn()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!VEe(n)&&delete e.zIndexMap[n])},prepare:nn()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:a}=t.payload;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:a?void 0:r,panoramaElement:a?r:void 0}},prepare:nn()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:nn()}}}),{registerZIndexPortal:KEe,unregisterZIndexPortal:Hk,registerZIndexPortalElement:YEe,unregisterZIndexPortalElement:WEe}=cY.actions,XEe=cY.reducer;function Pr(e){var{zIndex:t,children:n}=e,r=zSe(),a=r&&t!==void 0&&t!==0,i=mr(),s=x.useRef(void 0),l=x.useRef(new Set),c=Jt(),d=Ve(m=>zEe(m,t,i));if(x.useLayoutEffect(()=>{if(!a){var m=l.current;m.forEach(v=>{c(Hk({zIndex:v}))}),m.clear(),s.current=void 0;return}if(l.current.has(t)||(c(KEe({zIndex:t})),l.current.add(t)),d){s.current=d;var g=l.current;g.forEach(v=>{v!==t&&(c(Hk({zIndex:v})),g.delete(v))})}},[c,t,a,d]),x.useLayoutEffect(()=>{var m=l.current;return()=>{m.forEach(g=>{c(Hk({zIndex:g}))}),m.clear()}},[c]),!a)return n;var h=d??s.current;return h?vl.createPortal(n,h):null}function gN(){return gN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gN.apply(null,arguments)}function Qq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qq(Object(n),!0).forEach(function(r){ZEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZEe(e,t,n){return(t=QEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QEe(e){var t=JEe(e,"string");return typeof t=="symbol"?t:t+""}function JEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eAe(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return x.isValidElement(t)?x.cloneElement(t,r):x.createElement(n,r)}function tAe(e){var t,{coordinate:n,payload:r,index:a,offset:i,tooltipAxisBandSize:s,layout:l,cursor:c,tooltipEventType:d,chartName:h}=e,m=n,g=r,v=a;if(!c||!m||h!=="ScatterChart"&&d!=="axis")return null;var b,w,S;if(h==="ScatterChart")b=m,w=Vje,S=Pn.cursorLine;else if(h==="BarChart")b=Kje(l,m,i,s),w=aV,S=Pn.cursorRectangle;else if(l==="radial"&&$7(m)){var{cx:j,cy:k,radius:_,startAngle:E,endAngle:T}=sV(m);b={cx:j,cy:k,startAngle:E,endAngle:T,innerRadius:_,outerRadius:_},w=lV,S=Pn.cursorLine}else b={points:R_e(l,m,i)},w=pE,S=Pn.cursorLine;var A=typeof c=="object"&&"className"in c?c.className:void 0,O=rp(rp(rp(rp({stroke:"#ccc",pointerEvents:"none"},i),b),ol(c)),{},{payload:g,payloadIndex:v,className:Lt("recharts-tooltip-cursor",A)});return x.createElement(Pr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},x.createElement(eAe,{cursor:c,cursorComp:w,cursorProps:O}))}function nAe(e){var t=SEe(),n=LG(),r=Cl(),a=AEe();return t==null||n==null||r==null||a==null?null:x.createElement(tAe,gN({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var dY=x.createContext(null),rAe=()=>x.useContext(dY),Uk={exports:{}},Jq;function aAe(){return Jq||(Jq=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function i(c,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new a(h,m||c,g),b=n?n+d:d;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],v]:c._events[b].push(v):(c._events[b]=v,c._eventsCount++),c}function s(c,d){--c._eventsCount===0?c._events=new r:delete c._events[d]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)t.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},l.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,v=m.length,b=new Array(v);g<v;g++)b[g]=m[g].fn;return b},l.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},l.prototype.emit=function(d,h,m,g,v,b){var w=n?n+d:d;if(!this._events[w])return!1;var S=this._events[w],j=arguments.length,k,_;if(S.fn){switch(S.once&&this.removeListener(d,S.fn,void 0,!0),j){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,h),!0;case 3:return S.fn.call(S.context,h,m),!0;case 4:return S.fn.call(S.context,h,m,g),!0;case 5:return S.fn.call(S.context,h,m,g,v),!0;case 6:return S.fn.call(S.context,h,m,g,v,b),!0}for(_=1,k=new Array(j-1);_<j;_++)k[_-1]=arguments[_];S.fn.apply(S.context,k)}else{var E=S.length,T;for(_=0;_<E;_++)switch(S[_].once&&this.removeListener(d,S[_].fn,void 0,!0),j){case 1:S[_].fn.call(S[_].context);break;case 2:S[_].fn.call(S[_].context,h);break;case 3:S[_].fn.call(S[_].context,h,m);break;case 4:S[_].fn.call(S[_].context,h,m,g);break;default:if(!k)for(T=1,k=new Array(j-1);T<j;T++)k[T-1]=arguments[T];S[_].fn.apply(S[_].context,k)}}return!0},l.prototype.on=function(d,h,m){return i(this,d,h,m,!1)},l.prototype.once=function(d,h,m){return i(this,d,h,m,!0)},l.prototype.removeListener=function(d,h,m,g){var v=n?n+d:d;if(!this._events[v])return this;if(!h)return s(this,v),this;var b=this._events[v];if(b.fn)b.fn===h&&(!g||b.once)&&(!m||b.context===m)&&s(this,v);else{for(var w=0,S=[],j=b.length;w<j;w++)(b[w].fn!==h||g&&!b[w].once||m&&b[w].context!==m)&&S.push(b[w]);S.length?this._events[v]=S.length===1?S[0]:S:s(this,v)}return this},l.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(Uk)),Uk.exports}var iAe=aAe();const sAe=ea(iAe);var kf=new sAe,vN="recharts.syncEvent.tooltip",eB="recharts.syncEvent.brush",SA=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!di(n))return e[n]}},oAe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},fY=hr({name:"options",initialState:oAe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),lAe=fY.reducer,{createEventEmitter:uAe}=fY.actions;function cAe(e){return e.tooltip.syncInteraction}var dAe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},hY=hr({name:"chartData",initialState:dAe,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:tB,setDataStartEndIndexes:fAe,setComputedData:u3e}=hY.actions,hAe=hY.reducer,mAe=["x","y"];function nB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ju(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nB(Object(n),!0).forEach(function(r){pAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pAe(e,t,n){return(t=gAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gAe(e){var t=vAe(e,"string");return typeof t=="symbol"?t:t+""}function vAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yAe(e,t){if(e==null)return{};var n,r,a=xAe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function xAe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function bAe(){var e=Ve(bE),t=Ve(wE),n=Jt(),r=Ve(_V),a=Ve(vs),i=Cl(),s=Bv(),l=Ve(c=>c.rootProps.className);x.useEffect(()=>{if(e==null)return kl;var c=(d,h,m)=>{if(t!==m&&e===d){if(h.payload.active===!1){n(qd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r==="index"){var g;if(s&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var v=h.payload.coordinate,{x:b,y:w}=v,S=yAe(v,mAe),{x:j,y:k,width:_,height:E}=h.payload.sourceViewBox,T=ju(ju({},S),{},{x:s.x+(_?(b-j)/_:0)*s.width,y:s.y+(E?(w-k)/E:0)*s.height});n(ju(ju({},h),{},{payload:ju(ju({},h.payload),{},{coordinate:T})}))}else n(h);return}if(a!=null){var A;if(typeof r=="function"){var O={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},D=r(a,O);A=a[D]}else r==="value"&&(A=a.find(q=>String(q.value)===h.payload.label));var{coordinate:P}=h.payload;if(P==null||s==null){n(qd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(A==null){n(qd({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:M,y:z}=P,L=Math.min(M,s.x+s.width),F=Math.min(z,s.y+s.height),R={x:i==="horizontal"?A.coordinate:L,y:i==="horizontal"?F:A.coordinate},I=qd({active:h.payload.active,coordinate:R,dataKey:h.payload.dataKey,index:String(A.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(I)}}};return kf.on(vN,c),()=>{kf.off(vN,c)}},[l,n,t,e,r,a,i,s])}function wAe(){var e=Ve(bE),t=Ve(wE),n=Jt();x.useEffect(()=>{if(e==null)return kl;var r=(a,i,s)=>{t!==s&&e===a&&n(fAe(i))};return kf.on(eB,r),()=>{kf.off(eB,r)}},[n,t,e])}function SAe(){var e=Jt();x.useEffect(()=>{e(uAe())},[e]),bAe(),wAe()}function jAe(e,t,n,r,a,i){var s=Ve(b=>OEe(b,e,t)),l=Ve(aY),c=Ve(wE),d=Ve(bE),h=Ve(_V),m=Ve(cAe),g=(m==null?void 0:m.sourceViewBox)!=null,v=Bv();x.useEffect(()=>{if(!g&&d!=null&&c!=null){var b=qd({active:i,coordinate:n,dataKey:s,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:v,graphicalItemId:l});kf.emit(vN,d,b,c)}},[g,n,s,l,a,r,c,d,h,i,v])}function rB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rB(Object(n),!0).forEach(function(r){_Ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Ae(e,t,n){return(t=kAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kAe(e){var t=CAe(e,"string");return typeof t=="symbol"?t:t+""}function CAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NAe(e){return e.dataKey}function EAe(e,t){return x.isValidElement(e)?x.cloneElement(e,t):typeof e=="function"?x.createElement(e,t):x.createElement(wje,t)}var iB=[],AAe={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 ap(e){var t,n,r=Xn(e,AAe),{active:a,allowEscapeViewBox:i,animationDuration:s,animationEasing:l,content:c,filterNull:d,isAnimationActive:h,offset:m,payloadUniqBy:g,position:v,reverseDirection:b,useTranslate3d:w,wrapperStyle:S,cursor:j,shared:k,trigger:_,defaultIndex:E,portal:T,axisId:A}=r,O=Jt(),D=typeof E=="number"?String(E):E;x.useEffect(()=>{O(w2e({shared:k,trigger:_,axisId:A,active:a,defaultIndex:D}))},[O,k,_,A,a,D]);var P=Bv(),M=JG(),z=p2e(k),{activeIndex:L,isActive:F}=(t=Ve(oe=>DEe(oe,z,_,D)))!==null&&t!==void 0?t:{},R=Ve(oe=>PEe(oe,z,_,D)),I=Ve(oe=>uY(oe,z,_,D)),q=Ve(oe=>MEe(oe,z,_,D)),G=R,Y=rAe(),K=(n=a??F)!==null&&n!==void 0?n:!1,[B,U]=V1e([G,K]),X=z==="axis"?I:void 0;jAe(z,_,q,X,L,K);var H=T??Y;if(H==null||P==null||z==null)return null;var W=G??iB;K||(W=iB),d&&W.length&&(W=j1e(W.filter(oe=>oe.value!=null&&(oe.hide!==!0||r.includeHidden)),g,NAe));var Q=W.length>0,J=aB(aB({},r),{},{payload:W,label:X,active:K,activeIndex:L,coordinate:q,accessibilityLayer:M}),re=x.createElement(Mje,{allowEscapeViewBox:i,animationDuration:s,animationEasing:l,isAnimationActive:h,active:K,coordinate:q,hasPayload:Q,offset:m,position:v,reverseDirection:b,useTranslate3d:w,viewBox:P,wrapperStyle:S,lastBoundingBox:B,innerRef:U,hasPortalFromProps:!!T},EAe(c,J));return x.createElement(x.Fragment,null,vl.createPortal(re,H),K&&x.createElement(nAe,{cursor:j,tooltipEventType:z,coordinate:q,payload:W,index:L}))}var mh=e=>null;mh.displayName="Cell";function TAe(e,t,n){return(t=OAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OAe(e){var t=MAe(e,"string");return typeof t=="symbol"?t:t+""}function MAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class PAe{constructor(t){TAe(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function sB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function DAe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sB(Object(n),!0).forEach(function(r){RAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RAe(e,t,n){return(t=IAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IAe(e){var t=LAe(e,"string");return typeof t=="symbol"?t:t+""}function LAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zAe={cacheSize:2e3,enableCache:!0},mY=DAe({},zAe),oB=new PAe(mY.cacheSize),$Ae={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},lB="recharts_measurement_span";function qAe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",i=t.fontStyle||"",s=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(s,"|").concat(l)}var uB=(e,t)=>{try{var n=document.getElementById(lB);n||(n=document.createElement("span"),n.setAttribute("id",lB),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,$Ae,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Wd=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||eh.isSsr)return{width:0,height:0};if(!mY.enableCache)return uB(t,n);var r=qAe(t,n),a=oB.get(r);if(a)return a;var i=uB(t,n);return oB.set(r,i),i},pY;function BAe(e,t,n){return(t=FAe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FAe(e){var t=HAe(e,"string");return typeof t=="symbol"?t:t+""}function HAe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cB=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,dB=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,UAe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,GAe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,VAe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},KAe=["cm","mm","pt","pc","in","Q","px"];function YAe(e){return KAe.includes(e)}var Mu="NaN";function WAe(e,t){return e*VAe[t]}class ar{static parse(t){var n,[,r,a]=(n=GAe.exec(t))!==null&&n!==void 0?n:[];return r==null?ar.NaN:new ar(parseFloat(r),a??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,di(t)&&(this.unit=""),n!==""&&!UAe.test(n)&&(this.num=NaN,this.unit=""),YAe(n)&&(this.num=WAe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return di(this.num)}}pY=ar;BAe(ar,"NaN",new pY(NaN,""));function gY(e){if(e==null||e.includes(Mu))return Mu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=(n=cB.exec(t))!==null&&n!==void 0?n:[],s=ar.parse(r??""),l=ar.parse(i??""),c=a==="*"?s.multiply(l):s.divide(l);if(c.isNaN())return Mu;t=t.replace(cB,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,[,h,m,g]=(d=dB.exec(t))!==null&&d!==void 0?d:[],v=ar.parse(h??""),b=ar.parse(g??""),w=m==="+"?v.add(b):v.subtract(b);if(w.isNaN())return Mu;t=t.replace(dB,w.toString())}return t}var fB=/\(([^()]*)\)/;function XAe(e){for(var t=e,n;(n=fB.exec(t))!=null;){var[,r]=n;t=t.replace(fB,gY(r))}return t}function ZAe(e){var t=e.replace(/\s+/g,"");return t=XAe(t),t=gY(t),t}function QAe(e){try{return ZAe(e)}catch{return Mu}}function Gk(e){var t=QAe(e.slice(5,-1));return t===Mu?"":t}var JAe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],eTe=["dx","dy","angle","className","breakAll"];function yN(){return yN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yN.apply(null,arguments)}function hB(e,t){if(e==null)return{};var n,r,a=tTe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function tTe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vY=/[ \f\n\r\t\v\u2028\u2029]+/,yY=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];cn(t)||(n?a=t.toString().split(""):a=t.toString().split(vY));var i=a.map(l=>({word:l,width:Wd(l,r).width})),s=n?0:Wd(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}};function xY(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function nTe(e){return cn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var bY=(e,t,n,r)=>e.reduce((a,i)=>{var{word:s,width:l}=i,c=a[a.length-1];if(c&&l!=null&&(t==null||r||c.width+l+n<Number(t)))c.words.push(s),c.width+=l+n;else{var d={words:[s],width:l};a.push(d)}return a},[]),wY=e=>e.reduce((t,n)=>t.width>n.width?t:n),rTe="…",mB=(e,t,n,r,a,i,s,l)=>{var c=e.slice(0,t),d=yY({breakAll:n,style:r,children:c+rTe});if(!d)return[!1,[]];var h=bY(d.wordsWithComputedWidth,i,s,l),m=h.length>a||wY(h).width>Number(i);return[m,h]},aTe=(e,t,n,r,a)=>{var{maxLines:i,children:s,style:l,breakAll:c}=e,d=Be(i),h=String(s),m=bY(t,r,n,a);if(!d||a)return m;var g=m.length>i||wY(m).width>Number(r);if(!g)return m;for(var v=0,b=h.length-1,w=0,S;v<=b&&w<=h.length-1;){var j=Math.floor((v+b)/2),k=j-1,[_,E]=mB(h,k,c,l,i,r,n,a),[T]=mB(h,j,c,l,i,r,n,a);if(!_&&!T&&(v=j+1),_&&T&&(b=j-1),!_&&T){S=E;break}w++}return S||m},pB=e=>{var t=cn(e)?[]:e.toString().split(vY);return[{words:t,width:void 0}]},iTe=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!eh.isSsr){var l,c,d=yY({breakAll:i,children:r,style:a});if(d){var{wordsWithComputedWidth:h,spaceWidth:m}=d;l=h,c=m}else return pB(r);return aTe({breakAll:i,children:r,maxLines:s,style:a},l,c,t,!!n)}return pB(r)},SY="#808080",sTe={angle:0,breakAll:!1,capHeight:"0.71em",fill:SY,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},ly=x.forwardRef((e,t)=>{var n=Xn(e,sTe),{x:r,y:a,lineHeight:i,capHeight:s,fill:l,scaleToFit:c,textAnchor:d,verticalAnchor:h}=n,m=hB(n,JAe),g=x.useMemo(()=>iTe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:c,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,c,m.style,m.width]),{dx:v,dy:b,angle:w,className:S,breakAll:j}=m,k=hB(m,eTe);if(!fi(r)||!fi(a)||g.length===0)return null;var _=Number(r)+(Be(v)?v:0),E=Number(a)+(Be(b)?b:0);if(!Nt(_)||!Nt(E))return null;var T;switch(h){case"start":T=Gk("calc(".concat(s,")"));break;case"middle":T=Gk("calc(".concat((g.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:T=Gk("calc(".concat(g.length-1," * -").concat(i,")"));break}var A=[],O=g[0];if(c&&O!=null){var D=O.width,{width:P}=m;A.push("scale(".concat(Be(P)&&Be(D)?P/D:1,")"))}return w&&A.push("rotate(".concat(w,", ").concat(_,", ").concat(E,")")),A.length&&(k.transform=A.join(" ")),x.createElement("text",yN({},xr(k),{ref:t,x:_,y:E,className:Lt("recharts-text",S),textAnchor:d,fill:l.includes("url")?SY:l}),g.map((M,z)=>{var L=M.words.join(j?"":" ");return x.createElement("tspan",{x:_,dy:z===0?T:i,key:"".concat(L,"-").concat(z)},L)}))});ly.displayName="Text";function gB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gB(Object(n),!0).forEach(function(r){oTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oTe(e,t,n){return(t=lTe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lTe(e){var t=uTe(e,"string");return typeof t=="symbol"?t:t+""}function uTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cTe=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:l,upperWidth:c,lowerWidth:d}=fE(t),h=i,m=i+(c-d)/2,g=(h+m)/2,v=(c+d)/2,b=h+c/2,w=l>=0?1:-1,S=w*r,j=w>0?"end":"start",k=w>0?"start":"end",_=c>=0?1:-1,E=_*r,T=_>0?"end":"start",A=_>0?"start":"end",O=a;if(n==="top"){var D={x:h+c/2,y:s-S,horizontalAnchor:"middle",verticalAnchor:j};return O&&(D.height=Math.max(s-O.y,0),D.width=c),D}if(n==="bottom"){var P={x:m+d/2,y:s+l+S,horizontalAnchor:"middle",verticalAnchor:k};return O&&(P.height=Math.max(O.y+O.height-(s+l),0),P.width=d),P}if(n==="left"){var M={x:g-E,y:s+l/2,horizontalAnchor:T,verticalAnchor:"middle"};return O&&(M.width=Math.max(M.x-O.x,0),M.height=l),M}if(n==="right"){var z={x:g+v+E,y:s+l/2,horizontalAnchor:A,verticalAnchor:"middle"};return O&&(z.width=Math.max(O.x+O.width-z.x,0),z.height=l),z}var L=O?{width:v,height:l}:{};return n==="insideLeft"?ti({x:g+E,y:s+l/2,horizontalAnchor:A,verticalAnchor:"middle"},L):n==="insideRight"?ti({x:g+v-E,y:s+l/2,horizontalAnchor:T,verticalAnchor:"middle"},L):n==="insideTop"?ti({x:h+c/2,y:s+S,horizontalAnchor:"middle",verticalAnchor:k},L):n==="insideBottom"?ti({x:m+d/2,y:s+l-S,horizontalAnchor:"middle",verticalAnchor:j},L):n==="insideTopLeft"?ti({x:h+E,y:s+S,horizontalAnchor:A,verticalAnchor:k},L):n==="insideTopRight"?ti({x:h+c-E,y:s+S,horizontalAnchor:T,verticalAnchor:k},L):n==="insideBottomLeft"?ti({x:m+E,y:s+l-S,horizontalAnchor:A,verticalAnchor:j},L):n==="insideBottomRight"?ti({x:m+d-E,y:s+l-S,horizontalAnchor:T,verticalAnchor:j},L):n&&typeof n=="object"&&(Be(n.x)||cl(n.x))&&(Be(n.y)||cl(n.y))?ti({x:i+dr(n.x,v),y:s+dr(n.y,l),horizontalAnchor:"end",verticalAnchor:"end"},L):ti({x:b,y:s+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},L)},dTe=["labelRef"],fTe=["content"];function vB(e,t){if(e==null)return{};var n,r,a=hTe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hTe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function yB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yB(Object(n),!0).forEach(function(r){mTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mTe(e,t,n){return(t=pTe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pTe(e){var t=gTe(e,"string");return typeof t=="symbol"?t:t+""}function gTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(null,arguments)}var jY=x.createContext(null),vTe=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s,children:l}=e,c=x.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s}),[t,n,r,a,i,s]);return x.createElement(jY.Provider,{value:c},l)},_Y=()=>{var e=x.useContext(jY),t=Bv();return e||(t?fE(t):void 0)},yTe=x.createContext(null),xTe=()=>{var e=x.useContext(yTe),t=Ve(AV);return e||t},bTe=e=>{var{value:t,formatter:n}=e,r=cn(e.children)?t:e.children;return typeof n=="function"?n(r):r},jA=e=>e!=null&&typeof e=="function",wTe=(e,t)=>{var n=Wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},STe=(e,t,n,r,a)=>{var{offset:i,className:s}=e,{cx:l,cy:c,innerRadius:d,outerRadius:h,startAngle:m,endAngle:g,clockWise:v}=a,b=(d+h)/2,w=wTe(m,g),S=w>=0?1:-1,j,k;switch(t){case"insideStart":j=m+S*i,k=v;break;case"insideEnd":j=g-S*i,k=!v;break;case"end":j=g+S*i,k=v;break;default:throw new Error("Unsupported position ".concat(t))}k=w<=0?k:!k;var _=Mn(l,c,b,j),E=Mn(l,c,b,j+(k?1:-1)*359),T="M".concat(_.x,",").concat(_.y,`
523
+ A`).concat(b,",").concat(b,",0,1,").concat(k?0:1,`,
524
+ `).concat(E.x,",").concat(E.y),A=cn(e.id)?pf("recharts-radial-line-"):e.id;return x.createElement("text",Hi({},r,{dominantBaseline:"central",className:Lt("recharts-radial-bar-label",s)}),x.createElement("defs",null,x.createElement("path",{id:A,d:T})),x.createElement("textPath",{xlinkHref:"#".concat(A)},n))},jTe=(e,t,n)=>{var{cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:l,endAngle:c}=e,d=(l+c)/2;if(n==="outside"){var{x:h,y:m}=Mn(r,a,s+t,d);return{x:h,y:m,textAnchor:h>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var g=(i+s)/2,{x:v,y:b}=Mn(r,a,g,d);return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},wp=e=>e!=null&&"cx"in e&&Be(e.cx),_Te={angle:0,offset:5,zIndex:Pn.label,position:"middle",textBreakAll:!1};function kTe(e){if(!wp(e))return e;var{cx:t,cy:n,outerRadius:r}=e,a=r*2;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}function Xs(e){var t=Xn(e,_Te),{viewBox:n,parentViewBox:r,position:a,value:i,children:s,content:l,className:c="",textBreakAll:d,labelRef:h}=t,m=xTe(),g=_Y(),v=a==="center"?g:m??g,b,w,S;n==null?b=v:wp(n)?b=n:b=fE(n);var j=kTe(b);if(!b||cn(i)&&cn(s)&&!x.isValidElement(l)&&typeof l!="function")return null;var k=Bd(Bd({},t),{},{viewBox:b});if(x.isValidElement(l)){var{labelRef:_}=k,E=vB(k,dTe);return x.cloneElement(l,E)}if(typeof l=="function"){var{content:T}=k,A=vB(k,fTe);if(w=x.createElement(l,A),x.isValidElement(w))return w}else w=bTe(t);var O=xr(t);if(wp(b)){if(a==="insideStart"||a==="insideEnd"||a==="end")return STe(t,a,w,O,b);S=jTe(b,t.offset,t.position)}else{if(!j)return null;var D=cTe({viewBox:j,position:a,offset:t.offset,parentViewBox:wp(r)?void 0:r});S=Bd(Bd({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return x.createElement(Pr,{zIndex:t.zIndex},x.createElement(ly,Hi({ref:h,className:Lt("recharts-label",c)},O,S,{textAnchor:xY(O.textAnchor)?O.textAnchor:S.textAnchor,breakAll:d}),w))}Xs.displayName="Label";var CTe=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?x.createElement(Xs,Hi({key:"label-implicit"},r)):fi(e)?x.createElement(Xs,Hi({key:"label-implicit",value:e},r)):x.isValidElement(e)?e.type===Xs?x.cloneElement(e,Bd({key:"label-implicit"},r)):x.createElement(Xs,Hi({key:"label-implicit",content:e},r)):jA(e)?x.createElement(Xs,Hi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?x.createElement(Xs,Hi({},e,{key:"label-implicit"},r)):null};function NTe(e){var{label:t,labelRef:n}=e,r=_Y();return CTe(t,r,n)||null}var ETe=["valueAccessor"],ATe=["dataKey","clockWise","id","textBreakAll","zIndex"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(null,arguments)}function xB(e,t){if(e==null)return{};var n,r,a=TTe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function TTe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var OTe=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(nTe(t))return t},kY=x.createContext(void 0),CY=kY.Provider,NY=x.createContext(void 0),MTe=NY.Provider;function PTe(){return x.useContext(kY)}function DTe(){return x.useContext(NY)}function Sp(e){var{valueAccessor:t=OTe}=e,n=xB(e,ETe),{dataKey:r,clockWise:a,id:i,textBreakAll:s,zIndex:l}=n,c=xB(n,ATe),d=PTe(),h=DTe(),m=d||h;return!m||!m.length?null:x.createElement(Pr,{zIndex:l??Pn.label},x.createElement(Bn,{className:"recharts-label-list"},m.map((g,v)=>{var b,w=cn(r)?t(g,v):$t(g.payload,r),S=cn(i)?{}:{id:"".concat(i,"-").concat(v)};return x.createElement(Xs,Cg({key:"label-".concat(v)},xr(g),c,S,{fill:(b=n.fill)!==null&&b!==void 0?b:g.fill,parentViewBox:g.parentViewBox,value:w,textBreakAll:s,viewBox:g.viewBox,index:v,zIndex:0}))})))}Sp.displayName="LabelList";function _A(e){var{label:t}=e;return t?t===!0?x.createElement(Sp,{key:"labelList-implicit"}):x.isValidElement(t)||jA(t)?x.createElement(Sp,{key:"labelList-implicit",content:t}):typeof t=="object"?x.createElement(Sp,Cg({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function xN(){return xN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xN.apply(null,arguments)}var EY=e=>{var{cx:t,cy:n,r,className:a}=e,i=Lt("recharts-dot",a);return Be(t)&&Be(n)&&Be(r)?x.createElement("circle",xN({},Zr(e),tE(e),{className:i,cx:t,cy:n,r})):null},AY=e=>e.graphicalItems.polarItems,RTe=de([pn,sh],WE),uy=de([AY,Sn,RTe],XE),ITe=de([uy],ZE),cy=de([ITe,rh],QE),LTe=de([cy,Sn,uy],vK);de([cy,Sn,uy],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(a=>{var i,s=$t(r,(i=t.dataKey)!==null&&i!==void 0?i:a.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:$t(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var bB=()=>{},zTe=de([cy,Sn,uy,ay,pn,H_e],rA),$Te=de([Sn,tA,nA,bB,zTe,bB,Rt,pn],aA),TY=de([Sn,Rt,cy,LTe,ih,pn,$Te],iA),qTe=de([TY,xc,ho],oA),BTe=de([Sn,TY,qTe,pn],uA);de([ho,BTe],OV);var FTe={radiusAxis:{},angleAxis:{}},OY=hr({name:"polarAxis",initialState:FTe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:c3e,removeRadiusAxis:d3e,addAngleAxis:f3e,removeAngleAxis:h3e}=OY.actions,HTe=OY.reducer;function MY(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function wB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function SB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wB(Object(n),!0).forEach(function(r){UTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UTe(e,t,n){return(t=GTe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GTe(e){var t=VTe(e,"string");return typeof t=="symbol"?t:t+""}function VTe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KTe=(e,t)=>t,kA=de([AY,KTe],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),YTe=[],CA=(e,t,n)=>(n==null?void 0:n.length)===0?YTe:n,PY=de([rh,kA,CA],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var a;if((t==null?void 0:t.data)!=null&&t.data.length>0?a=t.data:a=r,(!a||!a.length)&&n!=null&&(a=n.map(i=>SB(SB({},t.presentationProps),i.props))),a!=null)return a}}),WTe=de([PY,kA,CA],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,a)=>{var i,s=$t(r,t.nameKey,t.name),l;return n!=null&&(i=n[a])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?l=n[a].props.fill:typeof r=="object"&&r!=null&&"fill"in r?l=r.fill:l=t.fill,{value:pc(s,t.dataKey),color:l,payload:r,type:t.legendType}})}),XTe=de([PY,kA,CA,Fn],(e,t,n,r)=>{if(!(t==null||e==null))return eMe({offset:r,pieSettings:t,displayedData:e,cells:n})}),Vk={exports:{}},Gt={};/** @license React v17.0.2
525
+ * react-is.production.min.js
526
+ *
527
+ * Copyright (c) Facebook, Inc. and its affiliates.
528
+ *
529
+ * This source code is licensed under the MIT license found in the
530
+ * LICENSE file in the root directory of this source tree.
531
+ */var jB;function ZTe(){if(jB)return Gt;jB=1;var e=60103,t=60106,n=60107,r=60108,a=60114,i=60109,s=60110,l=60112,c=60113,d=60120,h=60115,m=60116,g=60121,v=60122,b=60117,w=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var j=Symbol.for;e=j("react.element"),t=j("react.portal"),n=j("react.fragment"),r=j("react.strict_mode"),a=j("react.profiler"),i=j("react.provider"),s=j("react.context"),l=j("react.forward_ref"),c=j("react.suspense"),d=j("react.suspense_list"),h=j("react.memo"),m=j("react.lazy"),g=j("react.block"),v=j("react.server.block"),b=j("react.fundamental"),w=j("react.debug_trace_mode"),S=j("react.legacy_hidden")}function k(F){if(typeof F=="object"&&F!==null){var R=F.$$typeof;switch(R){case e:switch(F=F.type,F){case n:case a:case r:case c:case d:return F;default:switch(F=F&&F.$$typeof,F){case s:case l:case m:case h:case i:return F;default:return R}}case t:return R}}}var _=i,E=e,T=l,A=n,O=m,D=h,P=t,M=a,z=r,L=c;return Gt.ContextConsumer=s,Gt.ContextProvider=_,Gt.Element=E,Gt.ForwardRef=T,Gt.Fragment=A,Gt.Lazy=O,Gt.Memo=D,Gt.Portal=P,Gt.Profiler=M,Gt.StrictMode=z,Gt.Suspense=L,Gt.isAsyncMode=function(){return!1},Gt.isConcurrentMode=function(){return!1},Gt.isContextConsumer=function(F){return k(F)===s},Gt.isContextProvider=function(F){return k(F)===i},Gt.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===e},Gt.isForwardRef=function(F){return k(F)===l},Gt.isFragment=function(F){return k(F)===n},Gt.isLazy=function(F){return k(F)===m},Gt.isMemo=function(F){return k(F)===h},Gt.isPortal=function(F){return k(F)===t},Gt.isProfiler=function(F){return k(F)===a},Gt.isStrictMode=function(F){return k(F)===r},Gt.isSuspense=function(F){return k(F)===c},Gt.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===n||F===a||F===w||F===r||F===c||F===d||F===S||typeof F=="object"&&F!==null&&(F.$$typeof===m||F.$$typeof===h||F.$$typeof===i||F.$$typeof===s||F.$$typeof===l||F.$$typeof===b||F.$$typeof===g||F[0]===v)},Gt.typeOf=k,Gt}var _B;function QTe(){return _B||(_B=1,Vk.exports=ZTe()),Vk.exports}var JTe=QTe(),kB=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",CB=null,Kk=null,DY=e=>{if(e===CB&&Array.isArray(Kk))return Kk;var t=[];return x.Children.forEach(e,n=>{cn(n)||(JTe.isFragment(n)?t=t.concat(DY(n.props.children)):t.push(n))}),Kk=t,CB=e,t};function NA(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>kB(a)):r=[kB(t)],DY(e).forEach(a=>{var i=ul(a,"type.displayName")||ul(a,"type.name");i&&r.indexOf(i)!==-1&&n.push(a)}),n}var RY=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Yk={},NB;function eOe(){return NB||(NB=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var a;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!((a=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&a.writable)?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(Yk)),Yk}var Wk,EB;function tOe(){return EB||(EB=1,Wk=eOe().isPlainObject),Wk}var nOe=tOe();const rOe=ea(nOe);var AB,TB,OB,MB,PB;function DB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function RB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DB(Object(n),!0).forEach(function(r){aOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aOe(e,t,n){return(t=iOe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iOe(e){var t=sOe(e,"string");return typeof t=="symbol"?t:t+""}function sOe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ng.apply(null,arguments)}function Td(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var IB=(e,t,n,r,a)=>{var i=n-r,s;return s=wn(AB||(AB=Td(["M ",",",""])),e,t),s+=wn(TB||(TB=Td(["L ",",",""])),e+n,t),s+=wn(OB||(OB=Td(["L ",",",""])),e+n-i/2,t+a),s+=wn(MB||(MB=Td(["L ",",",""])),e+n-i/2-r,t+a),s+=wn(PB||(PB=Td(["L ",","," Z"])),e,t),s},oOe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lOe=e=>{var t=Xn(e,oOe),{x:n,y:r,upperWidth:a,lowerWidth:i,height:s,className:l}=t,{animationEasing:c,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=t,g=x.useRef(null),[v,b]=x.useState(-1),w=x.useRef(a),S=x.useRef(i),j=x.useRef(s),k=x.useRef(n),_=x.useRef(r),E=nh(e,"trapezoid-");if(x.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var R=g.current.getTotalLength();R&&b(R)}catch{}},[]),n!==+n||r!==+r||a!==+a||i!==+i||s!==+s||a===0&&i===0||s===0)return null;var T=Lt("recharts-trapezoid",l);if(!m)return x.createElement("g",null,x.createElement("path",Ng({},xr(t),{className:T,d:IB(n,r,a,i,s)})));var A=w.current,O=S.current,D=j.current,P=k.current,M=_.current,z="0px ".concat(v===-1?1:v,"px"),L="".concat(v,"px ").concat(v,"px"),F=eV(["strokeDasharray"],d,c);return x.createElement(th,{animationId:E,key:E,canBegin:v>0,duration:d,easing:c,isActive:m,begin:h},R=>{var I=sn(A,a,R),q=sn(O,i,R),G=sn(D,s,R),Y=sn(P,n,R),K=sn(M,r,R);g.current&&(w.current=I,S.current=q,j.current=G,k.current=Y,_.current=K);var B=R>0?{transition:F,strokeDasharray:L}:{strokeDasharray:z};return x.createElement("path",Ng({},xr(t),{className:T,d:IB(Y,K,I,q,G),ref:g,style:RB(RB({},B),t.style)}))})},uOe=["option","shapeType","activeClassName","inActiveClassName"];function cOe(e,t){if(e==null)return{};var n,r,a=dOe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dOe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function LB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Eg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LB(Object(n),!0).forEach(function(r){fOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fOe(e,t,n){return(t=hOe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hOe(e){var t=mOe(e,"string");return typeof t=="symbol"?t:t+""}function mOe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pOe(e,t){return Eg(Eg({},t),e)}function gOe(e,t){return e==="symbols"}function zB(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return x.createElement(aV,n);case"trapezoid":return x.createElement(lOe,n);case"sector":return x.createElement(lV,n);case"symbols":if(gOe(t))return x.createElement(z7,n);break;case"curve":return x.createElement(pE,n);default:return null}}function vOe(e){return x.isValidElement(e)?e.props:e}function EA(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:a="recharts-shape"}=e,i=cOe(e,uOe),s;if(x.isValidElement(t))s=x.cloneElement(t,Eg(Eg({},i),vOe(t)));else if(typeof t=="function")s=t(i,i.index);else if(rOe(t)&&typeof t!="boolean"){var l=pOe(t,i);s=x.createElement(zB,{shapeType:n,elementProps:l})}else{var c=i;s=x.createElement(zB,{shapeType:n,elementProps:c})}return i.isActive?x.createElement(Bn,{className:r},s):x.createElement(Bn,{className:a},s)}var AA=(e,t,n)=>{var r=Jt();return(a,i)=>s=>{e==null||e(a,i,s),r(FK({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},TA=e=>{var t=Jt();return(n,r)=>a=>{e==null||e(n,r,a),t(S2e())}},OA=(e,t,n)=>{var r=Jt();return(a,i)=>s=>{e==null||e(a,i,s),r(j2e({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function MA(e){var{tooltipEntrySettings:t}=e,n=Jt(),r=mr(),a=x.useRef(null);return x.useLayoutEffect(()=>{r||(a.current===null?n(y2e(t)):a.current!==t&&n(x2e({prev:a.current,next:t})),a.current=t)},[t,n,r]),x.useLayoutEffect(()=>()=>{a.current&&(n(b2e(a.current)),a.current=null)},[n]),null}function IY(e){var{legendPayload:t}=e,n=Jt(),r=mr(),a=x.useRef(null);return x.useLayoutEffect(()=>{r||(a.current===null?n(WG(t)):a.current!==t&&n(XG({prev:a.current,next:t})),a.current=t)},[n,r,t]),x.useLayoutEffect(()=>()=>{a.current&&(n(ZG(a.current)),a.current=null)},[n]),null}function yOe(e){var{legendPayload:t}=e,n=Jt(),r=Ve(Rt),a=x.useRef(null);return x.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(a.current===null?n(WG(t)):a.current!==t&&n(XG({prev:a.current,next:t})),a.current=t)},[n,r,t]),x.useLayoutEffect(()=>()=>{a.current&&(n(ZG(a.current)),a.current=null)},[n]),null}var Xk,xOe=()=>{var[e]=x.useState(()=>pf("uid-"));return e},bOe=(Xk=BZ.useId)!==null&&Xk!==void 0?Xk:xOe;function wOe(e,t){var n=bOe();return t||(e?"".concat(e,"-").concat(n):n)}var SOe=x.createContext(void 0),PA=e=>{var{id:t,type:n,children:r}=e,a=wOe("recharts-".concat(n),t);return x.createElement(SOe.Provider,{value:a},r(a))},jOe={cartesianItems:[],polarItems:[]},LY=hr({name:"graphicalItems",initialState:jOe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:nn()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ma(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:nn()},removeCartesianGraphicalItem:{reducer(e,t){var n=ma(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:nn()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:nn()},removePolarGraphicalItem:{reducer(e,t){var n=ma(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:nn()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ma(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:nn()}}}),{addCartesianGraphicalItem:_Oe,replaceCartesianGraphicalItem:kOe,removeCartesianGraphicalItem:COe,addPolarGraphicalItem:NOe,removePolarGraphicalItem:EOe,replacePolarGraphicalItem:AOe}=LY.actions,TOe=LY.reducer,OOe=e=>{var t=Jt(),n=x.useRef(null);return x.useLayoutEffect(()=>{n.current===null?t(_Oe(e)):n.current!==e&&t(kOe({prev:n.current,next:e})),n.current=e},[t,e]),x.useLayoutEffect(()=>()=>{n.current&&(t(COe(n.current)),n.current=null)},[t]),null},zY=x.memo(OOe),MOe=e=>{var t=Jt(),n=x.useRef(null);return x.useLayoutEffect(()=>{n.current===null?t(NOe(e)):n.current!==e&&t(AOe({prev:n.current,next:e})),n.current=e},[t,e]),x.useLayoutEffect(()=>()=>{n.current&&(t(EOe(n.current)),n.current=null)},[t]),null},POe=x.memo(MOe),DOe=["key"],ROe=["onMouseEnter","onClick","onMouseLeave"],IOe=["id"],LOe=["id"];function io(){return io=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},io.apply(null,arguments)}function dy(e,t){if(e==null)return{};var n,r,a=zOe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function zOe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$B(Object(n),!0).forEach(function(r){$Oe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$B(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Oe(e,t,n){return(t=qOe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qOe(e){var t=BOe(e,"string");return typeof t=="symbol"?t:t+""}function BOe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FOe(e){var t=x.useMemo(()=>NA(e.children,mh),[e.children]),n=Ve(r=>WTe(r,e.id,t));return n==null?null:x.createElement(yOe,{legendPayload:n})}function HOe(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(x.isValidElement(e)){var t,n=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof n=="string"?n:void 0}var{fill:r}=e;return typeof r=="string"?r:void 0}}var UOe=x.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:a,strokeWidth:i,fill:s,name:l,hide:c,tooltipType:d,id:h,activeShape:m}=e,g=HOe(m),v=r.map(w=>{var S=w.tooltipPayload;return g==null||S==null?S:S.map(j=>on(on({},j),{},{color:g,fill:g}))}),b={dataDefinedOnItem:v,getPosition:w=>{var S;return(S=r[Number(w)])===null||S===void 0?void 0:S.tooltipPosition},settings:{stroke:a,strokeWidth:i,fill:s,dataKey:t,nameKey:n,name:pc(l,t),hide:c,type:d,color:s,unit:"",graphicalItemId:h}};return x.createElement(MA,{tooltipEntrySettings:b})}),GOe=(e,t)=>e>t?"start":e<t?"end":"middle",VOe=(e,t,n)=>dr(typeof t=="function"?t(e):t,n,n*.8),KOe=(e,t,n)=>{var{top:r,left:a,width:i,height:s}=t,l=iV(i,s),c=a+dr(e.cx,i,i/2),d=r+dr(e.cy,s,s/2),h=dr(e.innerRadius,l,0),m=VOe(n,e.outerRadius,l),g=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:c,cy:d,innerRadius:h,outerRadius:m,maxRadius:g}},YOe=(e,t)=>{var n=Wn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},WOe=(e,t)=>{if(x.isValidElement(e))return x.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Lt("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,a=dy(t,DOe);return x.createElement(pE,io({},a,{type:"linear",className:n}))},XOe=(e,t,n)=>{if(x.isValidElement(e))return x.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),x.isValidElement(r)))return r;var a=Lt("recharts-pie-label-text",MY(e));return x.createElement(ly,io({},t,{alignmentBaseline:"middle",className:a}),r)};function ZOe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a,labelLine:i,dataKey:s}=n;if(!r||!a||!t)return null;var l=Zr(n),c=ol(a),d=ol(i),h=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,m=t.map((g,v)=>{var b=(g.startAngle+g.endAngle)/2,w=Mn(g.cx,g.cy,g.outerRadius+h,b),S=on(on(on(on({},l),g),{},{stroke:"none"},c),{},{index:v,textAnchor:GOe(w.x,g.cx)},w),j=on(on(on(on({},l),g),{},{fill:"none",stroke:g.fill},d),{},{index:v,points:[Mn(g.cx,g.cy,g.outerRadius,b),w],key:"line"});return x.createElement(Pr,{zIndex:Pn.label,key:"label-".concat(g.startAngle,"-").concat(g.endAngle,"-").concat(g.midAngle,"-").concat(v)},x.createElement(Bn,null,i&&WOe(i,j),XOe(a,S,$t(g,s))))});return x.createElement(Bn,{className:"recharts-pie-labels"},m)}function QOe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a}=n;return typeof a=="object"&&a!=null&&"position"in a?x.createElement(_A,{label:a}):x.createElement(ZOe,{sectors:t,props:n,showLabels:r})}function JOe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:a,shape:i,id:s}=e,l=Ve(ao),c=Ve(vA),d=Ve(aY),{onMouseEnter:h,onClick:m,onMouseLeave:g}=a,v=dy(a,ROe),b=AA(h,a.dataKey,s),w=TA(g),S=OA(m,a.dataKey,s);return t==null||t.length===0?null:x.createElement(x.Fragment,null,t.map((j,k)=>{if((j==null?void 0:j.startAngle)===0&&(j==null?void 0:j.endAngle)===0&&t.length!==1)return null;var _=d==null||d===s,E=String(k)===l&&(c==null||a.dataKey===c)&&_,T=l?r:null,A=n&&E?n:T,O=on(on({},j),{},{stroke:j.stroke,tabIndex:-1,[MG]:k,[PG]:s});return x.createElement(Bn,io({key:"sector-".concat(j==null?void 0:j.startAngle,"-").concat(j==null?void 0:j.endAngle,"-").concat(j.midAngle,"-").concat(k),tabIndex:-1,className:"recharts-pie-sector"},Cv(v,j,k),{onMouseEnter:b(j,k),onMouseLeave:w(j,k),onClick:S(j,k)}),x.createElement(EA,io({option:i??A,index:k,shapeType:"sector",isActive:E},O)))}))}function eMe(e){var t,{pieSettings:n,displayedData:r,cells:a,offset:i}=e,{cornerRadius:s,startAngle:l,endAngle:c,dataKey:d,nameKey:h,tooltipType:m}=n,g=Math.abs(n.minAngle),v=YOe(l,c),b=Math.abs(v),w=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(D=>$t(D,d,0)!==0).length,j=(b>=360?S:S-1)*w,k=r.reduce((D,P)=>{var M=$t(P,d,0);return D+(Be(M)?M:0)},0),_=g>0&&k>0&&r.some(D=>{var P=$t(D,d,0),M=(Be(P)?P:0)/k;return P!==0&&M*b<g}),E=_?g:0,T=b-S*E-j,A;if(k>0){var O;A=r.map((D,P)=>{var M=$t(D,d,0),z=$t(D,h,P),L=KOe(n,i,D),F=(Be(M)?M:0)/k,R,I=on(on({},D),a&&a[P]&&a[P].props),q=I!=null&&"fill"in I&&typeof I.fill=="string"?I.fill:n.fill;P?R=O.endAngle+Wn(v)*w*(M!==0?1:0):R=l;var G=R+Wn(v)*((M!==0?E:0)+F*T),Y=(R+G)/2,K=(L.innerRadius+L.outerRadius)/2,B=[{name:z,value:M,payload:I,dataKey:d,type:m,color:q,fill:q,graphicalItemId:n.id}],U=Mn(L.cx,L.cy,K,Y);return O=on(on(on(on({},n.presentationProps),{},{percent:F,cornerRadius:typeof s=="string"?parseFloat(s):s,name:z,tooltipPayload:B,midAngle:Y,middleRadius:K,tooltipPosition:U},I),L),{},{value:M,dataKey:d,startAngle:R,endAngle:G,payload:I,paddingAngle:M!==0?Wn(v)*w:0}),O})}return A}function tMe(e){var{showLabels:t,sectors:n,children:r}=e,a=x.useMemo(()=>!t||!n?[]:n.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[n,t]);return x.createElement(MTe,{value:t?a:void 0},r)}function nMe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:a,isAnimationActive:i,animationBegin:s,animationDuration:l,animationEasing:c,activeShape:d,inactiveShape:h,onAnimationStart:m,onAnimationEnd:g}=t,v=nh(t,"recharts-pie-"),b=n.current,[w,S]=x.useState(!1),j=x.useCallback(()=>{typeof g=="function"&&g(),S(!1)},[g]),k=x.useCallback(()=>{typeof m=="function"&&m(),S(!0)},[m]);return x.createElement(tMe,{showLabels:!w,sectors:a},x.createElement(th,{animationId:v,begin:s,duration:l,isActive:i,easing:c,onAnimationStart:k,onAnimationEnd:j,key:v},_=>{var E,T=[],A=a&&a[0],O=(E=A==null?void 0:A.startAngle)!==null&&E!==void 0?E:0;return a==null||a.forEach((D,P)=>{var M=b&&b[P],z=P>0?ul(D,"paddingAngle",0):0;if(M){var L=sn(M.endAngle-M.startAngle,D.endAngle-D.startAngle,_),F=on(on({},D),{},{startAngle:O+z,endAngle:O+L+z});T.push(F),O=F.endAngle}else{var{endAngle:R,startAngle:I}=D,q=sn(0,R-I,_),G=on(on({},D),{},{startAngle:O+z,endAngle:O+q+z});T.push(G),O=G.endAngle}}),n.current=T,x.createElement(Bn,null,x.createElement(JOe,{sectors:T,activeShape:d,inactiveShape:h,allOtherPieProps:t,shape:t.shape,id:r}))}),x.createElement(QOe,{showLabels:!w,sectors:a,props:t}),t.children)}var rMe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Pn.area};function aMe(e){var{id:t}=e,n=dy(e,IOe),{hide:r,className:a,rootTabIndex:i}=e,s=x.useMemo(()=>NA(e.children,mh),[e.children]),l=Ve(h=>XTe(h,t,s)),c=x.useRef(null),d=Lt("recharts-pie",a);return r||l==null?(c.current=null,x.createElement(Bn,{tabIndex:i,className:d})):x.createElement(Pr,{zIndex:e.zIndex},x.createElement(UOe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),x.createElement(Bn,{tabIndex:i,className:d},x.createElement(nMe,{props:on(on({},n),{},{sectors:l}),previousSectorsRef:c,id:t})))}function iMe(e){var t=Xn(e,rMe),{id:n}=t,r=dy(t,LOe),a=Zr(r);return x.createElement(PA,{id:n,type:"pie"},i=>x.createElement(x.Fragment,null,x.createElement(POe,{type:"pie",id:i,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:a,maxRadius:t.maxRadius}),x.createElement(FOe,io({},r,{id:i})),x.createElement(aMe,io({},r,{id:i}))))}var $Y=iMe;$Y.displayName="Pie";var sMe=["points"];function qB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qB(Object(n),!0).forEach(function(r){oMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oMe(e,t,n){return(t=lMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lMe(e){var t=uMe(e,"string");return typeof t=="symbol"?t:t+""}function uMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ag.apply(null,arguments)}function cMe(e,t){if(e==null)return{};var n,r,a=dMe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dMe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fMe(e){var{option:t,dotProps:n,className:r}=e;if(x.isValidElement(t))return x.cloneElement(t,n);if(typeof t=="function")return t(n);var a=Lt(r,typeof t!="boolean"?t.className:""),i=n??{},{points:s}=i,l=cMe(i,sMe);return x.createElement(EY,Ag({},l,{className:a}))}function hMe(e,t){return e==null?!1:t?!0:e.length===1}function mMe(e){var{points:t,dot:n,className:r,dotClassName:a,dataKey:i,baseProps:s,needClip:l,clipPathId:c,zIndex:d=Pn.scatter}=e;if(!hMe(t,n))return null;var h=RY(n),m=W0e(n),g=t.map((b,w)=>{var S,j,k=Zk(Zk(Zk({r:3},s),m),{},{index:w,cx:(S=b.x)!==null&&S!==void 0?S:void 0,cy:(j=b.y)!==null&&j!==void 0?j:void 0,dataKey:i,value:b.value,payload:b.payload,points:t});return x.createElement(fMe,{key:"dot-".concat(w),option:n,dotProps:k,className:a})}),v={};return l&&c!=null&&(v.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(c,")")),x.createElement(Pr,{zIndex:d},x.createElement(Bn,Ag({className:r},v),g))}function BB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function FB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BB(Object(n),!0).forEach(function(r){pMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pMe(e,t,n){return(t=gMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gMe(e){var t=vMe(e,"string");return typeof t=="symbol"?t:t+""}function vMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qY=0,yMe={xAxis:{},yAxis:{},zAxis:{}},BY=hr({name:"cartesianAxis",initialState:yMe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:nn()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:nn()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:nn()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:nn()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:nn()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:nn()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:nn()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:nn()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:nn()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,a=e.yAxis[n];if(a){var i,s=a.widthHistory||[];if(s.length===3&&s[0]===s[2]&&r===s[1]&&r!==a.width&&Math.abs(r-((i=s[0])!==null&&i!==void 0?i:0))<=1)return;var l=[...s,r].slice(-3);e.yAxis[n]=FB(FB({},a),{},{width:r,widthHistory:l})}}}}),{addXAxis:xMe,replaceXAxis:bMe,removeXAxis:wMe,addYAxis:SMe,replaceYAxis:jMe,removeYAxis:_Me,addZAxis:m3e,replaceZAxis:p3e,removeZAxis:g3e,updateYAxisWidth:kMe}=BY.actions,CMe=BY.reducer,NMe=de([Fn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),EMe=de([NMe,fs,hs],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),DA=()=>Ve(EMe),AMe=()=>Ve(vEe);function HB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HB(Object(n),!0).forEach(function(r){TMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TMe(e,t,n){return(t=OMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OMe(e){var t=MMe(e,"string");return typeof t=="symbol"?t:t+""}function MMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PMe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:a,dataKey:i,clipPath:s}=e;if(a===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=Qk(Qk(Qk({},l),ol(a)),tE(a)),d;return x.isValidElement(a)?d=x.cloneElement(a,c):typeof a=="function"?d=a(c):d=x.createElement(EY,c),x.createElement(Bn,{className:"recharts-active-dot",clipPath:s},d)};function DMe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:a,clipPath:i,zIndex:s=Pn.activeDot}=e,l=Ve(ao),c=AMe();if(t==null||c==null)return null;var d=t.find(h=>c.includes(h.payload));return cn(d)?null:x.createElement(Pr,{zIndex:s},x.createElement(PMe,{point:d,childIndex:Number(l),mainColor:n,dataKey:a,activeDot:r,clipPath:i}))}var UB=(e,t,n)=>{var r=n??e;if(!cn(r))return dr(r,t,0)},RMe=(e,t,n)=>{var r={},a=e.filter(Yv),i=e.filter(d=>d.stackId==null),s=a.reduce((d,h)=>{var m=d[h.stackId];return m==null&&(m=[]),m.push(h),d[h.stackId]=m,d},r),l=Object.entries(s).map(d=>{var h,[m,g]=d,v=g.map(w=>w.dataKey),b=UB(t,n,(h=g[0])===null||h===void 0?void 0:h.barSize);return{stackId:m,dataKeys:v,barSize:b}}),c=i.map(d=>{var h=[d.dataKey].filter(g=>g!=null),m=UB(t,n,d.barSize);return{stackId:void 0,dataKeys:h,barSize:m}});return[...l,...c]};function GB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GB(Object(n),!0).forEach(function(r){IMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IMe(e,t,n){return(t=LMe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LMe(e){var t=zMe(e,"string");return typeof t=="symbol"?t:t+""}function zMe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $Me(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var l=dr(e,n,0,!0),c,d=[];if(Nt((i=r[0])===null||i===void 0?void 0:i.barSize)){var h=!1,m=n/s,g=r.reduce((k,_)=>k+(_.barSize||0),0);g+=(s-1)*l,g>=n&&(g-=(s-1)*l,l=0),g>=n&&m>0&&(h=!0,m*=.9,g=s*m);var v=(n-g)/2>>0,b={offset:v-l,size:0};c=r.reduce((k,_)=>{var E,T={stackId:_.stackId,dataKeys:_.dataKeys,position:{offset:b.offset+b.size+l,size:h?m:(E=_.barSize)!==null&&E!==void 0?E:0}},A=[...k,T];return b=T.position,A},d)}else{var w=dr(t,n,0,!0);n-2*w-(s-1)*l<=0&&(l=0);var S=(n-2*w-(s-1)*l)/s;S>1&&(S>>=0);var j=Nt(a)?Math.min(S,a):S;c=r.reduce((k,_,E)=>[...k,{stackId:_.stackId,dataKeys:_.dataKeys,position:{offset:w+(S+l)*E+(S-j)/2,size:j}}],d)}return c}}var qMe=(e,t,n,r,a,i,s)=>{var l=cn(s)?t:s,c=$Me(n,r,a!==i?a:i,e,l);return a!==i&&c!=null&&(c=c.map(d=>ip(ip({},d),{},{position:ip(ip({},d.position),{},{offset:d.position.offset-a/2})}))),c},BMe=(e,t)=>{var n=kE(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var a=e[r];if(a){var{stackedData:i}=a;if(i)return i.find(s=>s.key===n)}}}},FMe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function HMe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Nt(e.zIndex)?e.zIndex:t}var FY=e=>{var{chartData:t}=e,n=Jt(),r=mr();return x.useEffect(()=>r?()=>{}:(n(tB(t)),()=>{n(tB(void 0))}),[t,n,r]),null},VB={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},HY=hr({name:"brush",initialState:VB,reducers:{setBrushSettings(e,t){return t.payload==null?VB:t.payload}}}),{setBrushSettings:v3e}=HY.actions,UMe=HY.reducer;function GMe(e){return(e%180+180)%180}var VMe=function(t){var{width:n,height:r}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=GMe(a),s=i*Math.PI/180,l=Math.atan(r/n),c=s>l&&s<Math.PI-l?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},KMe={dots:[],areas:[],lines:[]},UY=hr({name:"referenceElements",initialState:KMe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ma(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=ma(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=ma(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:y3e,removeDot:x3e,addArea:b3e,removeArea:w3e,addLine:S3e,removeLine:j3e}=UY.actions,YMe=UY.reducer,WMe=x.createContext(void 0),XMe=e=>{var{children:t}=e,[n]=x.useState("".concat(pf("recharts"),"-clip")),r=DA();if(r==null)return null;var{x:a,y:i,width:s,height:l}=r;return x.createElement(WMe.Provider,{value:n},x.createElement("defs",null,x.createElement("clipPath",{id:n},x.createElement("rect",{x:a,y:i,height:l,width:s}))),t)};function GY(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];a!==void 0&&n.push(a)}return n}function ZMe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return VMe(r,n)}function QMe(e,t,n){var r=n==="width",{x:a,y:i,width:s,height:l}=e;return t===1?{start:r?a:i,end:r?a+s:i+l}:{start:r?a+s:i+l,end:r?a:i}}function Cf(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function JMe(e,t){return GY(e,t+1)}function ePe(e,t,n,r,a){for(var i=(r||[]).slice(),{start:s,end:l}=t,c=0,d=1,h=s,m=function(){var b=r==null?void 0:r[c];if(b===void 0)return{v:GY(r,d)};var w=c,S,j=()=>(S===void 0&&(S=n(b,w)),S),k=b.coordinate,_=c===0||Cf(e,k,j,h,l);_||(c=0,h=s,d+=1),_&&(h=k+e*(j()/2+a),c+=d)},g;d<=i.length;)if(g=m(),g)return g.v;return[]}function tPe(e,t,n,r,a){var i=(r||[]).slice(),s=i.length;if(s===0)return[];for(var{start:l,end:c}=t,d=1;d<=s;d++){for(var h=(s-1)%d,m=l,g=!0,v=function(){var E=r[w];if(E==null)return 0;var T=w,A,O=()=>(A===void 0&&(A=n(E,T)),A),D=E.coordinate,P=w===h||Cf(e,D,O,m,c);if(!P)return g=!1,1;P&&(m=D+e*(O()/2+a))},b,w=h;w<s&&(b=v(),!(b!==0&&b===1));w+=d);if(g){for(var S=[],j=h;j<s;j+=d){var k=r[j];k!=null&&S.push(k)}return S}}return[]}function KB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KB(Object(n),!0).forEach(function(r){nPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nPe(e,t,n){return(t=rPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rPe(e){var t=aPe(e,"string");return typeof t=="symbol"?t:t+""}function aPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iPe(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:l}=t,{end:c}=t,d=function(g){var v=i[g];if(v==null)return 1;var b=v,w,S=()=>(w===void 0&&(w=n(v,g)),w);if(g===s-1){var j=e*(b.coordinate+e*S()/2-c);i[g]=b=lr(lr({},b),{},{tickCoord:j>0?b.coordinate-j*e:b.coordinate})}else i[g]=b=lr(lr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var k=Cf(e,b.tickCoord,S,l,c);k&&(c=b.tickCoord-e*(S()/2+a),i[g]=lr(lr({},b),{},{isShow:!0}))}},h=s-1;h>=0;h--)d(h);return i}function sPe(e,t,n,r,a,i){var s=(r||[]).slice(),l=s.length,{start:c,end:d}=t;if(i){var h=r[l-1];if(h!=null){var m=n(h,l-1),g=e*(h.coordinate+e*m/2-d);if(s[l-1]=h=lr(lr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var v=Cf(e,h.tickCoord,()=>m,c,d);v&&(d=h.tickCoord-e*(m/2+a),s[l-1]=lr(lr({},h),{},{isShow:!0}))}}}for(var b=i?l-1:l,w=function(k){var _=s[k];if(_==null)return 1;var E=_,T,A=()=>(T===void 0&&(T=n(_,k)),T);if(k===0){var O=e*(E.coordinate-e*A()/2-c);s[k]=E=lr(lr({},E),{},{tickCoord:O<0?E.coordinate-O*e:E.coordinate})}else s[k]=E=lr(lr({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var D=Cf(e,E.tickCoord,A,c,d);D&&(c=E.tickCoord+e*(A()/2+a),s[k]=lr(lr({},E),{},{isShow:!0}))}},S=0;S<b;S++)w(S);return s}function RA(e,t,n){var{tick:r,ticks:a,viewBox:i,minTickGap:s,orientation:l,interval:c,tickFormatter:d,unit:h,angle:m}=e;if(!a||!a.length||!r)return[];if(Be(c)||eh.isSsr){var g;return(g=JMe(a,Be(c)?c:0))!==null&&g!==void 0?g:[]}var v=[],b=l==="top"||l==="bottom"?"width":"height",w=h&&b==="width"?Wd(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(T,A)=>{var O=typeof d=="function"?d(T.value,A):T.value;return b==="width"?ZMe(Wd(O,{fontSize:t,letterSpacing:n}),w,m):Wd(O,{fontSize:t,letterSpacing:n})[b]},j=a[0],k=a[1],_=a.length>=2&&j!=null&&k!=null?Wn(k.coordinate-j.coordinate):1,E=QMe(i,_,b);return c==="equidistantPreserveStart"?ePe(_,E,S,a,s):c==="equidistantPreserveEnd"?tPe(_,E,S,a,s):(c==="preserveStart"||c==="preserveStartEnd"?v=sPe(_,E,S,a,s,c==="preserveStartEnd"):v=iPe(_,E,S,a,s),v.filter(T=>T.isShow))}var oPe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:a=0,tickMargin:i=0}=e,s=0;if(t){Array.from(t).forEach(h=>{if(h){var m=h.getBoundingClientRect();m.width>s&&(s=m.width)}});var l=n?n.getBoundingClientRect().width:0,c=a+i,d=s+c+l+(n?r:0);return Math.round(d)}return 0},lPe={xAxis:{},yAxis:{}},VY=hr({name:"renderedTicks",initialState:lPe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:a}=t.payload;e[n][r]=a},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:uPe,removeRenderedTicks:cPe}=VY.actions,dPe=VY.reducer,fPe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function hPe(e,t){if(e==null)return{};var n,r,a=mPe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function mPe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(null,arguments)}function YB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YB(Object(n),!0).forEach(function(r){pPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pPe(e,t,n){return(t=gPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gPe(e){var t=vPe(e,"string");return typeof t=="symbol"?t:t+""}function vPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qi={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:Pn.axis};function yPe(e){var{x:t,y:n,width:r,height:a,orientation:i,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var d=bn(bn(bn({},c),Zr(l)),{},{fill:"none"});if(i==="top"||i==="bottom"){var h=+(i==="top"&&!s||i==="bottom"&&s);d=bn(bn({},d),{},{x1:t,y1:n+h*a,x2:t+r,y2:n+h*a})}else{var m=+(i==="left"&&!s||i==="right"&&s);d=bn(bn({},d),{},{x1:t+m*r,y1:n,x2:t+m*r,y2:n+a})}return x.createElement("line",gl({},d,{className:Lt("recharts-cartesian-axis-line",ul(l,"className"))}))}function xPe(e,t,n,r,a,i,s,l,c){var d,h,m,g,v,b,w=l?-1:1,S=e.tickSize||s,j=Be(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":d=h=e.coordinate,g=n+ +!l*a,m=g-w*S,b=m-w*c,v=j;break;case"left":m=g=e.coordinate,h=t+ +!l*r,d=h-w*S,v=d-w*c,b=j;break;case"right":m=g=e.coordinate,h=t+ +l*r,d=h+w*S,v=d+w*c,b=j;break;default:d=h=e.coordinate,g=n+ +l*a,m=g+w*S,b=m+w*c,v=j;break}return{line:{x1:d,y1:m,x2:h,y2:g},tick:{x:v,y:b}}}function bPe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function wPe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function SPe(e){var{option:t,tickProps:n,value:r}=e,a,i=Lt(n.className,"recharts-cartesian-axis-tick-value");if(x.isValidElement(t))a=x.cloneElement(t,bn(bn({},n),{},{className:i}));else if(typeof t=="function")a=t(bn(bn({},n),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Lt(s,MY(t))),a=x.createElement(ly,gl({},n,{className:s}),r)}return a}function jPe(e){var{ticks:t,axisType:n,axisId:r}=e,a=Jt();return x.useEffect(()=>{if(r==null||n==null)return kl;var i=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return a(uPe({ticks:i,axisId:r,axisType:n})),()=>{a(cPe({axisId:r,axisType:n}))}},[a,t,r,n]),null}var _Pe=x.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:a,stroke:i,tickFormatter:s,unit:l,padding:c,tickTextProps:d,orientation:h,mirror:m,x:g,y:v,width:b,height:w,tickSize:S,tickMargin:j,fontSize:k,letterSpacing:_,getTicksConfig:E,events:T,axisType:A,axisId:O}=e,D=RA(bn(bn({},E),{},{ticks:n}),k,_),P=Zr(E),M=ol(r),z=xY(P.textAnchor)?P.textAnchor:bPe(h,m),L=wPe(h,m),F={};typeof a=="object"&&(F=a);var R=bn(bn({},P),{},{fill:"none"},F),I=D.map(Y=>bn({entry:Y},xPe(Y,g,v,b,w,h,S,m,j))),q=I.map(Y=>{var{entry:K,line:B}=Y;return x.createElement(Bn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},a&&x.createElement("line",gl({},R,B,{className:Lt("recharts-cartesian-axis-tick-line",ul(a,"className"))})))}),G=I.map((Y,K)=>{var B,U,{entry:X,tick:H}=Y,W=bn(bn(bn(bn({verticalAnchor:L},P),{},{textAnchor:z,stroke:"none",fill:i},H),{},{index:K,payload:X,visibleTicksCount:D.length,tickFormatter:s,padding:c},d),{},{angle:(B=(U=d==null?void 0:d.angle)!==null&&U!==void 0?U:P.angle)!==null&&B!==void 0?B:0}),Q=bn(bn({},W),M);return x.createElement(Bn,gl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},Cv(T,X,K)),r&&x.createElement(SPe,{option:r,tickProps:Q,value:"".concat(typeof s=="function"?s(X.value,K):X.value).concat(l||"")}))});return x.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},x.createElement(jPe,{ticks:D,axisId:O,axisType:A}),G.length>0&&x.createElement(Pr,{zIndex:Pn.label},x.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},G)),q.length>0&&x.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},q))}),kPe=x.forwardRef((e,t)=>{var{axisLine:n,width:r,height:a,className:i,hide:s,ticks:l,axisType:c,axisId:d}=e,h=hPe(e,fPe),[m,g]=x.useState(""),[v,b]=x.useState(""),w=x.useRef(null);x.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var j;return oPe({ticks:w.current,label:(j=e.labelRef)===null||j===void 0?void 0:j.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=x.useCallback(j=>{if(j){var k=j.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=k;var _=k[0];if(_){var E=window.getComputedStyle(_),T=E.fontSize,A=E.letterSpacing;(T!==m||A!==v)&&(g(T),b(A))}}},[m,v]);return s||r!=null&&r<=0||a!=null&&a<=0?null:x.createElement(Pr,{zIndex:e.zIndex},x.createElement(Bn,{className:Lt("recharts-cartesian-axis",i)},x.createElement(yPe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Zr(e)}),x.createElement(_Pe,{ref:S,axisType:c,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:v,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:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),x.createElement(vTe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},x.createElement(NTe,{label:e.label,labelRef:e.labelRef}),e.children)))}),IA=x.forwardRef((e,t)=>{var n=Xn(e,Qi);return x.createElement(kPe,gl({},n,{ref:t}))});IA.displayName="CartesianAxis";var CPe=["x1","y1","x2","y2","key"],NPe=["offset"],EPe=["xAxisId","yAxisId"],APe=["xAxisId","yAxisId"];function WB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WB(Object(n),!0).forEach(function(r){TPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TPe(e,t,n){return(t=OPe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OPe(e){var t=MPe(e,"string");return typeof t=="symbol"?t:t+""}function MPe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(null,arguments)}function Tg(e,t){if(e==null)return{};var n,r,a=PPe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function PPe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DPe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:a,width:i,height:s,ry:l}=e;return x.createElement("rect",{x:r,y:a,ry:l,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function KY(e){var{option:t,lineItemProps:n}=e,r;if(x.isValidElement(t))r=x.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var a,{x1:i,y1:s,x2:l,y2:c,key:d}=n,h=Tg(n,CPe),m=(a=Zr(h))!==null&&a!==void 0?a:{},{offset:g}=m,v=Tg(m,NPe);r=x.createElement("line",Zo({},v,{x1:i,y1:s,x2:l,y2:c,fill:"none",key:d}))}return r}function RPe(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,l=Tg(e,EPe),c=a.map((d,h)=>{var m=ur(ur({},l),{},{x1:t,y1:d,x2:t+n,y2:d,key:"line-".concat(h),index:h});return x.createElement(KY,{key:"line-".concat(h),option:r,lineItemProps:m})});return x.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function IPe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,l=Tg(e,APe),c=a.map((d,h)=>{var m=ur(ur({},l),{},{x1:d,y1:t,x2:d,y2:t+n,key:"line-".concat(h),index:h});return x.createElement(KY,{option:r,lineItemProps:m,key:"line-".concat(h)})});return x.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function LPe(e){var{horizontalFill:t,fillOpacity:n,x:r,y:a,width:i,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||l==null)return null;var d=l.map(m=>Math.round(m+a-a)).sort((m,g)=>m-g);a!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var v=d[g+1],b=v==null,w=b?a+s-m:v-m;if(w<=0)return null;var S=g%t.length;return x.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:w,width:i,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function zPe(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:a,y:i,width:s,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var d=c.map(m=>Math.round(m+a-a)).sort((m,g)=>m-g);a!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var v=d[g+1],b=v==null,w=b?a+s-m:v-m;if(w<=0)return null;var S=g%n.length;return x.createElement("rect",{key:"react-".concat(g),x:m,y:i,width:w,height:l,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return x.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var $Pe=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return AG(RA(ur(ur(ur({},Qi),n),{},{ticks:TG(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},qPe=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return AG(RA(ur(ur(ur({},Qi),n),{},{ticks:TG(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},BPe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Pn.grid};function YY(e){var t=zG(),n=$G(),r=LG(),a=ur(ur({},Xn(e,BPe)),{},{x:Be(e.x)?e.x:r.left,y:Be(e.y)?e.y:r.top,width:Be(e.width)?e.width:r.width,height:Be(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:s,x:l,y:c,width:d,height:h,syncWithTicks:m,horizontalValues:g,verticalValues:v}=a,b=mr(),w=Ve(P=>Fq(P,"xAxis",i,b)),S=Ve(P=>Fq(P,"yAxis",s,b));if(!hi(d)||!hi(h)||!Be(l)||!Be(c))return null;var j=a.verticalCoordinatesGenerator||$Pe,k=a.horizontalCoordinatesGenerator||qPe,{horizontalPoints:_,verticalPoints:E}=a;if((!_||!_.length)&&typeof k=="function"){var T=g&&g.length,A=k({yAxis:S?ur(ur({},S),{},{ticks:T?g:S.ticks}):void 0,width:t??d,height:n??h,offset:r},T?!0:m);ag(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(_=A)}if((!E||!E.length)&&typeof j=="function"){var O=v&&v.length,D=j({xAxis:w?ur(ur({},w),{},{ticks:O?v:w.ticks}):void 0,width:t??d,height:n??h,offset:r},O?!0:m);ag(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(E=D)}return x.createElement(Pr,{zIndex:a.zIndex},x.createElement("g",{className:"recharts-cartesian-grid"},x.createElement(DPe,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),x.createElement(LPe,Zo({},a,{horizontalPoints:_})),x.createElement(zPe,Zo({},a,{verticalPoints:E})),x.createElement(RPe,Zo({},a,{offset:r,horizontalPoints:_,xAxis:w,yAxis:S})),x.createElement(IPe,Zo({},a,{offset:r,verticalPoints:E,xAxis:w,yAxis:S}))))}YY.displayName="CartesianGrid";var FPe={},WY=hr({name:"errorBars",initialState:FPe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:a}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?a:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(a=>a.dataKey!==r.dataKey||a.direction!==r.direction))}}}),{addErrorBar:_3e,replaceErrorBar:k3e,removeErrorBar:C3e}=WY.actions,HPe=WY.reducer,UPe=["children"];function GPe(e,t){if(e==null)return{};var n,r,a=VPe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function VPe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var KPe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},YPe=x.createContext(KPe);function XY(e){var{children:t}=e,n=GPe(e,UPe);return x.createElement(YPe.Provider,{value:n},t)}function LA(e,t){var n,r,a=Ve(d=>ps(d,e)),i=Ve(d=>gs(d,t)),s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:zn.allowDataOverflow,l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:$n.allowDataOverflow,c=s||l;return{needClip:c,needClipX:s,needClipY:l}}function ZY(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,a=DA(),{needClipX:i,needClipY:s,needClip:l}=LA(t,n);if(!l||!a)return null;var{x:c,y:d,width:h,height:m}=a;return x.createElement("clipPath",{id:"clipPath-".concat(r)},x.createElement("rect",{x:i?c:c-h/2,y:s?d:d-m/2,width:i?h:h*2,height:s?m:m*2}))}var QY=(e,t,n,r)=>ro(e,"xAxis",t,r),JY=(e,t,n,r)=>no(e,"xAxis",t,r),eW=(e,t,n,r)=>ro(e,"yAxis",n,r),tW=(e,t,n,r)=>no(e,"yAxis",n,r),WPe=de([Rt,QY,eW,JY,tW],(e,t,n,r,a)=>ds(e,"xAxis")?Xu(t,r,!1):Xu(n,a,!1)),XPe=(e,t,n,r,a)=>a;function ZPe(e){return e.type==="line"}var QPe=de([ry,XPe],(e,t)=>e.filter(ZPe).find(n=>n.id===t)),JPe=de([Rt,QY,eW,JY,tW,QPe,WPe,ah],(e,t,n,r,a,i,s,l)=>{var{chartData:c,dataStartIndex:d,dataEndIndex:h}=l;if(!(i==null||t==null||n==null||r==null||a==null||r.length===0||a.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:m,data:g}=i,v;if(g!=null&&g.length>0?v=g:v=c==null?void 0:c.slice(d,h+1),v!=null)return bDe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:a,dataKey:m,bandSize:s,displayedData:v})}});function eDe(e){var t=ol(e),n=3,r=2;if(t!=null){var{r:a,strokeWidth:i}=t,s=Number(a),l=Number(i);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(l)||l<0)&&(l=r),{r:s,strokeWidth:l}}return{r:n,strokeWidth:r}}var tDe=["id"],nDe=["type","layout","connectNulls","needClip","shape"],rDe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Nf(){return Nf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nf.apply(null,arguments)}function XB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XB(Object(n),!0).forEach(function(r){aDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aDe(e,t,n){return(t=iDe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iDe(e){var t=sDe(e,"string");return typeof t=="symbol"?t:t+""}function sDe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zA(e,t){if(e==null)return{};var n,r,a=oDe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function oDe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var lDe=e=>{var{dataKey:t,name:n,stroke:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:pc(n,t),payload:e}]},uDe=x.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:l,unit:c,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n,getPosition:kl,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:pc(s,t),hide:l,type:d,color:r,unit:c,graphicalItemId:h}};return x.createElement(MA,{tooltipEntrySettings:m})}),nW=(e,t)=>"".concat(t,"px ").concat(e,"px");function cDe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],a=0;a<t;++a)r.push(...n);return r}var dDe=(e,t,n)=>{var r=n.reduce((g,v)=>g+v,0);if(!r)return nW(t,e);for(var a=Math.floor(e/r),i=e%r,s=[],l=0,c=0;l<n.length;c+=(d=n[l])!==null&&d!==void 0?d:0,++l){var d,h=n[l];if(h!=null&&c+h>i){s=[...n.slice(0,l),i-c];break}}var m=s.length%2===0?[0,t]:[t];return[...cDe(n,a),...s,...m].map(g=>"".concat(g,"px")).join(", ")};function fDe(e){var{clipPathId:t,points:n,props:r}=e,{dot:a,dataKey:i,needClip:s}=r,{id:l}=r,c=zA(r,tDe),d=Zr(c);return x.createElement(mMe,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:d,needClip:s,clipPathId:t})}function hDe(e){var{showLabels:t,children:n,points:r}=e,a=x.useMemo(()=>r==null?void 0:r.map(i=>{var s,l,c={x:(s=i.x)!==null&&s!==void 0?s:0,y:(l=i.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ri(ri({},c),{},{value:i.value,payload:i.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return x.createElement(CY,{value:t?a:void 0},n)}function ZB(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:a,props:i}=e,{type:s,layout:l,connectNulls:c,needClip:d,shape:h}=i,m=zA(i,nDe),g=ri(ri({},xr(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(t,")"):void 0,points:r,type:s,layout:l,connectNulls:c,strokeDasharray:a??i.strokeDasharray});return x.createElement(x.Fragment,null,(r==null?void 0:r.length)>1&&x.createElement(EA,Nf({shapeType:"curve",option:h},g,{pathRef:n})),x.createElement(fDe,{points:r,clipPathId:t,props:i}))}function mDe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function pDe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:s,strokeDasharray:l,isAnimationActive:c,animationBegin:d,animationDuration:h,animationEasing:m,animateNewValues:g,width:v,height:b,onAnimationEnd:w,onAnimationStart:S}=n,j=a.current,k=nh(s,"recharts-line-"),_=x.useRef(k),[E,T]=x.useState(!1),A=!E,O=x.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),D=x.useCallback(()=>{typeof S=="function"&&S(),T(!0)},[S]),P=mDe(r.current),M=x.useRef(0);_.current!==k&&(M.current=i.current,_.current=k);var z=M.current;return x.createElement(hDe,{points:s,showLabels:A},n.children,x.createElement(th,{animationId:k,begin:d,duration:h,isActive:c,easing:m,onAnimationEnd:O,onAnimationStart:D,key:k},L=>{var F=sn(z,P+z,L),R=Math.min(F,P),I;if(c)if(l){var q="".concat(l).split(/[,\s]+/gim).map(K=>parseFloat(K));I=dDe(R,P,q)}else I=nW(P,R);else I=l==null?void 0:String(l);if(L>0&&P>0&&(a.current=s,i.current=Math.max(i.current,R)),j){var G=j.length/s.length,Y=L===1?s:s.map((K,B)=>{var U=Math.floor(B*G);if(j[U]){var X=j[U];return ri(ri({},K),{},{x:sn(X.x,K.x,L),y:sn(X.y,K.y,L)})}return g?ri(ri({},K),{},{x:sn(v*2,K.x,L),y:sn(b/2,K.y,L)}):ri(ri({},K),{},{x:K.x,y:K.y})});return a.current=Y,x.createElement(ZB,{props:n,points:Y,clipPathId:t,pathRef:r,strokeDasharray:I})}return x.createElement(ZB,{props:n,points:s,clipPathId:t,pathRef:r,strokeDasharray:I})}),x.createElement(_A,{label:n.label}))}function gDe(e){var{clipPathId:t,props:n}=e,r=x.useRef(null),a=x.useRef(0),i=x.useRef(null);return x.createElement(pDe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:a,pathRef:i})}var vDe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:$t(e.payload,t)}};class yDe extends x.Component{render(){var{hide:t,dot:n,points:r,className:a,xAxisId:i,yAxisId:s,top:l,left:c,width:d,height:h,id:m,needClip:g,zIndex:v}=this.props;if(t)return null;var b=Lt("recharts-line",a),w=m,{r:S,strokeWidth:j}=eDe(n),k=RY(n),_=S*2+j,E=g?"url(#clipPath-".concat(k?"":"dots-").concat(w,")"):void 0;return x.createElement(Pr,{zIndex:v},x.createElement(Bn,{className:b},g&&x.createElement("defs",null,x.createElement(ZY,{clipPathId:w,xAxisId:i,yAxisId:s}),!k&&x.createElement("clipPath",{id:"clipPath-dots-".concat(w)},x.createElement("rect",{x:c-_/2,y:l-_/2,width:d+_,height:h+_}))),x.createElement(XY,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:vDe,errorBarOffset:0},x.createElement(gDe,{props:this.props,clipPathId:w}))),x.createElement(DMe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:E}))}}var rW={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:Pn.line,type:"linear"};function xDe(e){var t=Xn(e,rW),{activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,connectNulls:l,dot:c,hide:d,isAnimationActive:h,label:m,legendType:g,xAxisId:v,yAxisId:b,id:w}=t,S=zA(t,rDe),{needClip:j}=LA(v,b),k=DA(),_=Cl(),E=mr(),T=Ve(M=>JPe(M,v,b,E,w));if(_!=="horizontal"&&_!=="vertical"||T==null||k==null)return null;var{height:A,width:O,x:D,y:P}=k;return x.createElement(yDe,Nf({},S,{id:w,connectNulls:l,dot:c,activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,isAnimationActive:h,hide:d,label:m,legendType:g,xAxisId:v,yAxisId:b,points:T,layout:_,height:A,width:O,left:D,top:P,needClip:j}))}function bDe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,dataKey:s,bandSize:l,displayedData:c}=e;return c.map((d,h)=>{var m=$t(d,s);if(t==="horizontal"){var g=G6({axis:n,ticks:a,bandSize:l,entry:d,index:h}),v=cn(m)?null:r.scale.map(m);return{x:g,y:v??null,value:m,payload:d}}var b=cn(m)?null:n.scale.map(m),w=G6({axis:r,ticks:i,bandSize:l,entry:d,index:h});return b==null||w==null?null:{x:b,y:w,value:m,payload:d}}).filter(Boolean)}function wDe(e){var t=Xn(e,rW),n=mr();return x.createElement(PA,{id:t.id,type:"line"},r=>x.createElement(x.Fragment,null,x.createElement(IY,{legendPayload:lDe(t)}),x.createElement(uDe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),x.createElement(zY,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),x.createElement(xDe,Nf({},t,{id:r}))))}var aW=x.memo(wDe,Jf);aW.displayName="Line";function Tl(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:qY}function Ol(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:qY}var SDe="Invariant failed";function jDe(e,t){throw new Error(SDe)}function bN(){return bN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bN.apply(null,arguments)}function $A(e){return x.createElement(EA,bN({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var _De=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(Be(t))return t;var i=Be(r)||cn(r);return i?t(r,a):(i||jDe(),n)}},kDe=(e,t,n)=>n,CDe=(e,t)=>t,ph=de([ry,CDe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),NDe=de([ph],e=>e==null?void 0:e.maxBarSize),EDe=(e,t,n,r)=>r,ADe=de([Rt,ry,Tl,Ol,kDe],(e,t,n,r,a)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===a).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),TDe=(e,t,n)=>{var r=Rt(e),a=Tl(e,t),i=Ol(e,t);if(!(a==null||i==null))return r==="horizontal"?pN(e,"yAxis",i,n):pN(e,"xAxis",a,n)},ODe=(e,t)=>{var n=Rt(e),r=Tl(e,t),a=Ol(e,t);if(!(r==null||a==null))return n==="horizontal"?Bq(e,"xAxis",r):Bq(e,"yAxis",a)},MDe=de([ADe,Z_e,ODe],RMe),PDe=(e,t,n)=>{var r,a,i=ph(e,t);if(i==null)return 0;var s=Tl(e,t),l=Ol(e,t);if(s==null||l==null)return 0;var c=Rt(e),d=wV(e),{maxBarSize:h}=i,m=cn(h)?d:h,g,v;return c==="horizontal"?(g=ro(e,"xAxis",s,n),v=no(e,"xAxis",s,n)):(g=ro(e,"yAxis",l,n),v=no(e,"yAxis",l,n)),(r=(a=Xu(g,v,!0))!==null&&a!==void 0?a:m)!==null&&r!==void 0?r:0},iW=(e,t,n)=>{var r=Rt(e),a=Tl(e,t),i=Ol(e,t);if(!(a==null||i==null)){var s,l;return r==="horizontal"?(s=ro(e,"xAxis",a,n),l=no(e,"xAxis",a,n)):(s=ro(e,"yAxis",i,n),l=no(e,"yAxis",i,n)),Xu(s,l)}},DDe=de([MDe,wV,X_e,SV,PDe,iW,NDe],qMe),RDe=(e,t,n)=>{var r=Tl(e,t);if(r!=null)return ro(e,"xAxis",r,n)},IDe=(e,t,n)=>{var r=Ol(e,t);if(r!=null)return ro(e,"yAxis",r,n)},LDe=(e,t,n)=>{var r=Tl(e,t);if(r!=null)return no(e,"xAxis",r,n)},zDe=(e,t,n)=>{var r=Ol(e,t);if(r!=null)return no(e,"yAxis",r,n)},$De=de([DDe,ph],FMe),qDe=de([TDe,ph],BMe),BDe=de([Fn,cE,RDe,IDe,LDe,zDe,$De,Rt,B_e,iW,qDe,ph,EDe],(e,t,n,r,a,i,s,l,c,d,h,m,g)=>{var{chartData:v,dataStartIndex:b,dataEndIndex:w}=c;if(!(m==null||s==null||t==null||l!=="horizontal"&&l!=="vertical"||n==null||r==null||a==null||i==null||d==null)){var{data:S}=m,j;if(S!=null&&S.length>0?j=S:j=v==null?void 0:v.slice(b,w+1),j!=null)return pRe({layout:l,barSettings:m,pos:s,parentViewBox:t,bandSize:d,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:h,displayedData:j,offset:e,cells:g,dataStartIndex:b})}}),FDe=["index"];function wN(){return wN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wN.apply(null,arguments)}function HDe(e,t){if(e==null)return{};var n,r,a=UDe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function UDe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var sW=x.createContext(void 0),GDe=e=>{var t=x.useContext(sW);if(t!=null)return t.stackId;if(e!=null)return nSe(e)},VDe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),KDe=e=>{var t=x.useContext(sW);if(t!=null){var{stackId:n}=t;return"url(#".concat(VDe(n,e),")")}},oW=e=>{var{index:t}=e,n=HDe(e,FDe),r=KDe(t);return x.createElement(Bn,wN({className:"recharts-bar-stack-layer",clipPath:r},n))},YDe=["onMouseEnter","onMouseLeave","onClick"],WDe=["value","background","tooltipPosition"],XDe=["id"],ZDe=["onMouseEnter","onClick","onMouseLeave"];function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(null,arguments)}function QB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QB(Object(n),!0).forEach(function(r){QDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QDe(e,t,n){return(t=JDe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JDe(e){var t=eRe(e,"string");return typeof t=="symbol"?t:t+""}function eRe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(e,t){if(e==null)return{};var n,r,a=tRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function tRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var nRe=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:pc(n,t),payload:e}]},rRe=x.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:a,name:i,hide:s,unit:l,tooltipType:c,id:d}=e,h={dataDefinedOnItem:void 0,getPosition:kl,settings:{stroke:n,strokeWidth:r,fill:a,dataKey:t,nameKey:void 0,name:pc(i,t),hide:s,type:c,color:a,unit:l,graphicalItemId:d}};return x.createElement(MA,{tooltipEntrySettings:h})});function aRe(e){var t=Ve(ao),{data:n,dataKey:r,background:a,allOtherBarProps:i}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=i,d=Og(i,YDe),h=AA(s,r,i.id),m=TA(l),g=OA(c,r,i.id);if(!a||n==null)return null;var v=ol(a);return x.createElement(Pr,{zIndex:HMe(a,Pn.barBackground)},n.map((b,w)=>{var{value:S,background:j,tooltipPosition:k}=b,_=Og(b,WDe);if(!j)return null;var E=h(b,w),T=m(b,w),A=g(b,w),O=gr(gr(gr(gr(gr({option:a,isActive:String(w)===t},_),{},{fill:"#eee"},j),v),Cv(d,b,w)),{},{onMouseEnter:E,onMouseLeave:T,onClick:A,dataKey:r,index:w,className:"recharts-bar-background-rectangle"});return x.createElement($A,so({key:"background-bar-".concat(w)},O))}))}function iRe(e){var{showLabels:t,children:n,rects:r}=e,a=r==null?void 0:r.map(i=>{var s={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return gr(gr({},s),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:s,fill:i.fill})});return x.createElement(CY,{value:t?a:void 0},n)}function sRe(e){var{shape:t,activeBar:n,baseProps:r,entry:a,index:i,dataKey:s}=e,l=Ve(ao),c=Ve(vA),d=n&&String(a.originalDataIndex)===l&&(c==null||s===c),[h,m]=x.useState(!1),[g,v]=x.useState(!1);x.useEffect(()=>{var _;return d?(m(!0),_=requestAnimationFrame(()=>{v(!0)})):v(!1),()=>{cancelAnimationFrame(_)}},[d]);var b=x.useCallback(()=>{d||m(!1)},[d]),w=d&&g,S=d||h,j;d?n===!0?j=t:j=n:j=t;var k=x.createElement($A,so({},r,{name:String(r.name)},a,{isActive:w,option:j,index:i,dataKey:s,onTransitionEnd:b}));return S?x.createElement(Pr,{zIndex:Pn.activeBar},x.createElement(oW,{index:a.originalDataIndex},k)):k}function oRe(e){var{shape:t,baseProps:n,entry:r,index:a,dataKey:i}=e;return x.createElement($A,so({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:i}))}function lRe(e){var t,{data:n,props:r}=e,a=(t=Zr(r))!==null&&t!==void 0?t:{},{id:i}=a,s=Og(a,XDe),{shape:l,dataKey:c,activeBar:d}=r,{onMouseEnter:h,onClick:m,onMouseLeave:g}=r,v=Og(r,ZDe),b=AA(h,c,i),w=TA(g),S=OA(m,c,i);return n?x.createElement(x.Fragment,null,n.map((j,k)=>x.createElement(oW,so({index:j.originalDataIndex,key:"rectangle-".concat(j==null?void 0:j.x,"-").concat(j==null?void 0:j.y,"-").concat(j==null?void 0:j.value,"-").concat(k),className:"recharts-bar-rectangle"},Cv(v,j,k),{onMouseEnter:b(j,k),onMouseLeave:w(j,k),onClick:S(j,k)}),d?x.createElement(sRe,{shape:l,activeBar:d,baseProps:s,entry:j,index:k,dataKey:c}):x.createElement(oRe,{shape:l,baseProps:s,entry:j,index:k,dataKey:c})))):null}function uRe(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:a,isAnimationActive:i,animationBegin:s,animationDuration:l,animationEasing:c,onAnimationEnd:d,onAnimationStart:h}=t,m=n.current,g=nh(t,"recharts-bar-"),[v,b]=x.useState(!1),w=!v,S=x.useCallback(()=>{typeof d=="function"&&d(),b(!1)},[d]),j=x.useCallback(()=>{typeof h=="function"&&h(),b(!0)},[h]);return x.createElement(iRe,{showLabels:w,rects:r},x.createElement(th,{animationId:g,begin:s,duration:l,isActive:i,easing:c,onAnimationEnd:S,onAnimationStart:j,key:g},k=>{var _=k===1?r:r==null?void 0:r.map((E,T)=>{var A=m&&m[T];if(A)return gr(gr({},E),{},{x:sn(A.x,E.x,k),y:sn(A.y,E.y,k),width:sn(A.width,E.width,k),height:sn(A.height,E.height,k)});if(a==="horizontal"){var O=sn(0,E.height,k),D=sn(E.stackedBarStart,E.y,k);return gr(gr({},E),{},{y:D,height:O})}var P=sn(0,E.width,k),M=sn(E.stackedBarStart,E.x,k);return gr(gr({},E),{},{width:P,x:M})});return k>0&&(n.current=_??null),_==null?null:x.createElement(Bn,null,x.createElement(lRe,{props:t,data:_}))}),x.createElement(_A,{label:t.label}),t.children)}function cRe(e){var t=x.useRef(null);return x.createElement(uRe,{previousRectanglesRef:t,props:e})}var lW=0,dRe=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:$t(e,t)}};class fRe extends x.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:a,xAxisId:i,yAxisId:s,needClip:l,background:c,id:d}=this.props;if(t||n==null)return null;var h=Lt("recharts-bar",a),m=d;return x.createElement(Bn,{className:h,id:d},l&&x.createElement("defs",null,x.createElement(ZY,{clipPathId:m,xAxisId:i,yAxisId:s})),x.createElement(Bn,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(m,")"):void 0},x.createElement(aRe,{data:n,dataKey:r,background:c,allOtherBarProps:this.props}),x.createElement(cRe,this.props)))}}var hRe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:lW,xAxisId:0,yAxisId:0,zIndex:Pn.bar};function mRe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:h}=e,{needClip:m}=LA(t,n),g=Cl(),v=mr(),b=NA(e.children,mh),w=Ve(k=>BDe(k,e.id,v,b));if(g!=="vertical"&&g!=="horizontal")return null;var S,j=w==null?void 0:w[0];return j==null||j.height==null||j.width==null?S=0:S=g==="vertical"?j.height/2:j.width/2,x.createElement(XY,{xAxisId:t,yAxisId:n,data:w,dataPointFormatter:dRe,errorBarOffset:S},x.createElement(fRe,so({},e,{layout:g,needClip:m,data:w,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:l,animationDuration:c,animationEasing:d,isAnimationActive:h})))}function pRe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:l,yAxis:c,xAxisTicks:d,yAxisTicks:h,stackedData:m,displayedData:g,offset:v,cells:b,parentViewBox:w,dataStartIndex:S}=e,j=t==="horizontal"?c:l,k=m?j.scale.domain():null,_=rSe({numericAxis:j}),E=j.scale.map(_);return g.map((T,A)=>{var O,D,P,M,z,L;if(m){var F=m[A+S];if(F==null)return null;O=Zwe(F,k)}else O=$t(T,n),Array.isArray(O)||(O=[_,O]);var R=_De(r,lW)(O[1],A);if(t==="horizontal"){var I,q=c.scale.map(O[0]),G=c.scale.map(O[1]);if(q==null||G==null)return null;D=V6({axis:l,ticks:d,bandSize:s,offset:i.offset,entry:T,index:A}),P=(I=G??q)!==null&&I!==void 0?I:void 0,M=i.size;var Y=q-G;if(z=di(Y)?0:Y,L={x:D,y:v.top,width:M,height:v.height},Math.abs(R)>0&&Math.abs(z)<Math.abs(R)){var K=Wn(z||R)*(Math.abs(R)-Math.abs(z));P-=K,z+=K}}else{var B=l.scale.map(O[0]),U=l.scale.map(O[1]);if(B==null||U==null)return null;if(D=B,P=V6({axis:c,ticks:h,bandSize:s,offset:i.offset,entry:T,index:A}),M=U-B,z=i.size,L={x:v.left,y:P,width:v.width,height:z},Math.abs(R)>0&&Math.abs(M)<Math.abs(R)){var X=Wn(M||R)*(Math.abs(R)-Math.abs(M));M+=X}}if(D==null||P==null||M==null||z==null||!a&&(M===0||z===0))return null;var H=gr(gr({},T),{},{stackedBarStart:E,x:D,y:P,width:M,height:z,value:m?O:O[1],payload:T,background:L,tooltipPosition:{x:D+M/2,y:P+z/2},parentViewBox:w,originalDataIndex:A},b&&b[A]&&b[A].props);return H}).filter(Boolean)}function gRe(e){var t=Xn(e,hRe),n=GDe(t.stackId),r=mr();return x.createElement(PA,{id:t.id,type:"bar"},a=>x.createElement(x.Fragment,null,x.createElement(IY,{legendPayload:nRe(t)}),x.createElement(rRe,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:a}),x.createElement(zY,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),x.createElement(Pr,{zIndex:t.zIndex},x.createElement(mRe,so({},t,{id:a})))))}var jp=x.memo(gRe,Jf);jp.displayName="Bar";var vRe=["domain","range"],yRe=["domain","range"];function JB(e,t){if(e==null)return{};var n,r,a=xRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function xRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function eF(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function uW(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=JB(e,vRe),{domain:i,range:s}=t,l=JB(t,yRe);return!eF(n,i)||!eF(r,s)?!1:Jf(a,l)}var bRe=["type"],wRe=["dangerouslySetInnerHTML","ticks","scale"],SRe=["id","scale"];function SN(){return SN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SN.apply(null,arguments)}function tF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tF(Object(n),!0).forEach(function(r){jRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jRe(e,t,n){return(t=_Re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Re(e){var t=kRe(e,"string");return typeof t=="symbol"?t:t+""}function kRe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jN(e,t){if(e==null)return{};var n,r,a=CRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function CRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function NRe(e){var t=Jt(),n=x.useRef(null),r=qG(),{type:a}=e,i=jN(e,bRe),s=Vv(r,"xAxis",a),l=x.useMemo(()=>{if(s!=null)return nF(nF({},i),{},{type:s})},[i,s]);return x.useLayoutEffect(()=>{l!=null&&(n.current===null?t(xMe(l)):n.current!==l&&t(bMe({prev:n.current,next:l})),n.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{n.current&&(t(wMe(n.current)),n.current=null)},[t]),null}var ERe=e=>{var{xAxisId:t,className:n}=e,r=Ve(cE),a=mr(),i="xAxis",s=Ve(j=>IK(j,i,t,a)),l=Ve(j=>PK(j,t)),c=Ve(j=>s2e(j,t)),d=Ve(j=>dK(j,t));if(l==null||c==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:m,scale:g}=e,v=jN(e,wRe),{id:b,scale:w}=d,S=jN(d,SRe);return x.createElement(IA,SN({},v,S,{x:c.x,y:c.y,width:l.width,height:l.height,className:Lt("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},ARe={allowDataOverflow:zn.allowDataOverflow,allowDecimals:zn.allowDecimals,allowDuplicatedCategory:zn.allowDuplicatedCategory,angle:zn.angle,axisLine:Qi.axisLine,height:zn.height,hide:!1,includeHidden:zn.includeHidden,interval:zn.interval,label:!1,minTickGap:zn.minTickGap,mirror:zn.mirror,orientation:zn.orientation,padding:zn.padding,reversed:zn.reversed,scale:zn.scale,tick:zn.tick,tickCount:zn.tickCount,tickLine:Qi.tickLine,tickSize:Qi.tickSize,type:zn.type,niceTicks:zn.niceTicks,xAxisId:0},TRe=e=>{var t=Xn(e,ARe);return x.createElement(x.Fragment,null,x.createElement(NRe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),x.createElement(ERe,t))},_N=x.memo(TRe,uW);_N.displayName="XAxis";var ORe=["type"],MRe=["dangerouslySetInnerHTML","ticks","scale"],PRe=["id","scale"];function kN(){return kN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kN.apply(null,arguments)}function rF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rF(Object(n),!0).forEach(function(r){DRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DRe(e,t,n){return(t=RRe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RRe(e){var t=IRe(e,"string");return typeof t=="symbol"?t:t+""}function IRe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CN(e,t){if(e==null)return{};var n,r,a=LRe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function LRe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function zRe(e){var t=Jt(),n=x.useRef(null),r=qG(),{type:a}=e,i=CN(e,ORe),s=Vv(r,"yAxis",a),l=x.useMemo(()=>{if(s!=null)return aF(aF({},i),{},{type:s})},[s,i]);return x.useLayoutEffect(()=>{l!=null&&(n.current===null?t(SMe(l)):n.current!==l&&t(jMe({prev:n.current,next:l})),n.current=l)},[l,t]),x.useLayoutEffect(()=>()=>{n.current&&(t(_Me(n.current)),n.current=null)},[t]),null}function $Re(e){var{yAxisId:t,className:n,width:r,label:a}=e,i=x.useRef(null),s=x.useRef(null),l=Ve(cE),c=mr(),d=Jt(),h="yAxis",m=Ve(A=>DK(A,t)),g=Ve(A=>l2e(A,t)),v=Ve(A=>IK(A,h,t,c)),b=Ve(A=>fK(A,t));if(x.useLayoutEffect(()=>{if(!(r!=="auto"||!m||jA(a)||x.isValidElement(a)||b==null)){var A=i.current;if(A){var O=A.getCalculatedWidth();Math.round(m.width)!==Math.round(O)&&d(kMe({id:t,width:O}))}}},[v,m,d,a,t,r,b]),m==null||g==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:S,scale:j}=e,k=CN(e,MRe),{id:_,scale:E}=b,T=CN(b,PRe);return x.createElement(IA,kN({},k,T,{ref:i,labelRef:s,x:g.x,y:g.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:m.width,height:m.height,className:Lt("recharts-".concat(h," ").concat(h),n),viewBox:l,ticks:v,axisType:h,axisId:t}))}var qRe={allowDataOverflow:$n.allowDataOverflow,allowDecimals:$n.allowDecimals,allowDuplicatedCategory:$n.allowDuplicatedCategory,angle:$n.angle,axisLine:Qi.axisLine,hide:!1,includeHidden:$n.includeHidden,interval:$n.interval,label:!1,minTickGap:$n.minTickGap,mirror:$n.mirror,orientation:$n.orientation,padding:$n.padding,reversed:$n.reversed,scale:$n.scale,tick:$n.tick,tickCount:$n.tickCount,tickLine:Qi.tickLine,tickSize:Qi.tickSize,type:$n.type,niceTicks:$n.niceTicks,width:$n.width,yAxisId:0},BRe=e=>{var t=Xn(e,qRe);return x.createElement(x.Fragment,null,x.createElement(zRe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),x.createElement($Re,t))},NN=x.memo(BRe,uW);NN.displayName="YAxis";var FRe=(e,t)=>t,qA=de([FRe,Rt,AV,Zn,eY,vs,TEe,Fn],LEe);function HRe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function BA(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(HRe(e)){var a=e.currentTarget.getBBox();n=a.width>0?t.width/a.width:1,r=a.height>0?t.height/a.height:1}else{var i=e.currentTarget;n=i.offsetWidth>0?t.width/i.offsetWidth:1,r=i.offsetHeight>0?t.height/i.offsetHeight:1}var s=(l,c)=>({relativeX:Math.round((l-t.left)/n),relativeY:Math.round((c-t.top)/r)});return"touches"in e?Array.from(e.touches).map(l=>s(l.clientX,l.clientY)):s(e.clientX,e.clientY)}var cW=Qr("mouseClick"),dW=Wf();dW.startListening({actionCreator:cW,effect:(e,t)=>{var n=e.payload,r=qA(t.getState(),BA(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(_2e({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var EN=Qr("mouseMove"),fW=Wf(),_u=null,Bo=null,Jk=null;fW.startListening({actionCreator:EN,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||(i==null?void 0:i.includes("mousemove"));_u!==null&&(cancelAnimationFrame(_u),_u=null),Bo!==null&&(typeof a!="number"||!s)&&(clearTimeout(Bo),Bo=null),Jk=BA(n);var l=()=>{var c=t.getState(),d=fh(c,c.tooltip.settings.shared);if(!Jk){_u=null,Bo=null;return}if(d==="axis"){var h=qA(c,Jk);(h==null?void 0:h.activeIndex)!=null?t.dispatch(UK({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):t.dispatch(HK())}_u=null,Bo=null};if(!s){l();return}a==="raf"?_u=requestAnimationFrame(l):typeof a=="number"&&Bo===null&&(Bo=setTimeout(l,a))}});function URe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var iF={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},hW=hr({name:"rootProps",initialState:iF,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:iF.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),GRe=hW.reducer,{updateOptions:VRe}=hW.actions,KRe=null,YRe={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},mW=hr({name:"polarOptions",initialState:KRe,reducers:YRe}),{updatePolarOptions:WRe}=mW.actions,XRe=mW.reducer,pW=Qr("keyDown"),gW=Qr("focus"),vW=Qr("blur"),fy=Wf(),ku=null,Fo=null,sp=null;fy.startListening({actionCreator:pW,effect:(e,t)=>{sp=e.payload,ku!==null&&(cancelAnimationFrame(ku),ku=null);var n=t.getState(),{throttleDelay:r,throttledEvents:a}=n.eventSettings,i=a==="all"||a.includes("keydown");Fo!==null&&(typeof r!="number"||!i)&&(clearTimeout(Fo),Fo=null);var s=()=>{try{var l=t.getState(),c=l.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:d}=l.tooltip,h=sp;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var m=Yd(d,pl(l),tc(l),nc(l)),g=m==null?-1:Number(m),v=!Number.isFinite(g)||g<0,b=vs(l),w=pl(l),S=fh(l,l.tooltip.settings.shared);if(h==="Enter"){if(v)return;var j=kg(l,S,"hover",String(d.index));t.dispatch(_g({active:!d.active,activeIndex:d.index,activeCoordinate:j}));return}var k=h2e(l),_=k==="left-to-right"?1:-1,E=h==="ArrowRight"?1:-1,T;if(v){var A=tc(l),O=nc(l),D=E*_,P=R=>({active:!1,index:String(R),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,D>0){for(var M=0;M<w.length;M++)if(Yd(P(M),w,A,O)!=null){T=M;break}}else for(var z=w.length-1;z>=0;z--)if(Yd(P(z),w,A,O)!=null){T=z;break}if(T<0)return}else{T=g+E*_;var L=(b==null?void 0:b.length)||w.length;if(L===0||T>=L||T<0)return}var F=kg(l,S,"hover",String(T));t.dispatch(_g({active:!0,activeIndex:T.toString(),activeCoordinate:F}))}finally{ku=null,Fo=null}};if(!i){s();return}r==="raf"?ku=requestAnimationFrame(s):typeof r=="number"&&Fo===null&&(s(),sp=null,Fo=setTimeout(()=>{sp?s():(Fo=null,ku=null)},r))}});fy.startListening({actionCreator:gW,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;if(!a.active&&a.index==null){var i="0",s=fh(n,n.tooltip.settings.shared),l=kg(n,s,"hover",String(i));t.dispatch(_g({active:!0,activeIndex:i,activeCoordinate:l}))}}}});fy.startListening({actionCreator:vW,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;a.active&&t.dispatch(_g({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function yW(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var a=Reflect.get(n,r);return typeof a=="function"?a.bind(n):a}})}var fa=Qr("externalEvent"),xW=Wf(),op=new Map,Od=new Map,eC=new Map;xW.startListening({actionCreator:fa,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var a=r.type,i=yW(r);eC.set(a,{handler:n,reactEvent:i});var s=op.get(a);s!==void 0&&(cancelAnimationFrame(s),op.delete(a));var l=t.getState(),{throttleDelay:c,throttledEvents:d}=l.eventSettings,h=d,m=h==="all"||(h==null?void 0:h.includes(a)),g=Od.get(a);g!==void 0&&(typeof c!="number"||!m)&&(clearTimeout(g),Od.delete(a));var v=()=>{var S=eC.get(a);try{if(!S)return;var{handler:j,reactEvent:k}=S,_=t.getState(),E={activeCoordinate:mEe(_),activeDataKey:vA(_),activeIndex:ao(_),activeLabel:rY(_),activeTooltipIndex:ao(_),isTooltipActive:pEe(_)};j&&j(E,k)}finally{op.delete(a),Od.delete(a),eC.delete(a)}};if(!m){v();return}if(c==="raf"){var b=requestAnimationFrame(v);op.set(a,b)}else if(typeof c=="number"){if(!Od.has(a)){v();var w=setTimeout(v,c);Od.set(a,w)}}else v()}}});var ZRe=de([Sc],e=>e.tooltipItemPayloads),QRe=de([ZRe,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(i=>i.settings.graphicalItemId===n);if(r!=null){var{getPosition:a}=r;if(a!=null)return a(t)}}}),bW=Qr("touchMove"),wW=Wf(),Ho=null,Ks=null,sF=null,Md=null;wW.startListening({actionCreator:bW,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){Md=yW(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||i.includes("touchmove");Ho!==null&&(cancelAnimationFrame(Ho),Ho=null),Ks!==null&&(typeof a!="number"||!s)&&(clearTimeout(Ks),Ks=null),sF=Array.from(n.touches).map(c=>BA({clientX:c.clientX,clientY:c.clientY,currentTarget:n.currentTarget}));var l=()=>{if(Md!=null){var c=t.getState(),d=fh(c,c.tooltip.settings.shared);if(d==="axis"){var h,m=(h=sF)===null||h===void 0?void 0:h[0];if(m==null){Ho=null,Ks=null;return}var g=qA(c,m);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(UK({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(d==="item"){var v,b=Md.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var S=w.getAttribute(MG),j=(v=w.getAttribute(PG))!==null&&v!==void 0?v:void 0,k=Al(c).find(T=>T.id===j);if(S==null||k==null||j==null)return;var{dataKey:_}=k,E=QRe(c,S,j);t.dispatch(FK({activeDataKey:_,activeIndex:S,activeCoordinate:E,activeGraphicalItemId:j}))}Ho=null,Ks=null}};if(!s){l();return}a==="raf"?Ho=requestAnimationFrame(l):typeof a=="number"&&Ks===null&&(l(),Md=null,Ks=setTimeout(()=>{Md?l():(Ks=null,Ho=null)},a))}}});var FA={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},SW=hr({name:"eventSettings",initialState:FA,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:JRe}=SW.actions,e5e=SW.reducer,t5e=eG({brush:UMe,cartesianAxis:CMe,chartData:hAe,errorBars:HPe,eventSettings:e5e,graphicalItems:TOe,layout:Vwe,legend:ZSe,options:lAe,polarAxis:HTe,polarOptions:XRe,referenceElements:YMe,renderedTicks:dPe,rootProps:GRe,tooltip:k2e,zIndex:XEe}),n5e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return vwe({reducer:t5e,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([dW.middleware,fW.middleware,fy.middleware,xW.middleware,wW.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat(pG({type:"raf"}))},devTools:{serialize:{replacer:URe},name:"recharts-".concat(n)}})};function jW(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,a=mr(),i=x.useRef(null);if(a)return n;i.current==null&&(i.current=n5e(t,r));var s=rE;return x.createElement(hje,{context:s,store:i.current},n)}function r5e(e){var{layout:t,margin:n}=e,r=Jt(),a=mr();return x.useEffect(()=>{a||(r(Hwe(t)),r(Fwe(n)))},[r,a,t,n]),null}var _W=x.memo(r5e,Jf);function kW(e){var t=Jt();return x.useEffect(()=>{t(VRe(e))},[t,e]),null}var a5e=e=>{var t=Jt();return x.useEffect(()=>{t(JRe(e))},[t,e]),null},CW=x.memo(a5e,Jf);function oF(e){var{zIndex:t,isPanorama:n}=e,r=x.useRef(null),a=Jt();return x.useLayoutEffect(()=>(r.current&&a(YEe({zIndex:t,element:r.current,isPanorama:n})),()=>{a(WEe({zIndex:t,isPanorama:n}))}),[a,t,n]),x.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function lF(e){var{children:t,isPanorama:n}=e,r=Ve($Ee);if(!r||r.length===0)return t;var a=r.filter(s=>s<0),i=r.filter(s=>s>0);return x.createElement(x.Fragment,null,a.map(s=>x.createElement(oF,{key:s,zIndex:s,isPanorama:n})),t,i.map(s=>x.createElement(oF,{key:s,zIndex:s,isPanorama:n})))}var i5e=["children"];function s5e(e,t){if(e==null)return{};var n,r,a=o5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function o5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(null,arguments)}var l5e={width:"100%",height:"100%",display:"block"},u5e=x.forwardRef((e,t)=>{var n=zG(),r=$G(),a=JG();if(!hi(n)||!hi(r))return null;var{children:i,otherAttributes:s,title:l,desc:c}=e,d,h;return s!=null&&(typeof s.tabIndex=="number"?d=s.tabIndex:d=a?0:void 0,typeof s.role=="string"?h=s.role:h=a?"application":void 0),x.createElement(v7,Mg({},s,{title:l,desc:c,role:h,tabIndex:d,width:n,height:r,style:l5e,ref:t}),i)}),c5e=e=>{var{children:t}=e,n=Ve(qv);if(!n)return null;var{width:r,height:a,y:i,x:s}=n;return x.createElement(v7,{width:r,height:a,x:s,y:i},t)},uF=x.forwardRef((e,t)=>{var{children:n}=e,r=s5e(e,i5e),a=mr();return a?x.createElement(c5e,null,x.createElement(lF,{isPanorama:!0},n)):x.createElement(u5e,Mg({ref:t},r),x.createElement(lF,{isPanorama:!1},n))});function d5e(){var e=Jt(),[t,n]=x.useState(null),r=Ve(uSe);return x.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;Nt(i)&&i!==r&&e(Gwe(i))}},[t,e,r]),n}function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function f5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cF(Object(n),!0).forEach(function(r){h5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h5e(e,t,n){return(t=m5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m5e(e){var t=p5e(e,"string");return typeof t=="symbol"?t:t+""}function p5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function to(){return to=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},to.apply(null,arguments)}var g5e=()=>(SAe(),null);function Pg(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var v5e=x.forwardRef((e,t)=>{var n,r,a=x.useRef(null),[i,s]=x.useState({containerWidth:Pg((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Pg((r=e.style)===null||r===void 0?void 0:r.height)}),l=x.useCallback((d,h)=>{s(m=>{var g=Math.round(d),v=Math.round(h);return m.containerWidth===g&&m.containerHeight===v?m:{containerWidth:g,containerHeight:v}})},[]),c=x.useCallback(d=>{if(typeof t=="function"&&t(d),a.current!=null&&(a.current.disconnect(),a.current=null),d!=null&&typeof ResizeObserver<"u"){var{width:h,height:m}=d.getBoundingClientRect();l(h,m);var g=b=>{var w=b[0];if(w!=null){var{width:S,height:j}=w.contentRect;l(S,j)}},v=new ResizeObserver(g);v.observe(d),a.current=v}},[t,l]);return x.useEffect(()=>()=>{var d=a.current;d!=null&&d.disconnect()},[l]),x.createElement(x.Fragment,null,x.createElement(Zf,{width:i.containerWidth,height:i.containerHeight}),x.createElement("div",to({ref:c},e)))}),y5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e,[a,i]=x.useState({containerWidth:Pg(n),containerHeight:Pg(r)}),s=x.useCallback((c,d)=>{i(h=>{var m=Math.round(c),g=Math.round(d);return h.containerWidth===m&&h.containerHeight===g?h:{containerWidth:m,containerHeight:g}})},[]),l=x.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:d,height:h}=c.getBoundingClientRect();s(d,h)}},[t,s]);return x.createElement(x.Fragment,null,x.createElement(Zf,{width:a.containerWidth,height:a.containerHeight}),x.createElement("div",to({ref:l},e)))}),x5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e;return x.createElement(x.Fragment,null,x.createElement(Zf,{width:n,height:r}),x.createElement("div",to({ref:t},e)))}),b5e=x.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?x.createElement(y5e,to({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?x.createElement(x5e,to({},e,{width:n,height:r,ref:t})):x.createElement(x.Fragment,null,x.createElement(Zf,{width:n,height:r}),x.createElement("div",to({ref:t},e)))});function w5e(e){return e?v5e:b5e}var S5e=x.forwardRef((e,t)=>{var{children:n,className:r,height:a,onClick:i,onContextMenu:s,onDoubleClick:l,onMouseDown:c,onMouseEnter:d,onMouseLeave:h,onMouseMove:m,onMouseUp:g,onTouchEnd:v,onTouchMove:b,onTouchStart:w,style:S,width:j,responsive:k,dispatchTouchEvents:_=!0}=e,E=x.useRef(null),T=Jt(),[A,O]=x.useState(null),[D,P]=x.useState(null),M=d5e(),z=dE(),L=(z==null?void 0:z.width)>0?z.width:j,F=(z==null?void 0:z.height)>0?z.height:a,R=x.useCallback(le=>{M(le),typeof t=="function"&&t(le),O(le),P(le),le!=null&&(E.current=le)},[M,t,O,P]),I=x.useCallback(le=>{T(cW(le)),T(fa({handler:i,reactEvent:le}))},[T,i]),q=x.useCallback(le=>{T(EN(le)),T(fa({handler:d,reactEvent:le}))},[T,d]),G=x.useCallback(le=>{T(HK()),T(fa({handler:h,reactEvent:le}))},[T,h]),Y=x.useCallback(le=>{T(EN(le)),T(fa({handler:m,reactEvent:le}))},[T,m]),K=x.useCallback(()=>{T(gW())},[T]),B=x.useCallback(()=>{T(vW())},[T]),U=x.useCallback(le=>{T(pW(le.key))},[T]),X=x.useCallback(le=>{T(fa({handler:s,reactEvent:le}))},[T,s]),H=x.useCallback(le=>{T(fa({handler:l,reactEvent:le}))},[T,l]),W=x.useCallback(le=>{T(fa({handler:c,reactEvent:le}))},[T,c]),Q=x.useCallback(le=>{T(fa({handler:g,reactEvent:le}))},[T,g]),J=x.useCallback(le=>{T(fa({handler:w,reactEvent:le}))},[T,w]),re=x.useCallback(le=>{_&&T(bW(le)),T(fa({handler:b,reactEvent:le}))},[T,_,b]),oe=x.useCallback(le=>{T(fa({handler:v,reactEvent:le}))},[T,v]),Z=w5e(k);return x.createElement(dY.Provider,{value:A},x.createElement(nbe.Provider,{value:D},x.createElement(Z,{width:L??(S==null?void 0:S.width),height:F??(S==null?void 0:S.height),className:Lt("recharts-wrapper",r),style:f5e({position:"relative",cursor:"default",width:L,height:F},S),onClick:I,onContextMenu:X,onDoubleClick:H,onFocus:K,onBlur:B,onKeyDown:U,onMouseDown:W,onMouseEnter:q,onMouseLeave:G,onMouseMove:Y,onMouseUp:Q,onTouchEnd:oe,onTouchMove:re,onTouchStart:J,ref:R},x.createElement(g5e,null),n)))}),j5e=["width","height","responsive","children","className","style","compact","title","desc"];function _5e(e,t){if(e==null)return{};var n,r,a=k5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function k5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var NW=x.forwardRef((e,t)=>{var{width:n,height:r,responsive:a,children:i,className:s,style:l,compact:c,title:d,desc:h}=e,m=_5e(e,j5e),g=Zr(m);return c?x.createElement(x.Fragment,null,x.createElement(Zf,{width:n,height:r}),x.createElement(uF,{otherAttributes:g,title:d,desc:h},i)):x.createElement(S5e,{className:s,style:l,width:n,height:r,responsive:a??!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},x.createElement(uF,{otherAttributes:g,title:d,desc:h,ref:t},x.createElement(XMe,null,i)))});function AN(){return AN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AN.apply(null,arguments)}function dF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function C5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dF(Object(n),!0).forEach(function(r){N5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N5e(e,t,n){return(t=E5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E5e(e){var t=A5e(e,"string");return typeof t=="symbol"?t:t+""}function A5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T5e={top:5,right:5,bottom:5,left:5},O5e=C5e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:T5e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},FA),EW=x.forwardRef(function(t,n){var r,a=Xn(t.categoricalChartProps,O5e),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:d}=t,h={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return x.createElement(jW,{preloadedState:{options:h},reduxStoreName:(r=d.id)!==null&&r!==void 0?r:i},x.createElement(FY,{chartData:d.data}),x.createElement(_W,{layout:a.layout,margin:a.margin}),x.createElement(CW,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),x.createElement(kW,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),x.createElement(NW,AN({},a,{ref:n})))}),M5e=["axis"],P5e=x.forwardRef((e,t)=>x.createElement(EW,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:M5e,tooltipPayloadSearcher:SA,categoricalChartProps:e,ref:t})),D5e=["axis","item"],R5e=x.forwardRef((e,t)=>x.createElement(EW,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:D5e,tooltipPayloadSearcher:SA,categoricalChartProps:e,ref:t}));function I5e(e){var t=Jt();return x.useEffect(()=>{t(WRe(e))},[t,e]),null}var L5e=["layout"];function TN(){return TN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TN.apply(null,arguments)}function z5e(e,t){if(e==null)return{};var n,r,a=$5e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function $5e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function fF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function q5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fF(Object(n),!0).forEach(function(r){B5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B5e(e,t,n){return(t=F5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F5e(e){var t=H5e(e,"string");return typeof t=="symbol"?t:t+""}function H5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U5e={top:5,right:5,bottom:5,left:5},AW=q5e({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:U5e,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},FA),G5e=x.forwardRef(function(t,n){var r,a=Xn(t.categoricalChartProps,AW),{layout:i}=a,s=z5e(a,L5e),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:h}=t,m={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:d,tooltipPayloadSearcher:h,eventEmitter:void 0};return x.createElement(jW,{preloadedState:{options:m},reduxStoreName:(r=a.id)!==null&&r!==void 0?r:l},x.createElement(FY,{chartData:a.data}),x.createElement(_W,{layout:i,margin:a.margin}),x.createElement(CW,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),x.createElement(kW,{baseValue:void 0,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),x.createElement(I5e,{cx:a.cx,cy:a.cy,startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius}),x.createElement(NW,TN({},s,{ref:n})))});function hF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hF(Object(n),!0).forEach(function(r){V5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V5e(e,t,n){return(t=K5e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K5e(e){var t=Y5e(e,"string");return typeof t=="symbol"?t:t+""}function Y5e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W5e=["item"],X5e=mF(mF({},AW),{},{layout:"centric",startAngle:0,endAngle:360}),Z5e=x.forwardRef((e,t)=>{var n=Xn(e,X5e);return x.createElement(G5e,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:W5e,tooltipPayloadSearcher:SA,categoricalChartProps:n,ref:t})});const Q5e=["7d","30d","90d","all"];function _p(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Fd(e){return e===0?"$0":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}const J5e={completed:"#34C759",merged:"var(--color-accent)",failed:"#FF3B30",stopped:"#FF9500",running:"#007AFF"},pF=["#34C759","#4B8DFF","#FF3B30","#FF9500","#007AFF","#AF52DE"];function gF({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:r.value})]},a))]})}function eIe({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:typeof r.value=="number"?Fd(r.value):r.value})]},a))]})}function tIe({active:e,payload:t,label:n}){return!e||!(t!=null&&t.length)?null:f.jsxs("div",{className:"card px-3 py-2 text-xs shadow-elevated border-theme-border",children:[n&&f.jsx("div",{className:"font-medium text-theme-text mb-1",children:n}),t.map((r,a)=>f.jsxs("div",{className:"flex items-center gap-2 text-theme-text-secondary",children:[r.color&&f.jsx("span",{className:"w-2 h-2 rounded-full inline-block flex-shrink-0",style:{backgroundColor:r.color}}),f.jsxs("span",{children:[r.name,": "]}),f.jsx("span",{className:"font-medium text-theme-text",children:typeof r.value=="number"?_p(r.value):r.value})]},a))]})}function nIe({projectId:e}){const{t}=tt(),[n,r]=x.useState(null),[a,i]=x.useState("all"),[s,l]=x.useState(!0),[c,d]=x.useState(null),[h,m]=x.useState("cost");if(x.useEffect(()=>{l(!0),d(null),G0e(e,a).then(r).catch(_=>d(_.message||"Failed to load analytics")).finally(()=>l(!1))},[e,a]),s)return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsx(Ke,{className:"h-4 w-32"}),f.jsx("div",{className:"flex gap-1",children:f.jsx(Ke,{className:"h-6 w-12",count:4})})]}),f.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[...Array(4)].map((_,E)=>f.jsxs("div",{className:"card p-3 space-y-2",children:[f.jsx(Ke,{className:"h-6 w-16 mx-auto"}),f.jsx(Ke,{className:"h-3 w-12 mx-auto"})]},E))}),f.jsxs("div",{className:"card p-4 space-y-3",children:[f.jsx(Ke,{className:"h-3 w-24 mb-4"}),f.jsx(Ke,{className:"h-32 w-full"})]})]});if(c)return f.jsx("div",{className:"text-center py-12 text-status-error",children:c});if(!n)return null;const{summary:g,byCliTool:v,byDate:b,byStatus:w}=n,S=b.map(_=>({date:_.date.slice(5),completed:_.completed,failed:_.failed,other:Math.max(0,_.count-_.completed-_.failed),cost:_.costUsd,tokens:_.tokens})),j=w.map((_,E)=>({name:_.status,value:_.count,color:J5e[_.status]||pF[E%pF.length]})),k={fontSize:10,fill:"var(--color-text-muted)"};return f.jsxs("div",{className:"space-y-6 animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wider text-theme-muted",children:t("analytics.title")}),f.jsx("div",{className:"flex gap-1",children:Q5e.map(_=>f.jsx("button",{onClick:()=>i(_),className:`px-3 py-1 text-xs rounded-md font-medium transition-colors ${a===_?"bg-accent text-white":"hover:bg-theme-hover text-theme-muted"}`,children:t(`analytics.period.${_}`)},_))})]}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[f.jsx(lp,{label:t("analytics.totalTasks"),value:String(g.totalTasks)}),f.jsx(lp,{label:t("analytics.successRate"),value:`${g.successRate}%`,color:g.successRate>=70?"#34C759":g.successRate>=40?"#FF9500":"#FF3B30"}),f.jsx(lp,{label:t("analytics.totalCost"),value:Fd(g.totalCostUsd)}),f.jsx(lp,{label:t("analytics.totalTokens"),value:_p(g.totalTokens)})]}),f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.byStatus")}),j.length===0?f.jsx("p",{className:"text-xs text-theme-muted",children:t("analytics.noData")}):f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx(kk,{width:100,height:100,children:f.jsxs(Z5e,{children:[f.jsx($Y,{data:j,cx:"50%",cy:"50%",innerRadius:28,outerRadius:45,dataKey:"value",strokeWidth:0,children:j.map((_,E)=>f.jsx(mh,{fill:_.color},E))}),f.jsx(ap,{content:f.jsx(gF,{})})]})}),f.jsx("div",{className:"space-y-1.5 flex-1",children:j.map(_=>f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:_.color}}),f.jsx("span",{className:"text-xs flex-1 capitalize",children:_.name}),f.jsx("span",{className:"text-xs font-mono font-medium",children:_.value})]},_.name))})]})]}),f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.byCliTool")}),v.length===0?f.jsx("p",{className:"text-xs text-theme-muted",children:t("analytics.noData")}):f.jsx("div",{className:"space-y-3",children:v.map(_=>{const E=Math.max(...v.map(T=>T.count),1);return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"text-xs font-medium capitalize",children:_.cli_tool}),f.jsxs("span",{className:"text-2xs font-mono text-theme-muted",children:[_.count," ",t("analytics.tasks")," · ",_.successRate,"% · ",Fd(_.totalCostUsd)]})]}),f.jsx("div",{className:"h-2 rounded-full overflow-hidden bg-theme-bg-tertiary",children:f.jsx("div",{className:"h-full rounded-full transition-all bg-accent",style:{width:`${_.count/E*100}%`}})})]},_.cli_tool)})})]})]}),S.length>0&&f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.dailyActivity")}),f.jsx(kk,{width:"100%",height:128,children:f.jsxs(R5e,{data:S,barSize:6,barCategoryGap:"30%",children:[f.jsx(_N,{dataKey:"date",tick:k,tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),f.jsx(NN,{tick:k,tickLine:!1,axisLine:!1,width:28,allowDecimals:!1}),f.jsx(ap,{content:f.jsx(gF,{}),cursor:{fill:"var(--color-bg-hover)",radius:4}}),f.jsx(jp,{dataKey:"completed",stackId:"a",fill:"#34C759",name:t("analytics.completed")||"Completed",radius:[0,0,0,0]}),f.jsx(jp,{dataKey:"failed",stackId:"a",fill:"#FF3B30",name:t("analytics.failed")||"Failed"}),f.jsx(jp,{dataKey:"other",stackId:"a",fill:"var(--color-text-muted)",name:t("analytics.other")||"Other",radius:[2,2,0,0]})]})})]}),S.length>0&&(S.some(_=>_.cost>0)||S.some(_=>_.tokens>0))&&f.jsxs("div",{className:"card p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-theme-muted",children:h==="cost"?t("analytics.dailyCost"):t("analytics.tokenTrend")||"Token Trend"}),f.jsxs("div",{className:"flex gap-1",children:[f.jsx("button",{onClick:()=>m("cost"),className:`px-2 py-0.5 text-2xs rounded font-medium transition-colors ${h==="cost"?"bg-accent text-white":"text-theme-muted hover:bg-theme-hover"}`,children:t("analytics.cost")||"Cost"}),f.jsx("button",{onClick:()=>m("tokens"),className:`px-2 py-0.5 text-2xs rounded font-medium transition-colors ${h==="tokens"?"bg-accent text-white":"text-theme-muted hover:bg-theme-hover"}`,children:t("analytics.tokens")||"Tokens"})]})]}),f.jsx(kk,{width:"100%",height:96,children:f.jsxs(P5e,{data:S,children:[f.jsx(YY,{strokeDasharray:"3 3",stroke:"var(--color-border)",vertical:!1}),f.jsx(_N,{dataKey:"date",tick:k,tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),f.jsx(NN,{tick:k,tickLine:!1,axisLine:!1,width:40,tickFormatter:h==="tokens"?_p:_=>`$${_.toFixed(2)}`}),h==="cost"?f.jsx(ap,{content:f.jsx(eIe,{})}):f.jsx(ap,{content:f.jsx(tIe,{})}),f.jsx(aW,{type:"monotone",dataKey:h,stroke:"var(--color-accent)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-accent)"},name:h==="cost"?t("analytics.cost")||"Cost":t("analytics.tokens")||"Tokens"})]})})]}),g.totalTasks>0&&g.totalCostUsd>0&&f.jsxs("div",{className:"card p-4",children:[f.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider mb-3 text-theme-muted",children:t("analytics.costBreakdown")}),f.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold text-theme-accent",children:Fd(g.totalCostUsd)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.totalCost")})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold",children:Fd(g.avgCostPerTask)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.avgPerTask")})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-lg font-bold",children:_p(g.totalTokens)}),f.jsx("div",{className:"text-2xs uppercase tracking-wider text-theme-muted",children:t("analytics.totalTokens")})]})]})]})]})}function lp({label:e,value:t,color:n}){return f.jsxs("div",{className:"card p-3 text-center",children:[f.jsx("div",{className:"text-xl font-bold",style:n?{color:n}:void 0,children:t}),f.jsx("div",{className:"text-2xs uppercase tracking-wider mt-0.5 text-theme-muted",children:e})]})}const Dg={default:{bg:"bg-warm-200/50",text:"text-warm-500",swatch:"bg-warm-300"},gray:{bg:"bg-gray-500/20",text:"text-gray-400",swatch:"bg-gray-400"},brown:{bg:"bg-amber-800/20",text:"text-amber-600",swatch:"bg-amber-700"},orange:{bg:"bg-orange-500/20",text:"text-orange-400",swatch:"bg-orange-500"},yellow:{bg:"bg-yellow-500/20",text:"text-yellow-400",swatch:"bg-yellow-500"},green:{bg:"bg-emerald-500/20",text:"text-emerald-400",swatch:"bg-emerald-500"},blue:{bg:"bg-blue-500/20",text:"text-blue-400",swatch:"bg-blue-500"},purple:{bg:"bg-purple-500/20",text:"text-purple-400",swatch:"bg-purple-500"},pink:{bg:"bg-pink-500/20",text:"text-pink-400",swatch:"bg-pink-500"},red:{bg:"bg-red-500/20",text:"text-red-400",swatch:"bg-red-500"}},rIe=Object.keys(Dg);function Xd(e){const t=Dg[e]||Dg.default;return`${t.bg} ${t.text}`}const vF={pending:"bg-warm-200 text-warm-500",in_progress:"bg-blue-500/10 text-blue-600",done:"bg-emerald-500/10 text-emerald-600",moved:"bg-purple-500/10 text-purple-600"},yF={0:{label:"—",style:"text-warm-300"},1:{label:"●",style:"text-warm-500"},2:{label:"●●",style:"text-amber-500"},3:{label:"●●●",style:"text-red-500"}};function aIe({item:e,tagColors:t,existingTags:n,onSave:r,onDelete:a,onConvertToTodo:i,onConvertToSchedule:s,onUpdateTag:l}){var Ce,He;const{t:c}=tt(),[d,h]=x.useState(!1),[m,g]=x.useState(!1),[v,b]=x.useState(!1),w=x.useRef(null),S=x.useRef(null),[j,k]=x.useState({top:0,left:0}),[_,E]=x.useState(e.title),[T,A]=x.useState(e.description??""),[O,D]=x.useState(e.priority),[P,M]=x.useState(e.due_date??""),[z,L]=x.useState(e.status),[F,R]=x.useState(()=>{try{return e.tags?JSON.parse(e.tags):[]}catch{return[]}}),[I,q]=x.useState(""),[G,Y]=x.useState(!1),[K,B]=x.useState(null),U=x.useRef(null),[X,H]=x.useState(()=>{try{return e.images?JSON.parse(e.images):[]}catch{return[]}}),W=x.useRef(null);x.useEffect(()=>{E(e.title),A(e.description??""),D(e.priority),M(e.due_date??""),L(e.status);try{R(e.tags?JSON.parse(e.tags):[])}catch{R([])}try{H(e.images?JSON.parse(e.images):[])}catch{H([])}},[e]);const Q=F,J=e.status==="moved",re=e.due_date&&new Date(e.due_date)<new Date&&!J&&e.status!=="done",oe=x.useCallback(ge=>{r(e.id,ge)},[e.id,r]),Z=()=>{const ge=_.trim();ge&&ge!==e.title?oe({title:ge}):E(e.title)},le=()=>{const ge=T.trim();ge!==(e.description??"")&&oe({description:ge||void 0})},ie=ge=>{D(ge),ge!==e.priority&&oe({priority:ge})},ee=ge=>{M(ge),ge!==(e.due_date??"")&&oe({due_date:ge||void 0})},ae=ge=>{const ue=ge;L(ue),ue!==e.status&&oe({status:ue})},xe=ge=>{R(ge);const ue=(()=>{try{return e.tags?JSON.parse(e.tags):[]}catch{return[]}})();JSON.stringify(ge)!==JSON.stringify(ue)&&oe({tags:ge.length>0?JSON.stringify(ge):void 0})},ye=ge=>{var _e;const ue=ge.trim();if(ue&&!F.includes(ue)&&(xe([...F,ue]),!t.has(ue)&&l)){const fe=["blue","green","orange","purple","pink","red","yellow","brown"],Oe=fe[t.size%fe.length];l(ue,{color:Oe})}q(""),(_e=U.current)==null||_e.focus()},Te=ge=>xe(F.filter(ue=>ue!==ge)),Me=n.filter(ge=>!F.includes(ge)&&(!I||ge.toLowerCase().includes(I.toLowerCase()))),he=x.useCallback(ge=>{const ue=Array.from(ge).filter(Oe=>Oe.type.startsWith("image/")),_e=[];let fe=0;for(const Oe of ue){const ze=new FileReader;ze.onload=()=>{_e.push({name:Oe.name,data:ze.result}),fe++,fe===ue.length&&g8(e.id,_e).then(ut=>H(ut.images))},ze.readAsDataURL(Oe)}},[e.id]),Ie=x.useCallback(ge=>{var fe;const ue=(fe=ge.clipboardData)==null?void 0:fe.items;if(!ue)return;const _e=[];for(let Oe=0;Oe<ue.length;Oe++)if(ue[Oe].type.startsWith("image/")){const ze=ue[Oe].getAsFile();ze&&_e.push(ze)}_e.length!==0&&(ge.preventDefault(),he(_e))},[he]),Je=x.useCallback(ge=>{var ue;ge.preventDefault(),ge.stopPropagation(),(ue=ge.dataTransfer)!=null&&ue.files&&he(ge.dataTransfer.files)},[he]),We=x.useCallback(ge=>{v8(e.id,ge).then(()=>{H(ue=>ue.filter(_e=>_e.id!==ge))})},[e.id]),it=x.useCallback(()=>{if(!w.current)return;const ge=w.current.getBoundingClientRect(),ue=window.innerWidth,_e=window.innerHeight;let fe=ge.bottom+4;const Oe=S.current;if(Oe){const ze=Oe.offsetWidth,ut=Oe.offsetHeight;let gt=ge.right-ze;gt<8&&(gt=8),gt+ze>ue-8&&(gt=ue-8-ze),fe+ut>_e-8&&(fe=ge.top-ut-4),k({top:fe,left:gt}),b(!0)}else k({top:fe,left:Math.max(8,ge.right-180)})},[]);return x.useEffect(()=>{if(!d){b(!1);return}it();const ge=requestAnimationFrame(it),ue=_e=>{var Oe,ze;const fe=_e.target;(Oe=w.current)!=null&&Oe.contains(fe)||(ze=S.current)!=null&&ze.contains(fe)||h(!1)};return document.addEventListener("mousedown",ue),window.addEventListener("scroll",it,!0),window.addEventListener("resize",it),()=>{cancelAnimationFrame(ge),document.removeEventListener("mousedown",ue),window.removeEventListener("scroll",it,!0),window.removeEventListener("resize",it)}},[d,it]),f.jsxs("div",{className:`${J?"opacity-50":""}`,style:{borderBottom:"1px solid var(--color-border-muted)"},children:[f.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-lg transition-colors hover:bg-warm-50 cursor-pointer",onDoubleClick:()=>g(!m),children:[f.jsx(zu,{size:14,className:`text-warm-400 transition-transform duration-200 flex-shrink-0 ${m?"rotate-90":""}`,onClick:ge=>{ge.stopPropagation(),g(!m)}}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-sm font-medium truncate block",style:{color:"var(--color-text-primary)"},children:e.title}),J&&e.converted_type&&f.jsxs("span",{className:"text-2xs text-purple-500",children:["→ ",e.converted_type==="todo"?c("planner.movedToTodo"):c("planner.movedToSchedule")]})]}),f.jsxs("div",{className:"hidden sm:flex items-center gap-1 w-[160px] flex-shrink-0 overflow-hidden",children:[X.length>0&&f.jsxs("span",{className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium bg-warm-100 text-warm-500 whitespace-nowrap",children:[f.jsx(Jd,{size:10}),X.length]}),Q.map(ge=>f.jsx("span",{className:`px-2 py-0.5 rounded text-2xs font-medium whitespace-nowrap ${Xd(t.get(ge)||"default")}`,children:ge},ge))]}),f.jsx("div",{className:"hidden sm:block w-12 text-center flex-shrink-0",children:f.jsx("span",{className:`text-xs font-medium ${((Ce=yF[e.priority])==null?void 0:Ce.style)??"text-warm-300"}`,children:((He=yF[e.priority])==null?void 0:He.label)??"—"})}),f.jsx("div",{className:"hidden md:block w-20 text-right flex-shrink-0",children:e.due_date?f.jsx("span",{className:`text-xs ${re?"text-red-500 font-medium":"text-warm-500"}`,children:new Date(e.due_date).toLocaleDateString(void 0,{month:"numeric",day:"numeric"})}):f.jsx("span",{className:"text-xs text-warm-300",children:c("planner.noDueDate")})}),f.jsx("div",{className:"w-16 flex-shrink-0",children:f.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-2xs font-semibold ${vF[e.status]||vF.pending}`,children:c(`plannerStatus.${e.status}`)})}),f.jsxs("div",{className:"w-8 flex-shrink-0",children:[f.jsx("button",{ref:w,onClick:ge=>{ge.stopPropagation(),h(!d)},className:"p-1.5 text-warm-400 hover:text-warm-600 hover:bg-warm-100/50 rounded-lg transition-colors",children:f.jsx(GF,{size:14})}),d&&vl.createPortal(f.jsxs("div",{ref:S,className:`fixed z-tooltip min-w-[160px] rounded-xl py-1 shadow-elevated${v?" animate-scale-in":""}`,style:{top:j.top,left:j.left,opacity:v?1:0,backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},onClick:()=>h(!1),children:[!J&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:i,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-warm-100 rounded-md transition-colors text-left",style:{color:"var(--color-text-primary)"},children:[f.jsx(KJ,{size:12})," ",c("planner.convertToTask")]}),f.jsxs("button",{onClick:s,className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-warm-100 rounded-md transition-colors text-left",style:{color:"var(--color-text-primary)"},children:[f.jsx(Qd,{size:12})," ",c("planner.convertToSchedule")]})]}),f.jsxs("button",{onClick:()=>{confirm(c("planner.deleteConfirm"))&&a()},className:"flex items-center gap-2 w-full px-3 py-1.5 text-xs text-red-500 hover:bg-red-50 rounded-md transition-colors text-left",children:[f.jsx(es,{size:12})," ",c("planner.delete")]})]}),document.body)]})]}),m&&f.jsx("div",{className:"px-4 pb-3 pt-1 ml-8 animate-fade-in",children:f.jsxs("div",{className:"rounded-lg px-4 py-3 space-y-3",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[f.jsx("input",{className:"bg-transparent text-sm font-medium w-full outline-none border-b border-transparent focus:border-warm-300 pb-0.5 transition-colors",style:{color:"var(--color-text-primary)"},value:_,onChange:ge=>E(ge.target.value),onBlur:Z,onKeyDown:ge=>{ge.key==="Enter"&&(ge.preventDefault(),Z(),ge.target.blur())}}),f.jsx("textarea",{className:"bg-transparent text-sm w-full outline-none border border-transparent focus:border-warm-300 rounded-md p-1 transition-colors resize-none",style:{color:"var(--color-text-secondary)"},rows:3,placeholder:c("plannerForm.descPlaceholder"),value:T,onChange:ge=>A(ge.target.value),onPaste:Ie,onDrop:Je,onDragOver:ge=>{ge.preventDefault(),ge.stopPropagation()},onBlur:le}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[f.jsxs("button",{type:"button",onClick:()=>{var ge;return(ge=W.current)==null?void 0:ge.click()},className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(Jd,{size:12}),c("plannerForm.addImage")]}),f.jsx("span",{className:"text-[10px] text-warm-300",children:c("plannerForm.pasteHint")})]}),f.jsx("input",{ref:W,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ge=>{ge.target.files&&he(ge.target.files),ge.target.value=""}}),X.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:X.map(ge=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:y8(e.id,ge.id),alt:ge.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>We(ge.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(ga,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:ge.originalName})})]},ge.id))})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.tags")}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[F.map(ge=>f.jsxs("div",{className:"relative",children:[f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-2xs font-medium cursor-pointer hover:ring-1 hover:ring-warm-400 transition-all ${Xd(t.get(ge)||"default")}`,onClick:()=>B(K===ge?null:ge),children:[ge,f.jsx("button",{onClick:ue=>{ue.stopPropagation(),Te(ge)},className:"opacity-60 hover:opacity-100",children:f.jsx(ga,{size:9})})]}),K===ge&&f.jsxs("div",{className:"absolute top-full left-0 mt-1 p-2 rounded-lg shadow-elevated z-20 w-[180px]",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[f.jsx("div",{className:"text-2xs text-warm-400 mb-1.5",children:c("plannerTag.color")}),f.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:rIe.map(ue=>f.jsx("button",{onClick:async()=>{l&&await l(ge,{color:ue}),B(null)},className:`aspect-square rounded-md flex items-center justify-center transition-all ${t.get(ge)===ue?"ring-2 ring-blue-400 ring-offset-1":"hover:scale-110"}`,title:c(`plannerTag.color.${ue}`),children:f.jsx("div",{className:`w-5 h-5 rounded ${Dg[ue].swatch}`})},ue))})]})]},ge)),f.jsxs("div",{className:"relative",children:[f.jsx("input",{ref:U,className:"bg-transparent text-xs outline-none w-24",style:{color:"var(--color-text-primary)"},placeholder:"+",value:I,onChange:ge=>{q(ge.target.value),Y(!0)},onKeyDown:ge=>{(ge.key==="Enter"||ge.key===",")&&I.trim()&&(ge.preventDefault(),ye(I.replace(",",""))),ge.key==="Backspace"&&!I&&F.length>0&&Te(F[F.length-1])},onFocus:()=>Y(!0),onBlur:()=>setTimeout(()=>Y(!1),150)}),G&&Me.length>0&&f.jsx("div",{className:"absolute top-full left-0 mt-1 w-40 rounded-lg shadow-elevated z-10 py-1 max-h-32 overflow-y-auto",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:Me.slice(0,8).map(ge=>f.jsx("button",{className:"flex items-center w-full px-2 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>ye(ge),children:f.jsx("span",{className:`px-2 py-0.5 rounded text-2xs font-medium ${Xd(t.get(ge)||"default")}`,children:ge})},ge))})]})]})]}),f.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.priority")}),f.jsxs("select",{className:"input-field text-xs w-full py-1",value:O,onChange:ge=>ie(Number(ge.target.value)),children:[f.jsx("option",{value:0,children:c("plannerForm.priorityLow")}),f.jsx("option",{value:1,children:c("plannerForm.priorityNormal")}),f.jsx("option",{value:2,children:c("plannerForm.priorityHigh")}),f.jsx("option",{value:3,children:c("plannerForm.priorityCritical")})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.dueDate")}),f.jsx("input",{type:"date",className:"input-field text-xs w-full py-1",value:P,onChange:ge=>ee(ge.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-2xs text-warm-400 mb-1 block",children:c("plannerForm.status")}),f.jsxs("select",{className:"input-field text-xs w-full py-1",value:z,onChange:ge=>ae(ge.target.value),children:[f.jsx("option",{value:"pending",children:c("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:c("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:c("plannerStatus.done")})]})]})]})]})})]})}let iIe=0;function sIe({existingTags:e,editItem:t,onSave:n,onCancel:r,onUpdateTag:a}){const{t:i}=tt(),[s,l]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState([]),[g,v]=x.useState(""),[b,w]=x.useState(""),[S,j]=x.useState(0),[k,_]=x.useState("pending"),[E,T]=x.useState(!1),[A,O]=x.useState(!1),[D,P]=x.useState([]),[M,z]=x.useState([]),L=x.useRef(null),F=x.useRef(null),R=x.useRef(null),[I,q]=x.useState(new Map),G=new Map([...e.map(Z=>[Z.name,Z.color]),...I]),Y=["blue","green","orange","purple","pink","red","yellow","brown"];x.useEffect(()=>{var Z;if(t){l(t.title),d(t.description??""),m(t.tags?JSON.parse(t.tags):[]),w(t.due_date??""),j(t.priority),_(t.status);try{z(t.images?JSON.parse(t.images):[])}catch{z([])}}(Z=L.current)==null||Z.focus()},[t]);const K=e.filter(Z=>!h.includes(Z.name)&&(!g||Z.name.toLowerCase().includes(g.toLowerCase()))),B=Z=>{var ie;const le=Z.trim();le&&!h.includes(le)&&m(ee=>{const ae=[...ee,le];if(!G.has(le)){const xe=Y[G.size%Y.length];q(ye=>new Map([...ye,[le,xe]]))}return ae}),v(""),O(!0),(ie=F.current)==null||ie.focus()},U=Z=>m(h.filter(le=>le!==Z)),X=x.useCallback(Z=>{const le=Array.from(Z).filter(ie=>ie.type.startsWith("image/"));for(const ie of le){const ee=new FileReader;ee.onload=()=>{const ae=ee.result,xe=`pending-${++iIe}`;P(ye=>[...ye,{id:xe,name:ie.name,data:ae,preview:ae}])},ee.readAsDataURL(ie)}},[]),H=x.useCallback(Z=>{var ee;const le=(ee=Z.clipboardData)==null?void 0:ee.items;if(!le)return;const ie=[];for(let ae=0;ae<le.length;ae++)if(le[ae].type.startsWith("image/")){const xe=le[ae].getAsFile();xe&&ie.push(xe)}ie.length!==0&&(Z.preventDefault(),X(ie))},[X]),W=x.useCallback(Z=>{var le;Z.preventDefault(),Z.stopPropagation(),(le=Z.dataTransfer)!=null&&le.files&&X(Z.dataTransfer.files)},[X]),Q=Z=>P(le=>le.filter(ie=>ie.id!==Z)),J=Z=>{t&&v8(t.id,Z),z(le=>le.filter(ie=>ie.id!==Z))},re=M.length+D.length,oe=async()=>{if(s.trim()){T(!0);try{const Z=await n({title:s.trim(),description:c.trim()||void 0,tags:h.length>0?JSON.stringify(h):void 0,due_date:b||void 0,priority:S,...t?{status:k}:{}});if(a&&I.size>0&&await Promise.all([...I.entries()].map(([le,ie])=>a(le,{color:ie}))),D.length>0){const le=(t==null?void 0:t.id)??(Z==null?void 0:Z.id);le&&await g8(le,D.map(ie=>({name:ie.name,data:ie.data})))}}finally{T(!1)}}};return f.jsxs("div",{className:"card p-5 animate-slide-up",style:{borderColor:"var(--color-accent)",borderWidth:"1px"},children:[f.jsx("input",{ref:L,className:"input-field text-sm w-full mb-3",placeholder:i("plannerForm.titlePlaceholder"),value:s,onChange:Z=>l(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&Z.preventDefault()}}),f.jsx("textarea",{className:"input-field text-sm w-full mb-3",rows:3,placeholder:i("plannerForm.descPlaceholder"),value:c,onChange:Z=>d(Z.target.value),onPaste:H,onDrop:W,onDragOver:Z=>{Z.preventDefault(),Z.stopPropagation()}}),f.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[f.jsxs("button",{type:"button",onClick:()=>{var Z;return(Z=R.current)==null?void 0:Z.click()},className:"inline-flex items-center gap-1 px-2 py-1 rounded text-[10px] font-medium text-warm-400 hover:text-warm-600 hover:bg-warm-100 transition-colors",children:[f.jsx(Jd,{size:14}),i("plannerForm.addImage")]}),f.jsx("span",{className:"text-[10px] text-warm-300",children:i("plannerForm.pasteHint")})]}),f.jsx("input",{ref:R,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:Z=>{Z.target.files&&X(Z.target.files),Z.target.value=""}}),re>0&&f.jsxs("div",{className:"mb-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[f.jsx("h4",{className:"text-xs font-semibold text-warm-500 uppercase tracking-wider",children:i("plannerForm.images")}),f.jsxs("span",{className:"text-[10px] text-warm-400",children:["(",re,")"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[M.map(Z=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:t?y8(t.id,Z.id):"",alt:Z.originalName,className:"h-20 w-20 object-cover rounded-lg border border-warm-200"}),f.jsx("button",{type:"button",onClick:()=>J(Z.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(ga,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:Z.originalName})})]},Z.id)),D.map(Z=>f.jsxs("div",{className:"relative group",children:[f.jsx("img",{src:Z.preview,alt:Z.name,className:"h-20 w-20 object-cover rounded-lg border border-blue-300/30"}),f.jsx("button",{type:"button",onClick:()=>Q(Z.id),className:"absolute -top-1.5 -right-1.5 h-5 w-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:f.jsx(ga,{size:12,strokeWidth:3})}),f.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 rounded-b-lg px-1 py-0.5",children:f.jsx("span",{className:"text-[8px] text-white truncate block",children:Z.name})})]},Z.id))]})]}),f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.tags")}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 p-2 rounded-xl",style:{backgroundColor:"var(--color-bg-input)",border:"1px solid var(--color-border-strong)"},children:[h.map(Z=>f.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-[11px] font-medium ${Xd(G.get(Z)||"default")}`,children:[Z,f.jsx("button",{onClick:()=>U(Z),className:"opacity-60 hover:opacity-100",children:f.jsx(ga,{size:10})})]},Z)),f.jsxs("div",{className:"relative flex-1 min-w-[120px]",children:[f.jsx("input",{ref:F,className:"bg-transparent text-sm outline-none w-full",style:{color:"var(--color-text-primary)"},placeholder:h.length===0?i("plannerForm.tagsPlaceholder"):"",value:g,onChange:Z=>{v(Z.target.value),O(!0)},onKeyDown:Z=>{(Z.key==="Enter"||Z.key===",")&&g.trim()&&(Z.preventDefault(),B(g.replace(",",""))),Z.key==="Backspace"&&!g&&h.length>0&&U(h[h.length-1])},onFocus:()=>O(!0),onBlur:()=>setTimeout(()=>O(!1),150)}),A&&(K.length>0||g.trim())&&f.jsxs("div",{className:"absolute top-full left-0 mt-1 w-52 rounded-lg shadow-elevated z-10 py-1.5 max-h-48 overflow-y-auto",style:{backgroundColor:"var(--color-bg-card)",border:"1px solid var(--color-border)"},children:[K.slice(0,10).map(Z=>f.jsx("button",{className:"flex items-center w-full px-2.5 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>B(Z.name),children:f.jsx("span",{className:`px-2 py-0.5 rounded text-[11px] font-medium ${Xd(Z.color)}`,children:Z.name})},Z.name)),g.trim()&&!e.some(Z=>Z.name===g.trim())&&f.jsx("button",{className:"flex items-center w-full px-2.5 py-1 hover:bg-warm-100/50 transition-colors text-left",onMouseDown:()=>B(g),children:f.jsxs("span",{className:"text-xs text-warm-500",children:['+ "',g.trim(),'"']})})]})]})]})]}),f.jsxs("div",{className:`grid gap-3 mb-4 ${t?"grid-cols-3":"grid-cols-2"}`,children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.dueDate")}),f.jsx("input",{type:"date",className:"input-field text-xs w-full",value:b,onChange:Z=>w(Z.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.priority")}),f.jsxs("select",{className:"input-field text-xs w-full",value:S,onChange:Z=>j(Number(Z.target.value)),children:[f.jsx("option",{value:0,children:i("plannerForm.priorityLow")}),f.jsx("option",{value:1,children:i("plannerForm.priorityNormal")}),f.jsx("option",{value:2,children:i("plannerForm.priorityHigh")}),f.jsx("option",{value:3,children:i("plannerForm.priorityCritical")})]})]}),t&&f.jsxs("div",{children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:i("plannerForm.status")}),f.jsxs("select",{className:"input-field text-xs w-full",value:k,onChange:Z=>_(Z.target.value),children:[f.jsx("option",{value:"pending",children:i("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:i("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:i("plannerStatus.done")})]})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{className:"btn-ghost text-xs",onClick:r,children:i("plannerForm.cancel")}),f.jsx("button",{className:"btn-primary text-xs py-2",onClick:oe,disabled:!s.trim()||E,children:i("plannerForm.save")})]})]})}function oIe({item:e,mode:t,projectCliTool:n,projectCliModel:r,onConvert:a,onClose:i}){const{t:s}=tt(),{getToolConfig:l}=oc(),[c,d]=x.useState(n||"claude"),[h,m]=x.useState(r||""),[g,v]=x.useState(""),[b,w]=x.useState("once"),[S,j]=x.useState("0 0 * * *"),[k,_]=x.useState(""),[E,T]=x.useState(!1),A=l(c),O=(A==null?void 0:A.models)??[],D=async()=>{T(!0);try{t==="todo"?await a({cli_tool:c,cli_model:h||void 0,max_turns:g?Number(g):void 0}):await a({cli_tool:c,cli_model:h||void 0,schedule_type:b,cron_expression:b==="recurring"?S:void 0,run_at:b==="once"?k:void 0})}finally{T(!1)}};return f.jsx(ts,{open:!0,onClose:i,size:"md",position:"top",animation:"slide-up",children:f.jsxs("div",{className:"card p-6",children:[f.jsx("h3",{className:"text-sm font-semibold mb-4",style:{color:"var(--color-text-primary)"},children:s(t==="todo"?"plannerConvert.toTask":"plannerConvert.toSchedule")}),f.jsxs("p",{className:"text-xs text-warm-500 mb-4 truncate",children:['"',e.title,'"']}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.cliTool")}),f.jsxs("select",{className:"input-field text-xs w-full",value:c,onChange:P=>{d(P.target.value),m("")},children:[f.jsx("option",{value:"claude",children:"Claude"}),f.jsx("option",{value:"gemini",children:"Gemini"}),f.jsx("option",{value:"codex",children:"Codex"})]})]}),f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.model")}),f.jsxs("select",{className:"input-field text-xs w-full",value:h,onChange:P=>m(P.target.value),children:[f.jsx("option",{value:"",children:s("plannerConvert.projectDefault")}),O.map(P=>f.jsx("option",{value:P.value,children:P.label},P.value))]})]}),t==="todo"&&f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.maxTurns")}),f.jsx("input",{type:"number",min:"1",className:"input-field text-xs w-full",placeholder:"—",value:g,onChange:P=>v(P.target.value)})]}),t==="schedule"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-3",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.scheduleType")}),f.jsxs("div",{className:"flex gap-1 p-0.5 rounded-lg",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[f.jsx("button",{className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${b==="once"?"bg-amber-500 text-white":"text-warm-500"}`,onClick:()=>w("once"),children:s("plannerConvert.once")}),f.jsx("button",{className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-all ${b==="recurring"?"bg-amber-500 text-white":"text-warm-500"}`,onClick:()=>w("recurring"),children:s("plannerConvert.recurring")})]})]}),b==="once"?f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.runAt")}),f.jsx("input",{type:"datetime-local",className:"input-field text-xs w-full",value:k,onChange:P=>_(P.target.value)})]}):f.jsxs("div",{className:"mb-4",children:[f.jsx("label",{className:"text-xs font-medium text-warm-500 mb-1.5 block",children:s("plannerConvert.cronExpression")}),f.jsx("input",{className:"input-field text-xs w-full font-mono",value:S,onChange:P=>j(P.target.value),placeholder:"0 0 * * *"})]})]}),f.jsxs("div",{className:"flex justify-end gap-3",children:[f.jsx("button",{className:"btn-ghost text-xs",onClick:i,children:s("plannerConvert.cancel")}),f.jsx("button",{className:"btn-primary btn-sm",onClick:D,disabled:E||t==="schedule"&&b==="once"&&!k,children:s("plannerConvert.convert")})]})]})})}const xF={pending:0,in_progress:1,done:2,moved:3};function lIe({plannerItems:e,existingTags:t,projectCliTool:n,projectCliModel:r,onAddItem:a,onEditItem:i,onDeleteItem:s,onConvertToTodo:l,onConvertToSchedule:c,onUpdateTag:d,onDeleteTag:h,onExport:m,onImport:g}){const{t:v}=tt(),[b,w]=x.useState(!1),[S,j]=x.useState(null),[k,_]=x.useState(""),[E,T]=x.useState(""),[A,O]=x.useState("created_at"),[D,P]=x.useState("desc"),[M,z]=x.useState(null),[L,F]=x.useState("todo"),[R,I]=x.useState(!1),q=x.useRef(null),G=async()=>{if(!(!m||R)){I(!0);try{await m()}finally{I(!1)}}},Y=()=>{var Q;!g||R||(Q=q.current)==null||Q.click()},K=async Q=>{var re;const J=(re=Q.target.files)==null?void 0:re[0];if(Q.target.value="",!(!J||!g)){I(!0);try{await g(J)}finally{I(!1)}}},B=x.useMemo(()=>t.map(Q=>Q.name),[t]),U=x.useMemo(()=>new Map(t.map(Q=>[Q.name,Q.color])),[t]),X=x.useMemo(()=>{let Q=e.filter(J=>!(E&&J.status!==E||k&&!(J.tags?(()=>{try{return JSON.parse(J.tags)}catch{return[]}})():[]).includes(k)));return Q=[...Q].sort((J,re)=>{let oe=0;switch(A){case"title":oe=J.title.localeCompare(re.title);break;case"tags":{const Z=J.tags?(()=>{try{return JSON.parse(J.tags).join(",")}catch{return""}})():"",le=re.tags?(()=>{try{return JSON.parse(re.tags).join(",")}catch{return""}})():"";oe=(Z||"zzz").localeCompare(le||"zzz");break}case"priority":oe=J.priority-re.priority;break;case"due_date":{const Z=J.due_date||"9999",le=re.due_date||"9999";oe=Z.localeCompare(le);break}case"status":oe=(xF[J.status]??9)-(xF[re.status]??9);break;case"created_at":oe=J.created_at.localeCompare(re.created_at);break}return D==="asc"?oe:-oe}),Q},[e,k,E,A,D]),H=Q=>{A===Q?P(J=>J==="asc"?"desc":"asc"):(O(Q),P(Q==="priority"?"desc":"asc"))},W=({field:Q})=>A!==Q?null:D==="asc"?f.jsx(WJ,{size:10,className:"inline ml-0.5"}):f.jsx(HJ,{size:10,className:"inline ml-0.5"});return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-5 gap-3 flex-wrap",children:[f.jsxs("h2",{className:"text-sm font-semibold text-warm-600 uppercase tracking-wider",children:[v("planner.title"),f.jsx("span",{className:"ml-1 text-warm-400",children:e.length})]}),f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsxs("select",{className:"input-field text-xs py-1.5 px-2 w-auto max-w-[10rem] shrink",value:k,onChange:Q=>_(Q.target.value),children:[f.jsx("option",{value:"",children:v("planner.filterTag")}),B.map(Q=>f.jsx("option",{value:Q,children:Q},Q))]}),f.jsxs("select",{className:"input-field text-xs py-1.5 px-2 w-auto max-w-[10rem] shrink",value:E,onChange:Q=>T(Q.target.value),children:[f.jsx("option",{value:"",children:v("planner.filterStatus")}),f.jsx("option",{value:"pending",children:v("plannerStatus.pending")}),f.jsx("option",{value:"in_progress",children:v("plannerStatus.in_progress")}),f.jsx("option",{value:"done",children:v("plannerStatus.done")}),f.jsx("option",{value:"moved",children:v("plannerStatus.moved")})]}),m&&f.jsxs("button",{onClick:G,disabled:R||e.length===0,className:"btn-secondary text-xs py-2 whitespace-nowrap shrink-0 disabled:opacity-50",title:v("planner.exportTooltip"),children:[f.jsx(Tee,{size:14,className:"inline-block shrink-0"}),v("planner.export")]}),g&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:Y,disabled:R,className:"btn-secondary text-xs py-2 whitespace-nowrap shrink-0 disabled:opacity-50",title:v("planner.importTooltip"),children:[f.jsx(Ote,{size:14,className:"inline-block shrink-0"}),v("planner.import")]}),f.jsx("input",{ref:q,type:"file",accept:".json,application/json",className:"hidden",onChange:K})]}),!b&&!S&&f.jsxs("button",{onClick:()=>w(!0),className:"btn-primary text-xs py-2 whitespace-nowrap shrink-0",children:[f.jsx(sc,{size:14,className:"inline-block shrink-0"}),v("planner.add")]})]})]}),(b||S)&&f.jsx("div",{className:"mb-5",children:f.jsx(sIe,{existingTags:t,editItem:S,onSave:async Q=>{if(S){await i(S.id,Q),j(null);return}else{const J=await a(Q);return w(!1),J}},onCancel:()=>{w(!1),j(null)},onUpdateTag:d})}),f.jsxs("div",{className:"card",children:[f.jsxs("div",{className:"hidden sm:flex items-center gap-3 px-4 py-2 rounded-t-xl select-none",style:{backgroundColor:"var(--color-bg-tertiary)",borderBottom:"1px solid var(--color-border-muted)"},children:[f.jsx("div",{className:"w-[14px] flex-shrink-0"}),f.jsxs("div",{className:"flex-1 text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>H("title"),children:[v("planner.col.title"),f.jsx(W,{field:"title"})]}),f.jsxs("div",{className:"w-[160px] text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>H("tags"),children:[v("planner.col.tags"),f.jsx(W,{field:"tags"})]}),f.jsxs("div",{className:"w-12 text-center text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>H("priority"),children:[v("plannerForm.priority"),f.jsx(W,{field:"priority"})]}),f.jsxs("div",{className:"hidden md:block w-20 text-right text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>H("due_date"),children:[v("planner.col.dueDate"),f.jsx(W,{field:"due_date"})]}),f.jsxs("div",{className:"w-16 text-2xs font-semibold text-warm-500 uppercase tracking-wider cursor-pointer hover:text-warm-700 transition-colors",onClick:()=>H("status"),children:[v("planner.col.status"),f.jsx(W,{field:"status"})]}),f.jsx("div",{className:"w-8"})]}),X.length===0?f.jsx(xl,{icon:Qee,title:v("planner.empty"),description:v("planner.emptyHint")}):X.map((Q,J)=>f.jsx("div",{className:"animate-slide-up",style:{animationDelay:`${J*20}ms`},children:f.jsx(aIe,{item:Q,tagColors:U,existingTags:B,onSave:async(re,oe)=>{await i(re,oe)},onDelete:()=>s(Q.id),onConvertToTodo:()=>{z(Q),F("todo")},onConvertToSchedule:()=>{z(Q),F("schedule")},onUpdateTag:d})},Q.id))]}),M&&f.jsx(oIe,{item:M,mode:L,projectCliTool:n,projectCliModel:r,onConvert:async Q=>{L==="todo"?await l(M.id,Q):await c(M.id,Q),z(null)},onClose:()=>z(null)})]})}function uIe({onEvent:e,connected:t,sendMessage:n}){const{id:r}=DF(),[a,i]=x.useState(null),[s,l]=x.useState([]),[c,d]=x.useState([]),[h,m]=x.useState(null),[g,v]=x.useState([]),[b,w]=x.useState([]),[S,j]=x.useState([]),[k,_]=x.useState([]),[E,T]=wJ(),[A,O]=x.useState(E.get("tab")||"tasks"),D=x.useCallback(ne=>{O(ne),T(ne==="tasks"?{}:{tab:ne},{replace:!0})},[T]),[P,M]=x.useState(!0),[z,L]=x.useState(!1),[F,R]=x.useState(new Set),[I,q]=x.useState(0),{t:G}=tt(),{sendNotification:Y}=HN(),K=x.useRef([]);x.useEffect(()=>{K.current=g},[g]),x.useEffect(()=>{r&&Promise.all([zte(r),E0(r),nD(r),rD(r),_ne(),zne(r),Tm(r),Om(r)]).then(([ne,be,Se,Pe,Le,ot,Vt,ir])=>{i(ne),l(be),d(Se),v(Pe),w(ot),j(Vt),_(ir),Le.resetsAt&&m(Le.resetsAt);const Re=be.filter(Cn=>Cn.status==="running"&&Cn.execution_mode==="interactive").map(Cn=>Cn.id);Re.length>0&&R(new Set(Re))}).catch(()=>L(!0)).finally(()=>M(!1))},[r]);const B=x.useRef(s);B.current=s,x.useEffect(()=>{if(!r)return;const ne=setInterval(()=>{B.current.some(Se=>Se.status==="running")&&E0(r).then(Se=>{l(Pe=>Pe.map(Le=>{const ot=Se.find(Vt=>Vt.id===Le.id);return ot&&ot.status!==Le.status?ot:Le}))}).catch(()=>{})},5e3);return()=>clearInterval(ne)},[r]);const U=x.useRef(t);x.useEffect(()=>{t&&!U.current&&r&&Promise.all([E0(r),nD(r),rD(r)]).then(([ne,be,Se])=>{l(ne),d(be),v(Se)}).catch(()=>{}),U.current=t},[t,r]),x.useEffect(()=>e(ne=>{if(ne.type==="todo:status-changed"&&ne.todoId&&ne.status){if(l(be=>be.map(Se=>{if(Se.id!==ne.todoId)return Se;const Pe={status:ne.status,updated_at:new Date().toISOString()};return ne.worktree_path!==void 0&&(Pe.worktree_path=ne.worktree_path??null),ne.branch_name!==void 0&&(Pe.branch_name=ne.branch_name??null),{...Se,...Pe}})),(ne.status==="completed"||ne.status==="merged"||ne.status==="failed")&&q(be=>be+1),ne.status==="completed"||ne.status==="failed"){const be=B.current.find(Se=>Se.id===ne.todoId);be&&Y(ne.status==="completed"?G("notification.taskCompleted"):G("notification.taskFailed"),be.title)}ne.status==="running"&&ne.mode==="interactive"?R(be=>new Set(be).add(ne.todoId)):ne.status!=="running"&&R(be=>{const Se=new Set(be);return Se.delete(ne.todoId),Se})}if(ne.type==="schedule:status-changed"&&ne.scheduleId&&d(be=>be.map(Se=>Se.id===ne.scheduleId?{...Se,is_active:ne.isActive?1:0,updated_at:new Date().toISOString()}:Se)),ne.type==="rate-limit:updated"&&ne.resetsAt&&m(ne.resetsAt),ne.type==="discussion:status-changed"&&ne.discussionId&&(v(be=>be.map(Se=>Se.id===ne.discussionId?{...Se,status:ne.status,current_round:ne.currentRound??Se.current_round,updated_at:new Date().toISOString()}:Se)),ne.status==="completed"||ne.status==="failed")){const be=K.current.find(Se=>Se.id===ne.discussionId);be&&Y(ne.status==="completed"?G("notification.discussionCompleted"):G("notification.discussionFailed"),be.title)}ne.type==="session:status-changed"&&ne.sessionId&&w(be=>be.map(Se=>Se.id===ne.sessionId?{...Se,status:ne.status,updated_at:new Date().toISOString()}:Se))}),[e,Y,G]);const X=x.useCallback(async(ne,be,Se,Pe,Le,ot,Vt,ir)=>{if(!r)return;const Re=await A0(r,{title:ne,description:be,cli_tool:Se,cli_model:Pe,depends_on:ot,max_turns:Vt??null,use_worktree:ir??null});if(Le&&Le.length>0){const Cn=await UN(Re.id,Le.map(Dr=>({name:Dr.name,data:Dr.data})));Re.images=JSON.stringify(Cn.images)}l(Cn=>[...Cn,Re])},[r]),H=x.useCallback(async(ne,be)=>{const Se=be==="interactive";Se&&R(Pe=>new Set(Pe).add(ne));try{const Pe=await tD(ne,be);l(Le=>Le.map(ot=>ot.id===ne?Pe:ot))}catch(Pe){throw Se&&R(Le=>{const ot=new Set(Le);return ot.delete(ne),ot}),Pe}},[]),W=x.useCallback(async ne=>{const be=await dne(ne);l(Se=>Se.map(Pe=>Pe.id===ne?be:Pe))},[]),Q=x.useCallback(async ne=>{await cne(ne),l(be=>be.filter(Se=>Se.id!==ne))},[]),J=x.useCallback(async(ne,be,Se,Pe,Le,ot,Vt,ir)=>{const Re=await Am(ne,{title:be,description:Se,cli_tool:Pe,cli_model:Le,depends_on:ot??null,max_turns:Vt??null,use_worktree:ir===void 0?null:ir});l(Cn=>Cn.map(Dr=>Dr.id===ne?Re:Dr))},[]),re=x.useCallback(async ne=>{await fne(ne),l(be=>be.map(Se=>Se.id===ne?{...Se,status:"merged",worktree_path:null,branch_name:null,updated_at:new Date().toISOString()}:Se))},[]),oe=x.useCallback(async ne=>{const be=await hne(ne),Se=new Set(be.mergedIds);l(Pe=>Pe.map(Le=>Se.has(Le.id)?{...Le,status:"merged",worktree_path:null,branch_name:null,updated_at:new Date().toISOString()}:Le))},[]),Z=x.useCallback(async(ne,be=!1)=>{await mne(ne,be),l(Se=>Se.map(Pe=>Pe.id===ne?{...Pe,worktree_path:null,...be?{branch_name:null}:{},updated_at:new Date().toISOString()}:Pe))},[]),le=x.useCallback(async(ne,be)=>{const Se=be==="interactive";Se&&R(Pe=>new Set(Pe).add(ne));try{const Pe=await pne(ne,be);l(Le=>Le.map(ot=>ot.id===ne?Pe:ot))}catch(Pe){throw Se&&R(Le=>{const ot=new Set(Le);return ot.delete(ne),ot}),Pe}},[]),ie=x.useCallback(async(ne,be,Se)=>{const Pe=Se==="interactive";Pe&&R(Le=>new Set(Le).add(ne));try{const Le=await gne(ne,be,Se);l(ot=>ot.map(Vt=>Vt.id===ne?Le:Vt))}catch(Le){throw Pe&&R(ot=>{const Vt=new Set(ot);return Vt.delete(ne),Vt}),Le}},[]),ee=x.useCallback(async(ne,be,Se)=>{const Pe=await xne(ne,be,Se);Pe.original_deleted&&l(Le=>Le.filter(ot=>ot.id!==ne)),d(Le=>[Pe.schedule,...Le])},[]),ae=x.useCallback(async(ne,be)=>{const Se=await kne(ne,be);d(Pe=>[Se.schedule,...Pe])},[]),xe=x.useCallback((ne,be)=>{n({type:"todo:stdin",todoId:ne,input:be})},[n]),ye=x.useCallback(async(ne,be)=>{const Se=await Am(ne,{depends_on:be});l(Pe=>Pe.map(Le=>Le.id===ne?Se:Le))},[]),Te=x.useCallback(async ne=>{const be=ne.map((Se,Pe)=>({id:Se,priority:Pe}));l(Se=>Se.map(Pe=>{const Le=be.find(ot=>ot.id===Pe.id);return Le?{...Pe,priority:Le.priority}:Pe})),await Promise.all(be.map(Se=>Am(Se.id,{priority:Se.priority})))},[]),Me=x.useCallback(async(ne,be,Se)=>{await Am(ne,{position_x:be,position_y:Se}),l(Pe=>Pe.map(Le=>Le.id===ne?{...Le,position_x:be,position_y:Se}:Le))},[]),he=x.useCallback(async(ne,be)=>{if(!r)return;const Se=be.map(Vt=>Vt.message).join(`
532
+ `),Pe=`The previous task "${ne.title}" failed with the following errors:
533
+
534
+ ---
535
+ ${Se}
536
+ ---
537
+
538
+ Please analyze the failure above and fix the issue. The original task description was:
539
+ ${ne.description||"(no description)"}`,Le=`[Fix] ${ne.title}`,ot=await A0(r,{title:Le.slice(0,200),description:Pe,cli_tool:ne.cli_tool??void 0,cli_model:ne.cli_model??void 0});l(Vt=>[...Vt,ot]);try{const Vt=await tD(ot.id,"headless");l(ir=>ir.map(Re=>Re.id===ot.id?Vt:Re))}catch{}},[r]),Ie=x.useCallback(async ne=>{if(!r)return;const be=await vne(r,{title:ne.title,description:ne.description,cron_expression:ne.cronExpression||void 0,cli_tool:ne.cliTool,cli_model:ne.cliModel,skip_if_running:ne.skipIfRunning,schedule_type:ne.scheduleType,run_at:ne.runAt});d(Se=>[be,...Se])},[r]),Je=x.useCallback(async(ne,be)=>{const Se=be?await wne(ne):await Sne(ne);d(Pe=>Pe.map(Le=>Le.id===ne?Se:Le))},[]),We=x.useCallback(async ne=>{await bne(ne),d(be=>be.filter(Se=>Se.id!==ne))},[]),it=x.useCallback(async(ne,be)=>{const Se=await yne(ne,be);d(Pe=>Pe.map(Le=>Le.id===ne?Se:Le))},[]),Ce=x.useCallback(async ne=>{await jne(ne)},[]),He=x.useCallback(async ne=>{if(!r)throw new Error("No project id");const be=await Kne(r,ne);if(j(Se=>[be,...Se]),ne.tags){const Se=await Om(r);_(Se)}return be},[r]),ge=x.useCallback(async(ne,be)=>{const Se=await Yne(ne,be);j(Pe=>Pe.map(Le=>Le.id===ne?Se:Le))},[]),ue=x.useCallback(async ne=>{await Wne(ne),j(be=>be.filter(Se=>Se.id!==ne))},[]),_e=x.useCallback(async(ne,be)=>{const Se=await Xne(ne,be);j(Pe=>Pe.map(Le=>Le.id===ne?Se.plannerItem:Le)),l(Pe=>[...Pe,Se.todo])},[]),fe=x.useCallback(async(ne,be)=>{const Se=await Zne(ne,be);j(Pe=>Pe.map(Le=>Le.id===ne?Se.plannerItem:Le)),d(Pe=>[Se.schedule,...Pe])},[]),Oe=x.useCallback(async(ne,be)=>{if(!r)return;const Se=await Gne(r,ne,be);if(_(Se),be.new_name&&be.new_name!==ne){const Pe=await Tm(r);j(Pe)}},[r]),ze=x.useCallback(async ne=>{if(!r)return;await Vne(r,ne);const[be,Se]=await Promise.all([Om(r),Tm(r)]);_(be),j(Se)},[r]),ut=x.useCallback(async()=>{if(r)try{const{blob:ne,filename:be}=await Qne(r),Se=URL.createObjectURL(ne),Pe=document.createElement("a");Pe.href=Se,Pe.download=be,document.body.appendChild(Pe),Pe.click(),document.body.removeChild(Pe),URL.revokeObjectURL(Se),S.some(ot=>ot.images)&&window.alert(G("planner.importNoImages"))}catch(ne){const be=ne instanceof Error?ne.message:String(ne);window.alert(`${G("planner.exportError")}: ${be}`)}},[r,S,G]),gt=x.useCallback(async ne=>{if(r)try{const be=await ne.text();let Se;try{Se=JSON.parse(be)}catch{throw new Error(G("planner.importInvalidJson"))}const Pe=await Jne(r,Se),[Le,ot]=await Promise.all([Om(r),Tm(r)]);_(Le),j(ot),window.alert(G("planner.importSuccess").replace("{items}",String(Pe.imported_items)).replace("{tags}",String(Pe.imported_tags)))}catch(be){const Se=be instanceof Error?be.message:String(be);window.alert(`${G("planner.importError")}: ${Se}`)}},[r,G]),_t=x.useCallback(ne=>{v(be=>[ne,...be])},[]),ct=x.useCallback(async ne=>{await m8(ne),v(be=>be.map(Se=>Se.id===ne?{...Se,status:"running",updated_at:new Date().toISOString()}:Se))},[]),Ae=x.useCallback(async ne=>{await p8(ne),v(be=>be.map(Se=>Se.id===ne?{...Se,status:"paused",updated_at:new Date().toISOString()}:Se))},[]),$e=x.useCallback(async ne=>{await One(ne),v(be=>be.filter(Se=>Se.id!==ne))},[]),Xe=x.useCallback(ne=>{w(be=>[ne,...be])},[]),pt=x.useCallback(async ne=>{await Bne(ne),w(be=>be.map(Se=>Se.id===ne?{...Se,status:"running",updated_at:new Date().toISOString()}:Se))},[]),at=x.useCallback(async ne=>{await Fne(ne),w(be=>be.map(Se=>Se.id===ne?{...Se,status:"stopped",updated_at:new Date().toISOString()}:Se))},[]),Et=x.useCallback(async ne=>{await qne(ne),w(be=>be.filter(Se=>Se.id!==ne))},[]),Ze=x.useCallback(async(ne,be)=>{await Une(ne,be),w(Se=>Se.map(Pe=>Pe.id===ne?{...Pe,worktree_path:null,...be?{branch_name:null}:{}}:Pe))},[]),Ot=x.useCallback((ne,be)=>{n({type:"session:stdin",sessionId:ne,input:be})},[n]),zt=x.useCallback(async()=>{r&&(await $te(r),l(ne=>ne.map(be=>be.status==="pending"||be.status==="failed"||be.status==="stopped"?{...be,status:"running",updated_at:new Date().toISOString()}:be)))},[r]),hn=x.useCallback(async()=>{r&&(await qte(r),l(ne=>ne.map(be=>be.status==="running"?{...be,status:"stopped",updated_at:new Date().toISOString()}:be)))},[r]);return P?f.jsxs("div",{className:"px-6 py-6 sm:px-8 sm:py-8 space-y-6",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ke,{className:"h-8 w-48"}),f.jsx(Ke,{className:"h-4 w-32"})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ke,{className:"h-10 w-24"}),f.jsx(Ke,{className:"h-10 w-24"})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ke,{className:"h-4 w-16"}),f.jsx(Ke,{className:"h-4 w-12"})]}),f.jsx(Ke,{className:"h-3 w-full rounded-full"})]}),f.jsxs("div",{className:"flex gap-4 border-b border-theme-border pb-px",children:[f.jsx(Ke,{className:"h-10 w-20"}),f.jsx(Ke,{className:"h-10 w-24"}),f.jsx(Ke,{className:"h-10 w-24"})]}),f.jsx("div",{className:"space-y-4",children:[...Array(3)].map((ne,be)=>f.jsxs("div",{className:"card p-4 space-y-3",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ke,{className:"h-5 w-1/3"}),f.jsx(Ke,{className:"h-5 w-20"})]}),f.jsx(Ke,{className:"h-4 w-2/3"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ke,{className:"h-4 w-16"}),f.jsx(Ke,{className:"h-4 w-16"})]})]},be))})]}):z||!a?f.jsx("div",{className:"px-6 py-6 sm:px-8 sm:py-8",children:f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("p",{className:"text-status-error font-medium text-lg",children:G("detail.notFound")}),f.jsx(Ki,{to:"/",className:"mt-4 inline-block text-sm text-accent hover:text-accent-dark transition-colors",children:G("detail.backToProjects")})]})}):f.jsxs("div",{className:"px-6 py-6 sm:px-8 sm:py-8",children:[f.jsx(cre,{project:a,todos:s,onStartAll:zt,onStopAll:hn,onProjectUpdate:ne=>i(ne)}),f.jsx("div",{className:"flex gap-0.5 mb-5 p-1 rounded-xl overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-1",style:{backgroundColor:"var(--color-bg-tertiary)"},children:[{key:"planner",label:G("tabs.planner"),count:S.length},{key:"tasks",label:G("tabs.tasks"),count:s.length},{key:"sessions",label:G("tabs.sessions"),count:b.length},{key:"discussions",label:G("tabs.discussions"),count:g.length},{key:"schedules",label:G("tabs.schedules"),count:c.length},...HP(a).map(ne=>({key:ne.id,label:G(`tabs.${ne.id}`)||ne.displayName})),{key:"analytics",label:G("tabs.analytics")},...a.is_git_repo?[{key:"git",label:G("tabs.git")}]:[]].map(ne=>f.jsxs("button",{onClick:()=>D(ne.key),className:`px-3 sm:px-4 py-1.5 sm:py-2 text-xs whitespace-nowrap rounded-lg transition-all duration-200 ${A===ne.key?"text-warm-800 font-semibold shadow-soft":"text-warm-500 font-normal hover:text-warm-600"}`,style:A===ne.key?{backgroundColor:"var(--color-bg-card)"}:void 0,children:[ne.label,"count"in ne&&typeof ne.count=="number"&&f.jsx("span",{className:`ml-1 ${A===ne.key?"text-warm-500":"text-warm-400"}`,children:ne.count})]},ne.key))}),A==="tasks"&&f.jsx(m0e,{todos:s,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,projectIsGitRepo:!!a.is_git_repo,projectUseWorktree:a.use_worktree!==0,onAddTodo:X,onStartTodo:H,onStopTodo:W,onDeleteTodo:Q,onEditTodo:J,onMergeTodo:re,onMergeChain:oe,onCleanupTodo:Z,onRetryTodo:le,onContinueTodo:ie,onFixTodo:he,onScheduleTodo:ee,onScheduleOnResetTodo:ae,resetsAt:h,onUpdateDependency:ye,onUpdatePosition:Me,onReorderTodos:Te,onEvent:e,onSendInput:xe,interactiveTodos:F,debugLogging:!!a.debug_logging,showTokenUsage:!!a.show_token_usage}),A==="sessions"&&r&&f.jsx(U0e,{projectId:r,sessions:b,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,isGitRepo:!!a.is_git_repo,onAddSession:Xe,onStartSession:pt,onStopSession:at,onDeleteSession:Et,onCleanupSession:Ze,onSendInput:Ot,onEvent:e}),A==="discussions"&&r&&f.jsx(q0e,{projectId:r,discussions:g,onAddDiscussion:_t,onStartDiscussion:ct,onStopDiscussion:Ae,onDeleteDiscussion:$e}),HP(a).map(ne=>A===ne.id&&ne.PanelComponent?f.jsx(ne.PanelComponent,{project:a,onImportAsTask:async(be,Se)=>{if(!r)return;const Pe=await A0(r,{title:be,description:Se});l(Le=>[...Le,Pe])}},ne.id):null),A==="analytics"&&r&&f.jsx(nIe,{projectId:r}),A==="git"&&a.is_git_repo?f.jsx(R0e,{project:a,refreshTrigger:I}):null,A==="schedules"&&f.jsx(w0e,{schedules:c,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,onAddSchedule:Ie,onToggleSchedule:Je,onDeleteSchedule:We,onEditSchedule:it,onTriggerSchedule:Ce,onMergeRun:re,onCleanupRun:Z}),A==="planner"&&f.jsx(lIe,{plannerItems:S,existingTags:k,projectCliTool:a.cli_tool,projectCliModel:a.claude_model??void 0,onAddItem:He,onEditItem:ge,onDeleteItem:ue,onConvertToTodo:_e,onConvertToSchedule:fe,onUpdateTag:Oe,onDeleteTag:ze,onExport:ut,onImport:gt})]})}const cIe={pending:"bg-warm-200 text-warm-600",running:"bg-status-success/10 text-status-success",paused:"bg-amber-100 text-amber-700",completed:"bg-accent/10 text-accent",failed:"bg-status-error/10 text-status-error",merged:"bg-accent/10 text-accent"};function dIe(e){try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function bF(e){return e==="pending"||e==="failed"?{canEdit:!0,allowAdvancedFields:!0}:e==="paused"||e==="completed"?{canEdit:!0,allowAdvancedFields:!1}:{canEdit:!1,allowAdvancedFields:!1}}function fIe({onEvent:e,connected:t}){const{id:n,discussionId:r}=DF(),{t:a,lang:i}=tt(),{sendNotification:s}=HN(),[l,c]=x.useState(null),[d,h]=x.useState([]),[m,g]=x.useState(!0),[v,b]=x.useState(new Map),[w,S]=x.useState(""),[j,k]=x.useState(!1),[_,E]=x.useState(!1),[T,A]=x.useState(!1),[O,D]=x.useState(new Set),[P,M]=x.useState(""),[z,L]=x.useState([]),F=x.useRef(null),R=x.useCallback(he=>{D(Ie=>{const Je=new Set(Ie);return Je.has(he)?Je.delete(he):Je.add(he),Je})},[]),I=x.useCallback(()=>{if(!l)return;const he=new Set(l.messages.filter(Ie=>Ie.content&&Ie.status==="completed").map(Ie=>Ie.id));D(he)},[l]),q=x.useCallback(()=>{D(new Set)},[]),G=he=>{const Ie=he.split(`
540
+ `).find(Je=>Je.trim())||"";return Ie.length>120?`${Ie.slice(0,120)}...`:Ie};x.useEffect(()=>{r&&Io(r).then(c).catch(()=>{}).finally(()=>g(!1))},[r]),x.useEffect(()=>{n&&h8(n).then(h).catch(()=>{})},[n]),x.useEffect(()=>e(he=>{r&&(he.type==="discussion:status-changed"&&he.discussionId===r&&((he.status==="completed"||he.status==="failed")&&s(he.status==="completed"?a("notification.discussionCompleted"):a("notification.discussionFailed"),(l==null?void 0:l.title)??""),c(Ie=>Ie&&{...Ie,status:he.status,current_round:he.currentRound??Ie.current_round,current_agent_id:he.currentAgentId??Ie.current_agent_id})),he.type==="discussion:message-changed"&&he.discussionId===r&&(c(Ie=>Ie&&{...Ie,messages:Ie.messages.map(Je=>Je.id===he.messageId?{...Je,status:he.status}:Je)}),(he.status==="completed"||he.status==="failed")&&Io(r).then(c).catch(()=>{})),he.type==="discussion:log"&&he.discussionId===r&&he.messageId&&b(Ie=>{const Je=new Map(Ie),We=he.messageId,it=Je.get(We)||[];return Je.set(We,[...it,he.message||""]),Je}))}),[e,r,s,a,l==null?void 0:l.title]),x.useEffect(()=>{var he;(he=F.current)==null||he.scrollIntoView({behavior:"smooth"})},[l==null?void 0:l.messages,v]),x.useEffect(()=>{!r||!l||(l.status==="failed"?Rne(r).then(he=>L(he.filter(Ie=>Ie.log_type==="error"))).catch(()=>{}):L([]))},[r,l==null?void 0:l.status]);const Y=x.useCallback(async()=>{if(!r)return;const he=await m8(r);c(he),M("")},[r]),K=x.useCallback(async()=>{if(!r)return;await p8(r);const he=await Io(r);c(he),M("")},[r]),B=x.useCallback(async()=>{if(!r||!w.trim())return;await Mne(r,w),S("");const he=await Io(r);c(he),M("")},[r,w]),U=x.useCallback(async()=>{if(!r)return;const he=await Pne(r);c(he),M("")},[r]),X=x.useCallback(async he=>{if(!r)return;k(!1);const Ie=await Dne(r,he);c(Ie),M("")},[r]),H=x.useCallback(async()=>{if(!r)return;await Ine(r);const he=await Io(r);c(he),M("")},[r]),W=x.useCallback(async()=>{if(!r)return;await Lne(r);const he=await Io(r);c(he),M("")},[r]),Q=x.useCallback(async he=>{if(!(!r||!l)){A(!0);try{const{allowAdvancedFields:Ie}=bF(l.status),Je=Ie?{title:he.title,description:he.description,agent_ids:he.agent_ids,max_rounds:he.max_rounds,auto_implement:he.auto_implement,implement_agent_id:he.auto_implement?he.implement_agent_id:null}:{title:he.title,description:he.description};await Tne(r,Je);const We=await Io(r);c(We),E(!1),M("")}catch(Ie){M(Ie instanceof Error?Ie.message:i==="ko"?"토론 저장에 실패했습니다.":"Failed to save discussion.")}finally{A(!1)}}},[r,l,i]);if(m)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6 py-6 sm:py-8 space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Ke,{className:"h-4 w-16"}),f.jsx(Ke,{className:"h-4 w-4"}),f.jsx(Ke,{className:"h-4 w-32"})]}),f.jsxs("div",{className:"card p-6 space-y-4",children:[f.jsx(Ke,{className:"h-7 w-1/3"}),f.jsx(Ke,{className:"h-4 w-full",count:2}),f.jsxs("div",{className:"flex gap-4 pt-2",children:[f.jsx(Ke,{className:"h-3 w-24"}),f.jsx(Ke,{className:"h-3 w-24"})]})]}),f.jsx("div",{className:"space-y-8",children:[...Array(3)].map((he,Ie)=>f.jsxs("div",{className:"flex gap-3",children:[f.jsx(Ke,{variant:"circular",width:32,height:32}),f.jsxs("div",{className:"flex-1 space-y-2",children:[f.jsx(Ke,{className:"h-4 w-24"}),f.jsxs("div",{className:"card p-4 space-y-2",children:[f.jsx(Ke,{className:"h-3 w-full"}),f.jsx(Ke,{className:"h-3 w-5/6"}),f.jsx(Ke,{className:"h-3 w-4/6"})]})]})]},Ie))})]});if(!l)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-8 text-center",children:[f.jsx("p",{className:"text-status-error",children:a("discussions.notFound")}),f.jsx(Ki,{to:`/projects/${n}?tab=discussions`,className:"text-sm text-accent mt-2 inline-block",children:a("discussions.back")})]});const J=new Map(l.agents.map(he=>[he.id,he])),re=l.status==="pending"||l.status==="paused"||l.status==="failed",oe=l.status==="running",Z=l.status==="completed"||l.status==="paused",le=l.status==="completed",ie=l.status==="paused"||l.status==="running",ee=!oe&&!!l.worktree_path,{canEdit:ae,allowAdvancedFields:xe}=bF(l.status),ye={title:l.title,description:l.description,agent_ids:dIe(l.agent_ids),max_rounds:l.max_rounds,auto_implement:l.auto_implement===1,implement_agent_id:l.implement_agent_id||""},Te=new Map;for(const he of l.messages){const Ie=Te.get(he.round_number)||[];Ie.push(he),Te.set(he.round_number,Ie)}const Me=[...Te.keys()].sort((he,Ie)=>he-Ie);return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 sm:px-6 py-6 sm:py-8 flex flex-col",style:{height:"calc(100vh - 2rem)"},children:[f.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[f.jsxs(Ki,{to:`/projects/${n}?tab=discussions`,className:"inline-flex items-center gap-1 text-sm text-warm-500 hover:text-accent transition-colors",children:[f.jsx(dee,{size:16}),a("discussions.back")]}),f.jsx("span",{className:"text-warm-300",children:"/"}),f.jsx("span",{className:"text-sm font-medium text-warm-700 truncate",children:l.title}),f.jsx("span",{className:`px-1.5 py-0.5 rounded text-2xs font-semibold uppercase ${cIe[l.status]}`,children:a(`status.${l.status}`)||l.status}),l.status==="running"&&f.jsxs("span",{className:"text-2xs text-status-success animate-pulse",children:[a("discussions.round")," ",l.current_round,"/",l.max_rounds]}),t&&f.jsx("span",{className:"ml-auto inline-flex items-center gap-1 text-xs text-status-success",children:f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-success animate-pulse"})})]}),f.jsxs("div",{className:"mb-4 rounded-xl border border-warm-150 bg-warm-50/80 p-4",children:[f.jsxs("div",{className:"flex items-start justify-between gap-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:"text-lg font-semibold text-warm-800",children:l.title}),f.jsx("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-relaxed text-warm-500",children:l.description})]}),ae&&f.jsx("button",{onClick:()=>E(!0),className:"btn-secondary text-xs py-2 flex-shrink-0",children:a("todo.edit")})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap gap-3 text-[11px] text-warm-400",children:[f.jsxs("span",{children:[a("discussions.maxRounds"),": ",l.max_rounds]}),f.jsxs("span",{children:[a("discussions.agents"),": ",l.agents.map(he=>he.name).join(", ")||"-"]}),f.jsxs("span",{children:[a("discussions.autoImplement"),": ",l.auto_implement?i==="ko"?"사용":"Enabled":i==="ko"?"사용 안 함":"Disabled"]})]}),P&&f.jsx("p",{className:"mt-3 text-xs text-status-error",children:P})]}),l.status==="failed"&&(()=>{const he=l.messages.find(Je=>Je.status==="failed"),Ie=he?J.get(he.agent_id):null;return f.jsxs("div",{className:"mb-4 rounded-xl border border-status-error/30 bg-status-error/5 overflow-hidden animate-slide-up",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-status-error/10 border-b border-status-error/20",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Np,{size:16,className:"text-status-error"}),f.jsx("h4",{className:"text-xs font-semibold text-status-error uppercase tracking-wider",children:a("discussions.failureTitle")}),Ie&&f.jsxs("span",{className:"inline-flex items-center gap-1 text-2xs font-mono px-1.5 py-0.5 rounded bg-status-error/15 text-status-error",children:[f.jsx("span",{className:"w-3 h-3 rounded-full inline-block",style:{backgroundColor:Ie.avatar_color||"#94a3b8"}}),Ie.name]}),he&&f.jsxs("span",{className:"text-2xs font-mono px-1.5 py-0.5 rounded bg-status-error/15 text-status-error",children:[a("discussions.round")," ",he.round_number]})]}),f.jsxs("button",{onClick:Y,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium bg-status-success/15 text-status-success hover:bg-status-success/25 border border-status-success/30 transition-colors",children:[f.jsx($g,{size:14}),a("discussions.retry")]})]}),f.jsx("div",{className:"px-4 py-3 space-y-1.5 max-h-48 overflow-y-auto",children:z.length>0?z.map(Je=>f.jsxs("div",{className:"flex items-start gap-2 text-xs",children:[f.jsx("span",{className:"text-warm-500 font-mono flex-shrink-0",children:new Date(Je.created_at).toLocaleTimeString()}),f.jsx("span",{className:"text-status-error font-mono whitespace-pre-wrap break-all",children:Je.message})]},Je.id)):f.jsx("span",{className:"text-xs text-warm-400 italic",children:a("discussions.noErrorLogs")})})]})})(),f.jsxs("div",{className:"flex items-center gap-2 mb-4 flex-wrap",children:[re&&f.jsxs("button",{onClick:Y,className:"btn-primary text-sm",children:[f.jsx(yl,{size:16}),l.status==="pending"?a("header.runAll"):a("discussions.resume")]}),oe&&f.jsxs("button",{onClick:K,className:"btn-danger text-sm",children:[f.jsx(FN,{size:16}),a("discussions.pause")]}),oe&&f.jsx("button",{onClick:U,className:"btn btn-sm text-xs text-warm-500",children:a("discussions.skipTurn")}),Z&&f.jsxs("button",{onClick:()=>k(!0),className:"btn-primary text-sm",children:[f.jsx(Eee,{size:16}),a("discussions.implement")]}),le&&l.branch_name&&f.jsxs("button",{onClick:H,className:"btn-primary text-sm",children:[f.jsx(Of,{size:16}),a("todos.merge")]}),ee&&f.jsxs("button",{onClick:W,className:"btn-danger text-sm",children:[f.jsx(es,{size:16}),a("todo.cleanup")]}),l.messages.some(he=>he.content&&he.status==="completed")&&f.jsx("button",{onClick:O.size>0?q:I,className:"btn btn-sm text-xs text-warm-500",children:O.size>0?a("discussions.expandAll"):a("discussions.collapseAll")}),f.jsx("div",{className:"ml-auto flex items-center gap-1",children:l.agents.map(he=>f.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-white text-2xs font-bold transition-all ${l.current_agent_id===he.id?"ring-2 ring-status-success ring-offset-1 scale-110":"opacity-60"}`,style:{backgroundColor:he.avatar_color||"#6366f1"},title:`${he.name} (${he.role})`,children:he.name.charAt(0)},he.id))})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto space-y-1 pb-4",children:[Me.map(he=>{const Ie=Te.get(he),Je=he>l.max_rounds;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 my-4",children:[f.jsx("div",{className:"flex-1 h-px bg-warm-200"}),f.jsx("span",{className:"text-2xs font-semibold text-warm-400 uppercase tracking-wider",children:Je?a("discussions.implementation"):`${a("discussions.round")} ${he}`}),f.jsx("div",{className:"flex-1 h-px bg-warm-200"})]}),Ie.map(We=>{const it=J.get(We.agent_id),Ce=We.agent_id==="user",He=We.status==="running",ge=v.get(We.id)||[],ue=O.has(We.id),_e=!!We.content&&We.status==="completed"&&!Ce;return f.jsxs("div",{className:`flex gap-3 py-3 ${Ce?"justify-end":""}`,children:[!Ce&&f.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold flex-shrink-0 ${He?"ring-2 ring-status-success ring-offset-1 animate-pulse":""}`,style:{backgroundColor:(it==null?void 0:it.avatar_color)||"#94a3b8"},children:We.agent_name.charAt(0)}),f.jsxs("div",{className:`flex-1 min-w-0 ${Ce?"max-w-[80%]":""}`,children:[!Ce&&f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx("span",{className:"text-xs font-semibold text-warm-700",children:We.agent_name}),f.jsx("span",{className:"text-2xs text-warm-400",children:a(`agents.roles.${We.role}`)||We.role}),We.status==="skipped"&&f.jsx("span",{className:"text-2xs text-warm-300 italic",children:a("status.skipped")}),_e&&f.jsxs("button",{onClick:()=>R(We.id),className:"text-2xs text-warm-300 hover:text-accent transition-colors flex items-center gap-0.5",children:[f.jsx(zu,{size:12,className:`transition-transform ${ue?"":"rotate-90"}`}),a(ue?"discussions.expand":"discussions.collapse")]})]}),f.jsxs("div",{className:`rounded-xl p-3 text-sm ${Ce?"bg-accent/10 text-warm-700 ml-auto":We.status==="failed"?"bg-status-error/5 border border-status-error/20":"bg-warm-50 border border-warm-150"} ${_e?"cursor-pointer":""}`,onClick:_e?()=>{const fe=window.getSelection();fe&&fe.toString().length>0||R(We.id)}:void 0,children:[ue&&We.content&&f.jsx("div",{className:"text-xs text-warm-400 italic truncate",children:G(We.content)}),!ue&&We.content&&f.jsx(kH,{content:We.content}),He&&ge.length>0&&f.jsx("div",{className:"text-xs text-warm-500 whitespace-pre-wrap leading-relaxed max-h-60 overflow-y-auto font-mono",children:ge.slice(-50).join(`
541
+ `)}),He&&ge.length===0&&f.jsxs("div",{className:"flex items-center gap-2 text-xs text-status-success",children:[f.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-status-success animate-pulse"}),a("discussions.speaking")]}),We.status==="pending"&&!We.content&&f.jsx("div",{className:"text-xs text-warm-300 italic",children:a("discussions.waiting")})]})]}),Ce&&f.jsx("div",{className:"w-8 h-8 rounded-full bg-warm-300 flex items-center justify-center text-white text-xs font-bold flex-shrink-0",children:"U"})]},We.id)})]},he)}),f.jsx("div",{ref:F})]}),ie&&f.jsxs("div",{className:"border-t border-warm-200 pt-3 flex gap-2",children:[f.jsx("input",{type:"text",value:w,onChange:he=>S(he.target.value),onKeyDown:he=>{he.key==="Enter"&&!he.shiftKey&&(he.preventDefault(),B())},placeholder:a("discussions.userMessage"),className:"input flex-1 text-sm"}),f.jsx("button",{onClick:B,disabled:!w.trim(),className:"btn btn-primary btn-sm text-xs",children:a("discussions.inject")})]}),_&&f.jsx(ts,{open:!0,onClose:()=>E(!1),size:"xl",children:f.jsx("div",{className:"max-h-[90vh] overflow-y-auto",children:f.jsx(h7,{agents:xe?d:l.agents,initialValues:ye,mode:"edit",allowAdvancedFields:xe,submitting:T,onSubmit:Q,onCancel:()=>E(!1)})})}),j&&f.jsx(ts,{open:!0,onClose:()=>k(!1),size:"sm",children:f.jsxs("div",{className:"glass-card rounded-2xl p-6 shadow-elevated space-y-4",children:[f.jsx("h3",{className:"text-sm font-semibold text-warm-700",children:a("discussions.selectAgent")}),f.jsx("p",{className:"text-xs text-warm-400",children:a("discussions.implementHint")}),f.jsx("div",{className:"space-y-2",children:l.agents.map(he=>f.jsxs("button",{onClick:()=>X(he.id),className:"w-full flex items-center gap-3 p-3 rounded-lg border border-warm-200 hover:border-accent hover:bg-accent/5 transition-colors",children:[f.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold",style:{backgroundColor:he.avatar_color||"#6366f1"},children:he.name.charAt(0)}),f.jsxs("div",{className:"text-left",children:[f.jsx("div",{className:"text-sm font-medium text-warm-700",children:he.name}),f.jsx("div",{className:"text-xs text-warm-400",children:a(`agents.roles.${he.role}`)||he.role})]})]},he.id))}),f.jsx("button",{onClick:()=>k(!1),className:"btn btn-sm text-xs text-warm-500 w-full",children:a("header.cancel")})]})})]})}function hIe(){const{authenticated:e,authRequired:t,loading:n,login:r,logout:a}=TJ(),{connected:i,onEvent:s,sendMessage:l}=OJ(e),{t:c}=tt();return n?f.jsxs("div",{className:"flex h-screen overflow-hidden",style:{backgroundColor:"var(--color-bg-primary)"},children:[f.jsxs("div",{className:"hidden md:flex flex-col w-64 border-r border-theme-border p-4 space-y-6",children:[f.jsx(Ke,{className:"h-8 w-32 mb-4"}),f.jsxs("div",{className:"space-y-3",children:[f.jsx(Ke,{className:"h-4 w-full"}),f.jsx(Ke,{className:"h-4 w-5/6"}),f.jsx(Ke,{className:"h-4 w-4/6"})]}),f.jsxs("div",{className:"mt-auto space-y-3 pt-4 border-t border-theme-border",children:[f.jsx(Ke,{className:"h-4 w-1/2"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ke,{className:"h-8 w-8"}),f.jsx(Ke,{className:"h-8 w-8"}),f.jsx(Ke,{className:"h-8 w-8"})]})]})]}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[f.jsx("div",{className:"md:hidden h-14 border-b border-theme-border flex items-center px-4",children:f.jsx(Ke,{className:"h-6 w-32"})}),f.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:[f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Ke,{className:"h-8 w-48"}),f.jsx(Ke,{className:"h-4 w-32"})]}),f.jsx(Ke,{className:"h-10 w-24 rounded-xl"})]}),f.jsx(Ke,{className:"h-12 w-full rounded-xl"}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(6)].map((d,h)=>f.jsxs("div",{className:"card p-5 space-y-4",children:[f.jsx(Ke,{className:"h-5 w-2/3"}),f.jsx(Ke,{className:"h-3 w-full"}),f.jsxs("div",{className:"flex gap-2 pt-2",children:[f.jsx(Ke,{className:"h-6 w-16"}),f.jsx(Ke,{className:"h-6 w-16"})]})]},h))})]})]})]}):e?f.jsx(gJ,{children:f.jsx(one,{onLogout:a,authRequired:t,connected:i,onEvent:s,children:f.jsxs(GQ,{children:[f.jsx(up,{path:"/",element:f.jsx(une,{onEvent:s})}),f.jsx(up,{path:"/projects/:id",element:f.jsx(uIe,{onEvent:s,connected:i,sendMessage:l})}),f.jsx(up,{path:"/projects/:id/discussions/:discussionId",element:f.jsx(fIe,{onEvent:s,connected:i})})]})})}):f.jsx(Rte,{onLogin:r})}function mIe(e){return mt(`/api/jira/${e}/test`)}function pIe(e,t){const n=new URLSearchParams;t!=null&&t.status&&n.set("status",t.status),t!=null&&t.search&&n.set("search",t.search),n.set("maxResults",String(t.maxResults)),t!=null&&t.startAt&&n.set("startAt",String(t.startAt));const r=n.toString();return mt(`/api/jira/${e}/issues${r?`?${r}`:""}`)}function wF(e,t){return mt(`/api/jira/${e}/issue/${t}/transitions`)}function gIe(e,t,n){return qe(`/api/jira/${e}/issue/${t}/transition`,{transitionId:n})}function vIe(e,t,n){return qe(`/api/jira/${e}/issue/${t}/comment`,{body:n})}function yIe(e,t){return qe(`/api/jira/${e}/issues`,t)}function xIe(e,t){return qe(`/api/jira/${e}/import/${t}`)}function bIe(e){return mt(`/api/jira/${e}/statuses`)}function wIe({project:e,onImportAsTask:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(0),[d,h]=x.useState(0),[m,g]=x.useState(""),[v,b]=x.useState("all"),[w,S]=x.useState([]),[j,k]=x.useState(null),[_,E]=x.useState(null),[T,A]=x.useState(null),[O,D]=x.useState(!1),P=e.jira_enabled&&e.jira_base_url&&e.jira_email&&e.jira_api_token,M=x.useCallback(async(F=!1)=>{if(P){s(!0);try{const R=F?0:d,I=await pIe(e.id,{status:v!=="all"?v:void 0,search:m||void 0,maxResults:20,startAt:R});F?(a(I.issues),h(I.issues.length)):(a(q=>[...q,...I.issues]),h(R+I.issues.length)),c(I.total)}catch{}finally{s(!1)}}},[e.id,P,v,m,d]);x.useEffect(()=>{M(!0)},[e.id,P,v]),x.useEffect(()=>{P&&bIe(e.id).then(S).catch(()=>{})},[e.id,P]);const z=()=>{M(!0)},L=async F=>{k(F);try{const R=await xIe(e.id,F);t(R.title,R.description),E(F),setTimeout(()=>E(null),2e3)}catch{}finally{k(null)}};return P?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("jira.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>D(!O),className:"btn-primary text-xs",children:n("jira.createIssue")}),f.jsx("button",{onClick:()=>M(!0),disabled:i,className:"btn-ghost text-xs",children:n("jira.refresh")})]})]}),O&&f.jsx(_Ie,{projectId:e.id,onCreated:()=>{D(!1),M(!0)},onCancel:()=>D(!1)}),f.jsxs("div",{className:"flex gap-2 mb-4",children:[f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:F=>g(F.target.value),onKeyDown:F=>F.key==="Enter"&&z(),placeholder:n("jira.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(qg,{size:14})})]}),f.jsxs("select",{value:v,onChange:F=>b(F.target.value),className:"input-field text-xs w-36",children:[f.jsx("option",{value:"all",children:n("jira.allStatuses")}),w.map(F=>f.jsx("option",{value:F,children:F},F))]})]}),l>0&&f.jsxs("p",{className:"text-xs text-warm-400 mb-3",children:[l," ",n("jira.total")]}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("jira.noIssues")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("jira.noIssuesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(F=>f.jsx(SIe,{issue:F,projectId:e.id,expanded:T===F.key,onToggle:()=>A(T===F.key?null:F.key),importing:j===F.key,imported:_===F.key,onImport:()=>L(F.key)},F.key))}),r.length<l&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:()=>M(!1),disabled:i,className:"btn-ghost text-xs",children:i?"...":n("jira.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(ef,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("jira.notConfigured")})]})}function SIe({issue:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){var d,h;const{t:l}=tt(),c=kIe((d=e.fields.status.statusCategory)==null?void 0:d.colorName);return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[e.fields.issuetype.iconUrl&&f.jsx("img",{src:e.fields.issuetype.iconUrl,alt:e.fields.issuetype.name,className:"w-4 h-4 mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:r,className:"text-xs font-mono text-blue-600 hover:text-blue-800 font-medium flex-shrink-0",children:e.key}),f.jsx("span",{className:"text-xs text-warm-700 truncate",children:e.fields.summary})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium ${c}`,children:e.fields.status.name}),e.fields.priority&&f.jsxs("span",{className:"text-2xs text-warm-400 flex items-center gap-1",children:[e.fields.priority.iconUrl&&f.jsx("img",{src:e.fields.priority.iconUrl,alt:"",className:"w-3 h-3"}),e.fields.priority.name]}),f.jsx("span",{className:"text-2xs text-warm-300",children:((h=e.fields.assignee)==null?void 0:h.displayName)||l("jira.unassigned")}),e.fields.labels.length>0&&f.jsx("span",{className:"text-2xs text-warm-300",children:e.fields.labels.join(", ")}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:new Date(e.fields.updated).toLocaleDateString()})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("jira.import"),children:l(a?"jira.importing":i?"jira.imported":"jira.import")})]}),n&&f.jsx(jIe,{issueKey:e.key,projectId:t})]})}function jIe({issueKey:e,projectId:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(""),[d,h]=x.useState(!1);x.useEffect(()=>{wF(t,e).then(v=>a(v.transitions)).catch(()=>{})},[t,e]);const m=async v=>{s(!0);try{await gIe(t,e,v);const b=await wF(t,e);a(b.transitions)}catch{}finally{s(!1)}},g=async()=>{if(l.trim()){h(!0);try{await vIe(t,e,l),c("")}catch{}finally{h(!1)}}};return f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-3 animate-slide-up",children:[r.length>0&&f.jsxs("div",{children:[f.jsx("p",{className:"text-2xs font-medium text-warm-500 mb-1.5",children:n("jira.transition")}),f.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(v=>f.jsx("button",{onClick:()=>m(v.id),disabled:i,className:"text-2xs px-2 py-1 rounded-md bg-warm-50 text-warm-600 hover:bg-warm-100 transition-colors font-medium",children:v.name},v.id))})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-2xs font-medium text-warm-500 mb-1.5",children:n("jira.comment")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",value:l,onChange:v=>c(v.target.value),onKeyDown:v=>v.key==="Enter"&&g(),placeholder:n("jira.commentPlaceholder"),className:"input-field text-xs flex-1"}),f.jsx("button",{onClick:g,disabled:d||!l.trim(),className:"btn-primary text-xs",children:d?"...":n("jira.commentSend")})]})]})]})}function _Ie({projectId:e,onCreated:t,onCancel:n}){const{t:r}=tt(),[a,i]=x.useState(""),[s,l]=x.useState(""),[c,d]=x.useState("Task"),[h,m]=x.useState(!1),g=async()=>{if(a.trim()){m(!0);try{await yIe(e,{summary:a,description:s||void 0,issueType:c}),t()}catch{}finally{m(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createSummary")}),f.jsx("input",{type:"text",value:a,onChange:v=>i(v.target.value),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createDesc")}),f.jsx("textarea",{value:s,onChange:v=>l(v.target.value),className:"input-field text-xs",rows:3})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("jira.createType")}),f.jsxs("select",{value:c,onChange:v=>d(v.target.value),className:"input-field text-xs w-40",children:[f.jsx("option",{value:"Task",children:"Task"}),f.jsx("option",{value:"Bug",children:"Bug"}),f.jsx("option",{value:"Story",children:"Story"}),f.jsx("option",{value:"Epic",children:"Epic"})]})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:g,disabled:h||!a.trim(),className:"btn-primary text-xs",children:r(h?"jira.creating":"jira.createIssue")})]})]})})}function kIe(e){switch(e){case"blue-gray":case"default":return"bg-warm-100 text-warm-600";case"blue":return"bg-blue-100 text-blue-700";case"green":return"bg-status-success/10 text-status-success";case"yellow":return"bg-amber-100 text-amber-700";default:return"bg-warm-100 text-warm-600"}}function CIe({project:e,config:t,onConfigChange:n}){const{t:r}=tt(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await mIe(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.jiraTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.jiraDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.jiraGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideStep1")}),f.jsx("li",{children:r("header.jiraGuideStep2")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideSetup1")}),f.jsx("li",{children:r("header.jiraGuideSetup2")}),f.jsx("li",{children:r("header.jiraGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.jiraGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.jiraGuideUsage1")}),f.jsx("li",{children:r("header.jiraGuideUsage2")}),f.jsx("li",{children:r("header.jiraGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraBaseUrl")}),f.jsx("input",{type:"text",value:t.base_url??"",onChange:g=>n({base_url:g.target.value||null}),placeholder:r("header.jiraBaseUrlPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraProjectKey")}),f.jsx("input",{type:"text",value:t.project_key??"",onChange:g=>n({project_key:g.target.value||null}),placeholder:r("header.jiraProjectKeyPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraEmail")}),f.jsx("input",{type:"text",value:t.email??"",onChange:g=>n({email:g.target.value||null}),placeholder:r("header.jiraEmailPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.jiraApiToken")}),f.jsx("input",{type:"password",value:t.api_token??"",onChange:g=>n({api_token:g.target.value||null}),placeholder:r("header.jiraApiTokenPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.jiraTesting":"header.jiraTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.jiraConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.jiraFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.jiraTokenHint")})]})]})}const NIe={id:"jira",displayName:"Jira",displayNameKo:"Jira",PanelComponent:wIe,SettingsComponent:CIe,hasTab:!0,isEnabled:e=>!!e.jira_enabled,translations:{en:{"tabs.jira":"Jira","jira.title":"Jira Issues","jira.search":"Search issues...","jira.allStatuses":"All Statuses","jira.refresh":"Refresh","jira.import":"Import as Task","jira.importing":"Importing...","jira.imported":"Imported!","jira.noIssues":"No issues found","jira.noIssuesHint":"Try changing the filter or search query.","jira.loadMore":"Load More","jira.total":"total","jira.transition":"Change Status","jira.comment":"Comment","jira.commentPlaceholder":"Add a comment...","jira.commentSend":"Send","jira.createIssue":"Create Issue","jira.createSummary":"Summary","jira.createDesc":"Description","jira.createType":"Issue Type","jira.creating":"Creating...","jira.notConfigured":"Jira is not configured. Enable it in project settings.","jira.assignee":"Assignee","jira.unassigned":"Unassigned","jira.updated":"Updated","header.jiraTitle":"Jira Integration","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://your-domain.atlassian.net","header.jiraProjectKey":"Project Key","header.jiraProjectKeyPlaceholder":"e.g. PROJ","header.jiraEmail":"Email","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API Token","header.jiraApiTokenPlaceholder":"Jira API token","header.jiraTestConnection":"Test Connection","header.jiraTesting":"Testing...","header.jiraConnected":"Connected!","header.jiraFailed":"Connection failed","header.jiraTokenHint":"Create a token at id.atlassian.com/manage-profile/security/api-tokens","header.jiraDesc":"Browse Jira issues and import them as AI tasks.","header.jiraGuideToggle":"Setup Guide","header.jiraGuidePrep":"Prerequisites","header.jiraGuideStep1":"Go to id.atlassian.com/manage-profile/security/api-tokens and create an API token","header.jiraGuideStep2":"Note your Jira URL (e.g. https://your-domain.atlassian.net) and project key (e.g. PROJ)","header.jiraGuideSetup":"Configuration","header.jiraGuideSetup1":"Enter Jira URL, project key, email, and API token above","header.jiraGuideSetup2":'Click "Test Connection" to verify',"header.jiraGuideSetup3":"Save settings","header.jiraGuideUsage":"Usage","header.jiraGuideUsage1":"Open the Jira tab in the project detail page","header.jiraGuideUsage2":"Browse, search, or filter issues by status","header.jiraGuideUsage3":'Click "Import as Task" to create an AI task from a Jira issue'},ko:{"tabs.jira":"Jira","jira.title":"Jira 이슈","jira.search":"이슈 검색...","jira.allStatuses":"모든 상태","jira.refresh":"새로고침","jira.import":"작업으로 가져오기","jira.importing":"가져오는 중...","jira.imported":"가져옴!","jira.noIssues":"이슈가 없습니다","jira.noIssuesHint":"필터나 검색어를 변경해보세요.","jira.loadMore":"더 보기","jira.total":"건","jira.transition":"상태 변경","jira.comment":"댓글","jira.commentPlaceholder":"댓글 입력...","jira.commentSend":"전송","jira.createIssue":"이슈 생성","jira.createSummary":"제목","jira.createDesc":"설명","jira.createType":"이슈 유형","jira.creating":"생성 중...","jira.notConfigured":"Jira가 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","jira.assignee":"담당자","jira.unassigned":"미배정","jira.updated":"업데이트","header.jiraTitle":"Jira 연동","header.jiraBaseUrl":"Jira URL","header.jiraBaseUrlPlaceholder":"https://your-domain.atlassian.net","header.jiraProjectKey":"프로젝트 키","header.jiraProjectKeyPlaceholder":"예: PROJ","header.jiraEmail":"이메일","header.jiraEmailPlaceholder":"your@email.com","header.jiraApiToken":"API 토큰","header.jiraApiTokenPlaceholder":"Jira API 토큰","header.jiraTestConnection":"연결 테스트","header.jiraTesting":"테스트 중...","header.jiraConnected":"연결 성공!","header.jiraFailed":"연결 실패","header.jiraTokenHint":"id.atlassian.com/manage-profile/security/api-tokens에서 토큰을 생성하세요","header.jiraDesc":"Jira 이슈를 조회하고 AI 태스크로 가져옵니다.","header.jiraGuideToggle":"설정 가이드","header.jiraGuidePrep":"사전 준비","header.jiraGuideStep1":"id.atlassian.com/manage-profile/security/api-tokens에서 API 토큰 생성","header.jiraGuideStep2":"Jira URL (예: https://your-domain.atlassian.net)과 프로젝트 키 (예: PROJ) 확인","header.jiraGuideSetup":"설정 방법","header.jiraGuideSetup1":"위 입력란에 Jira URL, 프로젝트 키, 이메일, API 토큰 입력","header.jiraGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.jiraGuideSetup3":"설정 저장","header.jiraGuideUsage":"사용법","header.jiraGuideUsage1":"프로젝트 상세 페이지에서 Jira 탭 진입","header.jiraGuideUsage2":"이슈 검색, 상태 필터링","header.jiraGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function EIe(e){return mt(`/api/github/${e}/test`)}function AIe(e,t){const n=new URLSearchParams;t!=null&&t.state&&n.set("state",t.state),t!=null&&t.page&&n.set("page",String(t.page)),n.set("per_page",String(t.per_page)),t!=null&&t.labels&&n.set("labels",t.labels),t!=null&&t.search&&n.set("search",t.search);const r=n.toString();return mt(`/api/github/${e}/issues${r?`?${r}`:""}`)}function TIe(e,t){return mt(`/api/github/${e}/issue/${t}/comments`)}function OIe(e,t){return qe(`/api/github/${e}/issues`,t)}function MIe(e,t){return qe(`/api/github/${e}/import/${t}`)}function PIe({project:e,onImportAsTask:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(1),[d,h]=x.useState(!1),[m,g]=x.useState(""),[v,b]=x.useState("open"),[w,S]=x.useState(null),[j,k]=x.useState(null),[_,E]=x.useState(null),[T,A]=x.useState(!1),O=e.github_enabled&&e.github_token&&e.github_owner&&e.github_repo,D=x.useCallback(async(L=!1)=>{if(O){s(!0);try{const F=L?1:l,R=await AIe(e.id,{state:v,page:F,per_page:20,search:m||void 0});L?(a(R.items),c(1)):a(I=>[...I,...R.items]),h(R.items.length>=20)}catch{}finally{s(!1)}}},[e.id,O,m,v,l]);x.useEffect(()=>{D(!0)},[e.id,O,v]);const P=()=>{D(!0)},M=()=>{c(L=>L+1),setTimeout(()=>D(!1),0)},z=async L=>{S(L);try{const F=await MIe(e.id,L);t(F.title,F.description),k(L),setTimeout(()=>k(null),2e3)}catch{}finally{S(null)}};return O?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("github.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>A(!T),className:"btn-primary text-xs",children:n("github.createIssue")}),f.jsx("button",{onClick:()=>D(!0),disabled:i,className:"btn-ghost text-xs",children:n("github.refresh")})]})]}),T&&f.jsx(IIe,{projectId:e.id,onCreated:()=>{A(!1),D(!0)},onCancel:()=>A(!1)}),f.jsxs("div",{className:"flex gap-2 mb-4",children:[f.jsxs("select",{value:v,onChange:L=>b(L.target.value),className:"input-field text-xs w-24",children:[f.jsx("option",{value:"open",children:n("github.open")}),f.jsx("option",{value:"closed",children:n("github.closed")}),f.jsx("option",{value:"all",children:n("github.all")})]}),f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:L=>g(L.target.value),onKeyDown:L=>L.key==="Enter"&&P(),placeholder:n("github.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:P,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(qg,{size:14})})]})]}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("github.noIssues")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("github.noIssuesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(L=>f.jsx(DIe,{issue:L,projectId:e.id,expanded:_===L.number,onToggle:()=>E(_===L.number?null:L.number),importing:w===L.number,imported:j===L.number,onImport:()=>z(L.number)},L.number))}),d&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:M,disabled:i,className:"btn-ghost text-xs",children:i?"...":n("github.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(qee,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("github.notConfigured")})]})}function DIe({issue:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){const{t:l}=tt(),c=new Date(e.updated_at).toLocaleDateString();return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:`mt-0.5 flex-shrink-0 ${e.state==="open"?"text-status-success":"text-purple-500"}`,children:e.state==="open"?f.jsx(xee,{size:16}):f.jsx(UF,{size:16})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"flex items-center gap-2",children:f.jsxs("button",{onClick:r,className:"text-xs font-medium text-blue-600 hover:text-blue-800 truncate text-left",children:["#",e.number," ",e.title]})}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[e.labels.map(d=>f.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium",style:{backgroundColor:`#${d.color}20`,color:`#${d.color}`},children:d.name},d.name)),e.user&&f.jsx("span",{className:"text-2xs text-warm-400",children:e.user.login}),e.comments>0&&f.jsxs("span",{className:"text-2xs text-warm-400",children:[e.comments," comments"]}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:c})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("github.import"),children:l(a?"github.importing":i?"github.imported":"github.import")})]}),n&&f.jsx(RIe,{issueNumber:e.number,projectId:t,body:e.body})]})}function RIe({issueNumber:e,projectId:t,body:n}){const{t:r}=tt(),[a,i]=x.useState([]),[s,l]=x.useState(!0);return x.useEffect(()=>{l(!0),TIe(t,e).then(c=>i(c||[])).catch(()=>{}).finally(()=>l(!1))},[t,e]),f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-2 animate-slide-up max-h-64 overflow-y-auto",children:[n?f.jsx("div",{className:"text-xs text-warm-500 whitespace-pre-wrap break-words",children:n}):f.jsx("p",{className:"text-xs text-warm-400 italic",children:r("github.noBody")}),s?f.jsx("p",{className:"text-xs text-warm-400",children:r("github.loadingComments")}):a.length>0?f.jsxs("div",{className:"space-y-2 mt-2",children:[f.jsx("p",{className:"text-2xs font-semibold text-warm-500 uppercase",children:r("github.comments")}),a.map(c=>{var d;return f.jsxs("div",{className:"pl-3 border-l-2 border-warm-100",children:[f.jsx("p",{className:"text-2xs text-warm-400 font-medium",children:(d=c.user)==null?void 0:d.login}),f.jsx("p",{className:"text-xs text-warm-500 whitespace-pre-wrap break-words",children:c.body})]},c.id)})]}):null]})}function IIe({projectId:e,onCreated:t,onCancel:n}){const{t:r}=tt(),[a,i]=x.useState(""),[s,l]=x.useState(""),[c,d]=x.useState(!1),h=async()=>{if(a.trim()){d(!0);try{await OIe(e,{title:a,body:s||void 0}),t()}catch{}finally{d(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("github.issueTitle")}),f.jsx("input",{type:"text",value:a,onChange:m=>i(m.target.value),onKeyDown:m=>m.key==="Enter"&&h(),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("github.issueBody")}),f.jsx("textarea",{value:s,onChange:m=>l(m.target.value),className:"input-field text-xs",rows:3})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:h,disabled:c||!a.trim(),className:"btn-primary text-xs",children:r(c?"github.creating":"github.createIssue")})]})]})})}function LIe({project:e,config:t,onConfigChange:n}){const{t:r}=tt(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await EIe(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.githubTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.githubDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.githubGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideStep1")}),f.jsx("li",{children:r("header.githubGuideStep2")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideSetup1")}),f.jsx("li",{children:r("header.githubGuideSetup2")}),f.jsx("li",{children:r("header.githubGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.githubGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.githubGuideUsage1")}),f.jsx("li",{children:r("header.githubGuideUsage2")}),f.jsx("li",{children:r("header.githubGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubToken")}),f.jsx("input",{type:"password",value:t.token??"",onChange:g=>n({token:g.target.value||null}),placeholder:r("header.githubTokenPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubOwner")}),f.jsx("input",{type:"text",value:t.owner??"",onChange:g=>n({owner:g.target.value||null}),placeholder:r("header.githubOwnerPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.githubRepo")}),f.jsx("input",{type:"text",value:t.repo??"",onChange:g=>n({repo:g.target.value||null}),placeholder:r("header.githubRepoPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.githubTesting":"header.githubTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.githubConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.githubFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.githubTokenHint")})]})]})}const zIe={id:"github",displayName:"GitHub",displayNameKo:"GitHub",PanelComponent:PIe,SettingsComponent:LIe,hasTab:!0,isEnabled:e=>!!e.github_enabled,translations:{en:{"tabs.github":"GitHub","github.title":"GitHub Issues","github.search":"Search issues...","github.refresh":"Refresh","github.import":"Import as Task","github.importing":"Importing...","github.imported":"Imported!","github.noIssues":"No issues found","github.noIssuesHint":"Try changing the filter or search query.","github.loadMore":"Load More","github.createIssue":"Create Issue","github.issueTitle":"Title","github.issueBody":"Description","github.creating":"Creating...","github.notConfigured":"GitHub is not configured. Enable it in project settings.","github.loadingComments":"Loading comments...","github.comments":"Comments","github.noBody":"No description provided.","github.open":"Open","github.closed":"Closed","github.all":"All","header.githubTitle":"GitHub Integration","header.githubToken":"Personal Access Token","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"Owner","header.githubOwnerPlaceholder":"e.g. octocat","header.githubRepo":"Repository","header.githubRepoPlaceholder":"e.g. my-repo","header.githubTestConnection":"Test Connection","header.githubTesting":"Testing...","header.githubConnected":"Connected!","header.githubFailed":"Connection failed","header.githubTokenHint":"Create a token at github.com/settings/tokens with repo scope","header.githubDesc":"Browse GitHub issues and import them as AI tasks.","header.githubGuideToggle":"Setup Guide","header.githubGuidePrep":"Prerequisites","header.githubGuideStep1":'Go to github.com/settings/tokens and create a Personal Access Token with "repo" scope',"header.githubGuideStep2":"Note the repository owner (e.g. octocat) and name (e.g. my-repo)","header.githubGuideSetup":"Configuration","header.githubGuideSetup1":"Enter the token, owner, and repository name above","header.githubGuideSetup2":'Click "Test Connection" to verify',"header.githubGuideSetup3":"Save settings","header.githubGuideUsage":"Usage","header.githubGuideUsage1":"Open the GitHub tab in the project detail page","header.githubGuideUsage2":"Browse issues, filter by state (open/closed), or search","header.githubGuideUsage3":'Click "Import as Task" to create an AI task from an issue'},ko:{"tabs.github":"GitHub","github.title":"GitHub 이슈","github.search":"이슈 검색...","github.refresh":"새로고침","github.import":"작업으로 가져오기","github.importing":"가져오는 중...","github.imported":"가져옴!","github.noIssues":"이슈가 없습니다","github.noIssuesHint":"필터나 검색어를 변경해보세요.","github.loadMore":"더 보기","github.createIssue":"이슈 생성","github.issueTitle":"제목","github.issueBody":"설명","github.creating":"생성 중...","github.notConfigured":"GitHub이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","github.loadingComments":"댓글 로딩 중...","github.comments":"댓글","github.noBody":"설명이 없습니다.","github.open":"열림","github.closed":"닫힘","github.all":"전체","header.githubTitle":"GitHub 연동","header.githubToken":"개인 액세스 토큰","header.githubTokenPlaceholder":"ghp_...","header.githubOwner":"소유자","header.githubOwnerPlaceholder":"예: octocat","header.githubRepo":"저장소","header.githubRepoPlaceholder":"예: my-repo","header.githubTestConnection":"연결 테스트","header.githubTesting":"테스트 중...","header.githubConnected":"연결 성공!","header.githubFailed":"연결 실패","header.githubTokenHint":"github.com/settings/tokens에서 repo 권한으로 토큰을 생성하세요","header.githubDesc":"GitHub 이슈를 조회하고 AI 태스크로 가져옵니다.","header.githubGuideToggle":"설정 가이드","header.githubGuidePrep":"사전 준비","header.githubGuideStep1":'github.com/settings/tokens에서 "repo" 권한의 Personal Access Token 생성',"header.githubGuideStep2":"레포지토리 소유자 (예: octocat)와 이름 (예: my-repo) 확인","header.githubGuideSetup":"설정 방법","header.githubGuideSetup1":"위 입력란에 토큰, 소유자, 저장소 이름 입력","header.githubGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.githubGuideSetup3":"설정 저장","header.githubGuideUsage":"사용법","header.githubGuideUsage1":"프로젝트 상세 페이지에서 GitHub 탭 진입","header.githubGuideUsage2":"이슈 검색, open/closed 필터링","header.githubGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function $Ie(e){return mt(`/api/notion/${e}/test`)}function qIe(e,t){return qe(`/api/notion/${e}/pages`,t||{})}function BIe(e,t){return mt(`/api/notion/${e}/page/${t}/blocks`)}function FIe(e,t){return qe(`/api/notion/${e}/create`,t)}function HIe(e,t){return qe(`/api/notion/${e}/import/${t}`)}function UIe({project:e,onImportAsTask:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!1),[l,c]=x.useState(!1),[d,h]=x.useState(null),[m,g]=x.useState(""),[v,b]=x.useState(null),[w,S]=x.useState(null),[j,k]=x.useState(null),[_,E]=x.useState(!1),T=e.notion_enabled&&e.notion_api_key&&e.notion_database_id,A=x.useCallback(async(P=!1)=>{if(T){s(!0);try{const M=await qIe(e.id,{startCursor:P?void 0:d||void 0,search:m||void 0});a(P?M.results:z=>[...z,...M.results]),c(M.has_more),h(M.next_cursor)}catch{}finally{s(!1)}}},[e.id,T,m,d]);x.useEffect(()=>{A(!0)},[e.id,T]);const O=()=>{A(!0)},D=async P=>{b(P);try{const M=await HIe(e.id,P);t(M.title,M.description),S(P),setTimeout(()=>S(null),2e3)}catch{}finally{b(null)}};return T?f.jsxs("div",{className:"animate-fade-in",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"text-sm font-semibold text-warm-700",children:n("notion.title")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:()=>E(!_),className:"btn-primary text-xs",children:n("notion.createPage")}),f.jsx("button",{onClick:()=>A(!0),disabled:i,className:"btn-ghost text-xs",children:n("notion.refresh")})]})]}),_&&f.jsx(YIe,{projectId:e.id,onCreated:()=>{E(!1),A(!0)},onCancel:()=>E(!1)}),f.jsx("div",{className:"flex gap-2 mb-4",children:f.jsxs("div",{className:"flex-1 relative",children:[f.jsx("input",{type:"text",value:m,onChange:P=>g(P.target.value),onKeyDown:P=>P.key==="Enter"&&O(),placeholder:n("notion.search"),className:"input-field text-xs pr-8"}),f.jsx("button",{onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-warm-400 hover:text-warm-600",children:f.jsx(qg,{size:14})})]})}),r.length===0&&i&&f.jsx("div",{className:"space-y-2",children:[...Array(5)].map((P,M)=>f.jsxs("div",{className:"card p-3 space-y-2",children:[f.jsx(Ke,{className:"h-4 w-1/3"}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx(Ke,{className:"h-3 w-1/4"}),f.jsx(Ke,{className:"h-3 w-16"})]})]},M))}),r.length===0&&!i&&f.jsxs("div",{className:"card p-10 text-center",children:[f.jsx("p",{className:"text-warm-400 text-sm",children:n("notion.noPages")}),f.jsx("p",{className:"text-warm-300 text-xs mt-1",children:n("notion.noPagesHint")})]}),f.jsx("div",{className:"space-y-2",children:r.map(P=>f.jsx(GIe,{page:P,projectId:e.id,expanded:j===P.id,onToggle:()=>k(j===P.id?null:P.id),importing:v===P.id,imported:w===P.id,onImport:()=>D(P.id)},P.id))}),l&&f.jsx("div",{className:"mt-4 text-center",children:f.jsx("button",{onClick:()=>A(!1),disabled:i,className:"btn-ghost text-xs",children:i?"...":n("notion.loadMore")})})]}):f.jsxs("div",{className:"card p-16 text-center animate-fade-in",children:[f.jsx("div",{className:"text-warm-300 mb-3",children:f.jsx(Cp,{size:48,className:"mx-auto",strokeWidth:1})}),f.jsx("p",{className:"text-warm-400 text-sm",children:n("notion.notConfigured")})]})}function GIe({page:e,projectId:t,expanded:n,onToggle:r,importing:a,imported:i,onImport:s}){const{t:l}=tt(),c=WIe(e),d=XIe(e),h=new Date(e.last_edited_time).toLocaleDateString();return f.jsxs("div",{className:"card p-3 hover:shadow-md transition-shadow",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:"mt-0.5 flex-shrink-0 text-warm-400",children:f.jsx(Cp,{size:16})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:"flex items-center gap-2",children:f.jsx("button",{onClick:r,className:"text-xs font-medium text-blue-600 hover:text-blue-800 truncate text-left",children:c||"Untitled"})}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1.5",children:[d&&f.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-2xs font-medium ${ZIe(d)}`,children:d}),f.jsx("span",{className:"text-2xs text-warm-300 ml-auto",children:h})]})]}),f.jsx("button",{onClick:s,disabled:a||i,className:`flex-shrink-0 text-xs px-2 py-1 rounded-lg font-medium transition-colors ${i?"bg-status-success/10 text-status-success":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,title:l("notion.import"),children:l(a?"notion.importing":i?"notion.imported":"notion.import")})]}),n&&f.jsx(VIe,{pageId:e.id,projectId:t})]})}function VIe({pageId:e,projectId:t}){const{t:n}=tt(),[r,a]=x.useState([]),[i,s]=x.useState(!0);return x.useEffect(()=>{s(!0),BIe(t,e).then(l=>a(l.results||[])).catch(()=>{}).finally(()=>s(!1))},[t,e]),i?f.jsxs("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-2 animate-slide-up",children:[f.jsx(Ke,{className:"h-3 w-3/4"}),f.jsx(Ke,{className:"h-3 w-1/2"}),f.jsx(Ke,{className:"h-3 w-2/3"})]}):r.length===0?f.jsx("div",{className:"mt-3 pt-3 border-t border-warm-100 animate-slide-up",children:f.jsx("p",{className:"text-xs text-warm-400",children:n("notion.noContent")})}):f.jsx("div",{className:"mt-3 pt-3 border-t border-warm-100 space-y-1 animate-slide-up max-h-64 overflow-y-auto",children:r.map(l=>f.jsx(KIe,{block:l},l.id))})}function KIe({block:e}){const t=e.type;if(!t||!e[t])return null;const n=e[t],r=n.rich_text?n.rich_text.map(a=>a.plain_text||"").join(""):"";if(!r&&t!=="divider")return null;switch(t){case"heading_1":return f.jsx("p",{className:"text-xs font-bold text-warm-700",children:r});case"heading_2":return f.jsx("p",{className:"text-xs font-semibold text-warm-600",children:r});case"heading_3":return f.jsx("p",{className:"text-xs font-medium text-warm-600",children:r});case"bulleted_list_item":return f.jsxs("p",{className:"text-xs text-warm-500 pl-3",children:["• ",r]});case"numbered_list_item":return f.jsx("p",{className:"text-xs text-warm-500 pl-3",children:r});case"to_do":return f.jsxs("p",{className:"text-xs text-warm-500 pl-3",children:[n.checked?"☑":"☐"," ",r]});case"code":return f.jsx("pre",{className:"text-2xs bg-warm-50 p-2 rounded text-warm-600 overflow-x-auto",children:r});case"divider":return f.jsx("hr",{className:"border-warm-100"});default:return f.jsx("p",{className:"text-xs text-warm-500",children:r})}}function YIe({projectId:e,onCreated:t,onCancel:n}){const{t:r}=tt(),[a,i]=x.useState(""),[s,l]=x.useState(!1),c=async()=>{if(a.trim()){l(!0);try{await FIe(e,{title:a}),t()}catch{}finally{l(!1)}}};return f.jsx("div",{className:"card p-4 mb-4 animate-slide-up",children:f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-xs font-medium text-warm-500 mb-1",children:r("notion.pageTitle")}),f.jsx("input",{type:"text",value:a,onChange:d=>i(d.target.value),onKeyDown:d=>d.key==="Enter"&&c(),className:"input-field text-xs",autoFocus:!0})]}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsx("button",{onClick:n,className:"btn-ghost text-xs",children:r("header.cancel")}),f.jsx("button",{onClick:c,disabled:s||!a.trim(),className:"btn-primary text-xs",children:r(s?"notion.creating":"notion.createPage")})]})]})})}function WIe(e){var t;if(!e.properties)return"Untitled";for(const n of Object.values(e.properties))if(n.type==="title"&&((t=n.title)==null?void 0:t.length)>0)return n.title.map(r=>r.plain_text||"").join("");return"Untitled"}function XIe(e){if(!e.properties)return null;for(const t of Object.values(e.properties)){if(t.type==="status"&&t.status)return t.status.name;if(t.type==="select"&&t.select)return t.select.name}return null}function ZIe(e){const t=e.toLowerCase();return t.includes("done")||t.includes("complete")||t.includes("완료")?"bg-status-success/10 text-status-success":t.includes("progress")||t.includes("진행")||t.includes("doing")?"bg-blue-100 text-blue-700":(t.includes("todo")||t.includes("not started")||t.includes("대기"),"bg-warm-100 text-warm-600")}function QIe({project:e,config:t,onConfigChange:n}){const{t:r}=tt(),[a,i]=x.useState(!1),[s,l]=x.useState(null),[c,d]=x.useState(!1),h=t.enabled==="1"||t.enabled===!0,m=async()=>{i(!0),l(null);try{const g=await $Ie(e.id);l(g.ok?"ok":"fail")}catch{l("fail")}finally{i(!1)}};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.notionTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:h,onChange:g=>n({enabled:g.target.checked?"1":"0"}),className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.notionDesc")}),h&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>d(!c),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${c?"rotate-90":""}`,children:"▶"}),r("header.notionGuideToggle")]}),c&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuidePrep")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideStep1")}),f.jsx("li",{children:r("header.notionGuideStep2")}),f.jsx("li",{children:r("header.notionGuideStep3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuideSetup")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideSetup1")}),f.jsx("li",{children:r("header.notionGuideSetup2")}),f.jsx("li",{children:r("header.notionGuideSetup3")})]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.notionGuideUsage")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.notionGuideUsage1")}),f.jsx("li",{children:r("header.notionGuideUsage2")}),f.jsx("li",{children:r("header.notionGuideUsage3")})]})]})]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.notionApiKey")}),f.jsx("input",{type:"password",value:t.api_key??"",onChange:g=>n({api_key:g.target.value||null}),placeholder:r("header.notionApiKeyPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-warm-500 block mb-1",children:r("header.notionDatabaseId")}),f.jsx("input",{type:"text",value:t.database_id??"",onChange:g=>n({database_id:g.target.value||null}),placeholder:r("header.notionDatabaseIdPlaceholder"),className:"w-full px-3 py-1.5 text-xs border border-warm-200 rounded-lg bg-warm-50 text-warm-700 focus:ring-1 focus:ring-accent focus:border-accent"})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("button",{onClick:m,disabled:a,className:"px-3 py-1 text-xs rounded-lg bg-warm-100 text-warm-600 hover:bg-warm-200 disabled:opacity-50 transition-colors",children:r(a?"header.notionTesting":"header.notionTestConnection")}),s==="ok"&&f.jsx("span",{className:"text-xs text-status-success font-medium",children:r("header.notionConnected")}),s==="fail"&&f.jsx("span",{className:"text-xs text-status-error font-medium",children:r("header.notionFailed")})]}),f.jsx("p",{className:"text-xs text-warm-300",children:r("header.notionTokenHint")})]})]})}const JIe={id:"notion",displayName:"Notion",displayNameKo:"Notion",PanelComponent:UIe,SettingsComponent:QIe,hasTab:!0,isEnabled:e=>!!e.notion_enabled,translations:{en:{"tabs.notion":"Notion","notion.title":"Notion Pages","notion.search":"Search pages...","notion.refresh":"Refresh","notion.import":"Import as Task","notion.importing":"Importing...","notion.imported":"Imported!","notion.noPages":"No pages found","notion.noPagesHint":"Try changing the search query.","notion.loadMore":"Load More","notion.createPage":"Create Page","notion.pageTitle":"Title","notion.creating":"Creating...","notion.notConfigured":"Notion is not configured. Enable it in project settings.","notion.loadingContent":"Loading content...","notion.noContent":"No content","header.notionTitle":"Notion Integration","header.notionApiKey":"Integration Token","header.notionApiKeyPlaceholder":"secret_...","header.notionDatabaseId":"Database ID","header.notionDatabaseIdPlaceholder":"32-char hex ID from database URL","header.notionTestConnection":"Test Connection","header.notionTesting":"Testing...","header.notionConnected":"Connected!","header.notionFailed":"Connection failed","header.notionTokenHint":"Create an integration at notion.so/my-integrations and share the database with it","header.notionDesc":"Browse Notion pages and import them as AI tasks.","header.notionGuideToggle":"Setup Guide","header.notionGuidePrep":"Prerequisites","header.notionGuideStep1":"Go to notion.so/my-integrations and create an Integration — copy the API key","header.notionGuideStep2":'Open your Notion database page, click "..." > Connections > select the Integration',"header.notionGuideStep3":'Copy the Database ID from the URL (32-char hex string before "?v=")',"header.notionGuideSetup":"Configuration","header.notionGuideSetup1":"Enter the API key and Database ID above","header.notionGuideSetup2":'Click "Test Connection" to verify',"header.notionGuideSetup3":"Save settings","header.notionGuideUsage":"Usage","header.notionGuideUsage1":"Open the Notion tab in the project detail page","header.notionGuideUsage2":"Browse pages, search by title, view block content","header.notionGuideUsage3":'Click "Import as Task" to create an AI task from a page'},ko:{"tabs.notion":"Notion","notion.title":"Notion 페이지","notion.search":"페이지 검색...","notion.refresh":"새로고침","notion.import":"작업으로 가져오기","notion.importing":"가져오는 중...","notion.imported":"가져옴!","notion.noPages":"페이지가 없습니다","notion.noPagesHint":"검색어를 변경해보세요.","notion.loadMore":"더 보기","notion.createPage":"페이지 생성","notion.pageTitle":"제목","notion.creating":"생성 중...","notion.notConfigured":"Notion이 설정되지 않았습니다. 프로젝트 설정에서 활성화하세요.","notion.loadingContent":"콘텐츠 로딩 중...","notion.noContent":"콘텐츠 없음","header.notionTitle":"Notion 연동","header.notionApiKey":"통합 토큰","header.notionApiKeyPlaceholder":"secret_...","header.notionDatabaseId":"데이터베이스 ID","header.notionDatabaseIdPlaceholder":"데이터베이스 URL의 32자 hex ID","header.notionTestConnection":"연결 테스트","header.notionTesting":"테스트 중...","header.notionConnected":"연결 성공!","header.notionFailed":"연결 실패","header.notionTokenHint":"notion.so/my-integrations에서 통합을 생성하고 데이터베이스를 공유하세요","header.notionDesc":"Notion 페이지를 조회하고 AI 태스크로 가져옵니다.","header.notionGuideToggle":"설정 가이드","header.notionGuidePrep":"사전 준비","header.notionGuideStep1":"notion.so/my-integrations에서 Integration 생성 → API 키 복사","header.notionGuideStep2":'Notion 데이터베이스 페이지 → "..." → 연결 → 생성한 Integration 선택',"header.notionGuideStep3":'데이터베이스 URL에서 Database ID 복사 ("?v=" 앞의 32자리 hex)',"header.notionGuideSetup":"설정 방법","header.notionGuideSetup1":"위 입력란에 API 키와 Database ID 입력","header.notionGuideSetup2":'"연결 테스트" 클릭하여 연결 확인',"header.notionGuideSetup3":"설정 저장","header.notionGuideUsage":"사용법","header.notionGuideUsage1":"프로젝트 상세 페이지에서 Notion 탭 진입","header.notionGuideUsage2":"페이지 검색, 블록 콘텐츠 확인","header.notionGuideUsage3":'"작업으로 가져오기" 클릭하여 AI 태스크 생성'}}};function e3e(){return mt("/api/gstack/skills")}function t3e({project:e,config:t,onConfigChange:n}){const{t:r,lang:a}=tt(),[i,s]=x.useState([]),[l,c]=x.useState(!1);x.useEffect(()=>{e3e().then(s).catch(()=>{})},[]);const d=t.enabled==="1"||t.enabled===!0,h=e.cli_tool==="claude",m=(()=>{try{const v=t.skills;if(!v)return[];const b=typeof v=="string"?JSON.parse(v):v;return Array.isArray(b)?b:[]}catch{return[]}})(),g=v=>{const b=m.includes(v)?m.filter(w=>w!==v):[...m,v];n({skills:b.length>0?JSON.stringify(b):null})};return f.jsxs("div",{className:"p-4 border border-warm-200 rounded-xl",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("h4",{className:"text-sm font-semibold text-warm-700",children:r("header.gstackTitle")}),f.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:d,onChange:v=>n({enabled:v.target.checked?"1":"0"}),disabled:!h,className:"sr-only peer"}),f.jsx("div",{className:"w-9 h-5 bg-warm-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-warm-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-status-success peer-disabled:opacity-50"})]})]}),f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.gstackDesc")}),!h&&f.jsx("p",{className:"text-xs text-warm-400 mb-3",children:r("header.gstackClaudeOnly")}),h&&d&&f.jsxs("div",{className:"space-y-3",children:[f.jsxs("button",{type:"button",onClick:()=>c(!l),className:"flex items-center gap-1 text-xs text-accent-dark hover:text-accent transition-colors",children:[f.jsx("span",{className:`inline-block transition-transform ${l?"rotate-90":""}`,children:"▶"}),r("header.gstackGuideToggle")]}),l&&f.jsxs("div",{className:"p-3 bg-warm-50 border border-warm-150 rounded-lg text-xs text-warm-600 space-y-2",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-warm-700 mb-1",children:r("header.gstackGuideHow")}),f.jsxs("ol",{className:"list-decimal list-inside space-y-0.5 ml-1",children:[f.jsx("li",{children:r("header.gstackGuideStep1")}),f.jsx("li",{children:r("header.gstackGuideStep2")}),f.jsx("li",{children:r("header.gstackGuideStep3")}),f.jsx("li",{children:r("header.gstackGuideStep4")})]})]}),f.jsx("p",{className:"text-warm-400",children:r("header.gstackGuideNote")})]}),i.length>0&&f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:i.map(v=>f.jsxs("label",{className:"flex items-start gap-2 p-2 rounded-lg hover:bg-warm-50 cursor-pointer transition-colors",children:[f.jsx("input",{type:"checkbox",checked:m.includes(v.id),onChange:()=>g(v.id),className:"mt-0.5 rounded border-warm-300 text-status-success focus:ring-status-success"}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("span",{className:"text-xs font-medium text-warm-700",children:v.name}),f.jsx("p",{className:"text-xs text-warm-400 truncate",children:a==="ko"?v.descriptionKo:v.description})]})]},v.id))})]}),f.jsx("p",{className:"text-xs text-warm-300 mt-3",children:r("header.gstackCredit")})]})}const n3e={id:"gstack",displayName:"Gstack Skills",displayNameKo:"Gstack 스킬",SettingsComponent:t3e,hasTab:!1,isEnabled:e=>!!e.gstack_enabled,translations:{en:{"header.gstackTitle":"gstack Skills","header.gstackEnabled":"Enable gstack skill injection","header.gstackCredit":"Powered by gstack (MIT License, Garry Tan)","header.gstackClaudeOnly":"gstack skills are only available with Claude CLI.","header.gstackDesc":"Inject AI skill files into worktrees to improve Claude CLI task quality.","header.gstackGuideToggle":"How it works","header.gstackGuideHow":"How gstack skills work","header.gstackGuideStep1":"Select the skills you want to use below","header.gstackGuideStep2":"When a task starts, selected skill files are copied to the worktree's .claude/skills/ directory","header.gstackGuideStep3":"Claude CLI automatically recognizes and applies these skills during execution","header.gstackGuideStep4":"Skills are isolated in gstack-* prefixed directories and don't conflict with existing skills","header.gstackGuideNote":"Only works with Claude CLI. Gemini and Codex do not support skill files."},ko:{"header.gstackTitle":"gstack 스킬","header.gstackEnabled":"gstack 스킬 주입 활성화","header.gstackCredit":"gstack 기반 (MIT 라이선스, Garry Tan)","header.gstackClaudeOnly":"gstack 스킬은 Claude CLI에서만 사용 가능합니다.","header.gstackDesc":"AI 스킬 파일을 worktree에 주입하여 Claude CLI 작업 품질을 높입니다.","header.gstackGuideToggle":"동작 방식","header.gstackGuideHow":"gstack 스킬 동작 원리","header.gstackGuideStep1":"아래에서 사용할 스킬을 선택합니다","header.gstackGuideStep2":"태스크 실행 시 선택된 스킬 파일이 worktree의 .claude/skills/ 디렉토리에 복사됩니다","header.gstackGuideStep3":"Claude CLI가 스킬을 자동 인식하여 실행에 적용합니다","header.gstackGuideStep4":"스킬은 gstack-* 접두사 디렉토리에 격리되어 기존 스킬과 충돌하지 않습니다","header.gstackGuideNote":"Claude CLI 전용 기능입니다. Gemini, Codex에서는 지원되지 않습니다."}}};function r3e(){Nm(NIe),Nm(zIe),Nm(JIe),Nm(n3e)}r3e();function a3e(){const e=ene(),t=tne();return f.jsx(i8.Provider,{value:e,children:f.jsx(o8.Provider,{value:t,children:f.jsx(DJ,{children:f.jsx(hIe,{})})})})}YZ.createRoot(document.getElementById("root")).render(f.jsx(ON.StrictMode,{children:f.jsx(a3e,{})}));