@mcp-graph-workflow/mcp-graph 5.14.1 → 5.15.1

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 (42) hide show
  1. package/dist/api/routes/code-graph.d.ts.map +1 -1
  2. package/dist/api/routes/code-graph.js +9 -1
  3. package/dist/api/routes/code-graph.js.map +1 -1
  4. package/dist/core/code/code-store.d.ts +3 -1
  5. package/dist/core/code/code-store.d.ts.map +1 -1
  6. package/dist/core/code/code-store.js +15 -3
  7. package/dist/core/code/code-store.js.map +1 -1
  8. package/dist/core/code/graph-traversal.d.ts +5 -1
  9. package/dist/core/code/graph-traversal.d.ts.map +1 -1
  10. package/dist/core/code/graph-traversal.js +15 -4
  11. package/dist/core/code/graph-traversal.js.map +1 -1
  12. package/dist/core/lsp/lsp-bridge.d.ts.map +1 -1
  13. package/dist/core/lsp/lsp-bridge.js +6 -0
  14. package/dist/core/lsp/lsp-bridge.js.map +1 -1
  15. package/dist/core/lsp/lsp-server-manager.d.ts +4 -1
  16. package/dist/core/lsp/lsp-server-manager.d.ts.map +1 -1
  17. package/dist/core/lsp/lsp-server-manager.js +50 -8
  18. package/dist/core/lsp/lsp-server-manager.js.map +1 -1
  19. package/dist/core/store/migrations.d.ts.map +1 -1
  20. package/dist/core/store/migrations.js +33 -0
  21. package/dist/core/store/migrations.js.map +1 -1
  22. package/dist/web/dashboard/dist/assets/{benchmark-tab-bAsb6b5p.js → benchmark-tab-B1A0SasV.js} +1 -1
  23. package/dist/web/dashboard/dist/assets/{context-tab-C5KST5qM.js → context-tab-DUkoXaRk.js} +1 -1
  24. package/dist/web/dashboard/dist/assets/{gitnexus-tab-D394pCd3.js → gitnexus-tab-CRQq2LPk.js} +1 -1
  25. package/dist/web/dashboard/dist/assets/{graph-section-CuB14sAc.js → graph-section-B3yPYErO.js} +1 -1
  26. package/dist/web/dashboard/dist/assets/{graph-tab-aL8V0k7E.js → graph-tab-C6EW5fp0.js} +1 -1
  27. package/dist/web/dashboard/dist/assets/{graph-utils-DOsrZg2o.js → graph-utils-BYuSG24r.js} +1 -1
  28. package/dist/web/dashboard/dist/assets/{index-DabDEe52.js → index-BWMXofAC.js} +1 -1
  29. package/dist/web/dashboard/dist/assets/{index-CGEJi5Pf.js → index-C_1iski-.js} +2 -2
  30. package/dist/web/dashboard/dist/assets/{index-B2nBqQj2.js → index-Cs6DRCJ0.js} +1 -1
  31. package/dist/web/dashboard/dist/assets/{insights-tab-DzBWnqLw.js → insights-tab-B_dx9SpZ.js} +1 -1
  32. package/dist/web/dashboard/dist/assets/{journey-tab-Do_W90S1.js → journey-tab-CO7oVMz6.js} +1 -1
  33. package/dist/web/dashboard/dist/assets/{logs-tab-COo6RMr0.js → logs-tab-DOBGn4V2.js} +1 -1
  34. package/dist/web/dashboard/dist/assets/lsp-tab-BNDlSPfa.js +69 -0
  35. package/dist/web/dashboard/dist/assets/{memories-tab-BxiHkGJB.js → memories-tab-DpIssCFl.js} +1 -1
  36. package/dist/web/dashboard/dist/assets/{prd-backlog-tab-C6SbmrLs.js → prd-backlog-tab-T6zNUi5_.js} +1 -1
  37. package/dist/web/dashboard/dist/assets/{siebel-tab-CEBNzwrk.js → siebel-tab-B0pcpfzn.js} +3 -3
  38. package/dist/web/dashboard/dist/assets/{skills-tab-Cf977wNJ.js → skills-tab-DiqEcBjJ.js} +1 -1
  39. package/dist/web/dashboard/dist/assets/{style-4NfIX256.js → style-gKCWR_EQ.js} +1 -1
  40. package/dist/web/dashboard/dist/index.html +1 -1
  41. package/package.json +3 -2
  42. package/dist/web/dashboard/dist/assets/lsp-tab-Cgj0U3s7.js +0 -69
@@ -1,4 +1,4 @@
1
- var Ow=Object.defineProperty;var Sw=(e,t,r)=>t in e?Ow(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fo=(e,t,r)=>Sw(e,typeof t!="symbol"?t+"":t,r);import{r as v,a as Oi,g as Cr,b as Aw,R as Ew,j}from"./index-CGEJi5Pf.js";import{i as Fa,w as _w,r as vs,a as jw}from"./index-DabDEe52.js";import{S as kw,d as Cw,N as Tw}from"./constants-lq4BIQN3.js";function ps(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Iw(e,t){t===void 0&&(t=e,e=Fa);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function Mw(e){const{completionRate:t,totalNodes:r,blockedCount:n,missingACCount:i,oversizedCount:a}=e;if(r===0)return 100;const o=t,u=(r-n)/r*100,l=(r-i)/r*100,s=(r-a)/r*100,c=o*.4+u*.25+l*.2+s*.15;return Math.round(Math.max(0,Math.min(100,c)))}function Dw(){const[e,t]=v.useState(null),[r,n]=v.useState(!0),[i,a]=v.useState(null),o=v.useCallback(async()=>{n(!0),a(null);try{const[u,l,s,c]=await Promise.all([Oi.getMetrics(),Oi.getBottlenecks(),Oi.getStats(),Oi.getKnowledgeStats().catch(()=>({total:0,bySource:{}}))]),f=Mw({completionRate:u.completionRate,totalNodes:s.totalNodes,blockedCount:s.byStatus.blocked??0,missingACCount:l.missingAcceptanceCriteria.length,oversizedCount:l.oversizedTasks.length});t({metrics:u,bottlenecks:l,stats:s,knowledgeStats:c,healthScore:f})}catch(u){a(u instanceof Error?u.message:"Failed to load insights")}finally{n(!1)}},[]);return v.useEffect(()=>{o()},[o]),{data:e,loading:r,error:i,refresh:o}}function fm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=fm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function U(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=fm(e))&&(n&&(n+=" "),n+=t);return n}var Nw=["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 hs(e){if(typeof e!="string")return!1;var t=Nw;return t.includes(e)}var Rw=["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"],$w=new Set(Rw);function dm(e){return typeof e!="string"?!1:$w.has(e)}function vm(e){return typeof e=="string"&&e.startsWith("data-")}function Re(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(dm(r)||vm(r))&&(t[r]=e[r]);return t}function wr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Re(t)}return typeof e=="object"&&!Array.isArray(e)?Re(e):null}function De(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(dm(r)||vm(r)||hs(r))&&(t[r]=e[r]);return t}var Lw=["children","width","height","viewBox","className","style","title","desc"];function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vl.apply(null,arguments)}function Bw(e,t){if(e==null)return{};var r,n,i=zw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ms=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=Bw(e,Lw),f=a||{width:n,height:i,x:0,y:0},d=U("recharts-surface",o);return v.createElement("svg",vl({},De(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,l),v.createElement("desc",null,s),r)}),Fw=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(null,arguments)}function Kw(e,t){if(e==null)return{};var r,n,i=Ww(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ww(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ve=v.forwardRef((e,t)=>{var{children:r,className:n}=e,i=Kw(e,Fw),a=U("recharts-layer",n);return v.createElement("g",pl({className:a},De(i),{ref:t}),r)}),pm=v.createContext(null),qw=()=>v.useContext(pm);function re(e){return function(){return e}}const hm=Math.cos,Gi=Math.sin,vt=Math.sqrt,Vi=Math.PI,Ka=2*Vi,hl=Math.PI,ml=2*hl,dr=1e-6,Uw=ml-dr;function mm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Hw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return mm;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Yw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?mm:Hw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,s=i-r,c=o-t,f=u-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>dr)if(!(Math.abs(f*l-s*c)>dr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,h=i-u,m=l*l+s*s,y=p*p+h*h,g=Math.sqrt(m),b=Math.sqrt(d),P=a*Math.tan((hl-Math.acos((m+d-y)/(2*g*b)))/2),x=P/b,O=P/g;Math.abs(x-1)>dr&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*p>c*h)},${this._x1=t+O*l},${this._y1=r+O*s}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),s=t+u,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${c}`:(Math.abs(this._x1-s)>dr||Math.abs(this._y1-c)>dr)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%ml+ml),d>Uw?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=s},${this._y1=c}`:d>dr&&this._append`A${n},${n},0,${+(d>=hl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ys(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Yw(t)}function gs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ym(e){this._context=e}ym.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 Wa(e){return new ym(e)}function gm(e){return e[0]}function bm(e){return e[1]}function wm(e,t){var r=re(!0),n=null,i=Wa,a=null,o=ys(u);e=typeof e=="function"?e:e===void 0?gm:re(e),t=typeof t=="function"?t:t===void 0?bm:re(t);function u(l){var s,c=(l=gs(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=c;++s)!(s<c&&r(f=l[s],s,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,s,l),+t(f,s,l));if(p)return a=null,p+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:re(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:re(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:re(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Si(e,t,r){var n=null,i=re(!0),a=null,o=Wa,u=null,l=ys(s);e=typeof e=="function"?e:e===void 0?gm:re(+e),t=typeof t=="function"?t:re(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?bm:re(+r);function s(f){var d,p,h,m=(f=gs(f)).length,y,g=!1,b,P=new Array(m),x=new Array(m);for(a==null&&(u=o(b=l())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)p=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=p;--h)u.point(P[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(P[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):P[d],r?+r(y,d,f):x[d]))}if(b)return u=null,b+""||null}function c(){return wm().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:re(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:re(+f),s):r},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(r)},s.lineX1=function(){return c().x(n).y(t)},s.defined=function(f){return arguments.length?(i=typeof f=="function"?f:re(!!f),s):i},s.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),s):o},s.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),s):a},s}class xm{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Gw(e){return new xm(e,!0)}function Vw(e){return new xm(e,!1)}const bs={draw(e,t){const r=vt(t/Vi);e.moveTo(r,0),e.arc(0,0,r,0,Ka)}},Xw={draw(e,t){const r=vt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Pm=vt(1/3),Zw=Pm*2,Qw={draw(e,t){const r=vt(t/Zw),n=r*Pm;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Jw={draw(e,t){const r=vt(t),n=-r/2;e.rect(n,n,r,r)}},ex=.8908130915292852,Om=Gi(Vi/10)/Gi(7*Vi/10),tx=Gi(Ka/10)*Om,rx=-hm(Ka/10)*Om,nx={draw(e,t){const r=vt(t*ex),n=tx*r,i=rx*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ka*a/5,u=hm(o),l=Gi(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Ko=vt(3),ix={draw(e,t){const r=-vt(t/(Ko*3));e.moveTo(0,r*2),e.lineTo(-Ko*r,-r),e.lineTo(Ko*r,-r),e.closePath()}},tt=-.5,rt=vt(3)/2,yl=1/vt(12),ax=(yl/2+1)*3,ox={draw(e,t){const r=vt(t/ax),n=r/2,i=r*yl,a=n,o=r*yl+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(tt*n-rt*i,rt*n+tt*i),e.lineTo(tt*a-rt*o,rt*a+tt*o),e.lineTo(tt*u-rt*l,rt*u+tt*l),e.lineTo(tt*n+rt*i,tt*i-rt*n),e.lineTo(tt*a+rt*o,tt*o-rt*a),e.lineTo(tt*u+rt*l,tt*l-rt*u),e.closePath()}};function ux(e,t){let r=null,n=ys(i);e=typeof e=="function"?e:re(e||bs),t=typeof t=="function"?t:re(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:re(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:re(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Xi(){}function Zi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Sm(e){this._context=e}Sm.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:Zi(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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lx(e){return new Sm(e)}function Am(e){this._context=e}Am.prototype={areaStart:Xi,areaEnd:Xi,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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sx(e){return new Am(e)}function Em(e){this._context=e}Em.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cx(e){return new Em(e)}function _m(e){this._context=e}_m.prototype={areaStart:Xi,areaEnd:Xi,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 fx(e){return new _m(e)}function wf(e){return e<0?-1:1}function xf(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(wf(a)+wf(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Pf(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function Qi(e){this._context=e}Qi.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:Wo(this,this._t0,Pf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wo(this,Pf(this,r=xf(this,e,t)),r);break;default:Wo(this,this._t0,r=xf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function jm(e){this._context=new km(e)}(jm.prototype=Object.create(Qi.prototype)).point=function(e,t){Qi.prototype.point.call(this,t,e)};function km(e){this._context=e}km.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function dx(e){return new Qi(e)}function vx(e){return new jm(e)}function Cm(e){this._context=e}Cm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Of(e),i=Of(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Of(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function px(e){return new Cm(e)}function qa(e,t){this._context=e,this._t=t}qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function hx(e){return new qa(e,.5)}function mx(e){return new qa(e,0)}function yx(e){return new qa(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function gl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function gx(e,t){return e[t]}function bx(e){const t=[];return t.key=e,t}function wx(){var e=re([]),t=gl,r=xr,n=gx;function i(a){var o=Array.from(e.apply(this,arguments),bx),u,l=o.length,s=-1,c;for(const f of a)for(u=0,++s;u<l;++u)(o[u][s]=[0,+n(f,o[u].key,s,a)]).data=f;for(u=0,c=gs(t(o));u<l;++u)o[c[u]].index=u;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:re(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:re(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?gl:typeof a=="function"?a:re(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function xx(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function Px(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}xr(e,t)}}function Ox(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,s=0;u<o;++u){for(var c=e[t[u]],f=c[n][1]||0,d=c[n-1][1]||0,p=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],y=m[n][1]||0,g=m[n-1][1]||0;p+=y-g}l+=f,s+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var qo={},Uo={},Sf;function Sx(){return Sf||(Sf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Uo)),Uo}var Ho={},Af;function Tm(){return Af||(Af=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Ho)),Ho}var Yo={},Ef;function ws(){return Ef||(Ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Yo)),Yo}var Go={},Vo={},_f;function Ax(){return _f||(_f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Vo)),Vo}var jf;function xs(){return jf||(jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ax(),r=ws();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let u=0,l="",s="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),u++);u<o;){const f=i[u];s?f==="\\"&&u+1<o?(u++,l+=i[u]):f===s?s="":l+=f:c?f==='"'||f==="'"?s=f:f==="]"?(c=!1,a.push(l),l=""):l+=f:f==="["?(c=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,u++}return l&&a.push(l),a}e.toPath=n})(Go)),Go}var kf;function Ps(){return kf||(kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sx(),r=Tm(),n=ws(),i=xs();function a(u,l,s){if(u==null)return s;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?r.isDeepKey(l)?a(u,i.toPath(l),s):s:c}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const c=u[l];return c===void 0?s:c}default:{if(Array.isArray(l))return o(u,l,s);if(Object.is(l==null?void 0:l.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?s:c}}}function o(u,l,s){if(l.length===0)return s;let c=u;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return s;c=c[l[f]]}return c===void 0?s:c}e.get=a})(qo)),qo}var Xo,Cf;function Ex(){return Cf||(Cf=1,Xo=Ps().get),Xo}var _x=Ex();const Pr=Cr(_x);var jx=4;function Xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jx,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Xt(u)+a:i+a},"")}var Se=e=>e===0?0:e>0?1:-1,xt=e=>typeof e=="number"&&e!=+e,Or=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,L=e=>(typeof e=="number"||e instanceof Number)&&!xt(e),Pt=e=>L(e)||typeof e=="string",kx=0,Dn=e=>{var t=++kx;return"".concat(e||"").concat(t)},Ne=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!L(t)&&typeof t!="string")return n;var a;if(Or(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xt(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Im=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function de(e,t,r){return L(e)&&L(t)?Xt(e+r*(t-e)):t}function Cx(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Pr(n,t))===r)}var ge=e=>e===null||typeof e>"u",Yn=e=>ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yt(e){return e!=null}function $t(){}var Tx=["type","size","sizeType"];function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bl.apply(null,arguments)}function Tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function If(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tf(Object(r),!0).forEach(function(n){Ix(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ix(e,t,r){return(t=Mx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mx(e){var t=Dx(e,"string");return typeof t=="symbol"?t:t+""}function Dx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nx(e,t){if(e==null)return{};var r,n,i=Rx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Rx(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Mm={symbolCircle:bs,symbolCross:Xw,symbolDiamond:Qw,symbolSquare:Jw,symbolStar:nx,symbolTriangle:ix,symbolWye:ox},$x=Math.PI/180,Lx=e=>{var t="symbol".concat(Yn(e));return Mm[t]||bs},Bx=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*$x;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**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}},zx=(e,t)=>{Mm["symbol".concat(Yn(e))]=t},Os=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Nx(e,Tx),a=If(If({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=Lx(o),p=ux().type(d).size(Bx(r,n,o)),h=p();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=De(a);return L(s)&&L(c)&&L(r)?v.createElement("path",bl({},f,{className:U("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Os.registerSymbol=zx;var Dm=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Nm=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{hs(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Fx=(e,t,r)=>n=>(e(t,r,n),null),ir=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];hs(i)&&typeof a=="function"&&(n||(n={}),n[i]=Fx(a,t,r))}),n};function Mf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mf(Object(r),!0).forEach(function(n){Wx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wx(e,t,r){return(t=qx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qx(e){var t=Ux(e,"string");return typeof t=="symbol"?t:t+""}function Ux(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function be(e,t){var r=Kx({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ji.apply(null,arguments)}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Hx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hx(e,t,r){return(t=Yx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yx(e){var t=Gx(e,"string");return typeof t=="symbol"?t:t+""}function Gx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var it=32,Vx={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Xx(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Zx(e){var{data:t,iconType:r,inactiveColor:n}=e,i=it/2,a=it/6,o=it/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:Xx(t.payload),x1:0,y1:i,x2:it,y2:i,className:"recharts-legend-icon"});if(l==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(o,`
1
+ var Ow=Object.defineProperty;var Sw=(e,t,r)=>t in e?Ow(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fo=(e,t,r)=>Sw(e,typeof t!="symbol"?t+"":t,r);import{r as v,a as Oi,g as Cr,b as Aw,R as Ew,j}from"./index-C_1iski-.js";import{i as Fa,w as _w,r as vs,a as jw}from"./index-BWMXofAC.js";import{S as kw,d as Cw,N as Tw}from"./constants-lq4BIQN3.js";function ps(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Iw(e,t){t===void 0&&(t=e,e=Fa);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var u=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[u](o-u)}}function Mw(e){const{completionRate:t,totalNodes:r,blockedCount:n,missingACCount:i,oversizedCount:a}=e;if(r===0)return 100;const o=t,u=(r-n)/r*100,l=(r-i)/r*100,s=(r-a)/r*100,c=o*.4+u*.25+l*.2+s*.15;return Math.round(Math.max(0,Math.min(100,c)))}function Dw(){const[e,t]=v.useState(null),[r,n]=v.useState(!0),[i,a]=v.useState(null),o=v.useCallback(async()=>{n(!0),a(null);try{const[u,l,s,c]=await Promise.all([Oi.getMetrics(),Oi.getBottlenecks(),Oi.getStats(),Oi.getKnowledgeStats().catch(()=>({total:0,bySource:{}}))]),f=Mw({completionRate:u.completionRate,totalNodes:s.totalNodes,blockedCount:s.byStatus.blocked??0,missingACCount:l.missingAcceptanceCriteria.length,oversizedCount:l.oversizedTasks.length});t({metrics:u,bottlenecks:l,stats:s,knowledgeStats:c,healthScore:f})}catch(u){a(u instanceof Error?u.message:"Failed to load insights")}finally{n(!1)}},[]);return v.useEffect(()=>{o()},[o]),{data:e,loading:r,error:i,refresh:o}}function fm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=fm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function U(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=fm(e))&&(n&&(n+=" "),n+=t);return n}var Nw=["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 hs(e){if(typeof e!="string")return!1;var t=Nw;return t.includes(e)}var Rw=["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"],$w=new Set(Rw);function dm(e){return typeof e!="string"?!1:$w.has(e)}function vm(e){return typeof e=="string"&&e.startsWith("data-")}function Re(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(dm(r)||vm(r))&&(t[r]=e[r]);return t}function wr(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Re(t)}return typeof e=="object"&&!Array.isArray(e)?Re(e):null}function De(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(dm(r)||vm(r)||hs(r))&&(t[r]=e[r]);return t}var Lw=["children","width","height","viewBox","className","style","title","desc"];function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vl.apply(null,arguments)}function Bw(e,t){if(e==null)return{};var r,n,i=zw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zw(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ms=v.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=Bw(e,Lw),f=a||{width:n,height:i,x:0,y:0},d=U("recharts-surface",o);return v.createElement("svg",vl({},De(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),v.createElement("title",null,l),v.createElement("desc",null,s),r)}),Fw=["children","className"];function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(null,arguments)}function Kw(e,t){if(e==null)return{};var r,n,i=Ww(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ww(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ve=v.forwardRef((e,t)=>{var{children:r,className:n}=e,i=Kw(e,Fw),a=U("recharts-layer",n);return v.createElement("g",pl({className:a},De(i),{ref:t}),r)}),pm=v.createContext(null),qw=()=>v.useContext(pm);function re(e){return function(){return e}}const hm=Math.cos,Gi=Math.sin,vt=Math.sqrt,Vi=Math.PI,Ka=2*Vi,hl=Math.PI,ml=2*hl,dr=1e-6,Uw=ml-dr;function mm(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Hw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return mm;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Yw{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?mm:Hw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,s=i-r,c=o-t,f=u-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>dr)if(!(Math.abs(f*l-s*c)>dr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,h=i-u,m=l*l+s*s,y=p*p+h*h,g=Math.sqrt(m),b=Math.sqrt(d),P=a*Math.tan((hl-Math.acos((m+d-y)/(2*g*b)))/2),x=P/b,O=P/g;Math.abs(x-1)>dr&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*p>c*h)},${this._x1=t+O*l},${this._y1=r+O*s}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),s=t+u,c=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${s},${c}`:(Math.abs(this._x1-s)>dr||Math.abs(this._y1-c)>dr)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%ml+ml),d>Uw?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=s},${this._y1=c}`:d>dr&&this._append`A${n},${n},0,${+(d>=hl)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ys(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Yw(t)}function gs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ym(e){this._context=e}ym.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 Wa(e){return new ym(e)}function gm(e){return e[0]}function bm(e){return e[1]}function wm(e,t){var r=re(!0),n=null,i=Wa,a=null,o=ys(u);e=typeof e=="function"?e:e===void 0?gm:re(e),t=typeof t=="function"?t:t===void 0?bm:re(t);function u(l){var s,c=(l=gs(l)).length,f,d=!1,p;for(n==null&&(a=i(p=o())),s=0;s<=c;++s)!(s<c&&r(f=l[s],s,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,s,l),+t(f,s,l));if(p)return a=null,p+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:re(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:re(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:re(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Si(e,t,r){var n=null,i=re(!0),a=null,o=Wa,u=null,l=ys(s);e=typeof e=="function"?e:e===void 0?gm:re(+e),t=typeof t=="function"?t:re(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?bm:re(+r);function s(f){var d,p,h,m=(f=gs(f)).length,y,g=!1,b,P=new Array(m),x=new Array(m);for(a==null&&(u=o(b=l())),d=0;d<=m;++d){if(!(d<m&&i(y=f[d],d,f))===g)if(g=!g)p=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=p;--h)u.point(P[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(P[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):P[d],r?+r(y,d,f):x[d]))}if(b)return u=null,b+""||null}function c(){return wm().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:re(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:re(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:re(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:re(+f),s):r},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(r)},s.lineX1=function(){return c().x(n).y(t)},s.defined=function(f){return arguments.length?(i=typeof f=="function"?f:re(!!f),s):i},s.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),s):o},s.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),s):a},s}class xm{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Gw(e){return new xm(e,!0)}function Vw(e){return new xm(e,!1)}const bs={draw(e,t){const r=vt(t/Vi);e.moveTo(r,0),e.arc(0,0,r,0,Ka)}},Xw={draw(e,t){const r=vt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Pm=vt(1/3),Zw=Pm*2,Qw={draw(e,t){const r=vt(t/Zw),n=r*Pm;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Jw={draw(e,t){const r=vt(t),n=-r/2;e.rect(n,n,r,r)}},ex=.8908130915292852,Om=Gi(Vi/10)/Gi(7*Vi/10),tx=Gi(Ka/10)*Om,rx=-hm(Ka/10)*Om,nx={draw(e,t){const r=vt(t*ex),n=tx*r,i=rx*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ka*a/5,u=hm(o),l=Gi(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Ko=vt(3),ix={draw(e,t){const r=-vt(t/(Ko*3));e.moveTo(0,r*2),e.lineTo(-Ko*r,-r),e.lineTo(Ko*r,-r),e.closePath()}},tt=-.5,rt=vt(3)/2,yl=1/vt(12),ax=(yl/2+1)*3,ox={draw(e,t){const r=vt(t/ax),n=r/2,i=r*yl,a=n,o=r*yl+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(tt*n-rt*i,rt*n+tt*i),e.lineTo(tt*a-rt*o,rt*a+tt*o),e.lineTo(tt*u-rt*l,rt*u+tt*l),e.lineTo(tt*n+rt*i,tt*i-rt*n),e.lineTo(tt*a+rt*o,tt*o-rt*a),e.lineTo(tt*u+rt*l,tt*l-rt*u),e.closePath()}};function ux(e,t){let r=null,n=ys(i);e=typeof e=="function"?e:re(e||bs),t=typeof t=="function"?t:re(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:re(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:re(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Xi(){}function Zi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Sm(e){this._context=e}Sm.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:Zi(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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lx(e){return new Sm(e)}function Am(e){this._context=e}Am.prototype={areaStart:Xi,areaEnd:Xi,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:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sx(e){return new Am(e)}function Em(e){this._context=e}Em.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cx(e){return new Em(e)}function _m(e){this._context=e}_m.prototype={areaStart:Xi,areaEnd:Xi,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 fx(e){return new _m(e)}function wf(e){return e<0?-1:1}function xf(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(wf(a)+wf(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Pf(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wo(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function Qi(e){this._context=e}Qi.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:Wo(this,this._t0,Pf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Wo(this,Pf(this,r=xf(this,e,t)),r);break;default:Wo(this,this._t0,r=xf(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function jm(e){this._context=new km(e)}(jm.prototype=Object.create(Qi.prototype)).point=function(e,t){Qi.prototype.point.call(this,t,e)};function km(e){this._context=e}km.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function dx(e){return new Qi(e)}function vx(e){return new jm(e)}function Cm(e){this._context=e}Cm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Of(e),i=Of(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Of(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function px(e){return new Cm(e)}function qa(e,t){this._context=e,this._t=t}qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function hx(e){return new qa(e,.5)}function mx(e){return new qa(e,0)}function yx(e){return new qa(e,1)}function xr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function gl(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function gx(e,t){return e[t]}function bx(e){const t=[];return t.key=e,t}function wx(){var e=re([]),t=gl,r=xr,n=gx;function i(a){var o=Array.from(e.apply(this,arguments),bx),u,l=o.length,s=-1,c;for(const f of a)for(u=0,++s;u<l;++u)(o[u][s]=[0,+n(f,o[u].key,s,a)]).data=f;for(u=0,c=gs(t(o));u<l;++u)o[c[u]].index=u;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:re(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:re(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?gl:typeof a=="function"?a:re(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??xr,i):r},i}function xx(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}xr(e,t)}}function Px(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}xr(e,t)}}function Ox(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,s=0;u<o;++u){for(var c=e[t[u]],f=c[n][1]||0,d=c[n-1][1]||0,p=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],y=m[n][1]||0,g=m[n-1][1]||0;p+=y-g}l+=f,s+=p*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,xr(e,t)}}var qo={},Uo={},Sf;function Sx(){return Sf||(Sf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Uo)),Uo}var Ho={},Af;function Tm(){return Af||(Af=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Ho)),Ho}var Yo={},Ef;function ws(){return Ef||(Ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Yo)),Yo}var Go={},Vo={},_f;function Ax(){return _f||(_f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Vo)),Vo}var jf;function xs(){return jf||(jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ax(),r=ws();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let u=0,l="",s="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),u++);u<o;){const f=i[u];s?f==="\\"&&u+1<o?(u++,l+=i[u]):f===s?s="":l+=f:c?f==='"'||f==="'"?s=f:f==="]"?(c=!1,a.push(l),l=""):l+=f:f==="["?(c=!0,l&&(a.push(l),l="")):f==="."?l&&(a.push(l),l=""):l+=f,u++}return l&&a.push(l),a}e.toPath=n})(Go)),Go}var kf;function Ps(){return kf||(kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sx(),r=Tm(),n=ws(),i=xs();function a(u,l,s){if(u==null)return s;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?r.isDeepKey(l)?a(u,i.toPath(l),s):s:c}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const c=u[l];return c===void 0?s:c}default:{if(Array.isArray(l))return o(u,l,s);if(Object.is(l==null?void 0:l.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return s;const c=u[l];return c===void 0?s:c}}}function o(u,l,s){if(l.length===0)return s;let c=u;for(let f=0;f<l.length;f++){if(c==null||t.isUnsafeProperty(l[f]))return s;c=c[l[f]]}return c===void 0?s:c}e.get=a})(qo)),qo}var Xo,Cf;function Ex(){return Cf||(Cf=1,Xo=Ps().get),Xo}var _x=Ex();const Pr=Cr(_x);var jx=4;function Xt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jx,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function se(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Xt(u)+a:i+a},"")}var Se=e=>e===0?0:e>0?1:-1,xt=e=>typeof e=="number"&&e!=+e,Or=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,L=e=>(typeof e=="number"||e instanceof Number)&&!xt(e),Pt=e=>L(e)||typeof e=="string",kx=0,Dn=e=>{var t=++kx;return"".concat(e||"").concat(t)},Ne=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!L(t)&&typeof t!="string")return n;var a;if(Or(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xt(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Im=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function de(e,t,r){return L(e)&&L(t)?Xt(e+r*(t-e)):t}function Cx(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Pr(n,t))===r)}var ge=e=>e===null||typeof e>"u",Yn=e=>ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yt(e){return e!=null}function $t(){}var Tx=["type","size","sizeType"];function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bl.apply(null,arguments)}function Tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function If(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tf(Object(r),!0).forEach(function(n){Ix(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ix(e,t,r){return(t=Mx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mx(e){var t=Dx(e,"string");return typeof t=="symbol"?t:t+""}function Dx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nx(e,t){if(e==null)return{};var r,n,i=Rx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Rx(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Mm={symbolCircle:bs,symbolCross:Xw,symbolDiamond:Qw,symbolSquare:Jw,symbolStar:nx,symbolTriangle:ix,symbolWye:ox},$x=Math.PI/180,Lx=e=>{var t="symbol".concat(Yn(e));return Mm[t]||bs},Bx=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*$x;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**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}},zx=(e,t)=>{Mm["symbol".concat(Yn(e))]=t},Os=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Nx(e,Tx),a=If(If({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=Lx(o),p=ux().type(d).size(Bx(r,n,o)),h=p();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=De(a);return L(s)&&L(c)&&L(r)?v.createElement("path",bl({},f,{className:U("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Os.registerSymbol=zx;var Dm=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Nm=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(v.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{hs(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},Fx=(e,t,r)=>n=>(e(t,r,n),null),ir=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];hs(i)&&typeof a=="function"&&(n||(n={}),n[i]=Fx(a,t,r))}),n};function Mf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mf(Object(r),!0).forEach(function(n){Wx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wx(e,t,r){return(t=qx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qx(e){var t=Ux(e,"string");return typeof t=="symbol"?t:t+""}function Ux(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function be(e,t){var r=Kx({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ji.apply(null,arguments)}function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Hx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hx(e,t,r){return(t=Yx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yx(e){var t=Gx(e,"string");return typeof t=="symbol"?t:t+""}function Gx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var it=32,Vx={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Xx(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Zx(e){var{data:t,iconType:r,inactiveColor:n}=e,i=it/2,a=it/6,o=it/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline")return v.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:Xx(t.payload),x1:0,y1:i,x2:it,y2:i,className:"recharts-legend-icon"});if(l==="line")return v.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(o,`
2
2
  A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(i,`
3
3
  H`).concat(it,"M").concat(2*o,",").concat(i,`
4
4
  A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(l==="rect")return v.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(it/8,"h").concat(it,"v").concat(it*3/4,"h").concat(-it,"z"),className:"recharts-legend-icon"});if(v.isValidElement(t.legendIcon)){var s=Rm({},t);return delete s.legendIcon,v.cloneElement(t.legendIcon,s)}return v.createElement(Os,{fill:u,cx:i,cy:i,size:it,sizeType:"diameter",type:l})}function Qx(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o,labelStyle:u}=e,l={x:0,y:0,width:it,height:it},s={display:n==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((f,d)=>{var p=f.formatter||i,h=U({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:f.inactive});if(f.type==="none")return null;var m=typeof u=="object"?Rm({},u):{};m.color=f.inactive?a:m.color||f.color;var y=p?p(f.value,f,d):f.value;return v.createElement("li",Ji({className:h,style:s,key:"legend-item-".concat(d)},ir(e,f,d)),v.createElement(ms,{width:r,height:r,viewBox:l,style:c,"aria-label":"".concat(y," legend icon")},v.createElement(Zx,{data:f,iconType:o,inactiveColor:a})),v.createElement("span",{className:"recharts-legend-item-text",style:m},y))})}var Jx=e=>{var t=be(e,Vx),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return v.createElement("ul",{className:"recharts-default-legend",style:a},v.createElement(Qx,Ji({},t,{payload:r})))},Zo={},Qo={},Nf;function eP(){return Nf||(Nf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],u=n(o,a,r);i.has(u)||i.set(u,o)}return Array.from(i.values())}e.uniqBy=t})(Qo)),Qo}var Jo={},Rf;function tP(){return Rf||(Rf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Jo)),Jo}var eu={},$f;function $m(){return $f||($f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(eu)),eu}var tu={},ru={},nu={},Lf;function rP(){return Lf||(Lf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(nu)),nu}var Bf;function Lm(){return Bf||(Bf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rP();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(ru)),ru}var iu={},zf;function nP(){return zf||(zf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(iu)),iu}var Ff;function iP(){return Ff||(Ff=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lm(),r=nP();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(tu)),tu}var au={},ou={},Kf;function aP(){return Kf||(Kf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ps();function r(n){return function(i){return t.get(i,n)}}e.property=r})(ou)),ou}var uu={},lu={},su={},cu={},Wf;function Bm(){return Wf||(Wf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(cu)),cu}var fu={},qf;function zm(){return qf||(qf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(fu)),fu}var du={},Uf;function Fm(){return Uf||(Uf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(du)),du}var Hf;function oP(){return Hf||(Hf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bm(),r=zm(),n=Fm();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function p(h,m,y,g,b,P){const x=d(h,m,y,g,b,P);return x!==void 0?!!x:a(h,m,p,P)},new Map)}function a(c,f,d,p){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,p);case"function":return Object.keys(f).length>0?a(c,{...f},d,p):n.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(c,f)}}function o(c,f,d,p){if(f==null)return!0;if(Array.isArray(f))return l(c,f,d,p);if(f instanceof Map)return u(c,f,d,p);if(f instanceof Set)return s(c,f,d,p);const h=Object.keys(f);if(c==null||r.isPrimitive(c))return h.length===0;if(h.length===0)return!0;if(p!=null&&p.has(f))return p.get(f)===c;p==null||p.set(f,c);try{for(let m=0;m<h.length;m++){const y=h[m];if(!r.isPrimitive(c)&&!(y in c)||f[y]===void 0&&c[y]!==void 0||f[y]===null&&c[y]!==null||!d(c[y],f[y],y,c,f,p))return!1}return!0}finally{p==null||p.delete(f)}}function u(c,f,d,p){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[h,m]of f.entries()){const y=c.get(h);if(d(y,m,h,c,f,p)===!1)return!1}return!0}function l(c,f,d,p){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const h=new Set;for(let m=0;m<f.length;m++){const y=f[m];let g=!1;for(let b=0;b<c.length;b++){if(h.has(b))continue;const P=c[b];let x=!1;if(d(P,y,m,c,f,p)&&(x=!0),x){h.add(b),g=!0;break}}if(!g)return!1}return!0}function s(c,f,d,p){return f.size===0?!0:c instanceof Set?l([...c],[...f],d,p):!1}e.isMatchWith=i,e.isSetMatch=s})(su)),su}var Yf;function Km(){return Yf||(Yf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oP();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(lu)),lu}var vu={},pu={},hu={},Gf;function uP(){return Gf||(Gf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(hu)),hu}var mu={},Vf;function Ss(){return Vf||(Vf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(mu)),mu}var yu={},Xf;function Wm(){return Xf||(Xf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",u="[object Date]",l="[object Map]",s="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",p="[object Object]",h="[object Error]",m="[object DataView]",y="[object Uint8Array]",g="[object Uint8ClampedArray]",b="[object Uint16Array]",P="[object Uint32Array]",x="[object BigUint64Array]",O="[object Int8Array]",w="[object Int16Array]",A="[object Int32Array]",E="[object BigInt64Array]",k="[object Float32Array]",C="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=E,e.bigUint64ArrayTag=x,e.booleanTag=i,e.dataViewTag=m,e.dateTag=u,e.errorTag=h,e.float32ArrayTag=k,e.float64ArrayTag=C,e.functionTag=f,e.int16ArrayTag=w,e.int32ArrayTag=A,e.int8ArrayTag=O,e.mapTag=l,e.numberTag=n,e.objectTag=p,e.regexpTag=t,e.setTag=s,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=P,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=g})(yu)),yu}var gu={},Zf;function lP(){return Zf||(Zf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(gu)),gu}var Qf;function qm(){return Qf||(Qf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uP(),r=Ss(),n=Wm(),i=zm(),a=lP();function o(c,f){return u(c,void 0,c,new Map,f)}function u(c,f,d,p=new Map,h=void 0){const m=h==null?void 0:h(c,f,d,p);if(m!==void 0)return m;if(i.isPrimitive(c))return c;if(p.has(c))return p.get(c);if(Array.isArray(c)){const y=new Array(c.length);p.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,p,h);return Object.hasOwn(c,"index")&&(y.index=c.index),Object.hasOwn(c,"input")&&(y.input=c.input),y}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const y=new RegExp(c.source,c.flags);return y.lastIndex=c.lastIndex,y}if(c instanceof Map){const y=new Map;p.set(c,y);for(const[g,b]of c)y.set(g,u(b,g,d,p,h));return y}if(c instanceof Set){const y=new Set;p.set(c,y);for(const g of c)y.add(u(g,void 0,d,p,h));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const y=new(Object.getPrototypeOf(c)).constructor(c.length);p.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,p,h);return y}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const y=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return p.set(c,y),l(y,c,d,p,h),y}if(typeof File<"u"&&c instanceof File){const y=new File([c],c.name,{type:c.type});return p.set(c,y),l(y,c,d,p,h),y}if(typeof Blob<"u"&&c instanceof Blob){const y=new Blob([c],{type:c.type});return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof Error){const y=structuredClone(c);return p.set(c,y),y.message=c.message,y.name=c.name,y.stack=c.stack,y.cause=c.cause,y.constructor=c.constructor,l(y,c,d,p,h),y}if(c instanceof Boolean){const y=new Boolean(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof Number){const y=new Number(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(c instanceof String){const y=new String(c.valueOf());return p.set(c,y),l(y,c,d,p,h),y}if(typeof c=="object"&&s(c)){const y=Object.create(Object.getPrototypeOf(c));return p.set(c,y),l(y,c,d,p,h),y}return c}function l(c,f,d=c,p,h){const m=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<m.length;y++){const g=m[y],b=Object.getOwnPropertyDescriptor(c,g);(b==null||b.writable)&&(c[g]=u(f[g],g,d,p,h))}}function s(c){switch(r.getTag(c)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=u,e.copyProperties=l})(pu)),pu}var Jf;function sP(){return Jf||(Jf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qm();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(vu)),vu}var ed;function cP(){return ed||(ed=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Km(),r=sP();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(uu)),uu}var bu={},wu={},xu={},td;function fP(){return td||(td=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qm(),r=Ss(),n=Wm();function i(a,o){return t.cloneDeepWith(a,(u,l,s,c)=>{const f=o==null?void 0:o(u,l,s,c);if(f!==void 0)return f;if(typeof a=="object"){if(r.getTag(a)===n.objectTag&&typeof a.constructor!="function"){const d={};return c.set(a,d),t.copyProperties(d,a,s,c),d}switch(Object.prototype.toString.call(a)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(d,a),d}case n.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(xu)),xu}var rd;function dP(){return rd||(rd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fP();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(wu)),wu}var Pu={},Ou={},nd;function Um(){return nd||(nd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Ou)),Ou}var Su={},id;function vP(){return id||(id=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ss();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Su)),Su}var ad;function pP(){return ad||(ad=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tm(),r=Um(),n=vP(),i=xs();function a(o,u){let l;if(Array.isArray(u)?l=u:typeof u=="string"&&t.isDeepKey(u)&&(o==null?void 0:o[u])==null?l=i.toPath(u):l=[u],l.length===0)return!1;let s=o;for(let c=0;c<l.length;c++){const f=l[c];if((s==null||!Object.hasOwn(s,f))&&!((Array.isArray(s)||n.isArguments(s))&&r.isIndex(f)&&f<s.length))return!1;s=s[f]}return!0}e.has=a})(Pu)),Pu}var od;function hP(){return od||(od=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Km(),r=ws(),n=dP(),i=Ps(),a=pP();function o(u,l){switch(typeof u){case"object":{Object.is(u==null?void 0:u.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return l=n.cloneDeep(l),function(s){const c=i.get(s,u);return c===void 0?a.has(s,u):l===void 0?c===void 0:t.isMatch(c,l)}}e.matchesProperty=o})(bu)),bu}var ud;function mP(){return ud||(ud=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$m(),r=aP(),n=cP(),i=hP();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(au)),au}var ld;function yP(){return ld||(ld=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eP(),r=tP(),n=$m(),i=iP(),a=mP();function o(u,l=n.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),r.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(Zo)),Zo}var Au,sd;function gP(){return sd||(sd=1,Au=yP().uniqBy),Au}var bP=gP();const cd=Cr(bP);function Hm(e,t,r){return t===!0?cd(e,r):typeof t=="function"?cd(e,t):e}var As=v.createContext(null),wP=e=>e,Q=()=>{var e=v.useContext(As);return e?e.store.dispatch:wP},Wi=()=>{},xP=()=>Wi,PP=(e,t)=>e===t;function D(e){var t=v.useContext(As),r=v.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Wi,[t,e]);return _w.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:xP,t?t.store.getState:Wi,t?t.store.getState:Wi,r,PP)}function OP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function SP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function AP(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var fd=e=>Array.isArray(e)?e:[e];function EP(e){const t=Array.isArray(e[0])?e[0]:e;return AP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _P(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var jP=class{constructor(e){this.value=e}deref(){return this.value}},kP=typeof WeakRef<"u"?WeakRef:jP,CP=0,dd=1;function Ai(){return{s:CP,v:void 0,o:null,p:null}}function Ym(e,t={}){let r=Ai();const{resultEqualityCheck:n}=t;let i,a=0;function o(){var f;let u=r;const{length:l}=arguments;for(let d=0,p=l;d<p;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let m=u.o;m===null&&(u.o=m=new WeakMap);const y=m.get(h);y===void 0?(u=Ai(),m.set(h,u)):u=y}else{let m=u.p;m===null&&(u.p=m=new Map);const y=m.get(h);y===void 0?(u=Ai(),m.set(h,u)):u=y}}const s=u;let c;if(u.s===dd)c=u.v;else if(c=e.apply(null,arguments),a++,n){const d=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;d!=null&&n(d,c)&&(c=d,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new kP(c):c}return s.s=dd,s.v=c,c}return o.clearCache=()=>{r=Ai(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function TP(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,u,l={},s=i.pop();typeof s=="object"&&(l=s,s=i.pop()),OP(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:p=Ym,argsMemoizeOptions:h=[]}=c,m=fd(d),y=fd(h),g=EP(i),b=f(function(){return a++,s.apply(null,arguments)},...m),P=p(function(){o++;const O=_P(g,arguments);return u=b.apply(null,O),u},...y);return Object.assign(P,{resultFunc:s,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:p})};return Object.assign(n,{withTypes:()=>n}),n}var S=TP(Ym),IP=Object.assign((e,t=S)=>{SP(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,u,l)=>(o[r[l]]=u,o),{}))},{withTypes:()=>IP}),Eu={},_u={},ju={},vd;function MP(){return vd||(vd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),u=t(i);if(o===u&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?u-o:o-u}return 0};e.compareValues=r})(ju)),ju}var ku={},Cu={},pd;function Gm(){return pd||(pd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Cu)),Cu}var hd;function DP(){return hd||(hd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gm(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(ku)),ku}var md;function NP(){return md||(md=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MP(),r=DP(),n=xs();function i(a,o,u,l){if(a==null)return[];u=l?void 0:u,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(p=>String(p));const s=(p,h)=>{let m=p;for(let y=0;y<h.length&&m!=null;++y)m=m[h[y]];return m},c=(p,h)=>h==null||p==null?h:typeof p=="object"&&"key"in p?Object.hasOwn(h,p.key)?h[p.key]:s(h,p.path):typeof p=="function"?p(h):Array.isArray(p)?s(h,p):typeof h=="object"?h[p]:h,f=o.map(p=>(Array.isArray(p)&&p.length===1&&(p=p[0]),p==null||typeof p=="function"||Array.isArray(p)||r.isKey(p)?p:{key:p,path:n.toPath(p)}));return a.map(p=>({original:p,criteria:f.map(h=>c(h,p))})).slice().sort((p,h)=>{for(let m=0;m<f.length;m++){const y=t.compareValues(p.criteria[m],h.criteria[m],u[m]);if(y!==0)return y}return 0}).map(p=>p.original)}e.orderBy=i})(_u)),_u}var Tu={},yd;function RP(){return yd||(yd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(u,l)=>{for(let s=0;s<u.length;s++){const c=u[s];Array.isArray(c)&&l<a?o(c,l+1):i.push(c)}};return o(r,0),i}e.flatten=t})(Tu)),Tu}var Iu={},gd;function Vm(){return gd||(gd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Um(),r=Lm(),n=Bm(),i=Fm();function a(o,u,l){return n.isObject(l)&&(typeof u=="number"&&r.isArrayLike(l)&&t.isIndex(u)&&u<l.length||typeof u=="string"&&u in l)?i.isEqualsSameValueZero(l[u],o):!1}e.isIterateeCall=a})(Iu)),Iu}var bd;function $P(){return bd||(bd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NP(),r=RP(),n=Vm();function i(a,...o){const u=o.length;return u>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:u>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(Eu)),Eu}var Mu,wd;function LP(){return wd||(wd=1,Mu=$P().sortBy),Mu}var BP=LP();const Ua=Cr(BP);var Xm=e=>e.legend.settings,zP=e=>e.legend.size,FP=e=>e.legend.payload,KP=S([FP,Xm],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Ua(n,r):n});function WP(){return D(KP)}var Ei=1;function Zm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=v.useState({height:0,left:0,top:0,width:0}),n=v.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>Ei||Math.abs(o.left-t.left)>Ei||Math.abs(o.top-t.top)>Ei||Math.abs(o.width-t.width)>Ei)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Ce(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 qP=typeof Symbol=="function"&&Symbol.observable||"@@observable",xd=qP,Du=()=>Math.random().toString(36).substring(7).split("").join("."),UP={INIT:`@@redux/INIT${Du()}`,REPLACE:`@@redux/REPLACE${Du()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Du()}`},ea=UP;function Es(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 Qm(e,t,r){if(typeof e!="function")throw new Error(Ce(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Ce(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Ce(1));return r(Qm)(e,t)}let n=e,i=t,a=new Map,o=a,u=0,l=!1;function s(){o===a&&(o=new Map,a.forEach((y,g)=>{o.set(g,y)}))}function c(){if(l)throw new Error(Ce(3));return i}function f(y){if(typeof y!="function")throw new Error(Ce(4));if(l)throw new Error(Ce(5));let g=!0;s();const b=u++;return o.set(b,y),function(){if(g){if(l)throw new Error(Ce(6));g=!1,s(),o.delete(b),a=null}}}function d(y){if(!Es(y))throw new Error(Ce(7));if(typeof y.type>"u")throw new Error(Ce(8));if(typeof y.type!="string")throw new Error(Ce(17));if(l)throw new Error(Ce(9));try{l=!0,i=n(i,y)}finally{l=!1}return(a=o).forEach(b=>{b()}),y}function p(y){if(typeof y!="function")throw new Error(Ce(10));n=y,d({type:ea.REPLACE})}function h(){const y=f;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(Ce(11));function b(){const x=g;x.next&&x.next(c())}return b(),{unsubscribe:y(b)}},[xd](){return this}}}return d({type:ea.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:p,[xd]:h}}function HP(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ea.INIT})>"u")throw new Error(Ce(12));if(typeof r(void 0,{type:ea.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ce(13))})}function Jm(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{HP(r)}catch(a){i=a}return function(o={},u){if(i)throw i;let l=!1;const s={};for(let c=0;c<n.length;c++){const f=n[c],d=r[f],p=o[f],h=d(p,u);if(typeof h>"u")throw u&&u.type,new Error(Ce(14));s[f]=h,l=l||h!==p}return l=l||n.length!==Object.keys(o).length,l?s:o}}function ta(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function YP(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Ce(15))};const o={getState:i.getState,dispatch:(l,...s)=>a(l,...s)},u=e.map(l=>l(o));return a=ta(...u)(i.dispatch),{...i,dispatch:a}}}function ey(e){return Es(e)&&"type"in e&&typeof e.type=="string"}var ty=Symbol.for("immer-nothing"),Pd=Symbol.for("immer-draftable"),Fe=Symbol.for("immer-state");function ct(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ze=Object,Vr=Ze.getPrototypeOf,ra="constructor",Ha="prototype",wl="configurable",na="enumerable",qi="writable",Nn="value",It=e=>!!e&&!!e[Fe];function dt(e){var t;return e?ry(e)||Ga(e)||!!e[Pd]||!!((t=e[ra])!=null&&t[Pd])||Va(e)||Xa(e):!1}var GP=Ze[Ha][ra].toString(),Od=new WeakMap;function ry(e){if(!e||!_s(e))return!1;const t=Vr(e);if(t===null||t===Ze[Ha])return!0;const r=Ze.hasOwnProperty.call(t,ra)&&t[ra];if(r===Object)return!0;if(!Wr(r))return!1;let n=Od.get(r);return n===void 0&&(n=Function.toString.call(r),Od.set(r,n)),n===GP}function Ya(e,t,r=!0){Gn(e)===0?(r?Reflect.ownKeys(e):Ze.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Gn(e){const t=e[Fe];return t?t.type_:Ga(e)?1:Va(e)?2:Xa(e)?3:0}var Sd=(e,t,r=Gn(e))=>r===2?e.has(t):Ze[Ha].hasOwnProperty.call(e,t),xl=(e,t,r=Gn(e))=>r===2?e.get(t):e[t],ia=(e,t,r,n=Gn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function VP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ga=Array.isArray,Va=e=>e instanceof Map,Xa=e=>e instanceof Set,_s=e=>typeof e=="object",Wr=e=>typeof e=="function",Nu=e=>typeof e=="boolean";function XP(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var _t=e=>e.copy_||e.base_,js=e=>e.modified_?e.copy_:e.base_;function Pl(e,t){if(Va(e))return new Map(e);if(Xa(e))return new Set(e);if(Ga(e))return Array[Ha].slice.call(e);const r=ry(e);if(t===!0||t==="class_only"&&!r){const n=Ze.getOwnPropertyDescriptors(e);delete n[Fe];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],u=n[o];u[qi]===!1&&(u[qi]=!0,u[wl]=!0),(u.get||u.set)&&(n[o]={[wl]:!0,[qi]:!0,[na]:u[na],[Nn]:e[o]})}return Ze.create(Vr(e),n)}else{const n=Vr(e);if(n!==null&&r)return{...e};const i=Ze.create(n);return Ze.assign(i,e)}}function ks(e,t=!1){return Za(e)||It(e)||!dt(e)||(Gn(e)>1&&Ze.defineProperties(e,{set:_i,add:_i,clear:_i,delete:_i}),Ze.freeze(e),t&&Ya(e,(r,n)=>{ks(n,!0)},!1)),e}function ZP(){ct(2)}var _i={[Nn]:ZP};function Za(e){return e===null||!_s(e)?!0:Ze.isFrozen(e)}var aa="MapSet",Ol="Patches",Ad="ArrayMethods",ny={};function Sr(e){const t=ny[e];return t||ct(0,e),t}var Ed=e=>!!ny[e],Rn,iy=()=>Rn,QP=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Ed(aa)?Sr(aa):void 0,arrayMethodsPlugin_:Ed(Ad)?Sr(Ad):void 0});function _d(e,t){t&&(e.patchPlugin_=Sr(Ol),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Sl(e){Al(e),e.drafts_.forEach(JP),e.drafts_=null}function Al(e){e===Rn&&(Rn=e.parent_)}var jd=e=>Rn=QP(Rn,e);function JP(e){const t=e[Fe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Fe].modified_&&(Sl(t),ct(4)),dt(e)&&(e=Cd(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Fe].base_,e,t)}else e=Cd(t,r);return eO(t,e,!0),Sl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ty?e:void 0}function Cd(e,t){if(Za(t))return t;const r=t[Fe];if(!r)return oa(t,e.handledSet_,e);if(!Qa(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);uy(r,e)}return r.copy_}function eO(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ks(t,r)}function ay(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qa=(e,t)=>e.scope_===t,tO=[];function oy(e,t,r,n){const i=_t(e),a=e.type_;if(n!==void 0&&xl(i,n,a)===t){ia(i,n,r,a);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;Ya(i,(l,s)=>{if(It(s)){const c=u.get(s)||[];c.push(l),u.set(s,c)}})}const o=e.draftLocations_.get(t)??tO;for(const u of o)ia(i,u,r,a)}function rO(e,t,r){e.callbacks_.push(function(i){var u;const a=t;if(!a||!Qa(a,i))return;(u=i.mapSetPlugin_)==null||u.fixSetContents(a);const o=js(a);oy(e,a.draft_??a,o,r),uy(a,i)})}function uy(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}ay(e)}}function nO(e,t,r){const{scope_:n}=e;if(It(r)){const i=r[Fe];Qa(i,n)&&i.callbacks_.push(function(){Ui(e);const o=js(i);oy(e,r,o,t)})}else dt(r)&&e.callbacks_.push(function(){const a=_t(e);e.type_===3?a.has(r)&&oa(r,n.handledSet_,n):xl(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&oa(xl(e.copy_,t,e.type_),n.handledSet_,n)})}function oa(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||It(e)||t.has(e)||!dt(e)||Za(e)||(t.add(e),Ya(e,(n,i)=>{if(It(i)){const a=i[Fe];if(Qa(a,r)){const o=js(a);ia(e,n,o,e.type_),ay(a)}}else dt(i)&&oa(i,t,r)})),e}function iO(e,t){const r=Ga(e),n={type_:r?1:0,scope_:t?t.scope_:iy(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=ua;r&&(i=[n],a=$n);const{revoke:o,proxy:u}=Proxy.revocable(i,a);return n.draft_=u,n.revoke_=o,[u,n]}var ua={get(e,t){if(t===Fe)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=_t(e);if(!Sd(i,t,e.type_))return aO(e,i,t);const a=i[t];if(e.finalized_||!dt(a)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&XP(t))return a;if(a===Ru(e.base_,t)){Ui(e);const o=e.type_===1?+t:t,u=_l(e.scope_,a,e,o);return e.copy_[o]=u}return a},has(e,t){return t in _t(e)},ownKeys(e){return Reflect.ownKeys(_t(e))},set(e,t,r){const n=ly(_t(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Ru(_t(e),t),a=i==null?void 0:i[Fe];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(VP(r,i)&&(r!==void 0||Sd(e.base_,t,e.type_)))return!0;Ui(e),El(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),nO(e,t,r)),!0},deleteProperty(e,t){return Ui(e),Ru(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),El(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=_t(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[qi]:!0,[wl]:e.type_!==1||t!=="length",[na]:n[na],[Nn]:r[t]}},defineProperty(){ct(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){ct(12)}},$n={};for(let e in ua){let t=ua[e];$n[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}$n.deleteProperty=function(e,t){return $n.set.call(this,e,t,void 0)};$n.set=function(e,t,r){return ua.set.call(this,e[0],t,r,e[0])};function Ru(e,t){const r=e[Fe];return(r?_t(r):e)[t]}function aO(e,t,r){var i;const n=ly(t,r);return n?Nn in n?n[Nn]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function ly(e,t){if(!(t in e))return;let r=Vr(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Vr(r)}}function El(e){e.modified_||(e.modified_=!0,e.parent_&&El(e.parent_))}function Ui(e){e.copy_||(e.assigned_=new Map,e.copy_=Pl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var oO=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Wr(r)&&!Wr(n)){const o=n;n=r;const u=this;return function(s=o,...c){return u.produce(s,f=>n.call(this,f,...c))}}Wr(n)||ct(6),i!==void 0&&!Wr(i)&&ct(7);let a;if(dt(r)){const o=jd(this),u=_l(o,r,void 0);let l=!0;try{a=n(u),l=!1}finally{l?Sl(o):Al(o)}return _d(o,i),kd(a,o)}else if(!r||!_s(r)){if(a=n(r),a===void 0&&(a=r),a===ty&&(a=void 0),this.autoFreeze_&&ks(a,!0),i){const o=[],u=[];Sr(Ol).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:u}),i(o,u)}return a}else ct(1,r)},this.produceWithPatches=(r,n)=>{if(Wr(r))return(u,...l)=>this.produceWithPatches(u,s=>r(s,...l));let i,a;return[this.produce(r,n,(u,l)=>{i=u,a=l}),i,a]},Nu(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Nu(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Nu(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){dt(t)||ct(8),It(t)&&(t=ot(t));const r=jd(this),n=_l(r,t,void 0);return n[Fe].isManual_=!0,Al(r),n}finishDraft(t,r){const n=t&&t[Fe];(!n||!n.isManual_)&&ct(9);const{scope_:i}=n;return _d(i,r),kd(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=Sr(Ol).applyPatches_;return It(t)?i(t,r):this.produce(t,a=>i(a,r))}};function _l(e,t,r,n){const[i,a]=Va(t)?Sr(aa).proxyMap_(t,r):Xa(t)?Sr(aa).proxySet_(t,r):iO(t,r);return((r==null?void 0:r.scope_)??iy()).drafts_.push(i),a.callbacks_=(r==null?void 0:r.callbacks_)??[],a.key_=n,r&&n!==void 0?rO(r,a,n):a.callbacks_.push(function(l){var c;(c=l.mapSetPlugin_)==null||c.fixSetContents(a);const{patchPlugin_:s}=l;a.modified_&&s&&s.generatePatches_(a,[],l)}),i}function ot(e){return It(e)||ct(10,e),sy(e)}function sy(e){if(!dt(e)||Za(e))return e;const t=e[Fe];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Pl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Pl(e,!0);return Ya(r,(i,a)=>{ia(r,i,sy(a))},n),t&&(t.finalized_=!1),r}var uO=new oO,cy=uO.produce;function fy(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var lO=fy(),sO=fy,cO=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ta:ta.apply(null,arguments)};function Je(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Qe(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>ey(n)&&n.type===e,r}var dy=class kn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,kn.prototype)}static get[Symbol.species](){return kn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new kn(...t[0].concat(this)):new kn(...t.concat(this))}};function Td(e){return dt(e)?cy(e,()=>{}):e}function ji(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function fO(e){return typeof e=="boolean"}var dO=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new dy;return r&&(fO(r)?o.push(lO):o.push(sO(r.extraArgument))),o},vy="RTK_autoBatch",ae=()=>e=>({payload:e,meta:{[vy]:!0}}),Id=e=>t=>{setTimeout(t,e)},py=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const u=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Id(10):e.type==="callback"?e.queueNotification:Id(e.timeout),s=()=>{o=!1,a&&(a=!1,u.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const f=()=>i&&c(),d=n.subscribe(f);return u.add(c),()=>{d(),u.delete(c)}},dispatch(c){var f;try{return i=!((f=c==null?void 0:c.meta)!=null&&f[vy]),a=!i,a&&(o||(o=!0,l(s))),n.dispatch(c)}finally{i=!0}}})},vO=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new dy(e);return n&&i.push(py(typeof n=="object"?n:void 0)),i};function pO(e){const t=dO(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Es(r))u=Jm(r);else throw new Error(Qe(1));let l;typeof n=="function"?l=n(t):l=t();let s=ta;i&&(s=cO({trace:!1,...typeof i=="object"&&i}));const c=YP(...l),f=vO(c);let d=typeof o=="function"?o(f):f();const p=s(...d);return Qm(u,a,p)}function hy(e){const t={},r=[];let n;const i={addCase(a,o){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(Qe(28));if(u in t)throw new Error(Qe(29));return t[u]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function hO(e){return typeof e=="function"}function mO(e,t){let[r,n,i]=hy(t),a;if(hO(e))a=()=>Td(e());else{const u=Td(e);a=()=>u}function o(u=a(),l){let s=[r[l.type],...n.filter(({matcher:c})=>c(l)).map(({reducer:c})=>c)];return s.filter(c=>!!c).length===0&&(s=[i]),s.reduce((c,f)=>{if(f)if(It(c)){const p=f(c,l);return p===void 0?c:p}else{if(dt(c))return cy(c,d=>f(d,l));{const d=f(c,l);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},u)}return o.getInitialState=a,o}var yO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gO=(e=21)=>{let t="",r=e;for(;r--;)t+=yO[Math.random()*64|0];return t},bO=Symbol.for("rtk-slice-createasyncthunk");function wO(e,t){return`${e}/${t}`}function xO({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[bO];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Qe(11));const u=(typeof i.reducers=="function"?i.reducers(OO()):i.reducers)||{},l=Object.keys(u),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(x,O){const w=typeof x=="string"?x:x.type;if(!w)throw new Error(Qe(12));if(w in s.sliceCaseReducersByType)throw new Error(Qe(13));return s.sliceCaseReducersByType[w]=O,c},addMatcher(x,O){return s.sliceMatchers.push({matcher:x,reducer:O}),c},exposeAction(x,O){return s.actionCreators[x]=O,c},exposeCaseReducer(x,O){return s.sliceCaseReducersByName[x]=O,c}};l.forEach(x=>{const O=u[x],w={reducerName:x,type:wO(a,x),createNotation:typeof i.reducers=="function"};AO(O)?_O(w,O,c,t):SO(w,O,c)});function f(){const[x={},O=[],w=void 0]=typeof i.extraReducers=="function"?hy(i.extraReducers):[i.extraReducers],A={...x,...s.sliceCaseReducersByType};return mO(i.initialState,E=>{for(let k in A)E.addCase(k,A[k]);for(let k of s.sliceMatchers)E.addMatcher(k.matcher,k.reducer);for(let k of O)E.addMatcher(k.matcher,k.reducer);w&&E.addDefaultCase(w)})}const d=x=>x,p=new Map,h=new WeakMap;let m;function y(x,O){return m||(m=f()),m(x,O)}function g(){return m||(m=f()),m.getInitialState()}function b(x,O=!1){function w(E){let k=E[x];return typeof k>"u"&&O&&(k=ji(h,w,g)),k}function A(E=d){const k=ji(p,O,()=>new WeakMap);return ji(k,E,()=>{const C={};for(const[T,_]of Object.entries(i.selectors??{}))C[T]=PO(_,E,()=>ji(h,E,g),O);return C})}return{reducerPath:x,getSelectors:A,get selectors(){return A(w)},selectSlice:w}}const P={name:a,reducer:y,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(x,{reducerPath:O,...w}={}){const A=O??o;return x.inject({reducerPath:A,reducer:y},w),{...P,...b(A,!0)}}};return P}}function PO(e,t,r,n){function i(a,...o){let u=t(a);return typeof u>"u"&&n&&(u=r()),e(u,...o)}return i.unwrapped=e,i}var $e=xO();function OO(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function SO({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!EO(n))throw new Error(Qe(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Je(e,o):Je(e))}function AO(e){return e._reducerDefinitionType==="asyncThunk"}function EO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function _O({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Qe(18));const{payloadCreator:a,fulfilled:o,pending:u,rejected:l,settled:s,options:c}=r,f=i(e,a,c);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),u&&n.addCase(f.pending,u),l&&n.addCase(f.rejected,l),s&&n.addMatcher(f.settled,s),n.exposeCaseReducer(t,{fulfilled:o||ki,pending:u||ki,rejected:l||ki,settled:s||ki})}function ki(){}var jO="task",my="listener",yy="completed",Cs="cancelled",kO=`task-${Cs}`,CO=`task-${yy}`,jl=`${my}-${Cs}`,TO=`${my}-${yy}`,Ja=class{constructor(e){Fo(this,"name","TaskAbortError");Fo(this,"message");this.code=e,this.message=`${jO} ${Cs} (reason: ${e})`}},Ts=(e,t)=>{if(typeof e!="function")throw new TypeError(Qe(32))},la=()=>{},gy=(e,t=la)=>(e.catch(t),e),by=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),yr=e=>{if(e.aborted)throw new Ja(e.reason)};function wy(e,t){let r=la;return new Promise((n,i)=>{const a=()=>i(new Ja(e.reason));if(e.aborted){a();return}r=by(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=la})}var IO=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Ja?"cancelled":"rejected",error:r}}finally{t==null||t()}},sa=e=>t=>gy(wy(e,t).then(r=>(yr(e),r))),xy=e=>{const t=sa(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Yr}=Object,Md={},eo="listenerMiddleware",MO=(e,t)=>{const r=n=>by(e,()=>n.abort(e.reason));return(n,i)=>{Ts(n);const a=new AbortController;r(a);const o=IO(async()=>{yr(e),yr(a.signal);const u=await n({pause:sa(a.signal),delay:xy(a.signal),signal:a.signal});return yr(a.signal),u},()=>a.abort(CO));return i!=null&&i.autoJoin&&t.push(o.catch(la)),{result:sa(e)(o),cancel(){a.abort(kO)}}}},DO=(e,t)=>{const r=async(n,i)=>{yr(t);let a=()=>{};const u=[new Promise((l,s)=>{let c=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{c(),s()}})];i!=null&&u.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await wy(t,Promise.race(u));return yr(t),l}finally{a()}};return(n,i)=>gy(r(n,i))},Py=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=Je(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Qe(21));return Ts(a),{predicate:i,type:t,effect:a}},Oy=Yr(e=>{const{type:t,predicate:r,effect:n}=Py(e);return{id:gO(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Qe(22))}}},{withTypes:()=>Oy}),Dd=(e,t)=>{const{type:r,effect:n,predicate:i}=Py(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},kl=e=>{e.pending.forEach(t=>{t.abort(jl)})},NO=(e,t)=>()=>{for(const r of t.keys())kl(r);e.clear()},Nd=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Sy=Yr(Je(`${eo}/add`),{withTypes:()=>Sy}),RO=Je(`${eo}/removeAll`),Ay=Yr(Je(`${eo}/remove`),{withTypes:()=>Ay}),$O=(...e)=>{console.error(`${eo}/error`,...e)},Vn=(e={})=>{const t=new Map,r=new Map,n=p=>{const h=r.get(p)??0;r.set(p,h+1)},i=p=>{const h=r.get(p)??1;h===1?r.delete(p):r.set(p,h-1)},{extra:a,onError:o=$O}=e;Ts(o);const u=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),h=>{p.unsubscribe(),h!=null&&h.cancelActive&&kl(p)}),l=p=>{const h=Dd(t,p)??Oy(p);return u(h)};Yr(l,{withTypes:()=>l});const s=p=>{const h=Dd(t,p);return h&&(h.unsubscribe(),p.cancelActive&&kl(h)),!!h};Yr(s,{withTypes:()=>s});const c=async(p,h,m,y)=>{const g=new AbortController,b=DO(l,g.signal),P=[];try{p.pending.add(g),n(p),await Promise.resolve(p.effect(h,Yr({},m,{getOriginalState:y,condition:(x,O)=>b(x,O).then(Boolean),take:b,delay:xy(g.signal),pause:sa(g.signal),extra:a,signal:g.signal,fork:MO(g.signal,P),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((x,O,w)=>{x!==g&&(x.abort(jl),w.delete(x))})},cancel:()=>{g.abort(jl),p.pending.delete(g)},throwIfCancelled:()=>{yr(g.signal)}})))}catch(x){x instanceof Ja||Nd(o,x,{raisedBy:"effect"})}finally{await Promise.all(P),g.abort(TO),i(p),p.pending.delete(g)}},f=NO(t,r);return{middleware:p=>h=>m=>{if(!ey(m))return h(m);if(Sy.match(m))return l(m.payload);if(RO.match(m)){f();return}if(Ay.match(m))return s(m.payload);let y=p.getState();const g=()=>{if(y===Md)throw new Error(Qe(23));return y};let b;try{if(b=h(m),t.size>0){const P=p.getState(),x=Array.from(t.values());for(const O of x){let w=!1;try{w=O.predicate(m,P,y)}catch(A){w=!1,Nd(o,A,{raisedBy:"predicate"})}w&&c(O,m,p,g)}}}finally{y=Md}return b},startListening:l,stopListening:s,clearListeners:f}};function Qe(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 LO={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Ey=$e({name:"chartLayout",initialState:LO,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 r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:BO,setLayout:zO,setChartSize:FO,setScale:KO}=Ey.actions,WO=Ey.reducer;function _y(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function V(e){return Number.isFinite(e)}function Jt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Rd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rd(Object(r),!0).forEach(function(n){qO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qO(e,t,r){return(t=UO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UO(e){var t=HO(e,"string");return typeof t=="symbol"?t:t+""}function HO(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ne(e,t,r){return ge(e)||ge(t)?r:Pt(t)?Pr(e,t,r):typeof t=="function"?t(e):r}var YO=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:u}=t;if((u==="vertical"||u==="horizontal"&&o==="middle")&&a!=="center"&&L(e[a]))return qr(qr({},e),{},{[a]:e[a]+(n||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&o!=="middle"&&L(e[o]))return qr(qr({},e),{},{[o]:e[o]+(i||0)})}return e},Lt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",jy=(e,t)=>{if(!t||t.length!==2||!L(t[0])||!L(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!L(e[0])||e[0]<r)&&(i[0]=r),(!L(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},GO=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,u=0;u<r;++u){var l=e[u],s=l==null?void 0:l[i];if(s!=null){var c=s[1],f=s[0],d=xt(c)?f:c;d>=0?(s[0]=a,a+=d,s[1]=a):(s[0]=o,o+=d,s[1]=o)}}}},VO=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var u=e[o],l=u==null?void 0:u[i];if(l!=null){var s=xt(l[1])?l[0]:l[1];s>=0?(l[0]=a,a+=s,l[1]=a):(l[0]=0,l[1]=0)}}}},XO={sign:GO,expand:xx,none:xr,silhouette:Px,wiggle:Ox,positive:VO},ZO=(e,t,r)=>{var n,i=(n=XO[r])!==null&&n!==void 0?n:xr,a=wx().keys(t).value((u,l)=>Number(ne(u,l,0))).order(gl).offset(i),o=a(e);return o.forEach((u,l)=>{u.forEach((s,c)=>{var f=ne(e[c],t[l],0);Array.isArray(f)&&f.length===2&&L(f[0])&&L(f[1])&&(s[0]=f[0],s[1]=f[1])})}),o};function Is(e){return e==null?void 0:String(e)}var ca=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var u=ne(a,t.dataKey,t.scale.domain()[o]);if(ge(u))return null;var l=t.scale.map(u);return L(l)?l-i/2+n:null},ky=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},QO=e=>{var t=e.flat(2).filter(L);return[Math.min(...t),Math.max(...t)]},JO=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],e1=(e,t,r)=>{if(e!=null)return JO(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:o}=a,u=o.reduce((l,s)=>{var c=_y(s,t,r),f=QO(c);return!V(f[0])||!V(f[1])?l:[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},$d=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ld=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,er=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Ua(t,c=>c.coordinate),a=1/0,o=1,u=i.length;o<u;o++){var l=i[o],s=i[o-1];a=Math.min(((l==null?void 0:l.coordinate)||0)-((s==null?void 0:s.coordinate)||0),a)}return a===1/0?0:a}return r?void 0:0};function Bd(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return qr(qr({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Xn(e,t){if(e)return String(e);if(typeof t=="string")return t}var t1=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},r1=(e,t)=>t==="centric"?e.angle:e.radius,Bt=e=>e.layout.width,zt=e=>e.layout.height,n1=e=>e.layout.scale,Cy=e=>e.layout.margin,to=S(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ro=S(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Ty="data-recharts-item-index",Iy="data-recharts-item-id",Zn=60;function zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ci(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(r),!0).forEach(function(n){i1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i1(e,t,r){return(t=a1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a1(e){var t=o1(e,"string");return typeof t=="symbol"?t:t+""}function o1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u1=e=>e.brush.height;function l1(e){var t=ro(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Zn;return r+i}return r},0)}function s1(e){var t=ro(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Zn;return r+i}return r},0)}function c1(e){var t=to(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function f1(e){var t=to(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ae=S([Bt,zt,Cy,u1,l1,s1,c1,f1,Xm,zP],(e,t,r,n,i,a,o,u,l,s)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+u},d=Ci(Ci({},f),c),p=d.bottom;d.bottom+=n,d=YO(d,l,s);var h=e-d.left-d.right,m=t-d.top-d.bottom;return Ci(Ci({brushBottom:p},d),{},{width:Math.max(h,0),height:Math.max(m,0)})}),d1=S(Ae,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ms=S(Bt,zt,(e,t)=>({x:0,y:0,width:e,height:t})),v1=v.createContext(null),He=()=>v.useContext(v1)!=null,no=e=>e.brush,io=S([no,Ae,Cy],(e,t,r)=>({height:e.height,x:L(e.x)?e.x:t.left,y:L(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:L(e.width)?e.width:t.width})),$u={},Lu={},Bu={},Fd;function p1(){return Fd||(Fd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let o,u=null;const l=a!=null&&a.includes("leading"),s=a==null||a.includes("trailing"),c=()=>{u!==null&&(r.apply(o,u),o=void 0,u=null)},f=()=>{s&&c(),m()};let d=null;const p=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},n)},h=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{h(),o=void 0,u=null},y=()=>{c()},g=function(...b){if(i!=null&&i.aborted)return;o=this,u=b;const P=d==null;p(),l&&P&&c()};return g.schedule=p,g.cancel=m,g.flush=y,i==null||i.addEventListener("abort",m,{once:!0}),g}e.debounce=t})(Bu)),Bu}var Kd;function h1(){return Kd||(Kd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p1();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:u=!0,maxWait:l}=a,s=Array(2);o&&(s[0]="leading"),u&&(s[1]="trailing");let c,f=null;const d=t.debounce(function(...m){c=n.apply(this,m),f=null},i,{edges:s}),p=function(...m){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(c=n.apply(this,m),f=Date.now(),d.cancel(),d.schedule(),c):(d.apply(this,m),c)},h=()=>(d.flush(),c);return p.cancel=d.cancel,p.flush=h,p}e.debounce=r})(Lu)),Lu}var Wd;function m1(){return Wd||(Wd=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=h1();function r(n,i=0,a={}){const{leading:o=!0,trailing:u=!0}=a;return t.debounce(n,i,{leading:o,maxWait:i,trailing:u})}e.throttle=r})($u)),$u}var zu,qd;function y1(){return qd||(qd=1,zu=m1().throttle),zu}var g1=y1();const b1=Cr(g1);var Ud=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},gt={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},My=(e,t,r)=>{var{width:n=gt.width,height:i=gt.height,aspect:a,maxHeight:o}=r,u=Or(n)?e:Number(n),l=Or(i)?t:Number(i);return a&&a>0&&(u?l=u/a:l&&(u=l*a),o&&l!=null&&l>o&&(l=o)),{calculatedWidth:u,calculatedHeight:l}},w1={width:0,height:0,overflow:"visible"},x1={width:0,overflowX:"visible"},P1={height:0,overflowY:"visible"},O1={},S1=e=>{var{width:t,height:r}=e,n=Or(t),i=Or(r);return n&&i?w1:n?x1:i?P1:O1};function A1(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i=gt.width,a=gt.height):i===void 0?i=n&&n>0?void 0:gt.width:a===void 0&&(a=n&&n>0?void 0:gt.height),{width:i,height:a}}function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cl.apply(null,arguments)}function Hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(r),!0).forEach(function(n){E1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E1(e,t,r){return(t=_1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _1(e){var t=j1(e,"string");return typeof t=="symbol"?t:t+""}function j1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dy=v.createContext(gt.initialDimension);function k1(e){return Jt(e.width)&&Jt(e.height)}function Ny(e){var{children:t,width:r,height:n}=e,i=v.useMemo(()=>({width:r,height:n}),[r,n]);return k1(i)?v.createElement(Dy.Provider,{value:i},t):null}var Ds=()=>v.useContext(Dy),C1=v.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=gt.initialDimension,width:i,height:a,minWidth:o=gt.minWidth,minHeight:u,maxHeight:l,children:s,debounce:c=gt.debounce,id:f,className:d,onResize:p,style:h={}}=e,m=v.useRef(null),y=v.useRef();y.current=p,v.useImperativeHandle(t,()=>m.current);var[g,b]=v.useState({containerWidth:n.width,containerHeight:n.height}),P=v.useCallback((E,k)=>{b(C=>{var T=Math.round(E),_=Math.round(k);return C.containerWidth===T&&C.containerHeight===_?C:{containerWidth:T,containerHeight:_}})},[]);v.useEffect(()=>{if(m.current==null||typeof ResizeObserver>"u")return $t;var E=_=>{var B,$=_[0];if($!=null){var{width:z,height:K}=$.contentRect;P(z,K),(B=y.current)===null||B===void 0||B.call(y,z,K)}};c>0&&(E=b1(E,c,{trailing:!0,leading:!1}));var k=new ResizeObserver(E),{width:C,height:T}=m.current.getBoundingClientRect();return P(C,T),k.observe(m.current),()=>{k.disconnect()}},[P,c]);var{containerWidth:x,containerHeight:O}=g;Ud(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:w,calculatedHeight:A}=My(x,O,{width:i,height:a,aspect:r,maxHeight:l});return Ud(w!=null&&w>0||A!=null&&A>0,`The width(%s) and height(%s) of chart should be greater than 0,
@@ -1 +1 @@
1
- import{r as c,a as k,j as e}from"./index-CGEJi5Pf.js";import{u as F,a as P,i as H,B as z,C as L,M as R,H as J,P as O}from"./style-4NfIX256.js";import"./index-DabDEe52.js";const M={landing:"#2196f3",form:"#ff9800",selection:"#4caf50",listing:"#9c27b0",comparison:"#e91e63",detail:"#00bcd4",map:"#009688",calculator:"#ffc107",confirmation:"#3f51b5",success:"#4caf50",dashboard:"#607d8b",page:"#757575"},V={navigation:"#6c757d",form_submit:"#2196f3",redirect:"#ff9800",back:"#9e9e9e"},D=280,W=220,X=c.memo(function({data:o}){const{screen:a,screenshotUrl:s,onSelect:l}=o,r=M[a.screenType]??"#757575";return e.jsxs(e.Fragment,{children:[e.jsx(J,{type:"target",position:O.Top,className:"!w-2 !h-2"}),e.jsxs("div",{className:"bg-surface border-2 rounded-lg shadow-md hover:shadow-lg transition-shadow cursor-pointer overflow-hidden",style:{borderColor:r,width:D},onClick:()=>l(a),children:[e.jsxs("div",{className:"relative w-full bg-surface-elevated",style:{height:140},children:[s?e.jsx("img",{src:s,alt:a.title,className:"w-full h-full object-cover",loading:"lazy"}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted text-xs",children:"No screenshot"}),e.jsx("span",{className:"absolute top-1.5 left-1.5 text-[9px] font-bold uppercase px-1.5 py-0.5 rounded text-white",style:{background:r},children:a.screenType})]}),e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-sm font-semibold leading-tight line-clamp-1",children:a.title}),a.url&&e.jsx("div",{className:"text-[10px] text-muted truncate mt-0.5",children:a.url}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.fields&&a.fields.length>0&&e.jsxs("span",{className:"text-[9px] px-1 py-0.5 rounded bg-surface-elevated text-muted",children:[a.fields.length," fields"]}),a.ctas&&a.ctas.length>0&&e.jsxs("span",{className:"text-[9px] px-1 py-0.5 rounded bg-surface-elevated text-muted",children:[a.ctas.length," CTAs"]})]})]})]}),e.jsx(J,{type:"source",position:O.Bottom,className:"!w-2 !h-2"})]})}),Y={journeyScreen:X};function B(t,o){var i;const a=new Map,s=new Map;for(const n of t)a.set(n.id,[]),s.set(n.id,0);for(const n of o)(i=a.get(n.from))==null||i.push(n.to),s.set(n.to,(s.get(n.to)??0)+1);const l=[],r=[],f=new Set;for(const n of t)(s.get(n.id)??0)===0&&r.push(n.id);for(;r.length>0;){const n=[...r];l.push(n),r.length=0;for(const d of n){f.add(d);for(const x of a.get(d)??[])if(!f.has(x)){const b=(s.get(x)??1)-1;s.set(x,b),b<=0&&!f.has(x)&&r.push(x)}}}for(const n of t)f.has(n.id)||(l.length===0&&l.push([]),l[l.length-1].push(n.id));const j=new Map(t.map(n=>[n.id,n])),u=D+60,v=W+80,y=[];for(let n=0;n<l.length;n++){const d=l[n],b=-(d.length*u)/2+u/2;for(let N=0;N<d.length;N++){const m=j.get(d[N]);m&&y.push({id:m.id,type:"journeyScreen",position:{x:m.positionX!==0?m.positionX:b+N*u,y:m.positionY!==0?m.positionY:n*v},data:{screen:m,screenshotUrl:m.screenshot?`/api/v1/journey/screenshots/_/${m.screenshot}`:void 0,onSelect:()=>{}}})}}return y}function G(t){return t.map(o=>({id:o.id,source:o.from,target:o.to,label:o.label??"",type:"smoothstep",animated:o.type==="form_submit",style:{stroke:V[o.type]??"#6c757d",strokeWidth:2},labelStyle:{fontSize:10,fill:"var(--color-text-muted)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.8}}))}function $({screen:t,onClose:o}){const a=M[t.screenType]??"#757575";return e.jsxs("div",{className:"w-80 h-full border-l border-edge bg-surface overflow-y-auto p-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-bold uppercase px-2 py-0.5 rounded text-white",style:{background:a},children:t.screenType}),e.jsx("button",{onClick:o,className:"text-muted hover:text-foreground",children:"X"})]}),e.jsx("h3",{className:"text-lg font-semibold",children:t.title}),t.url&&e.jsx("div",{className:"text-xs text-muted break-all",children:t.url}),t.description&&e.jsx("p",{className:"text-sm text-muted",children:t.description}),t.screenshot&&e.jsx("div",{className:"rounded-lg overflow-hidden border border-edge",children:e.jsx("img",{src:`/api/v1/journey/screenshots/_/${t.screenshot}`,alt:t.title,className:"w-full"})}),t.fields&&t.fields.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:["Form Fields (",t.fields.length,")"]}),e.jsx("div",{className:"space-y-1.5",children:t.fields.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-sm bg-surface-alt rounded px-2 py-1",children:[e.jsx("span",{className:"font-mono text-xs text-accent",children:s.type}),e.jsx("span",{children:s.label??s.name}),s.required&&e.jsx("span",{className:"text-[9px] text-red-400 font-bold",children:"*"})]},s.name))})]}),t.ctas&&t.ctas.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:["CTAs (",t.ctas.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.ctas.map(s=>e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-accent text-white",children:s},s))})]}),t.metadata&&Object.keys(t.metadata).length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:"Metadata"}),e.jsx("pre",{className:"text-[10px] bg-surface-alt rounded p-2 overflow-x-auto",children:JSON.stringify(t.metadata,null,2)})]})]})}function T({maps:t,selectedId:o,onSelect:a,onImport:s,loading:l}){return l?e.jsx("div",{className:"flex items-center justify-center h-full text-muted",children:"Loading journey maps..."}):t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted",children:[e.jsx("div",{className:"text-5xl",children:"🗺"}),e.jsx("p",{className:"text-sm font-medium",children:"No journey maps yet"}),e.jsx("p",{className:"text-xs text-center max-w-xs",children:"Import a journey map JSON file or capture website screens to create a journey flow visualization."}),e.jsx("button",{onClick:s,className:"px-4 py-2 rounded-lg bg-accent text-white text-sm hover:opacity-90 transition-opacity",children:"Import Journey Map"})]}):e.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-edge bg-surface-alt",children:[e.jsx("label",{className:"text-xs font-medium text-muted",children:"Journey:"}),e.jsx("select",{value:o??"",onChange:r=>a(r.target.value),className:"text-sm bg-surface border border-edge rounded px-2 py-1 flex-1",children:t.map(r=>e.jsx("option",{value:r.id,children:r.name},r.id))}),e.jsx("button",{onClick:s,className:"text-xs px-2 py-1 rounded bg-surface-elevated hover:bg-edge text-muted",children:"+ Import"})]})}function U({variants:t,activeVariant:o,onSelect:a}){return t.length===0?null:e.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-edge",children:[e.jsx("label",{className:"text-xs font-medium text-muted",children:"Variant:"}),e.jsx("button",{onClick:()=>a(null),className:`text-xs px-2 py-1 rounded ${o===null?"bg-accent text-white":"bg-surface-elevated text-muted"}`,children:"All"}),t.map(s=>e.jsx("button",{onClick:()=>a(s.id),className:`text-xs px-2 py-1 rounded ${o===s.id?"bg-accent text-white":"bg-surface-elevated text-muted"}`,title:s.description,children:s.name},s.id))]})}function _({open:t,onClose:o,onImported:a}){const[s,l]=c.useState(""),[r,f]=c.useState(null),[j,u]=c.useState(!1);if(!t)return null;const v=async()=>{f(null),u(!0);try{const i=JSON.parse(s);await k.importJourneyMap(i),a(),o(),l("")}catch(i){f(i instanceof Error?i.message:"Import failed")}finally{u(!1)}},y=i=>{var x;const n=(x=i.target.files)==null?void 0:x[0];if(!n)return;const d=new FileReader;d.onload=()=>l(d.result),d.readAsText(n)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsxs("div",{className:"bg-surface rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] overflow-y-auto",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Import Journey Map"}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload JSON file"}),e.jsx("input",{type:"file",accept:".json",onChange:y,className:"text-sm"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Or paste JSON"}),e.jsx("textarea",{value:s,onChange:i=>l(i.target.value),rows:10,className:"w-full text-xs font-mono bg-surface-alt border border-edge rounded p-2",placeholder:'{"journey": {"name": "..."}, "screens": [...], "edges": [...]}'})]}),r&&e.jsx("div",{className:"text-sm text-danger mb-3",children:r}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:o,className:"px-3 py-1.5 text-sm rounded-lg border border-edge hover:bg-surface-alt",children:"Cancel"}),e.jsx("button",{onClick:v,disabled:!s.trim()||j,className:"px-3 py-1.5 text-sm rounded-lg bg-accent text-white hover:opacity-90 disabled:opacity-50",children:j?"Importing...":"Import"})]})]})})}const q={hideAttribution:!0};function ee(){const[t,o]=c.useState([]),[a,s]=c.useState(null),[l,r]=c.useState(null),[f,j]=c.useState(null),[u,v]=c.useState(null),[y,i]=c.useState(!1),[n,d]=c.useState(!0),[x,b,N]=F([]),[m,C,A]=P([]),S=c.useCallback(async()=>{try{const p=await k.getJourneyMaps();o(p.maps),p.maps.length>0&&!a&&s(p.maps[0].id)}catch{o([])}finally{d(!1)}},[a]),E=c.useCallback(async p=>{try{const h=await k.getJourneyMap(p);r(h)}catch{r(null)}},[]);c.useEffect(()=>{S()},[S]),c.useEffect(()=>{a&&E(a)},[a,E]);const w=c.useMemo(()=>{if(!l)return null;if(!u)return l;const p=l.variants.find(g=>g.id===u);if(!p)return l;const h=new Set(p.path);return{...l,screens:l.screens.filter(g=>h.has(g.id)),edges:l.edges.filter(g=>h.has(g.from)&&h.has(g.to))}},[l,u]);c.useEffect(()=>{if(!w){b([]),C([]);return}const h=B(w.screens,w.edges).map(g=>({...g,data:{...g.data,onSelect:j}}));b(h),C(G(w.edges))},[w,b,C]);const I=c.useCallback(()=>{d(!0),S()},[S]);return n||t.length===0?e.jsxs(e.Fragment,{children:[e.jsx(T,{maps:t,selectedId:a,onSelect:s,onImport:()=>i(!0),loading:n}),e.jsx(_,{open:y,onClose:()=>i(!1),onImported:I})]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(T,{maps:t,selectedId:a,onSelect:s,onImport:()=>i(!0),loading:!1}),l&&e.jsx(U,{variants:l.variants,activeVariant:u,onSelect:v}),e.jsxs("div",{className:"flex-1 flex min-h-0",children:[e.jsx("div",{className:"flex-1",children:e.jsxs(H,{nodes:x,edges:m,onNodesChange:N,onEdgesChange:A,nodeTypes:Y,proOptions:q,fitView:!0,minZoom:.1,maxZoom:3,defaultViewport:{x:0,y:0,zoom:.7},children:[e.jsx(z,{color:"var(--color-border)",gap:20}),e.jsx(L,{position:"bottom-left"}),e.jsx(R,{nodeColor:p=>{const h=p.data;return M[h.screen.screenType]??"#757575"},maskColor:"rgba(0,0,0,0.1)",position:"bottom-right"})]})}),f&&e.jsx($,{screen:f,onClose:()=>j(null)})]}),e.jsx(_,{open:y,onClose:()=>i(!1),onImported:I})]})}export{ee as JourneyTab};
1
+ import{r as c,a as k,j as e}from"./index-C_1iski-.js";import{u as F,a as P,i as H,B as z,C as L,M as R,H as J,P as O}from"./style-gKCWR_EQ.js";import"./index-BWMXofAC.js";const M={landing:"#2196f3",form:"#ff9800",selection:"#4caf50",listing:"#9c27b0",comparison:"#e91e63",detail:"#00bcd4",map:"#009688",calculator:"#ffc107",confirmation:"#3f51b5",success:"#4caf50",dashboard:"#607d8b",page:"#757575"},V={navigation:"#6c757d",form_submit:"#2196f3",redirect:"#ff9800",back:"#9e9e9e"},D=280,W=220,X=c.memo(function({data:o}){const{screen:a,screenshotUrl:s,onSelect:l}=o,r=M[a.screenType]??"#757575";return e.jsxs(e.Fragment,{children:[e.jsx(J,{type:"target",position:O.Top,className:"!w-2 !h-2"}),e.jsxs("div",{className:"bg-surface border-2 rounded-lg shadow-md hover:shadow-lg transition-shadow cursor-pointer overflow-hidden",style:{borderColor:r,width:D},onClick:()=>l(a),children:[e.jsxs("div",{className:"relative w-full bg-surface-elevated",style:{height:140},children:[s?e.jsx("img",{src:s,alt:a.title,className:"w-full h-full object-cover",loading:"lazy"}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted text-xs",children:"No screenshot"}),e.jsx("span",{className:"absolute top-1.5 left-1.5 text-[9px] font-bold uppercase px-1.5 py-0.5 rounded text-white",style:{background:r},children:a.screenType})]}),e.jsxs("div",{className:"p-2",children:[e.jsx("div",{className:"text-sm font-semibold leading-tight line-clamp-1",children:a.title}),a.url&&e.jsx("div",{className:"text-[10px] text-muted truncate mt-0.5",children:a.url}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.fields&&a.fields.length>0&&e.jsxs("span",{className:"text-[9px] px-1 py-0.5 rounded bg-surface-elevated text-muted",children:[a.fields.length," fields"]}),a.ctas&&a.ctas.length>0&&e.jsxs("span",{className:"text-[9px] px-1 py-0.5 rounded bg-surface-elevated text-muted",children:[a.ctas.length," CTAs"]})]})]})]}),e.jsx(J,{type:"source",position:O.Bottom,className:"!w-2 !h-2"})]})}),Y={journeyScreen:X};function B(t,o){var i;const a=new Map,s=new Map;for(const n of t)a.set(n.id,[]),s.set(n.id,0);for(const n of o)(i=a.get(n.from))==null||i.push(n.to),s.set(n.to,(s.get(n.to)??0)+1);const l=[],r=[],f=new Set;for(const n of t)(s.get(n.id)??0)===0&&r.push(n.id);for(;r.length>0;){const n=[...r];l.push(n),r.length=0;for(const d of n){f.add(d);for(const x of a.get(d)??[])if(!f.has(x)){const b=(s.get(x)??1)-1;s.set(x,b),b<=0&&!f.has(x)&&r.push(x)}}}for(const n of t)f.has(n.id)||(l.length===0&&l.push([]),l[l.length-1].push(n.id));const j=new Map(t.map(n=>[n.id,n])),u=D+60,v=W+80,y=[];for(let n=0;n<l.length;n++){const d=l[n],b=-(d.length*u)/2+u/2;for(let N=0;N<d.length;N++){const m=j.get(d[N]);m&&y.push({id:m.id,type:"journeyScreen",position:{x:m.positionX!==0?m.positionX:b+N*u,y:m.positionY!==0?m.positionY:n*v},data:{screen:m,screenshotUrl:m.screenshot?`/api/v1/journey/screenshots/_/${m.screenshot}`:void 0,onSelect:()=>{}}})}}return y}function G(t){return t.map(o=>({id:o.id,source:o.from,target:o.to,label:o.label??"",type:"smoothstep",animated:o.type==="form_submit",style:{stroke:V[o.type]??"#6c757d",strokeWidth:2},labelStyle:{fontSize:10,fill:"var(--color-text-muted)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.8}}))}function $({screen:t,onClose:o}){const a=M[t.screenType]??"#757575";return e.jsxs("div",{className:"w-80 h-full border-l border-edge bg-surface overflow-y-auto p-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-bold uppercase px-2 py-0.5 rounded text-white",style:{background:a},children:t.screenType}),e.jsx("button",{onClick:o,className:"text-muted hover:text-foreground",children:"X"})]}),e.jsx("h3",{className:"text-lg font-semibold",children:t.title}),t.url&&e.jsx("div",{className:"text-xs text-muted break-all",children:t.url}),t.description&&e.jsx("p",{className:"text-sm text-muted",children:t.description}),t.screenshot&&e.jsx("div",{className:"rounded-lg overflow-hidden border border-edge",children:e.jsx("img",{src:`/api/v1/journey/screenshots/_/${t.screenshot}`,alt:t.title,className:"w-full"})}),t.fields&&t.fields.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:["Form Fields (",t.fields.length,")"]}),e.jsx("div",{className:"space-y-1.5",children:t.fields.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-sm bg-surface-alt rounded px-2 py-1",children:[e.jsx("span",{className:"font-mono text-xs text-accent",children:s.type}),e.jsx("span",{children:s.label??s.name}),s.required&&e.jsx("span",{className:"text-[9px] text-red-400 font-bold",children:"*"})]},s.name))})]}),t.ctas&&t.ctas.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:["CTAs (",t.ctas.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.ctas.map(s=>e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-accent text-white",children:s},s))})]}),t.metadata&&Object.keys(t.metadata).length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-semibold uppercase text-muted mb-1.5",children:"Metadata"}),e.jsx("pre",{className:"text-[10px] bg-surface-alt rounded p-2 overflow-x-auto",children:JSON.stringify(t.metadata,null,2)})]})]})}function T({maps:t,selectedId:o,onSelect:a,onImport:s,loading:l}){return l?e.jsx("div",{className:"flex items-center justify-center h-full text-muted",children:"Loading journey maps..."}):t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted",children:[e.jsx("div",{className:"text-5xl",children:"🗺"}),e.jsx("p",{className:"text-sm font-medium",children:"No journey maps yet"}),e.jsx("p",{className:"text-xs text-center max-w-xs",children:"Import a journey map JSON file or capture website screens to create a journey flow visualization."}),e.jsx("button",{onClick:s,className:"px-4 py-2 rounded-lg bg-accent text-white text-sm hover:opacity-90 transition-opacity",children:"Import Journey Map"})]}):e.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-edge bg-surface-alt",children:[e.jsx("label",{className:"text-xs font-medium text-muted",children:"Journey:"}),e.jsx("select",{value:o??"",onChange:r=>a(r.target.value),className:"text-sm bg-surface border border-edge rounded px-2 py-1 flex-1",children:t.map(r=>e.jsx("option",{value:r.id,children:r.name},r.id))}),e.jsx("button",{onClick:s,className:"text-xs px-2 py-1 rounded bg-surface-elevated hover:bg-edge text-muted",children:"+ Import"})]})}function U({variants:t,activeVariant:o,onSelect:a}){return t.length===0?null:e.jsxs("div",{className:"flex items-center gap-2 p-2 border-b border-edge",children:[e.jsx("label",{className:"text-xs font-medium text-muted",children:"Variant:"}),e.jsx("button",{onClick:()=>a(null),className:`text-xs px-2 py-1 rounded ${o===null?"bg-accent text-white":"bg-surface-elevated text-muted"}`,children:"All"}),t.map(s=>e.jsx("button",{onClick:()=>a(s.id),className:`text-xs px-2 py-1 rounded ${o===s.id?"bg-accent text-white":"bg-surface-elevated text-muted"}`,title:s.description,children:s.name},s.id))]})}function _({open:t,onClose:o,onImported:a}){const[s,l]=c.useState(""),[r,f]=c.useState(null),[j,u]=c.useState(!1);if(!t)return null;const v=async()=>{f(null),u(!0);try{const i=JSON.parse(s);await k.importJourneyMap(i),a(),o(),l("")}catch(i){f(i instanceof Error?i.message:"Import failed")}finally{u(!1)}},y=i=>{var x;const n=(x=i.target.files)==null?void 0:x[0];if(!n)return;const d=new FileReader;d.onload=()=>l(d.result),d.readAsText(n)};return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsxs("div",{className:"bg-surface rounded-lg shadow-xl w-full max-w-lg p-6 max-h-[80vh] overflow-y-auto",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Import Journey Map"}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Upload JSON file"}),e.jsx("input",{type:"file",accept:".json",onChange:y,className:"text-sm"})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Or paste JSON"}),e.jsx("textarea",{value:s,onChange:i=>l(i.target.value),rows:10,className:"w-full text-xs font-mono bg-surface-alt border border-edge rounded p-2",placeholder:'{"journey": {"name": "..."}, "screens": [...], "edges": [...]}'})]}),r&&e.jsx("div",{className:"text-sm text-danger mb-3",children:r}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{onClick:o,className:"px-3 py-1.5 text-sm rounded-lg border border-edge hover:bg-surface-alt",children:"Cancel"}),e.jsx("button",{onClick:v,disabled:!s.trim()||j,className:"px-3 py-1.5 text-sm rounded-lg bg-accent text-white hover:opacity-90 disabled:opacity-50",children:j?"Importing...":"Import"})]})]})})}const q={hideAttribution:!0};function ee(){const[t,o]=c.useState([]),[a,s]=c.useState(null),[l,r]=c.useState(null),[f,j]=c.useState(null),[u,v]=c.useState(null),[y,i]=c.useState(!1),[n,d]=c.useState(!0),[x,b,N]=F([]),[m,C,A]=P([]),S=c.useCallback(async()=>{try{const p=await k.getJourneyMaps();o(p.maps),p.maps.length>0&&!a&&s(p.maps[0].id)}catch{o([])}finally{d(!1)}},[a]),E=c.useCallback(async p=>{try{const h=await k.getJourneyMap(p);r(h)}catch{r(null)}},[]);c.useEffect(()=>{S()},[S]),c.useEffect(()=>{a&&E(a)},[a,E]);const w=c.useMemo(()=>{if(!l)return null;if(!u)return l;const p=l.variants.find(g=>g.id===u);if(!p)return l;const h=new Set(p.path);return{...l,screens:l.screens.filter(g=>h.has(g.id)),edges:l.edges.filter(g=>h.has(g.from)&&h.has(g.to))}},[l,u]);c.useEffect(()=>{if(!w){b([]),C([]);return}const h=B(w.screens,w.edges).map(g=>({...g,data:{...g.data,onSelect:j}}));b(h),C(G(w.edges))},[w,b,C]);const I=c.useCallback(()=>{d(!0),S()},[S]);return n||t.length===0?e.jsxs(e.Fragment,{children:[e.jsx(T,{maps:t,selectedId:a,onSelect:s,onImport:()=>i(!0),loading:n}),e.jsx(_,{open:y,onClose:()=>i(!1),onImported:I})]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx(T,{maps:t,selectedId:a,onSelect:s,onImport:()=>i(!0),loading:!1}),l&&e.jsx(U,{variants:l.variants,activeVariant:u,onSelect:v}),e.jsxs("div",{className:"flex-1 flex min-h-0",children:[e.jsx("div",{className:"flex-1",children:e.jsxs(H,{nodes:x,edges:m,onNodesChange:N,onEdgesChange:A,nodeTypes:Y,proOptions:q,fitView:!0,minZoom:.1,maxZoom:3,defaultViewport:{x:0,y:0,zoom:.7},children:[e.jsx(z,{color:"var(--color-border)",gap:20}),e.jsx(L,{position:"bottom-left"}),e.jsx(R,{nodeColor:p=>{const h=p.data;return M[h.screen.screenType]??"#757575"},maskColor:"rgba(0,0,0,0.1)",position:"bottom-right"})]})}),f&&e.jsx($,{screen:f,onClose:()=>j(null)})]}),e.jsx(_,{open:y,onClose:()=>i(!1),onImported:I})]})}export{ee as JourneyTab};
@@ -1,2 +1,2 @@
1
- import{r as s,a as v,j as t}from"./index-CGEJi5Pf.js";function w(){const[r,o]=s.useState([]),[c,h]=s.useState(!0),d=s.useRef(0),p=s.useCallback(async()=>{try{const{logs:n}=await v.getLogs();o(n),n.length>0&&(d.current=n[n.length-1].id)}finally{h(!1)}},[]),x=s.useCallback(async()=>{await v.clearLogs(),o([]),d.current=0},[]);return s.useEffect(()=>{p()},[p]),s.useEffect(()=>{const n=new EventSource("/api/v1/events"),i=m=>{try{const l=JSON.parse(m.data),a={id:l.payload.id,level:l.payload.level,message:l.payload.message,context:l.payload.context,timestamp:l.timestamp};a.id>d.current&&(d.current=a.id,o(b=>[...b,a]))}catch{}};return n.addEventListener("log:entry",i),n.onerror=()=>{n.close(),setTimeout(()=>{},5e3)},()=>n.close()},[]),{logs:r,loading:c,clearLogs:x,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(r){return new Date(r).toLocaleTimeString("en-US",{hour12:!1})}function L(r){return!r||Object.keys(r).length===0?"":Object.entries(r).map(([o,c])=>`${o}="${String(c)}"`).join(" ")}function j(r){return r.map(o=>{const c=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${c?" "+c:""}`}).join(`
1
+ import{r as s,a as v,j as t}from"./index-C_1iski-.js";function w(){const[r,o]=s.useState([]),[c,h]=s.useState(!0),d=s.useRef(0),p=s.useCallback(async()=>{try{const{logs:n}=await v.getLogs();o(n),n.length>0&&(d.current=n[n.length-1].id)}finally{h(!1)}},[]),x=s.useCallback(async()=>{await v.clearLogs(),o([]),d.current=0},[]);return s.useEffect(()=>{p()},[p]),s.useEffect(()=>{const n=new EventSource("/api/v1/events"),i=m=>{try{const l=JSON.parse(m.data),a={id:l.payload.id,level:l.payload.level,message:l.payload.message,context:l.payload.context,timestamp:l.timestamp};a.id>d.current&&(d.current=a.id,o(b=>[...b,a]))}catch{}};return n.addEventListener("log:entry",i),n.onerror=()=>{n.close(),setTimeout(()=>{},5e3)},()=>n.close()},[]),{logs:r,loading:c,clearLogs:x,refresh:p}}const k={info:"bg-blue-500/20 text-blue-400",warn:"bg-yellow-500/20 text-yellow-400",error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",debug:"bg-gray-500/20 text-gray-400"},E=["info","warn","error","success","debug"];function y(r){return new Date(r).toLocaleTimeString("en-US",{hour12:!1})}function L(r){return!r||Object.keys(r).length===0?"":Object.entries(r).map(([o,c])=>`${o}="${String(c)}"`).join(" ")}function j(r){return r.map(o=>{const c=L(o.context);return`[${y(o.timestamp)}] [${o.level.toUpperCase()}] ${o.message}${c?" "+c:""}`}).join(`
2
2
  `)}function O(){const{logs:r,loading:o,clearLogs:c,refresh:h}=w(),[d,p]=s.useState("all"),[x,n]=s.useState(""),[i,m]=s.useState(!0),l=s.useRef(null),a=s.useMemo(()=>{let e=r;if(d!=="all"&&(e=e.filter(u=>u.level===d)),x.trim()){const u=x.toLowerCase();e=e.filter(g=>g.message.toLowerCase().includes(u))}return e},[r,d,x]);s.useEffect(()=>{i&&l.current&&(l.current.scrollTop=l.current.scrollHeight)},[a,i]);const b=s.useCallback(()=>{if(!l.current)return;const{scrollTop:e,scrollHeight:u,clientHeight:g}=l.current,f=u-e-g<40;m(f)},[]),C=s.useCallback(async()=>{const e=j(a);await navigator.clipboard.writeText(e)},[a]),N=s.useCallback(()=>{const e=j(a),u=new Blob([e],{type:"text/plain"}),g=URL.createObjectURL(u),f=document.createElement("a");f.href=g,f.download=`mcp-graph-logs-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.txt`,f.click(),URL.revokeObjectURL(g)},[a]),S=s.useCallback(async()=>{await c()},[c]);return o?t.jsx("div",{className:"flex items-center justify-center h-full text-muted",children:"Loading logs..."}):t.jsxs("div",{className:"flex flex-col h-full","data-testid":"logs-tab",children:[t.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-edge bg-surface-alt",children:[t.jsxs("select",{value:d,onChange:e=>p(e.target.value),className:"px-2 py-1 text-sm rounded border border-edge bg-surface text-foreground","data-testid":"log-level-filter",children:[t.jsx("option",{value:"all",children:"All Levels"}),E.map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]}),t.jsx("input",{type:"text",value:x,onChange:e=>n(e.target.value),placeholder:"Search logs...",className:"flex-1 px-2 py-1 text-sm rounded border border-edge bg-surface text-foreground placeholder:text-muted","data-testid":"log-search"}),t.jsx("button",{onClick:()=>m(!i),className:`px-2 py-1 text-xs rounded border ${i?"border-accent text-accent":"border-edge text-muted"}`,title:i?"Auto-scroll enabled":"Auto-scroll paused",children:i?"Auto-scroll ON":"Auto-scroll OFF"}),t.jsx("button",{onClick:C,className:"px-2 py-1 text-xs rounded border border-edge text-muted hover:text-foreground",title:"Copy all visible logs",children:"Copy"}),t.jsx("button",{onClick:N,className:"px-2 py-1 text-xs rounded border border-edge text-muted hover:text-foreground",title:"Download logs as .txt",children:"Download"}),t.jsx("button",{onClick:S,className:"px-2 py-1 text-xs rounded border border-red-500/30 text-red-400 hover:bg-red-500/10",title:"Clear all logs",children:"Clear"}),t.jsx("button",{onClick:()=>void h(),className:"px-2 py-1 text-xs rounded border border-edge text-muted hover:text-foreground",title:"Refresh logs",children:"Refresh"}),t.jsxs("span",{className:"text-xs text-muted",children:[a.length," entries"]})]}),t.jsx("div",{ref:l,onScroll:b,className:"flex-1 overflow-y-auto font-mono text-xs p-2","data-testid":"log-list",children:a.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-muted",children:"No logs to display"}):a.map(e=>t.jsxs("div",{className:"flex items-start gap-2 py-0.5 hover:bg-surface-alt",children:[t.jsx("span",{className:"text-muted shrink-0",children:y(e.timestamp)}),t.jsx("span",{className:`px-1.5 py-0 rounded text-[10px] font-semibold uppercase shrink-0 ${k[e.level]}`,children:e.level}),t.jsx("span",{className:"text-foreground",children:e.message}),e.context&&Object.keys(e.context).length>0&&t.jsx("span",{className:"text-muted",children:L(e.context)})]},e.id))})]})}export{O as LogsTab};
@@ -0,0 +1,69 @@
1
+ import{c as j,r as c,a as M,j as e,C as q}from"./index-C_1iski-.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Z=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ee=j("chevron-down",Z);/**
7
+ * @license lucide-react v1.7.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const te=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],se=j("chevron-right",te);/**
12
+ * @license lucide-react v1.7.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const ae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ne=j("circle-alert",ae);/**
17
+ * @license lucide-react v1.7.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const ce=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],re=j("circle",ce);/**
22
+ * @license lucide-react v1.7.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const le=[["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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],P=j("file-code",le);/**
27
+ * @license lucide-react v1.7.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const ie=[["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"}]],oe=j("file-text",ie);/**
32
+ * @license lucide-react v1.7.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const de=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],B=j("info",de);/**
37
+ * @license lucide-react v1.7.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const xe=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],ue=j("lightbulb",xe);/**
42
+ * @license lucide-react v1.7.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const me=[["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"}]],z=j("list",me);/**
47
+ * @license lucide-react v1.7.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const he=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],R=j("refresh-cw",he);/**
52
+ * @license lucide-react v1.7.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const pe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],H=j("search",pe);/**
57
+ * @license lucide-react v1.7.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const fe=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],O=j("server",fe);/**
62
+ * @license lucide-react v1.7.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const ge=[["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"}]],F=j("triangle-alert",ge),K=300*1e3;function be(){const t=new Map;return{get(s){const a=t.get(s);if(a){if(Date.now()-a.timestamp>K){t.delete(s);return}return a.data}},set(s,a){if(t.set(s,{data:a,timestamp:Date.now()}),t.size>200){const n=Date.now();for(const[i,d]of t)n-d.timestamp>K&&t.delete(i)}}}}function ye(){const[t,s]=c.useState(null),[a,n]=c.useState(null),[i,d]=c.useState(!0),[u,r]=c.useState(null),[w,o]=c.useState([]),[L,_]=c.useState(null),[E,N]=c.useState(null),[v,p]=c.useState([]),[k,D]=c.useState([]),[C,m]=c.useState(!1),h=c.useRef(be()).current,T=c.useCallback(async()=>{try{const l=await M.getLspLanguages();s(l)}catch(l){r(l instanceof Error?l.message:"Failed to load LSP languages")}},[]),A=c.useCallback(async()=>{try{const l=await M.getLspStatus();n(l)}catch{n({ok:!0,bridgeInitialized:!1,servers:{}})}},[]),I=c.useCallback(async()=>{d(!0),r(null),await Promise.all([T(),A()]),d(!1)},[T,A]);c.useEffect(()=>{I()},[I]);const W=c.useCallback(async(l,f,g)=>{const x=`def:${l}:${f}:${g}`,b=h.get(x);if(b){o(b);return}m(!0);try{const $=(await M.lspDefinition(l,f,g)).definitions??[];h.set(x,$),o($)}catch(y){r(y instanceof Error?y.message:"Definition lookup failed")}finally{m(!1)}},[h]),Y=c.useCallback(async(l,f,g)=>{const x=`refs:${l}:${f}:${g}`,b=h.get(x);if(b){_(b);return}m(!0);try{const y=await M.lspReferences(l,f,g),$={total:y.totalReferences??0,refs:y.references??[],byFile:y.byFile??{}};h.set(x,$),_($)}catch(y){r(y instanceof Error?y.message:"References lookup failed")}finally{m(!1)}},[h]),J=c.useCallback(async(l,f,g)=>{const x=`hover:${l}:${f}:${g}`,b=h.get(x);if(b!==void 0){N(b);return}m(!0);try{const $=(await M.lspHover(l,f,g)).hover??null;h.set(x,$),N($)}catch(y){r(y instanceof Error?y.message:"Hover lookup failed")}finally{m(!1)}},[h]),Q=c.useCallback(async l=>{const f=`diag:${l}`,g=h.get(f);if(g){p(g);return}m(!0);try{const b=(await M.lspDiagnostics(l)).diagnostics??[];h.set(f,b),p(b)}catch(x){r(x instanceof Error?x.message:"Diagnostics lookup failed")}finally{m(!1)}},[h]),X=c.useCallback(async l=>{const f=`sym:${l}`,g=h.get(f);if(g){D(g);return}m(!0);try{const b=(await M.lspSymbols(l)).symbols??[];h.set(f,b),D(b)}catch(x){r(x instanceof Error?x.message:"Symbols lookup failed")}finally{m(!1)}},[h]);return{languages:t,status:a,loading:i,error:u,operationLoading:C,definitions:w,references:L,hover:E,diagnostics:v,symbols:k,refresh:I,goToDefinition:W,findReferences:Y,getHover:J,getDiagnostics:Q,getSymbols:X}}const je=[{id:"status",label:"Status",icon:O},{id:"explorer",label:"Symbol Explorer",icon:H},{id:"diagnostics",label:"Diagnostics",icon:F},{id:"symbols",label:"Symbols",icon:z}],V={1:{icon:ne,color:"text-danger",label:"Error"},2:{icon:F,color:"text-warning",label:"Warning"},3:{icon:B,color:"text-accent",label:"Info"},4:{icon:ue,color:"text-muted",label:"Hint"}};function Ne({status:t}){const s={ready:{bg:"bg-success/15",text:"text-success"},starting:{bg:"bg-warning/15",text:"text-warning"},stopped:{bg:"bg-muted/15",text:"text-muted"},error:{bg:"bg-danger/15",text:"text-danger"}},a=t??"not installed",n=s[a]??{bg:"bg-muted/10",text:"text-muted",border:"border-dashed"};return e.jsxs("span",{className:`inline-flex items-center gap-1 text-[10px] font-medium px-2 py-0.5 rounded-full ${n.bg} ${n.text} ${n.border??""} border border-current/20`,children:[e.jsx(re,{className:"w-2 h-2 fill-current"}),a]})}function ve({lang:t,serverStatus:s}){const a=Math.round(t.confidence*100);return e.jsxs("div",{className:"p-4 rounded-xl border border-edge bg-surface-alt shadow-sm hover:shadow-md transition-shadow space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-4 h-4 text-accent"}),e.jsx("span",{className:"text-sm font-semibold capitalize",children:t.languageId})]}),e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-accent/10 text-accent",children:[t.fileCount," files"]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted",children:[e.jsx("span",{children:"Confidence"}),e.jsxs("span",{children:[a,"%"]})]}),e.jsx("div",{className:"h-1 rounded-full bg-edge overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${a}%`}})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] text-muted",children:"Server"}),e.jsx(Ne,{status:s})]}),e.jsxs("div",{className:"text-[10px] text-muted",children:["Detected via: ",e.jsx("span",{className:"text-foreground",children:t.detectedVia})]}),t.serverCommand&&e.jsxs("div",{className:"text-[10px] text-muted truncate",title:t.serverCommand,children:["Command: ",e.jsx("code",{className:"text-foreground font-mono",children:t.serverCommand})]}),t.configFile&&e.jsxs("div",{className:"text-[10px] text-muted truncate",title:t.configFile,children:["Config: ",e.jsx("code",{className:"text-foreground font-mono",children:t.configFile})]})]})}function we({hover:t}){return e.jsxs("div",{className:"p-4 rounded-xl border border-edge bg-surface-alt space-y-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-muted uppercase tracking-wider",children:"Hover Info"}),t.signature?e.jsx("pre",{className:"text-sm font-mono bg-surface p-3 rounded-lg overflow-x-auto border border-edge whitespace-pre-wrap",children:t.signature}):e.jsx("p",{className:"text-sm text-muted",children:"No signature available"}),t.documentation&&e.jsx("div",{className:"text-xs text-muted whitespace-pre-wrap",children:t.documentation}),t.language&&e.jsxs("span",{className:"text-[10px] text-muted",children:["Language: ",t.language]})]})}function U({title:t,locations:s}){return e.jsxs("div",{className:"p-4 rounded-xl border border-edge bg-surface-alt space-y-2",children:[e.jsxs("h4",{className:"text-xs font-semibold text-muted uppercase tracking-wider",children:[t," (",s.length,")"]}),s.length===0?e.jsx("p",{className:"text-sm text-muted",children:"No results found"}):e.jsx("ul",{className:"space-y-1",children:s.map((a,n)=>e.jsxs("li",{className:"flex items-center gap-2 text-xs py-1.5 px-2 rounded-lg hover:bg-surface-elevated transition-colors",children:[e.jsx(oe,{className:"w-3 h-3 text-muted flex-shrink-0"}),e.jsx("span",{className:"font-mono text-foreground truncate",title:a.file,children:a.file}),e.jsxs("span",{className:"text-muted flex-shrink-0",children:[":",a.startLine,":",a.startCharacter]}),a.hint&&e.jsx("span",{className:"text-accent text-[10px] ml-auto truncate",children:a.hint})]},`${a.file}-${a.startLine}-${a.startCharacter}-${n}`))})]})}function ke({references:t}){const s=Object.entries(t.byFile).sort(([,a],[,n])=>n-a);return e.jsxs("div",{className:"space-y-3",children:[e.jsx(U,{title:"References",locations:t.refs}),s.length>0&&e.jsxs("div",{className:"p-4 rounded-xl border border-edge bg-surface-alt space-y-2",children:[e.jsxs("h4",{className:"text-xs font-semibold text-muted uppercase tracking-wider",children:["By File (",t.total," total)"]}),e.jsx("ul",{className:"space-y-1",children:s.map(([a,n])=>e.jsxs("li",{className:"flex items-center justify-between text-xs py-1 px-2 rounded-lg hover:bg-surface-elevated transition-colors",children:[e.jsx("span",{className:"font-mono truncate text-foreground",title:a,children:a}),e.jsx("span",{className:"text-muted flex-shrink-0 ml-2",children:n})]},a))})]})]})}function Ce({diagnostic:t}){const s=V[t.severity]??V[3],a=s.icon;return e.jsxs("div",{className:"flex items-start gap-3 py-2.5 px-3 rounded-lg border border-edge bg-surface-alt hover:shadow-sm transition-shadow",children:[e.jsx(a,{className:`w-4 h-4 flex-shrink-0 mt-0.5 ${s.color}`}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{className:"text-xs font-mono text-muted",children:[t.file,":",t.startLine,":",t.startCharacter]}),t.source&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-surface-elevated text-muted border border-edge",children:t.source}),t.code&&e.jsxs("span",{className:"text-[10px] font-mono text-muted",children:["[",t.code,"]"]})]}),e.jsx("p",{className:"text-sm text-foreground",children:t.message})]}),e.jsx("span",{className:`text-[10px] font-medium flex-shrink-0 ${s.color}`,children:s.label})]})}const Se={Function:"bg-accent/15 text-accent",Method:"bg-accent/15 text-accent",Class:"bg-warning/15 text-warning",Interface:"bg-success/15 text-success",Enum:"bg-danger/15 text-danger",Variable:"bg-muted/15 text-muted",Property:"bg-muted/15 text-muted",Constant:"bg-success/15 text-success",Module:"bg-warning/15 text-warning",Namespace:"bg-warning/15 text-warning"};function G({symbol:t,depth:s}){const[a,n]=c.useState(s<2),i=t.children&&t.children.length>0,d=Se[t.kind]??"bg-muted/10 text-muted";return e.jsxs("div",{children:[e.jsxs("button",{type:"button",onClick:()=>i&&n(!a),className:`flex items-center gap-2 w-full text-left py-1.5 px-2 rounded-lg hover:bg-surface-elevated transition-colors text-xs ${i?"cursor-pointer":"cursor-default"}`,style:{paddingLeft:`${s*16+8}px`},children:[i?a?e.jsx(ee,{className:"w-3 h-3 text-muted flex-shrink-0"}):e.jsx(se,{className:"w-3 h-3 text-muted flex-shrink-0"}):e.jsx("span",{className:"w-3 flex-shrink-0"}),e.jsx("span",{className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${d} flex-shrink-0`,children:t.kind}),e.jsx("span",{className:"font-mono text-foreground truncate",children:t.name}),e.jsxs("span",{className:"text-muted ml-auto flex-shrink-0",children:[t.startLine,"-",t.endLine]})]}),a&&i&&t.children.map((u,r)=>e.jsx(G,{symbol:u,depth:s+1},`${u.name}-${u.startLine}-${r}`))]})}function $e({symbols:t}){return t.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted",children:[e.jsx(q,{className:"w-8 h-8 mb-2 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No symbols found for this file"})]}):e.jsx("div",{className:"rounded-xl border border-edge bg-surface-alt overflow-hidden divide-y divide-edge",children:t.map((s,a)=>e.jsx(G,{symbol:s,depth:0},`${s.name}-${s.startLine}-${a}`))})}function Le({languages:t,status:s}){return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4",children:[e.jsx(O,{className:"w-4 h-4 text-muted"}),e.jsx("span",{className:"text-xs text-muted",children:"Bridge:"}),e.jsx("span",{className:`text-xs font-medium ${s!=null&&s.bridgeInitialized?"text-success":"text-warning"}`,children:s!=null&&s.bridgeInitialized?"Initialized":"Not initialized"})]}),t.detected.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted",children:[e.jsx(P,{className:"w-10 h-10 mb-3 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No languages detected in this project"}),e.jsx("p",{className:"text-xs mt-1",children:"The LSP bridge will detect languages from project configuration files"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 p-4",children:t.detected.map(a=>e.jsx(ve,{lang:a,serverStatus:s==null?void 0:s.servers[a.languageId]},a.languageId))}),t.supportedLanguages.length>0&&e.jsxs("div",{className:"px-4 py-2 text-xs text-muted border-t border-edge",children:["Supported: ",t.supportedLanguages.join(", ")]})]})}function _e({goToDefinition:t,findReferences:s,getHover:a,operationLoading:n,definitions:i,references:d,hover:u}){const[r,w]=c.useState(""),[o,L]=c.useState(""),[_,E]=c.useState(""),N=parseInt(o,10)||0,v=parseInt(_,10)||0,p=r.trim().length>0&&N>0,k=c.useCallback(()=>{p&&t(r.trim(),N,v)},[r,N,v,p,t]),D=c.useCallback(()=>{p&&s(r.trim(),N,v)},[r,N,v,p,s]),C=c.useCallback(()=>{p&&a(r.trim(),N,v)},[r,N,v,p,a]),m=u!==null||i.length>0||d!==null;return e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx("input",{placeholder:"File path (e.g. src/main.ts)",value:r,onChange:S=>w(S.target.value),className:"flex-1 min-w-[200px] px-3 py-2 text-sm border border-edge rounded-lg bg-surface font-mono focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsx("input",{placeholder:"Line",type:"number",min:1,value:o,onChange:S=>L(S.target.value),className:"w-20 px-3 py-2 text-sm border border-edge rounded-lg bg-surface text-center focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsx("input",{placeholder:"Col",type:"number",min:0,value:_,onChange:S=>E(S.target.value),className:"w-20 px-3 py-2 text-sm border border-edge rounded-lg bg-surface text-center focus:outline-none focus:ring-1 focus:ring-accent"})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs("button",{type:"button",onClick:k,disabled:!p||n,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-accent text-white hover:bg-accent-light disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[e.jsx(q,{className:"w-3.5 h-3.5"}),"Definition"]}),e.jsxs("button",{type:"button",onClick:D,disabled:!p||n,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-edge hover:bg-surface-elevated disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[e.jsx(H,{className:"w-3.5 h-3.5"}),"References"]}),e.jsxs("button",{type:"button",onClick:C,disabled:!p||n,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg border border-edge hover:bg-surface-elevated disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[e.jsx(B,{className:"w-3.5 h-3.5"}),"Hover"]})]}),n&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted py-2",children:[e.jsx(R,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading..."})]}),!n&&m&&e.jsxs("div",{className:"space-y-3",children:[u&&e.jsx(we,{hover:u}),i.length>0&&e.jsx(U,{title:"Definitions",locations:i}),d&&e.jsx(ke,{references:d})]}),!n&&!m&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted",children:[e.jsx(H,{className:"w-10 h-10 mb-3 opacity-40"}),e.jsx("p",{className:"text-sm",children:"Enter a file path and position to explore symbols"}),e.jsx("p",{className:"text-xs mt-1",children:"Use Definition, References, or Hover to inspect code"})]})]})}function Me({getDiagnostics:t,operationLoading:s,diagnostics:a}){const[n,i]=c.useState(""),[d,u]=c.useState(!1),r=c.useCallback(()=>{n.trim()&&(u(!0),t(n.trim()))},[n,t]),w=c.useCallback(o=>{o.key==="Enter"&&r()},[r]);return e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{placeholder:"File path (e.g. src/main.ts)",value:n,onChange:o=>i(o.target.value),onKeyDown:w,className:"flex-1 px-3 py-2 text-sm border border-edge rounded-lg bg-surface font-mono focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsxs("button",{type:"button",onClick:r,disabled:!n.trim()||s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-accent text-white hover:bg-accent-light disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[e.jsx(F,{className:"w-3.5 h-3.5"}),"Load"]})]}),s&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted py-2",children:[e.jsx(R,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading diagnostics..."})]}),!s&&a.length>0&&e.jsx("div",{className:"space-y-2",children:a.map((o,L)=>e.jsx(Ce,{diagnostic:o},`${o.file}-${o.startLine}-${o.startCharacter}-${L}`))}),!s&&a.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted",children:[e.jsx(F,{className:"w-10 h-10 mb-3 opacity-40"}),d?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"No diagnostics found for this file"}),e.jsx("p",{className:"text-xs mt-1",children:"The file may be error-free or the language server may not support diagnostics"})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"Enter a file path to load diagnostics"}),e.jsx("p",{className:"text-xs mt-1",children:"View errors, warnings, and hints from the language server"})]})]})]})}function De({getSymbols:t,operationLoading:s,symbols:a}){const[n,i]=c.useState(""),[d,u]=c.useState(!1),r=c.useCallback(()=>{n.trim()&&(u(!0),t(n.trim()))},[n,t]),w=c.useCallback(o=>{o.key==="Enter"&&r()},[r]);return e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{placeholder:"File path (e.g. src/main.ts)",value:n,onChange:o=>i(o.target.value),onKeyDown:w,className:"flex-1 px-3 py-2 text-sm border border-edge rounded-lg bg-surface font-mono focus:outline-none focus:ring-1 focus:ring-accent"}),e.jsxs("button",{type:"button",onClick:r,disabled:!n.trim()||s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg bg-accent text-white hover:bg-accent-light disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[e.jsx(z,{className:"w-3.5 h-3.5"}),"Load"]})]}),s&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted py-2",children:[e.jsx(R,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{children:"Loading symbols..."})]}),!s&&d&&e.jsx($e,{symbols:a}),!s&&!d&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-muted",children:[e.jsx(z,{className:"w-10 h-10 mb-3 opacity-40"}),e.jsx("p",{className:"text-sm",children:"Enter a file path to explore document symbols"}),e.jsx("p",{className:"text-xs mt-1",children:"View functions, classes, interfaces, and other symbols"})]})]})}function Re(){const{languages:t,status:s,loading:a,error:n,operationLoading:i,definitions:d,references:u,hover:r,diagnostics:w,symbols:o,refresh:L,goToDefinition:_,findReferences:E,getHover:N,getDiagnostics:v,getSymbols:p}=ye(),[k,D]=c.useState("status");return n&&!t?e.jsxs("div",{className:"flex items-center justify-center h-full text-danger",children:["Failed to load: ",n]}):a||!t?e.jsxs("div",{className:"flex items-center justify-center h-full text-muted",children:[e.jsx(R,{className:"w-4 h-4 animate-spin mr-2"}),"Loading LSP data..."]}):e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-edge bg-surface-alt",children:[e.jsx("div",{className:"flex items-center gap-1",children:je.map(C=>{const m=C.icon,S=k===C.id;return e.jsxs("button",{type:"button",onClick:()=>D(C.id),className:`
67
+ inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors
68
+ ${S?"bg-accent/10 text-accent":"text-muted hover:bg-surface-elevated hover:text-foreground"}
69
+ `,children:[e.jsx(m,{className:"w-3.5 h-3.5"}),C.label]},C.id)})}),e.jsxs("button",{type:"button",onClick:()=>void L(),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-lg border border-edge hover:bg-surface-elevated transition-colors",title:"Refresh LSP data",children:[e.jsx(R,{className:`w-3 h-3 ${a?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]})]}),n&&e.jsx("div",{className:"px-4 py-2 text-xs text-danger bg-danger/5 border-b border-danger/20",children:n}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[k==="status"&&e.jsx(Le,{languages:t,status:s}),k==="explorer"&&e.jsx(_e,{goToDefinition:_,findReferences:E,getHover:N,operationLoading:i,definitions:d,references:u,hover:r}),k==="diagnostics"&&e.jsx(Me,{getDiagnostics:v,operationLoading:i,diagnostics:w}),k==="symbols"&&e.jsx(De,{getSymbols:p,operationLoading:i,symbols:o})]})]})}export{Re as LspTab};