pi-mega-compact 0.20.24 → 0.20.26

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 (132) hide show
  1. package/dist/extensions/dashboard-server/routes-vector-cortex-crystals.js +6 -0
  2. package/dist/extensions/dashboard-server/routes-vector-cortex-diagnostics.js +6 -0
  3. package/dist/extensions/dashboard-server/routes-vector-cortex-economics.js +6 -0
  4. package/dist/extensions/dashboard-server/routes-vector-cortex-eval.js +2 -0
  5. package/dist/extensions/dashboard-server/routes-vector-cortex-heal.js +9 -0
  6. package/dist/extensions/dashboard-server/routes-vector-cortex-health.js +4 -0
  7. package/dist/extensions/dashboard-server/routes-vector-cortex-ledger.js +2 -0
  8. package/dist/extensions/dashboard-server/routes-vector-cortex-outcomes.js +10 -2
  9. package/dist/extensions/dashboard-server/routes-vector-cortex-plans.js +2 -0
  10. package/dist/extensions/dashboard-server/routes-vector-cortex-platform.js +13 -2
  11. package/dist/extensions/dashboard-server/routes-vector-cortex-policy.js +6 -0
  12. package/dist/extensions/dashboard-server/routes-vector-cortex-query.js +2 -0
  13. package/dist/extensions/dashboard-server/routes-vector-cortex-reconstruct.js +5 -0
  14. package/dist/extensions/dashboard-server/routes-vector-cortex-render.js +2 -0
  15. package/dist/extensions/dashboard-server/routes-vector-cortex-repair.js +5 -0
  16. package/dist/extensions/dashboard-server/routes-vector-cortex-residual.js +2 -0
  17. package/dist/extensions/dashboard-server/routes-vector-cortex-rollout.js +56 -3
  18. package/dist/extensions/dashboard-server/routes-vector-cortex-shards.js +5 -0
  19. package/dist/extensions/dashboard-server/routes-vector-cortex-topology.js +2 -0
  20. package/dist/extensions/dashboard-server/server.js +4 -2
  21. package/dist/extensions/dashboard-server/vc-status.js +17 -0
  22. package/dist/extensions/mega-dashboard-bounce.js +79 -0
  23. package/dist/extensions/mega-dashboard-cmds.js +57 -24
  24. package/dist/extensions/mega-events/context-handler/afterCompact.js +2 -2
  25. package/dist/extensions/mega-events/context-handler/pipelineRun.js +17 -2
  26. package/dist/extensions/mega-events/register.js +17 -0
  27. package/dist/extensions/mega-pipeline/recall.js +11 -0
  28. package/extensions/dashboard-client/dist/assets/{AreaChart-BzEedilo.js → AreaChart-DRErPez1.js} +2 -2
  29. package/extensions/dashboard-client/dist/assets/{AreaChart-BzEedilo.js.map → AreaChart-DRErPez1.js.map} +1 -1
  30. package/extensions/dashboard-client/dist/assets/{BarChart-CzAVg1_J.js → BarChart-Cwxel3M7.js} +2 -2
  31. package/extensions/dashboard-client/dist/assets/{BarChart-CzAVg1_J.js.map → BarChart-Cwxel3M7.js.map} +1 -1
  32. package/extensions/dashboard-client/dist/assets/{CacheTab-D2-rzTuX.js → CacheTab-D4j3vwFu.js} +2 -2
  33. package/extensions/dashboard-client/dist/assets/{CacheTab-D2-rzTuX.js.map → CacheTab-D4j3vwFu.js.map} +1 -1
  34. package/extensions/dashboard-client/dist/assets/{EventsTab-DB7g1Szy.js → EventsTab-BA7t_fsH.js} +2 -2
  35. package/extensions/dashboard-client/dist/assets/{EventsTab-DB7g1Szy.js.map → EventsTab-BA7t_fsH.js.map} +1 -1
  36. package/extensions/dashboard-client/dist/assets/{HealthTab-Cvkmi-R3.js → HealthTab-Ci9gtYDP.js} +2 -2
  37. package/extensions/dashboard-client/dist/assets/{HealthTab-Cvkmi-R3.js.map → HealthTab-Ci9gtYDP.js.map} +1 -1
  38. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-g_udcOO7.js → MaintenanceTab-BeqWn-xu.js} +2 -2
  39. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-g_udcOO7.js.map → MaintenanceTab-BeqWn-xu.js.map} +1 -1
  40. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-DAjBaf8P.js → MemoryMapTab-BreZegCV.js} +2 -2
  41. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-DAjBaf8P.js.map → MemoryMapTab-BreZegCV.js.map} +1 -1
  42. package/extensions/dashboard-client/dist/assets/{MetricsTab-13dYYocB.js → MetricsTab-DLbgfJT2.js} +2 -2
  43. package/extensions/dashboard-client/dist/assets/{MetricsTab-13dYYocB.js.map → MetricsTab-DLbgfJT2.js.map} +1 -1
  44. package/extensions/dashboard-client/dist/assets/{OverviewTab-CLpCyLvx.js → OverviewTab-BtcXdrnC.js} +2 -2
  45. package/extensions/dashboard-client/dist/assets/{OverviewTab-CLpCyLvx.js.map → OverviewTab-BtcXdrnC.js.map} +1 -1
  46. package/extensions/dashboard-client/dist/assets/{ReposTab-EdAqUrwG.js → ReposTab-DpDLEzV9.js} +2 -2
  47. package/extensions/dashboard-client/dist/assets/{ReposTab-EdAqUrwG.js.map → ReposTab-DpDLEzV9.js.map} +1 -1
  48. package/extensions/dashboard-client/dist/assets/{SessionsTab-C21ZuOL_.js → SessionsTab-CMe5jSrZ.js} +2 -2
  49. package/extensions/dashboard-client/dist/assets/{SessionsTab-C21ZuOL_.js.map → SessionsTab-CMe5jSrZ.js.map} +1 -1
  50. package/extensions/dashboard-client/dist/assets/{SetupTab-CP7lE3L_.js → SetupTab-C3OY8mc7.js} +2 -2
  51. package/extensions/dashboard-client/dist/assets/{SetupTab-CP7lE3L_.js.map → SetupTab-C3OY8mc7.js.map} +1 -1
  52. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-DZ3QR8qt.js → TimeSavedCard-BFPJUQzs.js} +2 -2
  53. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-DZ3QR8qt.js.map → TimeSavedCard-BFPJUQzs.js.map} +1 -1
  54. package/extensions/dashboard-client/dist/assets/{TurnsTab-CNchE5rD.js → TurnsTab-Ujt29pKI.js} +2 -2
  55. package/extensions/dashboard-client/dist/assets/{TurnsTab-CNchE5rD.js.map → TurnsTab-Ujt29pKI.js.map} +1 -1
  56. package/extensions/dashboard-client/dist/assets/VectorCortexTab-CfxZW91A.js +2 -0
  57. package/extensions/dashboard-client/dist/assets/VectorCortexTab-CfxZW91A.js.map +1 -0
  58. package/extensions/dashboard-client/dist/assets/{WikiTab-BIe5Z9Nc.js → WikiTab-BiKXVwGT.js} +2 -2
  59. package/extensions/dashboard-client/dist/assets/{WikiTab-BIe5Z9Nc.js.map → WikiTab-BiKXVwGT.js.map} +1 -1
  60. package/extensions/dashboard-client/dist/assets/{button-BrVreSt5.js → button-DJwGcw0u.js} +2 -2
  61. package/extensions/dashboard-client/dist/assets/{button-BrVreSt5.js.map → button-DJwGcw0u.js.map} +1 -1
  62. package/extensions/dashboard-client/dist/assets/{card-D9F4wbqs.js → card-CgjBf5LZ.js} +2 -2
  63. package/extensions/dashboard-client/dist/assets/{card-D9F4wbqs.js.map → card-CgjBf5LZ.js.map} +1 -1
  64. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-mkdzCnMP.js → generateCategoricalChart-CTQIl2qs.js} +2 -2
  65. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-mkdzCnMP.js.map → generateCategoricalChart-CTQIl2qs.js.map} +1 -1
  66. package/extensions/dashboard-client/dist/assets/{index-CtlmOlj1.js → index-Bu8CZUMX.js} +3 -3
  67. package/extensions/dashboard-client/dist/assets/{index-CtlmOlj1.js.map → index-Bu8CZUMX.js.map} +1 -1
  68. package/extensions/dashboard-client/dist/assets/{switch-BXmp5iwA.js → switch-uUiS1Raq.js} +2 -2
  69. package/extensions/dashboard-client/dist/assets/{switch-BXmp5iwA.js.map → switch-uUiS1Raq.js.map} +1 -1
  70. package/extensions/dashboard-client/dist/assets/{toggle-BgawNwW9.js → toggle-Dv3OEscH.js} +2 -2
  71. package/extensions/dashboard-client/dist/assets/{toggle-BgawNwW9.js.map → toggle-Dv3OEscH.js.map} +1 -1
  72. package/extensions/dashboard-client/dist/assets/{useSSE-DZKX73Ea.js → useSSE-n6ymAic3.js} +2 -2
  73. package/extensions/dashboard-client/dist/assets/{useSSE-DZKX73Ea.js.map → useSSE-n6ymAic3.js.map} +1 -1
  74. package/extensions/dashboard-client/dist/index.html +1 -1
  75. package/extensions/dashboard-client/src/tabs/VcStatusBadge.tsx +24 -0
  76. package/extensions/dashboard-client/src/tabs/VectorCortexClosureCard.tsx +12 -6
  77. package/extensions/dashboard-client/src/tabs/VectorCortexCrystalsCard.tsx +12 -6
  78. package/extensions/dashboard-client/src/tabs/VectorCortexDiagnosticsCard.tsx +12 -6
  79. package/extensions/dashboard-client/src/tabs/VectorCortexEconomicsCard.tsx +12 -6
  80. package/extensions/dashboard-client/src/tabs/VectorCortexLedgerCard.tsx +12 -6
  81. package/extensions/dashboard-client/src/tabs/VectorCortexOutcomesCard.tsx +12 -6
  82. package/extensions/dashboard-client/src/tabs/VectorCortexPlansCard.tsx +12 -6
  83. package/extensions/dashboard-client/src/tabs/VectorCortexPlatformCard.tsx +12 -6
  84. package/extensions/dashboard-client/src/tabs/VectorCortexPolicyCard.tsx +12 -6
  85. package/extensions/dashboard-client/src/tabs/VectorCortexRenderCard.tsx +12 -6
  86. package/extensions/dashboard-client/src/tabs/VectorCortexRepairCard.tsx +12 -6
  87. package/extensions/dashboard-client/src/tabs/VectorCortexRestoreCard.tsx +12 -6
  88. package/extensions/dashboard-client/src/tabs/VectorCortexRolloutCard.tsx +12 -6
  89. package/extensions/dashboard-client/src/tabs/VectorCortexShardsCard.tsx +23 -11
  90. package/extensions/dashboard-client/src/tabs/VectorCortexTab.tsx +5 -7
  91. package/extensions/dashboard-client/src/tabs/VectorCortexTopologyCard.tsx +28 -14
  92. package/extensions/dashboard-client/src/types/vector-cortex-vc7.ts +6 -0
  93. package/extensions/dashboard-client/src/types/vector-cortex-vc8.ts +6 -0
  94. package/extensions/dashboard-client/src/types/vector-cortex.ts +26 -0
  95. package/extensions/dashboard-server/api-contracts/vector-cortex-cache.ts +2 -0
  96. package/extensions/dashboard-server/api-contracts/vector-cortex-diagnostics.ts +2 -0
  97. package/extensions/dashboard-server/api-contracts/vector-cortex-economics.ts +2 -0
  98. package/extensions/dashboard-server/api-contracts/vector-cortex-heal.ts +6 -0
  99. package/extensions/dashboard-server/api-contracts/vector-cortex-outcomes.ts +2 -0
  100. package/extensions/dashboard-server/api-contracts/vector-cortex-platform.ts +2 -0
  101. package/extensions/dashboard-server/api-contracts/vector-cortex-policy.ts +2 -0
  102. package/extensions/dashboard-server/api-contracts/vector-cortex.ts +19 -0
  103. package/extensions/dashboard-server/routes-vector-cortex-crystals.ts +6 -0
  104. package/extensions/dashboard-server/routes-vector-cortex-diagnostics.ts +6 -0
  105. package/extensions/dashboard-server/routes-vector-cortex-economics.ts +6 -0
  106. package/extensions/dashboard-server/routes-vector-cortex-eval.ts +2 -0
  107. package/extensions/dashboard-server/routes-vector-cortex-heal.ts +9 -0
  108. package/extensions/dashboard-server/routes-vector-cortex-health.ts +4 -0
  109. package/extensions/dashboard-server/routes-vector-cortex-ledger.ts +2 -0
  110. package/extensions/dashboard-server/routes-vector-cortex-outcomes.ts +11 -2
  111. package/extensions/dashboard-server/routes-vector-cortex-plans.ts +2 -0
  112. package/extensions/dashboard-server/routes-vector-cortex-platform.ts +14 -2
  113. package/extensions/dashboard-server/routes-vector-cortex-policy.ts +6 -0
  114. package/extensions/dashboard-server/routes-vector-cortex-query.ts +2 -0
  115. package/extensions/dashboard-server/routes-vector-cortex-reconstruct.ts +5 -0
  116. package/extensions/dashboard-server/routes-vector-cortex-render.ts +2 -0
  117. package/extensions/dashboard-server/routes-vector-cortex-repair.ts +5 -0
  118. package/extensions/dashboard-server/routes-vector-cortex-residual.ts +2 -0
  119. package/extensions/dashboard-server/routes-vector-cortex-rollout.ts +58 -3
  120. package/extensions/dashboard-server/routes-vector-cortex-shards.ts +5 -0
  121. package/extensions/dashboard-server/routes-vector-cortex-topology.ts +2 -0
  122. package/extensions/dashboard-server/server.ts +4 -2
  123. package/extensions/dashboard-server/vc-status.ts +22 -0
  124. package/extensions/mega-dashboard-bounce.ts +97 -0
  125. package/extensions/mega-dashboard-cmds.ts +63 -24
  126. package/extensions/mega-events/context-handler/afterCompact.ts +2 -2
  127. package/extensions/mega-events/context-handler/pipelineRun.ts +18 -3
  128. package/extensions/mega-events/register.ts +14 -1
  129. package/extensions/mega-pipeline/recall.ts +10 -0
  130. package/package.json +1 -1
  131. package/extensions/dashboard-client/dist/assets/VectorCortexTab-B3WuPeyn.js +0 -2
  132. package/extensions/dashboard-client/dist/assets/VectorCortexTab-B3WuPeyn.js.map +0 -1
@@ -9,6 +9,11 @@ import { join, dirname, sep } from "node:path";
9
9
  import { fileURLToPath } from "node:url";
10
10
  import { existsSync, writeFileSync, readFileSync, unlinkSync, openSync, closeSync } from "node:fs";
11
11
  import { spawn, execSync } from "node:child_process"; // guardrails-allow PREVENT-PI-004: spawns the optional, user-triggered localhost dashboard server only
12
+ import { bounceStaleRunnerIfAny, } from "./mega-dashboard-bounce.js";
13
+ // Re-export the VC0F bounce seam for the unit tests, which import the parent
14
+ // module. The implementation + once-per-process gate live in the sibling
15
+ // delegate file to keep this module under the extensions/ soft limit (400).
16
+ export { bounceStaleRunnerIfAny, resetStalenessGateForTests } from "./mega-dashboard-bounce.js";
12
17
  /** Register the dashboard server lifecycle commands. */
13
18
  export function registerDashboardCommands(pi, runtime) {
14
19
  // H3 fix: read currentStateDir at CALL time, not registration time. The
@@ -118,6 +123,27 @@ export function registerDashboardCommands(pi, runtime) {
118
123
  }
119
124
  catch { /* ignore */ }
120
125
  }
126
+ /** Version stamped in the current repo's port.pid marker (VC0F B2), or null
127
+ * when the marker is absent or predates the stamped `version` field. */
128
+ function markerVersion() {
129
+ try {
130
+ const info = JSON.parse(readFileSync(portFile(), "utf-8"));
131
+ return typeof info.version === "string" ? info.version : null;
132
+ }
133
+ catch {
134
+ return null;
135
+ }
136
+ }
137
+ /**
138
+ * Build the dependency set `bounceStaleRunnerIfAny` needs for the CURRENT
139
+ * repo's dashboard lifecycle (port.pid / runner / launch-log all resolve via
140
+ * `runtime.currentStateDir`, so a repo switch re-targets the bounce).
141
+ * `notify` is threaded here so the interactive /mega-dashboard path surfaces
142
+ * the replace messages while the silent session-start path is a no-op.
143
+ */
144
+ function staleBounceDeps(notify) {
145
+ return { isServerRunning, serverVersion, markerVersion, ownVersion, killServerOnPort, notify };
146
+ }
121
147
  /**
122
148
  * Resolve the launchable dashboard-server module.
123
149
  *
@@ -157,9 +183,14 @@ export function registerDashboardCommands(pi, runtime) {
157
183
  if (!resolved)
158
184
  return false;
159
185
  dashboardNeedsStrip = resolved.needsStripTypes;
186
+ // VC0F B1: stamp the extension version in the generated script at WRITE time
187
+ // so a future probe can compare it against ownVersion() without a live HTTP
188
+ // round-trip (useful when the server is hung and /api/version times out).
189
+ const stampedVersion = ownVersion() ?? "0.0.0";
160
190
  const script = [
161
191
  `import { appendFileSync } from "node:fs";`,
162
192
  `const __log = ${JSON.stringify(launchLog())};`,
193
+ `const __VERSION = ${JSON.stringify(stampedVersion)}; // mega-compact bundle version stamped at write time (VC0F B1)`,
163
194
  `function __fail(err) {`,
164
195
  ` const msg = "[mega-compact] dashboard failed: " + (err && err.stack ? err.stack : String(err));`,
165
196
  ` try { appendFileSync(__log, msg + "\\n"); } catch { /* ignore */ }`,
@@ -188,31 +219,18 @@ export function registerDashboardCommands(pi, runtime) {
188
219
  description: "Start the local web dashboard and optionally open it in the default browser.",
189
220
  handler: async (_args, ctx) => {
190
221
  runtime.bindRepo(ctx.cwd);
191
- let info = await isServerRunning();
222
+ // VC0F A1: lift the stale-replace decision out of the handler. Interactive
223
+ // path is unchanged — the user is still notified before a stale runner is
224
+ // killed. When a stale server is bounced, we fall straight through to a
225
+ // fresh spawn; otherwise reuse the live current server if there is one.
226
+ const { bounced } = await bounceStaleRunnerIfAny(staleBounceDeps((msg) => ctx.ui.notify(msg)));
227
+ const info = bounced ? null : await isServerRunning();
192
228
  if (info) {
193
- // Replace the server when it's stale: either (a) an orphan — a live
194
- // server with no port.pid (e.g. left running from a detached spawn or a
195
- // previous upgrade) that keeps serving old HTML from memory; or (b) a
196
- // server that reports a different version than this extension (an older
197
- // build). A live server WITH a matching pid file and version is reused.
198
- const orphan = !info.hasPidFile;
199
- const running = await serverVersion(info.port);
200
- const want = ownVersion();
201
- const stale = orphan || (want != null && running != null && running !== want);
202
- if (stale) {
203
- ctx.ui.notify(orphan
204
- ? "[mega-compact] replacing orphaned dashboard server…"
205
- : `[mega-compact] replacing stale dashboard (${running} → ${want})…`);
206
- killServerOnPort(info.port);
207
- info = null;
208
- }
209
- else {
210
- ctx.ui.notify(`[mega-compact] dashboard already running at ${info.url}`);
211
- const open = await ctx.ui.confirm("mega-compact dashboard", `Open ${info.url} in browser?`);
212
- if (open)
213
- openBrowser(info.url);
214
- return;
215
- }
229
+ ctx.ui.notify(`[mega-compact] dashboard already running at ${info.url}`);
230
+ const open = await ctx.ui.confirm("mega-compact dashboard", `Open ${info.url} in browser?`);
231
+ if (open)
232
+ openBrowser(info.url);
233
+ return;
216
234
  }
217
235
  // Start the server
218
236
  ctx.ui.notify("[mega-compact] starting dashboard server…");
@@ -332,4 +350,19 @@ export function registerDashboardCommands(pi, runtime) {
332
350
  }
333
351
  },
334
352
  });
353
+ // VC0F A3 — durable restart-on-upgrade: after `pi update --extensions`
354
+ // replaces the on-disk package, the next pi session probes the running
355
+ // dashboard, sees the version mismatch, and kills + respawns the stale runner
356
+ // automatically. SILENT — no ctx.ui.notify on this session-start path (unlike
357
+ // the explicit /mega-dashboard path). Best-effort and non-fatal: a probe or
358
+ // kill failure here never breaks session startup.
359
+ pi.on("session_start", async (_event, ctx) => {
360
+ runtime.bindRepo(ctx.cwd);
361
+ try {
362
+ await bounceStaleRunnerIfAny(staleBounceDeps(() => { }));
363
+ }
364
+ catch {
365
+ /* best-effort — never break the session */
366
+ }
367
+ });
335
368
  }
@@ -237,9 +237,9 @@ export async function persistEpochAndMaintain(runtime, config, ran) {
237
237
  try {
238
238
  reportRepairPlanned((name, payload) => runtime.appendEvent(name, payload), {
239
239
  subsystem: "post_compact",
240
- generation: 1,
240
+ generation: runtime.rt.compactCount,
241
241
  backoffMs: 0,
242
- gapSize: 0,
242
+ gapSize: ran.result.compactedFrom,
243
243
  });
244
244
  }
245
245
  catch {
@@ -2,6 +2,7 @@ import { runCompact } from "../../mega-pipeline.js";
2
2
  import { pressureFromPct, pressureRatio } from "../../mega-config.js";
3
3
  import { recordCompactLatency } from "../../mega-runtime/vc-observer.js";
4
4
  import { decideLivePath } from "../../mega-runtime/vector-cortex-live.js";
5
+ import { defaultClock } from "../../../src/vector-cortex/rollout/gate.js";
5
6
  import { VC5C_ENABLED } from "../../../src/config/vector-cortex.js";
6
7
  /**
7
8
  * Invoke the compaction pipeline with adaptive pressure. Returns a tailed view
@@ -14,11 +15,25 @@ export function invokePipeline(pi, runtime, config, ctx, opts) {
14
15
  // rollout shapes. Best-effort + non-fatal; decision does NOT gate behavior yet.
15
16
  if (VC5C_ENABLED()) {
16
17
  try {
18
+ const clock = defaultClock();
19
+ // Conservative evidence: fresh in-memory window (elapsed=0), not
20
+ // powered, so the gate can't advance — but events/sessions carry real
21
+ // values so the decision events reflect actual runtime activity rather
22
+ // than degrading every epoch to an empty mode-C read.
23
+ const evidence = {
24
+ windowStartMs: clock.now(),
25
+ powered: false,
26
+ events: runtime.rt.compactCount,
27
+ sessions: 1,
28
+ hardFaults: runtime.rt
29
+ .vcHardFaults ?? [],
30
+ };
17
31
  const decision = decideLivePath(runtime.rt.sessionId, {
18
32
  emit: runtime.appendEvent.bind(runtime),
33
+ clock,
19
34
  currentGate: runtime.rt.vcGate ?? 0,
20
- hardFaults: runtime.rt
21
- .vcHardFaults ?? [],
35
+ evidence,
36
+ hardFaults: evidence.hardFaults,
22
37
  });
23
38
  runtime.appendEvent("vector_cortex_rollout_decision", {
24
39
  sessionId: runtime.rt.sessionId,
@@ -3,6 +3,7 @@ import { registerAgentHandlers } from "./agent-handlers.js";
3
3
  import { registerContextHandler } from "./context-handler.js";
4
4
  import { registerCompactHandlers } from "./compact-handlers.js";
5
5
  import { registerPerfHandler } from "./perf-handler.js";
6
+ import { registerVectorCortexRender } from "../mega-context/vector-cortex.js";
6
7
  /**
7
8
  * DIAG accessor for the headless test harness: the most recently constructed
8
9
  * MegaRuntime, so a test that loads the compiled extension via its default
@@ -14,6 +15,22 @@ export let lastRuntime;
14
15
  /** Register all pi lifecycle event handlers. */
15
16
  export function registerEventHandlers(pi, runtime, config) {
16
17
  lastRuntime = runtime;
18
+ // VC5B: wire the render+validate seam into the before_agent_start lifecycle.
19
+ // Registered FIRST so its no-op return (no render input on ctx) doesn't
20
+ // clobber a systemPrompt that a later before_agent_start handler (e.g. the
21
+ // legacy recall prepend in session-handlers) returns. When VC5B does
22
+ // prepend, it returns a new systemPrompt; the later handlers run on the
23
+ // recallTailInject=ON path and return undefined, so VC5B's return survives.
24
+ // The _ctx param is unused by the seam; pass empty for the registered seam.
25
+ try {
26
+ registerVectorCortexRender(pi, undefined, (event, fields) => {
27
+ try {
28
+ runtime.appendEvent(event, fields);
29
+ }
30
+ catch { /* non-fatal */ }
31
+ });
32
+ }
33
+ catch { /* non-fatal: VC5B registration never breaks startup */ }
17
34
  // ---- Session lifecycle (state reset points) -------------------------------
18
35
  registerSessionHandlers(pi, runtime, config);
19
36
  registerAgentHandlers(pi, runtime, config);
@@ -11,6 +11,7 @@ import { normalizeSessionId } from "../../src/store.js";
11
11
  import { incRecallInjected, incCacheHitTokens, getIndexDir, } from "../../src/store/sqlite.js";
12
12
  import { ensureConversationIdFor, recordTurnWrite, recordRecallWrite, } from "../mega-turn-store.js";
13
13
  import { C } from "../mega-runtime.js";
14
+ import { recordRecallLatency } from "../mega-runtime/vc-observer.js";
14
15
  /**
15
16
  * Unified recall (Layer 5). The ONE path that injects. Returns the recall
16
17
  * result; callers decide whether to stage it for before_agent_start (resume)
@@ -23,6 +24,7 @@ export function doRecall(runtime, config, ctx, query, source) {
23
24
  // are already resident in the session, so recall never re-injects context the
24
25
  // model can already see. Best-effort — an empty window just skips dedupe.
25
26
  const liveWindow = config.windowDedupe ? extractLiveWindow(ctx) : undefined;
27
+ const recallStartMs = Date.now();
26
28
  const result = recallAndInline({
27
29
  sessionId: sid,
28
30
  query,
@@ -124,6 +126,15 @@ export function doRecall(runtime, config, ctx, query, source) {
124
126
  /* non-fatal: recall provenance never breaks the recall path */
125
127
  }
126
128
  }
129
+ // VC0A: record recall latency on the eval observer (mode A) so the dashboard
130
+ // histogram reflects real data. No-op when the observer is absent (flag off /
131
+ // construction failure).
132
+ try {
133
+ recordRecallLatency(runtime, Date.now() - recallStartMs, sid, 0);
134
+ }
135
+ catch {
136
+ /* non-fatal: latency recording never breaks recall */
137
+ }
127
138
  return result;
128
139
  }
129
140
  /**
@@ -1,2 +1,2 @@
1
- import{b as R,c as W,m as T,i as C,d as F,A as ie,e as B,h as q,j as oe,k as G,l as se,n as le,u as ue,o as K,G as ce,p as J,q as Q,D as fe,g as pe,X as he,Y as de,f as me}from"./generateCategoricalChart-mkdzCnMP.js";import{R as p,F as ee,r as ve}from"./index-CtlmOlj1.js";var ye=["layout","type","stroke","connectNulls","isRange","ref"],be=["key"],te;function M(e){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(e)}function ae(e,t){if(e==null)return{};var r=Ae(e,t),a,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Ae(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(a){E(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ne(a.key),a)}}function xe(e,t,r){return t&&Z(e.prototype,t),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pe(e,t,r){return t=$(t),Oe(e,re()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}function Oe(e,t){if(t&&(M(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(re=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$(e)}function we(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},X(e,t)}function E(e,t,r){return t=ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e){var t=_e(e,"string");return M(t)=="symbol"?t:t+""}function _e(e,t){if(M(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(M(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var L=function(e){function t(){var r;ge(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return r=Pe(this,t,[].concat(n)),E(r,"state",{isAnimationFinished:!0}),E(r,"id",ue("recharts-area-")),E(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),K(o)&&o()}),E(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),K(o)&&o()}),r}return we(t,e),xe(t,[{key:"renderDots",value:function(a,n,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,f=u.points,c=u.dataKey,h=R(this.props,!1),A=R(l,!0),g=f.map(function(v,O){var y=S(S(S({key:"dot-".concat(O),r:3},h),A),{},{index:O,cx:v.x,cy:v.y,dataKey:c,value:v.value,payload:v.payload,points:f});return t.renderDotItem(l,y)}),x={clipPath:a?"url(#clipPath-".concat(n?"":"dots-").concat(i,")"):null};return p.createElement(W,D({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].x,l=o[o.length-1].x,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.y||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.y||0})),c)),C(c)?p.createElement("rect",{x:u<l?u:u-f,y:0,width:f,height:Math.floor(c+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].y,l=o[o.length-1].y,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.x||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.x||0})),c)),C(c)?p.createElement("rect",{x:0,y:u<l?u:u-f,width:c+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(a){var n=this.props.layout;return n==="vertical"?this.renderVerticalRect(a):this.renderHorizontalRect(a)}},{key:"renderAreaStatically",value:function(a,n,i,o){var s=this.props,u=s.layout,l=s.type,f=s.stroke,c=s.connectNulls,h=s.isRange;s.ref;var A=ae(s,ye);return p.createElement(W,{clipPath:i?"url(#clipPath-".concat(o,")"):null},p.createElement(F,D({},R(A,!0),{points:a,connectNulls:c,type:l,baseLine:n,layout:u,stroke:"none",className:"recharts-area-area"})),f!=="none"&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:a})),f!=="none"&&h&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(a,n){var i=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,h=o.animationEasing,A=o.animationId,g=this.state,x=g.prevPoints,v=g.prevBaseLine;return p.createElement(ie,{begin:f,duration:c,isActive:l,easing:h,from:{t:0},to:{t:1},key:"area-".concat(A),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var y=O.t;if(x){var _=x.length/s.length,d=s.map(function(P,N){var k=Math.floor(N*_);if(x[k]){var j=x[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P}),m;if(C(u)&&typeof u=="number"){var b=B(v,u);m=b(y)}else if(q(u)||oe(u)){var w=B(v,0);m=w(y)}else m=u.map(function(P,N){var k=Math.floor(N*_);if(v[k]){var j=v[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P});return i.renderAreaStatically(d,m,a,n)}return p.createElement(W,null,p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},i.renderClipRect(y))),p.createElement(W,{clipPath:"url(#animationClipPath-".concat(n,")")},i.renderAreaStatically(s,u,a,n)))})}},{key:"renderArea",value:function(a,n){var i=this.props,o=i.points,s=i.baseLine,u=i.isAnimationActive,l=this.state,f=l.prevPoints,c=l.prevBaseLine,h=l.totalLength;return u&&o&&o.length&&(!f&&h>0||!G(f,o)||!G(c,s))?this.renderAreaWithAnimation(a,n):this.renderAreaStatically(o,s,a,n)}},{key:"render",value:function(){var a,n=this.props,i=n.hide,o=n.dot,s=n.points,u=n.className,l=n.top,f=n.left,c=n.xAxis,h=n.yAxis,A=n.width,g=n.height,x=n.isAnimationActive,v=n.id;if(i||!s||!s.length)return null;var O=this.state.isAnimationFinished,y=s.length===1,_=ee("recharts-area",u),d=c&&c.allowDataOverflow,m=h&&h.allowDataOverflow,b=d||m,w=q(v)?this.id:v,P=(a=R(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},N=P.r,k=N===void 0?3:N,j=P.strokeWidth,I=j===void 0?2:j,V=se(o)?o:{},Y=V.clipDot,H=Y===void 0?!0:Y,z=k*2+I;return p.createElement(W,{className:_},d||m?p.createElement("defs",null,p.createElement("clipPath",{id:"clipPath-".concat(w)},p.createElement("rect",{x:d?f:f-A/2,y:m?l:l-g/2,width:d?A:A*2,height:m?g:g*2})),!H&&p.createElement("clipPath",{id:"clipPath-dots-".concat(w)},p.createElement("rect",{x:f-z/2,y:l-z/2,width:A+z,height:g+z}))):null,y?null:this.renderArea(b,w),(o||y)&&this.renderDots(b,H,w),(!x||O)&&le.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(a,n){return a.animationId!==n.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,curBaseLine:a.baseLine,prevPoints:n.curPoints,prevBaseLine:n.curBaseLine}:a.points!==n.curPoints||a.baseLine!==n.curBaseLine?{curPoints:a.points,curBaseLine:a.baseLine}:null}}])}(ve.PureComponent);te=L;E(L,"displayName","Area");E(L,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ce.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});E(L,"getBaseValue",function(e,t,r,a){var n=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(C(s)&&typeof s=="number")return s;var u=n==="horizontal"?a:r,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),c=Math.min(l[0],l[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});E(L,"getComposedData",function(e){var t=e.props,r=e.item,a=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,f=e.dataStartIndex,c=e.displayedData,h=e.offset,A=t.layout,g=l&&l.length,x=te.getBaseValue(t,r,a,n),v=A==="horizontal",O=!1,y=c.map(function(d,m){var b;g?b=l[f+m]:(b=J(d,u),Array.isArray(b)?O=!0:b=[x,b]);var w=b[1]==null||g&&J(d,u)==null;return v?{x:Q({axis:a,ticks:i,bandSize:s,entry:d,index:m}),y:w?null:n.scale(b[1]),value:b,payload:d}:{x:w?null:a.scale(b[1]),y:Q({axis:n,ticks:o,bandSize:s,entry:d,index:m}),value:b,payload:d}}),_;return g||O?_=y.map(function(d){var m=Array.isArray(d.value)?d.value[0]:null;return v?{x:d.x,y:m!=null&&d.y!=null?n.scale(m):null}:{x:m!=null?a.scale(m):null,y:d.y}}):_=v?n.scale(x):a.scale(x),S({points:y,baseLine:_,layout:A,isRange:O},h)});E(L,"renderDotItem",function(e,t){var r;if(p.isValidElement(e))r=p.cloneElement(e,t);else if(K(e))r=e(t);else{var a=ee("recharts-area-dot",typeof e!="boolean"?e.className:""),n=t.key,i=ae(t,be);r=p.createElement(fe,D({},i,{key:n,className:a}))}return r});var ke=pe({chartName:"AreaChart",GraphicalChild:L,axisComponents:[{axisType:"xAxis",AxisComp:he},{axisType:"yAxis",AxisComp:de}],formatAxisMap:me});export{ke as A,L as a};
2
- //# sourceMappingURL=AreaChart-BzEedilo.js.map
1
+ import{b as R,c as W,m as T,i as C,d as F,A as ie,e as B,h as q,j as oe,k as G,l as se,n as le,u as ue,o as K,G as ce,p as J,q as Q,D as fe,g as pe,X as he,Y as de,f as me}from"./generateCategoricalChart-CTQIl2qs.js";import{R as p,F as ee,r as ve}from"./index-Bu8CZUMX.js";var ye=["layout","type","stroke","connectNulls","isRange","ref"],be=["key"],te;function M(e){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(e)}function ae(e,t){if(e==null)return{};var r=Ae(e,t),a,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Ae(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(a){E(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ne(a.key),a)}}function xe(e,t,r){return t&&Z(e.prototype,t),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pe(e,t,r){return t=$(t),Oe(e,re()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}function Oe(e,t){if(t&&(M(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(re=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$(e)}function we(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},X(e,t)}function E(e,t,r){return t=ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e){var t=_e(e,"string");return M(t)=="symbol"?t:t+""}function _e(e,t){if(M(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(M(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var L=function(e){function t(){var r;ge(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return r=Pe(this,t,[].concat(n)),E(r,"state",{isAnimationFinished:!0}),E(r,"id",ue("recharts-area-")),E(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),K(o)&&o()}),E(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),K(o)&&o()}),r}return we(t,e),xe(t,[{key:"renderDots",value:function(a,n,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,f=u.points,c=u.dataKey,h=R(this.props,!1),A=R(l,!0),g=f.map(function(v,O){var y=S(S(S({key:"dot-".concat(O),r:3},h),A),{},{index:O,cx:v.x,cy:v.y,dataKey:c,value:v.value,payload:v.payload,points:f});return t.renderDotItem(l,y)}),x={clipPath:a?"url(#clipPath-".concat(n?"":"dots-").concat(i,")"):null};return p.createElement(W,D({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].x,l=o[o.length-1].x,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.y||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.y||0})),c)),C(c)?p.createElement("rect",{x:u<l?u:u-f,y:0,width:f,height:Math.floor(c+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].y,l=o[o.length-1].y,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.x||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.x||0})),c)),C(c)?p.createElement("rect",{x:0,y:u<l?u:u-f,width:c+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(a){var n=this.props.layout;return n==="vertical"?this.renderVerticalRect(a):this.renderHorizontalRect(a)}},{key:"renderAreaStatically",value:function(a,n,i,o){var s=this.props,u=s.layout,l=s.type,f=s.stroke,c=s.connectNulls,h=s.isRange;s.ref;var A=ae(s,ye);return p.createElement(W,{clipPath:i?"url(#clipPath-".concat(o,")"):null},p.createElement(F,D({},R(A,!0),{points:a,connectNulls:c,type:l,baseLine:n,layout:u,stroke:"none",className:"recharts-area-area"})),f!=="none"&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:a})),f!=="none"&&h&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(a,n){var i=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,h=o.animationEasing,A=o.animationId,g=this.state,x=g.prevPoints,v=g.prevBaseLine;return p.createElement(ie,{begin:f,duration:c,isActive:l,easing:h,from:{t:0},to:{t:1},key:"area-".concat(A),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var y=O.t;if(x){var _=x.length/s.length,d=s.map(function(P,N){var k=Math.floor(N*_);if(x[k]){var j=x[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P}),m;if(C(u)&&typeof u=="number"){var b=B(v,u);m=b(y)}else if(q(u)||oe(u)){var w=B(v,0);m=w(y)}else m=u.map(function(P,N){var k=Math.floor(N*_);if(v[k]){var j=v[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P});return i.renderAreaStatically(d,m,a,n)}return p.createElement(W,null,p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},i.renderClipRect(y))),p.createElement(W,{clipPath:"url(#animationClipPath-".concat(n,")")},i.renderAreaStatically(s,u,a,n)))})}},{key:"renderArea",value:function(a,n){var i=this.props,o=i.points,s=i.baseLine,u=i.isAnimationActive,l=this.state,f=l.prevPoints,c=l.prevBaseLine,h=l.totalLength;return u&&o&&o.length&&(!f&&h>0||!G(f,o)||!G(c,s))?this.renderAreaWithAnimation(a,n):this.renderAreaStatically(o,s,a,n)}},{key:"render",value:function(){var a,n=this.props,i=n.hide,o=n.dot,s=n.points,u=n.className,l=n.top,f=n.left,c=n.xAxis,h=n.yAxis,A=n.width,g=n.height,x=n.isAnimationActive,v=n.id;if(i||!s||!s.length)return null;var O=this.state.isAnimationFinished,y=s.length===1,_=ee("recharts-area",u),d=c&&c.allowDataOverflow,m=h&&h.allowDataOverflow,b=d||m,w=q(v)?this.id:v,P=(a=R(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},N=P.r,k=N===void 0?3:N,j=P.strokeWidth,I=j===void 0?2:j,V=se(o)?o:{},Y=V.clipDot,H=Y===void 0?!0:Y,z=k*2+I;return p.createElement(W,{className:_},d||m?p.createElement("defs",null,p.createElement("clipPath",{id:"clipPath-".concat(w)},p.createElement("rect",{x:d?f:f-A/2,y:m?l:l-g/2,width:d?A:A*2,height:m?g:g*2})),!H&&p.createElement("clipPath",{id:"clipPath-dots-".concat(w)},p.createElement("rect",{x:f-z/2,y:l-z/2,width:A+z,height:g+z}))):null,y?null:this.renderArea(b,w),(o||y)&&this.renderDots(b,H,w),(!x||O)&&le.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(a,n){return a.animationId!==n.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,curBaseLine:a.baseLine,prevPoints:n.curPoints,prevBaseLine:n.curBaseLine}:a.points!==n.curPoints||a.baseLine!==n.curBaseLine?{curPoints:a.points,curBaseLine:a.baseLine}:null}}])}(ve.PureComponent);te=L;E(L,"displayName","Area");E(L,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ce.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});E(L,"getBaseValue",function(e,t,r,a){var n=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(C(s)&&typeof s=="number")return s;var u=n==="horizontal"?a:r,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),c=Math.min(l[0],l[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});E(L,"getComposedData",function(e){var t=e.props,r=e.item,a=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,f=e.dataStartIndex,c=e.displayedData,h=e.offset,A=t.layout,g=l&&l.length,x=te.getBaseValue(t,r,a,n),v=A==="horizontal",O=!1,y=c.map(function(d,m){var b;g?b=l[f+m]:(b=J(d,u),Array.isArray(b)?O=!0:b=[x,b]);var w=b[1]==null||g&&J(d,u)==null;return v?{x:Q({axis:a,ticks:i,bandSize:s,entry:d,index:m}),y:w?null:n.scale(b[1]),value:b,payload:d}:{x:w?null:a.scale(b[1]),y:Q({axis:n,ticks:o,bandSize:s,entry:d,index:m}),value:b,payload:d}}),_;return g||O?_=y.map(function(d){var m=Array.isArray(d.value)?d.value[0]:null;return v?{x:d.x,y:m!=null&&d.y!=null?n.scale(m):null}:{x:m!=null?a.scale(m):null,y:d.y}}):_=v?n.scale(x):a.scale(x),S({points:y,baseLine:_,layout:A,isRange:O},h)});E(L,"renderDotItem",function(e,t){var r;if(p.isValidElement(e))r=p.cloneElement(e,t);else if(K(e))r=e(t);else{var a=ee("recharts-area-dot",typeof e!="boolean"?e.className:""),n=t.key,i=ae(t,be);r=p.createElement(fe,D({},i,{key:n,className:a}))}return r});var ke=pe({chartName:"AreaChart",GraphicalChild:L,axisComponents:[{axisType:"xAxis",AxisComp:he},{axisType:"yAxis",AxisComp:de}],formatAxisMap:me});export{ke as A,L as a};
2
+ //# sourceMappingURL=AreaChart-DRErPez1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart-BzEedilo.js","sources":["../../node_modules/recharts/es6/cartesian/Area.js","../../node_modules/recharts/es6/chart/AreaChart.js"],"sourcesContent":["var _excluded = [\"layout\", \"type\", \"stroke\", \"connectNulls\", \"isRange\", \"ref\"],\n _excluded2 = [\"key\"];\nvar _Area;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/**\n * @fileOverview Area\n */\nimport React, { PureComponent } from 'react';\nimport clsx from 'clsx';\nimport Animate from 'react-smooth';\nimport isFunction from 'lodash/isFunction';\nimport max from 'lodash/max';\nimport isNil from 'lodash/isNil';\nimport isNan from 'lodash/isNaN';\nimport isEqual from 'lodash/isEqual';\nimport { Curve } from '../shape/Curve';\nimport { Dot } from '../shape/Dot';\nimport { Layer } from '../container/Layer';\nimport { LabelList } from '../component/LabelList';\nimport { Global } from '../util/Global';\nimport { isNumber, uniqueId, interpolateNumber } from '../util/DataUtils';\nimport { getCateCoordinateOfLine, getValueByDataKey } from '../util/ChartUtils';\nimport { filterProps, hasClipDot } from '../util/ReactUtils';\nexport var Area = /*#__PURE__*/function (_PureComponent) {\n function Area() {\n var _this;\n _classCallCheck(this, Area);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _callSuper(this, Area, [].concat(args));\n _defineProperty(_this, \"state\", {\n isAnimationFinished: true\n });\n _defineProperty(_this, \"id\", uniqueId('recharts-area-'));\n _defineProperty(_this, \"handleAnimationEnd\", function () {\n var onAnimationEnd = _this.props.onAnimationEnd;\n _this.setState({\n isAnimationFinished: true\n });\n if (isFunction(onAnimationEnd)) {\n onAnimationEnd();\n }\n });\n _defineProperty(_this, \"handleAnimationStart\", function () {\n var onAnimationStart = _this.props.onAnimationStart;\n _this.setState({\n isAnimationFinished: false\n });\n if (isFunction(onAnimationStart)) {\n onAnimationStart();\n }\n });\n return _this;\n }\n _inherits(Area, _PureComponent);\n return _createClass(Area, [{\n key: \"renderDots\",\n value: function renderDots(needClip, clipDot, clipPathId) {\n var isAnimationActive = this.props.isAnimationActive;\n var isAnimationFinished = this.state.isAnimationFinished;\n if (isAnimationActive && !isAnimationFinished) {\n return null;\n }\n var _this$props = this.props,\n dot = _this$props.dot,\n points = _this$props.points,\n dataKey = _this$props.dataKey;\n var areaProps = filterProps(this.props, false);\n var customDotProps = filterProps(dot, true);\n var dots = points.map(function (entry, i) {\n var dotProps = _objectSpread(_objectSpread(_objectSpread({\n key: \"dot-\".concat(i),\n r: 3\n }, areaProps), customDotProps), {}, {\n index: i,\n cx: entry.x,\n cy: entry.y,\n dataKey: dataKey,\n value: entry.value,\n payload: entry.payload,\n points: points\n });\n return Area.renderDotItem(dot, dotProps);\n });\n var dotsProps = {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipDot ? '' : 'dots-').concat(clipPathId, \")\") : null\n };\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-area-dots\"\n }, dotsProps), dots);\n }\n }, {\n key: \"renderHorizontalRect\",\n value: function renderHorizontalRect(alpha) {\n var _this$props2 = this.props,\n baseLine = _this$props2.baseLine,\n points = _this$props2.points,\n strokeWidth = _this$props2.strokeWidth;\n var startX = points[0].x;\n var endX = points[points.length - 1].x;\n var width = alpha * Math.abs(startX - endX);\n var maxY = max(points.map(function (entry) {\n return entry.y || 0;\n }));\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n maxY = Math.max(baseLine, maxY);\n } else if (baseLine && Array.isArray(baseLine) && baseLine.length) {\n maxY = Math.max(max(baseLine.map(function (entry) {\n return entry.y || 0;\n })), maxY);\n }\n if (isNumber(maxY)) {\n return /*#__PURE__*/React.createElement(\"rect\", {\n x: startX < endX ? startX : startX - width,\n y: 0,\n width: width,\n height: Math.floor(maxY + (strokeWidth ? parseInt(\"\".concat(strokeWidth), 10) : 1))\n });\n }\n return null;\n }\n }, {\n key: \"renderVerticalRect\",\n value: function renderVerticalRect(alpha) {\n var _this$props3 = this.props,\n baseLine = _this$props3.baseLine,\n points = _this$props3.points,\n strokeWidth = _this$props3.strokeWidth;\n var startY = points[0].y;\n var endY = points[points.length - 1].y;\n var height = alpha * Math.abs(startY - endY);\n var maxX = max(points.map(function (entry) {\n return entry.x || 0;\n }));\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n maxX = Math.max(baseLine, maxX);\n } else if (baseLine && Array.isArray(baseLine) && baseLine.length) {\n maxX = Math.max(max(baseLine.map(function (entry) {\n return entry.x || 0;\n })), maxX);\n }\n if (isNumber(maxX)) {\n return /*#__PURE__*/React.createElement(\"rect\", {\n x: 0,\n y: startY < endY ? startY : startY - height,\n width: maxX + (strokeWidth ? parseInt(\"\".concat(strokeWidth), 10) : 1),\n height: Math.floor(height)\n });\n }\n return null;\n }\n }, {\n key: \"renderClipRect\",\n value: function renderClipRect(alpha) {\n var layout = this.props.layout;\n if (layout === 'vertical') {\n return this.renderVerticalRect(alpha);\n }\n return this.renderHorizontalRect(alpha);\n }\n }, {\n key: \"renderAreaStatically\",\n value: function renderAreaStatically(points, baseLine, needClip, clipPathId) {\n var _this$props4 = this.props,\n layout = _this$props4.layout,\n type = _this$props4.type,\n stroke = _this$props4.stroke,\n connectNulls = _this$props4.connectNulls,\n isRange = _this$props4.isRange,\n ref = _this$props4.ref,\n others = _objectWithoutProperties(_this$props4, _excluded);\n return /*#__PURE__*/React.createElement(Layer, {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipPathId, \")\") : null\n }, /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(others, true), {\n points: points,\n connectNulls: connectNulls,\n type: type,\n baseLine: baseLine,\n layout: layout,\n stroke: \"none\",\n className: \"recharts-area-area\"\n })), stroke !== 'none' && /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(this.props, false), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: points\n })), stroke !== 'none' && isRange && /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(this.props, false), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: baseLine\n })));\n }\n }, {\n key: \"renderAreaWithAnimation\",\n value: function renderAreaWithAnimation(needClip, clipPathId) {\n var _this2 = this;\n var _this$props5 = this.props,\n points = _this$props5.points,\n baseLine = _this$props5.baseLine,\n isAnimationActive = _this$props5.isAnimationActive,\n animationBegin = _this$props5.animationBegin,\n animationDuration = _this$props5.animationDuration,\n animationEasing = _this$props5.animationEasing,\n animationId = _this$props5.animationId;\n var _this$state = this.state,\n prevPoints = _this$state.prevPoints,\n prevBaseLine = _this$state.prevBaseLine;\n // const clipPathId = isNil(id) ? this.id : id;\n\n return /*#__PURE__*/React.createElement(Animate, {\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing,\n from: {\n t: 0\n },\n to: {\n t: 1\n },\n key: \"area-\".concat(animationId),\n onAnimationEnd: this.handleAnimationEnd,\n onAnimationStart: this.handleAnimationStart\n }, function (_ref) {\n var t = _ref.t;\n if (prevPoints) {\n var prevPointsDiffFactor = prevPoints.length / points.length;\n // update animtaion\n var stepPoints = points.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n if (prevPoints[prevPointIndex]) {\n var prev = prevPoints[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread(_objectSpread({}, entry), {}, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n return entry;\n });\n var stepBaseLine;\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n var interpolator = interpolateNumber(prevBaseLine, baseLine);\n stepBaseLine = interpolator(t);\n } else if (isNil(baseLine) || isNan(baseLine)) {\n var _interpolator = interpolateNumber(prevBaseLine, 0);\n stepBaseLine = _interpolator(t);\n } else {\n stepBaseLine = baseLine.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n if (prevBaseLine[prevPointIndex]) {\n var prev = prevBaseLine[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread(_objectSpread({}, entry), {}, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n return entry;\n });\n }\n return _this2.renderAreaStatically(stepPoints, stepBaseLine, needClip, clipPathId);\n }\n return /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"animationClipPath-\".concat(clipPathId)\n }, _this2.renderClipRect(t))), /*#__PURE__*/React.createElement(Layer, {\n clipPath: \"url(#animationClipPath-\".concat(clipPathId, \")\")\n }, _this2.renderAreaStatically(points, baseLine, needClip, clipPathId)));\n });\n }\n }, {\n key: \"renderArea\",\n value: function renderArea(needClip, clipPathId) {\n var _this$props6 = this.props,\n points = _this$props6.points,\n baseLine = _this$props6.baseLine,\n isAnimationActive = _this$props6.isAnimationActive;\n var _this$state2 = this.state,\n prevPoints = _this$state2.prevPoints,\n prevBaseLine = _this$state2.prevBaseLine,\n totalLength = _this$state2.totalLength;\n if (isAnimationActive && points && points.length && (!prevPoints && totalLength > 0 || !isEqual(prevPoints, points) || !isEqual(prevBaseLine, baseLine))) {\n return this.renderAreaWithAnimation(needClip, clipPathId);\n }\n return this.renderAreaStatically(points, baseLine, needClip, clipPathId);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _filterProps;\n var _this$props7 = this.props,\n hide = _this$props7.hide,\n dot = _this$props7.dot,\n points = _this$props7.points,\n className = _this$props7.className,\n top = _this$props7.top,\n left = _this$props7.left,\n xAxis = _this$props7.xAxis,\n yAxis = _this$props7.yAxis,\n width = _this$props7.width,\n height = _this$props7.height,\n isAnimationActive = _this$props7.isAnimationActive,\n id = _this$props7.id;\n if (hide || !points || !points.length) {\n return null;\n }\n var isAnimationFinished = this.state.isAnimationFinished;\n var hasSinglePoint = points.length === 1;\n var layerClass = clsx('recharts-area', className);\n var needClipX = xAxis && xAxis.allowDataOverflow;\n var needClipY = yAxis && yAxis.allowDataOverflow;\n var needClip = needClipX || needClipY;\n var clipPathId = isNil(id) ? this.id : id;\n var _ref2 = (_filterProps = filterProps(dot, false)) !== null && _filterProps !== void 0 ? _filterProps : {\n r: 3,\n strokeWidth: 2\n },\n _ref2$r = _ref2.r,\n r = _ref2$r === void 0 ? 3 : _ref2$r,\n _ref2$strokeWidth = _ref2.strokeWidth,\n strokeWidth = _ref2$strokeWidth === void 0 ? 2 : _ref2$strokeWidth;\n var _ref3 = hasClipDot(dot) ? dot : {},\n _ref3$clipDot = _ref3.clipDot,\n clipDot = _ref3$clipDot === void 0 ? true : _ref3$clipDot;\n var dotSize = r * 2 + strokeWidth;\n return /*#__PURE__*/React.createElement(Layer, {\n className: layerClass\n }, needClipX || needClipY ? /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clipPath-\".concat(clipPathId)\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: needClipX ? left : left - width / 2,\n y: needClipY ? top : top - height / 2,\n width: needClipX ? width : width * 2,\n height: needClipY ? height : height * 2\n })), !clipDot && /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clipPath-dots-\".concat(clipPathId)\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: left - dotSize / 2,\n y: top - dotSize / 2,\n width: width + dotSize,\n height: height + dotSize\n }))) : null, !hasSinglePoint ? this.renderArea(needClip, clipPathId) : null, (dot || hasSinglePoint) && this.renderDots(needClip, clipDot, clipPathId), (!isAnimationActive || isAnimationFinished) && LabelList.renderCallByParent(this.props, points));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.animationId !== prevState.prevAnimationId) {\n return {\n prevAnimationId: nextProps.animationId,\n curPoints: nextProps.points,\n curBaseLine: nextProps.baseLine,\n prevPoints: prevState.curPoints,\n prevBaseLine: prevState.curBaseLine\n };\n }\n if (nextProps.points !== prevState.curPoints || nextProps.baseLine !== prevState.curBaseLine) {\n return {\n curPoints: nextProps.points,\n curBaseLine: nextProps.baseLine\n };\n }\n return null;\n }\n }]);\n}(PureComponent);\n_Area = Area;\n_defineProperty(Area, \"displayName\", 'Area');\n_defineProperty(Area, \"defaultProps\", {\n stroke: '#3182bd',\n fill: '#3182bd',\n fillOpacity: 0.6,\n xAxisId: 0,\n yAxisId: 0,\n legendType: 'line',\n connectNulls: false,\n // points of area\n points: [],\n dot: false,\n activeDot: true,\n hide: false,\n isAnimationActive: !Global.isSsr,\n animationBegin: 0,\n animationDuration: 1500,\n animationEasing: 'ease'\n});\n_defineProperty(Area, \"getBaseValue\", function (props, item, xAxis, yAxis) {\n var layout = props.layout,\n chartBaseValue = props.baseValue;\n var itemBaseValue = item.props.baseValue;\n\n // The baseValue can be defined both on the AreaChart as well as on the Area.\n // The value for the item takes precedence.\n var baseValue = itemBaseValue !== null && itemBaseValue !== void 0 ? itemBaseValue : chartBaseValue;\n if (isNumber(baseValue) && typeof baseValue === 'number') {\n return baseValue;\n }\n var numericAxis = layout === 'horizontal' ? yAxis : xAxis;\n var domain = numericAxis.scale.domain();\n if (numericAxis.type === 'number') {\n var domainMax = Math.max(domain[0], domain[1]);\n var domainMin = Math.min(domain[0], domain[1]);\n if (baseValue === 'dataMin') {\n return domainMin;\n }\n if (baseValue === 'dataMax') {\n return domainMax;\n }\n return domainMax < 0 ? domainMax : Math.max(Math.min(domain[0], domain[1]), 0);\n }\n if (baseValue === 'dataMin') {\n return domain[0];\n }\n if (baseValue === 'dataMax') {\n return domain[1];\n }\n return domain[0];\n});\n_defineProperty(Area, \"getComposedData\", function (_ref4) {\n var props = _ref4.props,\n item = _ref4.item,\n xAxis = _ref4.xAxis,\n yAxis = _ref4.yAxis,\n xAxisTicks = _ref4.xAxisTicks,\n yAxisTicks = _ref4.yAxisTicks,\n bandSize = _ref4.bandSize,\n dataKey = _ref4.dataKey,\n stackedData = _ref4.stackedData,\n dataStartIndex = _ref4.dataStartIndex,\n displayedData = _ref4.displayedData,\n offset = _ref4.offset;\n var layout = props.layout;\n var hasStack = stackedData && stackedData.length;\n var baseValue = _Area.getBaseValue(props, item, xAxis, yAxis);\n var isHorizontalLayout = layout === 'horizontal';\n var isRange = false;\n var points = displayedData.map(function (entry, index) {\n var value;\n if (hasStack) {\n value = stackedData[dataStartIndex + index];\n } else {\n value = getValueByDataKey(entry, dataKey);\n if (!Array.isArray(value)) {\n value = [baseValue, value];\n } else {\n isRange = true;\n }\n }\n var isBreakPoint = value[1] == null || hasStack && getValueByDataKey(entry, dataKey) == null;\n if (isHorizontalLayout) {\n return {\n x: getCateCoordinateOfLine({\n axis: xAxis,\n ticks: xAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n y: isBreakPoint ? null : yAxis.scale(value[1]),\n value: value,\n payload: entry\n };\n }\n return {\n x: isBreakPoint ? null : xAxis.scale(value[1]),\n y: getCateCoordinateOfLine({\n axis: yAxis,\n ticks: yAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n value: value,\n payload: entry\n };\n });\n var baseLine;\n if (hasStack || isRange) {\n baseLine = points.map(function (entry) {\n var x = Array.isArray(entry.value) ? entry.value[0] : null;\n if (isHorizontalLayout) {\n return {\n x: entry.x,\n y: x != null && entry.y != null ? yAxis.scale(x) : null\n };\n }\n return {\n x: x != null ? xAxis.scale(x) : null,\n y: entry.y\n };\n });\n } else {\n baseLine = isHorizontalLayout ? yAxis.scale(baseValue) : xAxis.scale(baseValue);\n }\n return _objectSpread({\n points: points,\n baseLine: baseLine,\n layout: layout,\n isRange: isRange\n }, offset);\n});\n_defineProperty(Area, \"renderDotItem\", function (option, props) {\n var dotItem;\n if ( /*#__PURE__*/React.isValidElement(option)) {\n dotItem = /*#__PURE__*/React.cloneElement(option, props);\n } else if (isFunction(option)) {\n dotItem = option(props);\n } else {\n var className = clsx('recharts-area-dot', typeof option !== 'boolean' ? option.className : '');\n var key = props.key,\n rest = _objectWithoutProperties(props, _excluded2);\n dotItem = /*#__PURE__*/React.createElement(Dot, _extends({}, rest, {\n key: key,\n className: className\n }));\n }\n return dotItem;\n});","/**\n * @fileOverview Area Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Area } from '../cartesian/Area';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var AreaChart = generateCategoricalChart({\n chartName: 'AreaChart',\n GraphicalChild: Area,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});"],"names":["_excluded","_excluded2","_Area","_typeof","o","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","sourceSymbolKeys","_extends","ownKeys","r","t","_objectSpread","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","_callSuper","e","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","self","call","_assertThisInitialized","_inherits","subClass","superClass","_setPrototypeOf","p","obj","value","_toPrimitive","Area","_PureComponent","_this","_len","args","_key","uniqueId","onAnimationEnd","isFunction","onAnimationStart","needClip","clipDot","clipPathId","isAnimationActive","isAnimationFinished","_this$props","dot","points","dataKey","areaProps","filterProps","customDotProps","dots","entry","dotProps","dotsProps","React","Layer","alpha","_this$props2","baseLine","strokeWidth","startX","endX","width","maxY","max","isNumber","_this$props3","startY","endY","height","maxX","layout","_this$props4","type","stroke","connectNulls","isRange","others","Curve","_this2","_this$props5","animationBegin","animationDuration","animationEasing","animationId","_this$state","prevPoints","prevBaseLine","Animate","_ref","prevPointsDiffFactor","stepPoints","index","prevPointIndex","prev","interpolatorX","interpolateNumber","interpolatorY","stepBaseLine","interpolator","isNil","isNan","_interpolator","_this$props6","_this$state2","totalLength","isEqual","_filterProps","_this$props7","hide","className","top","left","xAxis","yAxis","id","hasSinglePoint","layerClass","clsx","needClipX","needClipY","_ref2","_ref2$r","_ref2$strokeWidth","_ref3","hasClipDot","_ref3$clipDot","dotSize","LabelList","nextProps","prevState","PureComponent","Global","item","chartBaseValue","itemBaseValue","baseValue","numericAxis","domain","domainMax","domainMin","_ref4","xAxisTicks","yAxisTicks","bandSize","stackedData","dataStartIndex","displayedData","offset","hasStack","isHorizontalLayout","getValueByDataKey","isBreakPoint","getCateCoordinateOfLine","x","option","dotItem","rest","Dot","AreaChart","generateCategoricalChart","XAxis","YAxis","formatAxisMap"],"mappings":"iRAAA,IAAIA,GAAY,CAAC,SAAU,OAAQ,SAAU,eAAgB,UAAW,KAAK,EAC3EC,GAAa,CAAC,KAAK,EACjBC,GACJ,SAASC,EAAQC,EAAG,CAAE,0BAA2B,OAAOD,EAAwB,OAAO,QAArB,YAA2C,OAAO,OAAO,UAA1B,SAAqC,SAAUC,EAAG,CAAE,OAAO,OAAOA,CAAG,EAAI,SAAUA,EAAG,CAAE,OAAOA,GAAmB,OAAO,QAArB,YAA+BA,EAAE,cAAgB,QAAUA,IAAM,OAAO,UAAY,SAAW,OAAOA,CAAG,EAAGD,EAAQC,CAAC,CAAG,CAC7T,SAASC,GAAyBC,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"file":"AreaChart-DRErPez1.js","sources":["../../node_modules/recharts/es6/cartesian/Area.js","../../node_modules/recharts/es6/chart/AreaChart.js"],"sourcesContent":["var _excluded = [\"layout\", \"type\", \"stroke\", \"connectNulls\", \"isRange\", \"ref\"],\n _excluded2 = [\"key\"];\nvar _Area;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/**\n * @fileOverview Area\n */\nimport React, { PureComponent } from 'react';\nimport clsx from 'clsx';\nimport Animate from 'react-smooth';\nimport isFunction from 'lodash/isFunction';\nimport max from 'lodash/max';\nimport isNil from 'lodash/isNil';\nimport isNan from 'lodash/isNaN';\nimport isEqual from 'lodash/isEqual';\nimport { Curve } from '../shape/Curve';\nimport { Dot } from '../shape/Dot';\nimport { Layer } from '../container/Layer';\nimport { LabelList } from '../component/LabelList';\nimport { Global } from '../util/Global';\nimport { isNumber, uniqueId, interpolateNumber } from '../util/DataUtils';\nimport { getCateCoordinateOfLine, getValueByDataKey } from '../util/ChartUtils';\nimport { filterProps, hasClipDot } from '../util/ReactUtils';\nexport var Area = /*#__PURE__*/function (_PureComponent) {\n function Area() {\n var _this;\n _classCallCheck(this, Area);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _callSuper(this, Area, [].concat(args));\n _defineProperty(_this, \"state\", {\n isAnimationFinished: true\n });\n _defineProperty(_this, \"id\", uniqueId('recharts-area-'));\n _defineProperty(_this, \"handleAnimationEnd\", function () {\n var onAnimationEnd = _this.props.onAnimationEnd;\n _this.setState({\n isAnimationFinished: true\n });\n if (isFunction(onAnimationEnd)) {\n onAnimationEnd();\n }\n });\n _defineProperty(_this, \"handleAnimationStart\", function () {\n var onAnimationStart = _this.props.onAnimationStart;\n _this.setState({\n isAnimationFinished: false\n });\n if (isFunction(onAnimationStart)) {\n onAnimationStart();\n }\n });\n return _this;\n }\n _inherits(Area, _PureComponent);\n return _createClass(Area, [{\n key: \"renderDots\",\n value: function renderDots(needClip, clipDot, clipPathId) {\n var isAnimationActive = this.props.isAnimationActive;\n var isAnimationFinished = this.state.isAnimationFinished;\n if (isAnimationActive && !isAnimationFinished) {\n return null;\n }\n var _this$props = this.props,\n dot = _this$props.dot,\n points = _this$props.points,\n dataKey = _this$props.dataKey;\n var areaProps = filterProps(this.props, false);\n var customDotProps = filterProps(dot, true);\n var dots = points.map(function (entry, i) {\n var dotProps = _objectSpread(_objectSpread(_objectSpread({\n key: \"dot-\".concat(i),\n r: 3\n }, areaProps), customDotProps), {}, {\n index: i,\n cx: entry.x,\n cy: entry.y,\n dataKey: dataKey,\n value: entry.value,\n payload: entry.payload,\n points: points\n });\n return Area.renderDotItem(dot, dotProps);\n });\n var dotsProps = {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipDot ? '' : 'dots-').concat(clipPathId, \")\") : null\n };\n return /*#__PURE__*/React.createElement(Layer, _extends({\n className: \"recharts-area-dots\"\n }, dotsProps), dots);\n }\n }, {\n key: \"renderHorizontalRect\",\n value: function renderHorizontalRect(alpha) {\n var _this$props2 = this.props,\n baseLine = _this$props2.baseLine,\n points = _this$props2.points,\n strokeWidth = _this$props2.strokeWidth;\n var startX = points[0].x;\n var endX = points[points.length - 1].x;\n var width = alpha * Math.abs(startX - endX);\n var maxY = max(points.map(function (entry) {\n return entry.y || 0;\n }));\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n maxY = Math.max(baseLine, maxY);\n } else if (baseLine && Array.isArray(baseLine) && baseLine.length) {\n maxY = Math.max(max(baseLine.map(function (entry) {\n return entry.y || 0;\n })), maxY);\n }\n if (isNumber(maxY)) {\n return /*#__PURE__*/React.createElement(\"rect\", {\n x: startX < endX ? startX : startX - width,\n y: 0,\n width: width,\n height: Math.floor(maxY + (strokeWidth ? parseInt(\"\".concat(strokeWidth), 10) : 1))\n });\n }\n return null;\n }\n }, {\n key: \"renderVerticalRect\",\n value: function renderVerticalRect(alpha) {\n var _this$props3 = this.props,\n baseLine = _this$props3.baseLine,\n points = _this$props3.points,\n strokeWidth = _this$props3.strokeWidth;\n var startY = points[0].y;\n var endY = points[points.length - 1].y;\n var height = alpha * Math.abs(startY - endY);\n var maxX = max(points.map(function (entry) {\n return entry.x || 0;\n }));\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n maxX = Math.max(baseLine, maxX);\n } else if (baseLine && Array.isArray(baseLine) && baseLine.length) {\n maxX = Math.max(max(baseLine.map(function (entry) {\n return entry.x || 0;\n })), maxX);\n }\n if (isNumber(maxX)) {\n return /*#__PURE__*/React.createElement(\"rect\", {\n x: 0,\n y: startY < endY ? startY : startY - height,\n width: maxX + (strokeWidth ? parseInt(\"\".concat(strokeWidth), 10) : 1),\n height: Math.floor(height)\n });\n }\n return null;\n }\n }, {\n key: \"renderClipRect\",\n value: function renderClipRect(alpha) {\n var layout = this.props.layout;\n if (layout === 'vertical') {\n return this.renderVerticalRect(alpha);\n }\n return this.renderHorizontalRect(alpha);\n }\n }, {\n key: \"renderAreaStatically\",\n value: function renderAreaStatically(points, baseLine, needClip, clipPathId) {\n var _this$props4 = this.props,\n layout = _this$props4.layout,\n type = _this$props4.type,\n stroke = _this$props4.stroke,\n connectNulls = _this$props4.connectNulls,\n isRange = _this$props4.isRange,\n ref = _this$props4.ref,\n others = _objectWithoutProperties(_this$props4, _excluded);\n return /*#__PURE__*/React.createElement(Layer, {\n clipPath: needClip ? \"url(#clipPath-\".concat(clipPathId, \")\") : null\n }, /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(others, true), {\n points: points,\n connectNulls: connectNulls,\n type: type,\n baseLine: baseLine,\n layout: layout,\n stroke: \"none\",\n className: \"recharts-area-area\"\n })), stroke !== 'none' && /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(this.props, false), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: points\n })), stroke !== 'none' && isRange && /*#__PURE__*/React.createElement(Curve, _extends({}, filterProps(this.props, false), {\n className: \"recharts-area-curve\",\n layout: layout,\n type: type,\n connectNulls: connectNulls,\n fill: \"none\",\n points: baseLine\n })));\n }\n }, {\n key: \"renderAreaWithAnimation\",\n value: function renderAreaWithAnimation(needClip, clipPathId) {\n var _this2 = this;\n var _this$props5 = this.props,\n points = _this$props5.points,\n baseLine = _this$props5.baseLine,\n isAnimationActive = _this$props5.isAnimationActive,\n animationBegin = _this$props5.animationBegin,\n animationDuration = _this$props5.animationDuration,\n animationEasing = _this$props5.animationEasing,\n animationId = _this$props5.animationId;\n var _this$state = this.state,\n prevPoints = _this$state.prevPoints,\n prevBaseLine = _this$state.prevBaseLine;\n // const clipPathId = isNil(id) ? this.id : id;\n\n return /*#__PURE__*/React.createElement(Animate, {\n begin: animationBegin,\n duration: animationDuration,\n isActive: isAnimationActive,\n easing: animationEasing,\n from: {\n t: 0\n },\n to: {\n t: 1\n },\n key: \"area-\".concat(animationId),\n onAnimationEnd: this.handleAnimationEnd,\n onAnimationStart: this.handleAnimationStart\n }, function (_ref) {\n var t = _ref.t;\n if (prevPoints) {\n var prevPointsDiffFactor = prevPoints.length / points.length;\n // update animtaion\n var stepPoints = points.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n if (prevPoints[prevPointIndex]) {\n var prev = prevPoints[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread(_objectSpread({}, entry), {}, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n return entry;\n });\n var stepBaseLine;\n if (isNumber(baseLine) && typeof baseLine === 'number') {\n var interpolator = interpolateNumber(prevBaseLine, baseLine);\n stepBaseLine = interpolator(t);\n } else if (isNil(baseLine) || isNan(baseLine)) {\n var _interpolator = interpolateNumber(prevBaseLine, 0);\n stepBaseLine = _interpolator(t);\n } else {\n stepBaseLine = baseLine.map(function (entry, index) {\n var prevPointIndex = Math.floor(index * prevPointsDiffFactor);\n if (prevBaseLine[prevPointIndex]) {\n var prev = prevBaseLine[prevPointIndex];\n var interpolatorX = interpolateNumber(prev.x, entry.x);\n var interpolatorY = interpolateNumber(prev.y, entry.y);\n return _objectSpread(_objectSpread({}, entry), {}, {\n x: interpolatorX(t),\n y: interpolatorY(t)\n });\n }\n return entry;\n });\n }\n return _this2.renderAreaStatically(stepPoints, stepBaseLine, needClip, clipPathId);\n }\n return /*#__PURE__*/React.createElement(Layer, null, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"animationClipPath-\".concat(clipPathId)\n }, _this2.renderClipRect(t))), /*#__PURE__*/React.createElement(Layer, {\n clipPath: \"url(#animationClipPath-\".concat(clipPathId, \")\")\n }, _this2.renderAreaStatically(points, baseLine, needClip, clipPathId)));\n });\n }\n }, {\n key: \"renderArea\",\n value: function renderArea(needClip, clipPathId) {\n var _this$props6 = this.props,\n points = _this$props6.points,\n baseLine = _this$props6.baseLine,\n isAnimationActive = _this$props6.isAnimationActive;\n var _this$state2 = this.state,\n prevPoints = _this$state2.prevPoints,\n prevBaseLine = _this$state2.prevBaseLine,\n totalLength = _this$state2.totalLength;\n if (isAnimationActive && points && points.length && (!prevPoints && totalLength > 0 || !isEqual(prevPoints, points) || !isEqual(prevBaseLine, baseLine))) {\n return this.renderAreaWithAnimation(needClip, clipPathId);\n }\n return this.renderAreaStatically(points, baseLine, needClip, clipPathId);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _filterProps;\n var _this$props7 = this.props,\n hide = _this$props7.hide,\n dot = _this$props7.dot,\n points = _this$props7.points,\n className = _this$props7.className,\n top = _this$props7.top,\n left = _this$props7.left,\n xAxis = _this$props7.xAxis,\n yAxis = _this$props7.yAxis,\n width = _this$props7.width,\n height = _this$props7.height,\n isAnimationActive = _this$props7.isAnimationActive,\n id = _this$props7.id;\n if (hide || !points || !points.length) {\n return null;\n }\n var isAnimationFinished = this.state.isAnimationFinished;\n var hasSinglePoint = points.length === 1;\n var layerClass = clsx('recharts-area', className);\n var needClipX = xAxis && xAxis.allowDataOverflow;\n var needClipY = yAxis && yAxis.allowDataOverflow;\n var needClip = needClipX || needClipY;\n var clipPathId = isNil(id) ? this.id : id;\n var _ref2 = (_filterProps = filterProps(dot, false)) !== null && _filterProps !== void 0 ? _filterProps : {\n r: 3,\n strokeWidth: 2\n },\n _ref2$r = _ref2.r,\n r = _ref2$r === void 0 ? 3 : _ref2$r,\n _ref2$strokeWidth = _ref2.strokeWidth,\n strokeWidth = _ref2$strokeWidth === void 0 ? 2 : _ref2$strokeWidth;\n var _ref3 = hasClipDot(dot) ? dot : {},\n _ref3$clipDot = _ref3.clipDot,\n clipDot = _ref3$clipDot === void 0 ? true : _ref3$clipDot;\n var dotSize = r * 2 + strokeWidth;\n return /*#__PURE__*/React.createElement(Layer, {\n className: layerClass\n }, needClipX || needClipY ? /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clipPath-\".concat(clipPathId)\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: needClipX ? left : left - width / 2,\n y: needClipY ? top : top - height / 2,\n width: needClipX ? width : width * 2,\n height: needClipY ? height : height * 2\n })), !clipDot && /*#__PURE__*/React.createElement(\"clipPath\", {\n id: \"clipPath-dots-\".concat(clipPathId)\n }, /*#__PURE__*/React.createElement(\"rect\", {\n x: left - dotSize / 2,\n y: top - dotSize / 2,\n width: width + dotSize,\n height: height + dotSize\n }))) : null, !hasSinglePoint ? this.renderArea(needClip, clipPathId) : null, (dot || hasSinglePoint) && this.renderDots(needClip, clipDot, clipPathId), (!isAnimationActive || isAnimationFinished) && LabelList.renderCallByParent(this.props, points));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.animationId !== prevState.prevAnimationId) {\n return {\n prevAnimationId: nextProps.animationId,\n curPoints: nextProps.points,\n curBaseLine: nextProps.baseLine,\n prevPoints: prevState.curPoints,\n prevBaseLine: prevState.curBaseLine\n };\n }\n if (nextProps.points !== prevState.curPoints || nextProps.baseLine !== prevState.curBaseLine) {\n return {\n curPoints: nextProps.points,\n curBaseLine: nextProps.baseLine\n };\n }\n return null;\n }\n }]);\n}(PureComponent);\n_Area = Area;\n_defineProperty(Area, \"displayName\", 'Area');\n_defineProperty(Area, \"defaultProps\", {\n stroke: '#3182bd',\n fill: '#3182bd',\n fillOpacity: 0.6,\n xAxisId: 0,\n yAxisId: 0,\n legendType: 'line',\n connectNulls: false,\n // points of area\n points: [],\n dot: false,\n activeDot: true,\n hide: false,\n isAnimationActive: !Global.isSsr,\n animationBegin: 0,\n animationDuration: 1500,\n animationEasing: 'ease'\n});\n_defineProperty(Area, \"getBaseValue\", function (props, item, xAxis, yAxis) {\n var layout = props.layout,\n chartBaseValue = props.baseValue;\n var itemBaseValue = item.props.baseValue;\n\n // The baseValue can be defined both on the AreaChart as well as on the Area.\n // The value for the item takes precedence.\n var baseValue = itemBaseValue !== null && itemBaseValue !== void 0 ? itemBaseValue : chartBaseValue;\n if (isNumber(baseValue) && typeof baseValue === 'number') {\n return baseValue;\n }\n var numericAxis = layout === 'horizontal' ? yAxis : xAxis;\n var domain = numericAxis.scale.domain();\n if (numericAxis.type === 'number') {\n var domainMax = Math.max(domain[0], domain[1]);\n var domainMin = Math.min(domain[0], domain[1]);\n if (baseValue === 'dataMin') {\n return domainMin;\n }\n if (baseValue === 'dataMax') {\n return domainMax;\n }\n return domainMax < 0 ? domainMax : Math.max(Math.min(domain[0], domain[1]), 0);\n }\n if (baseValue === 'dataMin') {\n return domain[0];\n }\n if (baseValue === 'dataMax') {\n return domain[1];\n }\n return domain[0];\n});\n_defineProperty(Area, \"getComposedData\", function (_ref4) {\n var props = _ref4.props,\n item = _ref4.item,\n xAxis = _ref4.xAxis,\n yAxis = _ref4.yAxis,\n xAxisTicks = _ref4.xAxisTicks,\n yAxisTicks = _ref4.yAxisTicks,\n bandSize = _ref4.bandSize,\n dataKey = _ref4.dataKey,\n stackedData = _ref4.stackedData,\n dataStartIndex = _ref4.dataStartIndex,\n displayedData = _ref4.displayedData,\n offset = _ref4.offset;\n var layout = props.layout;\n var hasStack = stackedData && stackedData.length;\n var baseValue = _Area.getBaseValue(props, item, xAxis, yAxis);\n var isHorizontalLayout = layout === 'horizontal';\n var isRange = false;\n var points = displayedData.map(function (entry, index) {\n var value;\n if (hasStack) {\n value = stackedData[dataStartIndex + index];\n } else {\n value = getValueByDataKey(entry, dataKey);\n if (!Array.isArray(value)) {\n value = [baseValue, value];\n } else {\n isRange = true;\n }\n }\n var isBreakPoint = value[1] == null || hasStack && getValueByDataKey(entry, dataKey) == null;\n if (isHorizontalLayout) {\n return {\n x: getCateCoordinateOfLine({\n axis: xAxis,\n ticks: xAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n y: isBreakPoint ? null : yAxis.scale(value[1]),\n value: value,\n payload: entry\n };\n }\n return {\n x: isBreakPoint ? null : xAxis.scale(value[1]),\n y: getCateCoordinateOfLine({\n axis: yAxis,\n ticks: yAxisTicks,\n bandSize: bandSize,\n entry: entry,\n index: index\n }),\n value: value,\n payload: entry\n };\n });\n var baseLine;\n if (hasStack || isRange) {\n baseLine = points.map(function (entry) {\n var x = Array.isArray(entry.value) ? entry.value[0] : null;\n if (isHorizontalLayout) {\n return {\n x: entry.x,\n y: x != null && entry.y != null ? yAxis.scale(x) : null\n };\n }\n return {\n x: x != null ? xAxis.scale(x) : null,\n y: entry.y\n };\n });\n } else {\n baseLine = isHorizontalLayout ? yAxis.scale(baseValue) : xAxis.scale(baseValue);\n }\n return _objectSpread({\n points: points,\n baseLine: baseLine,\n layout: layout,\n isRange: isRange\n }, offset);\n});\n_defineProperty(Area, \"renderDotItem\", function (option, props) {\n var dotItem;\n if ( /*#__PURE__*/React.isValidElement(option)) {\n dotItem = /*#__PURE__*/React.cloneElement(option, props);\n } else if (isFunction(option)) {\n dotItem = option(props);\n } else {\n var className = clsx('recharts-area-dot', typeof option !== 'boolean' ? option.className : '');\n var key = props.key,\n rest = _objectWithoutProperties(props, _excluded2);\n dotItem = /*#__PURE__*/React.createElement(Dot, _extends({}, rest, {\n key: key,\n className: className\n }));\n }\n return dotItem;\n});","/**\n * @fileOverview Area Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Area } from '../cartesian/Area';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var AreaChart = generateCategoricalChart({\n chartName: 'AreaChart',\n GraphicalChild: Area,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});"],"names":["_excluded","_excluded2","_Area","_typeof","o","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","key","i","sourceSymbolKeys","_extends","ownKeys","r","t","_objectSpread","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_toPropertyKey","_createClass","protoProps","staticProps","_callSuper","e","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","self","call","_assertThisInitialized","_inherits","subClass","superClass","_setPrototypeOf","p","obj","value","_toPrimitive","Area","_PureComponent","_this","_len","args","_key","uniqueId","onAnimationEnd","isFunction","onAnimationStart","needClip","clipDot","clipPathId","isAnimationActive","isAnimationFinished","_this$props","dot","points","dataKey","areaProps","filterProps","customDotProps","dots","entry","dotProps","dotsProps","React","Layer","alpha","_this$props2","baseLine","strokeWidth","startX","endX","width","maxY","max","isNumber","_this$props3","startY","endY","height","maxX","layout","_this$props4","type","stroke","connectNulls","isRange","others","Curve","_this2","_this$props5","animationBegin","animationDuration","animationEasing","animationId","_this$state","prevPoints","prevBaseLine","Animate","_ref","prevPointsDiffFactor","stepPoints","index","prevPointIndex","prev","interpolatorX","interpolateNumber","interpolatorY","stepBaseLine","interpolator","isNil","isNan","_interpolator","_this$props6","_this$state2","totalLength","isEqual","_filterProps","_this$props7","hide","className","top","left","xAxis","yAxis","id","hasSinglePoint","layerClass","clsx","needClipX","needClipY","_ref2","_ref2$r","_ref2$strokeWidth","_ref3","hasClipDot","_ref3$clipDot","dotSize","LabelList","nextProps","prevState","PureComponent","Global","item","chartBaseValue","itemBaseValue","baseValue","numericAxis","domain","domainMax","domainMin","_ref4","xAxisTicks","yAxisTicks","bandSize","stackedData","dataStartIndex","displayedData","offset","hasStack","isHorizontalLayout","getValueByDataKey","isBreakPoint","getCateCoordinateOfLine","x","option","dotItem","rest","Dot","AreaChart","generateCategoricalChart","XAxis","YAxis","formatAxisMap"],"mappings":"iRAAA,IAAIA,GAAY,CAAC,SAAU,OAAQ,SAAU,eAAgB,UAAW,KAAK,EAC3EC,GAAa,CAAC,KAAK,EACjBC,GACJ,SAASC,EAAQC,EAAG,CAAE,0BAA2B,OAAOD,EAAwB,OAAO,QAArB,YAA2C,OAAO,OAAO,UAA1B,SAAqC,SAAUC,EAAG,CAAE,OAAO,OAAOA,CAAG,EAAI,SAAUA,EAAG,CAAE,OAAOA,GAAmB,OAAO,QAArB,YAA+BA,EAAE,cAAgB,QAAUA,IAAM,OAAO,UAAY,SAAW,OAAOA,CAAG,EAAGD,EAAQC,CAAC,CAAG,CAC7T,SAASC,GAAyBC,EAAQC,EAAU,CAAE,GAAID,GAAU,KAAM,MAAO,CAAA,EAAI,IAAIE,EAASC,GAA8BH,EAAQC,CAAQ,EAAOG,EAAKC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EAAM,KAAK,EAAIA,EAAM,MAAM,CAAC,EAAI,KACtD,OAAImG,EACK,CACL,EAAGnG,EAAM,EACT,EAAGuG,GAAK,MAAQvG,EAAM,GAAK,KAAO+D,EAAM,MAAMwC,CAAC,EAAI,IAC7D,EAEa,CACL,EAAGA,GAAK,KAAOzC,EAAM,MAAMyC,CAAC,EAAI,KAChC,EAAGvG,EAAM,CACjB,CACI,CAAC,EAEDO,EAAW4F,EAAqBpC,EAAM,MAAMsB,CAAS,EAAIvB,EAAM,MAAMuB,CAAS,EAEzExI,EAAc,CACnB,OAAQ6C,EACR,SAAUa,EACV,OAAQa,EACR,QAASK,CACb,EAAKwE,CAAM,CACX,CAAC,EACDnJ,EAAgB2B,EAAM,gBAAiB,SAAU+H,EAAQrJ,EAAO,CAC9D,IAAIsJ,EACJ,GAAkBtG,EAAM,eAAeqG,CAAM,EAC3CC,EAAuBtG,EAAM,aAAaqG,EAAQrJ,CAAK,UAC9C8B,EAAWuH,CAAM,EAC1BC,EAAUD,EAAOrJ,CAAK,MACjB,CACL,IAAIwG,EAAYQ,GAAK,oBAAqB,OAAOqC,GAAW,UAAYA,EAAO,UAAY,EAAE,EACzFlK,EAAMa,EAAM,IACduJ,EAAOzK,GAAyBkB,EAAOtB,EAAU,EACnD4K,EAAuBtG,EAAM,cAAcwG,GAAKlK,EAAS,CAAA,EAAIiK,EAAM,CACjE,IAAKpK,EACL,UAAWqH,CACjB,CAAK,CAAC,CACJ,CACA,OAAO8C,CACT,CAAC,ECthBS,IAACG,GAAYC,GAAyB,CAC9C,UAAW,YACX,eAAgBpI,EAChB,eAAgB,CAAC,CACf,SAAU,QACV,SAAUqI,EACd,EAAK,CACD,SAAU,QACV,SAAUC,EACd,CAAG,EACD,cAAeC,EACjB,CAAC","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- import{g as a,L as e,X as i,Y as s,f as x,B as t}from"./generateCategoricalChart-mkdzCnMP.js";var p=a({chartName:"LineChart",GraphicalChild:e,axisComponents:[{axisType:"xAxis",AxisComp:i},{axisType:"yAxis",AxisComp:s}],formatAxisMap:x}),o=a({chartName:"BarChart",GraphicalChild:t,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:i},{axisType:"yAxis",AxisComp:s}],formatAxisMap:x});export{o as B,p as L};
2
- //# sourceMappingURL=BarChart-CzAVg1_J.js.map
1
+ import{g as a,L as e,X as i,Y as s,f as x,B as t}from"./generateCategoricalChart-CTQIl2qs.js";var p=a({chartName:"LineChart",GraphicalChild:e,axisComponents:[{axisType:"xAxis",AxisComp:i},{axisType:"yAxis",AxisComp:s}],formatAxisMap:x}),o=a({chartName:"BarChart",GraphicalChild:t,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:i},{axisType:"yAxis",AxisComp:s}],formatAxisMap:x});export{o as B,p as L};
2
+ //# sourceMappingURL=BarChart-Cwxel3M7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart-CzAVg1_J.js","sources":["../../node_modules/recharts/es6/chart/LineChart.js","../../node_modules/recharts/es6/chart/BarChart.js"],"sourcesContent":["/**\n * @fileOverview Line Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Line } from '../cartesian/Line';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var LineChart = generateCategoricalChart({\n chartName: 'LineChart',\n GraphicalChild: Line,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});","/**\n * @fileOverview Bar Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Bar } from '../cartesian/Bar';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var BarChart = generateCategoricalChart({\n chartName: 'BarChart',\n GraphicalChild: Bar,\n defaultTooltipEventType: 'axis',\n validateTooltipEventTypes: ['axis', 'item'],\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});"],"names":["LineChart","generateCategoricalChart","Line","XAxis","YAxis","formatAxisMap","BarChart","Bar"],"mappings":"8FAQU,IAACA,EAAYC,EAAyB,CAC9C,UAAW,YACX,eAAgBC,EAChB,eAAgB,CAAC,CACf,SAAU,QACV,SAAUC,CACd,EAAK,CACD,SAAU,QACV,SAAUC,CACd,CAAG,EACD,cAAeC,CACjB,CAAC,ECXUC,EAAWL,EAAyB,CAC7C,UAAW,WACX,eAAgBM,EAChB,wBAAyB,OACzB,0BAA2B,CAAC,OAAQ,MAAM,EAC1C,eAAgB,CAAC,CACf,SAAU,QACV,SAAUJ,CACd,EAAK,CACD,SAAU,QACV,SAAUC,CACd,CAAG,EACD,cAAeC,CACjB,CAAC","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"BarChart-Cwxel3M7.js","sources":["../../node_modules/recharts/es6/chart/LineChart.js","../../node_modules/recharts/es6/chart/BarChart.js"],"sourcesContent":["/**\n * @fileOverview Line Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Line } from '../cartesian/Line';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var LineChart = generateCategoricalChart({\n chartName: 'LineChart',\n GraphicalChild: Line,\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});","/**\n * @fileOverview Bar Chart\n */\nimport { generateCategoricalChart } from './generateCategoricalChart';\nimport { Bar } from '../cartesian/Bar';\nimport { XAxis } from '../cartesian/XAxis';\nimport { YAxis } from '../cartesian/YAxis';\nimport { formatAxisMap } from '../util/CartesianUtils';\nexport var BarChart = generateCategoricalChart({\n chartName: 'BarChart',\n GraphicalChild: Bar,\n defaultTooltipEventType: 'axis',\n validateTooltipEventTypes: ['axis', 'item'],\n axisComponents: [{\n axisType: 'xAxis',\n AxisComp: XAxis\n }, {\n axisType: 'yAxis',\n AxisComp: YAxis\n }],\n formatAxisMap: formatAxisMap\n});"],"names":["LineChart","generateCategoricalChart","Line","XAxis","YAxis","formatAxisMap","BarChart","Bar"],"mappings":"8FAQU,IAACA,EAAYC,EAAyB,CAC9C,UAAW,YACX,eAAgBC,EAChB,eAAgB,CAAC,CACf,SAAU,QACV,SAAUC,CACd,EAAK,CACD,SAAU,QACV,SAAUC,CACd,CAAG,EACD,cAAeC,CACjB,CAAC,ECXUC,EAAWL,EAAyB,CAC7C,UAAW,WACX,eAAgBM,EAChB,wBAAyB,OACzB,0BAA2B,CAAC,OAAQ,MAAM,EAC1C,eAAgB,CAAC,CACf,SAAU,QACV,SAAUJ,CACd,EAAK,CACD,SAAU,QACV,SAAUC,CACd,CAAG,EACD,cAAeC,CACjB,CAAC","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- import{j as e,r as h,u as j,A as L,D as $,z as H,l as M}from"./index-CtlmOlj1.js";import{C as I,T as k}from"./TimeSavedCard-DZ3QR8qt.js";import{b as m,c as u,d as w,e as W,f as d}from"./format-COjDIVGj.js";import{l as D}from"./pricing-DkYp8-vi.js";import{C as g,a as f,b as C,c as S}from"./card-D9F4wbqs.js";import{B as _}from"./button-BrVreSt5.js";function R(a){return a>=80?"ov-stat-value-green":a>=50?"ov-stat-value-yellow":"ov-stat-value-red"}function F(a){return a==null?"":a>=0?"ov-stat-value-green":"ov-stat-value-red"}function r({label:a,value:s,className:t,title:l}){return e.jsxs("div",{className:"flex items-baseline justify-between border-b border-border py-1 text-sm",children:[e.jsx("span",{className:"text-xs text-muted-foreground",title:l,children:a}),e.jsx("span",{className:`font-semibold${t?` ${t}`:""}`,children:s})]})}function O(a){return e.jsxs(g,{className:"electric-hover",children:[e.jsx(f,{children:e.jsx(C,{children:"Provider Prompt Cache"})}),e.jsxs(S,{children:[e.jsx(r,{label:"Cache Hit Rate",value:`${a.hitPct.toFixed(1)}%`,className:R(a.hitPct)}),e.jsx(r,{label:"Turns Recorded",value:String(a.turnCount)}),e.jsx(r,{label:"Cache Read Tokens",value:m(a.totalCacheRead)}),e.jsx(r,{label:"Cache Write Tokens",value:m(a.totalCacheWrite)}),e.jsx(r,{label:"Input Tokens",value:m(a.totalInput)}),e.jsx(r,{label:"$ Saved (reads)",value:u(a.cacheReadSaved)}),e.jsx(r,{label:"Write Investment",value:u(a.cacheWriteCost)}),e.jsx(r,{label:"Net Saved",value:u(a.netSaved),className:F(a.netSaved)}),e.jsx(r,{label:"Model",value:a.modelLabel??"—"}),e.jsx(r,{label:"Tracked Since",value:w(a.firstTurnAt)}),e.jsx(r,{label:"Last Updated",value:W(a.latestTurnAt)}),a.byModel.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 text-xs font-semibold text-muted-foreground",children:"Per Model"}),a.byModel.map(s=>{const t=D(s.model),l=t!=null?s.totalCacheRead/1e6*t:null,n=t!=null?s.totalCacheWrite/1e6*t:null;return e.jsxs("div",{className:"mt-2",children:[e.jsx(r,{label:"Model",value:s.model}),e.jsx(r,{label:"Hit Rate",value:`${s.hitPct.toFixed(1)}%`,className:R(s.hitPct)}),e.jsx(r,{label:"Cache Read",value:m(s.totalCacheRead)}),e.jsx(r,{label:"Cache Write",value:m(s.totalCacheWrite)}),e.jsx(r,{label:"Samples",value:String(s.sampleCount)}),e.jsx(r,{label:"$ Saved (reads)",value:l!=null?u(l):"—"}),e.jsx(r,{label:"Write Investment",value:n!=null?u(n):"—"})]},s.model)})]})]})]})}const G=["ov-bar-green","ov-bar-blue","ov-bar-teal","ov-bar-yellow","ov-bar-gray"],B=["Permanent","Epoch","Topic","Thread","Volatile"],z={good:"ov-text-green",fair:"ov-text-yellow",degraded:"ov-text-orange",poor:"ov-text-red"};function K({data:a}){const s=Math.max(...a.buckets.map(l=>l.count),1),t=z[a.health.label]??"ov-text-gray";return e.jsxs("div",{className:"ov-card",children:[e.jsx("h3",{className:"ov-card-title",children:"Cache Stripe Distribution"}),e.jsxs("div",{className:"ov-stripe-health-summary",children:[e.jsx("span",{className:`ov-stripe-health-badge ${t}`,children:a.health.label}),e.jsx("span",{className:"ov-stripe-health-score",children:d(a.health.score)}),e.jsxs("span",{className:"ov-stripe-churn",children:["Churn: ",d(a.health.churnRate)]}),e.jsxs("span",{className:"ov-stripe-total",children:[a.totalChunks," total chunks"]})]}),e.jsx("div",{className:"ov-stripe-bars",children:a.buckets.map(l=>{const n=s>0?Math.max(0,Math.min(100,l.count/s*100)):0,o=G[l.stripe]??"ov-bar-gray",c=l.label||(B[l.stripe]??`Stripe ${l.stripe}`);return e.jsxs("div",{className:"ov-stripe-row",children:[e.jsx("span",{className:"ov-stripe-label",title:c,children:c}),e.jsx("div",{className:"ov-bar-track",children:e.jsx("div",{className:`ov-bar-fill ${o}`,style:{width:`${n}%`}})}),e.jsx("span",{className:"ov-stripe-count",children:l.count}),e.jsx("span",{className:"ov-stripe-stability",title:`min ${d(l.minStability)} / max ${d(l.maxStability)}`,children:d(l.avgStability)})]},l.stripe)})}),e.jsxs("div",{className:"ov-stripe-footer",children:["Epoch: ",a.epochId??"—","· Dominant tier: ",d(a.health.dominantTier)]})]})}function x(a){return`${a.toFixed(1)}%`}function U(a){return a>=80?"ov-bar-green":a>=60?"ov-bar-teal":a>=40?"ov-bar-yellow":a>=20?"ov-bar-orange":"ov-bar-red"}const V=({perf:a})=>{const{cache_hit_pct:s}=a,t=s.samples&&s.samples.length>0?s.samples:[];return e.jsxs(g,{className:"electric-hover",children:[e.jsx(f,{children:e.jsx(C,{children:"Cache Hit-Rate Trend"})}),e.jsxs(S,{children:[e.jsxs("div",{className:"mb-3 flex gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{children:["Avg: ",e.jsx("strong",{className:"text-foreground",children:x(s.avg)})]}),e.jsxs("div",{children:["Latest: ",e.jsx("strong",{className:"text-foreground",children:x(s.latest)})]}),e.jsxs("div",{children:["Samples: ",e.jsx("strong",{className:"text-foreground",children:s.n})]})]}),t.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ov-sparkline",role:"img","aria-label":`Cache hit rate trend: ${s.n} samples, average ${x(s.avg)}, latest ${x(s.latest)}`,children:t.map((l,n)=>{const o=Math.max(2,Math.round(l.pct*.6)),c=U(l.pct),v=n===t.length-1;return e.jsx("div",{className:`ov-sparkline-bar ${c}${v?" ov-bar-latest":""}`,style:{height:`${o}px`},title:`${x(l.pct)} at ${new Date(l.ts).toLocaleTimeString()}`},n)})}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[t.length," sample",t.length!==1?"s":""," over"," ",t.length>1?`${Math.round((t[t.length-1].ts-t[0].ts)/1e3)}s`:"latest turn"]})]}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"No cache-hit samples yet"})]})]})};function ee(){const[a,s]=h.useState(!1),{data:t,loading:l,error:n}=j(h.useCallback(()=>L(),[]),{pollInterval:5e3}),{data:o,loading:c,error:v}=j(h.useCallback(()=>$(),[]),{pollInterval:15e3}),{data:N,loading:A,error:T}=j(h.useCallback(()=>H({minutes:30}),[]),{pollInterval:15e3}),{data:i,loading:E,error:y}=j(h.useCallback(()=>M(),[]),{pollInterval:5e3});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx(_,{type:"button",variant:"outline",onClick:()=>s(!a),children:a?"Hide Guidance":"Show Cache-Friendly Prompt Ordering Guidance"}),a&&e.jsxs(g,{className:"mt-3",children:[e.jsx(f,{children:e.jsx(C,{children:"Cache-Friendly Prompt Ordering"})}),e.jsxs(S,{children:[e.jsxs("ul",{className:"list-disc space-y-1 pl-5",children:[e.jsx("li",{children:"Keep system prompts and stable context at the top of your conversation — the provider caches the leading prefix."}),e.jsxs("li",{children:["Tool results and volatile content are automatically moved to the tail by message separation (",e.jsx("code",{children:"MEGACOMPACT_MESSAGE_SEPARATION"}),") so they don't invalidate the cache prefix."]}),e.jsxs("li",{children:["Cache striping (",e.jsx("code",{children:"MEGACOMPACT_CACHE_STRIPING"}),") further orders stable context by a stability score so the most durable chunks lead."]}),e.jsx("li",{children:"Avoid inserting new instructions mid-conversation — prepend them instead."})]}),i&&e.jsxs("div",{className:"mt-2 text-sm",children:[e.jsx("strong",{children:"Status:"})," ",i.config.auto?"Auto-compaction Enabled":"Auto-compaction Disabled"," |"," ","fast-gate ",i.config.fastGatePct,"% / threshold"," ",i.config.thresholdTokens.toLocaleString()," tokens"]})]})]})]}),e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Provider Prompt Cache"}),l?e.jsx("p",{className:"tab-stub",children:"Loading..."}):n?e.jsxs("p",{className:"tab-stub",children:["Provider cache unavailable: ",n.message]}):t?e.jsx(O,{hitPct:t.cache.avgHitPct,turnCount:t.cache.turnCount,totalCacheRead:t.cache.totalCacheRead,totalCacheWrite:t.cache.totalCacheWrite,totalInput:t.cache.totalInput,cacheReadSaved:t.savings?.cacheReadSaved??null,cacheWriteCost:t.savings?.cacheWriteCost??null,netSaved:t.savings?.netSaved??null,modelLabel:t.savings?.model??null,firstTurnAt:t.cache.firstTurnAt,latestTurnAt:t.cache.latestTurnAt,byModel:t.cache.byModel??[]}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Cache Stripe Distribution"}),c?e.jsx("p",{className:"tab-stub",children:"Loading..."}):v?e.jsxs("p",{className:"tab-stub",children:["Cache stripe data unavailable: ",v.message]}):o?e.jsx(K,{data:o}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Cache Hit-Rate Trend"}),A?e.jsx("p",{className:"tab-stub",children:"Loading..."}):T?e.jsxs("p",{className:"tab-stub",children:["Hit-rate trend unavailable: ",T.message]}):N?e.jsx(V,{perf:N}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Mega-Compact Dedup Cache"}),E?e.jsx("p",{className:"tab-stub",children:"Loading..."}):y?e.jsxs("p",{className:"tab-stub",children:["Snapshot unavailable: ",y.message]}):i&&(()=>{const{cacheHits:p,compacts:P,timeSaved:b}=i;return e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:[e.jsx(I,{cacheHitsSession:p.session,cacheHitsTotal:p.total,tokensSavedSession:p.sessionTokensSaved,tokensSavedTotal:p.totalTokensSaved,compactionsSession:P.session,compactionsTotal:P.total}),e.jsx(k,{compactSessionSec:b.compact.sessionSec,compactTotalSec:b.compact.totalSec,cacheHitSessionSec:b.cacheHit.sessionSec,cacheHitTotalSec:b.cacheHit.totalSec})]})})()]})}export{ee as default};
2
- //# sourceMappingURL=CacheTab-D2-rzTuX.js.map
1
+ import{j as e,r as h,u as j,A as L,D as $,z as H,l as M}from"./index-Bu8CZUMX.js";import{C as I,T as k}from"./TimeSavedCard-BFPJUQzs.js";import{b as m,c as u,d as w,e as W,f as d}from"./format-COjDIVGj.js";import{l as D}from"./pricing-DkYp8-vi.js";import{C as g,a as f,b as C,c as S}from"./card-CgjBf5LZ.js";import{B as _}from"./button-DJwGcw0u.js";function R(a){return a>=80?"ov-stat-value-green":a>=50?"ov-stat-value-yellow":"ov-stat-value-red"}function F(a){return a==null?"":a>=0?"ov-stat-value-green":"ov-stat-value-red"}function r({label:a,value:s,className:t,title:l}){return e.jsxs("div",{className:"flex items-baseline justify-between border-b border-border py-1 text-sm",children:[e.jsx("span",{className:"text-xs text-muted-foreground",title:l,children:a}),e.jsx("span",{className:`font-semibold${t?` ${t}`:""}`,children:s})]})}function O(a){return e.jsxs(g,{className:"electric-hover",children:[e.jsx(f,{children:e.jsx(C,{children:"Provider Prompt Cache"})}),e.jsxs(S,{children:[e.jsx(r,{label:"Cache Hit Rate",value:`${a.hitPct.toFixed(1)}%`,className:R(a.hitPct)}),e.jsx(r,{label:"Turns Recorded",value:String(a.turnCount)}),e.jsx(r,{label:"Cache Read Tokens",value:m(a.totalCacheRead)}),e.jsx(r,{label:"Cache Write Tokens",value:m(a.totalCacheWrite)}),e.jsx(r,{label:"Input Tokens",value:m(a.totalInput)}),e.jsx(r,{label:"$ Saved (reads)",value:u(a.cacheReadSaved)}),e.jsx(r,{label:"Write Investment",value:u(a.cacheWriteCost)}),e.jsx(r,{label:"Net Saved",value:u(a.netSaved),className:F(a.netSaved)}),e.jsx(r,{label:"Model",value:a.modelLabel??"—"}),e.jsx(r,{label:"Tracked Since",value:w(a.firstTurnAt)}),e.jsx(r,{label:"Last Updated",value:W(a.latestTurnAt)}),a.byModel.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 text-xs font-semibold text-muted-foreground",children:"Per Model"}),a.byModel.map(s=>{const t=D(s.model),l=t!=null?s.totalCacheRead/1e6*t:null,n=t!=null?s.totalCacheWrite/1e6*t:null;return e.jsxs("div",{className:"mt-2",children:[e.jsx(r,{label:"Model",value:s.model}),e.jsx(r,{label:"Hit Rate",value:`${s.hitPct.toFixed(1)}%`,className:R(s.hitPct)}),e.jsx(r,{label:"Cache Read",value:m(s.totalCacheRead)}),e.jsx(r,{label:"Cache Write",value:m(s.totalCacheWrite)}),e.jsx(r,{label:"Samples",value:String(s.sampleCount)}),e.jsx(r,{label:"$ Saved (reads)",value:l!=null?u(l):"—"}),e.jsx(r,{label:"Write Investment",value:n!=null?u(n):"—"})]},s.model)})]})]})]})}const G=["ov-bar-green","ov-bar-blue","ov-bar-teal","ov-bar-yellow","ov-bar-gray"],B=["Permanent","Epoch","Topic","Thread","Volatile"],z={good:"ov-text-green",fair:"ov-text-yellow",degraded:"ov-text-orange",poor:"ov-text-red"};function K({data:a}){const s=Math.max(...a.buckets.map(l=>l.count),1),t=z[a.health.label]??"ov-text-gray";return e.jsxs("div",{className:"ov-card",children:[e.jsx("h3",{className:"ov-card-title",children:"Cache Stripe Distribution"}),e.jsxs("div",{className:"ov-stripe-health-summary",children:[e.jsx("span",{className:`ov-stripe-health-badge ${t}`,children:a.health.label}),e.jsx("span",{className:"ov-stripe-health-score",children:d(a.health.score)}),e.jsxs("span",{className:"ov-stripe-churn",children:["Churn: ",d(a.health.churnRate)]}),e.jsxs("span",{className:"ov-stripe-total",children:[a.totalChunks," total chunks"]})]}),e.jsx("div",{className:"ov-stripe-bars",children:a.buckets.map(l=>{const n=s>0?Math.max(0,Math.min(100,l.count/s*100)):0,o=G[l.stripe]??"ov-bar-gray",c=l.label||(B[l.stripe]??`Stripe ${l.stripe}`);return e.jsxs("div",{className:"ov-stripe-row",children:[e.jsx("span",{className:"ov-stripe-label",title:c,children:c}),e.jsx("div",{className:"ov-bar-track",children:e.jsx("div",{className:`ov-bar-fill ${o}`,style:{width:`${n}%`}})}),e.jsx("span",{className:"ov-stripe-count",children:l.count}),e.jsx("span",{className:"ov-stripe-stability",title:`min ${d(l.minStability)} / max ${d(l.maxStability)}`,children:d(l.avgStability)})]},l.stripe)})}),e.jsxs("div",{className:"ov-stripe-footer",children:["Epoch: ",a.epochId??"—","· Dominant tier: ",d(a.health.dominantTier)]})]})}function x(a){return`${a.toFixed(1)}%`}function U(a){return a>=80?"ov-bar-green":a>=60?"ov-bar-teal":a>=40?"ov-bar-yellow":a>=20?"ov-bar-orange":"ov-bar-red"}const V=({perf:a})=>{const{cache_hit_pct:s}=a,t=s.samples&&s.samples.length>0?s.samples:[];return e.jsxs(g,{className:"electric-hover",children:[e.jsx(f,{children:e.jsx(C,{children:"Cache Hit-Rate Trend"})}),e.jsxs(S,{children:[e.jsxs("div",{className:"mb-3 flex gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{children:["Avg: ",e.jsx("strong",{className:"text-foreground",children:x(s.avg)})]}),e.jsxs("div",{children:["Latest: ",e.jsx("strong",{className:"text-foreground",children:x(s.latest)})]}),e.jsxs("div",{children:["Samples: ",e.jsx("strong",{className:"text-foreground",children:s.n})]})]}),t.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ov-sparkline",role:"img","aria-label":`Cache hit rate trend: ${s.n} samples, average ${x(s.avg)}, latest ${x(s.latest)}`,children:t.map((l,n)=>{const o=Math.max(2,Math.round(l.pct*.6)),c=U(l.pct),v=n===t.length-1;return e.jsx("div",{className:`ov-sparkline-bar ${c}${v?" ov-bar-latest":""}`,style:{height:`${o}px`},title:`${x(l.pct)} at ${new Date(l.ts).toLocaleTimeString()}`},n)})}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[t.length," sample",t.length!==1?"s":""," over"," ",t.length>1?`${Math.round((t[t.length-1].ts-t[0].ts)/1e3)}s`:"latest turn"]})]}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"No cache-hit samples yet"})]})]})};function ee(){const[a,s]=h.useState(!1),{data:t,loading:l,error:n}=j(h.useCallback(()=>L(),[]),{pollInterval:5e3}),{data:o,loading:c,error:v}=j(h.useCallback(()=>$(),[]),{pollInterval:15e3}),{data:N,loading:A,error:T}=j(h.useCallback(()=>H({minutes:30}),[]),{pollInterval:15e3}),{data:i,loading:E,error:y}=j(h.useCallback(()=>M(),[]),{pollInterval:5e3});return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx(_,{type:"button",variant:"outline",onClick:()=>s(!a),children:a?"Hide Guidance":"Show Cache-Friendly Prompt Ordering Guidance"}),a&&e.jsxs(g,{className:"mt-3",children:[e.jsx(f,{children:e.jsx(C,{children:"Cache-Friendly Prompt Ordering"})}),e.jsxs(S,{children:[e.jsxs("ul",{className:"list-disc space-y-1 pl-5",children:[e.jsx("li",{children:"Keep system prompts and stable context at the top of your conversation — the provider caches the leading prefix."}),e.jsxs("li",{children:["Tool results and volatile content are automatically moved to the tail by message separation (",e.jsx("code",{children:"MEGACOMPACT_MESSAGE_SEPARATION"}),") so they don't invalidate the cache prefix."]}),e.jsxs("li",{children:["Cache striping (",e.jsx("code",{children:"MEGACOMPACT_CACHE_STRIPING"}),") further orders stable context by a stability score so the most durable chunks lead."]}),e.jsx("li",{children:"Avoid inserting new instructions mid-conversation — prepend them instead."})]}),i&&e.jsxs("div",{className:"mt-2 text-sm",children:[e.jsx("strong",{children:"Status:"})," ",i.config.auto?"Auto-compaction Enabled":"Auto-compaction Disabled"," |"," ","fast-gate ",i.config.fastGatePct,"% / threshold"," ",i.config.thresholdTokens.toLocaleString()," tokens"]})]})]})]}),e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Provider Prompt Cache"}),l?e.jsx("p",{className:"tab-stub",children:"Loading..."}):n?e.jsxs("p",{className:"tab-stub",children:["Provider cache unavailable: ",n.message]}):t?e.jsx(O,{hitPct:t.cache.avgHitPct,turnCount:t.cache.turnCount,totalCacheRead:t.cache.totalCacheRead,totalCacheWrite:t.cache.totalCacheWrite,totalInput:t.cache.totalInput,cacheReadSaved:t.savings?.cacheReadSaved??null,cacheWriteCost:t.savings?.cacheWriteCost??null,netSaved:t.savings?.netSaved??null,modelLabel:t.savings?.model??null,firstTurnAt:t.cache.firstTurnAt,latestTurnAt:t.cache.latestTurnAt,byModel:t.cache.byModel??[]}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Cache Stripe Distribution"}),c?e.jsx("p",{className:"tab-stub",children:"Loading..."}):v?e.jsxs("p",{className:"tab-stub",children:["Cache stripe data unavailable: ",v.message]}):o?e.jsx(K,{data:o}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Cache Hit-Rate Trend"}),A?e.jsx("p",{className:"tab-stub",children:"Loading..."}):T?e.jsxs("p",{className:"tab-stub",children:["Hit-rate trend unavailable: ",T.message]}):N?e.jsx(V,{perf:N}):null,e.jsx("h2",{className:"font-heading text-lg font-semibold",children:"Mega-Compact Dedup Cache"}),E?e.jsx("p",{className:"tab-stub",children:"Loading..."}):y?e.jsxs("p",{className:"tab-stub",children:["Snapshot unavailable: ",y.message]}):i&&(()=>{const{cacheHits:p,compacts:P,timeSaved:b}=i;return e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:[e.jsx(I,{cacheHitsSession:p.session,cacheHitsTotal:p.total,tokensSavedSession:p.sessionTokensSaved,tokensSavedTotal:p.totalTokensSaved,compactionsSession:P.session,compactionsTotal:P.total}),e.jsx(k,{compactSessionSec:b.compact.sessionSec,compactTotalSec:b.compact.totalSec,cacheHitSessionSec:b.cacheHit.sessionSec,cacheHitTotalSec:b.cacheHit.totalSec})]})})()]})}export{ee as default};
2
+ //# sourceMappingURL=CacheTab-D4j3vwFu.js.map