profclaw 0.0.1-beta.3 → 2.0.0

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 (156) hide show
  1. package/CHANGELOG.md +21 -38
  2. package/CONTRIBUTING.md +3 -5
  3. package/README.md +128 -63
  4. package/dist/chat/execution/tools/index.d.ts +1 -1
  5. package/dist/chat/execution/tools/index.js +41 -2
  6. package/dist/chat/providers/slack/index.d.ts +2 -2
  7. package/dist/cli/commands/models.js +39 -26
  8. package/dist/cli/commands/onboard.js +64 -79
  9. package/dist/cli/commands/setup.js +293 -90
  10. package/dist/cli/index.js +0 -6
  11. package/dist/cli/providers.d.ts +15 -0
  12. package/dist/cli/providers.js +41 -0
  13. package/dist/core/deployment.js +2 -0
  14. package/dist/providers/ai-sdk.js +26 -6
  15. package/dist/routes/channels.d.ts +12 -0
  16. package/dist/routes/channels.js +166 -0
  17. package/dist/server/route-loader.js +1 -0
  18. package/dist/server.js +115 -109
  19. package/package.json +1 -1
  20. package/skills/git-workflow/SKILL.md +3 -3
  21. package/ui/dist/assets/{ActivityView-DIPQSJ_d.js → ActivityView-BeshZXmE.js} +1 -1
  22. package/ui/dist/assets/{AgentList-CqyaYrcq.js → AgentList-QVHeldPi.js} +1 -1
  23. package/ui/dist/assets/{AnalyticsDashboard-C-mjuGHT.js → AnalyticsDashboard-C9R97dXE.js} +1 -1
  24. package/ui/dist/assets/{AreaChart-CfYWmbtr.js → AreaChart-B73gaiVQ.js} +1 -1
  25. package/ui/dist/assets/{CartesianChart-BaQ3It0c.js → CartesianChart-CXYL2R-A.js} +1 -1
  26. package/ui/dist/assets/{ChatView-DxxQy6pl.js → ChatView-qjZErlrp.js} +1 -1
  27. package/ui/dist/assets/{CostsDashboard-CDBBcGkg.js → CostsDashboard-O4DCLy1i.js} +1 -1
  28. package/ui/dist/assets/{EstimateSelect-CDjf5qKl.js → EstimateSelect-1hQf4Osk.js} +1 -1
  29. package/ui/dist/assets/{FloatingChatbot-CZHjvJIe.js → FloatingChatbot-BZBzrJxd.js} +1 -1
  30. package/ui/dist/assets/{InviteCodeManagement-DTm-IPTm.js → InviteCodeManagement-LEoGqYeA.js} +1 -1
  31. package/ui/dist/assets/{ProjectDetail-DlYUcOss.js → ProjectDetail--gPfvATB.js} +1 -1
  32. package/ui/dist/assets/{ProjectIcon-BMRpnM04.js → ProjectIcon-Chd_ofsw.js} +1 -1
  33. package/ui/dist/assets/{ProjectList-D85TN0i0.js → ProjectList-BvUfVB6c.js} +1 -1
  34. package/ui/dist/assets/{Settings-CgPqzUvj.js → Settings-1kaf7VHE.js} +1 -1
  35. package/ui/dist/assets/{StatusIndicator-yig0uZEA.js → StatusIndicator-pRfkNcdV.js} +1 -1
  36. package/ui/dist/assets/{SummaryDetail-CwLAfHgJ.js → SummaryDetail-DV3AmONk.js} +1 -1
  37. package/ui/dist/assets/{SummaryList-BvS5Idnu.js → SummaryList-B6kXiTxL.js} +1 -1
  38. package/ui/dist/assets/{TaskDetail-zarC1fOt.js → TaskDetail-CV6CzbOS.js} +1 -1
  39. package/ui/dist/assets/{TaskList-CyJq3ANE.js → TaskList-DL7brQKd.js} +1 -1
  40. package/ui/dist/assets/{TicketBoard-BlWr3-iH.js → TicketBoard-CrkkFj7C.js} +1 -1
  41. package/ui/dist/assets/{TicketDetail-DmqWKj2W.js → TicketDetail-hnnYclpD.js} +1 -1
  42. package/ui/dist/assets/{TicketList-Scj4pMWa.js → TicketList-CsDAyQCL.js} +1 -1
  43. package/ui/dist/assets/{UserManagement-BH7uG7dw.js → UserManagement-BGFQyTSr.js} +1 -1
  44. package/ui/dist/assets/{ViewSwitcher-3HzZUdWn.js → ViewSwitcher-CnL0OqA8.js} +1 -1
  45. package/ui/dist/assets/{alert-dialog-DWPb2IfQ.js → alert-dialog-SKM6Gjz4.js} +1 -1
  46. package/ui/dist/assets/{archive-CGck7gxR.js → archive-BsLa7brF.js} +1 -1
  47. package/ui/dist/assets/{badge-DEmc3Z_l.js → badge-CVHH1a-v.js} +1 -1
  48. package/ui/dist/assets/{brain-CfFdLVqb.js → brain-6o_RHVpe.js} +1 -1
  49. package/ui/dist/assets/{bug-DqSGPUUE.js → bug-CmZI7jqM.js} +1 -1
  50. package/ui/dist/assets/{calendar-BuZ4zbPW.js → calendar-Bf0t2B82.js} +1 -1
  51. package/ui/dist/assets/{chevron-up-DcJ4LL_N.js → chevron-up-CoUsOvZj.js} +1 -1
  52. package/ui/dist/assets/{circle-x-C78PNZjF.js → circle-x-Dgw11LgT.js} +1 -1
  53. package/ui/dist/assets/{constants-DhDjZe4P.js → constants-Q5Zivl-a.js} +1 -1
  54. package/ui/dist/assets/{cpu-Ck6AoG8c.js → cpu-DiPMQICV.js} +1 -1
  55. package/ui/dist/assets/{database-CA2w8Lvt.js → database-BwTfupDi.js} +1 -1
  56. package/ui/dist/assets/{dialog-BOdGWhgE.js → dialog-BUqN9Psj.js} +1 -1
  57. package/ui/dist/assets/{ellipsis-FhHKRbfl.js → ellipsis-UJx4Xnf6.js} +1 -1
  58. package/ui/dist/assets/{ellipsis-vertical-CO0UqE4-.js → ellipsis-vertical-DoULYEKn.js} +1 -1
  59. package/ui/dist/assets/{file-code-ChnhYYj1.js → file-code-B2UrJLwi.js} +1 -1
  60. package/ui/dist/assets/{folder-open-CHwA1-ve.js → folder-open-BJi577JH.js} +1 -1
  61. package/ui/dist/assets/{funnel-ByEjRFNB.js → funnel-PkaD_HSR.js} +1 -1
  62. package/ui/dist/assets/{git-branch-GTOPQgU4.js → git-branch-C_K30am0.js} +1 -1
  63. package/ui/dist/assets/{git-commit-horizontal-F5M84Kut.js → git-commit-horizontal-IT6ecxWQ.js} +1 -1
  64. package/ui/dist/assets/{globe-CQWfr7hT.js → globe-f-jjCa_g.js} +1 -1
  65. package/ui/dist/assets/{hash-nKC9gtLg.js → hash-DNEv8Elo.js} +1 -1
  66. package/ui/dist/assets/{history-DfFSA9xJ.js → history-BQSBo_1Q.js} +1 -1
  67. package/ui/dist/assets/{index-DHGvP9mp.js → index-BUmnwPQr.js} +1 -1
  68. package/ui/dist/assets/{index-Z4-RtZcs.js → index-BfF5G4Cw.js} +1 -1
  69. package/ui/dist/assets/{index-DeI8lKRR.js → index-C8N375c2.js} +1 -1
  70. package/ui/dist/assets/index-CuxnqVVz.css +1 -0
  71. package/ui/dist/assets/{index-Ca3vk7Gq.js → index-CzMM3QOk.js} +1 -1
  72. package/ui/dist/assets/{index--JkIxVXb.js → index-lJlNPFVJ.js} +3 -3
  73. package/ui/dist/assets/{index-a4Fxq0Hb.js → index-nS3EErDg.js} +1 -1
  74. package/ui/dist/assets/{layers-DFeLExSa.js → layers-jFqVrWMD.js} +1 -1
  75. package/ui/dist/assets/{layout-dashboard-WmgjMhWF.js → layout-dashboard-CcKt1hXw.js} +1 -1
  76. package/ui/dist/assets/{lightbulb-Bo8hEr7B.js → lightbulb-Jhp7FvbU.js} +1 -1
  77. package/ui/dist/assets/{link-2-YqrpQXBH.js → link-2-DdO7ostF.js} +1 -1
  78. package/ui/dist/assets/{markdown-renderer-Croje6Xe.js → markdown-renderer-n1ToC4XQ.js} +1 -1
  79. package/ui/dist/assets/{message-square-CD0H5hot.js → message-square-CBgH65X7.js} +1 -1
  80. package/ui/dist/assets/{pencil-DpFnj5dn.js → pencil-CYXCEPQh.js} +1 -1
  81. package/ui/dist/assets/{play-DVgea_jT.js → play-d1ONaH0-.js} +1 -1
  82. package/ui/dist/assets/{popover-JXecfWG5.js → popover-CrmZgoWu.js} +1 -1
  83. package/ui/dist/assets/{progress-C1ghf1Fu.js → progress-uv4SPkL5.js} +1 -1
  84. package/ui/dist/assets/{rocket-BFxPYGx9.js → rocket-DhvUetsk.js} +1 -1
  85. package/ui/dist/assets/{select-MADP8m6Q.js → select-CeQ8AHGy.js} +1 -1
  86. package/ui/dist/assets/{send-eYnW_7n-.js → send-P0r5D7td.js} +1 -1
  87. package/ui/dist/assets/{server-CPMaysH8.js → server-CVHTZB72.js} +1 -1
  88. package/ui/dist/assets/{settings-2-scXUOuE_.js → settings-2-ocj5uHGx.js} +1 -1
  89. package/ui/dist/assets/{sheet-r6NSOxi-.js → sheet-DuQExSho.js} +1 -1
  90. package/ui/dist/assets/{shield-check-PEr7nmVw.js → shield-check-DfVdE34l.js} +1 -1
  91. package/ui/dist/assets/{shield-off-CLtXio62.js → shield-off-8l0J6R-8.js} +1 -1
  92. package/ui/dist/assets/{skeleton-C9oEzNlU.js → skeleton-TFiFJ3nB.js} +1 -1
  93. package/ui/dist/assets/{smartphone-DusFfY0U.js → smartphone-77_g3SQn.js} +1 -1
  94. package/ui/dist/assets/{square-e1yxB2eR.js → square-Ckzsr3Rn.js} +1 -1
  95. package/ui/dist/assets/{switch-tNs0n-kz.js → switch-CAePkd6k.js} +1 -1
  96. package/ui/dist/assets/{table-CXxtLicg.js → table-ZjAZ7hkt.js} +1 -1
  97. package/ui/dist/assets/{tag-tAwMmQ9G.js → tag-C35mgoEv.js} +1 -1
  98. package/ui/dist/assets/{textarea-BjiEeIWh.js → textarea-DsVPnSgR.js} +1 -1
  99. package/ui/dist/assets/{timer-Vel1N3RP.js → timer-DHJBS2w1.js} +1 -1
  100. package/ui/dist/assets/{tooltip-ZMwtfr1J.js → tooltip-BYmQ331W.js} +1 -1
  101. package/ui/dist/assets/{trash-2-eM-CNwsZ.js → trash-2-keO5tKPE.js} +1 -1
  102. package/ui/dist/assets/{trending-up-BGafmjRo.js → trending-up-BBv8KbrY.js} +1 -1
  103. package/ui/dist/assets/{wand-sparkles-DPvcd9Pi.js → wand-sparkles-BusQ52ZK.js} +1 -1
  104. package/ui/dist/assets/{wrench-B8s3zYVV.js → wrench-02YaOSiK.js} +1 -1
  105. package/ui/dist/index.html +2 -2
  106. package/dist/chat/auto-reply.d.ts +0 -90
  107. package/dist/chat/auto-reply.js +0 -272
  108. package/dist/chat/execution/pty.d.ts +0 -92
  109. package/dist/chat/execution/pty.js +0 -285
  110. package/dist/chat/execution/tools/glinr-ops.d.ts +0 -202
  111. package/dist/chat/execution/tools/glinr-ops.js +0 -694
  112. package/dist/cli/commands/browser.d.ts +0 -3
  113. package/dist/cli/commands/browser.js +0 -138
  114. package/dist/cli/commands/canvas.d.ts +0 -3
  115. package/dist/cli/commands/canvas.js +0 -155
  116. package/dist/cli/commands/nodes.d.ts +0 -3
  117. package/dist/cli/commands/nodes.js +0 -193
  118. package/dist/diagnostics/exporters.d.ts +0 -21
  119. package/dist/diagnostics/exporters.js +0 -138
  120. package/dist/diagnostics/index.d.ts +0 -10
  121. package/dist/diagnostics/index.js +0 -9
  122. package/dist/diagnostics/middleware.d.ts +0 -12
  123. package/dist/diagnostics/middleware.js +0 -58
  124. package/dist/diagnostics/tracer.d.ts +0 -133
  125. package/dist/diagnostics/tracer.js +0 -257
  126. package/dist/discovery/index.d.ts +0 -8
  127. package/dist/discovery/index.js +0 -7
  128. package/dist/discovery/mdns.d.ts +0 -40
  129. package/dist/discovery/mdns.js +0 -249
  130. package/dist/plugins/registry.d.ts +0 -122
  131. package/dist/plugins/registry.js +0 -352
  132. package/dist/plugins/sandbox.d.ts +0 -77
  133. package/dist/plugins/sandbox.js +0 -287
  134. package/dist/plugins/search/brave.d.ts +0 -9
  135. package/dist/plugins/search/brave.js +0 -157
  136. package/dist/plugins/search/duckduckgo.d.ts +0 -9
  137. package/dist/plugins/search/duckduckgo.js +0 -171
  138. package/dist/plugins/search/index.d.ts +0 -13
  139. package/dist/plugins/search/index.js +0 -23
  140. package/dist/plugins/search/searxng.d.ts +0 -9
  141. package/dist/plugins/search/searxng.js +0 -170
  142. package/dist/plugins/search/serper.d.ts +0 -9
  143. package/dist/plugins/search/serper.js +0 -135
  144. package/dist/plugins/search/tavily.d.ts +0 -9
  145. package/dist/plugins/search/tavily.js +0 -146
  146. package/dist/providers/adapters/anthropic.d.ts +0 -26
  147. package/dist/providers/adapters/anthropic.js +0 -306
  148. package/dist/providers/adapters/base.d.ts +0 -53
  149. package/dist/providers/adapters/base.js +0 -99
  150. package/dist/providers/adapters/ollama.d.ts +0 -30
  151. package/dist/providers/adapters/ollama.js +0 -292
  152. package/dist/utils/ai-cache.d.ts +0 -72
  153. package/dist/utils/ai-cache.js +0 -204
  154. package/dist/utils/file-lock.d.ts +0 -85
  155. package/dist/utils/file-lock.js +0 -204
  156. package/ui/dist/assets/index-WclMPci1.css +0 -1
@@ -1,4 +1,4 @@
1
- import{r as m,al as G,bp as Ht,bq as wl,br as xl,bs as T0}from"./index--JkIxVXb.js";var M0=["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 Ol(e){if(typeof e!="string")return!1;var t=M0;return t.includes(e)}var k0=["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"],I0=new Set(k0);function qh(e){return typeof e!="string"?!1:I0.has(e)}function Fh(e){return typeof e=="string"&&e.startsWith("data-")}function St(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(qh(r)||Fh(r))&&(t[r]=e[r]);return t}function ta(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return St(t)}return typeof e=="object"&&!Array.isArray(e)?St(e):null}function Ne(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(qh(r)||Fh(r)||Ol(r))&&(t[r]=e[r]);return t}function D0(e){return e==null?null:m.isValidElement(e)?Ne(e.props):typeof e=="object"&&!Array.isArray(e)?Ne(e):null}var N0=["children","width","height","viewBox","className","style","title","desc"];function Pu(){return Pu=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},Pu.apply(null,arguments)}function $0(e,t){if(e==null)return{};var r,n,i=R0(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 R0(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 Pl=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=$0(e,N0),f=a||{width:n,height:i,x:0,y:0},d=G("recharts-surface",o);return m.createElement("svg",Pu({},Ne(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),m.createElement("title",null,l),m.createElement("desc",null,s),r)}),L0=["children","className"];function Su(){return Su=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},Su.apply(null,arguments)}function z0(e,t){if(e==null)return{};var r,n,i=B0(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 B0(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 sr=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=z0(e,L0),a=G("recharts-layer",n);return m.createElement("g",Su({className:a},Ne(i),{ref:t}),r)}),Wh=m.createContext(null),q0=()=>m.useContext(Wh);function X(e){return function(){return e}}const Uh=Math.cos,li=Math.sin,ut=Math.sqrt,ci=Math.PI,ra=2*ci,Au=Math.PI,_u=2*Au,er=1e-6,F0=_u-er;function Kh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W0(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Kh;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 U0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Kh:W0(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>er)if(!(Math.abs(f*l-s*c)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,h=i-u,p=l*l+s*s,y=v*v+h*h,g=Math.sqrt(p),w=Math.sqrt(d),b=a*Math.tan((Au-Math.acos((p+d-y)/(2*g*w)))/2),x=b/w,P=b/g;Math.abs(x-1)>er&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*v>c*h)},${this._x1=t+P*l},${this._y1=r+P*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)>er||Math.abs(this._y1-c)>er)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%_u+_u),d>F0?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>er&&this._append`A${n},${n},0,${+(d>=Au)},${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 Sl(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 U0(t)}function Al(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hh(e){this._context=e}Hh.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 na(e){return new Hh(e)}function Yh(e){return e[0]}function Gh(e){return e[1]}function Vh(e,t){var r=X(!0),n=null,i=na,a=null,o=Sl(u);e=typeof e=="function"?e:e===void 0?Yh:X(e),t=typeof t=="function"?t:t===void 0?Gh:X(t);function u(l){var s,c=(l=Al(l)).length,f,d=!1,v;for(n==null&&(a=i(v=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(v)return a=null,v+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:X(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:X(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:X(!!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 Bn(e,t,r){var n=null,i=X(!0),a=null,o=na,u=null,l=Sl(s);e=typeof e=="function"?e:e===void 0?Yh:X(+e),t=typeof t=="function"?t:X(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Gh:X(+r);function s(f){var d,v,h,p=(f=Al(f)).length,y,g=!1,w,b=new Array(p),x=new Array(p);for(a==null&&(u=o(w=l())),d=0;d<=p;++d){if(!(d<p&&i(y=f[d],d,f))===g)if(g=!g)v=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=v;--h)u.point(b[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(b[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):b[d],r?+r(y,d,f):x[d]))}if(w)return u=null,w+""||null}function c(){return Vh().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:X(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:X(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:X(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:X(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:X(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:X(+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:X(!!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 Xh{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 K0(e){return new Xh(e,!0)}function H0(e){return new Xh(e,!1)}const _l={draw(e,t){const r=ut(t/ci);e.moveTo(r,0),e.arc(0,0,r,0,ra)}},Y0={draw(e,t){const r=ut(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()}},Zh=ut(1/3),G0=Zh*2,V0={draw(e,t){const r=ut(t/G0),n=r*Zh;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},X0={draw(e,t){const r=ut(t),n=-r/2;e.rect(n,n,r,r)}},Z0=.8908130915292852,Qh=li(ci/10)/li(7*ci/10),Q0=li(ra/10)*Qh,J0=-Uh(ra/10)*Qh,eb={draw(e,t){const r=ut(t*Z0),n=Q0*r,i=J0*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=ra*a/5,u=Uh(o),l=li(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Fa=ut(3),tb={draw(e,t){const r=-ut(t/(Fa*3));e.moveTo(0,r*2),e.lineTo(-Fa*r,-r),e.lineTo(Fa*r,-r),e.closePath()}},Ke=-.5,He=ut(3)/2,Eu=1/ut(12),rb=(Eu/2+1)*3,nb={draw(e,t){const r=ut(t/rb),n=r/2,i=r*Eu,a=n,o=r*Eu+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(Ke*n-He*i,He*n+Ke*i),e.lineTo(Ke*a-He*o,He*a+Ke*o),e.lineTo(Ke*u-He*l,He*u+Ke*l),e.lineTo(Ke*n+He*i,Ke*i-He*n),e.lineTo(Ke*a+He*o,Ke*o-He*a),e.lineTo(Ke*u+He*l,Ke*l-He*u),e.closePath()}};function ib(e,t){let r=null,n=Sl(i);e=typeof e=="function"?e:X(e||_l),t=typeof t=="function"?t:X(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:X(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:X(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function si(){}function fi(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 Jh(e){this._context=e}Jh.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:fi(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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ab(e){return new Jh(e)}function ep(e){this._context=e}ep.prototype={areaStart:si,areaEnd:si,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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ob(e){return new ep(e)}function tp(e){this._context=e}tp.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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ub(e){return new tp(e)}function rp(e){this._context=e}rp.prototype={areaStart:si,areaEnd:si,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 lb(e){return new rp(e)}function Qc(e){return e<0?-1:1}function Jc(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(Qc(a)+Qc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function es(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wa(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 di(e){this._context=e}di.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:Wa(this,this._t0,es(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,Wa(this,es(this,r=Jc(this,e,t)),r);break;default:Wa(this,this._t0,r=Jc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function np(e){this._context=new ip(e)}(np.prototype=Object.create(di.prototype)).point=function(e,t){di.prototype.point.call(this,t,e)};function ip(e){this._context=e}ip.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 cb(e){return new di(e)}function sb(e){return new np(e)}function ap(e){this._context=e}ap.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=ts(e),i=ts(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 ts(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 fb(e){return new ap(e)}function ia(e,t){this._context=e,this._t=t}ia.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 db(e){return new ia(e,.5)}function vb(e){return new ia(e,0)}function hb(e){return new ia(e,1)}function fr(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 ju(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function pb(e,t){return e[t]}function yb(e){const t=[];return t.key=e,t}function mb(){var e=X([]),t=ju,r=fr,n=pb;function i(a){var o=Array.from(e.apply(this,arguments),yb),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=Al(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:X(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:X(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ju:typeof a=="function"?a:X(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??fr,i):r},i}function gb(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}fr(e,t)}}function bb(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}fr(e,t)}}function wb(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,v=(f-d)/2,h=0;h<u;++h){var p=e[t[h]],y=p[n][1]||0,g=p[n-1][1]||0;v+=y-g}l+=f,s+=v*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,fr(e,t)}}var Ua={},Ka={},rs;function xb(){return rs||(rs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Ka)),Ka}var Ha={},ns;function op(){return ns||(ns=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})(Ha)),Ha}var Ya={},is;function El(){return is||(is=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(Ya)),Ya}var Ga={},Va={},as;function Ob(){return as||(as=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})(Va)),Va}var os;function jl(){return os||(os=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ob(),r=El();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})(Ga)),Ga}var us;function Cl(){return us||(us=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xb(),r=op(),n=El(),i=jl();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?.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})(Ua)),Ua}var Xa,ls;function Pb(){return ls||(ls=1,Xa=Cl().get),Xa}var Sb=Pb();const Cr=Ht(Sb);var Ab=4;function Ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ab,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function ae(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+Ft(u)+a:i+a},"")}var Ve=e=>e===0?0:e>0?1:-1,At=e=>typeof e=="number"&&e!=+e,dr=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,I=e=>(typeof e=="number"||e instanceof Number)&&!At(e),ht=e=>I(e)||typeof e=="string",_b=0,on=e=>{var t=++_b;return"".concat(e||"").concat(t)},Kt=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(!I(t)&&typeof t!="string")return n;var a;if(dr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return At(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},up=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 gt(e,t,r){return I(e)&&I(t)?Ft(e+r*(t-e)):t}function lp(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Cr(n,t))===r)}var we=e=>e===null||typeof e>"u",On=e=>we(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ke(e){return e!=null}function Pn(){}var Eb=["type","size","sizeType"];function Cu(){return Cu=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},Cu.apply(null,arguments)}function cs(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 ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cs(Object(r),!0).forEach(function(n){jb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jb(e,t,r){return(t=Cb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cb(e){var t=Tb(e,"string");return typeof t=="symbol"?t:t+""}function Tb(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 Mb(e,t){if(e==null)return{};var r,n,i=kb(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 kb(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 cp={symbolCircle:_l,symbolCross:Y0,symbolDiamond:V0,symbolSquare:X0,symbolStar:eb,symbolTriangle:tb,symbolWye:nb},Ib=Math.PI/180,Db=e=>{var t="symbol".concat(On(e));return cp[t]||_l},Nb=(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*Ib;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}},$b=(e,t)=>{cp["symbol".concat(On(e))]=t},Tl=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Mb(e,Eb),a=ss(ss({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=Db(o),v=ib().type(d).size(Nb(r,n,o)),h=v();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=Ne(a);return I(s)&&I(c)&&I(r)?m.createElement("path",Cu({},f,{className:G("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Tl.registerSymbol=$b;var sp=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ml=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Ol(i)&&(n[i]=(a=>r[i](r,a)))}),n},Rb=(e,t,r)=>n=>(e(t,r,n),null),fp=(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];Ol(i)&&typeof a=="function"&&(n||(n={}),n[i]=Rb(a,t,r))}),n};function fs(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 Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fs(Object(r),!0).forEach(function(n){zb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zb(e,t,r){return(t=Bb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bb(e){var t=qb(e,"string");return typeof t=="symbol"?t:t+""}function qb(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 $e(e,t){var r=Lb({},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 vi(){return vi=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},vi.apply(null,arguments)}function ds(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 Fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ds(Object(r),!0).forEach(function(n){Wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ds(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wb(e,t,r){return(t=Ub(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ub(e){var t=Kb(e,"string");return typeof t=="symbol"?t:t+""}function Kb(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 Ge=32,Hb={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function Yb(e){var{data:t,iconType:r,inactiveColor:n}=e,i=Ge/2,a=Ge/6,o=Ge/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline"){var s;return m.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:(s=t.payload)===null||s===void 0?void 0:s.strokeDasharray,x1:0,y1:i,x2:Ge,y2:i,className:"recharts-legend-icon"})}if(l==="line")return m.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(o,`
1
+ import{r as m,al as G,bp as Ht,bq as wl,br as xl,bs as T0}from"./index-lJlNPFVJ.js";var M0=["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 Ol(e){if(typeof e!="string")return!1;var t=M0;return t.includes(e)}var k0=["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"],I0=new Set(k0);function qh(e){return typeof e!="string"?!1:I0.has(e)}function Fh(e){return typeof e=="string"&&e.startsWith("data-")}function St(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(qh(r)||Fh(r))&&(t[r]=e[r]);return t}function ta(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return St(t)}return typeof e=="object"&&!Array.isArray(e)?St(e):null}function Ne(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(qh(r)||Fh(r)||Ol(r))&&(t[r]=e[r]);return t}function D0(e){return e==null?null:m.isValidElement(e)?Ne(e.props):typeof e=="object"&&!Array.isArray(e)?Ne(e):null}var N0=["children","width","height","viewBox","className","style","title","desc"];function Pu(){return Pu=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},Pu.apply(null,arguments)}function $0(e,t){if(e==null)return{};var r,n,i=R0(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 R0(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 Pl=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:u,title:l,desc:s}=e,c=$0(e,N0),f=a||{width:n,height:i,x:0,y:0},d=G("recharts-surface",o);return m.createElement("svg",Pu({},Ne(c),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),m.createElement("title",null,l),m.createElement("desc",null,s),r)}),L0=["children","className"];function Su(){return Su=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},Su.apply(null,arguments)}function z0(e,t){if(e==null)return{};var r,n,i=B0(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 B0(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 sr=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=z0(e,L0),a=G("recharts-layer",n);return m.createElement("g",Su({className:a},Ne(i),{ref:t}),r)}),Wh=m.createContext(null),q0=()=>m.useContext(Wh);function X(e){return function(){return e}}const Uh=Math.cos,li=Math.sin,ut=Math.sqrt,ci=Math.PI,ra=2*ci,Au=Math.PI,_u=2*Au,er=1e-6,F0=_u-er;function Kh(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W0(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Kh;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 U0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Kh:W0(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>er)if(!(Math.abs(f*l-s*c)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,h=i-u,p=l*l+s*s,y=v*v+h*h,g=Math.sqrt(p),w=Math.sqrt(d),b=a*Math.tan((Au-Math.acos((p+d-y)/(2*g*w)))/2),x=b/w,P=b/g;Math.abs(x-1)>er&&this._append`L${t+x*c},${r+x*f}`,this._append`A${a},${a},0,0,${+(f*v>c*h)},${this._x1=t+P*l},${this._y1=r+P*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)>er||Math.abs(this._y1-c)>er)&&this._append`L${s},${c}`,n&&(d<0&&(d=d%_u+_u),d>F0?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>er&&this._append`A${n},${n},0,${+(d>=Au)},${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 Sl(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 U0(t)}function Al(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hh(e){this._context=e}Hh.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 na(e){return new Hh(e)}function Yh(e){return e[0]}function Gh(e){return e[1]}function Vh(e,t){var r=X(!0),n=null,i=na,a=null,o=Sl(u);e=typeof e=="function"?e:e===void 0?Yh:X(e),t=typeof t=="function"?t:t===void 0?Gh:X(t);function u(l){var s,c=(l=Al(l)).length,f,d=!1,v;for(n==null&&(a=i(v=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(v)return a=null,v+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:X(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:X(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:X(!!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 Bn(e,t,r){var n=null,i=X(!0),a=null,o=na,u=null,l=Sl(s);e=typeof e=="function"?e:e===void 0?Yh:X(+e),t=typeof t=="function"?t:X(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Gh:X(+r);function s(f){var d,v,h,p=(f=Al(f)).length,y,g=!1,w,b=new Array(p),x=new Array(p);for(a==null&&(u=o(w=l())),d=0;d<=p;++d){if(!(d<p&&i(y=f[d],d,f))===g)if(g=!g)v=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=v;--h)u.point(b[h],x[h]);u.lineEnd(),u.areaEnd()}g&&(b[d]=+e(y,d,f),x[d]=+t(y,d,f),u.point(n?+n(y,d,f):b[d],r?+r(y,d,f):x[d]))}if(w)return u=null,w+""||null}function c(){return Vh().defined(i).curve(o).context(a)}return s.x=function(f){return arguments.length?(e=typeof f=="function"?f:X(+f),n=null,s):e},s.x0=function(f){return arguments.length?(e=typeof f=="function"?f:X(+f),s):e},s.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:X(+f),s):n},s.y=function(f){return arguments.length?(t=typeof f=="function"?f:X(+f),r=null,s):t},s.y0=function(f){return arguments.length?(t=typeof f=="function"?f:X(+f),s):t},s.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:X(+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:X(!!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 Xh{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 K0(e){return new Xh(e,!0)}function H0(e){return new Xh(e,!1)}const _l={draw(e,t){const r=ut(t/ci);e.moveTo(r,0),e.arc(0,0,r,0,ra)}},Y0={draw(e,t){const r=ut(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()}},Zh=ut(1/3),G0=Zh*2,V0={draw(e,t){const r=ut(t/G0),n=r*Zh;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},X0={draw(e,t){const r=ut(t),n=-r/2;e.rect(n,n,r,r)}},Z0=.8908130915292852,Qh=li(ci/10)/li(7*ci/10),Q0=li(ra/10)*Qh,J0=-Uh(ra/10)*Qh,eb={draw(e,t){const r=ut(t*Z0),n=Q0*r,i=J0*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=ra*a/5,u=Uh(o),l=li(o);e.lineTo(l*r,-u*r),e.lineTo(u*n-l*i,l*n+u*i)}e.closePath()}},Fa=ut(3),tb={draw(e,t){const r=-ut(t/(Fa*3));e.moveTo(0,r*2),e.lineTo(-Fa*r,-r),e.lineTo(Fa*r,-r),e.closePath()}},Ke=-.5,He=ut(3)/2,Eu=1/ut(12),rb=(Eu/2+1)*3,nb={draw(e,t){const r=ut(t/rb),n=r/2,i=r*Eu,a=n,o=r*Eu+r,u=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(u,l),e.lineTo(Ke*n-He*i,He*n+Ke*i),e.lineTo(Ke*a-He*o,He*a+Ke*o),e.lineTo(Ke*u-He*l,He*u+Ke*l),e.lineTo(Ke*n+He*i,Ke*i-He*n),e.lineTo(Ke*a+He*o,Ke*o-He*a),e.lineTo(Ke*u+He*l,Ke*l-He*u),e.closePath()}};function ib(e,t){let r=null,n=Sl(i);e=typeof e=="function"?e:X(e||_l),t=typeof t=="function"?t:X(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:X(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:X(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function si(){}function fi(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 Jh(e){this._context=e}Jh.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:fi(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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ab(e){return new Jh(e)}function ep(e){this._context=e}ep.prototype={areaStart:si,areaEnd:si,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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ob(e){return new ep(e)}function tp(e){this._context=e}tp.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:fi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ub(e){return new tp(e)}function rp(e){this._context=e}rp.prototype={areaStart:si,areaEnd:si,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 lb(e){return new rp(e)}function Qc(e){return e<0?-1:1}function Jc(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(Qc(a)+Qc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function es(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Wa(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 di(e){this._context=e}di.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:Wa(this,this._t0,es(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,Wa(this,es(this,r=Jc(this,e,t)),r);break;default:Wa(this,this._t0,r=Jc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function np(e){this._context=new ip(e)}(np.prototype=Object.create(di.prototype)).point=function(e,t){di.prototype.point.call(this,t,e)};function ip(e){this._context=e}ip.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 cb(e){return new di(e)}function sb(e){return new np(e)}function ap(e){this._context=e}ap.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=ts(e),i=ts(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 ts(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 fb(e){return new ap(e)}function ia(e,t){this._context=e,this._t=t}ia.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 db(e){return new ia(e,.5)}function vb(e){return new ia(e,0)}function hb(e){return new ia(e,1)}function fr(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 ju(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function pb(e,t){return e[t]}function yb(e){const t=[];return t.key=e,t}function mb(){var e=X([]),t=ju,r=fr,n=pb;function i(a){var o=Array.from(e.apply(this,arguments),yb),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=Al(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:X(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:X(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ju:typeof a=="function"?a:X(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??fr,i):r},i}function gb(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}fr(e,t)}}function bb(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}fr(e,t)}}function wb(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,v=(f-d)/2,h=0;h<u;++h){var p=e[t[h]],y=p[n][1]||0,g=p[n-1][1]||0;v+=y-g}l+=f,s+=v*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=s/l)}i[n-1][1]+=i[n-1][0]=r,fr(e,t)}}var Ua={},Ka={},rs;function xb(){return rs||(rs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Ka)),Ka}var Ha={},ns;function op(){return ns||(ns=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})(Ha)),Ha}var Ya={},is;function El(){return is||(is=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(Ya)),Ya}var Ga={},Va={},as;function Ob(){return as||(as=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})(Va)),Va}var os;function jl(){return os||(os=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ob(),r=El();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})(Ga)),Ga}var us;function Cl(){return us||(us=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xb(),r=op(),n=El(),i=jl();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?.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})(Ua)),Ua}var Xa,ls;function Pb(){return ls||(ls=1,Xa=Cl().get),Xa}var Sb=Pb();const Cr=Ht(Sb);var Ab=4;function Ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ab,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function ae(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+Ft(u)+a:i+a},"")}var Ve=e=>e===0?0:e>0?1:-1,At=e=>typeof e=="number"&&e!=+e,dr=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,I=e=>(typeof e=="number"||e instanceof Number)&&!At(e),ht=e=>I(e)||typeof e=="string",_b=0,on=e=>{var t=++_b;return"".concat(e||"").concat(t)},Kt=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(!I(t)&&typeof t!="string")return n;var a;if(dr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return At(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},up=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 gt(e,t,r){return I(e)&&I(t)?Ft(e+r*(t-e)):t}function lp(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Cr(n,t))===r)}var we=e=>e===null||typeof e>"u",On=e=>we(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ke(e){return e!=null}function Pn(){}var Eb=["type","size","sizeType"];function Cu(){return Cu=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},Cu.apply(null,arguments)}function cs(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 ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cs(Object(r),!0).forEach(function(n){jb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jb(e,t,r){return(t=Cb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cb(e){var t=Tb(e,"string");return typeof t=="symbol"?t:t+""}function Tb(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 Mb(e,t){if(e==null)return{};var r,n,i=kb(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 kb(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 cp={symbolCircle:_l,symbolCross:Y0,symbolDiamond:V0,symbolSquare:X0,symbolStar:eb,symbolTriangle:tb,symbolWye:nb},Ib=Math.PI/180,Db=e=>{var t="symbol".concat(On(e));return cp[t]||_l},Nb=(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*Ib;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}},$b=(e,t)=>{cp["symbol".concat(On(e))]=t},Tl=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Mb(e,Eb),a=ss(ss({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var u=()=>{var d=Db(o),v=ib().type(d).size(Nb(r,n,o)),h=v();if(h!==null)return h},{className:l,cx:s,cy:c}=a,f=Ne(a);return I(s)&&I(c)&&I(r)?m.createElement("path",Cu({},f,{className:G("recharts-symbols",l),transform:"translate(".concat(s,", ").concat(c,")"),d:u()})):null};Tl.registerSymbol=$b;var sp=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ml=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Ol(i)&&(n[i]=(a=>r[i](r,a)))}),n},Rb=(e,t,r)=>n=>(e(t,r,n),null),fp=(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];Ol(i)&&typeof a=="function"&&(n||(n={}),n[i]=Rb(a,t,r))}),n};function fs(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 Lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fs(Object(r),!0).forEach(function(n){zb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fs(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zb(e,t,r){return(t=Bb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bb(e){var t=qb(e,"string");return typeof t=="symbol"?t:t+""}function qb(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 $e(e,t){var r=Lb({},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 vi(){return vi=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},vi.apply(null,arguments)}function ds(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 Fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ds(Object(r),!0).forEach(function(n){Wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ds(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wb(e,t,r){return(t=Ub(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ub(e){var t=Kb(e,"string");return typeof t=="symbol"?t:t+""}function Kb(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 Ge=32,Hb={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function Yb(e){var{data:t,iconType:r,inactiveColor:n}=e,i=Ge/2,a=Ge/6,o=Ge/3,u=t.inactive?n:t.color,l=r??t.type;if(l==="none")return null;if(l==="plainline"){var s;return m.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:(s=t.payload)===null||s===void 0?void 0:s.strokeDasharray,x1:0,y1:i,x2:Ge,y2:i,className:"recharts-legend-icon"})}if(l==="line")return m.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(Ge,"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 m.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ge/8,"h").concat(Ge,"v").concat(Ge*3/4,"h").concat(-Ge,"z"),className:"recharts-legend-icon"});if(m.isValidElement(t.legendIcon)){var c=Fb({},t);return delete c.legendIcon,m.cloneElement(t.legendIcon,c)}return m.createElement(Tl,{fill:u,cx:i,cy:i,size:Ge,sizeType:"diameter",type:l})}function Gb(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o}=e,u={x:0,y:0,width:Ge,height:Ge},l={display:n==="horizontal"?"inline-block":"block",marginRight:10},s={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((c,f)=>{var d=c.formatter||i,v=G({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:c.inactive});if(c.type==="none")return null;var h=c.inactive?a:c.color,p=d?d(c.value,c,f):c.value;return m.createElement("li",vi({className:v,style:l,key:"legend-item-".concat(f)},fp(e,c,f)),m.createElement(Pl,{width:r,height:r,viewBox:u,style:s,"aria-label":"".concat(p," legend icon")},m.createElement(Yb,{data:c,iconType:o,inactiveColor:a})),m.createElement("span",{className:"recharts-legend-item-text",style:{color:h}},p))})}var Vb=e=>{var t=$e(e,Hb),{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 m.createElement("ul",{className:"recharts-default-legend",style:a},m.createElement(Gb,vi({},t,{payload:r})))},Za={},Qa={},vs;function Xb(){return vs||(vs=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})(Qa)),Qa}var Ja={},hs;function Zb(){return hs||(hs=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})(Ja)),Ja}var eo={},ps;function dp(){return ps||(ps=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(eo)),eo}var to={},ro={},no={},ys;function Qb(){return ys||(ys=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(no)),no}var ms;function kl(){return ms||(ms=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qb();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(ro)),ro}var io={},gs;function Jb(){return gs||(gs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(io)),io}var bs;function ew(){return bs||(bs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kl(),r=Jb();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(to)),to}var ao={},oo={},ws;function tw(){return ws||(ws=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cl();function r(n){return function(i){return t.get(i,n)}}e.property=r})(oo)),oo}var uo={},lo={},co={},so={},xs;function vp(){return xs||(xs=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})(so)),so}var fo={},Os;function hp(){return Os||(Os=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})(fo)),fo}var vo={},Ps;function pp(){return Ps||(Ps=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})(vo)),vo}var Ss;function rw(){return Ss||(Ss=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vp(),r=hp(),n=pp();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function v(h,p,y,g,w,b){const x=d(h,p,y,g,w,b);return x!==void 0?!!x:a(h,p,v,b)},new Map)}function a(c,f,d,v){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,v);case"function":return Object.keys(f).length>0?a(c,{...f},d,v):n.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(c,f)}}function o(c,f,d,v){if(f==null)return!0;if(Array.isArray(f))return l(c,f,d,v);if(f instanceof Map)return u(c,f,d,v);if(f instanceof Set)return s(c,f,d,v);const h=Object.keys(f);if(c==null||r.isPrimitive(c))return h.length===0;if(h.length===0)return!0;if(v?.has(f))return v.get(f)===c;v?.set(f,c);try{for(let p=0;p<h.length;p++){const y=h[p];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,v))return!1}return!0}finally{v?.delete(f)}}function u(c,f,d,v){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[h,p]of f.entries()){const y=c.get(h);if(d(y,p,h,c,f,v)===!1)return!1}return!0}function l(c,f,d,v){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const h=new Set;for(let p=0;p<f.length;p++){const y=f[p];let g=!1;for(let w=0;w<c.length;w++){if(h.has(w))continue;const b=c[w];let x=!1;if(d(b,y,p,c,f,v)&&(x=!0),x){h.add(w),g=!0;break}}if(!g)return!1}return!0}function s(c,f,d,v){return f.size===0?!0:c instanceof Set?l([...c],[...f],d,v):!1}e.isMatchWith=i,e.isSetMatch=s})(co)),co}var As;function yp(){return As||(As=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rw();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(lo)),lo}var ho={},po={},yo={},_s;function nw(){return _s||(_s=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})(yo)),yo}var mo={},Es;function Il(){return Es||(Es=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})(mo)),mo}var go={},js;function mp(){return js||(js=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]",v="[object Object]",h="[object Error]",p="[object DataView]",y="[object Uint8Array]",g="[object Uint8ClampedArray]",w="[object Uint16Array]",b="[object Uint32Array]",x="[object BigUint64Array]",P="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",j="[object BigInt64Array]",M="[object Float32Array]",N="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=j,e.bigUint64ArrayTag=x,e.booleanTag=i,e.dataViewTag=p,e.dateTag=u,e.errorTag=h,e.float32ArrayTag=M,e.float64ArrayTag=N,e.functionTag=f,e.int16ArrayTag=O,e.int32ArrayTag=A,e.int8ArrayTag=P,e.mapTag=l,e.numberTag=n,e.objectTag=v,e.regexpTag=t,e.setTag=s,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=w,e.uint32ArrayTag=b,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=g})(go)),go}var bo={},Cs;function iw(){return Cs||(Cs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(bo)),bo}var Ts;function gp(){return Ts||(Ts=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nw(),r=Il(),n=mp(),i=hp(),a=iw();function o(c,f){return u(c,void 0,c,new Map,f)}function u(c,f,d,v=new Map,h=void 0){const p=h?.(c,f,d,v);if(p!==void 0)return p;if(i.isPrimitive(c))return c;if(v.has(c))return v.get(c);if(Array.isArray(c)){const y=new Array(c.length);v.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,v,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;v.set(c,y);for(const[g,w]of c)y.set(g,u(w,g,d,v,h));return y}if(c instanceof Set){const y=new Set;v.set(c,y);for(const g of c)y.add(u(g,void 0,d,v,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);v.set(c,y);for(let g=0;g<c.length;g++)y[g]=u(c[g],g,d,v,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 v.set(c,y),l(y,c,d,v,h),y}if(typeof File<"u"&&c instanceof File){const y=new File([c],c.name,{type:c.type});return v.set(c,y),l(y,c,d,v,h),y}if(typeof Blob<"u"&&c instanceof Blob){const y=new Blob([c],{type:c.type});return v.set(c,y),l(y,c,d,v,h),y}if(c instanceof Error){const y=new c.constructor;return v.set(c,y),y.message=c.message,y.name=c.name,y.stack=c.stack,y.cause=c.cause,l(y,c,d,v,h),y}if(c instanceof Boolean){const y=new Boolean(c.valueOf());return v.set(c,y),l(y,c,d,v,h),y}if(c instanceof Number){const y=new Number(c.valueOf());return v.set(c,y),l(y,c,d,v,h),y}if(c instanceof String){const y=new String(c.valueOf());return v.set(c,y),l(y,c,d,v,h),y}if(typeof c=="object"&&s(c)){const y=Object.create(Object.getPrototypeOf(c));return v.set(c,y),l(y,c,d,v,h),y}return c}function l(c,f,d=c,v,h){const p=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<p.length;y++){const g=p[y],w=Object.getOwnPropertyDescriptor(c,g);(w==null||w.writable)&&(c[g]=u(f[g],g,d,v,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})(po)),po}var Ms;function aw(){return Ms||(Ms=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gp();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(ho)),ho}var ks;function ow(){return ks||(ks=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yp(),r=aw();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(uo)),uo}var wo={},xo={},Oo={},Is;function uw(){return Is||(Is=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gp(),r=Il(),n=mp();function i(a,o){return t.cloneDeepWith(a,(u,l,s,c)=>{const f=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?.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})(Oo)),Oo}var Ds;function lw(){return Ds||(Ds=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uw();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(xo)),xo}var Po={},So={},Ns;function bp(){return Ns||(Ns=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})(So)),So}var Ao={},$s;function cw(){return $s||($s=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Il();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Ao)),Ao}var Rs;function sw(){return Rs||(Rs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=op(),r=bp(),n=cw(),i=jl();function a(o,u){let l;if(Array.isArray(u)?l=u:typeof u=="string"&&t.isDeepKey(u)&&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})(Po)),Po}var Ls;function fw(){return Ls||(Ls=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yp(),r=El(),n=lw(),i=Cl(),a=sw();function o(u,l){switch(typeof u){case"object":{Object.is(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})(wo)),wo}var zs;function dw(){return zs||(zs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dp(),r=tw(),n=ow(),i=fw();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})(ao)),ao}var Bs;function vw(){return Bs||(Bs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xb(),r=Zb(),n=dp(),i=ew(),a=dw();function o(u,l=n.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),r.ary(a.iteratee(l),1)):[]}e.uniqBy=o})(Za)),Za}var _o,qs;function hw(){return qs||(qs=1,_o=vw().uniqBy),_o}var pw=hw();const Fs=Ht(pw);function wp(e,t,r){return t===!0?Fs(e,r):typeof t=="function"?Fs(e,t):e}var Eo={exports:{}},jo={},Co={exports:{}},To={};var Ws;function yw(){if(Ws)return To;Ws=1;var e=wl();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function u(f,d){var v=d(),h=n({inst:{value:v,getSnapshot:d}}),p=h[0].inst,y=h[1];return a(function(){p.value=v,p.getSnapshot=d,l(p)&&y({inst:p})},[f,v,d]),i(function(){return l(p)&&y({inst:p}),f(function(){l(p)&&y({inst:p})})},[f]),o(v),v}function l(f){var d=f.getSnapshot;f=f.value;try{var v=d();return!r(f,v)}catch{return!0}}function s(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:u;return To.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,To}var Us;function mw(){return Us||(Us=1,Co.exports=yw()),Co.exports}var Ks;function gw(){if(Ks)return jo;Ks=1;var e=wl(),t=mw();function r(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,u=e.useMemo,l=e.useDebugValue;return jo.useSyncExternalStoreWithSelector=function(s,c,f,d,v){var h=a(null);if(h.current===null){var p={hasValue:!1,value:null};h.current=p}else p=h.current;h=u(function(){function g(O){if(!w){if(w=!0,b=O,O=d(O),v!==void 0&&p.hasValue){var A=p.value;if(v(A,O))return x=A}return x=O}if(A=x,n(b,O))return A;var j=d(O);return v!==void 0&&v(A,j)?(b=O,A):(b=O,x=j)}var w=!1,b,x,P=f===void 0?null:f;return[function(){return g(c())},P===null?void 0:function(){return g(P())}]},[c,f,d,v]);var y=i(s,h[0],h[1]);return o(function(){p.hasValue=!0,p.value=y},[y]),l(y),y},jo}var Hs;function bw(){return Hs||(Hs=1,Eo.exports=gw()),Eo.exports}var ww=bw(),Dl=m.createContext(null),xw=e=>e,J=()=>{var e=m.useContext(Dl);return e?e.store.dispatch:xw},ri=()=>{},Ow=()=>ri,Pw=(e,t)=>e===t;function D(e){var t=m.useContext(Dl),r=m.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ri,[t,e]);return ww.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Ow,t?t.store.getState:ri,t?t.store.getState:ri,r,Pw)}function Sw(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Aw(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function _w(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 Ys=e=>Array.isArray(e)?e:[e];function Ew(e){const t=Array.isArray(e[0])?e[0]:e;return _w(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function jw(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var Cw=class{constructor(e){this.value=e}deref(){return this.value}},Tw=typeof WeakRef<"u"?WeakRef:Cw,Mw=0,Gs=1;function qn(){return{s:Mw,v:void 0,o:null,p:null}}function xp(e,t={}){let r=qn();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let u=r;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const v=arguments[f];if(typeof v=="function"||typeof v=="object"&&v!==null){let h=u.o;h===null&&(u.o=h=new WeakMap);const p=h.get(v);p===void 0?(u=qn(),h.set(v,u)):u=p}else{let h=u.p;h===null&&(u.p=h=new Map);const p=h.get(v);p===void 0?(u=qn(),h.set(v,u)):u=p}}const s=u;let c;if(u.s===Gs)c=u.v;else if(c=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,c)&&(c=f,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new Tw(c):c}return s.s=Gs,s.v=c,c}return o.clearCache=()=>{r=qn(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function kw(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()),Sw(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const c={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:v=xp,argsMemoizeOptions:h=[]}=c,p=Ys(d),y=Ys(h),g=Ew(i),w=f(function(){return a++,s.apply(null,arguments)},...p),b=v(function(){o++;const P=jw(g,arguments);return u=w.apply(null,P),u},...y);return Object.assign(b,{resultFunc:s,memoizedResultFunc:w,dependencies:g,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var S=kw(xp),Iw=Object.assign((e,t=S)=>{Aw(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:()=>Iw}),Mo={},ko={},Io={},Vs;function Dw(){return Vs||(Vs=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})(Io)),Io}var Do={},No={},Xs;function Op(){return Xs||(Xs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(No)),No}var Zs;function Nw(){return Zs||(Zs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Op(),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})(Do)),Do}var Qs;function $w(){return Qs||(Qs=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dw(),r=Nw(),n=jl();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(v=>String(v));const s=(v,h)=>{let p=v;for(let y=0;y<h.length&&p!=null;++y)p=p[h[y]];return p},c=(v,h)=>h==null||v==null?h:typeof v=="object"&&"key"in v?Object.hasOwn(h,v.key)?h[v.key]:s(h,v.path):typeof v=="function"?v(h):Array.isArray(v)?s(h,v):typeof h=="object"?h[v]:h,f=o.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||r.isKey(v)?v:{key:v,path:n.toPath(v)}));return a.map(v=>({original:v,criteria:f.map(h=>c(h,v))})).slice().sort((v,h)=>{for(let p=0;p<f.length;p++){const y=t.compareValues(v.criteria[p],h.criteria[p],u[p]);if(y!==0)return y}return 0}).map(v=>v.original)}e.orderBy=i})(ko)),ko}var $o={},Js;function Rw(){return Js||(Js=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})($o)),$o}var Ro={},ef;function Pp(){return ef||(ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bp(),r=kl(),n=vp(),i=pp();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})(Ro)),Ro}var tf;function Lw(){return tf||(tf=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$w(),r=Rw(),n=Pp();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})(Mo)),Mo}var Lo,rf;function zw(){return rf||(rf=1,Lo=Lw().sortBy),Lo}var Bw=zw();const aa=Ht(Bw);var Sp=e=>e.legend.settings,qw=e=>e.legend.size,Fw=e=>e.legend.payload,Ww=S([Fw,Sp],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?aa(n,r):n});function Uw(){return D(Ww)}var Fn=1;function Ap(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.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)>Fn||Math.abs(o.left-t.left)>Fn||Math.abs(o.top-t.top)>Fn||Math.abs(o.width-t.width)>Fn)&&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 me(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 Kw=typeof Symbol=="function"&&Symbol.observable||"@@observable",nf=Kw,zo=()=>Math.random().toString(36).substring(7).split("").join("."),Hw={INIT:`@@redux/INIT${zo()}`,REPLACE:`@@redux/REPLACE${zo()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${zo()}`},hi=Hw;function Nl(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 _p(e,t,r){if(typeof e!="function")throw new Error(me(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(me(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(me(1));return r(_p)(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(me(3));return i}function f(y){if(typeof y!="function")throw new Error(me(4));if(l)throw new Error(me(5));let g=!0;s();const w=u++;return o.set(w,y),function(){if(g){if(l)throw new Error(me(6));g=!1,s(),o.delete(w),a=null}}}function d(y){if(!Nl(y))throw new Error(me(7));if(typeof y.type>"u")throw new Error(me(8));if(typeof y.type!="string")throw new Error(me(17));if(l)throw new Error(me(9));try{l=!0,i=n(i,y)}finally{l=!1}return(a=o).forEach(w=>{w()}),y}function v(y){if(typeof y!="function")throw new Error(me(10));n=y,d({type:hi.REPLACE})}function h(){const y=f;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(me(11));function w(){const x=g;x.next&&x.next(c())}return w(),{unsubscribe:y(w)}},[nf](){return this}}}return d({type:hi.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:v,[nf]:h}}function Yw(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:hi.INIT})>"u")throw new Error(me(12));if(typeof r(void 0,{type:hi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(me(13))})}function Ep(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{Yw(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],v=o[f],h=d(v,u);if(typeof h>"u")throw u&&u.type,new Error(me(14));s[f]=h,l=l||h!==v}return l=l||n.length!==Object.keys(o).length,l?s:o}}function pi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Gw(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(me(15))};const o={getState:i.getState,dispatch:(l,...s)=>a(l,...s)},u=e.map(l=>l(o));return a=pi(...u)(i.dispatch),{...i,dispatch:a}}}function jp(e){return Nl(e)&&"type"in e&&typeof e.type=="string"}var Cp=Symbol.for("immer-nothing"),af=Symbol.for("immer-draftable"),Ee=Symbol.for("immer-state");function rt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fe=Object,Tr=Fe.getPrototypeOf,yi="constructor",oa="prototype",Tu="configurable",mi="enumerable",ni="writable",un="value",_t=e=>!!e&&!!e[Ee];function ot(e){return e?Tp(e)||la(e)||!!e[af]||!!e[yi]?.[af]||ca(e)||sa(e):!1}var Vw=Fe[oa][yi].toString(),of=new WeakMap;function Tp(e){if(!e||!$l(e))return!1;const t=Tr(e);if(t===null||t===Fe[oa])return!0;const r=Fe.hasOwnProperty.call(t,yi)&&t[yi];if(r===Object)return!0;if(!Sr(r))return!1;let n=of.get(r);return n===void 0&&(n=Function.toString.call(r),of.set(r,n)),n===Vw}function ua(e,t,r=!0){Sn(e)===0?(r?Reflect.ownKeys(e):Fe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Sn(e){const t=e[Ee];return t?t.type_:la(e)?1:ca(e)?2:sa(e)?3:0}var uf=(e,t,r=Sn(e))=>r===2?e.has(t):Fe[oa].hasOwnProperty.call(e,t),Mu=(e,t,r=Sn(e))=>r===2?e.get(t):e[t],gi=(e,t,r,n=Sn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Xw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var la=Array.isArray,ca=e=>e instanceof Map,sa=e=>e instanceof Set,$l=e=>typeof e=="object",Sr=e=>typeof e=="function",Bo=e=>typeof e=="boolean";function Zw(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var mt=e=>e.copy_||e.base_,Rl=e=>e.modified_?e.copy_:e.base_;function ku(e,t){if(ca(e))return new Map(e);if(sa(e))return new Set(e);if(la(e))return Array[oa].slice.call(e);const r=Tp(e);if(t===!0||t==="class_only"&&!r){const n=Fe.getOwnPropertyDescriptors(e);delete n[Ee];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],u=n[o];u[ni]===!1&&(u[ni]=!0,u[Tu]=!0),(u.get||u.set)&&(n[o]={[Tu]:!0,[ni]:!0,[mi]:u[mi],[un]:e[o]})}return Fe.create(Tr(e),n)}else{const n=Tr(e);if(n!==null&&r)return{...e};const i=Fe.create(n);return Fe.assign(i,e)}}function Ll(e,t=!1){return fa(e)||_t(e)||!ot(e)||(Sn(e)>1&&Fe.defineProperties(e,{set:Wn,add:Wn,clear:Wn,delete:Wn}),Fe.freeze(e),t&&ua(e,(r,n)=>{Ll(n,!0)},!1)),e}function Qw(){rt(2)}var Wn={[un]:Qw};function fa(e){return e===null||!$l(e)?!0:Fe.isFrozen(e)}var bi="MapSet",Iu="Patches",lf="ArrayMethods",Mp={};function vr(e){const t=Mp[e];return t||rt(0,e),t}var cf=e=>!!Mp[e],ln,kp=()=>ln,Jw=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:cf(bi)?vr(bi):void 0,arrayMethodsPlugin_:cf(lf)?vr(lf):void 0});function sf(e,t){t&&(e.patchPlugin_=vr(Iu),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Du(e){Nu(e),e.drafts_.forEach(ex),e.drafts_=null}function Nu(e){e===ln&&(ln=e.parent_)}var ff=e=>ln=Jw(ln,e);function ex(e){const t=e[Ee];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function df(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ee].modified_&&(Du(t),rt(4)),ot(e)&&(e=vf(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ee].base_,e,t)}else e=vf(t,r);return tx(t,e,!0),Du(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Cp?e:void 0}function vf(e,t){if(fa(t))return t;const r=t[Ee];if(!r)return wi(t,e.handledSet_,e);if(!da(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);Np(r,e)}return r.copy_}function tx(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ll(t,r)}function Ip(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var da=(e,t)=>e.scope_===t,rx=[];function Dp(e,t,r,n){const i=mt(e),a=e.type_;if(n!==void 0&&Mu(i,n,a)===t){gi(i,n,r,a);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;ua(i,(l,s)=>{if(_t(s)){const c=u.get(s)||[];c.push(l),u.set(s,c)}})}const o=e.draftLocations_.get(t)??rx;for(const u of o)gi(i,u,r,a)}function nx(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!da(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=Rl(a);Dp(e,a.draft_??a,o,r),Np(a,i)})}function Np(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Ip(e)}}function ix(e,t,r){const{scope_:n}=e;if(_t(r)){const i=r[Ee];da(i,n)&&i.callbacks_.push(function(){ii(e);const o=Rl(i);Dp(e,r,o,t)})}else ot(r)&&e.callbacks_.push(function(){const a=mt(e);e.type_===3?a.has(r)&&wi(r,n.handledSet_,n):Mu(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&wi(Mu(e.copy_,t,e.type_),n.handledSet_,n)})}function wi(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||_t(e)||t.has(e)||!ot(e)||fa(e)||(t.add(e),ua(e,(n,i)=>{if(_t(i)){const a=i[Ee];if(da(a,r)){const o=Rl(a);gi(e,n,o,e.type_),Ip(a)}}else ot(i)&&wi(i,t,r)})),e}function ax(e,t){const r=la(e),n={type_:r?1:0,scope_:t?t.scope_:kp(),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=xi;r&&(i=[n],a=cn);const{revoke:o,proxy:u}=Proxy.revocable(i,a);return n.draft_=u,n.revoke_=o,[u,n]}var xi={get(e,t){if(t===Ee)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=mt(e);if(!uf(i,t,e.type_))return ox(e,i,t);const a=i[t];if(e.finalized_||!ot(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Zw(t))return a;if(a===qo(e.base_,t)){ii(e);const o=e.type_===1?+t:t,u=Ru(e.scope_,a,e,o);return e.copy_[o]=u}return a},has(e,t){return t in mt(e)},ownKeys(e){return Reflect.ownKeys(mt(e))},set(e,t,r){const n=$p(mt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=qo(mt(e),t),a=i?.[Ee];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Xw(r,i)&&(r!==void 0||uf(e.base_,t,e.type_)))return!0;ii(e),$u(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),ix(e,t,r)),!0},deleteProperty(e,t){return ii(e),qo(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),$u(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=mt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[ni]:!0,[Tu]:e.type_!==1||t!=="length",[mi]:n[mi],[un]:r[t]}},defineProperty(){rt(11)},getPrototypeOf(e){return Tr(e.base_)},setPrototypeOf(){rt(12)}},cn={};for(let e in xi){let t=xi[e];cn[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}cn.deleteProperty=function(e,t){return cn.set.call(this,e,t,void 0)};cn.set=function(e,t,r){return xi.set.call(this,e[0],t,r,e[0])};function qo(e,t){const r=e[Ee];return(r?mt(r):e)[t]}function ox(e,t,r){const n=$p(t,r);return n?un in n?n[un]:n.get?.call(e.draft_):void 0}function $p(e,t){if(!(t in e))return;let r=Tr(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Tr(r)}}function $u(e){e.modified_||(e.modified_=!0,e.parent_&&$u(e.parent_))}function ii(e){e.copy_||(e.assigned_=new Map,e.copy_=ku(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ux=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(Sr(r)&&!Sr(n)){const o=n;n=r;const u=this;return function(s=o,...c){return u.produce(s,f=>n.call(this,f,...c))}}Sr(n)||rt(6),i!==void 0&&!Sr(i)&&rt(7);let a;if(ot(r)){const o=ff(this),u=Ru(o,r,void 0);let l=!0;try{a=n(u),l=!1}finally{l?Du(o):Nu(o)}return sf(o,i),df(a,o)}else if(!r||!$l(r)){if(a=n(r),a===void 0&&(a=r),a===Cp&&(a=void 0),this.autoFreeze_&&Ll(a,!0),i){const o=[],u=[];vr(Iu).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:u}),i(o,u)}return a}else rt(1,r)},this.produceWithPatches=(r,n)=>{if(Sr(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]},Bo(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Bo(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Bo(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ot(t)||rt(8),_t(t)&&(t=at(t));const r=ff(this),n=Ru(r,t,void 0);return n[Ee].isManual_=!0,Nu(r),n}finishDraft(t,r){const n=t&&t[Ee];(!n||!n.isManual_)&&rt(9);const{scope_:i}=n;return sf(i,r),df(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=vr(Iu).applyPatches_;return _t(t)?i(t,r):this.produce(t,a=>i(a,r))}};function Ru(e,t,r,n){const[i,a]=ca(t)?vr(bi).proxyMap_(t,r):sa(t)?vr(bi).proxySet_(t,r):ax(t,r);return(r?.scope_??kp()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?nx(r,a,n):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:s}=l;a.modified_&&s&&s.generatePatches_(a,[],l)}),i}function at(e){return _t(e)||rt(10,e),Rp(e)}function Rp(e){if(!ot(e)||fa(e))return e;const t=e[Ee];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ku(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ku(e,!0);return ua(r,(i,a)=>{gi(r,i,Rp(a))},n),t&&(t.finalized_=!1),r}var lx=new ux,Lp=lx.produce;function zp(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var cx=zp(),sx=zp,fx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?pi:pi.apply(null,arguments)};function Ze(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(We(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=>jp(n)&&n.type===e,r}var Bp=class tn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,tn.prototype)}static get[Symbol.species](){return tn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new tn(...t[0].concat(this)):new tn(...t.concat(this))}};function hf(e){return ot(e)?Lp(e,()=>{}):e}function Un(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function dx(e){return typeof e=="boolean"}var vx=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Bp;return r&&(dx(r)?o.push(cx):o.push(sx(r.extraArgument))),o},qp="RTK_autoBatch",re=()=>e=>({payload:e,meta:{[qp]:!0}}),pf=e=>t=>{setTimeout(t,e)},Fp=(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:pf(10):e.type==="callback"?e.queueNotification:pf(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){try{return i=!c?.meta?.[qp],a=!i,a&&(o||(o=!0,l(s))),n.dispatch(c)}finally{i=!0}}})},hx=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Bp(e);return n&&i.push(Fp(typeof n=="object"?n:void 0)),i};function px(e){const t=vx(),{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(Nl(r))u=Ep(r);else throw new Error(We(1));let l;typeof n=="function"?l=n(t):l=t();let s=pi;i&&(s=fx({trace:!1,...typeof i=="object"&&i}));const c=Gw(...l),f=hx(c);let d=typeof o=="function"?o(f):f();const v=s(...d);return _p(u,a,v)}function Wp(e){const t={},r=[];let n;const i={addCase(a,o){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(We(28));if(u in t)throw new Error(We(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 yx(e){return typeof e=="function"}function mx(e,t){let[r,n,i]=Wp(t),a;if(yx(e))a=()=>hf(e());else{const u=hf(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(_t(c)){const v=f(c,l);return v===void 0?c:v}else{if(ot(c))return Lp(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 gx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",bx=(e=21)=>{let t="",r=e;for(;r--;)t+=gx[Math.random()*64|0];return t},wx=Symbol.for("rtk-slice-createasyncthunk");function xx(e,t){return`${e}/${t}`}function Ox({creators:e}={}){const t=e?.asyncThunk?.[wx];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(We(11));const o=(typeof n.reducers=="function"?n.reducers(Sx()):n.reducers)||{},u=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(b,x){const P=typeof b=="string"?b:b.type;if(!P)throw new Error(We(12));if(P in l.sliceCaseReducersByType)throw new Error(We(13));return l.sliceCaseReducersByType[P]=x,s},addMatcher(b,x){return l.sliceMatchers.push({matcher:b,reducer:x}),s},exposeAction(b,x){return l.actionCreators[b]=x,s},exposeCaseReducer(b,x){return l.sliceCaseReducersByName[b]=x,s}};u.forEach(b=>{const x=o[b],P={reducerName:b,type:xx(i,b),createNotation:typeof n.reducers=="function"};_x(x)?jx(P,x,s,t):Ax(P,x,s)});function c(){const[b={},x=[],P=void 0]=typeof n.extraReducers=="function"?Wp(n.extraReducers):[n.extraReducers],O={...b,...l.sliceCaseReducersByType};return mx(n.initialState,A=>{for(let j in O)A.addCase(j,O[j]);for(let j of l.sliceMatchers)A.addMatcher(j.matcher,j.reducer);for(let j of x)A.addMatcher(j.matcher,j.reducer);P&&A.addDefaultCase(P)})}const f=b=>b,d=new Map,v=new WeakMap;let h;function p(b,x){return h||(h=c()),h(b,x)}function y(){return h||(h=c()),h.getInitialState()}function g(b,x=!1){function P(A){let j=A[b];return typeof j>"u"&&x&&(j=Un(v,P,y)),j}function O(A=f){const j=Un(d,x,()=>new WeakMap);return Un(j,A,()=>{const M={};for(const[N,k]of Object.entries(n.selectors??{}))M[N]=Px(k,A,()=>Un(v,A,y),x);return M})}return{reducerPath:b,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}const w={name:i,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:y,...g(a),injectInto(b,{reducerPath:x,...P}={}){const O=x??a;return b.inject({reducerPath:O,reducer:p},P),{...w,...g(O,!0)}}};return w}}function Px(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 Re=Ox();function Sx(){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 Ax({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!Ex(n))throw new Error(We(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Ze(e,o):Ze(e))}function _x(e){return e._reducerDefinitionType==="asyncThunk"}function Ex(e){return e._reducerDefinitionType==="reducerWithPrepare"}function jx({type:e,reducerName:t},r,n,i){if(!i)throw new Error(We(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||Kn,pending:u||Kn,rejected:l||Kn,settled:s||Kn})}function Kn(){}var Cx="task",Up="listener",Kp="completed",zl="cancelled",Tx=`task-${zl}`,Mx=`task-${Kp}`,Lu=`${Up}-${zl}`,kx=`${Up}-${Kp}`,va=class{constructor(e){this.code=e,this.message=`${Cx} ${zl} (reason: ${e})`}name="TaskAbortError";message},Bl=(e,t)=>{if(typeof e!="function")throw new TypeError(We(32))},Oi=()=>{},Hp=(e,t=Oi)=>(e.catch(t),e),Yp=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ur=e=>{if(e.aborted)throw new va(e.reason)};function Gp(e,t){let r=Oi;return new Promise((n,i)=>{const a=()=>i(new va(e.reason));if(e.aborted){a();return}r=Yp(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Oi})}var Ix=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof va?"cancelled":"rejected",error:r}}finally{t?.()}},Pi=e=>t=>Hp(Gp(e,t).then(r=>(ur(e),r))),Vp=e=>{const t=Pi(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Er}=Object,yf={},ha="listenerMiddleware",Dx=(e,t)=>{const r=n=>Yp(e,()=>n.abort(e.reason));return(n,i)=>{Bl(n);const a=new AbortController;r(a);const o=Ix(async()=>{ur(e),ur(a.signal);const u=await n({pause:Pi(a.signal),delay:Vp(a.signal),signal:a.signal});return ur(a.signal),u},()=>a.abort(Mx));return i?.autoJoin&&t.push(o.catch(Oi)),{result:Pi(e)(o),cancel(){a.abort(Tx)}}}},Nx=(e,t)=>{const r=async(n,i)=>{ur(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 Gp(t,Promise.race(u));return ur(t),l}finally{a()}};return(n,i)=>Hp(r(n,i))},Xp=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=Ze(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(We(21));return Bl(a),{predicate:i,type:t,effect:a}},Zp=Er(e=>{const{type:t,predicate:r,effect:n}=Xp(e);return{id:bx(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(We(22))}}},{withTypes:()=>Zp}),mf=(e,t)=>{const{type:r,effect:n,predicate:i}=Xp(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},zu=e=>{e.pending.forEach(t=>{t.abort(Lu)})},$x=(e,t)=>()=>{for(const r of t.keys())zu(r);e.clear()},gf=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},Qp=Er(Ze(`${ha}/add`),{withTypes:()=>Qp}),Rx=Ze(`${ha}/removeAll`),Jp=Er(Ze(`${ha}/remove`),{withTypes:()=>Jp}),Lx=(...e)=>{console.error(`${ha}/error`,...e)},An=(e={})=>{const t=new Map,r=new Map,n=v=>{const h=r.get(v)??0;r.set(v,h+1)},i=v=>{const h=r.get(v)??1;h===1?r.delete(v):r.set(v,h-1)},{extra:a,onError:o=Lx}=e;Bl(o);const u=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),h=>{v.unsubscribe(),h?.cancelActive&&zu(v)}),l=v=>{const h=mf(t,v)??Zp(v);return u(h)};Er(l,{withTypes:()=>l});const s=v=>{const h=mf(t,v);return h&&(h.unsubscribe(),v.cancelActive&&zu(h)),!!h};Er(s,{withTypes:()=>s});const c=async(v,h,p,y)=>{const g=new AbortController,w=Nx(l,g.signal),b=[];try{v.pending.add(g),n(v),await Promise.resolve(v.effect(h,Er({},p,{getOriginalState:y,condition:(x,P)=>w(x,P).then(Boolean),take:w,delay:Vp(g.signal),pause:Pi(g.signal),extra:a,signal:g.signal,fork:Dx(g.signal,b),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((x,P,O)=>{x!==g&&(x.abort(Lu),O.delete(x))})},cancel:()=>{g.abort(Lu),v.pending.delete(g)},throwIfCancelled:()=>{ur(g.signal)}})))}catch(x){x instanceof va||gf(o,x,{raisedBy:"effect"})}finally{await Promise.all(b),g.abort(kx),i(v),v.pending.delete(g)}},f=$x(t,r);return{middleware:v=>h=>p=>{if(!jp(p))return h(p);if(Qp.match(p))return l(p.payload);if(Rx.match(p)){f();return}if(Jp.match(p))return s(p.payload);let y=v.getState();const g=()=>{if(y===yf)throw new Error(We(23));return y};let w;try{if(w=h(p),t.size>0){const b=v.getState(),x=Array.from(t.values());for(const P of x){let O=!1;try{O=P.predicate(p,b,y)}catch(A){O=!1,gf(o,A,{raisedBy:"predicate"})}O&&c(P,p,v,g)}}}finally{y=yf}return w},startListening:l,stopListening:s,clearListeners:f}};function We(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 zx={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},ey=Re({name:"chartLayout",initialState:zx,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:Bx,setLayout:qx,setChartSize:Fx,setScale:Wx}=ey.actions,Ux=ey.reducer;function ty(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function q(e){return Number.isFinite(e)}function pt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function bf(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 Ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bf(Object(r),!0).forEach(function(n){Kx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kx(e,t,r){return(t=Hx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hx(e){var t=Yx(e,"string");return typeof t=="symbol"?t:t+""}function Yx(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 Ae(e,t,r){return we(e)||we(t)?r:ht(t)?Cr(e,t,r):typeof t=="function"?t(e):r}var Gx=(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"&&I(e[a]))return Ar(Ar({},e),{},{[a]:e[a]+(n||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&o!=="middle"&&I(e[o]))return Ar(Ar({},e),{},{[o]:e[o]+(i||0)})}return e},Yt=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",ry=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,a,o=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(a=!0),u.coordinate));return i||o.push(t),a||o.push(r),o},ny=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:u,isCategorical:l,categoricalDomain:s,tickCount:c,ticks:f,niceTicks:d,axisType:v}=e;if(!o)return null;var h=u==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,p=i==="category"&&o.bandwidth?o.bandwidth()/h:0;if(p=v==="angleAxis"&&a&&a.length>=2?Ve(a[0]-a[1])*2*p:p,f||d){var y=(f||d||[]).map((g,w)=>{var b=n?n.indexOf(g):g,x=o.map(b);return q(x)?{coordinate:x+p,value:g,offset:p,index:w}:null}).filter(ke);return y}return l&&s?s.map((g,w)=>{var b=o.map(g);return q(b)?{coordinate:b+p,value:g,index:w,offset:p}:null}).filter(ke):o.ticks&&c!=null?o.ticks(c).map((g,w)=>{var b=o.map(g);return q(b)?{coordinate:b+p,value:g,index:w,offset:p}:null}).filter(ke):o.domain().map((g,w)=>{var b=o.map(g);return q(b)?{coordinate:b+p,value:n?n[g]:g,index:w,offset:p}:null}).filter(ke)},ND=(e,t)=>{if(!t||t.length!==2||!I(t[0])||!I(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(!I(e[0])||e[0]<r)&&(i[0]=r),(!I(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Vx=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?.[i];if(s!=null){var c=s[1],f=s[0],d=At(c)?f:c;d>=0?(s[0]=a,a+=d,s[1]=a):(s[0]=o,o+=d,s[1]=o)}}}},Xx=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?.[i];if(l!=null){var s=At(l[1])?l[0]:l[1];s>=0?(l[0]=a,a+=s,l[1]=a):(l[0]=0,l[1]=0)}}}},Zx={sign:Vx,expand:gb,none:fr,silhouette:bb,wiggle:wb,positive:Xx},Qx=(e,t,r)=>{var n,i=(n=Zx[r])!==null&&n!==void 0?n:fr,a=mb().keys(t).value((u,l)=>Number(Ae(u,l,0))).order(ju).offset(i),o=a(e);return o.forEach((u,l)=>{u.forEach((s,c)=>{var f=Ae(e[c],t[l],0);Array.isArray(f)&&f.length===2&&I(f[0])&&I(f[1])&&(s[0]=f[0],s[1]=f[1])})}),o};function $D(e){return e==null?void 0:String(e)}function RD(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!we(i[t.dataKey])){var u=lp(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var l=Ae(i,we(o)?t.dataKey:o),s=t.scale.map(l);return I(s)?s:null}var LD=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=Ae(a,t.dataKey,t.scale.domain()[o]);if(we(u))return null;var l=t.scale.map(u);return I(l)?l-i/2+n:null},zD=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]},Jx=e=>{var t=e.flat(2).filter(I);return[Math.min(...t),Math.max(...t)]},eO=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],tO=(e,t,r)=>{if(e!=null)return eO(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=ty(s,t,r),f=Jx(c);return!q(f[0])||!q(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]))},wf=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xf=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Of=(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=aa(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?.coordinate||0)-(s?.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function Pf(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return Ar(Ar({},t),{},{dataKey:r,payload:n,value:i,name:a})}function BD(e,t){if(e)return String(e);if(typeof t=="string")return t}var rO=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},nO=(e,t)=>t==="centric"?e.angle:e.radius,kt=e=>e.layout.width,It=e=>e.layout.height,iO=e=>e.layout.scale,iy=e=>e.layout.margin,pa=S(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ya=S(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),aO="data-recharts-item-index",oO="data-recharts-item-id",_n=60;function Sf(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 Hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sf(Object(r),!0).forEach(function(n){uO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uO(e,t,r){return(t=lO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lO(e){var t=cO(e,"string");return typeof t=="symbol"?t:t+""}function cO(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 sO=e=>e.brush.height;function fO(e){var t=ya(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_n;return r+i}return r},0)}function dO(e){var t=ya(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_n;return r+i}return r},0)}function vO(e){var t=pa(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function hO(e){var t=pa(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var xe=S([kt,It,iy,sO,fO,dO,vO,hO,Sp,qw],(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=Hn(Hn({},f),c),v=d.bottom;d.bottom+=n,d=Gx(d,l,s);var h=e-d.left-d.right,p=t-d.top-d.bottom;return Hn(Hn({brushBottom:v},d),{},{width:Math.max(h,0),height:Math.max(p,0)})}),pO=S(xe,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),ay=S(kt,It,(e,t)=>({x:0,y:0,width:e,height:t})),yO=m.createContext(null),Je=()=>m.useContext(yO)!=null,ma=e=>e.brush,ga=S([ma,xe,iy],(e,t,r)=>({height:e.height,x:I(e.x)?e.x:t.left,y:I(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:I(e.width)?e.width:t.width})),Fo={},Wo={},Uo={},Af;function mO(){return Af||(Af=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(),p()};let d=null;const v=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},n)},h=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{h(),o=void 0,u=null},y=()=>{c()},g=function(...w){if(i?.aborted)return;o=this,u=w;const b=d==null;v(),l&&b&&c()};return g.schedule=v,g.cancel=p,g.flush=y,i?.addEventListener("abort",p,{once:!0}),g}e.debounce=t})(Uo)),Uo}var _f;function gO(){return _f||(_f=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mO();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(...p){c=n.apply(this,p),f=null},i,{edges:s}),v=function(...p){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(c=n.apply(this,p),f=Date.now(),d.cancel(),d.schedule(),c):(d.apply(this,p),c)},h=()=>(d.flush(),c);return v.cancel=d.cancel,v.flush=h,v}e.debounce=r})(Wo)),Wo}var Ef;function bO(){return Ef||(Ef=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gO();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})(Fo)),Fo}var Ko,jf;function wO(){return jf||(jf=1,Ko=bO().throttle),Ko}var xO=wO();const OO=Ht(xO);var Si=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++]))}},ft={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},oy=(e,t,r)=>{var{width:n=ft.width,height:i=ft.height,aspect:a,maxHeight:o}=r,u=dr(n)?e:Number(n),l=dr(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}},PO={width:0,height:0,overflow:"visible"},SO={width:0,overflowX:"visible"},AO={height:0,overflowY:"visible"},_O={},EO=e=>{var{width:t,height:r}=e,n=dr(t),i=dr(r);return n&&i?PO:n?SO:i?AO:_O};function jO(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i=ft.width,a=ft.height):i===void 0?i=n&&n>0?void 0:ft.width:a===void 0&&(a=n&&n>0?void 0:ft.height),{width:i,height:a}}function Bu(){return Bu=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},Bu.apply(null,arguments)}function Cf(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 Tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){CO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CO(e,t,r){return(t=TO(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TO(e){var t=MO(e,"string");return typeof t=="symbol"?t:t+""}function MO(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 uy=m.createContext(ft.initialDimension);function kO(e){return pt(e.width)&&pt(e.height)}function ly(e){var{children:t,width:r,height:n}=e,i=m.useMemo(()=>({width:r,height:n}),[r,n]);return kO(i)?m.createElement(uy.Provider,{value:i},t):null}var ql=()=>m.useContext(uy),IO=m.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=ft.initialDimension,width:i,height:a,minWidth:o=ft.minWidth,minHeight:u,maxHeight:l,children:s,debounce:c=ft.debounce,id:f,className:d,onResize:v,style:h={}}=e,p=m.useRef(null),y=m.useRef();y.current=v,m.useImperativeHandle(t,()=>p.current);var[g,w]=m.useState({containerWidth:n.width,containerHeight:n.height}),b=m.useCallback((j,M)=>{w(N=>{var k=Math.round(j),_=Math.round(M);return N.containerWidth===k&&N.containerHeight===_?N:{containerWidth:k,containerHeight:_}})},[]);m.useEffect(()=>{if(p.current==null||typeof ResizeObserver>"u")return Pn;var j=_=>{var L,$=_[0];if($!=null){var{width:W,height:ee}=$.contentRect;b(W,ee),(L=y.current)===null||L===void 0||L.call(y,W,ee)}};c>0&&(j=OO(j,c,{trailing:!0,leading:!1}));var M=new ResizeObserver(j),{width:N,height:k}=p.current.getBoundingClientRect();return b(N,k),M.observe(p.current),()=>{M.disconnect()}},[b,c]);var{containerWidth:x,containerHeight:P}=g;Si(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:O,calculatedHeight:A}=oy(x,P,{width:i,height:a,aspect:r,maxHeight:l});return Si(O!=null&&O>0||A!=null&&A>0,`The width(%s) and height(%s) of chart should be greater than 0,
@@ -1,4 +1,4 @@
1
- import{c as ee,S as Ve,j as e,i as d,ai as vt,k as P,h as Ss,D as Ts,x as _s,y as Is,z as wt,aw as As,ax as Kt,B as Ae,Z as Ut,a as nt,F as We,r as l,K as ae,g as re,T as Be,V as Ye,w as je,a5 as ve,N as ot,O as it,Q as lt,l as we,ay as qt,R as ct,an as Ms,X as dt,ae as Rs,L as ne,az as Nt,aA as kt,I as Es,P as Ct,s as Ds,aB as Ls,aC as Ps,aD as Os,aE as $s,aF as Fs,aG as zs,aH as Vs,aI as Ks,aJ as Us,ak as qs,a0 as Gs,a1 as Hs,J as Js,v as ut,C as Me,u as se,_ as mt,U as Bs,n as Ws,q as Ys,o as _e,t as O,m as J}from"./index--JkIxVXb.js";import{S as Qe,a as Xe,b as Ze,c as et,d as $e}from"./select-MADP8m6Q.js";import{T as ie,a as le,b as ce}from"./tooltip-ZMwtfr1J.js";import{B as xt}from"./badge-DEmc3Z_l.js";import{B as Ke}from"./brain-CfFdLVqb.js";import{C as Qs}from"./cpu-Ck6AoG8c.js";import{M as Xs,a as Gt,b as Ie}from"./markdown-renderer-Croje6Xe.js";import{H as Fe}from"./history-DfFSA9xJ.js";import{c as Zs,C as St,f as er,M as Ht,V as tr,b as sr,T as rr,S as Jt}from"./constants-DhDjZe4P.js";import{S as tt}from"./settings-2-scXUOuE_.js";import{T as st}from"./trash-2-eM-CNwsZ.js";import{C as ar,R as nr}from"./rocket-BFxPYGx9.js";import{C as Bt}from"./smartphone-DusFfY0U.js";import{a as or,B as Wt}from"./bug-DqSGPUUE.js";import{W as Ue}from"./wrench-B8s3zYVV.js";import{L as ir}from"./lightbulb-Bo8hEr7B.js";import{D as rt}from"./database-CA2w8Lvt.js";import{F as B}from"./file-code-ChnhYYj1.js";import{G as at}from"./globe-CQWfr7hT.js";import{T as lr,S as cr,a as dr,b as ur,c as mr,d as xr}from"./sheet-r6NSOxi-.js";import{G as Tt}from"./git-branch-GTOPQgU4.js";import{T as hr}from"./textarea-BjiEeIWh.js";import{S as Yt}from"./send-eYnW_7n-.js";import{A as pr,h as gr,a as fr,b as br,c as yr,d as jr,e as vr,f as wr,g as Nr}from"./alert-dialog-DWPb2IfQ.js";import{F as _t}from"./folder-open-CHwA1-ve.js";import{D as kr,b as Cr,c as Sr,d as Tr,e as _r}from"./dialog-BOdGWhgE.js";import{C as ze}from"./circle-x-C78PNZjF.js";import{S as Qt}from"./shield-check-PEr7nmVw.js";import{S as Ir}from"./shield-off-CLtXio62.js";import"./chevron-up-DcJ4LL_N.js";import"./defineProperty-CoXUr7_6.js";import"./tag-tAwMmQ9G.js";const Ar=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Mr=ee("chart-no-axes-column",Ar);const Rr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Er=ee("circle-dot",Rr);const Dr=[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]],It=ee("ear",Dr);const Lr=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Pr=ee("folder",Lr);const Or=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],$r=ee("git-pull-request",Or);const Fr=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],zr=ee("image-plus",Fr);const Vr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Kr=ee("image",Vr);const Ur=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],he=ee("message-square-plus",Ur);const qr=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],Gr=ee("mic-off",qr);const Hr=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],Jr=ee("pen-tool",Hr),Br={essential:8,standard:30,full:72},Wr={basic:{label:"Basic",description:"Standard instruction following, suitable for most conversational tasks.",colorClass:"bg-amber-500/15 text-amber-600 border-amber-500/25",Icon:Qs},instruction:{label:"Instruction",description:"Advanced instruction following with multi-step reasoning capabilities.",colorClass:"bg-blue-500/15 text-blue-600 border-blue-500/25",Icon:Ke},reasoning:{label:"Reasoning",description:"Full agentic reasoning with planning, reflection, and complex tool use.",colorClass:"bg-green-500/15 text-green-600 border-green-500/25",Icon:Ve}};function Yr({modelId:t,toolTier:s,capabilityLevel:a,className:n}){const r=Wr[a],i=Br[s],{Icon:c}=r;return e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs(xt,{variant:"outline",className:d("flex items-center gap-1.5 px-2 py-0.5 text-xs font-medium cursor-default select-none border",r.colorClass,n),children:[e.jsx(c,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{children:r.label}),e.jsx("span",{className:"opacity-60",children:"·"}),e.jsxs("span",{className:"opacity-70",children:[i," tools"]})]})}),e.jsx(ce,{side:"bottom",children:e.jsxs("div",{className:"space-y-1.5 max-w-56",children:[e.jsx("div",{className:"font-semibold text-xs",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r.description}),e.jsxs("div",{className:"flex items-center gap-2 pt-0.5 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"capitalize",children:[s," tier"]}),e.jsx("span",{children:"-"}),e.jsxs("span",{children:[i," tools available"]})]})]})})]})}const Qr={bot:Ae,code:Bt,"clipboard-list":ar,"bar-chart-2":Mr,"pen-tool":Jr};function At({icon:t,className:s}){if(t==="bot")return e.jsx(Kt,{className:s});const a=Qr[t]||Ae;return e.jsx(a,{className:s})}function Xr({currentPreset:t,presets:s,selectedPreset:a,selectedModel:n,aliases:r,providers:i,healthyProviders:c,memoryStats:m,conversationId:f,enabledPlugins:b=0,focusedView:y=!1,modelCapability:T,onPresetChange:k,onModelChange:D,onNewChat:E,onOpenHistory:R,onOpenProviderSetup:F,onClearChat:p,onToggleFocusedView:A}){const C=m?.stats.usagePercentage??0;return e.jsx("div",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx("div",{className:"h-9 w-9 rounded-xl glass-heavy flex items-center justify-center shrink-0 border-primary/10 shadow-lg shadow-primary/5",children:e.jsx(Ve,{className:"h-4.5 w-4.5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-sm font-semibold truncate",children:"Chat"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.length>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500 shrink-0"}),e.jsxs("span",{className:"truncate",children:[c.length," active"]})]}):e.jsx("button",{onClick:F,className:"text-amber-500 hover:underline truncate",children:"Configure provider"}),f&&m&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground/40",children:"·"}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground transition-colors","aria-label":`Context usage: ${Math.round(C)}%`,children:[e.jsx(Ke,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),e.jsx("div",{className:"w-8 h-1 bg-muted rounded-full overflow-hidden","aria-hidden":"true",children:e.jsx("div",{className:d("h-full rounded-full transition-all duration-300",C<=50&&"bg-green-500",C>50&&C<=70&&"bg-primary",C>70&&C<=90&&"bg-amber-500",C>90&&"bg-red-500"),style:{width:`${Math.min(C,100)}%`}})})]})}),e.jsx(ce,{side:"bottom",children:e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-sm",children:"Context Memory"}),e.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5",children:[e.jsxs("p",{children:[m.stats.messageCount," messages · ~",m.stats.estimatedTokens.toLocaleString()," tokens"]}),e.jsxs("p",{children:["Using ",Math.round(C),"% of ",(m.stats.contextWindow/1e3).toFixed(0),"k window"]}),m.stats.needsCompaction&&e.jsx("p",{className:"text-amber-500",children:"Will compact on next message"})]})]})})]})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("div",{className:"hidden sm:flex items-center bg-muted/40 rounded-xl p-0.5",children:[e.jsxs(Qe,{value:a,onValueChange:k,children:[e.jsxs(Xe,{className:"h-7 w-auto border-0 bg-transparent shadow-none text-xs gap-1 px-2 hover:bg-muted/60 rounded-lg","aria-label":"Select chat preset",children:[e.jsx(At,{icon:t?.icon||"bot",className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"hidden md:inline max-w-[80px] truncate",children:e.jsx(Ze,{})})]}),e.jsx(et,{className:"glass-dropdown",children:s.map(j=>e.jsx($e,{value:j.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(At,{icon:j.icon,className:"h-4 w-4"}),e.jsx("span",{children:j.name})]})},j.id))})]}),e.jsx("div",{className:"w-px h-4 bg-border/50"}),e.jsxs(Qe,{value:n,onValueChange:D,children:[e.jsx(Xe,{className:"h-7 w-auto border-0 bg-transparent shadow-none text-xs gap-1.5 px-2 hover:bg-muted/60 rounded-lg","aria-label":"Select AI model",children:e.jsx(Ze,{})}),e.jsxs(et,{className:"glass-dropdown min-w-45",children:[(()=>{const j=new Set(i.map(v=>v.type)),N=r.filter(v=>j.has(v.provider)).reduce((v,g)=>{const S=g.provider;return(!v[S]||g.alias.length<v[S].alias.length)&&(v[S]=g),v},{});return Object.entries(N).sort(([,v],[,g])=>{const S=i.find(U=>U.type===v.provider)?.healthy?1:0;return(i.find(U=>U.type===g.provider)?.healthy?1:0)-S||v.provider.localeCompare(g.provider)}).map(([v,g])=>{const K=i.find(H=>H.type===v)?.healthy,U=v==="ollama";return e.jsx($e,{value:g.alias,className:"py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:d("h-1.5 w-1.5 rounded-full shrink-0",K?"bg-green-500":"bg-amber-400")}),e.jsx("span",{className:"capitalize font-medium",children:g.alias}),e.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:U?"Local":g.provider})]})},g.alias)})})(),e.jsx("div",{className:"border-t border-border/50 mt-1 pt-1",children:e.jsxs("button",{type:"button",onClick:j=>{j.preventDefault(),j.stopPropagation(),F()},className:"w-full flex items-center gap-2 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded-sm transition-colors",children:[e.jsx(vt,{className:"h-3 w-3"}),e.jsx("span",{children:"Manage Providers..."})]})})]})]})]}),T&&e.jsx(Yr,{modelId:n,toolTier:T.toolTier,capabilityLevel:T.capabilityLevel,className:"hidden sm:flex"}),A&&e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:A,className:d("h-8 w-8 shrink-0",y&&"bg-primary/10 text-primary"),"aria-label":y?"Exit focused view":"Enter focused view","aria-pressed":y,children:y?e.jsx(Xs,{className:"h-4 w-4","aria-hidden":"true"}):e.jsx(Gt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:y?"Exit focused view":"Focused view"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:E,className:"h-8 w-8 shrink-0","aria-label":"New chat",children:e.jsx(he,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"New chat"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:R,className:"h-8 w-8 shrink-0","aria-label":"View history",children:e.jsx(Fe,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"History"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:F,className:"h-8 w-8 shrink-0","aria-label":"Manage API keys",children:e.jsx(vt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"API Keys"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 relative",asChild:!0,"aria-label":`Plugins and Tools (${b} enabled)`,children:e.jsxs(Ss,{to:"/settings/plugins",children:[e.jsx(Zs,{className:"h-4 w-4","aria-hidden":"true"}),b>0&&e.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-primary text-[9px] font-medium text-primary-foreground flex items-center justify-center","aria-hidden":"true",children:b})]})})}),e.jsx(ce,{children:"Plugins & Tools"})]}),e.jsxs(Ts,{children:[e.jsx(_s,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":"Chat settings",children:e.jsx(tt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsxs(Is,{align:"end",className:"w-44 glass-dropdown",children:[e.jsxs(wt,{onClick:E,children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"New Chat"]}),e.jsx(As,{}),e.jsxs(wt,{onClick:p,className:"text-destructive focus:text-destructive",children:[e.jsx(st,{className:"h-4 w-4 mr-2"}),"Clear Chat"]})]})]})]})]})})}const Mt={urgent:"bg-red-500",critical:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-blue-400",none:"bg-muted-foreground/30"},Zr={bug:Wt,feature:ir,improvement:Ue,task:nt,epic:Ut,story:or,subtask:Er},Rt={backlog:"bg-muted-foreground/10 text-muted-foreground",todo:"bg-blue-500/10 text-blue-400",in_progress:"bg-primary/10 text-primary",in_review:"bg-purple-500/10 text-purple-400",done:"bg-green-500/10 text-green-400",cancelled:"bg-red-500/10 text-red-400"};function ea(t){return t.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function Et({ticketKey:t,title:s,status:a,type:n,priority:r,labels:i,url:c}){const m=Zr[n]||nt,f=Mt[r]||Mt.none,b=Rt[a]||Rt.backlog,y=e.jsxs("div",{className:"flex items-center gap-3 py-2.5 px-3 rounded-xl recessed-card overflow-hidden relative group/ticket",children:[e.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-l-xl",f)}),e.jsx("div",{className:"h-8 w-8 flex items-center justify-center rounded-lg bg-foreground/5 shrink-0 ml-1",children:e.jsx(m,{className:"h-4 w-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[11px] font-bold text-primary/70 shrink-0",children:t}),e.jsx("span",{className:"text-[13px] font-medium truncate",children:s})]}),i&&i.length>0&&e.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[i.slice(0,3).map(T=>e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-foreground/5 text-muted-foreground/70 font-medium",children:T},T)),i.length>3&&e.jsxs("span",{className:"text-[9px] text-muted-foreground/50",children:["+",i.length-3]})]})]}),e.jsx("span",{className:d("text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded-md shrink-0",b),children:ea(a)})]});return c?e.jsx("a",{href:c,className:"block hover:opacity-90 transition-opacity",target:"_blank",rel:"noopener noreferrer",children:y}):y}function Dt({name:t,projectKey:s,icon:a,color:n,ticketCount:r,description:i}){return e.jsxs("div",{className:"flex items-center gap-3 py-2.5 px-3 rounded-xl recessed-card overflow-hidden",children:[e.jsx("div",{className:d("h-9 w-9 flex items-center justify-center rounded-lg shrink-0 text-lg",n?"":"bg-primary/10"),style:n?{backgroundColor:`${n}20`,color:n}:void 0,children:a||e.jsx(We,{className:"h-4.5 w-4.5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold truncate",children:t}),e.jsx("span",{className:"text-[10px] font-bold text-muted-foreground/50 uppercase tracking-wider shrink-0",children:s})]}),i&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 truncate mt-0.5",children:i})]}),r!==void 0&&e.jsx("div",{className:"flex items-center gap-1 shrink-0",children:e.jsxs("span",{className:"text-[11px] font-bold text-muted-foreground/70 bg-foreground/5 px-2 py-0.5 rounded-full",children:[r," ticket",r!==1?"s":""]})})]})}function ta(t){if(!t||typeof t!="object")return;const s=t;return s.data&&typeof s.data=="object"?s.data:s}function Lt(t){const s=t.key,a=t.title;return!s||!a?null:{ticketKey:s,title:a,status:t.status||"todo",type:t.type||"task",priority:t.priority||"medium",labels:t.labels}}function Pt(t){const s=t.name,a=t.key;return!s||!a?null:{name:s,projectKey:a,icon:t.icon,color:t.color,ticketCount:t.ticketCount,description:t.description}}function sa({toolName:t,result:s,output:a}){const n=ta(s);if((t==="create_ticket"||t==="update_ticket"||t==="get_ticket")&&n){const r=Lt(n);if(r)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(Et,{...r}),a&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 mt-1",children:e.jsx(Ie,{content:a})})]})}if(t==="list_tickets"&&n){const r=n.tickets??[];if(r.length>0){const i=r.slice(0,5),c=r.length-i.length;return e.jsxs("div",{className:"space-y-1.5",children:[i.map((m,f)=>{const b=Lt(m);return b?e.jsx(Et,{...b},b.ticketKey||f):null}),c>0&&e.jsxs("div",{className:"text-[11px] text-muted-foreground/50 text-center py-1",children:["and ",c," more ticket",c!==1?"s":""]})]})}}if(t==="create_project"&&n){const r=Pt(n);if(r)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(Dt,{...r}),a&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 mt-1",children:e.jsx(Ie,{content:a})})]})}if(t==="list_projects"&&n){const r=n.projects??[];if(r.length>0)return e.jsx("div",{className:"space-y-1.5",children:r.map((i,c)=>{const m=Pt(i);return m?e.jsx(Dt,{...m},m.projectKey||c):null})})}if(a)return e.jsx(Ie,{content:a});if(s!=null){const r=typeof s=="string"?s:JSON.stringify(s,null,2);return!r||r==="{}"||r==="[]"||r==='""'?e.jsx("div",{className:"text-[12px] text-muted-foreground/50 italic py-2",children:"No output returned"}):e.jsx("pre",{className:"text-[12px] font-mono bg-black/20 rounded-xl p-4 overflow-x-auto max-h-80 overflow-y-auto whitespace-pre-wrap break-all border border-white/5 scrollbar-glass",children:r})}return e.jsx("div",{className:"text-[12px] text-muted-foreground/50 italic py-2",children:"No output returned"})}const Ot={exec:ae,bash:ae,shell:ae,read_file:B,write_file:B,edit_file:B,search_files:je,grep:je,glob:je,web_fetch:at,web_search:at,system_info:Ye,env_vars:Ye,git_status:B,git_diff:B,git_log:B,git_commit:B,database:rt,query:rt,create_ticket:Be,update_ticket:Be,get_ticket:Be,list_tickets:nt,create_project:We,list_projects:We,cron_create:re,cron_list:re,cron_trigger:re,cron_pause:re,cron_delete:re,cron_archive:re,cron_history:re,default:ae};function ra(t){return{exec:"Run Command",bash:"Bash",shell:"Shell",read_file:"Read File",write_file:"Write File",edit_file:"Edit File",search_files:"Search Files",grep:"Search Content",glob:"Find Files",web_fetch:"Fetch URL",web_search:"Web Search",system_info:"System Info",env_vars:"Environment",git_status:"Git Status",git_diff:"Git Diff",git_log:"Git Log",git_commit:"Git Commit",create_ticket:"Create Ticket",update_ticket:"Update Ticket",get_ticket:"Get Ticket",list_tickets:"List Tickets",create_project:"Create Project",list_projects:"List Projects",cron_create:"Create Job",cron_list:"List Jobs",cron_trigger:"Trigger Job",cron_pause:"Pause/Resume Job",cron_delete:"Delete Job",cron_archive:"Archive Job",cron_history:"Job History"}[t]||t.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function aa(t){const s=Object.entries(t);if(s.length===0)return"";if(s.length===1){const[a,n]=s[0];if(a==="command"||a==="path"||a==="query"||a==="url")return String(n)}return s.map(([a,n])=>{const r=typeof n=="string"?n:JSON.stringify(n),i=r.length>50?r.slice(0,50)+"...":r;return`${a}: ${i}`}).join(", ")}function Xt(t){if(!t||typeof t!="object")return{hasSmartOutput:!1};const s=t,a=typeof s.output=="string"?s.output:void 0,n=s.data!==void 0?s.data:void 0;return{output:a,data:n,hasSmartOutput:!!a}}function na(t){const{output:s,data:a}=Xt(t.result);if(s){const n=s.match(/^#{1,3}\s+(.+)/m);if(n)return n[1].trim();const r=s.split(`
1
+ import{c as ee,S as Ve,j as e,i as d,ai as vt,k as P,h as Ss,D as Ts,x as _s,y as Is,z as wt,aw as As,ax as Kt,B as Ae,Z as Ut,a as nt,F as We,r as l,K as ae,g as re,T as Be,V as Ye,w as je,a5 as ve,N as ot,O as it,Q as lt,l as we,ay as qt,R as ct,an as Ms,X as dt,ae as Rs,L as ne,az as Nt,aA as kt,I as Es,P as Ct,s as Ds,aB as Ls,aC as Ps,aD as Os,aE as $s,aF as Fs,aG as zs,aH as Vs,aI as Ks,aJ as Us,ak as qs,a0 as Gs,a1 as Hs,J as Js,v as ut,C as Me,u as se,_ as mt,U as Bs,n as Ws,q as Ys,o as _e,t as O,m as J}from"./index-lJlNPFVJ.js";import{S as Qe,a as Xe,b as Ze,c as et,d as $e}from"./select-CeQ8AHGy.js";import{T as ie,a as le,b as ce}from"./tooltip-BYmQ331W.js";import{B as xt}from"./badge-CVHH1a-v.js";import{B as Ke}from"./brain-6o_RHVpe.js";import{C as Qs}from"./cpu-DiPMQICV.js";import{M as Xs,a as Gt,b as Ie}from"./markdown-renderer-n1ToC4XQ.js";import{H as Fe}from"./history-BQSBo_1Q.js";import{c as Zs,C as St,f as er,M as Ht,V as tr,b as sr,T as rr,S as Jt}from"./constants-Q5Zivl-a.js";import{S as tt}from"./settings-2-ocj5uHGx.js";import{T as st}from"./trash-2-keO5tKPE.js";import{C as ar,R as nr}from"./rocket-DhvUetsk.js";import{C as Bt}from"./smartphone-77_g3SQn.js";import{a as or,B as Wt}from"./bug-CmZI7jqM.js";import{W as Ue}from"./wrench-02YaOSiK.js";import{L as ir}from"./lightbulb-Jhp7FvbU.js";import{D as rt}from"./database-BwTfupDi.js";import{F as B}from"./file-code-B2UrJLwi.js";import{G as at}from"./globe-f-jjCa_g.js";import{T as lr,S as cr,a as dr,b as ur,c as mr,d as xr}from"./sheet-DuQExSho.js";import{G as Tt}from"./git-branch-C_K30am0.js";import{T as hr}from"./textarea-DsVPnSgR.js";import{S as Yt}from"./send-P0r5D7td.js";import{A as pr,h as gr,a as fr,b as br,c as yr,d as jr,e as vr,f as wr,g as Nr}from"./alert-dialog-SKM6Gjz4.js";import{F as _t}from"./folder-open-BJi577JH.js";import{D as kr,b as Cr,c as Sr,d as Tr,e as _r}from"./dialog-BUqN9Psj.js";import{C as ze}from"./circle-x-Dgw11LgT.js";import{S as Qt}from"./shield-check-DfVdE34l.js";import{S as Ir}from"./shield-off-8l0J6R-8.js";import"./chevron-up-CoUsOvZj.js";import"./defineProperty-CoXUr7_6.js";import"./tag-C35mgoEv.js";const Ar=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Mr=ee("chart-no-axes-column",Ar);const Rr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Er=ee("circle-dot",Rr);const Dr=[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]],It=ee("ear",Dr);const Lr=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Pr=ee("folder",Lr);const Or=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],$r=ee("git-pull-request",Or);const Fr=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],zr=ee("image-plus",Fr);const Vr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Kr=ee("image",Vr);const Ur=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],he=ee("message-square-plus",Ur);const qr=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],Gr=ee("mic-off",qr);const Hr=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],Jr=ee("pen-tool",Hr),Br={essential:8,standard:30,full:72},Wr={basic:{label:"Basic",description:"Standard instruction following, suitable for most conversational tasks.",colorClass:"bg-amber-500/15 text-amber-600 border-amber-500/25",Icon:Qs},instruction:{label:"Instruction",description:"Advanced instruction following with multi-step reasoning capabilities.",colorClass:"bg-blue-500/15 text-blue-600 border-blue-500/25",Icon:Ke},reasoning:{label:"Reasoning",description:"Full agentic reasoning with planning, reflection, and complex tool use.",colorClass:"bg-green-500/15 text-green-600 border-green-500/25",Icon:Ve}};function Yr({modelId:t,toolTier:s,capabilityLevel:a,className:n}){const r=Wr[a],i=Br[s],{Icon:c}=r;return e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs(xt,{variant:"outline",className:d("flex items-center gap-1.5 px-2 py-0.5 text-xs font-medium cursor-default select-none border",r.colorClass,n),children:[e.jsx(c,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{children:r.label}),e.jsx("span",{className:"opacity-60",children:"·"}),e.jsxs("span",{className:"opacity-70",children:[i," tools"]})]})}),e.jsx(ce,{side:"bottom",children:e.jsxs("div",{className:"space-y-1.5 max-w-56",children:[e.jsx("div",{className:"font-semibold text-xs",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:r.description}),e.jsxs("div",{className:"flex items-center gap-2 pt-0.5 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"capitalize",children:[s," tier"]}),e.jsx("span",{children:"-"}),e.jsxs("span",{children:[i," tools available"]})]})]})})]})}const Qr={bot:Ae,code:Bt,"clipboard-list":ar,"bar-chart-2":Mr,"pen-tool":Jr};function At({icon:t,className:s}){if(t==="bot")return e.jsx(Kt,{className:s});const a=Qr[t]||Ae;return e.jsx(a,{className:s})}function Xr({currentPreset:t,presets:s,selectedPreset:a,selectedModel:n,aliases:r,providers:i,healthyProviders:c,memoryStats:m,conversationId:f,enabledPlugins:b=0,focusedView:y=!1,modelCapability:T,onPresetChange:k,onModelChange:D,onNewChat:E,onOpenHistory:R,onOpenProviderSetup:F,onClearChat:p,onToggleFocusedView:A}){const C=m?.stats.usagePercentage??0;return e.jsx("div",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx("div",{className:"h-9 w-9 rounded-xl glass-heavy flex items-center justify-center shrink-0 border-primary/10 shadow-lg shadow-primary/5",children:e.jsx(Ve,{className:"h-4.5 w-4.5 text-primary"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-sm font-semibold truncate",children:"Chat"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c.length>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-green-500 shrink-0"}),e.jsxs("span",{className:"truncate",children:[c.length," active"]})]}):e.jsx("button",{onClick:F,className:"text-amber-500 hover:underline truncate",children:"Configure provider"}),f&&m&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground/40",children:"·"}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground transition-colors","aria-label":`Context usage: ${Math.round(C)}%`,children:[e.jsx(Ke,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),e.jsx("div",{className:"w-8 h-1 bg-muted rounded-full overflow-hidden","aria-hidden":"true",children:e.jsx("div",{className:d("h-full rounded-full transition-all duration-300",C<=50&&"bg-green-500",C>50&&C<=70&&"bg-primary",C>70&&C<=90&&"bg-amber-500",C>90&&"bg-red-500"),style:{width:`${Math.min(C,100)}%`}})})]})}),e.jsx(ce,{side:"bottom",children:e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"font-medium text-sm",children:"Context Memory"}),e.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5",children:[e.jsxs("p",{children:[m.stats.messageCount," messages · ~",m.stats.estimatedTokens.toLocaleString()," tokens"]}),e.jsxs("p",{children:["Using ",Math.round(C),"% of ",(m.stats.contextWindow/1e3).toFixed(0),"k window"]}),m.stats.needsCompaction&&e.jsx("p",{className:"text-amber-500",children:"Will compact on next message"})]})]})})]})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsxs("div",{className:"hidden sm:flex items-center bg-muted/40 rounded-xl p-0.5",children:[e.jsxs(Qe,{value:a,onValueChange:k,children:[e.jsxs(Xe,{className:"h-7 w-auto border-0 bg-transparent shadow-none text-xs gap-1 px-2 hover:bg-muted/60 rounded-lg","aria-label":"Select chat preset",children:[e.jsx(At,{icon:t?.icon||"bot",className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"hidden md:inline max-w-[80px] truncate",children:e.jsx(Ze,{})})]}),e.jsx(et,{className:"glass-dropdown",children:s.map(j=>e.jsx($e,{value:j.id,children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(At,{icon:j.icon,className:"h-4 w-4"}),e.jsx("span",{children:j.name})]})},j.id))})]}),e.jsx("div",{className:"w-px h-4 bg-border/50"}),e.jsxs(Qe,{value:n,onValueChange:D,children:[e.jsx(Xe,{className:"h-7 w-auto border-0 bg-transparent shadow-none text-xs gap-1.5 px-2 hover:bg-muted/60 rounded-lg","aria-label":"Select AI model",children:e.jsx(Ze,{})}),e.jsxs(et,{className:"glass-dropdown min-w-45",children:[(()=>{const j=new Set(i.map(v=>v.type)),N=r.filter(v=>j.has(v.provider)).reduce((v,g)=>{const S=g.provider;return(!v[S]||g.alias.length<v[S].alias.length)&&(v[S]=g),v},{});return Object.entries(N).sort(([,v],[,g])=>{const S=i.find(U=>U.type===v.provider)?.healthy?1:0;return(i.find(U=>U.type===g.provider)?.healthy?1:0)-S||v.provider.localeCompare(g.provider)}).map(([v,g])=>{const K=i.find(H=>H.type===v)?.healthy,U=v==="ollama";return e.jsx($e,{value:g.alias,className:"py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:d("h-1.5 w-1.5 rounded-full shrink-0",K?"bg-green-500":"bg-amber-400")}),e.jsx("span",{className:"capitalize font-medium",children:g.alias}),e.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:U?"Local":g.provider})]})},g.alias)})})(),e.jsx("div",{className:"border-t border-border/50 mt-1 pt-1",children:e.jsxs("button",{type:"button",onClick:j=>{j.preventDefault(),j.stopPropagation(),F()},className:"w-full flex items-center gap-2 px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded-sm transition-colors",children:[e.jsx(vt,{className:"h-3 w-3"}),e.jsx("span",{children:"Manage Providers..."})]})})]})]})]}),T&&e.jsx(Yr,{modelId:n,toolTier:T.toolTier,capabilityLevel:T.capabilityLevel,className:"hidden sm:flex"}),A&&e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:A,className:d("h-8 w-8 shrink-0",y&&"bg-primary/10 text-primary"),"aria-label":y?"Exit focused view":"Enter focused view","aria-pressed":y,children:y?e.jsx(Xs,{className:"h-4 w-4","aria-hidden":"true"}):e.jsx(Gt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:y?"Exit focused view":"Focused view"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:E,className:"h-8 w-8 shrink-0","aria-label":"New chat",children:e.jsx(he,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"New chat"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:R,className:"h-8 w-8 shrink-0","aria-label":"View history",children:e.jsx(Fe,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"History"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",onClick:F,className:"h-8 w-8 shrink-0","aria-label":"Manage API keys",children:e.jsx(vt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsx(ce,{children:"API Keys"})]}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 relative",asChild:!0,"aria-label":`Plugins and Tools (${b} enabled)`,children:e.jsxs(Ss,{to:"/settings/plugins",children:[e.jsx(Zs,{className:"h-4 w-4","aria-hidden":"true"}),b>0&&e.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-primary text-[9px] font-medium text-primary-foreground flex items-center justify-center","aria-hidden":"true",children:b})]})})}),e.jsx(ce,{children:"Plugins & Tools"})]}),e.jsxs(Ts,{children:[e.jsx(_s,{asChild:!0,children:e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":"Chat settings",children:e.jsx(tt,{className:"h-4 w-4","aria-hidden":"true"})})}),e.jsxs(Is,{align:"end",className:"w-44 glass-dropdown",children:[e.jsxs(wt,{onClick:E,children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"New Chat"]}),e.jsx(As,{}),e.jsxs(wt,{onClick:p,className:"text-destructive focus:text-destructive",children:[e.jsx(st,{className:"h-4 w-4 mr-2"}),"Clear Chat"]})]})]})]})]})})}const Mt={urgent:"bg-red-500",critical:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-blue-400",none:"bg-muted-foreground/30"},Zr={bug:Wt,feature:ir,improvement:Ue,task:nt,epic:Ut,story:or,subtask:Er},Rt={backlog:"bg-muted-foreground/10 text-muted-foreground",todo:"bg-blue-500/10 text-blue-400",in_progress:"bg-primary/10 text-primary",in_review:"bg-purple-500/10 text-purple-400",done:"bg-green-500/10 text-green-400",cancelled:"bg-red-500/10 text-red-400"};function ea(t){return t.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function Et({ticketKey:t,title:s,status:a,type:n,priority:r,labels:i,url:c}){const m=Zr[n]||nt,f=Mt[r]||Mt.none,b=Rt[a]||Rt.backlog,y=e.jsxs("div",{className:"flex items-center gap-3 py-2.5 px-3 rounded-xl recessed-card overflow-hidden relative group/ticket",children:[e.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-l-xl",f)}),e.jsx("div",{className:"h-8 w-8 flex items-center justify-center rounded-lg bg-foreground/5 shrink-0 ml-1",children:e.jsx(m,{className:"h-4 w-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[11px] font-bold text-primary/70 shrink-0",children:t}),e.jsx("span",{className:"text-[13px] font-medium truncate",children:s})]}),i&&i.length>0&&e.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[i.slice(0,3).map(T=>e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-foreground/5 text-muted-foreground/70 font-medium",children:T},T)),i.length>3&&e.jsxs("span",{className:"text-[9px] text-muted-foreground/50",children:["+",i.length-3]})]})]}),e.jsx("span",{className:d("text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded-md shrink-0",b),children:ea(a)})]});return c?e.jsx("a",{href:c,className:"block hover:opacity-90 transition-opacity",target:"_blank",rel:"noopener noreferrer",children:y}):y}function Dt({name:t,projectKey:s,icon:a,color:n,ticketCount:r,description:i}){return e.jsxs("div",{className:"flex items-center gap-3 py-2.5 px-3 rounded-xl recessed-card overflow-hidden",children:[e.jsx("div",{className:d("h-9 w-9 flex items-center justify-center rounded-lg shrink-0 text-lg",n?"":"bg-primary/10"),style:n?{backgroundColor:`${n}20`,color:n}:void 0,children:a||e.jsx(We,{className:"h-4.5 w-4.5 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold truncate",children:t}),e.jsx("span",{className:"text-[10px] font-bold text-muted-foreground/50 uppercase tracking-wider shrink-0",children:s})]}),i&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 truncate mt-0.5",children:i})]}),r!==void 0&&e.jsx("div",{className:"flex items-center gap-1 shrink-0",children:e.jsxs("span",{className:"text-[11px] font-bold text-muted-foreground/70 bg-foreground/5 px-2 py-0.5 rounded-full",children:[r," ticket",r!==1?"s":""]})})]})}function ta(t){if(!t||typeof t!="object")return;const s=t;return s.data&&typeof s.data=="object"?s.data:s}function Lt(t){const s=t.key,a=t.title;return!s||!a?null:{ticketKey:s,title:a,status:t.status||"todo",type:t.type||"task",priority:t.priority||"medium",labels:t.labels}}function Pt(t){const s=t.name,a=t.key;return!s||!a?null:{name:s,projectKey:a,icon:t.icon,color:t.color,ticketCount:t.ticketCount,description:t.description}}function sa({toolName:t,result:s,output:a}){const n=ta(s);if((t==="create_ticket"||t==="update_ticket"||t==="get_ticket")&&n){const r=Lt(n);if(r)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(Et,{...r}),a&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 mt-1",children:e.jsx(Ie,{content:a})})]})}if(t==="list_tickets"&&n){const r=n.tickets??[];if(r.length>0){const i=r.slice(0,5),c=r.length-i.length;return e.jsxs("div",{className:"space-y-1.5",children:[i.map((m,f)=>{const b=Lt(m);return b?e.jsx(Et,{...b},b.ticketKey||f):null}),c>0&&e.jsxs("div",{className:"text-[11px] text-muted-foreground/50 text-center py-1",children:["and ",c," more ticket",c!==1?"s":""]})]})}}if(t==="create_project"&&n){const r=Pt(n);if(r)return e.jsxs("div",{className:"space-y-2",children:[e.jsx(Dt,{...r}),a&&e.jsx("div",{className:"text-[11px] text-muted-foreground/60 mt-1",children:e.jsx(Ie,{content:a})})]})}if(t==="list_projects"&&n){const r=n.projects??[];if(r.length>0)return e.jsx("div",{className:"space-y-1.5",children:r.map((i,c)=>{const m=Pt(i);return m?e.jsx(Dt,{...m},m.projectKey||c):null})})}if(a)return e.jsx(Ie,{content:a});if(s!=null){const r=typeof s=="string"?s:JSON.stringify(s,null,2);return!r||r==="{}"||r==="[]"||r==='""'?e.jsx("div",{className:"text-[12px] text-muted-foreground/50 italic py-2",children:"No output returned"}):e.jsx("pre",{className:"text-[12px] font-mono bg-black/20 rounded-xl p-4 overflow-x-auto max-h-80 overflow-y-auto whitespace-pre-wrap break-all border border-white/5 scrollbar-glass",children:r})}return e.jsx("div",{className:"text-[12px] text-muted-foreground/50 italic py-2",children:"No output returned"})}const Ot={exec:ae,bash:ae,shell:ae,read_file:B,write_file:B,edit_file:B,search_files:je,grep:je,glob:je,web_fetch:at,web_search:at,system_info:Ye,env_vars:Ye,git_status:B,git_diff:B,git_log:B,git_commit:B,database:rt,query:rt,create_ticket:Be,update_ticket:Be,get_ticket:Be,list_tickets:nt,create_project:We,list_projects:We,cron_create:re,cron_list:re,cron_trigger:re,cron_pause:re,cron_delete:re,cron_archive:re,cron_history:re,default:ae};function ra(t){return{exec:"Run Command",bash:"Bash",shell:"Shell",read_file:"Read File",write_file:"Write File",edit_file:"Edit File",search_files:"Search Files",grep:"Search Content",glob:"Find Files",web_fetch:"Fetch URL",web_search:"Web Search",system_info:"System Info",env_vars:"Environment",git_status:"Git Status",git_diff:"Git Diff",git_log:"Git Log",git_commit:"Git Commit",create_ticket:"Create Ticket",update_ticket:"Update Ticket",get_ticket:"Get Ticket",list_tickets:"List Tickets",create_project:"Create Project",list_projects:"List Projects",cron_create:"Create Job",cron_list:"List Jobs",cron_trigger:"Trigger Job",cron_pause:"Pause/Resume Job",cron_delete:"Delete Job",cron_archive:"Archive Job",cron_history:"Job History"}[t]||t.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function aa(t){const s=Object.entries(t);if(s.length===0)return"";if(s.length===1){const[a,n]=s[0];if(a==="command"||a==="path"||a==="query"||a==="url")return String(n)}return s.map(([a,n])=>{const r=typeof n=="string"?n:JSON.stringify(n),i=r.length>50?r.slice(0,50)+"...":r;return`${a}: ${i}`}).join(", ")}function Xt(t){if(!t||typeof t!="object")return{hasSmartOutput:!1};const s=t,a=typeof s.output=="string"?s.output:void 0,n=s.data!==void 0?s.data:void 0;return{output:a,data:n,hasSmartOutput:!!a}}function na(t){const{output:s,data:a}=Xt(t.result);if(s){const n=s.match(/^#{1,3}\s+(.+)/m);if(n)return n[1].trim();const r=s.split(`
2
2
  `).find(i=>i.trim());if(r){const i=r.replace(/^[#*\s]+/,"").replace(/\*\*/g,"").trim();return i.length>80?i.slice(0,80)+"...":i}}if(a&&typeof a=="object"){const n=a;if(n.key&&n.title)return`${n.key}: ${n.title}`;if(n.name&&n.key)return`${n.name} (${n.key})`;if(n.total!==void 0)return`${n.total} result(s)`}return""}function oa(t,s){if(t.status)return t.status;if(s){if(t.result&&typeof t.result=="object"){const a=t.result;if(a.pending===!0)return"pending";if(a.success===!1||a.error)return"error"}return"success"}}function $t({tool:t,className:s}){const[a,n]=l.useState(!1),[r,i]=l.useState("summary"),[c,m]=l.useState(!1),f=Ot[t.name]||Ot.default,b=ra(t.name),y=aa(t.arguments),T=t.result!==void 0&&t.result!==null,{output:k,hasSmartOutput:D}=Xt(t.result),R=D||["create_ticket","update_ticket","get_ticket","list_tickets","create_project","list_projects"].includes(t.name),F=T?na(t):"",p=oa(t,T),A=p==="success",C=p==="error",j=p==="pending"||p==="running",N=async()=>{let u;r==="summary"&&k?u=k:u=T?typeof t.result=="string"?t.result:JSON.stringify(t.result,null,2):"",await navigator.clipboard.writeText(u),m(!0),setTimeout(()=>m(!1),2e3)};return e.jsxs("div",{className:d("my-3 premium-card overflow-hidden group/card",C&&"border-red-500/20",s),children:[e.jsxs("button",{onClick:()=>n(!a),"aria-expanded":a,"aria-label":`${a?"Collapse":"Expand"} ${b} tool results`,className:"w-full px-4 py-3 flex items-center gap-3 hover:bg-foreground/[0.02] transition-colors text-left",children:[e.jsx("div",{className:d("h-10 w-10 flex items-center justify-center rounded-xl transition-all duration-300",C?"bg-red-500/10 text-red-500 shadow-[0_0_15px_-3px_rgba(239,68,68,0.3)]":j?"bg-blue-500/10 text-blue-500":"bg-primary/10 text-primary shadow-[0_0_15px_-3px_var(--primary-glow)]"),children:e.jsx(f,{className:d("h-5 w-5",j&&"animate-pulse"),"aria-hidden":"true"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[e.jsx("span",{className:"font-semibold text-[14px] leading-tight tracking-tight",children:b}),e.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",children:[j&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-primary animate-pulse status-glow-info"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-primary",children:"Running"})]}),A&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 status-glow-success"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-green-500",children:"Success"})]}),C&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 status-glow-destructive"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-red-500",children:"Failed"})]})]})]}),F?e.jsx("div",{className:"text-[11px] text-muted-foreground/80 truncate opacity-70 group-hover/card:opacity-100 transition-opacity",children:F}):y?e.jsx("div",{className:"text-[11px] text-muted-foreground/80 font-mono truncate opacity-60 group-hover/card:opacity-100 transition-opacity",children:y}):null]}),e.jsxs("div",{className:"ml-2 flex items-center gap-2",children:[t.duration!=null&&e.jsx("span",{className:"text-[10px] font-mono font-medium text-muted-foreground/40",children:t.duration>=1e3?`${(t.duration/1e3).toFixed(1)}s`:`${t.duration}ms`}),T&&e.jsx("div",{className:d("p-1 rounded-md transition-transform duration-200",a&&"rotate-180"),children:e.jsx(ve,{className:"h-4 w-4 text-muted-foreground/50"})})]})]}),j&&e.jsx("div",{className:"px-4 pb-3",children:e.jsx("div",{className:"h-2 rounded-full overflow-hidden bg-muted/30",children:e.jsx("div",{className:"h-full w-full skeleton-shimmer rounded-full bg-blue-500/20"})})}),!a&&T&&!R&&y&&e.jsx("div",{className:"px-4 pb-3",children:e.jsx("div",{className:"recessed-card p-2 rounded-lg",children:e.jsxs("div",{className:"text-[11px] text-muted-foreground/90 font-mono line-clamp-2 leading-relaxed",children:[typeof t.result=="string"?t.result.slice(0,100):JSON.stringify(t.result,null,2).slice(0,100),JSON.stringify(t.result).length>100?"...":""]})})}),a&&T&&e.jsxs("div",{className:"border-t border-border/10",children:[e.jsxs("div",{className:"px-4 py-2 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:u=>{u.stopPropagation(),i("summary")},className:d("flex items-center gap-1 px-2 py-1 rounded-md text-[10px] font-bold uppercase tracking-wider transition-all",r==="summary"?"bg-primary/10 text-primary":"text-muted-foreground/50 hover:text-muted-foreground hover:bg-foreground/5"),"aria-label":"Show summary view",children:[e.jsx(ot,{className:"h-3 w-3"}),"Summary"]}),e.jsxs("button",{onClick:u=>{u.stopPropagation(),i("json")},className:d("flex items-center gap-1 px-2 py-1 rounded-md text-[10px] font-bold uppercase tracking-wider transition-all",r==="json"?"bg-primary/10 text-primary":"text-muted-foreground/50 hover:text-muted-foreground hover:bg-foreground/5"),"aria-label":"Show JSON view",children:[e.jsx(Bt,{className:"h-3 w-3"}),"JSON"]})]}),!R&&e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground/50",children:"Output"})]}),e.jsx("button",{onClick:u=>{u.stopPropagation(),N()},className:"p-1.5 rounded-lg hover:bg-white/5 transition-all text-muted-foreground hover:text-foreground","aria-label":"Copy tool output",children:c?e.jsx(it,{className:"h-3.5 w-3.5 text-green-400","aria-hidden":"true"}):e.jsx(lt,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}),e.jsx("div",{className:"px-4 pb-4",children:r==="summary"?e.jsx("div",{className:"prose prose-sm prose-invert max-w-none rounded-xl bg-black/10 p-4 border border-white/5 overflow-y-auto max-h-80 scrollbar-glass",children:e.jsx(sa,{toolName:t.name,result:t.result,output:k})}):e.jsx("pre",{className:"text-[12px] font-mono bg-black/20 rounded-xl p-4 overflow-x-auto max-h-80 overflow-y-auto whitespace-pre-wrap break-all border border-white/5 scrollbar-glass",children:typeof t.result=="string"?t.result:JSON.stringify(t.result,null,2)})})]})]})}function ia({tools:t,className:s}){const[a,n]=l.useState(t.length<3);return t.length===0?null:t.length<3?e.jsx("div",{className:s,children:t.map(r=>e.jsx($t,{tool:r},r.id))}):e.jsx("div",{className:s,children:a?e.jsxs(e.Fragment,{children:[t.map(r=>e.jsx($t,{tool:r},r.id)),e.jsxs("button",{onClick:()=>n(!1),className:"w-full text-center py-1.5 text-[11px] text-muted-foreground/60 hover:text-muted-foreground transition-colors",children:["Collapse ",t.length," tools"]})]}):e.jsxs("button",{onClick:()=>n(!0),className:"w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-xl border border-border/20 bg-card/30 hover:bg-card/50 transition-colors",children:[e.jsx(ae,{className:"h-3.5 w-3.5 text-muted-foreground/60"}),e.jsxs("span",{className:"text-[12px] font-medium text-muted-foreground/80",children:["Show ",t.length," tool calls"]})]})})}function la({thinking:t,isStreaming:s=!1,className:a,defaultOpen:n}){const[r,i]=l.useState(n??s);if(l.useEffect(()=>{s&&i(!0)},[s]),!t)return null;const c=t.split(/\s+/).length;return e.jsxs("div",{className:d("mb-3",a),children:[e.jsxs("button",{onClick:()=>i(!r),className:d("flex items-center gap-3 w-full px-4 py-3 rounded-2xl transition-all duration-300 group text-left","premium-card",s&&"bg-primary/5"),"aria-expanded":r,"aria-label":r?"Collapse thinking":"Expand thinking",children:[e.jsxs("div",{className:d("relative flex items-center justify-center h-8 w-8 rounded-xl shadow-inner transition-all duration-300",s?"bg-primary/20 shadow-[0_0_15px_-3px_var(--primary-glow)]":"bg-muted shadow-sm"),children:[e.jsx(Ke,{className:d("h-4 w-4 transition-all duration-500",s?"text-primary animate-pulse":"text-muted-foreground",r&&!s?"text-foreground":"",r?"scale-110 rotate-[15deg]":"scale-100")}),s&&e.jsx("span",{className:"absolute -top-1 -right-1 h-2.5 w-2.5 rounded-full bg-primary animate-ping shadow-[0_0_8px_var(--primary-glow)]"})]}),e.jsxs("div",{className:"flex-1 flex flex-col",children:[e.jsx("span",{className:d("text-[13px] font-bold tracking-tight transition-colors",s?"text-primary":"text-foreground/80"),children:s?e.jsxs("span",{className:"flex items-center gap-1.5 uppercase text-[10px] tracking-widest font-black",children:["Thinking",e.jsxs("span",{className:"inline-flex gap-0.5",children:[e.jsx("span",{className:"animate-bounce",style:{animationDelay:"0ms"},children:"."}),e.jsx("span",{className:"animate-bounce",style:{animationDelay:"150ms"},children:"."}),e.jsx("span",{className:"animate-bounce",style:{animationDelay:"300ms"},children:"."})]})]}):r?"Analytic Reasoning":"View Process Trace"}),!s&&e.jsxs("span",{className:"text-[10px] uppercase font-bold tracking-widest text-muted-foreground/60",children:[c," tokens distilled"]})]}),e.jsx("div",{className:d("h-6 w-6 flex items-center justify-center rounded-lg transition-all duration-300",r?"rotate-90 bg-zinc-100 dark:bg-zinc-800":"bg-transparent"),children:e.jsx(we,{className:d("h-3.5 w-3.5",r?"text-zinc-900 dark:text-zinc-100":"text-zinc-400")})})]}),e.jsx("div",{className:d("grid transition-all duration-500 cubic-bezier(0.4, 0, 0.2, 1)",r?"grid-rows-[1fr] opacity-100 mt-2":"grid-rows-[0fr] opacity-0"),children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:d("px-5 py-4 rounded-2xl glass","max-h-[32rem] overflow-y-auto scrollbar-glass"),children:e.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[12px] text-muted-foreground leading-relaxed",children:t})})})})]})}function ca({jsonBlocks:t,className:s}){const[a,n]=l.useState(!1);return!t||t.length===0?null:e.jsxs("div",{className:d("mb-3",s),children:[e.jsxs("button",{onClick:()=>n(!a),"aria-expanded":a,"aria-label":a?"Collapse raw output":"Expand raw output",className:d("flex items-center gap-2 px-3 py-1.5 rounded-lg","bg-amber-100 dark:bg-amber-500/15","hover:bg-amber-200 dark:hover:bg-amber-500/25","border border-amber-300 dark:border-amber-500/30","transition-colors text-left text-xs"),children:[e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:[t.length," raw output",t.length>1?"s":""," filtered"]}),e.jsx(we,{className:d("h-3 w-3 text-amber-600 dark:text-amber-400/70 transition-transform",a&&"rotate-90")})]}),e.jsx("div",{className:d("grid transition-all duration-200",a?"grid-rows-[1fr] opacity-100 mt-2":"grid-rows-[0fr] opacity-0"),children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:"px-3 py-2 rounded-lg bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20",children:t.map((r,i)=>e.jsx("pre",{className:"text-xs text-amber-800 dark:text-amber-300/80 font-mono whitespace-pre-wrap",children:r},i))})})})]})}const da=[/<thinking>([\s\S]*?)<\/thinking>/gi,/^(Since there's no specific prompt.*?(?=\n\n|$))/gim,/^(I'll create a hypothetical.*?(?=\n\n|$))/gim,/^(Let me think about.*?(?=\n\n|$))/gim,/^(Thinking about this.*?(?=\n\n|$))/gim],ua=[/\{\s*"name"\s*:\s*"[^"]+"\s*,\s*"parameters"\s*:\s*\{[^}]*\}\s*\}/g,/\{\s*"function"\s*:\s*"[^"]+"\s*,\s*"args"\s*:\s*\{[^}]*\}\s*\}/g,/\{\s*["']?name["']?\s*:\s*["'][^"']+["']\s*,\s*["']?parameters["']?\s*:\s*\{[^}]*\}\s*\}/gi];function ma(t){let s=t,a=[];const n=[];let r=!1;for(const i of da){const c=s.matchAll(i);for(const m of c)m[1]&&(a.push(m[1].trim()),r=!0);s=s.replace(i,"")}for(const i of ua){const c=s.matchAll(i);for(const m of c)n.push(m[0]),r=!0;s=s.replace(i,"")}return s=s.replace(/\n{3,}/g,`
3
3
 
4
4
  `).trim(),!s&&(a.length>0||n.length>0)&&(s="I'm processing your request. Check my reasoning below for details."),{content:s,thinking:a.length>0?a.join(`
@@ -1 +1 @@
1
- import{c as k,Z as C,M as f,j as e,b as c,ad as w,U as m,ak as $,u as h,m as g}from"./index--JkIxVXb.js";import{S as x}from"./skeleton-C9oEzNlU.js";import{T as p}from"./trending-up-BGafmjRo.js";import{R as b,C as L,X as S,Y as A,T as N,a as F,L as T}from"./CartesianChart-BaQ3It0c.js";import{A as D,a as q,P as I,b as M}from"./AreaChart-CfYWmbtr.js";const O=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],v=k("dollar-sign",O);function B({summary:a,analytics:l}){const s=a.taskCount>0?a.totalCost/a.taskCount:0,t=l&&l.daily.length>0?l.daily.slice(-7).reduce((o,d)=>o+d.cost,0)/7*30:a.totalCost*30,r=[{label:"Total Spend",value:`$${a.totalCost.toFixed(4)}`,icon:v,subtext:`${a.taskCount} tasks`,color:"text-green-500"},{label:"Total Tokens",value:a.totalTokens.toLocaleString(),icon:C,subtext:`${a.inputTokens.toLocaleString()} in / ${a.outputTokens.toLocaleString()} out`,color:"text-blue-500"},{label:"Avg Cost/Task",value:`$${s.toFixed(4)}`,icon:f,subtext:a.taskCount>0?"Per task average":"No tasks yet",color:"text-indigo-500"},{label:"Projected Monthly",value:`$${t.toFixed(2)}`,icon:p,subtext:"Based on recent usage",color:"text-orange-500"}];return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:r.map(o=>e.jsx(c,{className:"glass p-6 rounded-2xl hover-lift transition-liquid",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:o.label}),e.jsx("p",{className:"text-2xl font-bold text-foreground mb-1",children:o.value}),e.jsx("p",{className:"text-xs text-muted-foreground",children:o.subtext})]}),e.jsx("div",{className:`p-3 rounded-xl bg-muted/50 ${o.color}`,children:e.jsx(o.icon,{className:"w-5 h-5"})})]})},o.label))})}function P({data:a}){const l=a.map(s=>({...s,displayDate:new Date(s.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})}));return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(p,{className:"w-5 h-5 text-primary"}),"Daily Costs"]}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Cost trend over the last ",a.length," days"]})]}),e.jsx(b,{width:"100%",height:300,children:e.jsxs(D,{data:l,margin:{top:10,right:10,left:0,bottom:0},children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"costGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"hsl(var(--primary))",stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),e.jsx(L,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.3}),e.jsx(S,{dataKey:"displayDate",stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1}),e.jsx(A,{stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,tickFormatter:s=>`$${s.toFixed(2)}`}),e.jsx(N,{content:({active:s,payload:t})=>s&&t&&t.length?e.jsxs("div",{className:"glass-heavy p-3 rounded-xl shadow-float border border-border/50",children:[e.jsx("p",{className:"text-sm font-semibold mb-1",children:t[0].payload.displayDate}),e.jsxs("p",{className:"text-sm text-primary font-medium",children:["$",t[0].value?.toFixed(4)]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t[0].payload.tokens.toLocaleString()," tokens"]})]}):null}),e.jsx(q,{type:"monotone",dataKey:"cost",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"url(#costGradient)"})]})})]})}const j=["hsl(var(--primary))","hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"];function R({data:a}){const l=Object.entries(a).map(([s,t],r)=>({name:s,value:t.cost,tokens:t.tokens,color:j[r%j.length]})).sort((s,t)=>t.value-s.value);return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(w,{className:"w-5 h-5 text-primary"}),"Costs by Agent"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Cost distribution across AI agents"})]}),e.jsx(b,{width:"100%",height:300,children:e.jsxs(I,{children:[e.jsx(M,{data:l,cx:"50%",cy:"50%",innerRadius:60,outerRadius:100,paddingAngle:2,dataKey:"value",children:l.map((s,t)=>e.jsx(F,{fill:s.color},`cell-${t}`))}),e.jsx(N,{content:({active:s,payload:t})=>s&&t&&t.length?e.jsxs("div",{className:"glass-heavy p-3 rounded-xl shadow-float border border-border/50",children:[e.jsx("p",{className:"text-sm font-semibold mb-1",children:t[0].payload.name}),e.jsxs("p",{className:"text-sm text-primary font-medium",children:["$",t[0].value?.toFixed(4)]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t[0].payload.tokens.toLocaleString()," tokens"]})]}):null}),e.jsx(T,{verticalAlign:"bottom",height:36,iconType:"circle",formatter:(s,t)=>{const r=l.reduce((n,i)=>n+i.value,0),d=((t&&t.payload&&typeof t.payload.value=="number"?t.payload.value:0)/(r||1)*100).toFixed(1);return e.jsxs("span",{className:"text-sm text-foreground",children:[s," (",d,"%)"]})}})]})}),e.jsx("div",{className:"mt-6 space-y-2",children:l.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50 transition-liquid",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:s.color}}),e.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e.jsxs("span",{className:"text-sm text-primary font-semibold",children:["$",s.value.toFixed(4)]})]},s.name))})]})}function K({budget:a}){const l=a?.limit??0,s=a?.spent??0,t=a?.remaining??0,r=a?.percentage??0,o=()=>r>=100?"text-red-500":r>=80?"text-orange-500":r>=50?"text-yellow-500":"text-green-500",d=()=>r>=100?"bg-red-500":r>=80?"bg-orange-500":r>=50?"bg-yellow-500":"bg-green-500",i=r>=100?m:r>=80?m:$,u=o(),y=d();return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(p,{className:"w-5 h-5 text-primary"}),"Budget Tracker"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Current spending vs budget limit"})]}),e.jsx("div",{className:`p-2 rounded-lg bg-muted/50 ${u}`,children:e.jsx(i,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Budget Limit"}),e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["$",l.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Spent"}),e.jsxs("p",{className:`text-lg font-bold ${u}`,children:["$",s.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Remaining"}),e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["$",t.toFixed(2)]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Usage"}),e.jsxs("span",{className:`font-semibold ${u}`,children:[r.toFixed(1),"%"]})]}),e.jsx("div",{className:"w-full h-3 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full ${y} transition-all duration-500 ease-out rounded-full`,style:{width:`${Math.min(r,100)}%`}})})]}),r>=100&&e.jsx("div",{className:"mt-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20",children:e.jsxs("p",{className:"text-sm text-red-500 font-medium flex items-center gap-2",children:[e.jsx(m,{className:"w-4 h-4"}),"Budget exceeded! Consider increasing the limit or pausing tasks."]})}),r>=80&&r<100&&e.jsx("div",{className:"mt-4 p-3 rounded-xl bg-orange-500/10 border border-orange-500/20",children:e.jsxs("p",{className:"text-sm text-orange-500 font-medium flex items-center gap-2",children:[e.jsx(m,{className:"w-4 h-4"}),"Approaching budget limit. ",r.toFixed(0),"% used."]})})]})}function V(){const{data:a,isLoading:l}=h({queryKey:["costs","summary"],queryFn:g.costs.summary,refetchInterval:3e4}),{data:s,isLoading:t}=h({queryKey:["costs","analytics"],queryFn:g.costs.analytics,refetchInterval:3e4}),{data:r,isLoading:o}=h({queryKey:["costs","budget"],queryFn:g.costs.budget,refetchInterval:3e4});return l||t||o?e.jsxs("div",{className:"space-y-6 p-6",children:[e.jsxs("div",{children:[e.jsx(x,{className:"h-8 w-48 mb-2"}),e.jsx(x,{className:"h-4 w-64"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[1,2,3,4].map(n=>e.jsx(x,{className:"h-32 rounded-2xl"},n))}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsx(x,{className:"h-80 rounded-2xl"}),e.jsx(x,{className:"h-80 rounded-2xl"})]})]}):e.jsxs("div",{className:"space-y-6 p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Cost Analytics"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Track token usage, costs, and budget across all AI agents"})]}),a&&e.jsx(B,{summary:a,analytics:s}),r&&e.jsx(K,{budget:r}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s&&s.daily.length>0&&e.jsx(P,{data:s.daily}),s&&Object.keys(s.byAgent).length>0&&e.jsx(R,{data:s.byAgent})]}),s&&Object.keys(s.byModel).length>0&&e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[e.jsx(f,{className:"w-5 h-5 text-primary"}),"Costs by Model"]}),e.jsx("div",{className:"space-y-3",children:Object.entries(s.byModel).sort(([,n],[,i])=>i.cost-n.cost).map(([n,i])=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-muted/50 hover:bg-muted/70 transition-liquid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-sm",children:n}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i.tokens.toLocaleString()," tokens"]})]}),e.jsx("div",{className:"text-right",children:e.jsxs("div",{className:"font-semibold text-primary",children:["$",i.cost.toFixed(4)]})})]},n))})]}),(!s||s.daily.length===0)&&e.jsxs(c,{className:"glass p-12 rounded-2xl text-center",children:[e.jsx(v,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground opacity-50"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Cost Data Yet"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto",children:"Cost analytics will appear here once AI agents start processing tasks. Create a task to get started!"})]})]})}export{V as CostsDashboard};
1
+ import{c as k,Z as C,M as f,j as e,b as c,ad as w,U as m,ak as $,u as h,m as g}from"./index-lJlNPFVJ.js";import{S as x}from"./skeleton-TFiFJ3nB.js";import{T as p}from"./trending-up-BBv8KbrY.js";import{R as b,C as L,X as S,Y as A,T as N,a as F,L as T}from"./CartesianChart-CXYL2R-A.js";import{A as D,a as q,P as I,b as M}from"./AreaChart-B73gaiVQ.js";const O=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],v=k("dollar-sign",O);function B({summary:a,analytics:l}){const s=a.taskCount>0?a.totalCost/a.taskCount:0,t=l&&l.daily.length>0?l.daily.slice(-7).reduce((o,d)=>o+d.cost,0)/7*30:a.totalCost*30,r=[{label:"Total Spend",value:`$${a.totalCost.toFixed(4)}`,icon:v,subtext:`${a.taskCount} tasks`,color:"text-green-500"},{label:"Total Tokens",value:a.totalTokens.toLocaleString(),icon:C,subtext:`${a.inputTokens.toLocaleString()} in / ${a.outputTokens.toLocaleString()} out`,color:"text-blue-500"},{label:"Avg Cost/Task",value:`$${s.toFixed(4)}`,icon:f,subtext:a.taskCount>0?"Per task average":"No tasks yet",color:"text-indigo-500"},{label:"Projected Monthly",value:`$${t.toFixed(2)}`,icon:p,subtext:"Based on recent usage",color:"text-orange-500"}];return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:r.map(o=>e.jsx(c,{className:"glass p-6 rounded-2xl hover-lift transition-liquid",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:o.label}),e.jsx("p",{className:"text-2xl font-bold text-foreground mb-1",children:o.value}),e.jsx("p",{className:"text-xs text-muted-foreground",children:o.subtext})]}),e.jsx("div",{className:`p-3 rounded-xl bg-muted/50 ${o.color}`,children:e.jsx(o.icon,{className:"w-5 h-5"})})]})},o.label))})}function P({data:a}){const l=a.map(s=>({...s,displayDate:new Date(s.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})}));return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(p,{className:"w-5 h-5 text-primary"}),"Daily Costs"]}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Cost trend over the last ",a.length," days"]})]}),e.jsx(b,{width:"100%",height:300,children:e.jsxs(D,{data:l,margin:{top:10,right:10,left:0,bottom:0},children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"costGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"hsl(var(--primary))",stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]})}),e.jsx(L,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.3}),e.jsx(S,{dataKey:"displayDate",stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1}),e.jsx(A,{stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,tickFormatter:s=>`$${s.toFixed(2)}`}),e.jsx(N,{content:({active:s,payload:t})=>s&&t&&t.length?e.jsxs("div",{className:"glass-heavy p-3 rounded-xl shadow-float border border-border/50",children:[e.jsx("p",{className:"text-sm font-semibold mb-1",children:t[0].payload.displayDate}),e.jsxs("p",{className:"text-sm text-primary font-medium",children:["$",t[0].value?.toFixed(4)]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t[0].payload.tokens.toLocaleString()," tokens"]})]}):null}),e.jsx(q,{type:"monotone",dataKey:"cost",stroke:"hsl(var(--primary))",strokeWidth:2,fill:"url(#costGradient)"})]})})]})}const j=["hsl(var(--primary))","hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"];function R({data:a}){const l=Object.entries(a).map(([s,t],r)=>({name:s,value:t.cost,tokens:t.tokens,color:j[r%j.length]})).sort((s,t)=>t.value-s.value);return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(w,{className:"w-5 h-5 text-primary"}),"Costs by Agent"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Cost distribution across AI agents"})]}),e.jsx(b,{width:"100%",height:300,children:e.jsxs(I,{children:[e.jsx(M,{data:l,cx:"50%",cy:"50%",innerRadius:60,outerRadius:100,paddingAngle:2,dataKey:"value",children:l.map((s,t)=>e.jsx(F,{fill:s.color},`cell-${t}`))}),e.jsx(N,{content:({active:s,payload:t})=>s&&t&&t.length?e.jsxs("div",{className:"glass-heavy p-3 rounded-xl shadow-float border border-border/50",children:[e.jsx("p",{className:"text-sm font-semibold mb-1",children:t[0].payload.name}),e.jsxs("p",{className:"text-sm text-primary font-medium",children:["$",t[0].value?.toFixed(4)]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t[0].payload.tokens.toLocaleString()," tokens"]})]}):null}),e.jsx(T,{verticalAlign:"bottom",height:36,iconType:"circle",formatter:(s,t)=>{const r=l.reduce((n,i)=>n+i.value,0),d=((t&&t.payload&&typeof t.payload.value=="number"?t.payload.value:0)/(r||1)*100).toFixed(1);return e.jsxs("span",{className:"text-sm text-foreground",children:[s," (",d,"%)"]})}})]})}),e.jsx("div",{className:"mt-6 space-y-2",children:l.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-muted/50 transition-liquid",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:s.color}}),e.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e.jsxs("span",{className:"text-sm text-primary font-semibold",children:["$",s.value.toFixed(4)]})]},s.name))})]})}function K({budget:a}){const l=a?.limit??0,s=a?.spent??0,t=a?.remaining??0,r=a?.percentage??0,o=()=>r>=100?"text-red-500":r>=80?"text-orange-500":r>=50?"text-yellow-500":"text-green-500",d=()=>r>=100?"bg-red-500":r>=80?"bg-orange-500":r>=50?"bg-yellow-500":"bg-green-500",i=r>=100?m:r>=80?m:$,u=o(),y=d();return e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(p,{className:"w-5 h-5 text-primary"}),"Budget Tracker"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Current spending vs budget limit"})]}),e.jsx("div",{className:`p-2 rounded-lg bg-muted/50 ${u}`,children:e.jsx(i,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Budget Limit"}),e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["$",l.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Spent"}),e.jsxs("p",{className:`text-lg font-bold ${u}`,children:["$",s.toFixed(2)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Remaining"}),e.jsxs("p",{className:"text-lg font-bold text-foreground",children:["$",t.toFixed(2)]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Usage"}),e.jsxs("span",{className:`font-semibold ${u}`,children:[r.toFixed(1),"%"]})]}),e.jsx("div",{className:"w-full h-3 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full ${y} transition-all duration-500 ease-out rounded-full`,style:{width:`${Math.min(r,100)}%`}})})]}),r>=100&&e.jsx("div",{className:"mt-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20",children:e.jsxs("p",{className:"text-sm text-red-500 font-medium flex items-center gap-2",children:[e.jsx(m,{className:"w-4 h-4"}),"Budget exceeded! Consider increasing the limit or pausing tasks."]})}),r>=80&&r<100&&e.jsx("div",{className:"mt-4 p-3 rounded-xl bg-orange-500/10 border border-orange-500/20",children:e.jsxs("p",{className:"text-sm text-orange-500 font-medium flex items-center gap-2",children:[e.jsx(m,{className:"w-4 h-4"}),"Approaching budget limit. ",r.toFixed(0),"% used."]})})]})}function V(){const{data:a,isLoading:l}=h({queryKey:["costs","summary"],queryFn:g.costs.summary,refetchInterval:3e4}),{data:s,isLoading:t}=h({queryKey:["costs","analytics"],queryFn:g.costs.analytics,refetchInterval:3e4}),{data:r,isLoading:o}=h({queryKey:["costs","budget"],queryFn:g.costs.budget,refetchInterval:3e4});return l||t||o?e.jsxs("div",{className:"space-y-6 p-6",children:[e.jsxs("div",{children:[e.jsx(x,{className:"h-8 w-48 mb-2"}),e.jsx(x,{className:"h-4 w-64"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[1,2,3,4].map(n=>e.jsx(x,{className:"h-32 rounded-2xl"},n))}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsx(x,{className:"h-80 rounded-2xl"}),e.jsx(x,{className:"h-80 rounded-2xl"})]})]}):e.jsxs("div",{className:"space-y-6 p-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Cost Analytics"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Track token usage, costs, and budget across all AI agents"})]}),a&&e.jsx(B,{summary:a,analytics:s}),r&&e.jsx(K,{budget:r}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s&&s.daily.length>0&&e.jsx(P,{data:s.daily}),s&&Object.keys(s.byAgent).length>0&&e.jsx(R,{data:s.byAgent})]}),s&&Object.keys(s.byModel).length>0&&e.jsxs(c,{className:"glass p-6 rounded-2xl",children:[e.jsxs("h3",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[e.jsx(f,{className:"w-5 h-5 text-primary"}),"Costs by Model"]}),e.jsx("div",{className:"space-y-3",children:Object.entries(s.byModel).sort(([,n],[,i])=>i.cost-n.cost).map(([n,i])=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-muted/50 hover:bg-muted/70 transition-liquid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-sm",children:n}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[i.tokens.toLocaleString()," tokens"]})]}),e.jsx("div",{className:"text-right",children:e.jsxs("div",{className:"font-semibold text-primary",children:["$",i.cost.toFixed(4)]})})]},n))})]}),(!s||s.daily.length===0)&&e.jsxs(c,{className:"glass p-12 rounded-2xl text-center",children:[e.jsx(v,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground opacity-50"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Cost Data Yet"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md mx-auto",children:"Cost analytics will appear here once AI agents start processing tasks. Create a task to get started!"})]})]})}export{V as CostsDashboard};