@datatechsolutions/ui 2.11.93 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/astrlabe/contracts.d.mts +3 -3
  2. package/dist/astrlabe/contracts.d.ts +3 -3
  3. package/dist/astrlabe/index.js +108 -108
  4. package/dist/astrlabe/index.mjs +4 -4
  5. package/dist/astrlabe/workflow-canvas.js +4 -4
  6. package/dist/astrlabe/workflow-canvas.mjs +3 -3
  7. package/dist/brand/index.d.mts +1 -15
  8. package/dist/brand/index.d.ts +1 -15
  9. package/dist/brand/index.js +0 -14
  10. package/dist/brand/index.js.map +1 -1
  11. package/dist/brand/index.mjs +0 -14
  12. package/dist/brand/index.mjs.map +1 -1
  13. package/dist/{chunk-24QKSC74.js → chunk-3JJWPOK6.js} +6 -6
  14. package/dist/{chunk-24QKSC74.js.map → chunk-3JJWPOK6.js.map} +1 -1
  15. package/dist/{chunk-HGN5W56D.mjs → chunk-3ZUMJTDT.mjs} +3 -3
  16. package/dist/{chunk-HGN5W56D.mjs.map → chunk-3ZUMJTDT.mjs.map} +1 -1
  17. package/dist/{chunk-LKJZGFM4.mjs → chunk-5GDKCFM5.mjs} +3 -3
  18. package/dist/{chunk-LKJZGFM4.mjs.map → chunk-5GDKCFM5.mjs.map} +1 -1
  19. package/dist/{chunk-ZHUPYX4Q.mjs → chunk-5RM6NGZ6.mjs} +3 -3
  20. package/dist/{chunk-ZHUPYX4Q.mjs.map → chunk-5RM6NGZ6.mjs.map} +1 -1
  21. package/dist/{chunk-DB64YDV2.js → chunk-AOUUZ52N.js} +55 -55
  22. package/dist/{chunk-DB64YDV2.js.map → chunk-AOUUZ52N.js.map} +1 -1
  23. package/dist/{chunk-VGSWSQQU.mjs → chunk-B67DP7MI.mjs} +4 -4
  24. package/dist/{chunk-VGSWSQQU.mjs.map → chunk-B67DP7MI.mjs.map} +1 -1
  25. package/dist/{chunk-NYQAEPC7.js → chunk-EFOXN3LC.js} +159 -168
  26. package/dist/chunk-EFOXN3LC.js.map +1 -0
  27. package/dist/{chunk-ARVLVWUC.js → chunk-F54Q2YJY.js} +97 -15
  28. package/dist/chunk-F54Q2YJY.js.map +1 -0
  29. package/dist/{chunk-GMZ3PTNK.mjs → chunk-H2D2CRTD.mjs} +7 -7
  30. package/dist/{chunk-GMZ3PTNK.mjs.map → chunk-H2D2CRTD.mjs.map} +1 -1
  31. package/dist/{chunk-PTGPQJZJ.js → chunk-HDCUWUNH.js} +15 -15
  32. package/dist/{chunk-PTGPQJZJ.js.map → chunk-HDCUWUNH.js.map} +1 -1
  33. package/dist/{chunk-ZKUYNCAG.js → chunk-I2NZGVBG.js} +1595 -2140
  34. package/dist/chunk-I2NZGVBG.js.map +1 -0
  35. package/dist/{chunk-MLAXYDEU.mjs → chunk-IRPS5UCS.mjs} +3 -3
  36. package/dist/{chunk-MLAXYDEU.mjs.map → chunk-IRPS5UCS.mjs.map} +1 -1
  37. package/dist/{chunk-TEQYIK2B.mjs → chunk-IRT4T3CU.mjs} +92 -101
  38. package/dist/chunk-IRT4T3CU.mjs.map +1 -0
  39. package/dist/{chunk-A3BFURJB.mjs → chunk-JN6IL6OH.mjs} +1595 -2138
  40. package/dist/chunk-JN6IL6OH.mjs.map +1 -0
  41. package/dist/{chunk-NA57KK4O.js → chunk-JSNRCYSO.js} +4 -4
  42. package/dist/{chunk-NA57KK4O.js.map → chunk-JSNRCYSO.js.map} +1 -1
  43. package/dist/{chunk-XSBZNPUO.js → chunk-KR2X2WHJ.js} +53 -53
  44. package/dist/{chunk-XSBZNPUO.js.map → chunk-KR2X2WHJ.js.map} +1 -1
  45. package/dist/{chunk-YEWXDCCI.mjs → chunk-LEKZUS6N.mjs} +4 -4
  46. package/dist/{chunk-YEWXDCCI.mjs.map → chunk-LEKZUS6N.mjs.map} +1 -1
  47. package/dist/{chunk-6NAZVG2O.mjs → chunk-MVBIAXVN.mjs} +4 -4
  48. package/dist/{chunk-6NAZVG2O.mjs.map → chunk-MVBIAXVN.mjs.map} +1 -1
  49. package/dist/{chunk-4TY55HGO.mjs → chunk-OL73LBX5.mjs} +3 -3
  50. package/dist/{chunk-4TY55HGO.mjs.map → chunk-OL73LBX5.mjs.map} +1 -1
  51. package/dist/{chunk-HUGHELRM.mjs → chunk-QYA53LUF.mjs} +6 -6
  52. package/dist/chunk-QYA53LUF.mjs.map +1 -0
  53. package/dist/{chunk-DWFLIXES.mjs → chunk-R4TQWXNG.mjs} +3 -3
  54. package/dist/{chunk-DWFLIXES.mjs.map → chunk-R4TQWXNG.mjs.map} +1 -1
  55. package/dist/{chunk-SMKN4ZVB.js → chunk-RGI74SQH.js} +4 -4
  56. package/dist/{chunk-SMKN4ZVB.js.map → chunk-RGI74SQH.js.map} +1 -1
  57. package/dist/{chunk-FZTOP6EE.js → chunk-RL35XATZ.js} +141 -141
  58. package/dist/chunk-RL35XATZ.js.map +1 -0
  59. package/dist/{chunk-BUI7BCUN.js → chunk-RXZNACMI.js} +33 -33
  60. package/dist/{chunk-BUI7BCUN.js.map → chunk-RXZNACMI.js.map} +1 -1
  61. package/dist/{chunk-ST3GH5OM.js → chunk-SU3YPWFW.js} +26 -26
  62. package/dist/{chunk-ST3GH5OM.js.map → chunk-SU3YPWFW.js.map} +1 -1
  63. package/dist/{chunk-DIMLLLZR.js → chunk-TIJJHW2Z.js} +36 -36
  64. package/dist/{chunk-DIMLLLZR.js.map → chunk-TIJJHW2Z.js.map} +1 -1
  65. package/dist/{chunk-2RDGJXYZ.js → chunk-TVMLV675.js} +67 -67
  66. package/dist/{chunk-2RDGJXYZ.js.map → chunk-TVMLV675.js.map} +1 -1
  67. package/dist/{chunk-Y3WJAYOY.mjs → chunk-UDDZTTLO.mjs} +6 -6
  68. package/dist/chunk-UDDZTTLO.mjs.map +1 -0
  69. package/dist/{chunk-43GCSCQA.js → chunk-W5OEBO6E.js} +12 -12
  70. package/dist/chunk-W5OEBO6E.js.map +1 -0
  71. package/dist/{chunk-3Z366CVM.js → chunk-Y6AEE56Q.js} +67 -67
  72. package/dist/{chunk-3Z366CVM.js.map → chunk-Y6AEE56Q.js.map} +1 -1
  73. package/dist/{chunk-RXFAQFE7.mjs → chunk-YIB2YAM5.mjs} +3 -3
  74. package/dist/{chunk-RXFAQFE7.mjs.map → chunk-YIB2YAM5.mjs.map} +1 -1
  75. package/dist/{chunk-OLXOBT42.mjs → chunk-YV72JM4B.mjs} +4 -4
  76. package/dist/{chunk-OLXOBT42.mjs.map → chunk-YV72JM4B.mjs.map} +1 -1
  77. package/dist/{chunk-MEEFOZC4.js → chunk-ZM5MVWIT.js} +4 -4
  78. package/dist/{chunk-MEEFOZC4.js.map → chunk-ZM5MVWIT.js.map} +1 -1
  79. package/dist/{chunk-PU2KTO4O.mjs → chunk-ZV5EZXXO.mjs} +97 -15
  80. package/dist/chunk-ZV5EZXXO.mjs.map +1 -0
  81. package/dist/index.d.mts +8 -41
  82. package/dist/index.d.ts +8 -41
  83. package/dist/index.js +745 -753
  84. package/dist/index.mjs +2 -2
  85. package/dist/platform/admin/index.js +11 -11
  86. package/dist/platform/admin/index.mjs +5 -5
  87. package/dist/platform/agents-workspace.js +7 -7
  88. package/dist/platform/agents-workspace.mjs +6 -6
  89. package/dist/platform/app-shell.js +4 -4
  90. package/dist/platform/app-shell.mjs +3 -3
  91. package/dist/platform/auth/index.js +28 -28
  92. package/dist/platform/auth/index.mjs +5 -5
  93. package/dist/platform/billing/index.js +4 -4
  94. package/dist/platform/billing/index.mjs +3 -3
  95. package/dist/platform/impersonation/index.js +4 -4
  96. package/dist/platform/impersonation/index.mjs +3 -3
  97. package/dist/platform/index.d.mts +1 -1
  98. package/dist/platform/index.d.ts +1 -1
  99. package/dist/platform/index.js +99 -99
  100. package/dist/platform/index.js.map +1 -1
  101. package/dist/platform/index.mjs +19 -19
  102. package/dist/platform/index.mjs.map +1 -1
  103. package/dist/platform/pages/index.d.mts +4 -5
  104. package/dist/platform/pages/index.d.ts +4 -5
  105. package/dist/platform/pages/index.js +197 -197
  106. package/dist/platform/pages/index.js.map +1 -1
  107. package/dist/platform/pages/index.mjs +9 -9
  108. package/dist/platform/pages/index.mjs.map +1 -1
  109. package/dist/platform/settings/index.js +8 -8
  110. package/dist/platform/settings/index.mjs +7 -7
  111. package/dist/platform/telemetry/index.d.mts +42 -0
  112. package/dist/platform/telemetry/index.d.ts +42 -0
  113. package/dist/platform/telemetry/index.js +75 -0
  114. package/dist/platform/telemetry/index.js.map +1 -0
  115. package/dist/platform/telemetry/index.mjs +68 -0
  116. package/dist/platform/telemetry/index.mjs.map +1 -0
  117. package/dist/platform/workflow-api-client.d.mts +1 -1
  118. package/dist/platform/workflow-api-client.d.ts +1 -1
  119. package/dist/platform/workflow-api-client.js +61 -61
  120. package/dist/platform/workflow-api-client.mjs +1 -1
  121. package/dist/platform/workflow-canvas-shell.js +5 -5
  122. package/dist/platform/workflow-canvas-shell.mjs +4 -4
  123. package/dist/{workflow-api-client-DVLhcpUj.d.ts → workflow-api-client-BKD8OfP_.d.ts} +61 -30
  124. package/dist/{workflow-api-client-DpBxHTHr.d.mts → workflow-api-client-DoYj7nHz.d.mts} +61 -30
  125. package/package.json +7 -1
  126. package/dist/chunk-43GCSCQA.js.map +0 -1
  127. package/dist/chunk-A3BFURJB.mjs.map +0 -1
  128. package/dist/chunk-ARVLVWUC.js.map +0 -1
  129. package/dist/chunk-FZTOP6EE.js.map +0 -1
  130. package/dist/chunk-HUGHELRM.mjs.map +0 -1
  131. package/dist/chunk-NYQAEPC7.js.map +0 -1
  132. package/dist/chunk-PU2KTO4O.mjs.map +0 -1
  133. package/dist/chunk-TEQYIK2B.mjs.map +0 -1
  134. package/dist/chunk-Y3WJAYOY.mjs.map +0 -1
  135. package/dist/chunk-ZKUYNCAG.js.map +0 -1
  136. package/src/brand/logos/fuel-icon.svg +0 -32
  137. package/src/brand/logos/fuel-logo-dark.svg +0 -43
  138. package/src/brand/logos/fuel-logo.svg +0 -43
@@ -2,7 +2,7 @@
2
2
  import { triggerHaptic } from './chunk-D2JF6C3E.mjs';
3
3
  import { useTranslations, useLocale } from './chunk-7VJ7CMMT.mjs';
4
4
  import { useLink, useRouter, usePathname } from './chunk-QWG2FMUN.mjs';
5
- import { subscribeToRunEvents, submitApproval } from './chunk-PU2KTO4O.mjs';
5
+ import { subscribeToRunEvents, submitApproval } from './chunk-ZV5EZXXO.mjs';
6
6
  import * as Headless6 from '@headlessui/react';
7
7
  import { Button as Button$1, Transition, Dialog, TransitionChild, DialogPanel, DialogTitle, DialogBackdrop, Menu, MenuButton, MenuItems, MenuItem } from '@headlessui/react';
8
8
  import clsx, { clsx as clsx$1 } from 'clsx';
@@ -13,15 +13,15 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
  import { ChevronDownIcon, CheckCircleIcon, EyeSlashIcon, EyeIcon, XMarkIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, EllipsisVerticalIcon, ClipboardDocumentIcon as ClipboardDocumentIcon$1, ArrowDownTrayIcon } from '@heroicons/react/20/solid';
14
14
  import { CheckIcon as CheckIcon$1 } from '@heroicons/react/24/solid';
15
15
  import * as HeroIcons from '@heroicons/react/24/outline';
16
- import { PlusIcon, MinusIcon, ShoppingCartIcon, BanknotesIcon, MegaphoneIcon, CubeIcon, UsersIcon, DocumentTextIcon, ShieldCheckIcon, CheckCircleIcon as CheckCircleIcon$1, RocketLaunchIcon, HandThumbUpIcon, AdjustmentsHorizontalIcon, TableCellsIcon, MapIcon, XMarkIcon as XMarkIcon$1, ClockIcon, BuildingStorefrontIcon, MagnifyingGlassIcon, InformationCircleIcon, ArrowTrendingUpIcon, ArrowTrendingDownIcon, ChevronUpIcon, ChevronDownIcon as ChevronDownIcon$1, ChevronUpDownIcon, DocumentMagnifyingGlassIcon, ShieldExclamationIcon, ServerStackIcon, WifiIcon, ExclamationTriangleIcon, ArrowPathIcon, FolderOpenIcon, BellIcon, TrashIcon, ExclamationCircleIcon, CheckIcon as CheckIcon$2, ClipboardDocumentCheckIcon, ClipboardDocumentIcon, CalendarDaysIcon, ChevronLeftIcon as ChevronLeftIcon$1, ChevronRightIcon as ChevronRightIcon$1, FunnelIcon, CameraIcon, ArrowUpTrayIcon, BeakerIcon, GlobeAltIcon, WrenchScrewdriverIcon, EyeDropperIcon, MoonIcon as MoonIcon$1, SunIcon as SunIcon$1, UserCircleIcon, ArrowRightOnRectangleIcon, LanguageIcon, PlayIcon, StopIcon, SparklesIcon, CpuChipIcon, XCircleIcon, LockClosedIcon, EnvelopeIcon, ChatBubbleLeftIcon, TrophyIcon, CogIcon, ChartBarIcon, HomeIcon, Cog6ToothIcon, UserIcon, BoltIcon, Squares2X2Icon, PlusCircleIcon, CloudIcon, NewspaperIcon, CommandLineIcon, RectangleStackIcon, CodeBracketIcon, CircleStackIcon } from '@heroicons/react/24/outline';
16
+ import { PlusIcon, MinusIcon, ShoppingCartIcon, BanknotesIcon, MegaphoneIcon, CubeIcon, UsersIcon, DocumentTextIcon, ShieldCheckIcon, CheckCircleIcon as CheckCircleIcon$1, RocketLaunchIcon, HandThumbUpIcon, AdjustmentsHorizontalIcon, TableCellsIcon, MapIcon, XMarkIcon as XMarkIcon$1, ClockIcon, BuildingStorefrontIcon, MagnifyingGlassIcon, InformationCircleIcon, ArrowTrendingUpIcon, ArrowTrendingDownIcon, ChevronUpIcon, ChevronDownIcon as ChevronDownIcon$1, ChevronUpDownIcon, DocumentMagnifyingGlassIcon, ShieldExclamationIcon, ServerStackIcon, WifiIcon, ExclamationTriangleIcon, ArrowPathIcon, FolderOpenIcon, BellIcon, TrashIcon, ExclamationCircleIcon, CheckIcon as CheckIcon$2, ClipboardDocumentCheckIcon, ClipboardDocumentIcon, CalendarDaysIcon, ChevronLeftIcon as ChevronLeftIcon$1, ChevronRightIcon as ChevronRightIcon$1, FunnelIcon, CameraIcon, ArrowUpTrayIcon, BeakerIcon, GlobeAltIcon, WrenchScrewdriverIcon, EyeDropperIcon, MoonIcon as MoonIcon$1, SunIcon as SunIcon$1, UserCircleIcon, ArrowRightOnRectangleIcon, LanguageIcon, PlayIcon, StopIcon, SparklesIcon, CpuChipIcon, XCircleIcon, LockClosedIcon, EnvelopeIcon, ChatBubbleLeftIcon, TrophyIcon, CogIcon, ChartBarIcon, HomeIcon, Cog6ToothIcon, UserIcon, BoltIcon, Squares2X2Icon, PlusCircleIcon, CommandLineIcon, CloudIcon, RectangleStackIcon, CodeBracketIcon, CircleStackIcon } from '@heroicons/react/24/outline';
17
17
  import * as Popover from '@radix-ui/react-popover';
18
18
  import { createPortal } from 'react-dom';
19
19
  import { startOfDay, startOfMonth, endOfMonth, eachDayOfInterval, getDay, subMonths, addMonths, isAfter, format, isSameDay, isSameMonth, parse } from 'date-fns';
20
20
  import { fr, es, enUS, ptBR } from 'date-fns/locale';
21
21
  import { ProgressBar, ProgressBarProvider } from 'react-transition-progress';
22
22
  import { CalendarIcon, ChevronLeftIcon as ChevronLeftIcon$2, ChevronRightIcon as ChevronRightIcon$2 } from 'lucide-react';
23
- import { geoAlbersUsa, geoMercator, geoPath } from 'd3-geo';
24
23
  import * as ProgressPrimitive from '@radix-ui/react-progress';
24
+ import { geoAlbersUsa, geoMercator, geoPath } from 'd3-geo';
25
25
  import * as TabsPrimitive from '@radix-ui/react-tabs';
26
26
  import { useTranslations as useTranslations$1 } from 'next-intl';
27
27
  import { create } from 'zustand';
@@ -3138,15 +3138,15 @@ function StreamingDashboard({
3138
3138
  }, [runId]);
3139
3139
  function handleEvent(event) {
3140
3140
  switch (event.type) {
3141
- case "run_started":
3141
+ case "run-started":
3142
3142
  setPhase("running");
3143
3143
  break;
3144
- case "node_started":
3144
+ case "node-started":
3145
3145
  if (event.nodeId) {
3146
3146
  setTimeline((prev) => upsertTimelineRunning(prev, event));
3147
3147
  }
3148
3148
  break;
3149
- case "node_completed":
3149
+ case "node-completed":
3150
3150
  if (event.nodeId) {
3151
3151
  setTimeline(
3152
3152
  (prev) => upsertTimelineDone(prev, event, "done")
@@ -3154,18 +3154,14 @@ function StreamingDashboard({
3154
3154
  mergeNodeOutput(event);
3155
3155
  }
3156
3156
  break;
3157
- // The engine emits `node_error` (not `node_failed`) for executor
3158
- // errors. Keep `node_failed` as a soft alias in case a future
3159
- // event source uses it.
3160
- case "node_error":
3161
- case "node_failed":
3157
+ case "node-failed":
3162
3158
  if (event.nodeId) {
3163
3159
  setTimeline(
3164
3160
  (prev) => upsertTimelineDone(prev, event, "failed")
3165
3161
  );
3166
3162
  }
3167
3163
  break;
3168
- case "run_paused":
3164
+ case "run-paused":
3169
3165
  setPhase("paused");
3170
3166
  if (event.nodeId) {
3171
3167
  setTimeline(
@@ -3174,20 +3170,22 @@ function StreamingDashboard({
3174
3170
  }
3175
3171
  appendPauseSection(event);
3176
3172
  break;
3177
- case "ui_render":
3173
+ case "ui-render":
3178
3174
  appendSectionFromEvent(event);
3179
3175
  break;
3180
- case "run_completed":
3176
+ case "run-completed":
3181
3177
  setPhase("completed");
3182
3178
  break;
3183
- case "run_failed":
3179
+ case "run-failed":
3184
3180
  setPhase("failed");
3185
- setError(event.error ?? "Workflow run failed");
3181
+ setError(
3182
+ event.data?.error ?? "Workflow run failed"
3183
+ );
3186
3184
  break;
3187
3185
  }
3188
3186
  }
3189
3187
  function mergeNodeOutput(event) {
3190
- const output = event.outputs;
3188
+ const output = event.data?.outputs;
3191
3189
  if (!output) return;
3192
3190
  const candidateSpec = isDashboardSpecLike(output) ? output : null;
3193
3191
  if (candidateSpec) {
@@ -3202,14 +3200,14 @@ function StreamingDashboard({
3202
3200
  }
3203
3201
  }
3204
3202
  function appendSectionFromEvent(event) {
3205
- const sectionPayload = event.outputs?.section ?? event.outputs;
3203
+ const sectionPayload = event.data?.section ?? event.data;
3206
3204
  if (!sectionPayload || !sectionPayload.type) return;
3207
3205
  setSpec((prev) => appendSectionToSpec(prev, sectionPayload));
3208
3206
  specRef.current = appendSectionToSpec(specRef.current, sectionPayload);
3209
3207
  }
3210
3208
  function appendPauseSection(event) {
3211
- const promptValue = event.outputs?.prompt;
3212
- const payloadValue = event.outputs?.payload;
3209
+ const promptValue = event.data?.prompt;
3210
+ const payloadValue = event.data?.payload;
3213
3211
  const prompt = typeof promptValue === "string" ? promptValue : void 0;
3214
3212
  const section = {
3215
3213
  type: "note",
@@ -3312,9 +3310,10 @@ function Timeline({ entries }) {
3312
3310
  function upsertTimelineRunning(prev, event) {
3313
3311
  if (!event.nodeId) return prev;
3314
3312
  const idx = prev.findIndex((entry) => entry.nodeId === event.nodeId);
3313
+ const nodeType = typeof event.data?.nodeType === "string" ? event.data.nodeType : void 0;
3315
3314
  const fresh = {
3316
3315
  nodeId: event.nodeId,
3317
- nodeType: event.nodeType,
3316
+ nodeType,
3318
3317
  status: "running",
3319
3318
  startedAt: event.timestamp
3320
3319
  };
@@ -3326,16 +3325,18 @@ function upsertTimelineRunning(prev, event) {
3326
3325
  function upsertTimelineDone(prev, event, status) {
3327
3326
  if (!event.nodeId) return prev;
3328
3327
  const idx = prev.findIndex((entry) => entry.nodeId === event.nodeId);
3328
+ const nodeType = typeof event.data?.nodeType === "string" ? event.data.nodeType : void 0;
3329
+ const error = typeof event.data?.error === "string" ? event.data.error : void 0;
3329
3330
  if (idx === -1) {
3330
3331
  return [
3331
3332
  ...prev,
3332
3333
  {
3333
3334
  nodeId: event.nodeId,
3334
- nodeType: event.nodeType,
3335
+ nodeType,
3335
3336
  status,
3336
3337
  startedAt: event.timestamp,
3337
3338
  finishedAt: event.timestamp,
3338
- error: event.error
3339
+ error
3339
3340
  }
3340
3341
  ];
3341
3342
  }
@@ -3344,7 +3345,7 @@ function upsertTimelineDone(prev, event, status) {
3344
3345
  ...next[idx],
3345
3346
  status,
3346
3347
  finishedAt: event.timestamp,
3347
- error: event.error ?? next[idx].error
3348
+ error: error ?? next[idx].error
3348
3349
  };
3349
3350
  return next;
3350
3351
  }
@@ -3587,7 +3588,7 @@ var defaultFilterTypeConfig = {
3587
3588
  icon: ClockIcon,
3588
3589
  className: "bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"
3589
3590
  },
3590
- fuel: {
3591
+ category: {
3591
3592
  icon: MapIcon,
3592
3593
  className: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"
3593
3594
  },
@@ -9746,9 +9747,6 @@ function getDockAccent(id, accentRgb) {
9746
9747
  if (id === "models") {
9747
9748
  return { icon: "text-sky-600 dark:text-sky-400", bg: "bg-sky-100 dark:bg-sky-900/35", dot: "bg-sky-500 dark:bg-sky-400", rgb: "14, 165, 233" };
9748
9749
  }
9749
- if (id === "fuels") {
9750
- return { icon: "text-orange-600 dark:text-orange-400", bg: "bg-orange-100 dark:bg-orange-900/35", dot: "bg-orange-500 dark:bg-orange-400", rgb: "249, 115, 22" };
9751
- }
9752
9750
  if (id === "rules") {
9753
9751
  return { icon: "text-emerald-600 dark:text-emerald-400", bg: "bg-emerald-100 dark:bg-emerald-900/35", dot: "bg-emerald-500 dark:bg-emerald-400", rgb: "16, 185, 129" };
9754
9752
  }
@@ -10441,7 +10439,6 @@ function DashboardProgressShell({ children }) {
10441
10439
  }
10442
10440
  var APP_COLORS = {
10443
10441
  astrlabe: "bg-sky-500/30 text-sky-100 ring-sky-400/30",
10444
- "fuel-price-ai": "bg-emerald-500/30 text-emerald-100 ring-emerald-400/30",
10445
10442
  "kori-erp": "bg-amber-500/30 text-amber-100 ring-amber-400/30",
10446
10443
  windsock: "bg-indigo-500/30 text-indigo-100 ring-indigo-400/30"
10447
10444
  };
@@ -11062,7 +11059,7 @@ var ICON_MAP = {
11062
11059
  "plus-circle": getIcon("PlusCircleIcon"),
11063
11060
  "link": getIcon("LinkIcon"),
11064
11061
  "folder-open": getIcon("FolderOpenIcon"),
11065
- "fuel": getIcon("BeakerIcon")
11062
+ "beaker": getIcon("BeakerIcon")
11066
11063
  };
11067
11064
  var ACCENT_MAP = {
11068
11065
  "map-pin": {
@@ -11141,7 +11138,7 @@ var ACCENT_MAP = {
11141
11138
  container: "bg-slate-50/80 dark:bg-slate-900/30 border-slate-100/50 dark:border-slate-800/30",
11142
11139
  icon: "text-slate-500 dark:text-slate-400"
11143
11140
  },
11144
- "fuel": {
11141
+ "beaker": {
11145
11142
  container: "bg-emerald-50/80 dark:bg-emerald-900/30 border-emerald-100/50 dark:border-emerald-800/30",
11146
11143
  icon: "text-emerald-500 dark:text-emerald-400"
11147
11144
  }
@@ -11337,7 +11334,6 @@ function PageErrorState({
11337
11334
  );
11338
11335
  }
11339
11336
  var WINDSOCK_LOADER = { gradient: "from-emerald-500 to-teal-600", accentRing: "ring-emerald-500/30" };
11340
- var FUEL_PRICE_LOADER = { gradient: "from-blue-500 to-indigo-600", accentRing: "ring-blue-500/30" };
11341
11337
  var KORI_ERP_LOADER = { gradient: "from-purple-500 to-violet-600", accentRing: "ring-purple-500/30" };
11342
11338
  var WIRE_LOADER = { gradient: "from-sky-500 to-indigo-600", accentRing: "ring-indigo-500/30" };
11343
11339
  function BrandedLoader({
@@ -13297,1995 +13293,667 @@ function UserMobileInfo({ user, labels = {} }) {
13297
13293
  ] })
13298
13294
  ] });
13299
13295
  }
13300
- var MIN_ZOOM = 0.8;
13301
- var MAX_ZOOM = 4;
13302
- var ZOOM_STEP = 0.5;
13303
- function useGeoMapState({
13304
- items,
13305
- getRegionCode,
13306
- regionCoordinates,
13307
- defaultCenter = [0, 0]
13308
- }) {
13309
- const [zoom, setZoom] = useState(1);
13310
- const [center, setCenter] = useState(defaultCenter);
13311
- const [hoveredRegion, setHoveredRegion] = useState(null);
13312
- const [animatedRegions, setAnimatedRegions] = useState(/* @__PURE__ */ new Set());
13313
- const [panOffset, setPanOffset] = useState([0, 0]);
13314
- const handleZoomIn = useCallback(() => {
13315
- setZoom((previous) => Math.min(previous + ZOOM_STEP, MAX_ZOOM));
13296
+ var INCIDENTS = [
13297
+ { id: "lambda-timeout", label: "Lambda Timeout", service: "kori-customers", severity: "critical", color: "text-red-400", bg: "bg-red-500/15" },
13298
+ { id: "db-pool", label: "DB Pool Exhausted", service: "inventory-analytics", severity: "critical", color: "text-orange-400", bg: "bg-orange-500/15" },
13299
+ { id: "deploy-fail", label: "Deploy Rollback", service: "windsock-auth", severity: "high", color: "text-amber-400", bg: "bg-amber-500/15" },
13300
+ { id: "memory-leak", label: "Memory Leak", service: "astrlabe-workflows", severity: "medium", color: "text-sky-400", bg: "bg-sky-500/15" }
13301
+ ];
13302
+ var INCIDENT_DETAILS = {
13303
+ "lambda-timeout": {
13304
+ rootCause: "Cold starts + unoptimized Sequelize query scanning 2.3M rows without index on organization_id",
13305
+ agentAnalysis: "Correlated Lambda Duration spike with Aurora slow query log. Found full table scan on customers table \u2014 missing index on (organization_id, created_at). Cold start adds 4.2s, query adds 24.8s = timeout.",
13306
+ remediation: "CREATE INDEX CONCURRENTLY idx_customers_org_created ON customers(organization_id, created_at); Set provisioned concurrency to 5.",
13307
+ result: "p99 latency: 29s \u2192 340ms. Zero timeouts in last 2 hours.",
13308
+ timeline: [
13309
+ { time: "03:14", event: "CloudWatch alarm: kori-customers Duration > 29s", color: "text-red-400" },
13310
+ { time: "03:14", event: "Agent triggered \u2014 pulling CloudWatch metrics + Aurora slow query log", color: "text-sky-400" },
13311
+ { time: "03:15", event: "Root cause identified: missing index on customers(organization_id)", color: "text-amber-400" },
13312
+ { time: "03:15", event: "Remediation: CREATE INDEX CONCURRENTLY executed", color: "text-purple-400" },
13313
+ { time: "03:16", event: "Provisioned concurrency set to 5 via CDK update", color: "text-purple-400" },
13314
+ { time: "03:18", event: "Verified: p99 latency 340ms, 0 timeouts", color: "text-emerald-400" }
13315
+ ]
13316
+ },
13317
+ "db-pool": {
13318
+ rootCause: "inventory-analytics Lambda opening new connections per invocation without reusing pool. 300 concurrent executions = 300 connections.",
13319
+ agentAnalysis: "Correlated RDS Proxy connection count with Lambda concurrency. Found pool initialization inside handler function (runs every invocation) instead of module scope (runs once per cold start).",
13320
+ remediation: "Moved pool init to module scope. Set Lambda reserved concurrency to 50. Enabled RDS Proxy idle connection pruning at 60s.",
13321
+ result: "Steady-state connections: 300 \u2192 12. Zero connection errors in last 4 hours.",
13322
+ timeline: [
13323
+ { time: "02:41", event: "CloudWatch alarm: inventory-analytics DatabaseConnections = 300", color: "text-red-400" },
13324
+ { time: "02:41", event: "Agent triggered \u2014 analyzing connection patterns + Lambda code", color: "text-sky-400" },
13325
+ { time: "02:42", event: "Root cause: pool created inside handler, not module scope", color: "text-amber-400" },
13326
+ { time: "02:43", event: "Fix applied: pool init moved to module scope", color: "text-purple-400" },
13327
+ { time: "02:43", event: "Reserved concurrency set to 50", color: "text-purple-400" },
13328
+ { time: "02:45", event: "Verified: 12 steady connections, 0 errors", color: "text-emerald-400" }
13329
+ ]
13330
+ },
13331
+ "deploy-fail": {
13332
+ rootCause: "New Lambda handler binary missing from S3 asset bucket. CDK synth succeeded but cargo-lambda build artifact was not uploaded due to CI timeout.",
13333
+ agentAnalysis: 'Traced CloudFormation events: Lambda function update failed with "S3 key not found". Cross-referenced with GitHub Actions run \u2014 cargo-lambda build step timed out at 10min limit. Build artifact never uploaded to cdk.out.',
13334
+ remediation: "Triggered rebuild with extended timeout (20min). Verified S3 asset uploaded. Re-deployed stack successfully.",
13335
+ result: "Stack status: UPDATE_COMPLETE. All 129 handlers healthy. CI timeout increased to 20min.",
13336
+ timeline: [
13337
+ { time: "14:22", event: "CDK deploy failed: UPDATE_ROLLBACK_COMPLETE", color: "text-red-400" },
13338
+ { time: "14:22", event: "Agent triggered \u2014 reading CloudFormation events", color: "text-sky-400" },
13339
+ { time: "14:23", event: "Root cause: S3 asset missing \u2014 CI build timeout", color: "text-amber-400" },
13340
+ { time: "14:24", event: "Rebuild triggered with 20min timeout", color: "text-purple-400" },
13341
+ { time: "14:38", event: "Build complete. Stack redeployed successfully.", color: "text-purple-400" },
13342
+ { time: "14:40", event: "Verified: all 129 handlers healthy", color: "text-emerald-400" }
13343
+ ]
13344
+ },
13345
+ "memory-leak": {
13346
+ rootCause: "Workflow execution SSE connections not closed on client disconnect. EventSource objects accumulate in Node.js heap across warm invocations.",
13347
+ agentAnalysis: "Memory usage trend shows linear growth correlated with SSE connection count. Found missing cleanup in workflow-runner SSE handler \u2014 no abort signal listener. Warm Lambda instances accumulate stale connections across invocations.",
13348
+ remediation: "Added AbortSignal listener to SSE handler. Implemented connection TTL of 5 minutes. Forced Lambda recycling at 90% memory threshold.",
13349
+ result: "Memory stable at 45-55%. Zero OOM kills in last 8 hours.",
13350
+ timeline: [
13351
+ { time: "10:00", event: "Memory trending alarm: 85% and rising", color: "text-amber-400" },
13352
+ { time: "10:00", event: "Agent triggered \u2014 analyzing memory trend + heap snapshots", color: "text-sky-400" },
13353
+ { time: "10:02", event: "Root cause: SSE connections not closed on disconnect", color: "text-amber-400" },
13354
+ { time: "10:03", event: "Fix: AbortSignal listener + 5min TTL added", color: "text-purple-400" },
13355
+ { time: "10:03", event: "Lambda recycling at 90% memory threshold", color: "text-purple-400" },
13356
+ { time: "10:10", event: "Verified: memory stable at 48%, 0 OOM kills", color: "text-emerald-400" }
13357
+ ]
13358
+ }
13359
+ };
13360
+ var AVATARS = {
13361
+ triage: "https://api.dicebear.com/9.x/lorelei/svg?seed=Sentinel&hair=variant31&beardProbability=0&mouth=happy01",
13362
+ debug: "https://api.dicebear.com/9.x/notionists/svg?seed=Debugger&hair=variant35&beardProbability=0&gestureProbability=0&glasses=variant03&glassesProbability=100",
13363
+ remediate: "https://api.dicebear.com/9.x/lorelei/svg?seed=Fixer&hair=variant31&beardProbability=0&glasses=variant01&glassesProbability=100&mouth=happy01"
13364
+ };
13365
+ function buildNodes(incident) {
13366
+ return [
13367
+ { id: "alert", label: "Alert Detected", subtitle: `${incident.service} \xB7 ${incident.severity}`, icon: ExclamationTriangleIcon, color: "text-red-400", bg: "bg-red-500/15", glow: "rgba(239,68,68,0.5)", step: 0, badges: [{ text: incident.severity, color: "bg-red-500/20 text-red-300" }] },
13368
+ { id: "metrics", label: "Pull Metrics", subtitle: "CloudWatch \xB7 15min window", icon: ChartBarIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
13369
+ { id: "logs", label: "Analyze Logs", subtitle: "CloudWatch Logs \xB7 error filter", icon: CommandLineIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
13370
+ { id: "infra", label: "Infra State", subtitle: "CDK \xB7 stack status \xB7 config", icon: CloudIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
13371
+ { id: "correlate", label: "Correlate", subtitle: "3 sources \u2192 unified context", icon: BoltIcon, color: "text-amber-400", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.5)", step: 2, badges: [{ text: "aggregator", color: "bg-amber-500/20 text-amber-300" }] },
13372
+ { id: "debug-agent", label: "Debug Agent", subtitle: "Root cause analysis", icon: CpuChipIcon, color: "text-purple-400", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)", step: 3, avatar: AVATARS.debug, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "Claude", color: "bg-violet-500/20 text-violet-300" }] },
13373
+ { id: "plan", label: "Remediation Plan", subtitle: "Generate fix + rollback plan", icon: DocumentMagnifyingGlassIcon, color: "text-amber-400", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.5)", step: 4, avatar: AVATARS.triage, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "advanced", color: "bg-amber-500/20 text-amber-300" }] },
13374
+ { id: "execute", label: "Auto-Remediate", subtitle: "Apply fix \xB7 human-in-the-loop", icon: WrenchScrewdriverIcon, color: "text-red-400", bg: "bg-red-500/15", glow: "rgba(239,68,68,0.5)", step: 5, avatar: AVATARS.remediate, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "HITL", color: "bg-amber-500/20 text-amber-300" }] },
13375
+ { id: "verify", label: "Verify", subtitle: "Confirm resolution \xB7 metrics ok", icon: ShieldCheckIcon, color: "text-emerald-400", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.5)", step: 6, badges: [{ text: "check", color: "bg-emerald-500/20 text-emerald-300" }] },
13376
+ { id: "resolved", label: "Resolved", subtitle: "Incident closed \xB7 MTTR 4min", icon: CheckCircleIcon$1, color: "text-emerald-400", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.5)", step: 7 }
13377
+ ];
13378
+ }
13379
+ var STEP_LABELS = [
13380
+ "Alert detected \u2014 triaging",
13381
+ "Pulling metrics, logs, infra state (parallel)",
13382
+ "Correlating across sources",
13383
+ "Debug agent analyzing root cause",
13384
+ "Generating remediation plan",
13385
+ "Executing auto-remediation",
13386
+ "Verifying resolution",
13387
+ "Resolved \u2014 incident closed"
13388
+ ];
13389
+ function IncidentPipelineDemo({
13390
+ defaultIncident = "lambda-timeout",
13391
+ onIncidentChange
13392
+ } = {}) {
13393
+ const [activeIncident, setActiveIncident] = useState(defaultIncident);
13394
+ const incident = INCIDENTS.find((i) => i.id === activeIncident);
13395
+ const detail = INCIDENT_DETAILS[activeIncident];
13396
+ const nodes = useMemo(() => buildNodes(incident), [activeIncident]);
13397
+ const [activeStep, setActiveStep] = useState(-1);
13398
+ const intervalRef = useRef(null);
13399
+ const isIdle = activeStep === -1;
13400
+ const isRunning = activeStep >= 0 && activeStep < 7;
13401
+ const isComplete = activeStep === 7;
13402
+ const handleRun = useCallback(() => {
13403
+ if (intervalRef.current) clearInterval(intervalRef.current);
13404
+ setActiveStep(0);
13405
+ let step2 = 0;
13406
+ intervalRef.current = setInterval(() => {
13407
+ step2 += 1;
13408
+ if (step2 > 7) {
13409
+ if (intervalRef.current) clearInterval(intervalRef.current);
13410
+ setActiveStep(7);
13411
+ } else {
13412
+ setActiveStep(step2);
13413
+ }
13414
+ }, 1200);
13316
13415
  }, []);
13317
- const handleZoomOut = useCallback(() => {
13318
- setZoom((previous) => Math.max(previous - ZOOM_STEP, MIN_ZOOM));
13416
+ const handleStop = useCallback(() => {
13417
+ if (intervalRef.current) clearInterval(intervalRef.current);
13418
+ setActiveStep(-1);
13319
13419
  }, []);
13320
- const handleMoveEnd = useCallback(
13321
- (position) => {
13322
- setCenter(position.coordinates);
13323
- setZoom(position.zoom);
13324
- },
13325
- []
13326
- );
13327
- const handlePan = useCallback((dx, dy) => {
13328
- setPanOffset((previous) => [previous[0] + dx, previous[1] + dy]);
13420
+ const handleIncidentSelect = useCallback((id) => {
13421
+ setActiveIncident(id);
13422
+ onIncidentChange?.(id);
13423
+ if (!isIdle) handleStop();
13424
+ }, [isIdle, handleStop, onIncidentChange]);
13425
+ useEffect(() => () => {
13426
+ if (intervalRef.current) clearInterval(intervalRef.current);
13329
13427
  }, []);
13330
- const regionGroups = useMemo(() => {
13331
- const grouped = /* @__PURE__ */ new Map();
13332
- items.forEach((item) => {
13333
- const code = getRegionCode(item);
13334
- if (!grouped.has(code)) {
13335
- grouped.set(code, []);
13336
- }
13337
- grouped.get(code).push(item);
13338
- });
13339
- return Array.from(grouped.entries()).filter(([code]) => regionCoordinates[code]).map(([code, regionItems]) => ({
13340
- code,
13341
- items: regionItems,
13342
- coordinates: regionCoordinates[code]
13343
- })).sort((a, b) => b.items.length - a.items.length);
13344
- }, [items, getRegionCode, regionCoordinates]);
13345
- const animationCodes = useMemo(
13346
- () => regionGroups.map((regionData) => regionData.code),
13347
- [regionGroups]
13348
- );
13349
- const animationSignature = useMemo(
13350
- () => animationCodes.join("|"),
13351
- [animationCodes]
13352
- );
13353
- useEffect(() => {
13354
- if (animationCodes.length === 0) return;
13355
- setAnimatedRegions(/* @__PURE__ */ new Set());
13356
- const timers = [];
13357
- animationCodes.forEach((code, index) => {
13358
- const timer = setTimeout(() => {
13359
- setAnimatedRegions((previous) => /* @__PURE__ */ new Set([...previous, code]));
13360
- }, index * 100);
13361
- timers.push(timer);
13362
- });
13363
- return () => timers.forEach(clearTimeout);
13364
- }, [animationSignature]);
13365
- const getMarkerSize = useCallback(
13366
- (count) => {
13367
- const baseSize = count >= 10 ? 14 : count >= 5 ? 11 : count >= 2 ? 8 : 6;
13368
- return baseSize / Math.sqrt(zoom);
13369
- },
13370
- [zoom]
13371
- );
13372
- const getFontSize = useCallback(
13373
- (markerSize) => {
13374
- const baseSize = markerSize > 10 ? 10 : 8;
13375
- const scaledSize = baseSize / Math.sqrt(zoom);
13376
- return `${Math.max(scaledSize, 6)}px`;
13377
- },
13378
- [zoom]
13379
- );
13380
- return {
13381
- zoom,
13382
- setZoom,
13383
- handleZoomIn,
13384
- handleZoomOut,
13385
- handleMoveEnd,
13386
- MIN_ZOOM,
13387
- MAX_ZOOM,
13388
- center,
13389
- setCenter,
13390
- panOffset,
13391
- handlePan,
13392
- hoveredRegion,
13393
- setHoveredRegion,
13394
- animatedRegions,
13395
- regionGroups,
13396
- getMarkerSize,
13397
- getFontSize
13428
+ const getStatus = (node2) => {
13429
+ if (activeStep < 0) return "idle";
13430
+ if (node2.step < activeStep) return "complete";
13431
+ if (node2.step === activeStep) return "active";
13432
+ return "idle";
13398
13433
  };
13399
- }
13400
- var MAP_DEFAULT_STATE_COLOR = "rgba(100, 116, 139, 0.35)";
13401
- var MAP_DEFAULT_MARKER_COLOR = "#6366f1";
13402
- var VIEWBOX_WIDTH = 1e3;
13403
- var VIEWBOX_HEIGHT = 500;
13404
- var ALBERS_WIDTH = 960;
13405
- var ALBERS_HEIGHT = 600;
13406
- function GeoMapCanvasInner({
13407
- regionGroups,
13408
- regionColorMap,
13409
- animatedRegions,
13410
- zoom,
13411
- panOffset,
13412
- hoveredRegion,
13413
- onPan,
13414
- onRegionHover,
13415
- onRegionClick,
13416
- isRegionActive,
13417
- getMarkerSize,
13418
- getFontSize,
13419
- geoJsonUrl,
13420
- regionPropertyKey = "code",
13421
- projectionType = "mercator",
13422
- ariaLabel = "Interactive map"
13423
- }, ref) {
13424
- const [geoData, setGeoData] = useState(null);
13425
- const svgRef = useRef(null);
13426
- const dragState = useRef(null);
13427
- useEffect(() => {
13428
- let cancelled = false;
13429
- async function loadGeoData() {
13430
- try {
13431
- const response = await fetch(geoJsonUrl);
13432
- if (!response.ok) return;
13433
- const data = await response.json();
13434
- if (!cancelled) setGeoData(data);
13435
- } catch {
13436
- }
13437
- }
13438
- loadGeoData();
13439
- return () => {
13440
- cancelled = true;
13441
- };
13442
- }, [geoJsonUrl]);
13443
- const handleMouseDown = useCallback(
13444
- (event) => {
13445
- if (event.button !== 0) return;
13446
- dragState.current = {
13447
- active: true,
13448
- startX: event.clientX,
13449
- startY: event.clientY,
13450
- lastX: event.clientX,
13451
- lastY: event.clientY,
13452
- didDrag: false
13453
- };
13454
- },
13455
- []
13456
- );
13457
- const handleMouseMove = useCallback(
13458
- (event) => {
13459
- if (!dragState.current?.active || !svgRef.current) return;
13460
- const totalDx = event.clientX - dragState.current.startX;
13461
- const totalDy = event.clientY - dragState.current.startY;
13462
- if (!dragState.current.didDrag) {
13463
- if (Math.abs(totalDx) < 5 && Math.abs(totalDy) < 5) return;
13464
- dragState.current.didDrag = true;
13434
+ const rows = useMemo(() => {
13435
+ const result = [];
13436
+ let step2 = -1;
13437
+ for (const node2 of nodes) {
13438
+ if (node2.step !== step2) {
13439
+ result.push([]);
13440
+ step2 = node2.step;
13465
13441
  }
13466
- const dx = event.clientX - dragState.current.lastX;
13467
- const dy = event.clientY - dragState.current.lastY;
13468
- const rect = svgRef.current.getBoundingClientRect();
13469
- const viewBoxWidth = VIEWBOX_WIDTH / zoom;
13470
- const scaleRatio = viewBoxWidth / rect.width;
13471
- onPan(dx * scaleRatio, dy * scaleRatio);
13472
- dragState.current.lastX = event.clientX;
13473
- dragState.current.lastY = event.clientY;
13474
- },
13475
- [zoom, onPan]
13476
- );
13477
- const handleMouseUp = useCallback(() => {
13478
- if (dragState.current) {
13479
- dragState.current.active = false;
13480
- }
13481
- }, []);
13482
- const wasDragAction = useCallback(() => {
13483
- return dragState.current?.didDrag === true;
13484
- }, []);
13485
- const getLighterColor = (hexColor) => {
13486
- const r = parseInt(hexColor.slice(1, 3), 16);
13487
- const g = parseInt(hexColor.slice(3, 5), 16);
13488
- const b = parseInt(hexColor.slice(5, 7), 16);
13489
- return `rgba(${r}, ${g}, ${b}, 0.15)`;
13490
- };
13491
- const lighterColors = useMemo(() => {
13492
- const colors3 = /* @__PURE__ */ new Map();
13493
- regionColorMap.forEach((color, code) => {
13494
- colors3.set(code, getLighterColor(color));
13495
- });
13496
- return colors3;
13497
- }, [regionColorMap]);
13498
- const featureCollection = useMemo(() => {
13499
- if (!geoData) return null;
13500
- return {
13501
- type: "FeatureCollection",
13502
- features: geoData.features
13503
- };
13504
- }, [geoData]);
13505
- const projection = useMemo(() => {
13506
- if (!featureCollection) return null;
13507
- if (projectionType === "albersUsa") {
13508
- return geoAlbersUsa();
13509
- }
13510
- return geoMercator().fitSize([VIEWBOX_WIDTH, VIEWBOX_HEIGHT], featureCollection);
13511
- }, [featureCollection, projectionType]);
13512
- const pathGenerator = useMemo(() => {
13513
- if (!projection) return null;
13514
- return geoPath(projection);
13515
- }, [projection]);
13516
- const regionsWithItems = useMemo(() => {
13517
- return new Set(regionGroups.map((regionData) => regionData.code));
13518
- }, [regionGroups]);
13519
- const hasAnyActiveFilter = useMemo(() => {
13520
- return regionGroups.some((regionData) => isRegionActive?.(regionData.code));
13521
- }, [regionGroups, isRegionActive]);
13522
- const featureBounds = useMemo(() => {
13523
- if (!pathGenerator || !geoData) return null;
13524
- let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
13525
- for (const feature of geoData.features) {
13526
- const bounds = pathGenerator.bounds(feature);
13527
- if (!bounds || !isFinite(bounds[0][0])) continue;
13528
- minX = Math.min(minX, bounds[0][0]);
13529
- minY = Math.min(minY, bounds[0][1]);
13530
- maxX = Math.max(maxX, bounds[1][0]);
13531
- maxY = Math.max(maxY, bounds[1][1]);
13442
+ result[result.length - 1].push(node2);
13532
13443
  }
13533
- if (!isFinite(minX)) return null;
13534
- const pad = 15;
13535
- return { x: minX - pad, y: minY - pad, width: maxX - minX + pad * 2, height: maxY - minY + pad * 2 };
13536
- }, [pathGenerator, geoData]);
13537
- const effectiveWidth = featureBounds?.width ?? (projectionType === "albersUsa" ? ALBERS_WIDTH : VIEWBOX_WIDTH);
13538
- const effectiveHeight = featureBounds?.height ?? (projectionType === "albersUsa" ? ALBERS_HEIGHT : VIEWBOX_HEIGHT);
13539
- const baseX = featureBounds?.x ?? 0;
13540
- const baseY = featureBounds?.y ?? 0;
13541
- const viewBoxParts = useMemo(() => {
13542
- const width = effectiveWidth / zoom;
13543
- const height = effectiveHeight / zoom;
13544
- const x = baseX + (effectiveWidth - width) / 2 - panOffset[0];
13545
- const y = baseY + (effectiveHeight - height) / 2 - panOffset[1];
13546
- return { x, y, width, height };
13547
- }, [zoom, panOffset, effectiveWidth, effectiveHeight, baseX, baseY]);
13548
- const viewBox = `${viewBoxParts.x} ${viewBoxParts.y} ${viewBoxParts.width} ${viewBoxParts.height}`;
13549
- return /* @__PURE__ */ jsx(
13550
- "div",
13551
- {
13552
- ref,
13553
- className: "relative w-full h-full overflow-hidden rounded-2xl border border-white/20 dark:border-white/[0.12] shadow-lg shadow-black/5 dark:shadow-black/30",
13554
- "data-testid": "map-canvas",
13555
- children: /* @__PURE__ */ jsxs(
13556
- "svg",
13557
- {
13558
- ref: svgRef,
13559
- viewBox,
13560
- className: "w-full h-full cursor-grab active:cursor-grabbing",
13561
- "aria-label": ariaLabel,
13562
- style: { touchAction: "none", background: "transparent" },
13563
- onMouseDown: handleMouseDown,
13564
- onMouseMove: handleMouseMove,
13565
- onMouseUp: handleMouseUp,
13566
- onMouseLeave: handleMouseUp,
13567
- children: [
13568
- /* @__PURE__ */ jsxs("defs", { children: [
13569
- /* @__PURE__ */ jsx("filter", { id: "glow-active", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx("feDropShadow", { dx: "0", dy: "0", stdDeviation: "3", floodColor: "#fff", floodOpacity: "0.6" }) }),
13570
- /* @__PURE__ */ jsx("filter", { id: "inactive-dim", x: "0%", y: "0%", width: "100%", height: "100%", children: /* @__PURE__ */ jsx("feColorMatrix", { type: "saturate", values: "0.3" }) }),
13571
- /* @__PURE__ */ jsx("filter", { id: "marker-glow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: /* @__PURE__ */ jsx("feDropShadow", { dx: "0", dy: "0", stdDeviation: "4", floodColor: "#fff", floodOpacity: "0.7" }) }),
13572
- /* @__PURE__ */ jsx("clipPath", { id: "geo-inset-clip", children: /* @__PURE__ */ jsx(
13573
- "rect",
13574
- {
13575
- x: viewBoxParts.x + 2,
13576
- y: viewBoxParts.y + 2,
13577
- width: viewBoxParts.width - 4,
13578
- height: viewBoxParts.height - 4
13579
- }
13580
- ) })
13444
+ return result;
13445
+ }, [nodes]);
13446
+ return /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
13447
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 border-b border-white/5 px-3 py-2 shrink-0 overflow-x-auto", children: [
13448
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-lg bg-white/[0.03] p-0.5 gap-0.5 shrink-0", children: [
13449
+ /* @__PURE__ */ jsx("span", { className: "px-1.5 text-[7px] font-bold uppercase tracking-wider text-gray-600", children: "Incident" }),
13450
+ INCIDENTS.map((inc) => /* @__PURE__ */ jsx(
13451
+ "button",
13452
+ {
13453
+ type: "button",
13454
+ onClick: () => handleIncidentSelect(inc.id),
13455
+ className: `rounded-md px-2 py-1 text-[9px] font-semibold transition-all duration-200 ${activeIncident === inc.id ? `${inc.bg} ${inc.color} shadow-sm` : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
13456
+ children: inc.label
13457
+ },
13458
+ inc.id
13459
+ ))
13460
+ ] }),
13461
+ /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2 shrink-0", children: [
13462
+ activeStep >= 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", children: STEP_LABELS.map((_, index) => /* @__PURE__ */ jsx("div", { className: `h-1 w-2.5 rounded-full transition-all duration-500 ${index < activeStep || isComplete ? "bg-emerald-500" : index === activeStep ? "bg-red-500 animate-pulse" : "bg-white/10"}` }, index)) }),
13463
+ isComplete && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5", children: [
13464
+ /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3 w-3 text-emerald-400" }),
13465
+ /* @__PURE__ */ jsx("span", { className: "text-[8px] font-semibold text-emerald-400", children: "Resolved \xB7 MTTR 4min" })
13466
+ ] }),
13467
+ /* @__PURE__ */ jsx("div", { className: `h-2 w-2 rounded-full ${isRunning ? "bg-red-500 animate-pulse" : isComplete ? "bg-emerald-500" : "bg-gray-600"}` }),
13468
+ /* @__PURE__ */ jsx("span", { className: "max-w-[160px] truncate text-[9px] text-gray-500", children: activeStep >= 0 ? STEP_LABELS[activeStep] : "Ready" }),
13469
+ isIdle ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg bg-gradient-to-r from-red-600 to-rose-600 px-3 py-1 text-[10px] font-semibold text-white shadow-lg shadow-red-500/20 hover:shadow-red-500/30 hover:scale-105 active:scale-95 transition-all", children: [
13470
+ /* @__PURE__ */ jsx(PlayIcon, { className: "h-3 w-3" }),
13471
+ " Simulate"
13472
+ ] }) : isRunning ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleStop, className: "flex items-center gap-1 rounded-lg bg-rose-600/80 px-3 py-1 text-[10px] font-semibold text-white", children: [
13473
+ /* @__PURE__ */ jsx(StopIcon, { className: "h-3 w-3" }),
13474
+ " Stop"
13475
+ ] }) : /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1 text-[10px] font-medium text-gray-300 hover:bg-white/5", children: [
13476
+ /* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-3 w-3" }),
13477
+ " Replay"
13478
+ ] })
13479
+ ] })
13480
+ ] }),
13481
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0 overflow-x-auto px-6 py-4", children: [
13482
+ /* @__PURE__ */ jsx("style", { children: `
13483
+ @keyframes nodeGlow { 0%, 100% { box-shadow: 0 0 12px var(--glow); } 50% { box-shadow: 0 0 28px var(--glow); } }
13484
+ @keyframes edgeFlow { to { stroke-dashoffset: -12; } }
13485
+ ` }),
13486
+ rows.map((row, rowIndex) => /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-0", children: [
13487
+ rowIndex > 0 && /* @__PURE__ */ jsx("svg", { width: "40", height: "2", className: "mx-1.5 shrink-0", children: /* @__PURE__ */ jsx("line", { x1: "0", y1: "1", x2: "40", y2: "1", stroke: activeStep >= rows[rowIndex][0].step ? "#10b981" : "#374151", strokeWidth: "2", strokeDasharray: "4 3", style: { animation: activeStep === rows[rowIndex][0].step ? "edgeFlow 0.8s linear infinite" : "none" } }) }),
13488
+ /* @__PURE__ */ jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node2) => {
13489
+ const status = getStatus(node2);
13490
+ return /* @__PURE__ */ jsxs(
13491
+ "div",
13492
+ {
13493
+ className: `liquid-surface rounded-2xl px-4 py-3 transition-all duration-500 ${row.length > 1 ? "w-[180px]" : "w-[220px]"} ${status === "active" ? "scale-[1.03] ring-2 ring-red-500/50" : status === "complete" ? "ring-1 ring-emerald-500/30" : "opacity-40"}`,
13494
+ style: status === "active" ? { "--glow": node2.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
13495
+ children: [
13496
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2.5", children: [
13497
+ node2.avatar ? /* @__PURE__ */ jsx("img", { src: node2.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node2.bg}`, children: /* @__PURE__ */ jsx(node2.icon, { className: `h-5 w-5 ${node2.color}` }) }),
13498
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
13499
+ /* @__PURE__ */ jsx("div", { className: "truncate text-[13px] font-semibold text-white", children: node2.label }),
13500
+ /* @__PURE__ */ jsx("div", { className: "truncate text-[9px] text-gray-500", children: node2.subtitle })
13501
+ ] }),
13502
+ status === "complete" && /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-5 w-5 shrink-0 text-emerald-400" })
13503
+ ] }),
13504
+ node2.badges && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node2.badges.map((badge) => /* @__PURE__ */ jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
13505
+ ]
13506
+ },
13507
+ node2.id
13508
+ );
13509
+ }) })
13510
+ ] }, rowIndex))
13511
+ ] }),
13512
+ activeStep >= 3 && /* @__PURE__ */ jsxs("div", { className: "border-t border-white/5 px-3 py-2", children: [
13513
+ /* @__PURE__ */ jsx("style", { children: `
13514
+ .slide-active .fk-detail { opacity: 0; animation: fkDetailIn 0.4s ease forwards; }
13515
+ .slide-active .fk-detail:nth-child(1) { animation-delay: 0s; }
13516
+ .slide-active .fk-detail:nth-child(2) { animation-delay: 0.15s; }
13517
+ .slide-active .fk-detail:nth-child(3) { animation-delay: 0.3s; }
13518
+ .slide-active .fk-detail:nth-child(4) { animation-delay: 0.45s; }
13519
+ .slide-active .fk-detail:nth-child(5) { animation-delay: 0.6s; }
13520
+ @keyframes fkDetailIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
13521
+ ` }),
13522
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-2", children: [
13523
+ activeStep >= 3 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
13524
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
13525
+ /* @__PURE__ */ jsx("img", { src: AVATARS.debug, alt: "", className: "h-6 w-6 rounded-lg" }),
13526
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
13527
+ /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Debug Agent" }),
13528
+ /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Root cause analysis \xB7 1.2s" })
13581
13529
  ] }),
13582
- /* @__PURE__ */ jsx("g", { clipPath: "url(#geo-inset-clip)", children: geoData && pathGenerator ? geoData.features.map((feature, index) => {
13583
- const regionCode = feature.properties?.[regionPropertyKey] || feature.properties?.name || "";
13584
- const hasItems = regionsWithItems.has(regionCode);
13585
- const regionColor = regionColorMap.get(regionCode) ?? MAP_DEFAULT_STATE_COLOR;
13586
- const isActive = isRegionActive?.(regionCode);
13587
- const isHovered = hoveredRegion === regionCode;
13588
- const isDimmed = hasAnyActiveFilter && !isActive && hasItems;
13589
- let pathData = pathGenerator(feature);
13590
- if (pathData && projectionType === "albersUsa") {
13591
- const subpaths = pathData.split("Z").filter(Boolean);
13592
- const cleaned = subpaths.filter((sub) => {
13593
- const lCount = (sub.match(/L/g) || []).length;
13594
- if (lCount !== 3) return true;
13595
- const nums = sub.match(/-?\d+\.?\d*/g)?.map(Number);
13596
- if (!nums || nums.length !== 8) return true;
13597
- const [x1, y1, x2, y2, x3, y3, x4, y4] = nums;
13598
- const xs = /* @__PURE__ */ new Set([x1, x2, x3, x4]);
13599
- const ys = /* @__PURE__ */ new Set([y1, y2, y3, y4]);
13600
- return xs.size !== 2 || ys.size !== 2;
13601
- });
13602
- pathData = cleaned.length > 0 ? cleaned.join("Z") + "Z" : null;
13603
- }
13604
- if (!pathData) return null;
13605
- return /* @__PURE__ */ jsx(
13606
- "path",
13607
- {
13608
- d: pathData,
13609
- fillRule: "evenodd",
13610
- "data-region": hasItems ? regionCode : void 0,
13611
- onMouseEnter: () => hasItems && onRegionHover(regionCode),
13612
- onMouseLeave: () => onRegionHover(null),
13613
- onClick: () => {
13614
- if (hasItems && !wasDragAction()) {
13615
- onRegionClick(regionCode);
13616
- }
13617
- },
13618
- fill: hasItems ? isHovered ? regionColor : isActive ? regionColor : lighterColors.get(regionCode) || getLighterColor(regionColor) : MAP_DEFAULT_STATE_COLOR,
13619
- stroke: isActive ? "#fff" : isDimmed ? "rgba(148, 163, 184, 0.15)" : "rgba(148, 163, 184, 0.40)",
13620
- strokeWidth: (isActive ? 2.5 : 0.5) / zoom,
13621
- filter: isActive ? "url(#glow-active)" : isDimmed ? "url(#inactive-dim)" : void 0,
13622
- opacity: isDimmed ? 0.45 : 1,
13623
- style: {
13624
- transition: "fill 0.3s ease, opacity 0.3s ease",
13625
- cursor: hasItems ? "pointer" : void 0
13626
- }
13627
- },
13628
- `${regionCode}-${index}`
13629
- );
13630
- }) : null }),
13631
- projection ? regionGroups.map((regionData) => {
13632
- const point = projection(regionData.coordinates);
13633
- if (!point) return null;
13634
- const [x, y] = point;
13635
- const isAnimated = animatedRegions.has(regionData.code);
13636
- const markerSize = getMarkerSize(regionData.items.length);
13637
- const markerColor = regionColorMap.get(regionData.code) ?? MAP_DEFAULT_MARKER_COLOR;
13638
- const isActive = isRegionActive?.(regionData.code);
13639
- const isDimmed = hasAnyActiveFilter && !isActive;
13640
- return /* @__PURE__ */ jsx(
13641
- "g",
13642
- {
13643
- transform: `translate(${x}, ${y})`,
13644
- "data-region": regionData.code,
13645
- "data-testid": `marker-${regionData.code}`,
13646
- onMouseEnter: () => onRegionHover(regionData.code),
13647
- onMouseLeave: () => onRegionHover(null),
13648
- onClick: () => {
13649
- if (!wasDragAction()) {
13650
- onRegionClick(regionData.code);
13651
- }
13652
- },
13653
- children: /* @__PURE__ */ jsxs(
13654
- "g",
13655
- {
13656
- style: {
13657
- transform: isAnimated ? "scale(1)" : "scale(0)",
13658
- transformOrigin: "0 0",
13659
- opacity: isAnimated ? isDimmed ? 0.35 : 1 : 0,
13660
- transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
13661
- cursor: "pointer"
13662
- },
13663
- filter: isActive ? "url(#marker-glow)" : void 0,
13664
- children: [
13665
- isActive ? /* @__PURE__ */ jsx(
13666
- "circle",
13667
- {
13668
- r: markerSize + 6,
13669
- fill: "none",
13670
- stroke: "#fff",
13671
- strokeWidth: 2,
13672
- opacity: 0.8
13673
- }
13674
- ) : /* @__PURE__ */ jsx(
13675
- "circle",
13676
- {
13677
- r: markerSize + 4,
13678
- fill: "none",
13679
- stroke: markerColor,
13680
- strokeWidth: 1,
13681
- opacity: isDimmed ? 0 : 0.4,
13682
- className: isDimmed ? void 0 : "animate-ping",
13683
- style: isDimmed ? void 0 : { animationDuration: "2s" }
13684
- }
13685
- ),
13686
- /* @__PURE__ */ jsx(
13687
- "circle",
13688
- {
13689
- r: markerSize,
13690
- fill: markerColor,
13691
- stroke: isActive ? "#fff" : markerColor,
13692
- strokeWidth: isActive ? 3 : 2,
13693
- className: "transition-colors",
13694
- style: {
13695
- filter: isActive ? "brightness(1.2) saturate(1.3)" : isDimmed ? "saturate(0.3) brightness(0.8)" : "none"
13696
- }
13697
- }
13698
- ),
13699
- regionData.items.length > 1 && /* @__PURE__ */ jsx(
13700
- "text",
13701
- {
13702
- textAnchor: "middle",
13703
- dominantBaseline: "central",
13704
- style: {
13705
- fontFamily: "system-ui",
13706
- fontSize: getFontSize(markerSize),
13707
- fontWeight: "bold",
13708
- fill: "#fff",
13709
- pointerEvents: "none",
13710
- opacity: isDimmed ? 0.5 : 1
13711
- },
13712
- children: regionData.items.length
13713
- }
13714
- )
13715
- ]
13716
- }
13717
- )
13718
- },
13719
- regionData.code
13720
- );
13721
- }) : null
13722
- ]
13723
- }
13724
- )
13725
- }
13726
- );
13530
+ /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" })
13531
+ ] }),
13532
+ /* @__PURE__ */ jsx("p", { className: "text-[9px] leading-relaxed text-gray-300", children: detail.rootCause }),
13533
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[8px] leading-relaxed text-gray-400", children: detail.agentAnalysis })
13534
+ ] }),
13535
+ activeStep >= 4 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
13536
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
13537
+ /* @__PURE__ */ jsx("img", { src: AVATARS.triage, alt: "", className: "h-6 w-6 rounded-lg" }),
13538
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
13539
+ /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Triage Agent" }),
13540
+ /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Remediation plan \xB7 0.8s" })
13541
+ ] }),
13542
+ /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" })
13543
+ ] }),
13544
+ /* @__PURE__ */ jsx("p", { className: "font-mono text-[8px] leading-relaxed text-gray-300", children: detail.remediation })
13545
+ ] }),
13546
+ activeStep >= 5 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
13547
+ /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
13548
+ /* @__PURE__ */ jsx("img", { src: AVATARS.remediate, alt: "", className: "h-6 w-6 rounded-lg" }),
13549
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
13550
+ /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Remediate Agent" }),
13551
+ /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Executing fix \xB7 human-in-the-loop" })
13552
+ ] }),
13553
+ activeStep >= 6 ? /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" }) : /* @__PURE__ */ jsx("div", { className: "h-3 w-3 shrink-0 rounded-full bg-amber-500 animate-pulse" })
13554
+ ] }),
13555
+ /* @__PURE__ */ jsx("p", { className: "text-[8px] leading-relaxed text-amber-300/80", children: "Applying changes with rollback plan ready. Awaiting verification..." })
13556
+ ] })
13557
+ ] }),
13558
+ activeStep >= 6 && /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-2 gap-2", children: [
13559
+ /* @__PURE__ */ jsxs("div", { className: "fk-detail rounded-xl border border-emerald-500/20 bg-emerald-500/[0.06] p-2.5", children: [
13560
+ /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-1.5", children: [
13561
+ /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 text-emerald-400" }),
13562
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-emerald-400", children: "Result" })
13563
+ ] }),
13564
+ /* @__PURE__ */ jsx("p", { className: "text-[9px] font-semibold text-emerald-300", children: detail.result })
13565
+ ] }),
13566
+ isComplete && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-2.5", children: [
13567
+ /* @__PURE__ */ jsx("span", { className: "mb-1 block text-[10px] font-bold text-gray-400", children: "Timeline" }),
13568
+ /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: detail.timeline.map((entry, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1.5", children: [
13569
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 font-mono text-[7px] text-gray-600", children: entry.time }),
13570
+ /* @__PURE__ */ jsx("span", { className: `h-1 w-1 mt-1 shrink-0 rounded-full ${entry.color.replace("text-", "bg-")}` }),
13571
+ /* @__PURE__ */ jsx("span", { className: "text-[7px] text-gray-400", children: entry.event })
13572
+ ] }, i)) })
13573
+ ] })
13574
+ ] })
13575
+ ] })
13576
+ ] }) });
13727
13577
  }
13728
- var GeoMapCanvas = React12__default.forwardRef(GeoMapCanvasInner);
13729
- var MapZoomControls = React12__default.forwardRef(
13730
- ({ zoom, minZoom, maxZoom, onZoomIn, onZoomOut, labels }, ref) => {
13731
- return /* @__PURE__ */ jsxs(
13732
- "div",
13578
+ function IconTile({ icon: Icon, gradient, size = "md" }) {
13579
+ const wrapper = size === "md" ? "h-12 w-12" : "h-10 w-10";
13580
+ const icon = size === "md" ? "h-6 w-6" : "h-5 w-5";
13581
+ return /* @__PURE__ */ jsx("div", { className: `${wrapper} rounded-xl bg-gradient-to-br ${gradient} flex items-center justify-center`, children: /* @__PURE__ */ jsx(Icon, { className: `${icon} text-white` }) });
13582
+ }
13583
+ function BentoFeatureGrid({
13584
+ aiPanel,
13585
+ metricsPanel,
13586
+ securityPanel,
13587
+ agentsPanel,
13588
+ className
13589
+ }) {
13590
+ return /* @__PURE__ */ jsx("div", { className: `w-full min-h-screen h-full flex items-center justify-center p-4 md:p-6 lg:p-8 ${className ?? ""}`, children: /* @__PURE__ */ jsx("div", { className: "w-full h-full max-w-7xl", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-3 lg:grid-rows-2 h-full min-h-[600px] lg:min-h-[700px]", children: [
13591
+ /* @__PURE__ */ jsxs(
13592
+ motion.div,
13733
13593
  {
13734
- ref,
13735
- className: "flex flex-col gap-1",
13736
- "data-testid": "map-zoom-controls",
13594
+ initial: { opacity: 0, y: 20 },
13595
+ animate: { opacity: 1, y: 0 },
13596
+ transition: { duration: 0.6, delay: 0.1 },
13597
+ className: "relative lg:row-span-2",
13737
13598
  children: [
13738
- /* @__PURE__ */ jsx(
13739
- "button",
13740
- {
13741
- onClick: onZoomIn,
13742
- disabled: zoom >= maxZoom,
13743
- className: "p-2 liquid-surface rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
13744
- "aria-label": labels?.zoomIn ?? "Zoom in",
13745
- "data-testid": "zoom-in-button",
13746
- children: /* @__PURE__ */ jsx(PlusIcon, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" })
13747
- }
13748
- ),
13749
- /* @__PURE__ */ jsx(
13750
- "button",
13751
- {
13752
- onClick: onZoomOut,
13753
- disabled: zoom <= minZoom,
13754
- className: "p-2 liquid-surface rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
13755
- "aria-label": labels?.zoomOut ?? "Zoom out",
13756
- "data-testid": "zoom-out-button",
13757
- children: /* @__PURE__ */ jsx(MinusIcon, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" })
13758
- }
13759
- ),
13760
- /* @__PURE__ */ jsx("div", { className: "mt-1 px-2 py-1 liquid-surface rounded-lg text-center", children: /* @__PURE__ */ jsxs(
13761
- "span",
13762
- {
13763
- className: "text-xs font-medium text-gray-600 dark:text-gray-400",
13764
- "data-testid": "zoom-level",
13765
- children: [
13766
- Math.round(zoom * 100),
13767
- "%"
13768
- ]
13769
- }
13770
- ) })
13771
- ]
13772
- }
13773
- );
13774
- }
13775
- );
13776
- MapZoomControls.displayName = "MapZoomControls";
13777
- function InteractiveGeoMapInner({
13778
- items,
13779
- getRegionCode,
13780
- regionCoordinates,
13781
- defaultCenter,
13782
- geoJsonUrl,
13783
- regionPropertyKey,
13784
- projectionType,
13785
- getRegionColor,
13786
- isRegionActive,
13787
- onRegionToggle,
13788
- renderHoverContent,
13789
- formatCounter,
13790
- zoomLabels,
13791
- ariaLabel,
13792
- className
13793
- }, ref) {
13794
- const mapStateOptions = {
13795
- items,
13796
- getRegionCode,
13797
- regionCoordinates,
13798
- defaultCenter
13799
- };
13800
- const mapState = useGeoMapState(mapStateOptions);
13801
- const regionColorMap = useMemo(() => {
13802
- const colorMap2 = /* @__PURE__ */ new Map();
13803
- for (const code of Object.keys(regionCoordinates)) {
13804
- colorMap2.set(code, getRegionColor(code));
13805
- }
13806
- mapState.regionGroups.forEach((regionData) => {
13807
- if (!colorMap2.has(regionData.code)) {
13808
- colorMap2.set(regionData.code, getRegionColor(regionData.code));
13599
+ aiPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${aiPanel.bgTint}` }),
13600
+ /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${aiPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
13601
+ /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
13602
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
13603
+ /* @__PURE__ */ jsx(IconTile, { icon: aiPanel.icon, gradient: aiPanel.gradient, size: "md" }),
13604
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-bold text-gray-900 dark:text-white", children: aiPanel.title })
13605
+ ] }),
13606
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: aiPanel.description })
13607
+ ] }),
13608
+ /* @__PURE__ */ jsx("div", { className: "relative min-h-[200px] w-full grow p-6", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: aiPanel.items.map((item, index) => /* @__PURE__ */ jsxs(
13609
+ motion.div,
13610
+ {
13611
+ initial: { opacity: 0, x: -20 },
13612
+ animate: { opacity: 1, x: 0 },
13613
+ transition: { delay: 0.3 + index * 0.2 },
13614
+ className: `flex items-center gap-3 p-3 rounded-xl ${item.bgTint}`,
13615
+ children: [
13616
+ /* @__PURE__ */ jsx("div", { className: `h-2 w-2 rounded-full animate-pulse ${item.dotColor}` }),
13617
+ /* @__PURE__ */ jsx("span", { className: `text-xs font-medium ${item.textColor}`, children: item.label })
13618
+ ]
13619
+ },
13620
+ `${item.label}-${index}`
13621
+ )) }) })
13622
+ ] }),
13623
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
13624
+ ]
13809
13625
  }
13810
- });
13811
- return colorMap2;
13812
- }, [regionCoordinates, mapState.regionGroups, getRegionColor]);
13813
- const handleRegionClick = (code) => {
13814
- onRegionToggle?.(code);
13815
- };
13816
- const hoveredRegionData = useMemo(() => {
13817
- if (!mapState.hoveredRegion) return null;
13818
- return mapState.regionGroups.find(
13819
- (regionData) => regionData.code === mapState.hoveredRegion
13820
- ) ?? null;
13821
- }, [mapState.hoveredRegion, mapState.regionGroups]);
13822
- const counterText = useMemo(() => {
13823
- if (!formatCounter) return null;
13824
- const hasActiveFilter = isRegionActive && mapState.regionGroups.some(
13825
- (regionData) => isRegionActive(regionData.code)
13826
- );
13827
- if (hasActiveFilter) {
13828
- const activeRegions = mapState.regionGroups.filter(
13829
- (regionData) => isRegionActive(regionData.code)
13830
- );
13831
- const activeItemCount = activeRegions.reduce(
13832
- (sum, regionData) => sum + regionData.items.length,
13833
- 0
13834
- );
13835
- return formatCounter(items.length, mapState.regionGroups.length, activeItemCount, activeRegions.length);
13836
- }
13837
- return formatCounter(items.length, mapState.regionGroups.length);
13838
- }, [formatCounter, isRegionActive, mapState.regionGroups, items.length]);
13839
- return /* @__PURE__ */ jsx(
13840
- "div",
13841
- {
13842
- ref,
13843
- className: `space-y-4 h-full ${className ?? ""}`,
13844
- "data-testid": "interactive-geo-map-container",
13845
- children: /* @__PURE__ */ jsxs("div", { className: "relative h-full", children: [
13846
- /* @__PURE__ */ jsx(
13847
- GeoMapCanvas,
13848
- {
13849
- regionGroups: mapState.regionGroups,
13850
- regionColorMap,
13851
- animatedRegions: mapState.animatedRegions,
13852
- zoom: mapState.zoom,
13853
- panOffset: mapState.panOffset,
13854
- hoveredRegion: mapState.hoveredRegion,
13855
- onPan: mapState.handlePan,
13856
- onRegionHover: mapState.setHoveredRegion,
13857
- onRegionClick: handleRegionClick,
13858
- isRegionActive,
13859
- getMarkerSize: mapState.getMarkerSize,
13860
- getFontSize: mapState.getFontSize,
13861
- geoJsonUrl,
13862
- regionPropertyKey,
13863
- projectionType,
13864
- ariaLabel
13865
- }
13866
- ),
13867
- /* @__PURE__ */ jsx("div", { className: "absolute top-3 right-3 z-10", children: /* @__PURE__ */ jsx(
13868
- MapZoomControls,
13869
- {
13870
- zoom: mapState.zoom,
13871
- minZoom: mapState.MIN_ZOOM,
13872
- maxZoom: mapState.MAX_ZOOM,
13873
- onZoomIn: mapState.handleZoomIn,
13874
- onZoomOut: mapState.handleZoomOut,
13875
- labels: zoomLabels
13876
- }
13877
- ) }),
13878
- mapState.hoveredRegion && hoveredRegionData && renderHoverContent && /* @__PURE__ */ jsx("div", { className: "absolute top-3 left-3 z-10 pointer-events-none", children: renderHoverContent(mapState.hoveredRegion, hoveredRegionData.items) }),
13879
- counterText && /* @__PURE__ */ jsx("div", { className: "absolute bottom-3 left-3 z-10 pointer-events-none", children: /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-lg px-3 py-1.5", children: /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-600 dark:text-gray-300", children: counterText }) }) })
13880
- ] })
13881
- }
13882
- );
13883
- }
13884
- var InteractiveGeoMap = React12__default.forwardRef(InteractiveGeoMapInner);
13885
- var DEFAULT_LEGEND_COLOR = "#6366f1";
13886
- var GeoMapLegend = React12__default.forwardRef(
13887
- ({ items, colorMap: colorMap2, getFlagUrl, getLabel, labels, maxItems = 5 }, ref) => {
13888
- return /* @__PURE__ */ jsxs(
13889
- "div",
13626
+ ),
13627
+ /* @__PURE__ */ jsxs(
13628
+ motion.div,
13890
13629
  {
13891
- ref,
13892
- className: "liquid-surface rounded-lg p-3",
13893
- "data-testid": "map-legend",
13630
+ initial: { opacity: 0, y: 20 },
13631
+ animate: { opacity: 1, y: 0 },
13632
+ transition: { duration: 0.6, delay: 0.2 },
13633
+ className: "relative max-lg:row-start-1",
13894
13634
  children: [
13895
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-700 dark:text-gray-300 mb-2", children: labels.title }),
13896
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
13897
- items.slice(0, maxItems).map((item) => {
13898
- const flagUrl = getFlagUrl?.(item.code);
13899
- const regionColor = colorMap2.get(item.code) ?? DEFAULT_LEGEND_COLOR;
13900
- const displayLabel = getLabel?.(item.code) ?? item.code;
13635
+ metricsPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${metricsPanel.bgTint}` }),
13636
+ /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${metricsPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
13637
+ /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
13638
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
13639
+ /* @__PURE__ */ jsx(IconTile, { icon: metricsPanel.icon, gradient: metricsPanel.gradient, size: "sm" }),
13640
+ /* @__PURE__ */ jsx("p", { className: "text-base font-bold text-gray-900 dark:text-white", children: metricsPanel.title })
13641
+ ] }),
13642
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400", children: metricsPanel.description })
13643
+ ] }),
13644
+ /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center px-6 pb-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3 w-full", children: metricsPanel.metrics.map((metric, index) => /* @__PURE__ */ jsxs(
13645
+ motion.div,
13646
+ {
13647
+ initial: { scale: 0 },
13648
+ animate: { scale: 1 },
13649
+ transition: { delay: 0.5 + index * 0.1 },
13650
+ className: `${metric.bgTint} rounded-xl p-3 text-center`,
13651
+ children: [
13652
+ /* @__PURE__ */ jsx("p", { className: `text-2xl font-bold ${metric.valueColor}`, children: metric.value }),
13653
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-600 dark:text-gray-400", children: metric.label })
13654
+ ]
13655
+ },
13656
+ `${metric.label}-${index}`
13657
+ )) }) })
13658
+ ] }),
13659
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
13660
+ ]
13661
+ }
13662
+ ),
13663
+ /* @__PURE__ */ jsxs(
13664
+ motion.div,
13665
+ {
13666
+ initial: { opacity: 0, y: 20 },
13667
+ animate: { opacity: 1, y: 0 },
13668
+ transition: { duration: 0.6, delay: 0.3 },
13669
+ className: "relative max-lg:row-start-3 lg:col-start-2 lg:row-start-2",
13670
+ children: [
13671
+ securityPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${securityPanel.bgTint}` }),
13672
+ /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${securityPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
13673
+ /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
13674
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
13675
+ /* @__PURE__ */ jsx(IconTile, { icon: securityPanel.icon, gradient: securityPanel.gradient, size: "sm" }),
13676
+ /* @__PURE__ */ jsx("p", { className: "text-base font-bold text-gray-900 dark:text-white", children: securityPanel.title })
13677
+ ] }),
13678
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400", children: securityPanel.description })
13679
+ ] }),
13680
+ /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center px-6 pb-6", children: /* @__PURE__ */ jsx("div", { className: "w-full space-y-2", children: securityPanel.bars.map((bar, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
13681
+ /* @__PURE__ */ jsx("div", { className: `h-1.5 flex-1 rounded-full overflow-hidden ${bar.trackColor}`, children: /* @__PURE__ */ jsx(
13682
+ motion.div,
13683
+ {
13684
+ initial: { width: 0 },
13685
+ animate: { width: "100%" },
13686
+ transition: { delay: 0.7 + index * 0.2, duration: 1 },
13687
+ className: `h-full ${bar.fillColor}`
13688
+ }
13689
+ ) }),
13690
+ /* @__PURE__ */ jsx("span", { className: `text-[10px] font-medium ${bar.labelColor}`, children: bar.label })
13691
+ ] }, `${bar.label}-${index}`)) }) })
13692
+ ] }),
13693
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
13694
+ ]
13695
+ }
13696
+ ),
13697
+ /* @__PURE__ */ jsxs(
13698
+ motion.div,
13699
+ {
13700
+ initial: { opacity: 0, y: 20 },
13701
+ animate: { opacity: 1, y: 0 },
13702
+ transition: { duration: 0.6, delay: 0.4 },
13703
+ className: "relative lg:row-span-2",
13704
+ children: [
13705
+ agentsPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${agentsPanel.bgTint}` }),
13706
+ /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${agentsPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
13707
+ /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
13708
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
13709
+ /* @__PURE__ */ jsx(IconTile, { icon: agentsPanel.icon, gradient: agentsPanel.gradient, size: "md" }),
13710
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-bold text-gray-900 dark:text-white", children: agentsPanel.title })
13711
+ ] }),
13712
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: agentsPanel.description })
13713
+ ] }),
13714
+ /* @__PURE__ */ jsx("div", { className: "relative w-full grow p-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: agentsPanel.agents.map((agent, index) => {
13715
+ const delay = 0.5 + index * 0.1;
13901
13716
  return /* @__PURE__ */ jsxs(
13902
- "div",
13717
+ motion.div,
13903
13718
  {
13904
- className: "flex items-center gap-2",
13905
- "data-testid": `legend-item-${item.code}`,
13719
+ initial: { opacity: 0, scale: 0.8 },
13720
+ animate: { opacity: 1, scale: 1 },
13721
+ transition: { delay },
13722
+ className: `relative overflow-hidden rounded-xl bg-gradient-to-br ${agent.color} p-3 text-white`,
13906
13723
  children: [
13907
- flagUrl ? (
13908
- // eslint-disable-next-line @next/next/no-img-element
13909
- /* @__PURE__ */ jsx(
13910
- "img",
13724
+ /* @__PURE__ */ jsxs("div", { className: "relative z-10", children: [
13725
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold", children: agent.name }),
13726
+ /* @__PURE__ */ jsx("div", { className: "mt-1 h-1 w-12 bg-white/30 rounded-full", children: /* @__PURE__ */ jsx(
13727
+ motion.div,
13911
13728
  {
13912
- src: flagUrl,
13913
- alt: item.code,
13914
- className: "w-4 h-4 shadow-sm"
13729
+ initial: { width: 0 },
13730
+ animate: { width: "100%" },
13731
+ transition: { delay: delay + 0.3, duration: 0.8 },
13732
+ className: "h-full bg-white rounded-full"
13915
13733
  }
13916
- )
13917
- ) : /* @__PURE__ */ jsx(
13918
- "div",
13919
- {
13920
- className: "w-4 h-4 rounded-full",
13921
- style: { backgroundColor: regionColor },
13922
- "data-testid": `legend-color-${item.code}`
13923
- }
13924
- ),
13925
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-600 dark:text-gray-400", children: [
13926
- displayLabel,
13927
- " (",
13928
- item.count,
13929
- ")"
13930
- ] })
13734
+ ) })
13735
+ ] }),
13736
+ /* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -mr-8 -mt-8" })
13931
13737
  ]
13932
13738
  },
13933
- item.code
13739
+ agent.name
13934
13740
  );
13935
- }),
13936
- items.length > maxItems && /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 italic pt-1", children: [
13937
- "+",
13938
- items.length - maxItems,
13939
- " ",
13940
- labels.more
13941
- ] })
13942
- ] })
13741
+ }) }) })
13742
+ ] }),
13743
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
13943
13744
  ]
13944
13745
  }
13945
- );
13946
- }
13947
- );
13948
- GeoMapLegend.displayName = "GeoMapLegend";
13949
-
13950
- // src/lib/themes/brazil.ts
13951
- var BRAZIL_STATE_PALETTES = {
13952
- AC: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
13953
- AL: { primary: "#d9251d", secondary: "#01a2ce", text: "light" },
13954
- AM: { primary: "#213572", secondary: "#d9251d", text: "light" },
13955
- AP: { primary: "#213572", secondary: "#009b43", text: "light" },
13956
- BA: { primary: "#213572", secondary: "#d9251d", text: "light" },
13957
- CE: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
13958
- DF: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
13959
- ES: { primary: "#ea5a8d", secondary: "#01a2ce", text: "light" },
13960
- GO: { primary: "#009b43", secondary: "#213572", text: "light" },
13961
- MA: { primary: "#213572", secondary: "#d9251d", text: "light" },
13962
- MG: { primary: "#d9251d", secondary: "#f0f0f0", text: "light" },
13963
- MS: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
13964
- MT: { primary: "#213572", secondary: "#009b43", text: "light" },
13965
- PA: { primary: "#d9251d", secondary: "#213572", text: "light" },
13966
- PB: { primary: "#d9251d", secondary: "#1d1d1b", text: "light" },
13967
- PE: { primary: "#213572", secondary: "#ffcf44", text: "light" },
13968
- PI: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
13969
- PR: { primary: "#009b43", secondary: "#213572", text: "light" },
13970
- RJ: { primary: "#01a2ce", secondary: "#009b43", text: "light" },
13971
- RN: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
13972
- RO: { primary: "#213572", secondary: "#009b43", text: "light" },
13973
- RR: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
13974
- RS: { primary: "#009b43", secondary: "#d9251d", text: "light" },
13975
- SC: { primary: "#d9251d", secondary: "#a6ce39", text: "light" },
13976
- SE: { primary: "#009b43", secondary: "#213572", text: "light" },
13977
- SP: { primary: "#1d1d1b", secondary: "#d9251d", text: "light" },
13978
- TO: { primary: "#ef9926", secondary: "#213572", text: "dark" }
13979
- };
13980
- var BRAZIL_ACCENT_MAP = {
13981
- AC: "green",
13982
- AL: "red",
13983
- AM: "blue",
13984
- AP: "blue",
13985
- BA: "blue",
13986
- CE: "green",
13987
- DF: "green",
13988
- ES: "pink",
13989
- GO: "green",
13990
- MA: "blue",
13991
- MG: "red",
13992
- MS: "green",
13993
- MT: "blue",
13994
- PA: "red",
13995
- PB: "red",
13996
- PE: "blue",
13997
- PI: "green",
13998
- PR: "green",
13999
- RJ: "blue",
14000
- RN: "green",
14001
- RO: "blue",
14002
- RR: "green",
14003
- RS: "green",
14004
- SC: "red",
14005
- SE: "green",
14006
- SP: "black",
14007
- TO: "yellow"
14008
- };
14009
- var VALID_UFS = Object.keys(BRAZIL_STATE_PALETTES);
14010
- var BR_THEME_CONFIG = {
14011
- palettes: BRAZIL_STATE_PALETTES,
14012
- accents: BRAZIL_ACCENT_MAP,
14013
- flagUrlTemplate: (code) => VALID_UFS.includes(code) ? `/flags/${code}.svg` : null
14014
- };
14015
- var BRAZIL_STATE_COORDINATES = {
14016
- AC: [-70, -9],
14017
- AL: [-36.6, -9.5],
14018
- AM: [-64, -4],
14019
- AP: [-51, 1],
14020
- BA: [-41.5, -12.5],
14021
- CE: [-39, -5],
14022
- DF: [-47.9, -15.8],
14023
- ES: [-40.3, -19.5],
14024
- GO: [-49.5, -16],
14025
- MA: [-45, -5],
14026
- MG: [-44.5, -18.5],
14027
- MS: [-55, -21],
14028
- MT: [-56, -13],
14029
- PA: [-52, -4],
14030
- PB: [-36.8, -7.1],
14031
- PE: [-37.5, -8.3],
14032
- PI: [-43, -7.5],
14033
- PR: [-51.5, -25],
14034
- RJ: [-43.2, -22.5],
14035
- RN: [-36.5, -5.8],
14036
- RO: [-63, -11],
14037
- RR: [-61, 2],
14038
- RS: [-53, -30],
14039
- SC: [-49.5, -27.5],
14040
- SE: [-37, -10.5],
14041
- SP: [-48.5, -22.5],
14042
- TO: [-48, -10]
14043
- };
14044
- var BRAZIL_MAP_CENTER = [-54, -15];
14045
- var BRAZIL_MACRO_REGIONS = [
14046
- {
14047
- key: "sudeste",
14048
- label: "",
14049
- codes: ["SP", "RJ", "MG", "ES"],
14050
- gradient: "from-blue-500/15 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/15",
14051
- iconColor: "text-blue-600 dark:text-blue-400"
14052
- },
14053
- {
14054
- key: "sul",
14055
- label: "",
14056
- codes: ["PR", "SC", "RS"],
14057
- gradient: "from-emerald-500/15 to-teal-500/10 dark:from-emerald-500/20 dark:to-teal-500/15",
14058
- iconColor: "text-emerald-600 dark:text-emerald-400"
14059
- },
14060
- {
14061
- key: "nordeste",
14062
- label: "",
14063
- codes: ["BA", "PE", "CE", "MA", "PB", "RN", "AL", "SE", "PI"],
14064
- gradient: "from-orange-500/15 to-amber-500/10 dark:from-orange-500/20 dark:to-amber-500/15",
14065
- iconColor: "text-orange-600 dark:text-orange-400"
14066
- },
14067
- {
14068
- key: "centroOeste",
14069
- label: "",
14070
- codes: ["GO", "MT", "MS", "DF"],
14071
- gradient: "from-purple-500/15 to-fuchsia-500/10 dark:from-purple-500/20 dark:to-fuchsia-500/15",
14072
- iconColor: "text-purple-600 dark:text-purple-400"
14073
- },
14074
- {
14075
- key: "norte",
14076
- label: "",
14077
- codes: ["PA", "AM", "RO", "TO", "AC", "AP", "RR"],
14078
- gradient: "from-cyan-500/15 to-sky-500/10 dark:from-cyan-500/20 dark:to-sky-500/15",
14079
- iconColor: "text-cyan-600 dark:text-cyan-400"
14080
- }
14081
- ];
14082
- var getBrazilFlagUrl = (uf) => getSubdivisionFlagUrl("BR", uf);
14083
- var getBrazilHexColor = (uf) => getSubdivisionHexColor("BR", uf);
14084
- var getBrazilPalette = (uf) => getSubdivisionPalette("BR", uf);
14085
- var getBrazilGradient = (uf, direction) => getSubdivisionGradient("BR", uf, direction);
14086
- var getBrazilColors = (uf) => getSubdivisionColors("BR", uf);
14087
- var getBrazilAccent = (uf) => getSubdivisionAccent("BR", uf);
14088
- var isValidBrazilState = (uf) => isValidSubdivision("BR", uf);
14089
- var FUELS = [
14090
- { id: "gasolina", label: "Gasolina", color: "text-orange-400", bg: "bg-orange-500/15", ring: "ring-orange-500/40" },
14091
- { id: "etanol", label: "Etanol", color: "text-emerald-400", bg: "bg-emerald-500/15", ring: "ring-emerald-500/40" },
14092
- { id: "diesel", label: "Diesel", color: "text-slate-300", bg: "bg-slate-500/15", ring: "ring-slate-500/40" },
14093
- { id: "gnv", label: "GNV", color: "text-cyan-400", bg: "bg-cyan-500/15", ring: "ring-cyan-500/40" }
14094
- ];
14095
- var FUEL_PRICING = {
14096
- gasolina: {
14097
- currentPrice: "R$ 5.77",
14098
- aiPrice: "R$ 5.89",
14099
- delta: "+R$ 0.12",
14100
- deltaUp: true,
14101
- confidence: "94%",
14102
- revenue: "R$ 2.4M",
14103
- volume: "890K L",
14104
- margin: "12.8%",
14105
- minMax: "MIN 5.20 \u2014 MAX 6.10",
14106
- competitors: [
14107
- { name: "Shell Paulista", distance: "0.8km", price: "R$ 5.99", change: "+1.7%", up: true },
14108
- { name: "Ipiranga Centro", distance: "1.2km", price: "R$ 5.85", change: "-0.7%", up: false },
14109
- { name: "BR Distribuidora", distance: "2.1km", price: "R$ 5.92", change: "+0.5%", up: true }
14110
- ]
14111
- },
14112
- etanol: {
14113
- currentPrice: "R$ 3.45",
14114
- aiPrice: "R$ 3.49",
14115
- delta: "+R$ 0.04",
14116
- deltaUp: true,
14117
- confidence: "91%",
14118
- revenue: "R$ 980K",
14119
- volume: "620K L",
14120
- margin: "14.2%",
14121
- minMax: "MIN 2.90 \u2014 MAX 3.80",
14122
- competitors: [
14123
- { name: "Shell Paulista", distance: "0.8km", price: "R$ 3.59", change: "+2.9%", up: true },
14124
- { name: "Ipiranga Centro", distance: "1.2km", price: "R$ 3.42", change: "-0.9%", up: false },
14125
- { name: "BR Distribuidora", distance: "2.1km", price: "R$ 3.55", change: "+1.1%", up: true }
14126
- ]
14127
- },
14128
- diesel: {
14129
- currentPrice: "R$ 6.04",
14130
- aiPrice: "R$ 6.12",
14131
- delta: "+R$ 0.08",
14132
- deltaUp: true,
14133
- confidence: "89%",
14134
- revenue: "R$ 1.8M",
14135
- volume: "450K L",
14136
- margin: "10.5%",
14137
- minMax: "MIN 5.60 \u2014 MAX 6.50",
14138
- competitors: [
14139
- { name: "Shell Paulista", distance: "0.8km", price: "R$ 6.19", change: "+1.1%", up: true },
14140
- { name: "Ipiranga Centro", distance: "1.2km", price: "R$ 6.02", change: "-0.5%", up: false },
14141
- { name: "BR Distribuidora", distance: "2.1km", price: "R$ 6.15", change: "+0.8%", up: true }
14142
- ]
14143
- },
14144
- gnv: {
14145
- currentPrice: "R$ 4.22",
14146
- aiPrice: "R$ 4.29",
14147
- delta: "+R$ 0.07",
14148
- deltaUp: true,
14149
- confidence: "87%",
14150
- revenue: "R$ 420K",
14151
- volume: "180K m\xB3",
14152
- margin: "15.1%",
14153
- minMax: "MIN 3.80 \u2014 MAX 4.60",
14154
- competitors: [
14155
- { name: "GNV Center SP", distance: "1.5km", price: "R$ 4.35", change: "+1.4%", up: true },
14156
- { name: "Posto GNV Sul", distance: "2.8km", price: "R$ 4.19", change: "-0.7%", up: false },
14157
- { name: "Auto Gas BR", distance: "3.2km", price: "R$ 4.28", change: "+0.2%", up: true }
14158
- ]
14159
- }
14160
- };
14161
- var STATIONS = [
14162
- { id: "1", name: "Posto Paulista", region: "SP", value: 42e4, fuel: "gasolina", price: "R$ 5.89" },
14163
- { id: "2", name: "Posto Moema", region: "SP", value: 38e4, fuel: "etanol", price: "R$ 3.49" },
14164
- { id: "3", name: "Posto Campinas", region: "SP", value: 34e4, fuel: "diesel", price: "R$ 6.12" },
14165
- { id: "4", name: "Posto Santos", region: "SP", value: 29e4, fuel: "gnv", price: "R$ 4.29" },
14166
- { id: "5", name: "Posto Barra", region: "RJ", value: 31e4, fuel: "gasolina", price: "R$ 6.05" },
14167
- { id: "6", name: "Posto Niter\xF3i", region: "RJ", value: 26e4, fuel: "etanol", price: "R$ 3.59" },
14168
- { id: "7", name: "Posto Savassi", region: "MG", value: 29e4, fuel: "gasolina", price: "R$ 5.79" },
14169
- { id: "8", name: "Posto Contagem", region: "MG", value: 22e4, fuel: "diesel", price: "R$ 6.05" },
14170
- { id: "9", name: "Posto Boa Viagem", region: "PE", value: 24e4, fuel: "gasolina", price: "R$ 5.85" },
14171
- { id: "10", name: "Posto Moinhos", region: "RS", value: 26e4, fuel: "etanol", price: "R$ 3.42" },
14172
- { id: "11", name: "Posto Curitiba", region: "PR", value: 27e4, fuel: "diesel", price: "R$ 5.99" },
14173
- { id: "12", name: "Posto Salvador", region: "BA", value: 25e4, fuel: "gasolina", price: "R$ 5.82" },
14174
- { id: "13", name: "Posto Bras\xEDlia", region: "DF", value: 3e5, fuel: "gnv", price: "R$ 4.15" },
14175
- { id: "14", name: "Posto Goi\xE2nia", region: "GO", value: 21e4, fuel: "gasolina", price: "R$ 5.78" },
14176
- { id: "15", name: "Posto Bel\xE9m", region: "PA", value: 19e4, fuel: "diesel", price: "R$ 6.25" }
14177
- ];
14178
- var AVATARS = {
14179
- data: "https://api.dicebear.com/9.x/lorelei/svg?seed=Laura&hair=variant31&beardProbability=0&mouth=happy01",
14180
- market: "https://api.dicebear.com/9.x/notionists/svg?seed=Paulo&hair=variant35&beardProbability=0&gestureProbability=0&glasses=variant03&glassesProbability=100",
14181
- pricing: "https://api.dicebear.com/9.x/lorelei/svg?seed=Roberta&hair=variant31&beardProbability=0&glasses=variant01&glassesProbability=100&mouth=happy01"
14182
- };
14183
- function buildPipelineNodes(fuelLabel, aiPrice, state, stationName) {
14184
- const isAll = state === "ALL";
14185
- const location = stationName ? `${stationName} (${state})` : isAll ? "All Regions" : `${state} Region`;
14186
- const stateLabel = isAll ? "BR" : state;
14187
- return [
14188
- { id: "start", label: "Start", subtitle: `${fuelLabel} \xB7 ${location}`, icon: PlayIcon, color: "text-emerald-400", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.5)", step: 0 },
14189
- { id: "bigquery", label: "BigQuery Sales", subtitle: `${fuelLabel} \xB7 ${stateLabel} sales_daily`, icon: ServerStackIcon, color: "text-blue-400", bg: "bg-blue-500/15", glow: "rgba(59,130,246,0.5)", badges: [{ text: "datasource", color: "bg-blue-500/20 text-blue-300" }], step: 1 },
14190
- { id: "postgres", label: "Pricing DB", subtitle: `${stateLabel} competitor_prices`, icon: ServerStackIcon, color: "text-blue-400", bg: "bg-blue-500/15", glow: "rgba(59,130,246,0.5)", badges: [{ text: "datasource", color: "bg-blue-500/20 text-blue-300" }], step: 1 },
14191
- { id: "weather", label: "Weather", subtitle: `${stateLabel} \xB7 OpenMeteo API`, icon: CloudIcon, color: "text-cyan-400", bg: "bg-cyan-500/15", glow: "rgba(6,182,212,0.5)", badges: [{ text: "tool", color: "bg-cyan-500/20 text-cyan-300" }, { text: "external", color: "bg-gray-500/20 text-gray-300" }], step: 1 },
14192
- { id: "market", label: "Market Data", subtitle: "Brent, USD/BRL, Petrobras", icon: ArrowTrendingUpIcon, color: "text-amber-400", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.5)", badges: [{ text: "tool", color: "bg-amber-500/20 text-amber-300" }, { text: "market", color: "bg-gray-500/20 text-gray-300" }], step: 1 },
14193
- { id: "news", label: "News", subtitle: `${fuelLabel} \xB7 ${stateLabel} headlines`, icon: NewspaperIcon, color: "text-orange-400", bg: "bg-orange-500/15", glow: "rgba(249,115,22,0.5)", badges: [{ text: "tool", color: "bg-orange-500/20 text-orange-300" }, { text: "external", color: "bg-gray-500/20 text-gray-300" }], step: 1 },
14194
- { id: "agg", label: "Aggregate", subtitle: `5 inputs \u2192 ${fuelLabel} \xB7 ${stateLabel}`, icon: BoltIcon, color: "text-teal-400", bg: "bg-teal-500/15", glow: "rgba(20,184,166,0.5)", badges: [{ text: "aggregator", color: "bg-teal-500/20 text-teal-300" }], step: 2 },
14195
- { id: "data-analyst", label: "Data Analyst", subtitle: `${fuelLabel} \xB7 ${stateLabel} patterns`, icon: CpuChipIcon, color: "text-purple-400", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)", avatar: AVATARS.data, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "intermediate", color: "bg-blue-500/20 text-blue-300" }], step: 3 },
14196
- { id: "market-analyst", label: "Market Analyst", subtitle: `${fuelLabel} \xB7 ${stateLabel} trends`, icon: CpuChipIcon, color: "text-purple-400", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)", avatar: AVATARS.market, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "advanced", color: "bg-amber-500/20 text-amber-300" }], step: 4 },
14197
- { id: "pricing-mgr", label: "Pricing Manager", subtitle: `${fuelLabel} \xB7 ${location}`, icon: CpuChipIcon, color: "text-purple-400", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)", avatar: AVATARS.pricing, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "advanced", color: "bg-amber-500/20 text-amber-300" }], step: 5 },
14198
- { id: "rule", label: "Peak Hours", subtitle: `+2% \xB7 ${fuelLabel} \xB7 ${stateLabel}`, icon: ShieldCheckIcon, color: "text-rose-400", bg: "bg-rose-500/15", glow: "rgba(244,63,94,0.5)", badges: [{ text: "rule", color: "bg-rose-500/20 text-rose-300" }, { text: "percentage", color: "bg-gray-500/20 text-gray-300" }], step: 6 },
14199
- { id: "end", label: "End", subtitle: `${aiPrice} \xB7 ${location}`, icon: StopIcon, color: "text-red-400", bg: "bg-red-500/15", glow: "rgba(239,68,68,0.5)", step: 7 }
14200
- ];
13746
+ )
13747
+ ] }) }) });
14201
13748
  }
14202
- var STEP_LABELS = [
14203
- "Triggering pipeline",
14204
- "Fetching data sources (parallel)",
14205
- "Aggregating context",
14206
- "Running Data Analyst",
14207
- "Running Market Analyst",
14208
- "Running Pricing Manager",
14209
- "Applying business rules",
14210
- "Complete \u2014 R$ 5.89/L \xB7 94% confidence"
14211
- ];
14212
- function PipelinePreview({ activeFuel, activeState, activeStation, onActiveFuelChange, onActiveStateChange, onActiveStationChange, onStepChange }) {
14213
- const fuelMeta = FUELS.find((f) => f.id === activeFuel);
14214
- const fuelPricing = FUEL_PRICING[activeFuel];
14215
- const stationsInState = useMemo(() => activeState === "ALL" ? [] : STATIONS.filter((s) => s.region === activeState && s.fuel === activeFuel), [activeFuel, activeState]);
14216
- const availableStates = useMemo(() => [...new Set(STATIONS.filter((s) => s.fuel === activeFuel).map((s) => s.region))], [activeFuel]);
14217
- const selectedStationName = activeStation ? STATIONS.find((s) => s.id === activeStation)?.name.replace("Posto ", "") ?? null : null;
14218
- const pipelineNodes = useMemo(() => buildPipelineNodes(fuelMeta.label, fuelPricing.aiPrice, activeState, selectedStationName), [activeFuel, activeState, activeStation, fuelMeta.label, fuelPricing.aiPrice, selectedStationName]);
14219
- const [activeStep, setActiveStep] = useState(-1);
14220
- const intervalRef = useRef(null);
14221
- const isIdle = activeStep === -1;
14222
- const isRunning = activeStep >= 0 && activeStep < 7;
14223
- const isComplete = activeStep === 7;
14224
- const handleRun = useCallback(() => {
14225
- if (intervalRef.current) clearInterval(intervalRef.current);
14226
- setActiveStep(0);
14227
- onStepChange?.(0);
14228
- let step2 = 0;
14229
- intervalRef.current = setInterval(() => {
14230
- step2 += 1;
14231
- if (step2 > 7) {
14232
- if (intervalRef.current) clearInterval(intervalRef.current);
14233
- setActiveStep(7);
14234
- onStepChange?.(7);
14235
- } else {
14236
- setActiveStep(step2);
14237
- onStepChange?.(step2);
14238
- }
14239
- }, 1400);
14240
- }, [onStepChange]);
14241
- const handleStop = useCallback(() => {
14242
- if (intervalRef.current) clearInterval(intervalRef.current);
14243
- setActiveStep(-1);
14244
- onStepChange?.(-1);
14245
- }, [onStepChange]);
14246
- useEffect(() => () => {
14247
- if (intervalRef.current) clearInterval(intervalRef.current);
14248
- }, []);
14249
- const getStatus = (node2) => {
14250
- if (activeStep < 0) return "idle";
14251
- if (node2.step < activeStep) return "complete";
14252
- if (node2.step === activeStep) return "active";
14253
- return "idle";
14254
- };
14255
- const rows = useMemo(() => {
14256
- const result = [];
14257
- let step2 = -1;
14258
- for (const node2 of pipelineNodes) {
14259
- if (node2.step !== step2) {
14260
- result.push([]);
14261
- step2 = node2.step;
14262
- }
14263
- result[result.length - 1].push(node2);
14264
- }
14265
- return result;
14266
- }, [pipelineNodes]);
14267
- return /* @__PURE__ */ jsxs("div", { className: "h-full flex flex-col", children: [
14268
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 px-3 py-2 border-b border-white/5 shrink-0 overflow-x-auto", children: [
14269
- /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-lg bg-white/[0.03] p-0.5 gap-0.5 shrink-0", children: [
14270
- /* @__PURE__ */ jsx("span", { className: "text-[7px] font-bold uppercase tracking-wider text-gray-600 px-1.5", children: "Fuel" }),
14271
- FUELS.map((fuel) => /* @__PURE__ */ jsx(
14272
- "button",
13749
+ var CustomerAnalyticsDemo = () => /* @__PURE__ */ jsx(
13750
+ motion.div,
13751
+ {
13752
+ initial: { opacity: 0 },
13753
+ animate: { opacity: 1 },
13754
+ exit: { opacity: 0 },
13755
+ transition: { duration: 0.5 },
13756
+ className: "flex flex-col h-full overflow-hidden",
13757
+ children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
13758
+ /* @__PURE__ */ jsxs(
13759
+ motion.div,
13760
+ {
13761
+ initial: { y: -20, opacity: 0 },
13762
+ animate: { y: 0, opacity: 1 },
13763
+ transition: { duration: 0.5, delay: 0.3 },
13764
+ className: "h-14 border-b bg-background/95 backdrop-blur-sm flex items-center justify-between px-4",
13765
+ children: [
13766
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
13767
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: "An\xE1lise de Clientes" }),
13768
+ /* @__PURE__ */ jsx("span", { className: "text-xs px-2 py-1 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400 font-medium", children: "IA Analytics" })
13769
+ ] }),
13770
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
13771
+ /* @__PURE__ */ jsx(BellIcon, { className: "h-4 w-4 text-muted-foreground" }),
13772
+ /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-4 w-4 text-muted-foreground" })
13773
+ ] })
13774
+ ]
13775
+ }
13776
+ ),
13777
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-3", children: [
13778
+ /* @__PURE__ */ jsxs(
13779
+ motion.div,
14273
13780
  {
14274
- type: "button",
14275
- onClick: () => {
14276
- onActiveFuelChange?.(fuel.id);
14277
- if (!isIdle) handleStop();
14278
- },
14279
- className: `px-2 py-1 rounded-md text-[9px] font-semibold transition-all duration-200 ${activeFuel === fuel.id ? `${fuel.bg} ${fuel.color} shadow-sm` : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
14280
- children: fuel.label
14281
- },
14282
- fuel.id
14283
- ))
14284
- ] }),
14285
- /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-lg bg-white/[0.03] p-0.5 gap-0.5 shrink-0", children: [
14286
- /* @__PURE__ */ jsx("span", { className: "text-[7px] font-bold uppercase tracking-wider text-gray-600 px-1.5", children: "State" }),
14287
- /* @__PURE__ */ jsx(
14288
- "button",
14289
- {
14290
- type: "button",
14291
- onClick: () => {
14292
- onActiveStateChange?.("ALL");
14293
- onActiveStationChange?.(null);
14294
- if (!isIdle) handleStop();
14295
- },
14296
- className: `px-2 py-1 rounded-md text-[9px] font-semibold transition-all duration-200 ${activeState === "ALL" ? "bg-white/10 text-white shadow-sm" : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
14297
- children: "All"
14298
- }
14299
- ),
14300
- availableStates.map((state) => /* @__PURE__ */ jsxs(
14301
- "button",
14302
- {
14303
- type: "button",
14304
- onClick: () => {
14305
- onActiveStateChange?.(state);
14306
- onActiveStationChange?.(null);
14307
- if (!isIdle) handleStop();
14308
- },
14309
- className: `flex items-center gap-1 px-1.5 py-1 rounded-md text-[9px] font-semibold transition-all duration-200 ${activeState === state ? "bg-white/10 text-white shadow-sm" : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
13781
+ initial: { opacity: 0, y: 20 },
13782
+ animate: { opacity: 1, y: 0 },
13783
+ transition: { delay: 0.5 },
13784
+ className: "grid grid-cols-2 gap-3",
14310
13785
  children: [
14311
- /* @__PURE__ */ jsx("img", { src: `/flags/${state}.svg`, alt: state, className: "h-3.5 w-3.5 rounded-sm", loading: "lazy" }),
14312
- state
13786
+ /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-blue-500 to-cyan-500 text-white", children: [
13787
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
13788
+ /* @__PURE__ */ jsx(UsersIcon, { className: "h-5 w-5" }),
13789
+ /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+12%" })
13790
+ ] }),
13791
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "2.547" }),
13792
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Clientes Ativos" })
13793
+ ] }),
13794
+ /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-purple-500 to-pink-500 text-white", children: [
13795
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
13796
+ /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-5 w-5" }),
13797
+ /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+28%" })
13798
+ ] }),
13799
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 485k" }),
13800
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Receita Mensal" })
13801
+ ] })
14313
13802
  ]
14314
- },
14315
- state
14316
- ))
14317
- ] }),
14318
- activeState !== "ALL" && stationsInState.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-lg bg-white/[0.03] p-0.5 gap-0.5 shrink-0", children: [
14319
- /* @__PURE__ */ jsx("span", { className: "text-[7px] font-bold uppercase tracking-wider text-gray-600 px-1.5", children: "Station" }),
13803
+ }
13804
+ ),
14320
13805
  /* @__PURE__ */ jsx(
14321
- "button",
13806
+ motion.div,
14322
13807
  {
14323
- type: "button",
14324
- onClick: () => {
14325
- onActiveStationChange?.(null);
14326
- if (!isIdle) handleStop();
14327
- },
14328
- className: `px-2 py-1 rounded-md text-[9px] font-semibold transition-all duration-200 ${!activeStation ? "bg-white/10 text-white shadow-sm" : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
14329
- children: "All"
13808
+ initial: { opacity: 0, y: 20 },
13809
+ animate: { opacity: 1, y: 0 },
13810
+ transition: { delay: 0.7 },
13811
+ children: /* @__PURE__ */ jsxs(Card, { className: "border-2", children: [
13812
+ /* @__PURE__ */ jsx("div", { className: "p-3 border-b bg-gradient-to-r from-blue-600 to-cyan-600 text-white", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
13813
+ /* @__PURE__ */ jsx(SparklesIcon, { className: "h-4 w-4" }),
13814
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-bold", children: "Insights IA" })
13815
+ ] }) }),
13816
+ /* @__PURE__ */ jsxs("div", { className: "p-3 space-y-3", children: [
13817
+ /* @__PURE__ */ jsxs(
13818
+ motion.div,
13819
+ {
13820
+ initial: { opacity: 0, x: -10 },
13821
+ animate: { opacity: 1, x: 0 },
13822
+ transition: { delay: 0.9 },
13823
+ className: "flex items-start gap-2",
13824
+ children: [
13825
+ /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-green-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3 w-3 text-green-500" }) }),
13826
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
13827
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "Segmento Premium crescendo" }),
13828
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "+45% de convers\xE3o em produtos acima de R$ 500" })
13829
+ ] })
13830
+ ]
13831
+ }
13832
+ ),
13833
+ /* @__PURE__ */ jsxs(
13834
+ motion.div,
13835
+ {
13836
+ initial: { opacity: 0, x: -10 },
13837
+ animate: { opacity: 1, x: 0 },
13838
+ transition: { delay: 1.1 },
13839
+ className: "flex items-start gap-2",
13840
+ children: [
13841
+ /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-3 w-3 text-blue-500" }) }),
13842
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
13843
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "Reten\xE7\xE3o melhorou 32%" }),
13844
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "Ap\xF3s implementa\xE7\xE3o do programa de fidelidade" })
13845
+ ] })
13846
+ ]
13847
+ }
13848
+ ),
13849
+ /* @__PURE__ */ jsxs(
13850
+ motion.div,
13851
+ {
13852
+ initial: { opacity: 0, x: -10 },
13853
+ animate: { opacity: 1, x: 0 },
13854
+ transition: { delay: 1.3 },
13855
+ className: "flex items-start gap-2",
13856
+ children: [
13857
+ /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-purple-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(UsersIcon, { className: "h-3 w-3 text-purple-500" }) }),
13858
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
13859
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "847 clientes em risco" }),
13860
+ /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "Sem compras h\xE1 60+ dias - recomendar campanha" })
13861
+ ] })
13862
+ ]
13863
+ }
13864
+ )
13865
+ ] })
13866
+ ] })
14330
13867
  }
14331
13868
  ),
14332
- stationsInState.map((station) => /* @__PURE__ */ jsx(
14333
- "button",
13869
+ /* @__PURE__ */ jsx(
13870
+ motion.div,
14334
13871
  {
14335
- type: "button",
14336
- onClick: () => {
14337
- onActiveStationChange?.(station.id);
14338
- if (!isIdle) handleStop();
14339
- },
14340
- className: `px-2 py-1 rounded-md text-[9px] font-semibold transition-all duration-200 ${activeStation === station.id ? "bg-blue-500/15 text-blue-300 shadow-sm" : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
14341
- children: station.name.replace("Posto ", "")
14342
- },
14343
- station.id
14344
- ))
14345
- ] }),
14346
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2 shrink-0", children: [
14347
- activeStep >= 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", children: STEP_LABELS.map((_, index) => /* @__PURE__ */ jsx("div", { className: `h-1 w-2.5 rounded-full transition-all duration-500 ${index < activeStep || isComplete ? "bg-emerald-500" : index === activeStep ? "bg-blue-500 animate-pulse" : "bg-white/10"}` }, index)) }),
14348
- isComplete && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5", children: [
14349
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3 w-3 text-emerald-400" }),
14350
- /* @__PURE__ */ jsxs("span", { className: "text-[8px] font-semibold text-emerald-400", children: [
14351
- fuelPricing.aiPrice,
14352
- " \xB7 ",
14353
- fuelPricing.confidence
14354
- ] })
14355
- ] }),
14356
- /* @__PURE__ */ jsx("div", { className: `h-2 w-2 rounded-full ${isRunning ? "bg-blue-500 animate-pulse" : isComplete ? "bg-emerald-500" : "bg-gray-600"}` }),
14357
- /* @__PURE__ */ jsx("span", { className: "text-[9px] text-gray-500 max-w-[120px] truncate", children: activeStep >= 0 ? STEP_LABELS[activeStep] : "Ready" }),
14358
- isIdle ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg bg-gradient-to-r from-blue-600 to-indigo-600 px-3 py-1 text-[10px] font-semibold text-white shadow-lg shadow-blue-500/20 hover:shadow-blue-500/30 hover:scale-105 active:scale-95 transition-all", children: [
14359
- /* @__PURE__ */ jsx(PlayIcon, { className: "h-3 w-3" }),
14360
- " Run"
14361
- ] }) : isRunning ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleStop, className: "flex items-center gap-1 rounded-lg bg-rose-600/80 px-3 py-1 text-[10px] font-semibold text-white", children: [
14362
- /* @__PURE__ */ jsx(StopIcon, { className: "h-3 w-3" }),
14363
- " Stop"
14364
- ] }) : /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1 text-[10px] font-medium text-gray-300 hover:bg-white/5", children: [
14365
- /* @__PURE__ */ jsx(PlayIcon, { className: "h-3 w-3" }),
14366
- " Run Again"
14367
- ] })
13872
+ initial: { opacity: 0, y: 20 },
13873
+ animate: { opacity: 1, y: 0 },
13874
+ transition: { delay: 1.5 },
13875
+ children: /* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
13876
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold mb-2", children: "Top Clientes (\xDAltimo M\xEAs)" }),
13877
+ /* @__PURE__ */ jsx("div", { className: "space-y-2", children: ["Maria Silva", "Jo\xE3o Santos", "Ana Costa"].map((name, i) => /* @__PURE__ */ jsxs(
13878
+ motion.div,
13879
+ {
13880
+ initial: { opacity: 0, x: -10 },
13881
+ animate: { opacity: 1, x: 0 },
13882
+ transition: { delay: 1.7 + i * 0.2 },
13883
+ className: "flex items-center justify-between",
13884
+ children: [
13885
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
13886
+ /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-gradient-to-br from-gray-400 to-gray-600 flex items-center justify-center text-white text-[10px] font-bold", children: name.charAt(0) }),
13887
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium", children: name })
13888
+ ] }),
13889
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
13890
+ "R$ ",
13891
+ Math.floor(Math.random() * 50 + 10),
13892
+ "k"
13893
+ ] })
13894
+ ]
13895
+ },
13896
+ name
13897
+ )) })
13898
+ ] })
13899
+ }
13900
+ )
14368
13901
  ] })
14369
- ] }),
14370
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center gap-0 overflow-x-auto px-6 py-4", children: [
14371
- /* @__PURE__ */ jsx("style", { children: `
14372
- @keyframes nodeGlow { 0%, 100% { box-shadow: 0 0 12px var(--glow); } 50% { box-shadow: 0 0 28px var(--glow); } }
14373
- @keyframes edgeFlow { to { stroke-dashoffset: -12; } }
14374
- ` }),
14375
- rows.map((row, rowIndex) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0 shrink-0", children: [
14376
- rowIndex > 0 && row[0] && /* @__PURE__ */ jsx("svg", { width: "40", height: "2", className: "shrink-0 mx-1.5", children: /* @__PURE__ */ jsx("line", { x1: "0", y1: "1", x2: "40", y2: "1", stroke: activeStep >= row[0].step ? "#10b981" : "#374151", strokeWidth: "2", strokeDasharray: "4 3", style: { animation: activeStep === row[0].step ? "edgeFlow 0.8s linear infinite" : "none" } }) }),
14377
- /* @__PURE__ */ jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node2) => {
14378
- const status = getStatus(node2);
14379
- return /* @__PURE__ */ jsxs(
14380
- "div",
14381
- {
14382
- className: `liquid-surface rounded-2xl px-4 py-3 transition-all duration-500 ${row.length > 1 ? "w-[180px]" : "w-[220px]"} ${status === "active" ? "ring-2 ring-blue-500/50 scale-[1.03]" : status === "complete" ? "ring-1 ring-emerald-500/30" : "opacity-40"}`,
14383
- style: status === "active" ? { "--glow": node2.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
14384
- children: [
14385
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 mb-1.5", children: [
14386
- node2.avatar ? /* @__PURE__ */ jsx("img", { src: node2.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node2.bg}`, children: /* @__PURE__ */ jsx(node2.icon, { className: `h-5 w-5 ${node2.color}` }) }),
14387
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
14388
- /* @__PURE__ */ jsx("div", { className: "text-[13px] font-semibold text-white truncate", children: node2.label }),
14389
- /* @__PURE__ */ jsx("div", { className: "text-[9px] text-gray-500 truncate", children: node2.subtitle })
14390
- ] }),
14391
- status === "complete" ? /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-5 w-5 text-emerald-400 shrink-0" }) : null
14392
- ] }),
14393
- node2.badges && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node2.badges.map((badge) => /* @__PURE__ */ jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
14394
- ]
14395
- },
14396
- node2.id
14397
- );
14398
- }) })
14399
- ] }, rowIndex))
14400
13902
  ] })
14401
- ] });
14402
- }
14403
- function AgentAnalysisCard2({ name, avatar, duration, output }) {
14404
- return /* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl p-3 transition-all duration-300", children: [
14405
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
14406
- /* @__PURE__ */ jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-lg" }),
14407
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
14408
- /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: name }),
14409
- /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: duration })
14410
- ] }),
14411
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 text-emerald-400 shrink-0" })
14412
- ] }),
14413
- /* @__PURE__ */ jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: output })
14414
- ] });
14415
- }
14416
- function MarketPricesCard2({ competitors }) {
14417
- return /* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl p-3.5", children: [
14418
- /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-1.5 text-[10px] font-semibold text-gray-400", children: [
14419
- /* @__PURE__ */ jsx(TableCellsIcon, { className: "h-3 w-3 text-sky-500" }),
14420
- "Market Prices"
14421
- ] }),
14422
- /* @__PURE__ */ jsx("div", { className: "space-y-1", children: competitors.map((competitor) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-[9px]", children: [
14423
- /* @__PURE__ */ jsx("span", { className: "text-gray-400 truncate mr-2", children: competitor.name }),
14424
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
14425
- /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: competitor.distance }),
14426
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-white", children: competitor.price }),
14427
- /* @__PURE__ */ jsx("span", { className: `font-semibold ${competitor.up ? "text-emerald-400" : "text-rose-400"}`, children: competitor.change })
14428
- ] })
14429
- ] }, competitor.name)) })
14430
- ] });
14431
- }
14432
- var TOOL_OUTPUTS = {
14433
- SP: {
14434
- weather: "Clear skies next 7 days. Temp 28-32\xB0C. No rain expected \u2014 stable demand pattern for commuters.",
14435
- market: "Brent $82.40 (+2.3%). USD/BRL 5.12 (stable). Petrobras wholesale +1.2% effective Monday.",
14436
- news: "OPEC holds production steady. Petrobras announces refinery maintenance in Cubat\xE3o \u2014 supply may tighten in SP region next week."
14437
- },
14438
- RJ: {
14439
- weather: "Scattered rain Thu-Fri. Temp 26-30\xB0C. Weekend clear \u2014 expect lower weekday volumes, rebound Sat-Sun.",
14440
- market: "Brent $82.40 (+2.3%). USD/BRL 5.12. Reduc refinery running at 92% capacity \u2014 normal supply.",
14441
- news: "Rio toll road expansion opening next month. New stations in Barra da Tijuca corridor \u2014 increased competition expected."
14442
- },
14443
- MG: {
14444
- weather: "Dry season continues. Temp 24-28\xB0C. Rural demand rising with harvest season logistics.",
14445
- market: "Brent $82.40. REGAP refinery at full capacity. Ethanol supply strong from Tri\xE2ngulo Mineiro mills.",
14446
- news: "MG state reduces ICMS on diesel by 2% starting next month. Fleet operators may shift purchasing patterns."
14447
- },
14448
- PE: {
14449
- weather: "Tropical heat 30-34\xB0C. Brief showers. High AC usage boosting GNV demand for taxi fleets.",
14450
- market: "Northeast wholesale prices 3% below Southeast. Lower logistics costs from Suape port proximity.",
14451
- news: "Recife urban mobility plan adds 50 GNV buses. Growing alternative fuel adoption in metro region."
14452
- },
14453
- RS: {
14454
- weather: "Cold front arriving. Temp dropping to 12-18\xB0C. Diesel demand spike expected for heating and freight.",
14455
- market: "Brent $82.40. Cross-border pricing from Argentina putting downward pressure on border stations.",
14456
- news: "RS floods recovery driving construction diesel demand. Federal highway repairs boosting freight volumes."
14457
- },
14458
- ALL: {
14459
- weather: "National: mixed conditions. Clear in SE, rain in NE coast, cold front in South. Regional demand patterns diverging.",
14460
- market: "Brent $82.40 (+2.3%). USD/BRL 5.12. Petrobras wholesale adjustment +1.2% Monday. Ethanol harvest underway.",
14461
- news: "OPEC holds output. Petrobras maintenance in SP. MG cuts diesel ICMS. RS recovery drives freight demand."
14462
- }
14463
- };
14464
- var AGENT_ANALYSES = {
14465
- gasolina: {
14466
- dataAnalyst: "Sales volume up 12% MoM in SP region. Peak demand 6-9 AM and 5-8 PM. Weekend volumes 18% lower. 3 stations below target margin at current pricing.",
14467
- marketAnalyst: "Shell Paulista raised prices +1.7% yesterday. Ipiranga holding steady. Brent crude up 2.3% this week. USD/BRL stable at 5.12. Weather forecast clear \u2014 no demand impact expected.",
14468
- pricingManager: "Recommend R$ 5.89/L (+R$ 0.12). Captures competitor gap while maintaining 12.8% margin. Peak hours rule adds +2% during rush. All prices within MIN 5.20 \u2014 MAX 6.10 guardrails."
14469
- },
14470
- etanol: {
14471
- dataAnalyst: "Etanol demand rising seasonally. Volume 620K L with 14.2% margin. Sugar crop outlook positive \u2014 supply stable through Q2.",
14472
- marketAnalyst: "Etanol/gasoline ratio at 68% \u2014 below the 70% threshold that drives consumer switching. Competitors averaging R$ 3.52 in SP region.",
14473
- pricingManager: "Recommend R$ 3.49/L (+R$ 0.04). Conservative increase to maintain ratio advantage. Confidence 91% based on stable supply and competitor positioning."
14474
- },
14475
- diesel: {
14476
- dataAnalyst: "Diesel volumes declining 3% \u2014 seasonal fleet maintenance cycle. B2B contracts account for 72% of volume. Margin pressure from logistics operators.",
14477
- marketAnalyst: "Diesel supply tightening globally. Brent+crack spread widening. Competitor BR Distribuidora cut prices -0.5% to gain fleet contracts.",
14478
- pricingManager: "Recommend R$ 6.12/L (+R$ 0.08). Modest increase justified by supply constraints. Fleet contracts locked \u2014 minimal churn risk. Confidence 89%."
14479
- },
14480
- gnv: {
14481
- dataAnalyst: "GNV adoption accelerating \u2014 15% new vehicle conversions in SP. Volume 180K m\xB3 with highest margin at 15.1%. Limited competition in the segment.",
14482
- marketAnalyst: "Only 3 GNV competitors within 5km radius. GNV Center SP at R$ 4.35 is the price ceiling. Natural gas wholesale costs flat this quarter.",
14483
- pricingManager: "Recommend R$ 4.29/L (+R$ 0.07). Room to increase given limited competition. Confidence 87% \u2014 lower due to smaller dataset but strong margin signal."
14484
13903
  }
14485
- };
14486
- function FuelDashboardView({ activeFuel, onActiveFuelChange }) {
14487
- const [activeState, setActiveState] = useState("ALL");
14488
- const [activeStation, setActiveStation] = useState(null);
14489
- const [pipelineStep, setPipelineStep] = useState(-1);
14490
- const pricing = FUEL_PRICING[activeFuel];
14491
- const fuelMeta = FUELS.find((f) => f.id === activeFuel);
14492
- const analysis = AGENT_ANALYSES[activeFuel];
14493
- const selectedMapState = activeState === "ALL" ? null : activeState;
14494
- const toggleMapState = useCallback((code) => {
14495
- setActiveState((prev) => prev === code ? "ALL" : code);
14496
- setActiveStation(null);
14497
- }, []);
14498
- const isMapActive = useCallback((code) => code === selectedMapState, [selectedMapState]);
14499
- const toolOutputs = TOOL_OUTPUTS[selectedMapState ?? "ALL"] ?? TOOL_OUTPUTS["ALL"];
14500
- const filteredStations = useMemo(() => {
14501
- const byFuel = STATIONS.filter((s) => s.fuel === activeFuel);
14502
- return selectedMapState ? byFuel.filter((s) => s.region === selectedMapState) : byFuel;
14503
- }, [activeFuel, selectedMapState]);
14504
- return /* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl overflow-hidden", children: [
14505
- /* @__PURE__ */ jsx(
14506
- PipelinePreview,
14507
- {
14508
- activeFuel,
14509
- activeState,
14510
- activeStation,
14511
- onActiveFuelChange,
14512
- onActiveStateChange: setActiveState,
14513
- onActiveStationChange: setActiveStation,
14514
- onStepChange: setPipelineStep
14515
- }
14516
- ),
14517
- pipelineStep >= 3 && /* @__PURE__ */ jsxs("div", { className: "border-t border-white/5 px-3 py-2", children: [
14518
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-2", children: [
14519
- pipelineStep >= 3 && /* @__PURE__ */ jsx(AgentAnalysisCard2, { name: "Data Analyst", avatar: AVATARS.data, duration: "1.8s", output: analysis.dataAnalyst }),
14520
- pipelineStep >= 4 && /* @__PURE__ */ jsx(AgentAnalysisCard2, { name: "Market Analyst", avatar: AVATARS.market, duration: "2.1s", output: analysis.marketAnalyst }),
14521
- pipelineStep >= 5 && /* @__PURE__ */ jsx(AgentAnalysisCard2, { name: "Pricing Manager", avatar: AVATARS.pricing, duration: "1.4s", output: analysis.pricingManager })
14522
- ] }),
14523
- pipelineStep >= 6 && /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-[200px_1fr_1fr] gap-2", children: [
14524
- /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-xl overflow-hidden", children: /* @__PURE__ */ jsx(
14525
- InteractiveGeoMap,
14526
- {
14527
- items: STATIONS.filter((s) => s.fuel === activeFuel),
14528
- getRegionCode: (item) => item.region,
14529
- regionCoordinates: BRAZIL_STATE_COORDINATES,
14530
- defaultCenter: BRAZIL_MAP_CENTER,
14531
- geoJsonUrl: "/maps/brazil.geo.json",
14532
- regionPropertyKey: "code",
14533
- projectionType: "mercator",
14534
- getRegionColor: (code) => BRAZIL_STATE_PALETTES[code]?.primary ?? "#374151",
14535
- isRegionActive: isMapActive,
14536
- onRegionToggle: toggleMapState,
14537
- formatCounter: (total, regions, activeItems) => selectedMapState ? `${activeItems ?? 0} ${fuelMeta.label} stations in ${selectedMapState}` : `${total} stations \xB7 ${regions} states`,
14538
- ariaLabel: `Brazil ${fuelMeta.label} stations`,
14539
- className: "h-full"
14540
- }
14541
- ) }),
14542
- /* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl p-3", children: [
14543
- /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-1.5 text-[10px] font-semibold text-gray-400", children: [
14544
- /* @__PURE__ */ jsx(RocketLaunchIcon, { className: "h-3.5 w-3.5 text-amber-500" }),
14545
- "AI Recommendations \u2014 ",
14546
- fuelMeta.label,
14547
- selectedMapState && /* @__PURE__ */ jsx("img", { src: `/flags/${selectedMapState}.svg`, alt: selectedMapState, className: "h-4 w-4 rounded-sm" }),
14548
- selectedMapState && /* @__PURE__ */ jsx("span", { className: "text-[9px] font-bold text-white", children: selectedMapState }),
14549
- /* @__PURE__ */ jsxs("span", { className: "ml-auto rounded-full bg-emerald-500/10 px-1.5 py-0.5 text-[8px] font-semibold text-emerald-400", children: [
14550
- pricing.confidence,
14551
- " confidence"
14552
- ] })
14553
- ] }),
14554
- /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
14555
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[auto_1fr_auto_auto_auto_auto] items-center gap-x-3 px-2 py-1 text-[8px] font-bold uppercase tracking-wider text-gray-600", children: [
14556
- /* @__PURE__ */ jsx("span", { children: "State" }),
14557
- /* @__PURE__ */ jsx("span", { children: "Station" }),
14558
- /* @__PURE__ */ jsx("span", { children: "Current" }),
14559
- /* @__PURE__ */ jsx("span", { children: "AI Price" }),
14560
- /* @__PURE__ */ jsx("span", { children: "Delta" }),
14561
- /* @__PURE__ */ jsx("span", { children: "Status" })
14562
- ] }),
14563
- filteredStations.slice(0, 6).map((station) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[auto_1fr_auto_auto_auto_auto] items-center gap-x-3 rounded-lg px-2 py-1.5 hover:bg-white/[0.03] text-[9px]", children: [
14564
- /* @__PURE__ */ jsx("img", { src: `/flags/${station.region}.svg`, alt: station.region, className: "h-4 w-4 rounded-sm" }),
14565
- /* @__PURE__ */ jsx("span", { className: "text-gray-300 truncate", children: station.name }),
14566
- /* @__PURE__ */ jsx("span", { className: "text-gray-500 line-through", children: station.price }),
14567
- /* @__PURE__ */ jsx("span", { className: "font-bold text-white", children: pricing.aiPrice }),
14568
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-emerald-400", children: pricing.delta }),
14569
- /* @__PURE__ */ jsx("span", { className: "rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[7px] font-semibold text-emerald-400", children: "\u2713" })
14570
- ] }, station.id)),
14571
- filteredStations.length === 0 && /* @__PURE__ */ jsxs("div", { className: "px-2 py-3 text-center text-[9px] text-gray-500 italic", children: [
14572
- "No ",
14573
- fuelMeta.label,
14574
- " stations in ",
14575
- selectedMapState
14576
- ] })
14577
- ] }),
14578
- /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 border-t border-white/5 pt-2", children: [
14579
- /* @__PURE__ */ jsxs("button", { type: "button", className: "rounded-lg bg-emerald-600 px-2.5 py-1 text-[9px] font-semibold text-white flex items-center gap-1", children: [
14580
- /* @__PURE__ */ jsx(HandThumbUpIcon, { className: "h-3 w-3" }),
14581
- " Approve ",
14582
- selectedMapState ? filteredStations.length : "All"
13904
+ );
13905
+ var FinancialDemo = () => /* @__PURE__ */ jsx(
13906
+ motion.div,
13907
+ {
13908
+ initial: { opacity: 0 },
13909
+ animate: { opacity: 1 },
13910
+ exit: { opacity: 0 },
13911
+ transition: { duration: 0.5 },
13912
+ className: "flex flex-col h-full overflow-hidden",
13913
+ children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
13914
+ /* @__PURE__ */ jsxs(
13915
+ motion.div,
13916
+ {
13917
+ initial: { y: -20, opacity: 0 },
13918
+ animate: { y: 0, opacity: 1 },
13919
+ transition: { duration: 0.5, delay: 0.3 },
13920
+ className: "h-14 border-b bg-background/95 backdrop-blur-sm flex items-center justify-between px-4",
13921
+ children: [
13922
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
13923
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: "Planejamento Financeiro" }),
13924
+ /* @__PURE__ */ jsx("span", { className: "text-xs px-2 py-1 rounded-full bg-green-500/10 text-green-600 dark:text-green-400 font-medium", children: "Q4 2024" })
14583
13925
  ] }),
14584
- /* @__PURE__ */ jsx("button", { type: "button", className: "rounded-lg bg-gray-700 px-2.5 py-1 text-[9px] font-semibold text-gray-300", children: "Modify" }),
14585
- /* @__PURE__ */ jsxs("span", { className: "ml-auto text-[8px] text-purple-400 flex items-center gap-1", children: [
14586
- /* @__PURE__ */ jsx(AdjustmentsHorizontalIcon, { className: "h-3 w-3" }),
14587
- " ",
14588
- pricing.minMax
13926
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
13927
+ /* @__PURE__ */ jsx(BellIcon, { className: "h-4 w-4 text-muted-foreground" }),
13928
+ /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-4 w-4 text-muted-foreground" })
14589
13929
  ] })
14590
- ] })
14591
- ] }),
14592
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
14593
- /* @__PURE__ */ jsxs("div", { className: "liquid-surface rounded-xl p-2.5", children: [
14594
- /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-1.5 text-[8px] font-bold uppercase tracking-wider text-gray-600", children: [
14595
- "Tool Outputs",
14596
- selectedMapState && /* @__PURE__ */ jsxs("span", { className: "normal-case tracking-normal font-semibold text-white", children: [
14597
- " \u2014 ",
14598
- selectedMapState
14599
- ] })
14600
- ] }),
14601
- [
14602
- { icon: CloudIcon, tool: "Weather", color: "text-cyan-400", bg: "bg-cyan-500/15", output: toolOutputs.weather },
14603
- { icon: ArrowTrendingUpIcon, tool: "Market", color: "text-amber-400", bg: "bg-amber-500/15", output: toolOutputs.market },
14604
- { icon: NewspaperIcon, tool: "News", color: "text-orange-400", bg: "bg-orange-500/15", output: toolOutputs.news }
14605
- ].map((t) => /* @__PURE__ */ jsxs("div", { className: "mb-1.5", children: [
14606
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 mb-0.5", children: [
14607
- /* @__PURE__ */ jsx(t.icon, { className: `h-3 w-3 ${t.color}` }),
14608
- /* @__PURE__ */ jsx("span", { className: `text-[9px] font-semibold ${t.color}`, children: t.tool }),
14609
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "ml-auto h-3 w-3 text-emerald-400" })
14610
- ] }),
14611
- /* @__PURE__ */ jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: t.output })
14612
- ] }, t.tool))
14613
- ] }),
14614
- /* @__PURE__ */ jsx(MarketPricesCard2, { competitors: pricing.competitors })
14615
- ] })
14616
- ] })
14617
- ] })
14618
- ] });
14619
- }
14620
- function FuelPipelineDemo({ defaultFuel = "gasolina", onFuelChange } = {}) {
14621
- const [activeFuel, setActiveFuel] = useState(defaultFuel);
14622
- const handleFuelChange = useCallback((fuel) => {
14623
- setActiveFuel(fuel);
14624
- onFuelChange?.(fuel);
14625
- }, [onFuelChange]);
14626
- return /* @__PURE__ */ jsx(FuelDashboardView, { activeFuel, onActiveFuelChange: handleFuelChange });
14627
- }
14628
- var INCIDENTS = [
14629
- { id: "lambda-timeout", label: "Lambda Timeout", service: "kori-customers", severity: "critical", color: "text-red-400", bg: "bg-red-500/15" },
14630
- { id: "db-pool", label: "DB Pool Exhausted", service: "fuel-analytics", severity: "critical", color: "text-orange-400", bg: "bg-orange-500/15" },
14631
- { id: "deploy-fail", label: "Deploy Rollback", service: "windsock-auth", severity: "high", color: "text-amber-400", bg: "bg-amber-500/15" },
14632
- { id: "memory-leak", label: "Memory Leak", service: "astrlabe-workflows", severity: "medium", color: "text-sky-400", bg: "bg-sky-500/15" }
14633
- ];
14634
- var INCIDENT_DETAILS = {
14635
- "lambda-timeout": {
14636
- rootCause: "Cold starts + unoptimized Sequelize query scanning 2.3M rows without index on organization_id",
14637
- agentAnalysis: "Correlated Lambda Duration spike with Aurora slow query log. Found full table scan on customers table \u2014 missing index on (organization_id, created_at). Cold start adds 4.2s, query adds 24.8s = timeout.",
14638
- remediation: "CREATE INDEX CONCURRENTLY idx_customers_org_created ON customers(organization_id, created_at); Set provisioned concurrency to 5.",
14639
- result: "p99 latency: 29s \u2192 340ms. Zero timeouts in last 2 hours.",
14640
- timeline: [
14641
- { time: "03:14", event: "CloudWatch alarm: kori-customers Duration > 29s", color: "text-red-400" },
14642
- { time: "03:14", event: "Agent triggered \u2014 pulling CloudWatch metrics + Aurora slow query log", color: "text-sky-400" },
14643
- { time: "03:15", event: "Root cause identified: missing index on customers(organization_id)", color: "text-amber-400" },
14644
- { time: "03:15", event: "Remediation: CREATE INDEX CONCURRENTLY executed", color: "text-purple-400" },
14645
- { time: "03:16", event: "Provisioned concurrency set to 5 via CDK update", color: "text-purple-400" },
14646
- { time: "03:18", event: "Verified: p99 latency 340ms, 0 timeouts", color: "text-emerald-400" }
14647
- ]
14648
- },
14649
- "db-pool": {
14650
- rootCause: "fuel-analytics Lambda opening new connections per invocation without reusing pool. 300 concurrent executions = 300 connections.",
14651
- agentAnalysis: "Correlated RDS Proxy connection count with Lambda concurrency. Found pool initialization inside handler function (runs every invocation) instead of module scope (runs once per cold start).",
14652
- remediation: "Moved pool init to module scope. Set Lambda reserved concurrency to 50. Enabled RDS Proxy idle connection pruning at 60s.",
14653
- result: "Steady-state connections: 300 \u2192 12. Zero connection errors in last 4 hours.",
14654
- timeline: [
14655
- { time: "02:41", event: "CloudWatch alarm: fuel-analytics DatabaseConnections = 300", color: "text-red-400" },
14656
- { time: "02:41", event: "Agent triggered \u2014 analyzing connection patterns + Lambda code", color: "text-sky-400" },
14657
- { time: "02:42", event: "Root cause: pool created inside handler, not module scope", color: "text-amber-400" },
14658
- { time: "02:43", event: "Fix applied: pool init moved to module scope", color: "text-purple-400" },
14659
- { time: "02:43", event: "Reserved concurrency set to 50", color: "text-purple-400" },
14660
- { time: "02:45", event: "Verified: 12 steady connections, 0 errors", color: "text-emerald-400" }
14661
- ]
14662
- },
14663
- "deploy-fail": {
14664
- rootCause: "New Lambda handler binary missing from S3 asset bucket. CDK synth succeeded but cargo-lambda build artifact was not uploaded due to CI timeout.",
14665
- agentAnalysis: 'Traced CloudFormation events: Lambda function update failed with "S3 key not found". Cross-referenced with GitHub Actions run \u2014 cargo-lambda build step timed out at 10min limit. Build artifact never uploaded to cdk.out.',
14666
- remediation: "Triggered rebuild with extended timeout (20min). Verified S3 asset uploaded. Re-deployed stack successfully.",
14667
- result: "Stack status: UPDATE_COMPLETE. All 129 handlers healthy. CI timeout increased to 20min.",
14668
- timeline: [
14669
- { time: "14:22", event: "CDK deploy failed: UPDATE_ROLLBACK_COMPLETE", color: "text-red-400" },
14670
- { time: "14:22", event: "Agent triggered \u2014 reading CloudFormation events", color: "text-sky-400" },
14671
- { time: "14:23", event: "Root cause: S3 asset missing \u2014 CI build timeout", color: "text-amber-400" },
14672
- { time: "14:24", event: "Rebuild triggered with 20min timeout", color: "text-purple-400" },
14673
- { time: "14:38", event: "Build complete. Stack redeployed successfully.", color: "text-purple-400" },
14674
- { time: "14:40", event: "Verified: all 129 handlers healthy", color: "text-emerald-400" }
14675
- ]
14676
- },
14677
- "memory-leak": {
14678
- rootCause: "Workflow execution SSE connections not closed on client disconnect. EventSource objects accumulate in Node.js heap across warm invocations.",
14679
- agentAnalysis: "Memory usage trend shows linear growth correlated with SSE connection count. Found missing cleanup in workflow-runner SSE handler \u2014 no abort signal listener. Warm Lambda instances accumulate stale connections across invocations.",
14680
- remediation: "Added AbortSignal listener to SSE handler. Implemented connection TTL of 5 minutes. Forced Lambda recycling at 90% memory threshold.",
14681
- result: "Memory stable at 45-55%. Zero OOM kills in last 8 hours.",
14682
- timeline: [
14683
- { time: "10:00", event: "Memory trending alarm: 85% and rising", color: "text-amber-400" },
14684
- { time: "10:00", event: "Agent triggered \u2014 analyzing memory trend + heap snapshots", color: "text-sky-400" },
14685
- { time: "10:02", event: "Root cause: SSE connections not closed on disconnect", color: "text-amber-400" },
14686
- { time: "10:03", event: "Fix: AbortSignal listener + 5min TTL added", color: "text-purple-400" },
14687
- { time: "10:03", event: "Lambda recycling at 90% memory threshold", color: "text-purple-400" },
14688
- { time: "10:10", event: "Verified: memory stable at 48%, 0 OOM kills", color: "text-emerald-400" }
14689
- ]
14690
- }
14691
- };
14692
- var AVATARS2 = {
14693
- triage: "https://api.dicebear.com/9.x/lorelei/svg?seed=Sentinel&hair=variant31&beardProbability=0&mouth=happy01",
14694
- debug: "https://api.dicebear.com/9.x/notionists/svg?seed=Debugger&hair=variant35&beardProbability=0&gestureProbability=0&glasses=variant03&glassesProbability=100",
14695
- remediate: "https://api.dicebear.com/9.x/lorelei/svg?seed=Fixer&hair=variant31&beardProbability=0&glasses=variant01&glassesProbability=100&mouth=happy01"
14696
- };
14697
- function buildNodes(incident) {
14698
- return [
14699
- { id: "alert", label: "Alert Detected", subtitle: `${incident.service} \xB7 ${incident.severity}`, icon: ExclamationTriangleIcon, color: "text-red-400", bg: "bg-red-500/15", glow: "rgba(239,68,68,0.5)", step: 0, badges: [{ text: incident.severity, color: "bg-red-500/20 text-red-300" }] },
14700
- { id: "metrics", label: "Pull Metrics", subtitle: "CloudWatch \xB7 15min window", icon: ChartBarIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
14701
- { id: "logs", label: "Analyze Logs", subtitle: "CloudWatch Logs \xB7 error filter", icon: CommandLineIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
14702
- { id: "infra", label: "Infra State", subtitle: "CDK \xB7 stack status \xB7 config", icon: CloudIcon, color: "text-sky-400", bg: "bg-sky-500/15", glow: "rgba(14,165,233,0.5)", step: 1, badges: [{ text: "datasource", color: "bg-sky-500/20 text-sky-300" }] },
14703
- { id: "correlate", label: "Correlate", subtitle: "3 sources \u2192 unified context", icon: BoltIcon, color: "text-amber-400", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.5)", step: 2, badges: [{ text: "aggregator", color: "bg-amber-500/20 text-amber-300" }] },
14704
- { id: "debug-agent", label: "Debug Agent", subtitle: "Root cause analysis", icon: CpuChipIcon, color: "text-purple-400", bg: "bg-purple-500/15", glow: "rgba(168,85,247,0.5)", step: 3, avatar: AVATARS2.debug, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "Claude", color: "bg-violet-500/20 text-violet-300" }] },
14705
- { id: "plan", label: "Remediation Plan", subtitle: "Generate fix + rollback plan", icon: DocumentMagnifyingGlassIcon, color: "text-amber-400", bg: "bg-amber-500/15", glow: "rgba(245,158,11,0.5)", step: 4, avatar: AVATARS2.triage, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "advanced", color: "bg-amber-500/20 text-amber-300" }] },
14706
- { id: "execute", label: "Auto-Remediate", subtitle: "Apply fix \xB7 human-in-the-loop", icon: WrenchScrewdriverIcon, color: "text-red-400", bg: "bg-red-500/15", glow: "rgba(239,68,68,0.5)", step: 5, avatar: AVATARS2.remediate, badges: [{ text: "agent", color: "bg-purple-500/20 text-purple-300" }, { text: "HITL", color: "bg-amber-500/20 text-amber-300" }] },
14707
- { id: "verify", label: "Verify", subtitle: "Confirm resolution \xB7 metrics ok", icon: ShieldCheckIcon, color: "text-emerald-400", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.5)", step: 6, badges: [{ text: "check", color: "bg-emerald-500/20 text-emerald-300" }] },
14708
- { id: "resolved", label: "Resolved", subtitle: "Incident closed \xB7 MTTR 4min", icon: CheckCircleIcon$1, color: "text-emerald-400", bg: "bg-emerald-500/15", glow: "rgba(16,185,129,0.5)", step: 7 }
14709
- ];
14710
- }
14711
- var STEP_LABELS2 = [
14712
- "Alert detected \u2014 triaging",
14713
- "Pulling metrics, logs, infra state (parallel)",
14714
- "Correlating across sources",
14715
- "Debug agent analyzing root cause",
14716
- "Generating remediation plan",
14717
- "Executing auto-remediation",
14718
- "Verifying resolution",
14719
- "Resolved \u2014 incident closed"
14720
- ];
14721
- function IncidentPipelineDemo({
14722
- defaultIncident = "lambda-timeout",
14723
- onIncidentChange
14724
- } = {}) {
14725
- const [activeIncident, setActiveIncident] = useState(defaultIncident);
14726
- const incident = INCIDENTS.find((i) => i.id === activeIncident);
14727
- const detail = INCIDENT_DETAILS[activeIncident];
14728
- const nodes = useMemo(() => buildNodes(incident), [activeIncident]);
14729
- const [activeStep, setActiveStep] = useState(-1);
14730
- const intervalRef = useRef(null);
14731
- const isIdle = activeStep === -1;
14732
- const isRunning = activeStep >= 0 && activeStep < 7;
14733
- const isComplete = activeStep === 7;
14734
- const handleRun = useCallback(() => {
14735
- if (intervalRef.current) clearInterval(intervalRef.current);
14736
- setActiveStep(0);
14737
- let step2 = 0;
14738
- intervalRef.current = setInterval(() => {
14739
- step2 += 1;
14740
- if (step2 > 7) {
14741
- if (intervalRef.current) clearInterval(intervalRef.current);
14742
- setActiveStep(7);
14743
- } else {
14744
- setActiveStep(step2);
14745
- }
14746
- }, 1200);
14747
- }, []);
14748
- const handleStop = useCallback(() => {
14749
- if (intervalRef.current) clearInterval(intervalRef.current);
14750
- setActiveStep(-1);
14751
- }, []);
14752
- const handleIncidentSelect = useCallback((id) => {
14753
- setActiveIncident(id);
14754
- onIncidentChange?.(id);
14755
- if (!isIdle) handleStop();
14756
- }, [isIdle, handleStop, onIncidentChange]);
14757
- useEffect(() => () => {
14758
- if (intervalRef.current) clearInterval(intervalRef.current);
14759
- }, []);
14760
- const getStatus = (node2) => {
14761
- if (activeStep < 0) return "idle";
14762
- if (node2.step < activeStep) return "complete";
14763
- if (node2.step === activeStep) return "active";
14764
- return "idle";
14765
- };
14766
- const rows = useMemo(() => {
14767
- const result = [];
14768
- let step2 = -1;
14769
- for (const node2 of nodes) {
14770
- if (node2.step !== step2) {
14771
- result.push([]);
14772
- step2 = node2.step;
14773
- }
14774
- result[result.length - 1].push(node2);
14775
- }
14776
- return result;
14777
- }, [nodes]);
14778
- return /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-2xl overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
14779
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 border-b border-white/5 px-3 py-2 shrink-0 overflow-x-auto", children: [
14780
- /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-lg bg-white/[0.03] p-0.5 gap-0.5 shrink-0", children: [
14781
- /* @__PURE__ */ jsx("span", { className: "px-1.5 text-[7px] font-bold uppercase tracking-wider text-gray-600", children: "Incident" }),
14782
- INCIDENTS.map((inc) => /* @__PURE__ */ jsx(
14783
- "button",
13930
+ ]
13931
+ }
13932
+ ),
13933
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-3", children: [
13934
+ /* @__PURE__ */ jsxs(
13935
+ motion.div,
14784
13936
  {
14785
- type: "button",
14786
- onClick: () => handleIncidentSelect(inc.id),
14787
- className: `rounded-md px-2 py-1 text-[9px] font-semibold transition-all duration-200 ${activeIncident === inc.id ? `${inc.bg} ${inc.color} shadow-sm` : "text-gray-500 hover:text-gray-300 hover:bg-white/5"}`,
14788
- children: inc.label
14789
- },
14790
- inc.id
14791
- ))
14792
- ] }),
14793
- /* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2 shrink-0", children: [
14794
- activeStep >= 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", children: STEP_LABELS2.map((_, index) => /* @__PURE__ */ jsx("div", { className: `h-1 w-2.5 rounded-full transition-all duration-500 ${index < activeStep || isComplete ? "bg-emerald-500" : index === activeStep ? "bg-red-500 animate-pulse" : "bg-white/10"}` }, index)) }),
14795
- isComplete && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5", children: [
14796
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3 w-3 text-emerald-400" }),
14797
- /* @__PURE__ */ jsx("span", { className: "text-[8px] font-semibold text-emerald-400", children: "Resolved \xB7 MTTR 4min" })
14798
- ] }),
14799
- /* @__PURE__ */ jsx("div", { className: `h-2 w-2 rounded-full ${isRunning ? "bg-red-500 animate-pulse" : isComplete ? "bg-emerald-500" : "bg-gray-600"}` }),
14800
- /* @__PURE__ */ jsx("span", { className: "max-w-[160px] truncate text-[9px] text-gray-500", children: activeStep >= 0 ? STEP_LABELS2[activeStep] : "Ready" }),
14801
- isIdle ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg bg-gradient-to-r from-red-600 to-rose-600 px-3 py-1 text-[10px] font-semibold text-white shadow-lg shadow-red-500/20 hover:shadow-red-500/30 hover:scale-105 active:scale-95 transition-all", children: [
14802
- /* @__PURE__ */ jsx(PlayIcon, { className: "h-3 w-3" }),
14803
- " Simulate"
14804
- ] }) : isRunning ? /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleStop, className: "flex items-center gap-1 rounded-lg bg-rose-600/80 px-3 py-1 text-[10px] font-semibold text-white", children: [
14805
- /* @__PURE__ */ jsx(StopIcon, { className: "h-3 w-3" }),
14806
- " Stop"
14807
- ] }) : /* @__PURE__ */ jsxs("button", { type: "button", onClick: handleRun, className: "flex items-center gap-1 rounded-lg border border-white/10 px-3 py-1 text-[10px] font-medium text-gray-300 hover:bg-white/5", children: [
14808
- /* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-3 w-3" }),
14809
- " Replay"
14810
- ] })
14811
- ] })
14812
- ] }),
14813
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0 overflow-x-auto px-6 py-4", children: [
14814
- /* @__PURE__ */ jsx("style", { children: `
14815
- @keyframes nodeGlow { 0%, 100% { box-shadow: 0 0 12px var(--glow); } 50% { box-shadow: 0 0 28px var(--glow); } }
14816
- @keyframes edgeFlow { to { stroke-dashoffset: -12; } }
14817
- ` }),
14818
- rows.map((row, rowIndex) => /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-0", children: [
14819
- rowIndex > 0 && /* @__PURE__ */ jsx("svg", { width: "40", height: "2", className: "mx-1.5 shrink-0", children: /* @__PURE__ */ jsx("line", { x1: "0", y1: "1", x2: "40", y2: "1", stroke: activeStep >= rows[rowIndex][0].step ? "#10b981" : "#374151", strokeWidth: "2", strokeDasharray: "4 3", style: { animation: activeStep === rows[rowIndex][0].step ? "edgeFlow 0.8s linear infinite" : "none" } }) }),
14820
- /* @__PURE__ */ jsx("div", { className: `flex ${row.length > 1 ? "flex-col gap-2" : ""}`, children: row.map((node2) => {
14821
- const status = getStatus(node2);
14822
- return /* @__PURE__ */ jsxs(
14823
- "div",
14824
- {
14825
- className: `liquid-surface rounded-2xl px-4 py-3 transition-all duration-500 ${row.length > 1 ? "w-[180px]" : "w-[220px]"} ${status === "active" ? "scale-[1.03] ring-2 ring-red-500/50" : status === "complete" ? "ring-1 ring-emerald-500/30" : "opacity-40"}`,
14826
- style: status === "active" ? { "--glow": node2.glow, animation: "nodeGlow 1.5s ease-in-out infinite" } : void 0,
14827
- children: [
14828
- /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2.5", children: [
14829
- node2.avatar ? /* @__PURE__ */ jsx("img", { src: node2.avatar, alt: "", className: "h-9 w-9 rounded-xl shrink-0" }) : /* @__PURE__ */ jsx("div", { className: `flex h-9 w-9 items-center justify-center rounded-xl shrink-0 ${node2.bg}`, children: /* @__PURE__ */ jsx(node2.icon, { className: `h-5 w-5 ${node2.color}` }) }),
14830
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
14831
- /* @__PURE__ */ jsx("div", { className: "truncate text-[13px] font-semibold text-white", children: node2.label }),
14832
- /* @__PURE__ */ jsx("div", { className: "truncate text-[9px] text-gray-500", children: node2.subtitle })
14833
- ] }),
14834
- status === "complete" && /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-5 w-5 shrink-0 text-emerald-400" })
13937
+ initial: { opacity: 0, y: 20 },
13938
+ animate: { opacity: 1, y: 0 },
13939
+ transition: { delay: 0.5 },
13940
+ className: "grid grid-cols-2 gap-3",
13941
+ children: [
13942
+ /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-green-500 to-emerald-500 text-white", children: [
13943
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
13944
+ /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-5 w-5" }),
13945
+ /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+18%" })
14835
13946
  ] }),
14836
- node2.badges && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: node2.badges.map((badge) => /* @__PURE__ */ jsx("span", { className: `rounded-full px-2 py-0.5 text-[8px] font-semibold ${badge.color}`, children: badge.text }, badge.text)) })
14837
- ]
14838
- },
14839
- node2.id
14840
- );
14841
- }) })
14842
- ] }, rowIndex))
14843
- ] }),
14844
- activeStep >= 3 && /* @__PURE__ */ jsxs("div", { className: "border-t border-white/5 px-3 py-2", children: [
14845
- /* @__PURE__ */ jsx("style", { children: `
14846
- .slide-active .fk-detail { opacity: 0; animation: fkDetailIn 0.4s ease forwards; }
14847
- .slide-active .fk-detail:nth-child(1) { animation-delay: 0s; }
14848
- .slide-active .fk-detail:nth-child(2) { animation-delay: 0.15s; }
14849
- .slide-active .fk-detail:nth-child(3) { animation-delay: 0.3s; }
14850
- .slide-active .fk-detail:nth-child(4) { animation-delay: 0.45s; }
14851
- .slide-active .fk-detail:nth-child(5) { animation-delay: 0.6s; }
14852
- @keyframes fkDetailIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
14853
- ` }),
14854
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-2", children: [
14855
- activeStep >= 3 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
14856
- /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
14857
- /* @__PURE__ */ jsx("img", { src: AVATARS2.debug, alt: "", className: "h-6 w-6 rounded-lg" }),
14858
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
14859
- /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Debug Agent" }),
14860
- /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Root cause analysis \xB7 1.2s" })
14861
- ] }),
14862
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" })
14863
- ] }),
14864
- /* @__PURE__ */ jsx("p", { className: "text-[9px] leading-relaxed text-gray-300", children: detail.rootCause }),
14865
- /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[8px] leading-relaxed text-gray-400", children: detail.agentAnalysis })
14866
- ] }),
14867
- activeStep >= 4 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
14868
- /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
14869
- /* @__PURE__ */ jsx("img", { src: AVATARS2.triage, alt: "", className: "h-6 w-6 rounded-lg" }),
14870
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
14871
- /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Triage Agent" }),
14872
- /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Remediation plan \xB7 0.8s" })
14873
- ] }),
14874
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" })
14875
- ] }),
14876
- /* @__PURE__ */ jsx("p", { className: "font-mono text-[8px] leading-relaxed text-gray-300", children: detail.remediation })
14877
- ] }),
14878
- activeStep >= 5 && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-3", children: [
14879
- /* @__PURE__ */ jsxs("div", { className: "mb-1.5 flex items-center gap-2", children: [
14880
- /* @__PURE__ */ jsx("img", { src: AVATARS2.remediate, alt: "", className: "h-6 w-6 rounded-lg" }),
14881
- /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
14882
- /* @__PURE__ */ jsx("div", { className: "text-[10px] font-semibold text-white", children: "Remediate Agent" }),
14883
- /* @__PURE__ */ jsx("div", { className: "text-[8px] text-gray-500", children: "Executing fix \xB7 human-in-the-loop" })
14884
- ] }),
14885
- activeStep >= 6 ? /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 shrink-0 text-emerald-400" }) : /* @__PURE__ */ jsx("div", { className: "h-3 w-3 shrink-0 rounded-full bg-amber-500 animate-pulse" })
14886
- ] }),
14887
- /* @__PURE__ */ jsx("p", { className: "text-[8px] leading-relaxed text-amber-300/80", children: "Applying changes with rollback plan ready. Awaiting verification..." })
14888
- ] })
14889
- ] }),
14890
- activeStep >= 6 && /* @__PURE__ */ jsxs("div", { className: "mt-2 grid grid-cols-2 gap-2", children: [
14891
- /* @__PURE__ */ jsxs("div", { className: "fk-detail rounded-xl border border-emerald-500/20 bg-emerald-500/[0.06] p-2.5", children: [
14892
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-1.5", children: [
14893
- /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5 text-emerald-400" }),
14894
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-emerald-400", children: "Result" })
14895
- ] }),
14896
- /* @__PURE__ */ jsx("p", { className: "text-[9px] font-semibold text-emerald-300", children: detail.result })
14897
- ] }),
14898
- isComplete && /* @__PURE__ */ jsxs("div", { className: "fk-detail liquid-surface rounded-xl p-2.5", children: [
14899
- /* @__PURE__ */ jsx("span", { className: "mb-1 block text-[10px] font-bold text-gray-400", children: "Timeline" }),
14900
- /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: detail.timeline.map((entry, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1.5", children: [
14901
- /* @__PURE__ */ jsx("span", { className: "shrink-0 font-mono text-[7px] text-gray-600", children: entry.time }),
14902
- /* @__PURE__ */ jsx("span", { className: `h-1 w-1 mt-1 shrink-0 rounded-full ${entry.color.replace("text-", "bg-")}` }),
14903
- /* @__PURE__ */ jsx("span", { className: "text-[7px] text-gray-400", children: entry.event })
14904
- ] }, i)) })
14905
- ] })
14906
- ] })
14907
- ] })
14908
- ] }) });
14909
- }
14910
- function IconTile({ icon: Icon, gradient, size = "md" }) {
14911
- const wrapper = size === "md" ? "h-12 w-12" : "h-10 w-10";
14912
- const icon = size === "md" ? "h-6 w-6" : "h-5 w-5";
14913
- return /* @__PURE__ */ jsx("div", { className: `${wrapper} rounded-xl bg-gradient-to-br ${gradient} flex items-center justify-center`, children: /* @__PURE__ */ jsx(Icon, { className: `${icon} text-white` }) });
14914
- }
14915
- function BentoFeatureGrid({
14916
- aiPanel,
14917
- metricsPanel,
14918
- securityPanel,
14919
- agentsPanel,
14920
- className
14921
- }) {
14922
- return /* @__PURE__ */ jsx("div", { className: `w-full min-h-screen h-full flex items-center justify-center p-4 md:p-6 lg:p-8 ${className ?? ""}`, children: /* @__PURE__ */ jsx("div", { className: "w-full h-full max-w-7xl", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-4 lg:grid-cols-3 lg:grid-rows-2 h-full min-h-[600px] lg:min-h-[700px]", children: [
14923
- /* @__PURE__ */ jsxs(
14924
- motion.div,
14925
- {
14926
- initial: { opacity: 0, y: 20 },
14927
- animate: { opacity: 1, y: 0 },
14928
- transition: { duration: 0.6, delay: 0.1 },
14929
- className: "relative lg:row-span-2",
14930
- children: [
14931
- aiPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${aiPanel.bgTint}` }),
14932
- /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${aiPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
14933
- /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
14934
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
14935
- /* @__PURE__ */ jsx(IconTile, { icon: aiPanel.icon, gradient: aiPanel.gradient, size: "md" }),
14936
- /* @__PURE__ */ jsx("p", { className: "text-lg font-bold text-gray-900 dark:text-white", children: aiPanel.title })
14937
- ] }),
14938
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: aiPanel.description })
14939
- ] }),
14940
- /* @__PURE__ */ jsx("div", { className: "relative min-h-[200px] w-full grow p-6", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: aiPanel.items.map((item, index) => /* @__PURE__ */ jsxs(
14941
- motion.div,
14942
- {
14943
- initial: { opacity: 0, x: -20 },
14944
- animate: { opacity: 1, x: 0 },
14945
- transition: { delay: 0.3 + index * 0.2 },
14946
- className: `flex items-center gap-3 p-3 rounded-xl ${item.bgTint}`,
14947
- children: [
14948
- /* @__PURE__ */ jsx("div", { className: `h-2 w-2 rounded-full animate-pulse ${item.dotColor}` }),
14949
- /* @__PURE__ */ jsx("span", { className: `text-xs font-medium ${item.textColor}`, children: item.label })
14950
- ]
14951
- },
14952
- `${item.label}-${index}`
14953
- )) }) })
14954
- ] }),
14955
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
14956
- ]
14957
- }
14958
- ),
14959
- /* @__PURE__ */ jsxs(
14960
- motion.div,
14961
- {
14962
- initial: { opacity: 0, y: 20 },
14963
- animate: { opacity: 1, y: 0 },
14964
- transition: { duration: 0.6, delay: 0.2 },
14965
- className: "relative max-lg:row-start-1",
14966
- children: [
14967
- metricsPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${metricsPanel.bgTint}` }),
14968
- /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${metricsPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
14969
- /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
14970
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
14971
- /* @__PURE__ */ jsx(IconTile, { icon: metricsPanel.icon, gradient: metricsPanel.gradient, size: "sm" }),
14972
- /* @__PURE__ */ jsx("p", { className: "text-base font-bold text-gray-900 dark:text-white", children: metricsPanel.title })
14973
- ] }),
14974
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400", children: metricsPanel.description })
14975
- ] }),
14976
- /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center px-6 pb-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3 w-full", children: metricsPanel.metrics.map((metric, index) => /* @__PURE__ */ jsxs(
14977
- motion.div,
14978
- {
14979
- initial: { scale: 0 },
14980
- animate: { scale: 1 },
14981
- transition: { delay: 0.5 + index * 0.1 },
14982
- className: `${metric.bgTint} rounded-xl p-3 text-center`,
14983
- children: [
14984
- /* @__PURE__ */ jsx("p", { className: `text-2xl font-bold ${metric.valueColor}`, children: metric.value }),
14985
- /* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-600 dark:text-gray-400", children: metric.label })
14986
- ]
14987
- },
14988
- `${metric.label}-${index}`
14989
- )) }) })
14990
- ] }),
14991
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
14992
- ]
14993
- }
14994
- ),
14995
- /* @__PURE__ */ jsxs(
14996
- motion.div,
14997
- {
14998
- initial: { opacity: 0, y: 20 },
14999
- animate: { opacity: 1, y: 0 },
15000
- transition: { duration: 0.6, delay: 0.3 },
15001
- className: "relative max-lg:row-start-3 lg:col-start-2 lg:row-start-2",
15002
- children: [
15003
- securityPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${securityPanel.bgTint}` }),
15004
- /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${securityPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
15005
- /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
15006
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
15007
- /* @__PURE__ */ jsx(IconTile, { icon: securityPanel.icon, gradient: securityPanel.gradient, size: "sm" }),
15008
- /* @__PURE__ */ jsx("p", { className: "text-base font-bold text-gray-900 dark:text-white", children: securityPanel.title })
15009
- ] }),
15010
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 dark:text-gray-400", children: securityPanel.description })
15011
- ] }),
15012
- /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center px-6 pb-6", children: /* @__PURE__ */ jsx("div", { className: "w-full space-y-2", children: securityPanel.bars.map((bar, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15013
- /* @__PURE__ */ jsx("div", { className: `h-1.5 flex-1 rounded-full overflow-hidden ${bar.trackColor}`, children: /* @__PURE__ */ jsx(
15014
- motion.div,
15015
- {
15016
- initial: { width: 0 },
15017
- animate: { width: "100%" },
15018
- transition: { delay: 0.7 + index * 0.2, duration: 1 },
15019
- className: `h-full ${bar.fillColor}`
15020
- }
15021
- ) }),
15022
- /* @__PURE__ */ jsx("span", { className: `text-[10px] font-medium ${bar.labelColor}`, children: bar.label })
15023
- ] }, `${bar.label}-${index}`)) }) })
15024
- ] }),
15025
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
15026
- ]
15027
- }
15028
- ),
15029
- /* @__PURE__ */ jsxs(
15030
- motion.div,
15031
- {
15032
- initial: { opacity: 0, y: 20 },
15033
- animate: { opacity: 1, y: 0 },
15034
- transition: { duration: 0.6, delay: 0.4 },
15035
- className: "relative lg:row-span-2",
15036
- children: [
15037
- agentsPanel.bgTint && /* @__PURE__ */ jsx("div", { className: `absolute inset-px rounded-2xl bg-gradient-to-br ${agentsPanel.bgTint}` }),
15038
- /* @__PURE__ */ jsxs("div", { className: `relative flex h-full flex-col overflow-hidden rounded-2xl border ${agentsPanel.borderColor ?? "border-gray-200 dark:border-gray-800"} bg-white/50 dark:bg-zinc-900/50 backdrop-blur-sm`, children: [
15039
- /* @__PURE__ */ jsxs("div", { className: "px-6 pt-6 pb-4", children: [
15040
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
15041
- /* @__PURE__ */ jsx(IconTile, { icon: agentsPanel.icon, gradient: agentsPanel.gradient, size: "md" }),
15042
- /* @__PURE__ */ jsx("p", { className: "text-lg font-bold text-gray-900 dark:text-white", children: agentsPanel.title })
15043
- ] }),
15044
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: agentsPanel.description })
15045
- ] }),
15046
- /* @__PURE__ */ jsx("div", { className: "relative w-full grow p-6", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: agentsPanel.agents.map((agent, index) => {
15047
- const delay = 0.5 + index * 0.1;
15048
- return /* @__PURE__ */ jsxs(
15049
- motion.div,
15050
- {
15051
- initial: { opacity: 0, scale: 0.8 },
15052
- animate: { opacity: 1, scale: 1 },
15053
- transition: { delay },
15054
- className: `relative overflow-hidden rounded-xl bg-gradient-to-br ${agent.color} p-3 text-white`,
15055
- children: [
15056
- /* @__PURE__ */ jsxs("div", { className: "relative z-10", children: [
15057
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold", children: agent.name }),
15058
- /* @__PURE__ */ jsx("div", { className: "mt-1 h-1 w-12 bg-white/30 rounded-full", children: /* @__PURE__ */ jsx(
15059
- motion.div,
15060
- {
15061
- initial: { width: 0 },
15062
- animate: { width: "100%" },
15063
- transition: { delay: delay + 0.3, duration: 0.8 },
15064
- className: "h-full bg-white rounded-full"
15065
- }
15066
- ) })
15067
- ] }),
15068
- /* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0 w-16 h-16 bg-white/10 rounded-full -mr-8 -mt-8" })
15069
- ]
15070
- },
15071
- agent.name
15072
- );
15073
- }) }) })
15074
- ] }),
15075
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-px rounded-2xl shadow-sm" })
15076
- ]
15077
- }
15078
- )
15079
- ] }) }) });
15080
- }
15081
- var CustomerAnalyticsDemo = () => /* @__PURE__ */ jsx(
15082
- motion.div,
15083
- {
15084
- initial: { opacity: 0 },
15085
- animate: { opacity: 1 },
15086
- exit: { opacity: 0 },
15087
- transition: { duration: 0.5 },
15088
- className: "flex flex-col h-full overflow-hidden",
15089
- children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
15090
- /* @__PURE__ */ jsxs(
15091
- motion.div,
15092
- {
15093
- initial: { y: -20, opacity: 0 },
15094
- animate: { y: 0, opacity: 1 },
15095
- transition: { duration: 0.5, delay: 0.3 },
15096
- className: "h-14 border-b bg-background/95 backdrop-blur-sm flex items-center justify-between px-4",
15097
- children: [
15098
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
15099
- /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: "An\xE1lise de Clientes" }),
15100
- /* @__PURE__ */ jsx("span", { className: "text-xs px-2 py-1 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400 font-medium", children: "IA Analytics" })
15101
- ] }),
15102
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15103
- /* @__PURE__ */ jsx(BellIcon, { className: "h-4 w-4 text-muted-foreground" }),
15104
- /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-4 w-4 text-muted-foreground" })
15105
- ] })
15106
- ]
15107
- }
15108
- ),
15109
- /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-3", children: [
15110
- /* @__PURE__ */ jsxs(
15111
- motion.div,
15112
- {
15113
- initial: { opacity: 0, y: 20 },
15114
- animate: { opacity: 1, y: 0 },
15115
- transition: { delay: 0.5 },
15116
- className: "grid grid-cols-2 gap-3",
15117
- children: [
15118
- /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-blue-500 to-cyan-500 text-white", children: [
15119
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
15120
- /* @__PURE__ */ jsx(UsersIcon, { className: "h-5 w-5" }),
15121
- /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+12%" })
15122
- ] }),
15123
- /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "2.547" }),
15124
- /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Clientes Ativos" })
13947
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 1.2M" }),
13948
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Receita do Trimestre" })
15125
13949
  ] }),
15126
- /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-purple-500 to-pink-500 text-white", children: [
13950
+ /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-red-500 to-orange-500 text-white", children: [
15127
13951
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
15128
- /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-5 w-5" }),
15129
- /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+28%" })
13952
+ /* @__PURE__ */ jsx(DocumentTextIcon, { className: "h-5 w-5" }),
13953
+ /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "Auto" })
15130
13954
  ] }),
15131
- /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 485k" }),
15132
- /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Receita Mensal" })
15133
- ] })
15134
- ]
15135
- }
15136
- ),
15137
- /* @__PURE__ */ jsx(
15138
- motion.div,
15139
- {
15140
- initial: { opacity: 0, y: 20 },
15141
- animate: { opacity: 1, y: 0 },
15142
- transition: { delay: 0.7 },
15143
- children: /* @__PURE__ */ jsxs(Card, { className: "border-2", children: [
15144
- /* @__PURE__ */ jsx("div", { className: "p-3 border-b bg-gradient-to-r from-blue-600 to-cyan-600 text-white", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15145
- /* @__PURE__ */ jsx(SparklesIcon, { className: "h-4 w-4" }),
15146
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-bold", children: "Insights IA" })
15147
- ] }) }),
15148
- /* @__PURE__ */ jsxs("div", { className: "p-3 space-y-3", children: [
15149
- /* @__PURE__ */ jsxs(
15150
- motion.div,
15151
- {
15152
- initial: { opacity: 0, x: -10 },
15153
- animate: { opacity: 1, x: 0 },
15154
- transition: { delay: 0.9 },
15155
- className: "flex items-start gap-2",
15156
- children: [
15157
- /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-green-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3 w-3 text-green-500" }) }),
15158
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
15159
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "Segmento Premium crescendo" }),
15160
- /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "+45% de convers\xE3o em produtos acima de R$ 500" })
15161
- ] })
15162
- ]
15163
- }
15164
- ),
15165
- /* @__PURE__ */ jsxs(
15166
- motion.div,
15167
- {
15168
- initial: { opacity: 0, x: -10 },
15169
- animate: { opacity: 1, x: 0 },
15170
- transition: { delay: 1.1 },
15171
- className: "flex items-start gap-2",
15172
- children: [
15173
- /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-3 w-3 text-blue-500" }) }),
15174
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
15175
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "Reten\xE7\xE3o melhorou 32%" }),
15176
- /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "Ap\xF3s implementa\xE7\xE3o do programa de fidelidade" })
15177
- ] })
15178
- ]
15179
- }
15180
- ),
15181
- /* @__PURE__ */ jsxs(
15182
- motion.div,
15183
- {
15184
- initial: { opacity: 0, x: -10 },
15185
- animate: { opacity: 1, x: 0 },
15186
- transition: { delay: 1.3 },
15187
- className: "flex items-start gap-2",
15188
- children: [
15189
- /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-purple-500/10 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx(UsersIcon, { className: "h-3 w-3 text-purple-500" }) }),
15190
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
15191
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: "847 clientes em risco" }),
15192
- /* @__PURE__ */ jsx("p", { className: "text-[10px] text-muted-foreground", children: "Sem compras h\xE1 60+ dias - recomendar campanha" })
15193
- ] })
15194
- ]
15195
- }
15196
- )
15197
- ] })
15198
- ] })
15199
- }
15200
- ),
15201
- /* @__PURE__ */ jsx(
15202
- motion.div,
15203
- {
15204
- initial: { opacity: 0, y: 20 },
15205
- animate: { opacity: 1, y: 0 },
15206
- transition: { delay: 1.5 },
15207
- children: /* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
15208
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold mb-2", children: "Top Clientes (\xDAltimo M\xEAs)" }),
15209
- /* @__PURE__ */ jsx("div", { className: "space-y-2", children: ["Maria Silva", "Jo\xE3o Santos", "Ana Costa"].map((name, i) => /* @__PURE__ */ jsxs(
15210
- motion.div,
15211
- {
15212
- initial: { opacity: 0, x: -10 },
15213
- animate: { opacity: 1, x: 0 },
15214
- transition: { delay: 1.7 + i * 0.2 },
15215
- className: "flex items-center justify-between",
15216
- children: [
15217
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15218
- /* @__PURE__ */ jsx("div", { className: "h-6 w-6 rounded-full bg-gradient-to-br from-gray-400 to-gray-600 flex items-center justify-center text-white text-[10px] font-bold", children: name.charAt(0) }),
15219
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium", children: name })
15220
- ] }),
15221
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
15222
- "R$ ",
15223
- Math.floor(Math.random() * 50 + 10),
15224
- "k"
15225
- ] })
15226
- ]
15227
- },
15228
- name
15229
- )) })
15230
- ] })
15231
- }
15232
- )
15233
- ] })
15234
- ] })
15235
- }
15236
- );
15237
- var FinancialDemo = () => /* @__PURE__ */ jsx(
15238
- motion.div,
15239
- {
15240
- initial: { opacity: 0 },
15241
- animate: { opacity: 1 },
15242
- exit: { opacity: 0 },
15243
- transition: { duration: 0.5 },
15244
- className: "flex flex-col h-full overflow-hidden",
15245
- children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [
15246
- /* @__PURE__ */ jsxs(
15247
- motion.div,
15248
- {
15249
- initial: { y: -20, opacity: 0 },
15250
- animate: { y: 0, opacity: 1 },
15251
- transition: { duration: 0.5, delay: 0.3 },
15252
- className: "h-14 border-b bg-background/95 backdrop-blur-sm flex items-center justify-between px-4",
15253
- children: [
15254
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
15255
- /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold", children: "Planejamento Financeiro" }),
15256
- /* @__PURE__ */ jsx("span", { className: "text-xs px-2 py-1 rounded-full bg-green-500/10 text-green-600 dark:text-green-400 font-medium", children: "Q4 2024" })
15257
- ] }),
15258
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
15259
- /* @__PURE__ */ jsx(BellIcon, { className: "h-4 w-4 text-muted-foreground" }),
15260
- /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "h-4 w-4 text-muted-foreground" })
15261
- ] })
15262
- ]
15263
- }
15264
- ),
15265
- /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-4 space-y-3", children: [
15266
- /* @__PURE__ */ jsxs(
15267
- motion.div,
15268
- {
15269
- initial: { opacity: 0, y: 20 },
15270
- animate: { opacity: 1, y: 0 },
15271
- transition: { delay: 0.5 },
15272
- className: "grid grid-cols-2 gap-3",
15273
- children: [
15274
- /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-green-500 to-emerald-500 text-white", children: [
15275
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
15276
- /* @__PURE__ */ jsx(ArrowTrendingUpIcon, { className: "h-5 w-5" }),
15277
- /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "+18%" })
15278
- ] }),
15279
- /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 1.2M" }),
15280
- /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Receita do Trimestre" })
15281
- ] }),
15282
- /* @__PURE__ */ jsxs(Card, { className: "p-3 bg-gradient-to-br from-red-500 to-orange-500 text-white", children: [
15283
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
15284
- /* @__PURE__ */ jsx(DocumentTextIcon, { className: "h-5 w-5" }),
15285
- /* @__PURE__ */ jsx(Badge, { className: "bg-white/20 text-white border-white/30 h-5 text-xs", children: "Auto" })
15286
- ] }),
15287
- /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 387k" }),
15288
- /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Impostos Calculados" })
13955
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: "R$ 387k" }),
13956
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: "Impostos Calculados" })
15289
13957
  ] })
15290
13958
  ]
15291
13959
  }
@@ -18224,186 +16892,975 @@ function DepartmentAssistantDemo({
18224
16892
  },
18225
16893
  `dashboard-${flow.id}`
18226
16894
  )
18227
- ] }) }),
18228
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-white/5 px-5 py-3", children: [
18229
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px] text-gray-500 dark:text-gray-400", children: [
18230
- /* @__PURE__ */ jsx(BoltIcon, { className: `h-3.5 w-3.5 ${t.progressActiveBar.replace("bg-", "text-")}` }),
18231
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
18232
- stage === "input" && L.footerInput,
18233
- stage === "workflow" && L.footerWorkflow,
18234
- stage === "dashboard" && L.footerDashboard
18235
- ] })
18236
- ] }),
18237
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: flows.map((entry, index) => /* @__PURE__ */ jsx(
18238
- "span",
18239
- {
18240
- className: `h-1 rounded-full transition-all duration-500 ${index === flowIndex ? `w-8 ${t.progressActiveBar}` : "w-1.5 bg-gray-300 dark:bg-white/10"}`
18241
- },
18242
- entry.id
18243
- )) })
18244
- ] })
18245
- ] });
16895
+ ] }) }),
16896
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-white/5 px-5 py-3", children: [
16897
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px] text-gray-500 dark:text-gray-400", children: [
16898
+ /* @__PURE__ */ jsx(BoltIcon, { className: `h-3.5 w-3.5 ${t.progressActiveBar.replace("bg-", "text-")}` }),
16899
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
16900
+ stage === "input" && L.footerInput,
16901
+ stage === "workflow" && L.footerWorkflow,
16902
+ stage === "dashboard" && L.footerDashboard
16903
+ ] })
16904
+ ] }),
16905
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: flows.map((entry, index) => /* @__PURE__ */ jsx(
16906
+ "span",
16907
+ {
16908
+ className: `h-1 rounded-full transition-all duration-500 ${index === flowIndex ? `w-8 ${t.progressActiveBar}` : "w-1.5 bg-gray-300 dark:bg-white/10"}`
16909
+ },
16910
+ entry.id
16911
+ )) })
16912
+ ] })
16913
+ ] });
16914
+ }
16915
+ function StageChip({ label, stageIndex, mine, activeBadge }) {
16916
+ const isActive = stageIndex === mine;
16917
+ const isDone = stageIndex > mine;
16918
+ return /* @__PURE__ */ jsxs(
16919
+ "div",
16920
+ {
16921
+ className: `inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 font-semibold transition-colors ${isActive ? activeBadge : isDone ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-300" : "bg-white/5 text-gray-500 dark:text-gray-500"}`,
16922
+ children: [
16923
+ isDone ? /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5" }) : isActive ? /* @__PURE__ */ jsx(BoltIcon, { className: "h-3.5 w-3.5 animate-pulse" }) : /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
16924
+ label
16925
+ ]
16926
+ }
16927
+ );
16928
+ }
16929
+ function InputStage3({
16930
+ userPrompt,
16931
+ assistantMessage,
16932
+ phase,
16933
+ assistantComplete,
16934
+ department,
16935
+ assistantAvatar,
16936
+ assistantName,
16937
+ agents,
16938
+ agentAvatars,
16939
+ avatarGradient,
16940
+ cursorClass,
16941
+ conversationLabel,
16942
+ personaTagFn,
16943
+ composerHint,
16944
+ composerEnter
16945
+ }) {
16946
+ const cursor = /* @__PURE__ */ jsx("span", { className: `ml-0.5 inline-block w-[2px] h-4 align-middle ${cursorClass} animate-pulse` });
16947
+ const showAssistant = phase === "assistant";
16948
+ const personaName = assistantName ?? department;
16949
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col px-4 py-6 sm:px-8", children: [
16950
+ /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center justify-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500", children: [
16951
+ /* @__PURE__ */ jsx("span", { className: "h-1 w-1 rounded-full bg-emerald-500 animate-pulse" }),
16952
+ conversationLabel(personaName, department)
16953
+ ] }),
16954
+ /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-3xl flex-1 flex-col justify-end gap-4 overflow-hidden", children: [
16955
+ /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-tr-md px-5 py-3.5", children: /* @__PURE__ */ jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
16956
+ userPrompt,
16957
+ phase === "user" && cursor
16958
+ ] }) }) }),
16959
+ showAssistant && /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-2.5", children: [
16960
+ assistantAvatar ? /* @__PURE__ */ jsx(
16961
+ "img",
16962
+ {
16963
+ src: assistantAvatar,
16964
+ alt: personaName,
16965
+ className: `h-11 w-11 shrink-0 rounded-2xl bg-white/40 dark:bg-white/[0.06] ring-2 ring-white/30 dark:ring-white/10 shadow-md`
16966
+ }
16967
+ ) : /* @__PURE__ */ jsx("div", { className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br ${avatarGradient} shadow-md`, children: /* @__PURE__ */ jsx(SparklesIcon, { className: "h-5 w-5 text-white" }) }),
16968
+ /* @__PURE__ */ jsxs("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-bl-md px-5 py-3.5", children: [
16969
+ assistantMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaTagFn(personaName) }),
16970
+ assistantMessage.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 py-1", children: [
16971
+ /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse` }),
16972
+ /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "150ms" } }),
16973
+ /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "300ms" } })
16974
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
16975
+ /* @__PURE__ */ jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
16976
+ assistantMessage,
16977
+ !assistantComplete && cursor
16978
+ ] }),
16979
+ assistantComplete && /* @__PURE__ */ jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: agents.map((agent) => {
16980
+ const avatar = agentAvatars?.[agent];
16981
+ return /* @__PURE__ */ jsxs(
16982
+ "span",
16983
+ {
16984
+ className: "inline-flex items-center gap-1.5 rounded-full bg-white/40 dark:bg-white/[0.08] py-0.5 pl-0.5 pr-3 text-[11px] font-semibold text-gray-700 dark:text-gray-200 shadow-sm",
16985
+ children: [
16986
+ avatar ? /* @__PURE__ */ jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-full bg-white/40 dark:bg-white/[0.06]" }) : /* @__PURE__ */ jsx("span", { className: `flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br ${avatarGradient}`, children: /* @__PURE__ */ jsx(BoltIcon, { className: "h-3 w-3 text-white" }) }),
16987
+ agent
16988
+ ]
16989
+ },
16990
+ agent
16991
+ );
16992
+ }) })
16993
+ ] })
16994
+ ] })
16995
+ ] })
16996
+ ] }),
16997
+ /* @__PURE__ */ jsx("div", { className: "mx-auto mt-5 w-full max-w-3xl", children: /* @__PURE__ */ jsxs("div", { className: "liquid-surface flex items-center gap-3 rounded-full px-4 py-2.5 opacity-60", children: [
16998
+ /* @__PURE__ */ jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children: composerHint }),
16999
+ /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children: composerEnter })
17000
+ ] }) })
17001
+ ] });
17002
+ }
17003
+ var koriDepartmentFlows = [
17004
+ {
17005
+ id: "sales",
17006
+ name: "Vendas",
17007
+ icon: ShoppingCartIcon,
17008
+ accent: "from-blue-500 to-indigo-500",
17009
+ prompt: "Qualificar lead empresa XPTO e preparar proposta comercial",
17010
+ agents: ["Sales", "CRM", "Scoring", "Proposal"],
17011
+ workflow: salesWorkflow,
17012
+ dashboard: /* @__PURE__ */ jsx(SalesDemo, {})
17013
+ },
17014
+ {
17015
+ id: "financial",
17016
+ name: "Financeiro",
17017
+ icon: BanknotesIcon,
17018
+ accent: "from-emerald-500 to-teal-500",
17019
+ prompt: "Gerar relat\xF3rio financeiro e calcular impostos do trimestre",
17020
+ agents: ["Finance", "Tax", "Reports", "Compliance"],
17021
+ workflow: financialWorkflow,
17022
+ dashboard: /* @__PURE__ */ jsx(FinancialDemo, {})
17023
+ },
17024
+ {
17025
+ id: "marketing",
17026
+ name: "Marketing",
17027
+ icon: MegaphoneIcon,
17028
+ accent: "from-pink-500 to-rose-500",
17029
+ prompt: "Criar campanha de Black Friday para e-commerce",
17030
+ agents: ["Marketing", "Design", "E-commerce", "Email"],
17031
+ workflow: marketingWorkflow,
17032
+ dashboard: /* @__PURE__ */ jsx(MarketingDemo, {})
17033
+ },
17034
+ {
17035
+ id: "inventory",
17036
+ name: "Estoque",
17037
+ icon: CubeIcon,
17038
+ accent: "from-orange-500 to-amber-500",
17039
+ prompt: "Verificar estoque e sugerir reposi\xE7\xF5es autom\xE1ticas",
17040
+ agents: ["Inventory", "Supply", "Forecast", "Logistics"],
17041
+ workflow: inventoryWorkflow,
17042
+ dashboard: /* @__PURE__ */ jsx(InventoryDemo, {})
17043
+ },
17044
+ {
17045
+ id: "hr",
17046
+ name: "RH",
17047
+ icon: UsersIcon,
17048
+ accent: "from-green-500 to-emerald-500",
17049
+ prompt: "Processar candidaturas para vaga de Desenvolvedor Senior",
17050
+ agents: ["HR", "Recruiter", "Skills", "Interview"],
17051
+ workflow: hrWorkflow,
17052
+ dashboard: /* @__PURE__ */ jsx(HRRecruitmentDemo, {})
17053
+ },
17054
+ {
17055
+ id: "analytics",
17056
+ name: "Analytics",
17057
+ icon: DocumentTextIcon,
17058
+ accent: "from-indigo-500 to-violet-500",
17059
+ prompt: "Analisar comportamento dos clientes e identificar oportunidades",
17060
+ agents: ["Analytics", "CRM", "Insights", "Reports"],
17061
+ workflow: customerAnalyticsWorkflow,
17062
+ dashboard: /* @__PURE__ */ jsx(CustomerAnalyticsDemo, {})
17063
+ },
17064
+ {
17065
+ id: "lgpd",
17066
+ name: "LGPD",
17067
+ icon: ShieldCheckIcon,
17068
+ accent: "from-red-500 to-rose-500",
17069
+ prompt: "Auditar dados pessoais e verificar conformidade LGPD",
17070
+ agents: ["LGPD", "Privacy", "Audit", "Security"],
17071
+ workflow: lgpdWorkflow,
17072
+ dashboard: /* @__PURE__ */ jsx(LGPDComplianceDemo, {})
17073
+ }
17074
+ ];
17075
+ var MIN_ZOOM = 0.8;
17076
+ var MAX_ZOOM = 4;
17077
+ var ZOOM_STEP = 0.5;
17078
+ function useGeoMapState({
17079
+ items,
17080
+ getRegionCode,
17081
+ regionCoordinates,
17082
+ defaultCenter = [0, 0]
17083
+ }) {
17084
+ const [zoom, setZoom] = useState(1);
17085
+ const [center, setCenter] = useState(defaultCenter);
17086
+ const [hoveredRegion, setHoveredRegion] = useState(null);
17087
+ const [animatedRegions, setAnimatedRegions] = useState(/* @__PURE__ */ new Set());
17088
+ const [panOffset, setPanOffset] = useState([0, 0]);
17089
+ const handleZoomIn = useCallback(() => {
17090
+ setZoom((previous) => Math.min(previous + ZOOM_STEP, MAX_ZOOM));
17091
+ }, []);
17092
+ const handleZoomOut = useCallback(() => {
17093
+ setZoom((previous) => Math.max(previous - ZOOM_STEP, MIN_ZOOM));
17094
+ }, []);
17095
+ const handleMoveEnd = useCallback(
17096
+ (position) => {
17097
+ setCenter(position.coordinates);
17098
+ setZoom(position.zoom);
17099
+ },
17100
+ []
17101
+ );
17102
+ const handlePan = useCallback((dx, dy) => {
17103
+ setPanOffset((previous) => [previous[0] + dx, previous[1] + dy]);
17104
+ }, []);
17105
+ const regionGroups = useMemo(() => {
17106
+ const grouped = /* @__PURE__ */ new Map();
17107
+ items.forEach((item) => {
17108
+ const code = getRegionCode(item);
17109
+ if (!grouped.has(code)) {
17110
+ grouped.set(code, []);
17111
+ }
17112
+ grouped.get(code).push(item);
17113
+ });
17114
+ return Array.from(grouped.entries()).filter(([code]) => regionCoordinates[code]).map(([code, regionItems]) => ({
17115
+ code,
17116
+ items: regionItems,
17117
+ coordinates: regionCoordinates[code]
17118
+ })).sort((a, b) => b.items.length - a.items.length);
17119
+ }, [items, getRegionCode, regionCoordinates]);
17120
+ const animationCodes = useMemo(
17121
+ () => regionGroups.map((regionData) => regionData.code),
17122
+ [regionGroups]
17123
+ );
17124
+ const animationSignature = useMemo(
17125
+ () => animationCodes.join("|"),
17126
+ [animationCodes]
17127
+ );
17128
+ useEffect(() => {
17129
+ if (animationCodes.length === 0) return;
17130
+ setAnimatedRegions(/* @__PURE__ */ new Set());
17131
+ const timers = [];
17132
+ animationCodes.forEach((code, index) => {
17133
+ const timer = setTimeout(() => {
17134
+ setAnimatedRegions((previous) => /* @__PURE__ */ new Set([...previous, code]));
17135
+ }, index * 100);
17136
+ timers.push(timer);
17137
+ });
17138
+ return () => timers.forEach(clearTimeout);
17139
+ }, [animationSignature]);
17140
+ const getMarkerSize = useCallback(
17141
+ (count) => {
17142
+ const baseSize = count >= 10 ? 14 : count >= 5 ? 11 : count >= 2 ? 8 : 6;
17143
+ return baseSize / Math.sqrt(zoom);
17144
+ },
17145
+ [zoom]
17146
+ );
17147
+ const getFontSize = useCallback(
17148
+ (markerSize) => {
17149
+ const baseSize = markerSize > 10 ? 10 : 8;
17150
+ const scaledSize = baseSize / Math.sqrt(zoom);
17151
+ return `${Math.max(scaledSize, 6)}px`;
17152
+ },
17153
+ [zoom]
17154
+ );
17155
+ return {
17156
+ zoom,
17157
+ setZoom,
17158
+ handleZoomIn,
17159
+ handleZoomOut,
17160
+ handleMoveEnd,
17161
+ MIN_ZOOM,
17162
+ MAX_ZOOM,
17163
+ center,
17164
+ setCenter,
17165
+ panOffset,
17166
+ handlePan,
17167
+ hoveredRegion,
17168
+ setHoveredRegion,
17169
+ animatedRegions,
17170
+ regionGroups,
17171
+ getMarkerSize,
17172
+ getFontSize
17173
+ };
17174
+ }
17175
+ var MAP_DEFAULT_STATE_COLOR = "rgba(100, 116, 139, 0.35)";
17176
+ var MAP_DEFAULT_MARKER_COLOR = "#6366f1";
17177
+ var VIEWBOX_WIDTH = 1e3;
17178
+ var VIEWBOX_HEIGHT = 500;
17179
+ var ALBERS_WIDTH = 960;
17180
+ var ALBERS_HEIGHT = 600;
17181
+ function GeoMapCanvasInner({
17182
+ regionGroups,
17183
+ regionColorMap,
17184
+ animatedRegions,
17185
+ zoom,
17186
+ panOffset,
17187
+ hoveredRegion,
17188
+ onPan,
17189
+ onRegionHover,
17190
+ onRegionClick,
17191
+ isRegionActive,
17192
+ getMarkerSize,
17193
+ getFontSize,
17194
+ geoJsonUrl,
17195
+ regionPropertyKey = "code",
17196
+ projectionType = "mercator",
17197
+ ariaLabel = "Interactive map"
17198
+ }, ref) {
17199
+ const [geoData, setGeoData] = useState(null);
17200
+ const svgRef = useRef(null);
17201
+ const dragState = useRef(null);
17202
+ useEffect(() => {
17203
+ let cancelled = false;
17204
+ async function loadGeoData() {
17205
+ try {
17206
+ const response = await fetch(geoJsonUrl);
17207
+ if (!response.ok) return;
17208
+ const data = await response.json();
17209
+ if (!cancelled) setGeoData(data);
17210
+ } catch {
17211
+ }
17212
+ }
17213
+ loadGeoData();
17214
+ return () => {
17215
+ cancelled = true;
17216
+ };
17217
+ }, [geoJsonUrl]);
17218
+ const handleMouseDown = useCallback(
17219
+ (event) => {
17220
+ if (event.button !== 0) return;
17221
+ dragState.current = {
17222
+ active: true,
17223
+ startX: event.clientX,
17224
+ startY: event.clientY,
17225
+ lastX: event.clientX,
17226
+ lastY: event.clientY,
17227
+ didDrag: false
17228
+ };
17229
+ },
17230
+ []
17231
+ );
17232
+ const handleMouseMove = useCallback(
17233
+ (event) => {
17234
+ if (!dragState.current?.active || !svgRef.current) return;
17235
+ const totalDx = event.clientX - dragState.current.startX;
17236
+ const totalDy = event.clientY - dragState.current.startY;
17237
+ if (!dragState.current.didDrag) {
17238
+ if (Math.abs(totalDx) < 5 && Math.abs(totalDy) < 5) return;
17239
+ dragState.current.didDrag = true;
17240
+ }
17241
+ const dx = event.clientX - dragState.current.lastX;
17242
+ const dy = event.clientY - dragState.current.lastY;
17243
+ const rect = svgRef.current.getBoundingClientRect();
17244
+ const viewBoxWidth = VIEWBOX_WIDTH / zoom;
17245
+ const scaleRatio = viewBoxWidth / rect.width;
17246
+ onPan(dx * scaleRatio, dy * scaleRatio);
17247
+ dragState.current.lastX = event.clientX;
17248
+ dragState.current.lastY = event.clientY;
17249
+ },
17250
+ [zoom, onPan]
17251
+ );
17252
+ const handleMouseUp = useCallback(() => {
17253
+ if (dragState.current) {
17254
+ dragState.current.active = false;
17255
+ }
17256
+ }, []);
17257
+ const wasDragAction = useCallback(() => {
17258
+ return dragState.current?.didDrag === true;
17259
+ }, []);
17260
+ const getLighterColor = (hexColor) => {
17261
+ const r = parseInt(hexColor.slice(1, 3), 16);
17262
+ const g = parseInt(hexColor.slice(3, 5), 16);
17263
+ const b = parseInt(hexColor.slice(5, 7), 16);
17264
+ return `rgba(${r}, ${g}, ${b}, 0.15)`;
17265
+ };
17266
+ const lighterColors = useMemo(() => {
17267
+ const colors3 = /* @__PURE__ */ new Map();
17268
+ regionColorMap.forEach((color, code) => {
17269
+ colors3.set(code, getLighterColor(color));
17270
+ });
17271
+ return colors3;
17272
+ }, [regionColorMap]);
17273
+ const featureCollection = useMemo(() => {
17274
+ if (!geoData) return null;
17275
+ return {
17276
+ type: "FeatureCollection",
17277
+ features: geoData.features
17278
+ };
17279
+ }, [geoData]);
17280
+ const projection = useMemo(() => {
17281
+ if (!featureCollection) return null;
17282
+ if (projectionType === "albersUsa") {
17283
+ return geoAlbersUsa();
17284
+ }
17285
+ return geoMercator().fitSize([VIEWBOX_WIDTH, VIEWBOX_HEIGHT], featureCollection);
17286
+ }, [featureCollection, projectionType]);
17287
+ const pathGenerator = useMemo(() => {
17288
+ if (!projection) return null;
17289
+ return geoPath(projection);
17290
+ }, [projection]);
17291
+ const regionsWithItems = useMemo(() => {
17292
+ return new Set(regionGroups.map((regionData) => regionData.code));
17293
+ }, [regionGroups]);
17294
+ const hasAnyActiveFilter = useMemo(() => {
17295
+ return regionGroups.some((regionData) => isRegionActive?.(regionData.code));
17296
+ }, [regionGroups, isRegionActive]);
17297
+ const featureBounds = useMemo(() => {
17298
+ if (!pathGenerator || !geoData) return null;
17299
+ let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
17300
+ for (const feature of geoData.features) {
17301
+ const bounds = pathGenerator.bounds(feature);
17302
+ if (!bounds || !isFinite(bounds[0][0])) continue;
17303
+ minX = Math.min(minX, bounds[0][0]);
17304
+ minY = Math.min(minY, bounds[0][1]);
17305
+ maxX = Math.max(maxX, bounds[1][0]);
17306
+ maxY = Math.max(maxY, bounds[1][1]);
17307
+ }
17308
+ if (!isFinite(minX)) return null;
17309
+ const pad = 15;
17310
+ return { x: minX - pad, y: minY - pad, width: maxX - minX + pad * 2, height: maxY - minY + pad * 2 };
17311
+ }, [pathGenerator, geoData]);
17312
+ const effectiveWidth = featureBounds?.width ?? (projectionType === "albersUsa" ? ALBERS_WIDTH : VIEWBOX_WIDTH);
17313
+ const effectiveHeight = featureBounds?.height ?? (projectionType === "albersUsa" ? ALBERS_HEIGHT : VIEWBOX_HEIGHT);
17314
+ const baseX = featureBounds?.x ?? 0;
17315
+ const baseY = featureBounds?.y ?? 0;
17316
+ const viewBoxParts = useMemo(() => {
17317
+ const width = effectiveWidth / zoom;
17318
+ const height = effectiveHeight / zoom;
17319
+ const x = baseX + (effectiveWidth - width) / 2 - panOffset[0];
17320
+ const y = baseY + (effectiveHeight - height) / 2 - panOffset[1];
17321
+ return { x, y, width, height };
17322
+ }, [zoom, panOffset, effectiveWidth, effectiveHeight, baseX, baseY]);
17323
+ const viewBox = `${viewBoxParts.x} ${viewBoxParts.y} ${viewBoxParts.width} ${viewBoxParts.height}`;
17324
+ return /* @__PURE__ */ jsx(
17325
+ "div",
17326
+ {
17327
+ ref,
17328
+ className: "relative w-full h-full overflow-hidden rounded-2xl border border-white/20 dark:border-white/[0.12] shadow-lg shadow-black/5 dark:shadow-black/30",
17329
+ "data-testid": "map-canvas",
17330
+ children: /* @__PURE__ */ jsxs(
17331
+ "svg",
17332
+ {
17333
+ ref: svgRef,
17334
+ viewBox,
17335
+ className: "w-full h-full cursor-grab active:cursor-grabbing",
17336
+ "aria-label": ariaLabel,
17337
+ style: { touchAction: "none", background: "transparent" },
17338
+ onMouseDown: handleMouseDown,
17339
+ onMouseMove: handleMouseMove,
17340
+ onMouseUp: handleMouseUp,
17341
+ onMouseLeave: handleMouseUp,
17342
+ children: [
17343
+ /* @__PURE__ */ jsxs("defs", { children: [
17344
+ /* @__PURE__ */ jsx("filter", { id: "glow-active", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ jsx("feDropShadow", { dx: "0", dy: "0", stdDeviation: "3", floodColor: "#fff", floodOpacity: "0.6" }) }),
17345
+ /* @__PURE__ */ jsx("filter", { id: "inactive-dim", x: "0%", y: "0%", width: "100%", height: "100%", children: /* @__PURE__ */ jsx("feColorMatrix", { type: "saturate", values: "0.3" }) }),
17346
+ /* @__PURE__ */ jsx("filter", { id: "marker-glow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: /* @__PURE__ */ jsx("feDropShadow", { dx: "0", dy: "0", stdDeviation: "4", floodColor: "#fff", floodOpacity: "0.7" }) }),
17347
+ /* @__PURE__ */ jsx("clipPath", { id: "geo-inset-clip", children: /* @__PURE__ */ jsx(
17348
+ "rect",
17349
+ {
17350
+ x: viewBoxParts.x + 2,
17351
+ y: viewBoxParts.y + 2,
17352
+ width: viewBoxParts.width - 4,
17353
+ height: viewBoxParts.height - 4
17354
+ }
17355
+ ) })
17356
+ ] }),
17357
+ /* @__PURE__ */ jsx("g", { clipPath: "url(#geo-inset-clip)", children: geoData && pathGenerator ? geoData.features.map((feature, index) => {
17358
+ const regionCode = feature.properties?.[regionPropertyKey] || feature.properties?.name || "";
17359
+ const hasItems = regionsWithItems.has(regionCode);
17360
+ const regionColor = regionColorMap.get(regionCode) ?? MAP_DEFAULT_STATE_COLOR;
17361
+ const isActive = isRegionActive?.(regionCode);
17362
+ const isHovered = hoveredRegion === regionCode;
17363
+ const isDimmed = hasAnyActiveFilter && !isActive && hasItems;
17364
+ let pathData = pathGenerator(feature);
17365
+ if (pathData && projectionType === "albersUsa") {
17366
+ const subpaths = pathData.split("Z").filter(Boolean);
17367
+ const cleaned = subpaths.filter((sub) => {
17368
+ const lCount = (sub.match(/L/g) || []).length;
17369
+ if (lCount !== 3) return true;
17370
+ const nums = sub.match(/-?\d+\.?\d*/g)?.map(Number);
17371
+ if (!nums || nums.length !== 8) return true;
17372
+ const [x1, y1, x2, y2, x3, y3, x4, y4] = nums;
17373
+ const xs = /* @__PURE__ */ new Set([x1, x2, x3, x4]);
17374
+ const ys = /* @__PURE__ */ new Set([y1, y2, y3, y4]);
17375
+ return xs.size !== 2 || ys.size !== 2;
17376
+ });
17377
+ pathData = cleaned.length > 0 ? cleaned.join("Z") + "Z" : null;
17378
+ }
17379
+ if (!pathData) return null;
17380
+ return /* @__PURE__ */ jsx(
17381
+ "path",
17382
+ {
17383
+ d: pathData,
17384
+ fillRule: "evenodd",
17385
+ "data-region": hasItems ? regionCode : void 0,
17386
+ onMouseEnter: () => hasItems && onRegionHover(regionCode),
17387
+ onMouseLeave: () => onRegionHover(null),
17388
+ onClick: () => {
17389
+ if (hasItems && !wasDragAction()) {
17390
+ onRegionClick(regionCode);
17391
+ }
17392
+ },
17393
+ fill: hasItems ? isHovered ? regionColor : isActive ? regionColor : lighterColors.get(regionCode) || getLighterColor(regionColor) : MAP_DEFAULT_STATE_COLOR,
17394
+ stroke: isActive ? "#fff" : isDimmed ? "rgba(148, 163, 184, 0.15)" : "rgba(148, 163, 184, 0.40)",
17395
+ strokeWidth: (isActive ? 2.5 : 0.5) / zoom,
17396
+ filter: isActive ? "url(#glow-active)" : isDimmed ? "url(#inactive-dim)" : void 0,
17397
+ opacity: isDimmed ? 0.45 : 1,
17398
+ style: {
17399
+ transition: "fill 0.3s ease, opacity 0.3s ease",
17400
+ cursor: hasItems ? "pointer" : void 0
17401
+ }
17402
+ },
17403
+ `${regionCode}-${index}`
17404
+ );
17405
+ }) : null }),
17406
+ projection ? regionGroups.map((regionData) => {
17407
+ const point = projection(regionData.coordinates);
17408
+ if (!point) return null;
17409
+ const [x, y] = point;
17410
+ const isAnimated = animatedRegions.has(regionData.code);
17411
+ const markerSize = getMarkerSize(regionData.items.length);
17412
+ const markerColor = regionColorMap.get(regionData.code) ?? MAP_DEFAULT_MARKER_COLOR;
17413
+ const isActive = isRegionActive?.(regionData.code);
17414
+ const isDimmed = hasAnyActiveFilter && !isActive;
17415
+ return /* @__PURE__ */ jsx(
17416
+ "g",
17417
+ {
17418
+ transform: `translate(${x}, ${y})`,
17419
+ "data-region": regionData.code,
17420
+ "data-testid": `marker-${regionData.code}`,
17421
+ onMouseEnter: () => onRegionHover(regionData.code),
17422
+ onMouseLeave: () => onRegionHover(null),
17423
+ onClick: () => {
17424
+ if (!wasDragAction()) {
17425
+ onRegionClick(regionData.code);
17426
+ }
17427
+ },
17428
+ children: /* @__PURE__ */ jsxs(
17429
+ "g",
17430
+ {
17431
+ style: {
17432
+ transform: isAnimated ? "scale(1)" : "scale(0)",
17433
+ transformOrigin: "0 0",
17434
+ opacity: isAnimated ? isDimmed ? 0.35 : 1 : 0,
17435
+ transition: "all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)",
17436
+ cursor: "pointer"
17437
+ },
17438
+ filter: isActive ? "url(#marker-glow)" : void 0,
17439
+ children: [
17440
+ isActive ? /* @__PURE__ */ jsx(
17441
+ "circle",
17442
+ {
17443
+ r: markerSize + 6,
17444
+ fill: "none",
17445
+ stroke: "#fff",
17446
+ strokeWidth: 2,
17447
+ opacity: 0.8
17448
+ }
17449
+ ) : /* @__PURE__ */ jsx(
17450
+ "circle",
17451
+ {
17452
+ r: markerSize + 4,
17453
+ fill: "none",
17454
+ stroke: markerColor,
17455
+ strokeWidth: 1,
17456
+ opacity: isDimmed ? 0 : 0.4,
17457
+ className: isDimmed ? void 0 : "animate-ping",
17458
+ style: isDimmed ? void 0 : { animationDuration: "2s" }
17459
+ }
17460
+ ),
17461
+ /* @__PURE__ */ jsx(
17462
+ "circle",
17463
+ {
17464
+ r: markerSize,
17465
+ fill: markerColor,
17466
+ stroke: isActive ? "#fff" : markerColor,
17467
+ strokeWidth: isActive ? 3 : 2,
17468
+ className: "transition-colors",
17469
+ style: {
17470
+ filter: isActive ? "brightness(1.2) saturate(1.3)" : isDimmed ? "saturate(0.3) brightness(0.8)" : "none"
17471
+ }
17472
+ }
17473
+ ),
17474
+ regionData.items.length > 1 && /* @__PURE__ */ jsx(
17475
+ "text",
17476
+ {
17477
+ textAnchor: "middle",
17478
+ dominantBaseline: "central",
17479
+ style: {
17480
+ fontFamily: "system-ui",
17481
+ fontSize: getFontSize(markerSize),
17482
+ fontWeight: "bold",
17483
+ fill: "#fff",
17484
+ pointerEvents: "none",
17485
+ opacity: isDimmed ? 0.5 : 1
17486
+ },
17487
+ children: regionData.items.length
17488
+ }
17489
+ )
17490
+ ]
17491
+ }
17492
+ )
17493
+ },
17494
+ regionData.code
17495
+ );
17496
+ }) : null
17497
+ ]
17498
+ }
17499
+ )
17500
+ }
17501
+ );
18246
17502
  }
18247
- function StageChip({ label, stageIndex, mine, activeBadge }) {
18248
- const isActive = stageIndex === mine;
18249
- const isDone = stageIndex > mine;
18250
- return /* @__PURE__ */ jsxs(
17503
+ var GeoMapCanvas = React12__default.forwardRef(GeoMapCanvasInner);
17504
+ var MapZoomControls = React12__default.forwardRef(
17505
+ ({ zoom, minZoom, maxZoom, onZoomIn, onZoomOut, labels }, ref) => {
17506
+ return /* @__PURE__ */ jsxs(
17507
+ "div",
17508
+ {
17509
+ ref,
17510
+ className: "flex flex-col gap-1",
17511
+ "data-testid": "map-zoom-controls",
17512
+ children: [
17513
+ /* @__PURE__ */ jsx(
17514
+ "button",
17515
+ {
17516
+ onClick: onZoomIn,
17517
+ disabled: zoom >= maxZoom,
17518
+ className: "p-2 liquid-surface rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
17519
+ "aria-label": labels?.zoomIn ?? "Zoom in",
17520
+ "data-testid": "zoom-in-button",
17521
+ children: /* @__PURE__ */ jsx(PlusIcon, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" })
17522
+ }
17523
+ ),
17524
+ /* @__PURE__ */ jsx(
17525
+ "button",
17526
+ {
17527
+ onClick: onZoomOut,
17528
+ disabled: zoom <= minZoom,
17529
+ className: "p-2 liquid-surface rounded-lg disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
17530
+ "aria-label": labels?.zoomOut ?? "Zoom out",
17531
+ "data-testid": "zoom-out-button",
17532
+ children: /* @__PURE__ */ jsx(MinusIcon, { className: "h-5 w-5 text-gray-700 dark:text-gray-300" })
17533
+ }
17534
+ ),
17535
+ /* @__PURE__ */ jsx("div", { className: "mt-1 px-2 py-1 liquid-surface rounded-lg text-center", children: /* @__PURE__ */ jsxs(
17536
+ "span",
17537
+ {
17538
+ className: "text-xs font-medium text-gray-600 dark:text-gray-400",
17539
+ "data-testid": "zoom-level",
17540
+ children: [
17541
+ Math.round(zoom * 100),
17542
+ "%"
17543
+ ]
17544
+ }
17545
+ ) })
17546
+ ]
17547
+ }
17548
+ );
17549
+ }
17550
+ );
17551
+ MapZoomControls.displayName = "MapZoomControls";
17552
+ function InteractiveGeoMapInner({
17553
+ items,
17554
+ getRegionCode,
17555
+ regionCoordinates,
17556
+ defaultCenter,
17557
+ geoJsonUrl,
17558
+ regionPropertyKey,
17559
+ projectionType,
17560
+ getRegionColor,
17561
+ isRegionActive,
17562
+ onRegionToggle,
17563
+ renderHoverContent,
17564
+ formatCounter,
17565
+ zoomLabels,
17566
+ ariaLabel,
17567
+ className
17568
+ }, ref) {
17569
+ const mapStateOptions = {
17570
+ items,
17571
+ getRegionCode,
17572
+ regionCoordinates,
17573
+ defaultCenter
17574
+ };
17575
+ const mapState = useGeoMapState(mapStateOptions);
17576
+ const regionColorMap = useMemo(() => {
17577
+ const colorMap2 = /* @__PURE__ */ new Map();
17578
+ for (const code of Object.keys(regionCoordinates)) {
17579
+ colorMap2.set(code, getRegionColor(code));
17580
+ }
17581
+ mapState.regionGroups.forEach((regionData) => {
17582
+ if (!colorMap2.has(regionData.code)) {
17583
+ colorMap2.set(regionData.code, getRegionColor(regionData.code));
17584
+ }
17585
+ });
17586
+ return colorMap2;
17587
+ }, [regionCoordinates, mapState.regionGroups, getRegionColor]);
17588
+ const handleRegionClick = (code) => {
17589
+ onRegionToggle?.(code);
17590
+ };
17591
+ const hoveredRegionData = useMemo(() => {
17592
+ if (!mapState.hoveredRegion) return null;
17593
+ return mapState.regionGroups.find(
17594
+ (regionData) => regionData.code === mapState.hoveredRegion
17595
+ ) ?? null;
17596
+ }, [mapState.hoveredRegion, mapState.regionGroups]);
17597
+ const counterText = useMemo(() => {
17598
+ if (!formatCounter) return null;
17599
+ const hasActiveFilter = isRegionActive && mapState.regionGroups.some(
17600
+ (regionData) => isRegionActive(regionData.code)
17601
+ );
17602
+ if (hasActiveFilter) {
17603
+ const activeRegions = mapState.regionGroups.filter(
17604
+ (regionData) => isRegionActive(regionData.code)
17605
+ );
17606
+ const activeItemCount = activeRegions.reduce(
17607
+ (sum, regionData) => sum + regionData.items.length,
17608
+ 0
17609
+ );
17610
+ return formatCounter(items.length, mapState.regionGroups.length, activeItemCount, activeRegions.length);
17611
+ }
17612
+ return formatCounter(items.length, mapState.regionGroups.length);
17613
+ }, [formatCounter, isRegionActive, mapState.regionGroups, items.length]);
17614
+ return /* @__PURE__ */ jsx(
18251
17615
  "div",
18252
17616
  {
18253
- className: `inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 font-semibold transition-colors ${isActive ? activeBadge : isDone ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-300" : "bg-white/5 text-gray-500 dark:text-gray-500"}`,
18254
- children: [
18255
- isDone ? /* @__PURE__ */ jsx(CheckCircleIcon$1, { className: "h-3.5 w-3.5" }) : isActive ? /* @__PURE__ */ jsx(BoltIcon, { className: "h-3.5 w-3.5 animate-pulse" }) : /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
18256
- label
18257
- ]
17617
+ ref,
17618
+ className: `space-y-4 h-full ${className ?? ""}`,
17619
+ "data-testid": "interactive-geo-map-container",
17620
+ children: /* @__PURE__ */ jsxs("div", { className: "relative h-full", children: [
17621
+ /* @__PURE__ */ jsx(
17622
+ GeoMapCanvas,
17623
+ {
17624
+ regionGroups: mapState.regionGroups,
17625
+ regionColorMap,
17626
+ animatedRegions: mapState.animatedRegions,
17627
+ zoom: mapState.zoom,
17628
+ panOffset: mapState.panOffset,
17629
+ hoveredRegion: mapState.hoveredRegion,
17630
+ onPan: mapState.handlePan,
17631
+ onRegionHover: mapState.setHoveredRegion,
17632
+ onRegionClick: handleRegionClick,
17633
+ isRegionActive,
17634
+ getMarkerSize: mapState.getMarkerSize,
17635
+ getFontSize: mapState.getFontSize,
17636
+ geoJsonUrl,
17637
+ regionPropertyKey,
17638
+ projectionType,
17639
+ ariaLabel
17640
+ }
17641
+ ),
17642
+ /* @__PURE__ */ jsx("div", { className: "absolute top-3 right-3 z-10", children: /* @__PURE__ */ jsx(
17643
+ MapZoomControls,
17644
+ {
17645
+ zoom: mapState.zoom,
17646
+ minZoom: mapState.MIN_ZOOM,
17647
+ maxZoom: mapState.MAX_ZOOM,
17648
+ onZoomIn: mapState.handleZoomIn,
17649
+ onZoomOut: mapState.handleZoomOut,
17650
+ labels: zoomLabels
17651
+ }
17652
+ ) }),
17653
+ mapState.hoveredRegion && hoveredRegionData && renderHoverContent && /* @__PURE__ */ jsx("div", { className: "absolute top-3 left-3 z-10 pointer-events-none", children: renderHoverContent(mapState.hoveredRegion, hoveredRegionData.items) }),
17654
+ counterText && /* @__PURE__ */ jsx("div", { className: "absolute bottom-3 left-3 z-10 pointer-events-none", children: /* @__PURE__ */ jsx("div", { className: "liquid-surface rounded-lg px-3 py-1.5", children: /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-gray-600 dark:text-gray-300", children: counterText }) }) })
17655
+ ] })
18258
17656
  }
18259
17657
  );
18260
17658
  }
18261
- function InputStage3({
18262
- userPrompt,
18263
- assistantMessage,
18264
- phase,
18265
- assistantComplete,
18266
- department,
18267
- assistantAvatar,
18268
- assistantName,
18269
- agents,
18270
- agentAvatars,
18271
- avatarGradient,
18272
- cursorClass,
18273
- conversationLabel,
18274
- personaTagFn,
18275
- composerHint,
18276
- composerEnter
18277
- }) {
18278
- const cursor = /* @__PURE__ */ jsx("span", { className: `ml-0.5 inline-block w-[2px] h-4 align-middle ${cursorClass} animate-pulse` });
18279
- const showAssistant = phase === "assistant";
18280
- const personaName = assistantName ?? department;
18281
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col px-4 py-6 sm:px-8", children: [
18282
- /* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center justify-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500", children: [
18283
- /* @__PURE__ */ jsx("span", { className: "h-1 w-1 rounded-full bg-emerald-500 animate-pulse" }),
18284
- conversationLabel(personaName, department)
18285
- ] }),
18286
- /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-3xl flex-1 flex-col justify-end gap-4 overflow-hidden", children: [
18287
- /* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-tr-md px-5 py-3.5", children: /* @__PURE__ */ jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
18288
- userPrompt,
18289
- phase === "user" && cursor
18290
- ] }) }) }),
18291
- showAssistant && /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-2.5", children: [
18292
- assistantAvatar ? /* @__PURE__ */ jsx(
18293
- "img",
18294
- {
18295
- src: assistantAvatar,
18296
- alt: personaName,
18297
- className: `h-11 w-11 shrink-0 rounded-2xl bg-white/40 dark:bg-white/[0.06] ring-2 ring-white/30 dark:ring-white/10 shadow-md`
18298
- }
18299
- ) : /* @__PURE__ */ jsx("div", { className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br ${avatarGradient} shadow-md`, children: /* @__PURE__ */ jsx(SparklesIcon, { className: "h-5 w-5 text-white" }) }),
18300
- /* @__PURE__ */ jsxs("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-bl-md px-5 py-3.5", children: [
18301
- assistantMessage.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaTagFn(personaName) }),
18302
- assistantMessage.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 py-1", children: [
18303
- /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse` }),
18304
- /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "150ms" } }),
18305
- /* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "300ms" } })
18306
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
18307
- /* @__PURE__ */ jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
18308
- assistantMessage,
18309
- !assistantComplete && cursor
18310
- ] }),
18311
- assistantComplete && /* @__PURE__ */ jsx("div", { className: "mt-3 flex flex-wrap gap-2", children: agents.map((agent) => {
18312
- const avatar = agentAvatars?.[agent];
17659
+ var InteractiveGeoMap = React12__default.forwardRef(InteractiveGeoMapInner);
17660
+ var DEFAULT_LEGEND_COLOR = "#6366f1";
17661
+ var GeoMapLegend = React12__default.forwardRef(
17662
+ ({ items, colorMap: colorMap2, getFlagUrl, getLabel, labels, maxItems = 5 }, ref) => {
17663
+ return /* @__PURE__ */ jsxs(
17664
+ "div",
17665
+ {
17666
+ ref,
17667
+ className: "liquid-surface rounded-lg p-3",
17668
+ "data-testid": "map-legend",
17669
+ children: [
17670
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold text-gray-700 dark:text-gray-300 mb-2", children: labels.title }),
17671
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
17672
+ items.slice(0, maxItems).map((item) => {
17673
+ const flagUrl = getFlagUrl?.(item.code);
17674
+ const regionColor = colorMap2.get(item.code) ?? DEFAULT_LEGEND_COLOR;
17675
+ const displayLabel = getLabel?.(item.code) ?? item.code;
18313
17676
  return /* @__PURE__ */ jsxs(
18314
- "span",
17677
+ "div",
18315
17678
  {
18316
- className: "inline-flex items-center gap-1.5 rounded-full bg-white/40 dark:bg-white/[0.08] py-0.5 pl-0.5 pr-3 text-[11px] font-semibold text-gray-700 dark:text-gray-200 shadow-sm",
17679
+ className: "flex items-center gap-2",
17680
+ "data-testid": `legend-item-${item.code}`,
18317
17681
  children: [
18318
- avatar ? /* @__PURE__ */ jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-full bg-white/40 dark:bg-white/[0.06]" }) : /* @__PURE__ */ jsx("span", { className: `flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br ${avatarGradient}`, children: /* @__PURE__ */ jsx(BoltIcon, { className: "h-3 w-3 text-white" }) }),
18319
- agent
17682
+ flagUrl ? (
17683
+ // eslint-disable-next-line @next/next/no-img-element
17684
+ /* @__PURE__ */ jsx(
17685
+ "img",
17686
+ {
17687
+ src: flagUrl,
17688
+ alt: item.code,
17689
+ className: "w-4 h-4 shadow-sm"
17690
+ }
17691
+ )
17692
+ ) : /* @__PURE__ */ jsx(
17693
+ "div",
17694
+ {
17695
+ className: "w-4 h-4 rounded-full",
17696
+ style: { backgroundColor: regionColor },
17697
+ "data-testid": `legend-color-${item.code}`
17698
+ }
17699
+ ),
17700
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-600 dark:text-gray-400", children: [
17701
+ displayLabel,
17702
+ " (",
17703
+ item.count,
17704
+ ")"
17705
+ ] })
18320
17706
  ]
18321
17707
  },
18322
- agent
17708
+ item.code
18323
17709
  );
18324
- }) })
17710
+ }),
17711
+ items.length > maxItems && /* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 italic pt-1", children: [
17712
+ "+",
17713
+ items.length - maxItems,
17714
+ " ",
17715
+ labels.more
17716
+ ] })
18325
17717
  ] })
18326
- ] })
18327
- ] })
18328
- ] }),
18329
- /* @__PURE__ */ jsx("div", { className: "mx-auto mt-5 w-full max-w-3xl", children: /* @__PURE__ */ jsxs("div", { className: "liquid-surface flex items-center gap-3 rounded-full px-4 py-2.5 opacity-60", children: [
18330
- /* @__PURE__ */ jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children: composerHint }),
18331
- /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children: composerEnter })
18332
- ] }) })
18333
- ] });
18334
- }
18335
- var koriDepartmentFlows = [
18336
- {
18337
- id: "sales",
18338
- name: "Vendas",
18339
- icon: ShoppingCartIcon,
18340
- accent: "from-blue-500 to-indigo-500",
18341
- prompt: "Qualificar lead empresa XPTO e preparar proposta comercial",
18342
- agents: ["Sales", "CRM", "Scoring", "Proposal"],
18343
- workflow: salesWorkflow,
18344
- dashboard: /* @__PURE__ */ jsx(SalesDemo, {})
18345
- },
18346
- {
18347
- id: "financial",
18348
- name: "Financeiro",
18349
- icon: BanknotesIcon,
18350
- accent: "from-emerald-500 to-teal-500",
18351
- prompt: "Gerar relat\xF3rio financeiro e calcular impostos do trimestre",
18352
- agents: ["Finance", "Tax", "Reports", "Compliance"],
18353
- workflow: financialWorkflow,
18354
- dashboard: /* @__PURE__ */ jsx(FinancialDemo, {})
18355
- },
17718
+ ]
17719
+ }
17720
+ );
17721
+ }
17722
+ );
17723
+ GeoMapLegend.displayName = "GeoMapLegend";
17724
+
17725
+ // src/lib/themes/brazil.ts
17726
+ var BRAZIL_STATE_PALETTES = {
17727
+ AC: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
17728
+ AL: { primary: "#d9251d", secondary: "#01a2ce", text: "light" },
17729
+ AM: { primary: "#213572", secondary: "#d9251d", text: "light" },
17730
+ AP: { primary: "#213572", secondary: "#009b43", text: "light" },
17731
+ BA: { primary: "#213572", secondary: "#d9251d", text: "light" },
17732
+ CE: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
17733
+ DF: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
17734
+ ES: { primary: "#ea5a8d", secondary: "#01a2ce", text: "light" },
17735
+ GO: { primary: "#009b43", secondary: "#213572", text: "light" },
17736
+ MA: { primary: "#213572", secondary: "#d9251d", text: "light" },
17737
+ MG: { primary: "#d9251d", secondary: "#f0f0f0", text: "light" },
17738
+ MS: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
17739
+ MT: { primary: "#213572", secondary: "#009b43", text: "light" },
17740
+ PA: { primary: "#d9251d", secondary: "#213572", text: "light" },
17741
+ PB: { primary: "#d9251d", secondary: "#1d1d1b", text: "light" },
17742
+ PE: { primary: "#213572", secondary: "#ffcf44", text: "light" },
17743
+ PI: { primary: "#009b43", secondary: "#ffcf44", text: "light" },
17744
+ PR: { primary: "#009b43", secondary: "#213572", text: "light" },
17745
+ RJ: { primary: "#01a2ce", secondary: "#009b43", text: "light" },
17746
+ RN: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
17747
+ RO: { primary: "#213572", secondary: "#009b43", text: "light" },
17748
+ RR: { primary: "#009b43", secondary: "#01a2ce", text: "light" },
17749
+ RS: { primary: "#009b43", secondary: "#d9251d", text: "light" },
17750
+ SC: { primary: "#d9251d", secondary: "#a6ce39", text: "light" },
17751
+ SE: { primary: "#009b43", secondary: "#213572", text: "light" },
17752
+ SP: { primary: "#1d1d1b", secondary: "#d9251d", text: "light" },
17753
+ TO: { primary: "#ef9926", secondary: "#213572", text: "dark" }
17754
+ };
17755
+ var BRAZIL_ACCENT_MAP = {
17756
+ AC: "green",
17757
+ AL: "red",
17758
+ AM: "blue",
17759
+ AP: "blue",
17760
+ BA: "blue",
17761
+ CE: "green",
17762
+ DF: "green",
17763
+ ES: "pink",
17764
+ GO: "green",
17765
+ MA: "blue",
17766
+ MG: "red",
17767
+ MS: "green",
17768
+ MT: "blue",
17769
+ PA: "red",
17770
+ PB: "red",
17771
+ PE: "blue",
17772
+ PI: "green",
17773
+ PR: "green",
17774
+ RJ: "blue",
17775
+ RN: "green",
17776
+ RO: "blue",
17777
+ RR: "green",
17778
+ RS: "green",
17779
+ SC: "red",
17780
+ SE: "green",
17781
+ SP: "black",
17782
+ TO: "yellow"
17783
+ };
17784
+ var VALID_UFS = Object.keys(BRAZIL_STATE_PALETTES);
17785
+ var BR_THEME_CONFIG = {
17786
+ palettes: BRAZIL_STATE_PALETTES,
17787
+ accents: BRAZIL_ACCENT_MAP,
17788
+ flagUrlTemplate: (code) => VALID_UFS.includes(code) ? `/flags/${code}.svg` : null
17789
+ };
17790
+ var BRAZIL_STATE_COORDINATES = {
17791
+ AC: [-70, -9],
17792
+ AL: [-36.6, -9.5],
17793
+ AM: [-64, -4],
17794
+ AP: [-51, 1],
17795
+ BA: [-41.5, -12.5],
17796
+ CE: [-39, -5],
17797
+ DF: [-47.9, -15.8],
17798
+ ES: [-40.3, -19.5],
17799
+ GO: [-49.5, -16],
17800
+ MA: [-45, -5],
17801
+ MG: [-44.5, -18.5],
17802
+ MS: [-55, -21],
17803
+ MT: [-56, -13],
17804
+ PA: [-52, -4],
17805
+ PB: [-36.8, -7.1],
17806
+ PE: [-37.5, -8.3],
17807
+ PI: [-43, -7.5],
17808
+ PR: [-51.5, -25],
17809
+ RJ: [-43.2, -22.5],
17810
+ RN: [-36.5, -5.8],
17811
+ RO: [-63, -11],
17812
+ RR: [-61, 2],
17813
+ RS: [-53, -30],
17814
+ SC: [-49.5, -27.5],
17815
+ SE: [-37, -10.5],
17816
+ SP: [-48.5, -22.5],
17817
+ TO: [-48, -10]
17818
+ };
17819
+ var BRAZIL_MAP_CENTER = [-54, -15];
17820
+ var BRAZIL_MACRO_REGIONS = [
18356
17821
  {
18357
- id: "marketing",
18358
- name: "Marketing",
18359
- icon: MegaphoneIcon,
18360
- accent: "from-pink-500 to-rose-500",
18361
- prompt: "Criar campanha de Black Friday para e-commerce",
18362
- agents: ["Marketing", "Design", "E-commerce", "Email"],
18363
- workflow: marketingWorkflow,
18364
- dashboard: /* @__PURE__ */ jsx(MarketingDemo, {})
17822
+ key: "sudeste",
17823
+ label: "",
17824
+ codes: ["SP", "RJ", "MG", "ES"],
17825
+ gradient: "from-blue-500/15 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/15",
17826
+ iconColor: "text-blue-600 dark:text-blue-400"
18365
17827
  },
18366
17828
  {
18367
- id: "inventory",
18368
- name: "Estoque",
18369
- icon: CubeIcon,
18370
- accent: "from-orange-500 to-amber-500",
18371
- prompt: "Verificar estoque e sugerir reposi\xE7\xF5es autom\xE1ticas",
18372
- agents: ["Inventory", "Supply", "Forecast", "Logistics"],
18373
- workflow: inventoryWorkflow,
18374
- dashboard: /* @__PURE__ */ jsx(InventoryDemo, {})
17829
+ key: "sul",
17830
+ label: "",
17831
+ codes: ["PR", "SC", "RS"],
17832
+ gradient: "from-emerald-500/15 to-teal-500/10 dark:from-emerald-500/20 dark:to-teal-500/15",
17833
+ iconColor: "text-emerald-600 dark:text-emerald-400"
18375
17834
  },
18376
17835
  {
18377
- id: "hr",
18378
- name: "RH",
18379
- icon: UsersIcon,
18380
- accent: "from-green-500 to-emerald-500",
18381
- prompt: "Processar candidaturas para vaga de Desenvolvedor Senior",
18382
- agents: ["HR", "Recruiter", "Skills", "Interview"],
18383
- workflow: hrWorkflow,
18384
- dashboard: /* @__PURE__ */ jsx(HRRecruitmentDemo, {})
17836
+ key: "nordeste",
17837
+ label: "",
17838
+ codes: ["BA", "PE", "CE", "MA", "PB", "RN", "AL", "SE", "PI"],
17839
+ gradient: "from-orange-500/15 to-amber-500/10 dark:from-orange-500/20 dark:to-amber-500/15",
17840
+ iconColor: "text-orange-600 dark:text-orange-400"
18385
17841
  },
18386
17842
  {
18387
- id: "analytics",
18388
- name: "Analytics",
18389
- icon: DocumentTextIcon,
18390
- accent: "from-indigo-500 to-violet-500",
18391
- prompt: "Analisar comportamento dos clientes e identificar oportunidades",
18392
- agents: ["Analytics", "CRM", "Insights", "Reports"],
18393
- workflow: customerAnalyticsWorkflow,
18394
- dashboard: /* @__PURE__ */ jsx(CustomerAnalyticsDemo, {})
17843
+ key: "centroOeste",
17844
+ label: "",
17845
+ codes: ["GO", "MT", "MS", "DF"],
17846
+ gradient: "from-purple-500/15 to-fuchsia-500/10 dark:from-purple-500/20 dark:to-fuchsia-500/15",
17847
+ iconColor: "text-purple-600 dark:text-purple-400"
18395
17848
  },
18396
17849
  {
18397
- id: "lgpd",
18398
- name: "LGPD",
18399
- icon: ShieldCheckIcon,
18400
- accent: "from-red-500 to-rose-500",
18401
- prompt: "Auditar dados pessoais e verificar conformidade LGPD",
18402
- agents: ["LGPD", "Privacy", "Audit", "Security"],
18403
- workflow: lgpdWorkflow,
18404
- dashboard: /* @__PURE__ */ jsx(LGPDComplianceDemo, {})
17850
+ key: "norte",
17851
+ label: "",
17852
+ codes: ["PA", "AM", "RO", "TO", "AC", "AP", "RR"],
17853
+ gradient: "from-cyan-500/15 to-sky-500/10 dark:from-cyan-500/20 dark:to-sky-500/15",
17854
+ iconColor: "text-cyan-600 dark:text-cyan-400"
18405
17855
  }
18406
17856
  ];
17857
+ var getBrazilFlagUrl = (uf) => getSubdivisionFlagUrl("BR", uf);
17858
+ var getBrazilHexColor = (uf) => getSubdivisionHexColor("BR", uf);
17859
+ var getBrazilPalette = (uf) => getSubdivisionPalette("BR", uf);
17860
+ var getBrazilGradient = (uf, direction) => getSubdivisionGradient("BR", uf, direction);
17861
+ var getBrazilColors = (uf) => getSubdivisionColors("BR", uf);
17862
+ var getBrazilAccent = (uf) => getSubdivisionAccent("BR", uf);
17863
+ var isValidBrazilState = (uf) => isValidSubdivision("BR", uf);
18407
17864
  function EntityDrawer({
18408
17865
  open,
18409
17866
  onClose,
@@ -25594,6 +25051,6 @@ function SkipToContent({
25594
25051
  );
25595
25052
  }
25596
25053
 
25597
- export { AIOrchestratorDemo, ARGENTINA_ACCENT_MAP, ARGENTINA_MACRO_REGIONS, ARGENTINA_MAP_CENTER, ARGENTINA_PROVINCE_COORDINATES, ARGENTINA_PROVINCE_PALETTES, AR_THEME_CONFIG, AUSTRALIA_ACCENT_MAP, AUSTRALIA_MACRO_REGIONS, AUSTRALIA_MAP_CENTER, AUSTRALIA_STATE_COORDINATES, AUSTRALIA_STATE_PALETTES, AU_THEME_CONFIG, ActionMenu, ActionSheet, ActiveFilterChips, AgentAnalysisCard, AnalysisSkeleton, AnimatedNumber, AnimatedTableRow, AppLogo, AppNavigation, AppShell, ArchiveSwipeAction, AuthLayout, Avatar, AvatarButton, BRAZIL_ACCENT_MAP, BRAZIL_MACRO_REGIONS, BRAZIL_MAP_CENTER, BRAZIL_STATE_COORDINATES, BRAZIL_STATE_PALETTES, BR_THEME_CONFIG, BackupCodeGrid, BadRequestPage, Badge, BaseForm, BentoCard, BentoFeatureGrid, BooleanFlagsPicker, BottomSafeArea, BrandFilterSkeleton, BrandedLoader, Breadcrumb, Button, CANADA_ACCENT_MAP, CANADA_MACRO_REGIONS, CANADA_MAP_CENTER, CANADA_PROVINCE_COORDINATES, CANADA_PROVINCE_PALETTES, CA_THEME_CONFIG, CHILE_ACCENT_MAP, CHILE_MACRO_REGIONS, CHILE_MAP_CENTER, CHILE_REGION_COORDINATES, CHILE_REGION_PALETTES, CL_THEME_CONFIG, COLOMBIA_ACCENT_MAP, COLOMBIA_DEPARTMENT_COORDINATES, COLOMBIA_DEPARTMENT_PALETTES, COLOMBIA_MACRO_REGIONS, COLOMBIA_MAP_CENTER, CO_THEME_CONFIG, Card, CardActionMenu, CardContent, CardDescription, CardDivider, CardFooter, CardGridSkeleton, CardHeader, CardSectionHeader, CardTitle, CategoryBadge, CategoryTab, CategoryTabs, ChartRenderer, ChipPicker, CircularRefreshIndicator, Code, CollapsibleGroupedList, CompactSegmentedControl, ContactCard, ContactSection, Container, ContextMenu, CookieConsent, CopyableId, CountPill, CreateActionButton, CustomerAnalyticsDemo, DE_THEME_CONFIG, DashboardDemo, DashboardDemoLayout, DashboardProgressShell, DashboardView, DataPagination, DatePicker, DeleteSwipeAction, DepartmentAssistantDemo, DepartmentWorkflowDemo, Description4 as Description, DetailsPopover, DevModeBanner, Dialog4 as Dialog, DialogActions, DialogBody, DialogDescription, DialogTitle3 as DialogTitle, Divider, Dock, DockContainer, DockSkeleton, DotRefreshIndicator, Dropdown, DropdownButton, DropdownDivider, DropdownItem, DropdownLabel, DropdownMenu, DropdownSelect, DynamicIsland, DynamicIslandConfirm, DynamicIslandNotification, EGYPT_ACCENT_MAP, EGYPT_GOVERNORATE_COORDINATES, EGYPT_GOVERNORATE_PALETTES, EGYPT_MACRO_REGIONS, EGYPT_MAP_CENTER, EG_THEME_CONFIG, ES_THEME_CONFIG, EdgeSwipeIndicator, EdgeSwipeProvider, EditSwipeAction, EmptyState, EntityCard, EntityDrawer, ErrorMessage, ErrorState, ExpandableHistoryList, ExpandingPageIndicator, FRANCE_ACCENT_MAP, FRANCE_MACRO_REGIONS, FRANCE_MAP_CENTER, FRANCE_REGION_COORDINATES, FRANCE_REGION_PALETTES, FR_THEME_CONFIG, FUEL_PRICE_LOADER, FavoriteSwipeAction, FeatureCard, FeedItemCard, Field2 as Field, FieldGroup, Fieldset2 as Fieldset, FilterBadge, FilterPill, FilterSectionHeader, FilterTileButton, FinancialDemo, FloatingActionButton, FlyoutMenu, FlyoutNavGrid, FlyoutQuickActions, ForceTouchMenu, Form, FormActions, FormActionsRow, FormCheckbox, FormField, FormGrid, FormInput, FormPriceInput, FormSection, FormSelect, FormTextarea, FormToggle, FuelPipelineDemo, GB_THEME_CONFIG, GERMANY_ACCENT_MAP, GERMANY_MACRO_REGIONS, GERMANY_MAP_CENTER, GERMANY_STATE_COORDINATES, GERMANY_STATE_PALETTES, GeoMapCanvas, GeoMapLegend, GlassModal, Gradient, GradientBackground, GrowthIndicator, HRRecruitmentDemo, Heading, HeroPanel, HeroSection, ID_THEME_CONFIG, INDIA_ACCENT_MAP, INDIA_MACRO_REGIONS, INDIA_MAP_CENTER, INDIA_STATE_COORDINATES, INDIA_STATE_PALETTES, INDONESIA_ACCENT_MAP, INDONESIA_MACRO_REGIONS, INDONESIA_MAP_CENTER, INDONESIA_PROVINCE_COORDINATES, INDONESIA_PROVINCE_PALETTES, IN_THEME_CONFIG, ITALY_ACCENT_MAP, ITALY_MACRO_REGIONS, ITALY_MAP_CENTER, ITALY_REGION_COORDINATES, ITALY_REGION_PALETTES, IT_THEME_CONFIG, IconButton, ImageUpload, IncidentPipelineDemo, InfoPopover, InlineForm, InlineSpinner, Input, InputRequestForm, InteractiveGeoMap, InventoryDemo, ItemSummary, JAPAN_ACCENT_MAP, JAPAN_MACRO_REGIONS, JAPAN_MAP_CENTER, JAPAN_PREFECTURE_COORDINATES, JAPAN_PREFECTURE_PALETTES, JP_THEME_CONFIG, KORI_ERP_LOADER, KR_THEME_CONFIG, LGPDComplianceDemo, LOCALE_FLAGS, Label2 as Label, LabeledToggle, LanguageSwitcher, LaunchpadGrid, Lead, Legend2 as Legend, LiquidFilterInput, ListCard, ListCardItem, ListItem, LoadingOverlay, MEXICO_ACCENT_MAP, MEXICO_MACRO_REGIONS, MEXICO_MAP_CENTER, MEXICO_STATE_COORDINATES, MEXICO_STATE_PALETTES, MX_THEME_CONFIG, ManagementPageLayout, ManagementSurface, MapZoomControls, MarketPricesCard, MarketingDemo, MetricCard, MonthPicker, MultiColumnPicker, NETHERLANDS_ACCENT_MAP, NETHERLANDS_MACRO_REGIONS, NETHERLANDS_MAP_CENTER, NETHERLANDS_PROVINCE_COORDINATES, NETHERLANDS_PROVINCE_PALETTES, NEW_ZEALAND_ACCENT_MAP, NEW_ZEALAND_MACRO_REGIONS, NEW_ZEALAND_MAP_CENTER, NEW_ZEALAND_REGION_COORDINATES, NEW_ZEALAND_REGION_PALETTES, NG_THEME_CONFIG, NIGERIA_ACCENT_MAP, NIGERIA_MACRO_REGIONS, NIGERIA_MAP_CENTER, NIGERIA_STATE_COORDINATES, NIGERIA_STATE_PALETTES, NL_THEME_CONFIG, NORWAY_ACCENT_MAP, NORWAY_COUNTY_COORDINATES, NORWAY_COUNTY_PALETTES, NORWAY_MACRO_REGIONS, NORWAY_MAP_CENTER, NO_THEME_CONFIG, NZ_THEME_CONFIG, NavigationProgress, NoDataState, NoResultsState, NotFoundPage, NotificationBadge, NotificationBellButton, NotificationProvider, OfficeCard, OfflineState, OptionGrid, OtpInput, PERU_ACCENT_MAP, PERU_DEPARTMENT_COORDINATES, PERU_DEPARTMENT_PALETTES, PERU_MACRO_REGIONS, PERU_MAP_CENTER, PE_THEME_CONFIG, PHILIPPINES_ACCENT_MAP, PHILIPPINES_MACRO_REGIONS, PHILIPPINES_MAP_CENTER, PHILIPPINES_PROVINCE_COORDINATES, PHILIPPINES_PROVINCE_PALETTES, PH_THEME_CONFIG, PL_THEME_CONFIG, POLAND_ACCENT_MAP, POLAND_MACRO_REGIONS, POLAND_MAP_CENTER, POLAND_VOIVODESHIP_COORDINATES, POLAND_VOIVODESHIP_PALETTES, PORTUGAL_ACCENT_MAP, PORTUGAL_DISTRICT_COORDINATES, PORTUGAL_DISTRICT_PALETTES, PORTUGAL_MACRO_REGIONS, PORTUGAL_MAP_CENTER, PT_THEME_CONFIG, PageEmptyState, PageErrorState, PageHeader, PageHeading, PageIndicator, PageLoadingState, PageSectionHeader, Pagination, PasswordInput, PasswordStrengthMeter, Pill, PlatformShell, PlusGrid, PlusGridItem, PlusGridRow, PreferenceSection, PriceChangeBadge, ProfileIdentityCard, Progress, ProgressIndicator, PullToRefreshContainer, PullToRefreshIndicator, RadiantHeading, RadiantStatCard, RadiantSubheading, RecommendationCard, RegionFilterSkeleton, RoleBadge, SE_THEME_CONFIG, SOUTH_AFRICA_ACCENT_MAP, SOUTH_AFRICA_MACRO_REGIONS, SOUTH_AFRICA_MAP_CENTER, SOUTH_AFRICA_PROVINCE_COORDINATES, SOUTH_AFRICA_PROVINCE_PALETTES, SOUTH_KOREA_ACCENT_MAP, SOUTH_KOREA_MACRO_REGIONS, SOUTH_KOREA_MAP_CENTER, SOUTH_KOREA_PROVINCE_COORDINATES, SOUTH_KOREA_PROVINCE_PALETTES, SPAIN_ACCENT_MAP, SPAIN_MACRO_REGIONS, SPAIN_MAP_CENTER, SPAIN_PROVINCE_COORDINATES, SPAIN_PROVINCE_PALETTES, SWEDEN_ACCENT_MAP, SWEDEN_COUNTY_COORDINATES, SWEDEN_COUNTY_PALETTES, SWEDEN_MACRO_REGIONS, SWEDEN_MAP_CENTER, SafeArea, SafeAreaSpacer, SafeAreaView, SalesDemo, SearchBar, SearchFilterToolbar, SearchInput, SectionCard, SectionHeader, SectionHeaderSkeleton, SegmentedControl, Select, SelectableChipPicker, SelectableListPicker, SelectableOptionsGrid, SelectableTableRow, SelectionCard, ServerErrorPage, SettingsModal, Sheet, SkipToContent, SocialLoginButtons, SortableTableHeader, Spinner, Stat, StatCard, StatCardSkeleton, StatusBadge, StatusToggle, StepFormPage, StepNavigationButtons, StepTimeline, StreamingDashboard, Strong, Subheading, SwipeableRow, Switch2 as Switch, THAILAND_ACCENT_MAP, THAILAND_MACRO_REGIONS, THAILAND_MAP_CENTER, THAILAND_PROVINCE_COORDINATES, THAILAND_PROVINCE_PALETTES, TH_THEME_CONFIG, TR_THEME_CONFIG, TURKEY_ACCENT_MAP, TURKEY_MACRO_REGIONS, TURKEY_MAP_CENTER, TURKEY_PROVINCE_COORDINATES, TURKEY_PROVINCE_PALETTES, Table, TableBody, TableCell, TableEmptyState, TableHead, TableHeader, TableRow, TableSkeleton, TableSkeletonRow, Tabs, TabsContent, TabsList, TabsTrigger, TagBadge, Text, TextLink, Textarea, ThemeSwitch, ThemeToggle, ThemeToggleCompact, TimePicker, ToggleSwitch, TouchTarget, UK_ACCENT_MAP, UK_MACRO_REGIONS, UK_MAP_CENTER, UK_NATION_COORDINATES, UK_NATION_PALETTES, US_ACCENT_MAP, US_MACRO_REGIONS, US_MAP_CENTER, US_STATE_COORDINATES, US_STATE_PALETTES, US_THEME_CONFIG, UserAvatar, UserMobileInfo, WINDSOCK_LOADER, WIRE_LOADER, WheelPicker, WindsockIcon, ZA_THEME_CONFIG, buildDockActions, buildFlyoutNavItems, buildLaunchpadItems, buttonPress, buttonPressReduced, buttonTap, cardHover, cardHoverReduced, cardPress, computeDomain, computeSeries, createMotionProps, customerAnalyticsWorkflow, durations, durationsReduced, easings, fadeOnly, fadeScale, filterByPermission, financialWorkflow, formatAddress, formatCurrency, formatCurrency2, formatDate, formatPercentage, getAllCountries, getArgentinaAccent, getArgentinaColors, getArgentinaFlagUrl, getArgentinaGradient, getArgentinaHexColor, getArgentinaPalette, getAustraliaAccent, getAustraliaColors, getAustraliaFlagUrl, getAustraliaGradient, getAustraliaHexColor, getAustraliaPalette, getBrazilAccent, getBrazilColors, getBrazilFlagUrl, getBrazilGradient, getBrazilHexColor, getBrazilPalette, getCanadaAccent, getCanadaColors, getCanadaFlagUrl, getCanadaGradient, getCanadaHexColor, getCanadaPalette, getChileAccent, getChileColors, getChileFlagUrl, getChileGradient, getChileHexColor, getChilePalette, getColombiaAccent, getColombiaColors, getColombiaFlagUrl, getColombiaGradient, getColombiaHexColor, getColombiaPalette, getCountryConfig, getEgyptAccent, getEgyptColors, getEgyptFlagUrl, getEgyptGradient, getEgyptHexColor, getEgyptPalette, getFranceAccent, getFranceColors, getFranceFlagUrl, getFranceGradient, getFranceHexColor, getFrancePalette, getGermanyAccent, getGermanyColors, getGermanyFlagUrl, getGermanyGradient, getGermanyHexColor, getGermanyPalette, getIndiaAccent, getIndiaColors, getIndiaFlagUrl, getIndiaGradient, getIndiaHexColor, getIndiaPalette, getIndonesiaAccent, getIndonesiaColors, getIndonesiaFlagUrl, getIndonesiaGradient, getIndonesiaHexColor, getIndonesiaPalette, getItalyAccent, getItalyColors, getItalyFlagUrl, getItalyGradient, getItalyHexColor, getItalyPalette, getJapanAccent, getJapanColors, getJapanFlagUrl, getJapanGradient, getJapanHexColor, getJapanPalette, getMexicoAccent, getMexicoColors, getMexicoFlagUrl, getMexicoGradient, getMexicoHexColor, getMexicoPalette, getNetherlandsAccent, getNetherlandsColors, getNetherlandsFlagUrl, getNetherlandsGradient, getNetherlandsHexColor, getNetherlandsPalette, getNewZealandAccent, getNewZealandColors, getNewZealandFlagUrl, getNewZealandGradient, getNewZealandHexColor, getNewZealandPalette, getNigeriaAccent, getNigeriaColors, getNigeriaFlagUrl, getNigeriaGradient, getNigeriaHexColor, getNigeriaPalette, getNorwayAccent, getNorwayColors, getNorwayFlagUrl, getNorwayGradient, getNorwayHexColor, getNorwayPalette, getPeruAccent, getPeruColors, getPeruFlagUrl, getPeruGradient, getPeruHexColor, getPeruPalette, getPhilippinesAccent, getPhilippinesColors, getPhilippinesFlagUrl, getPhilippinesGradient, getPhilippinesHexColor, getPhilippinesPalette, getPolandAccent, getPolandColors, getPolandFlagUrl, getPolandGradient, getPolandHexColor, getPolandPalette, getPortugalAccent, getPortugalColors, getPortugalFlagUrl, getPortugalGradient, getPortugalHexColor, getPortugalPalette, getSouthAfricaAccent, getSouthAfricaColors, getSouthAfricaFlagUrl, getSouthAfricaGradient, getSouthAfricaHexColor, getSouthAfricaPalette, getSouthKoreaAccent, getSouthKoreaColors, getSouthKoreaFlagUrl, getSouthKoreaGradient, getSouthKoreaHexColor, getSouthKoreaPalette, getSpainAccent, getSpainColors, getSpainFlagUrl, getSpainGradient, getSpainHexColor, getSpainPalette, getStatusColor, getSubdivisionAccent, getSubdivisionColors, getSubdivisionFlagUrl, getSubdivisionGradient, getSubdivisionHexColor, getSubdivisionPalette, getSwedenAccent, getSwedenColors, getSwedenFlagUrl, getSwedenGradient, getSwedenHexColor, getSwedenPalette, getThailandAccent, getThailandColors, getThailandFlagUrl, getThailandGradient, getThailandHexColor, getThailandPalette, getTransition, getTurkeyAccent, getTurkeyColors, getTurkeyFlagUrl, getTurkeyGradient, getTurkeyHexColor, getTurkeyPalette, getUKAccent, getUKColors, getUKFlagUrl, getUKGradient, getUKHexColor, getUKPalette, getUsAccent, getUsColors, getUsFlagUrl, getUsGradient, getUsHexColor, getUsPalette, getVariants, hrWorkflow, inventoryWorkflow, iosColors, isValidArgentinaProvince, isValidAustraliaState, isValidBrazilState, isValidCanadaProvince, isValidChileRegion, isValidColombiaDepartment, isValidEgyptGovernorate, isValidFranceRegion, isValidGermanyState, isValidIndiaState, isValidIndonesiaProvince, isValidItalyRegion, isValidJapanPrefecture, isValidMexicoState, isValidNetherlandsProvince, isValidNewZealandRegion, isValidNigeriaState, isValidNorwayCounty, isValidPeruDepartment, isValidPhilippinesProvince, isValidPolandVoivodeship, isValidPortugalDistrict, isValidSouthAfricaProvince, isValidSouthKoreaProvince, isValidSpainProvince, isValidSubdivision, isValidSwedenCounty, isValidThailandProvince, isValidTurkeyProvince, isValidUKNation, isValidUsState, koriAssistantTheme, koriDepartmentFlows, lgpdWorkflow, listItem, listItemReduced, logisticsWorkflow, manufacturingWorkflow, marketingWorkflow, notificationBanner, notificationBannerReduced, pageControlDot, payrollWorkflow, prefersReducedMotion, registerCountry, registerSubdivisionTheme, resolveGlassAccentRgb, salesWorkflow, selectIsAuthenticated, selectShowShellChrome, selectUserInitial, selectUserName, shimmerClass, shimmerWhiteClass, slideDown, slideRight, slideUp, springPresets, springPresetsReduced, staggerContainer, supportWorkflow, swipeActionThreshold, swipeConstraints, useGeoMapState, useNotifications, usePlatformShellStore, usePullToRefresh, validateDashboardSpec, xScale, yScale };
25598
- //# sourceMappingURL=chunk-A3BFURJB.mjs.map
25599
- //# sourceMappingURL=chunk-A3BFURJB.mjs.map
25054
+ export { AIOrchestratorDemo, ARGENTINA_ACCENT_MAP, ARGENTINA_MACRO_REGIONS, ARGENTINA_MAP_CENTER, ARGENTINA_PROVINCE_COORDINATES, ARGENTINA_PROVINCE_PALETTES, AR_THEME_CONFIG, AUSTRALIA_ACCENT_MAP, AUSTRALIA_MACRO_REGIONS, AUSTRALIA_MAP_CENTER, AUSTRALIA_STATE_COORDINATES, AUSTRALIA_STATE_PALETTES, AU_THEME_CONFIG, ActionMenu, ActionSheet, ActiveFilterChips, AgentAnalysisCard, AnalysisSkeleton, AnimatedNumber, AnimatedTableRow, AppLogo, AppNavigation, AppShell, ArchiveSwipeAction, AuthLayout, Avatar, AvatarButton, BRAZIL_ACCENT_MAP, BRAZIL_MACRO_REGIONS, BRAZIL_MAP_CENTER, BRAZIL_STATE_COORDINATES, BRAZIL_STATE_PALETTES, BR_THEME_CONFIG, BackupCodeGrid, BadRequestPage, Badge, BaseForm, BentoCard, BentoFeatureGrid, BooleanFlagsPicker, BottomSafeArea, BrandFilterSkeleton, BrandedLoader, Breadcrumb, Button, CANADA_ACCENT_MAP, CANADA_MACRO_REGIONS, CANADA_MAP_CENTER, CANADA_PROVINCE_COORDINATES, CANADA_PROVINCE_PALETTES, CA_THEME_CONFIG, CHILE_ACCENT_MAP, CHILE_MACRO_REGIONS, CHILE_MAP_CENTER, CHILE_REGION_COORDINATES, CHILE_REGION_PALETTES, CL_THEME_CONFIG, COLOMBIA_ACCENT_MAP, COLOMBIA_DEPARTMENT_COORDINATES, COLOMBIA_DEPARTMENT_PALETTES, COLOMBIA_MACRO_REGIONS, COLOMBIA_MAP_CENTER, CO_THEME_CONFIG, Card, CardActionMenu, CardContent, CardDescription, CardDivider, CardFooter, CardGridSkeleton, CardHeader, CardSectionHeader, CardTitle, CategoryBadge, CategoryTab, CategoryTabs, ChartRenderer, ChipPicker, CircularRefreshIndicator, Code, CollapsibleGroupedList, CompactSegmentedControl, ContactCard, ContactSection, Container, ContextMenu, CookieConsent, CopyableId, CountPill, CreateActionButton, CustomerAnalyticsDemo, DE_THEME_CONFIG, DashboardDemo, DashboardDemoLayout, DashboardProgressShell, DashboardView, DataPagination, DatePicker, DeleteSwipeAction, DepartmentAssistantDemo, DepartmentWorkflowDemo, Description4 as Description, DetailsPopover, DevModeBanner, Dialog4 as Dialog, DialogActions, DialogBody, DialogDescription, DialogTitle3 as DialogTitle, Divider, Dock, DockContainer, DockSkeleton, DotRefreshIndicator, Dropdown, DropdownButton, DropdownDivider, DropdownItem, DropdownLabel, DropdownMenu, DropdownSelect, DynamicIsland, DynamicIslandConfirm, DynamicIslandNotification, EGYPT_ACCENT_MAP, EGYPT_GOVERNORATE_COORDINATES, EGYPT_GOVERNORATE_PALETTES, EGYPT_MACRO_REGIONS, EGYPT_MAP_CENTER, EG_THEME_CONFIG, ES_THEME_CONFIG, EdgeSwipeIndicator, EdgeSwipeProvider, EditSwipeAction, EmptyState, EntityCard, EntityDrawer, ErrorMessage, ErrorState, ExpandableHistoryList, ExpandingPageIndicator, FRANCE_ACCENT_MAP, FRANCE_MACRO_REGIONS, FRANCE_MAP_CENTER, FRANCE_REGION_COORDINATES, FRANCE_REGION_PALETTES, FR_THEME_CONFIG, FavoriteSwipeAction, FeatureCard, FeedItemCard, Field2 as Field, FieldGroup, Fieldset2 as Fieldset, FilterBadge, FilterPill, FilterSectionHeader, FilterTileButton, FinancialDemo, FloatingActionButton, FlyoutMenu, FlyoutNavGrid, FlyoutQuickActions, ForceTouchMenu, Form, FormActions, FormActionsRow, FormCheckbox, FormField, FormGrid, FormInput, FormPriceInput, FormSection, FormSelect, FormTextarea, FormToggle, GB_THEME_CONFIG, GERMANY_ACCENT_MAP, GERMANY_MACRO_REGIONS, GERMANY_MAP_CENTER, GERMANY_STATE_COORDINATES, GERMANY_STATE_PALETTES, GeoMapCanvas, GeoMapLegend, GlassModal, Gradient, GradientBackground, GrowthIndicator, HRRecruitmentDemo, Heading, HeroPanel, HeroSection, ID_THEME_CONFIG, INDIA_ACCENT_MAP, INDIA_MACRO_REGIONS, INDIA_MAP_CENTER, INDIA_STATE_COORDINATES, INDIA_STATE_PALETTES, INDONESIA_ACCENT_MAP, INDONESIA_MACRO_REGIONS, INDONESIA_MAP_CENTER, INDONESIA_PROVINCE_COORDINATES, INDONESIA_PROVINCE_PALETTES, IN_THEME_CONFIG, ITALY_ACCENT_MAP, ITALY_MACRO_REGIONS, ITALY_MAP_CENTER, ITALY_REGION_COORDINATES, ITALY_REGION_PALETTES, IT_THEME_CONFIG, IconButton, ImageUpload, IncidentPipelineDemo, InfoPopover, InlineForm, InlineSpinner, Input, InputRequestForm, InteractiveGeoMap, InventoryDemo, ItemSummary, JAPAN_ACCENT_MAP, JAPAN_MACRO_REGIONS, JAPAN_MAP_CENTER, JAPAN_PREFECTURE_COORDINATES, JAPAN_PREFECTURE_PALETTES, JP_THEME_CONFIG, KORI_ERP_LOADER, KR_THEME_CONFIG, LGPDComplianceDemo, LOCALE_FLAGS, Label2 as Label, LabeledToggle, LanguageSwitcher, LaunchpadGrid, Lead, Legend2 as Legend, LiquidFilterInput, ListCard, ListCardItem, ListItem, LoadingOverlay, MEXICO_ACCENT_MAP, MEXICO_MACRO_REGIONS, MEXICO_MAP_CENTER, MEXICO_STATE_COORDINATES, MEXICO_STATE_PALETTES, MX_THEME_CONFIG, ManagementPageLayout, ManagementSurface, MapZoomControls, MarketPricesCard, MarketingDemo, MetricCard, MonthPicker, MultiColumnPicker, NETHERLANDS_ACCENT_MAP, NETHERLANDS_MACRO_REGIONS, NETHERLANDS_MAP_CENTER, NETHERLANDS_PROVINCE_COORDINATES, NETHERLANDS_PROVINCE_PALETTES, NEW_ZEALAND_ACCENT_MAP, NEW_ZEALAND_MACRO_REGIONS, NEW_ZEALAND_MAP_CENTER, NEW_ZEALAND_REGION_COORDINATES, NEW_ZEALAND_REGION_PALETTES, NG_THEME_CONFIG, NIGERIA_ACCENT_MAP, NIGERIA_MACRO_REGIONS, NIGERIA_MAP_CENTER, NIGERIA_STATE_COORDINATES, NIGERIA_STATE_PALETTES, NL_THEME_CONFIG, NORWAY_ACCENT_MAP, NORWAY_COUNTY_COORDINATES, NORWAY_COUNTY_PALETTES, NORWAY_MACRO_REGIONS, NORWAY_MAP_CENTER, NO_THEME_CONFIG, NZ_THEME_CONFIG, NavigationProgress, NoDataState, NoResultsState, NotFoundPage, NotificationBadge, NotificationBellButton, NotificationProvider, OfficeCard, OfflineState, OptionGrid, OtpInput, PERU_ACCENT_MAP, PERU_DEPARTMENT_COORDINATES, PERU_DEPARTMENT_PALETTES, PERU_MACRO_REGIONS, PERU_MAP_CENTER, PE_THEME_CONFIG, PHILIPPINES_ACCENT_MAP, PHILIPPINES_MACRO_REGIONS, PHILIPPINES_MAP_CENTER, PHILIPPINES_PROVINCE_COORDINATES, PHILIPPINES_PROVINCE_PALETTES, PH_THEME_CONFIG, PL_THEME_CONFIG, POLAND_ACCENT_MAP, POLAND_MACRO_REGIONS, POLAND_MAP_CENTER, POLAND_VOIVODESHIP_COORDINATES, POLAND_VOIVODESHIP_PALETTES, PORTUGAL_ACCENT_MAP, PORTUGAL_DISTRICT_COORDINATES, PORTUGAL_DISTRICT_PALETTES, PORTUGAL_MACRO_REGIONS, PORTUGAL_MAP_CENTER, PT_THEME_CONFIG, PageEmptyState, PageErrorState, PageHeader, PageHeading, PageIndicator, PageLoadingState, PageSectionHeader, Pagination, PasswordInput, PasswordStrengthMeter, Pill, PlatformShell, PlusGrid, PlusGridItem, PlusGridRow, PreferenceSection, PriceChangeBadge, ProfileIdentityCard, Progress, ProgressIndicator, PullToRefreshContainer, PullToRefreshIndicator, RadiantHeading, RadiantStatCard, RadiantSubheading, RecommendationCard, RegionFilterSkeleton, RoleBadge, SE_THEME_CONFIG, SOUTH_AFRICA_ACCENT_MAP, SOUTH_AFRICA_MACRO_REGIONS, SOUTH_AFRICA_MAP_CENTER, SOUTH_AFRICA_PROVINCE_COORDINATES, SOUTH_AFRICA_PROVINCE_PALETTES, SOUTH_KOREA_ACCENT_MAP, SOUTH_KOREA_MACRO_REGIONS, SOUTH_KOREA_MAP_CENTER, SOUTH_KOREA_PROVINCE_COORDINATES, SOUTH_KOREA_PROVINCE_PALETTES, SPAIN_ACCENT_MAP, SPAIN_MACRO_REGIONS, SPAIN_MAP_CENTER, SPAIN_PROVINCE_COORDINATES, SPAIN_PROVINCE_PALETTES, SWEDEN_ACCENT_MAP, SWEDEN_COUNTY_COORDINATES, SWEDEN_COUNTY_PALETTES, SWEDEN_MACRO_REGIONS, SWEDEN_MAP_CENTER, SafeArea, SafeAreaSpacer, SafeAreaView, SalesDemo, SearchBar, SearchFilterToolbar, SearchInput, SectionCard, SectionHeader, SectionHeaderSkeleton, SegmentedControl, Select, SelectableChipPicker, SelectableListPicker, SelectableOptionsGrid, SelectableTableRow, SelectionCard, ServerErrorPage, SettingsModal, Sheet, SkipToContent, SocialLoginButtons, SortableTableHeader, Spinner, Stat, StatCard, StatCardSkeleton, StatusBadge, StatusToggle, StepFormPage, StepNavigationButtons, StepTimeline, StreamingDashboard, Strong, Subheading, SwipeableRow, Switch2 as Switch, THAILAND_ACCENT_MAP, THAILAND_MACRO_REGIONS, THAILAND_MAP_CENTER, THAILAND_PROVINCE_COORDINATES, THAILAND_PROVINCE_PALETTES, TH_THEME_CONFIG, TR_THEME_CONFIG, TURKEY_ACCENT_MAP, TURKEY_MACRO_REGIONS, TURKEY_MAP_CENTER, TURKEY_PROVINCE_COORDINATES, TURKEY_PROVINCE_PALETTES, Table, TableBody, TableCell, TableEmptyState, TableHead, TableHeader, TableRow, TableSkeleton, TableSkeletonRow, Tabs, TabsContent, TabsList, TabsTrigger, TagBadge, Text, TextLink, Textarea, ThemeSwitch, ThemeToggle, ThemeToggleCompact, TimePicker, ToggleSwitch, TouchTarget, UK_ACCENT_MAP, UK_MACRO_REGIONS, UK_MAP_CENTER, UK_NATION_COORDINATES, UK_NATION_PALETTES, US_ACCENT_MAP, US_MACRO_REGIONS, US_MAP_CENTER, US_STATE_COORDINATES, US_STATE_PALETTES, US_THEME_CONFIG, UserAvatar, UserMobileInfo, WINDSOCK_LOADER, WIRE_LOADER, WheelPicker, WindsockIcon, ZA_THEME_CONFIG, buildDockActions, buildFlyoutNavItems, buildLaunchpadItems, buttonPress, buttonPressReduced, buttonTap, cardHover, cardHoverReduced, cardPress, computeDomain, computeSeries, createMotionProps, customerAnalyticsWorkflow, durations, durationsReduced, easings, fadeOnly, fadeScale, filterByPermission, financialWorkflow, formatAddress, formatCurrency, formatCurrency2, formatDate, formatPercentage, getAllCountries, getArgentinaAccent, getArgentinaColors, getArgentinaFlagUrl, getArgentinaGradient, getArgentinaHexColor, getArgentinaPalette, getAustraliaAccent, getAustraliaColors, getAustraliaFlagUrl, getAustraliaGradient, getAustraliaHexColor, getAustraliaPalette, getBrazilAccent, getBrazilColors, getBrazilFlagUrl, getBrazilGradient, getBrazilHexColor, getBrazilPalette, getCanadaAccent, getCanadaColors, getCanadaFlagUrl, getCanadaGradient, getCanadaHexColor, getCanadaPalette, getChileAccent, getChileColors, getChileFlagUrl, getChileGradient, getChileHexColor, getChilePalette, getColombiaAccent, getColombiaColors, getColombiaFlagUrl, getColombiaGradient, getColombiaHexColor, getColombiaPalette, getCountryConfig, getEgyptAccent, getEgyptColors, getEgyptFlagUrl, getEgyptGradient, getEgyptHexColor, getEgyptPalette, getFranceAccent, getFranceColors, getFranceFlagUrl, getFranceGradient, getFranceHexColor, getFrancePalette, getGermanyAccent, getGermanyColors, getGermanyFlagUrl, getGermanyGradient, getGermanyHexColor, getGermanyPalette, getIndiaAccent, getIndiaColors, getIndiaFlagUrl, getIndiaGradient, getIndiaHexColor, getIndiaPalette, getIndonesiaAccent, getIndonesiaColors, getIndonesiaFlagUrl, getIndonesiaGradient, getIndonesiaHexColor, getIndonesiaPalette, getItalyAccent, getItalyColors, getItalyFlagUrl, getItalyGradient, getItalyHexColor, getItalyPalette, getJapanAccent, getJapanColors, getJapanFlagUrl, getJapanGradient, getJapanHexColor, getJapanPalette, getMexicoAccent, getMexicoColors, getMexicoFlagUrl, getMexicoGradient, getMexicoHexColor, getMexicoPalette, getNetherlandsAccent, getNetherlandsColors, getNetherlandsFlagUrl, getNetherlandsGradient, getNetherlandsHexColor, getNetherlandsPalette, getNewZealandAccent, getNewZealandColors, getNewZealandFlagUrl, getNewZealandGradient, getNewZealandHexColor, getNewZealandPalette, getNigeriaAccent, getNigeriaColors, getNigeriaFlagUrl, getNigeriaGradient, getNigeriaHexColor, getNigeriaPalette, getNorwayAccent, getNorwayColors, getNorwayFlagUrl, getNorwayGradient, getNorwayHexColor, getNorwayPalette, getPeruAccent, getPeruColors, getPeruFlagUrl, getPeruGradient, getPeruHexColor, getPeruPalette, getPhilippinesAccent, getPhilippinesColors, getPhilippinesFlagUrl, getPhilippinesGradient, getPhilippinesHexColor, getPhilippinesPalette, getPolandAccent, getPolandColors, getPolandFlagUrl, getPolandGradient, getPolandHexColor, getPolandPalette, getPortugalAccent, getPortugalColors, getPortugalFlagUrl, getPortugalGradient, getPortugalHexColor, getPortugalPalette, getSouthAfricaAccent, getSouthAfricaColors, getSouthAfricaFlagUrl, getSouthAfricaGradient, getSouthAfricaHexColor, getSouthAfricaPalette, getSouthKoreaAccent, getSouthKoreaColors, getSouthKoreaFlagUrl, getSouthKoreaGradient, getSouthKoreaHexColor, getSouthKoreaPalette, getSpainAccent, getSpainColors, getSpainFlagUrl, getSpainGradient, getSpainHexColor, getSpainPalette, getStatusColor, getSubdivisionAccent, getSubdivisionColors, getSubdivisionFlagUrl, getSubdivisionGradient, getSubdivisionHexColor, getSubdivisionPalette, getSwedenAccent, getSwedenColors, getSwedenFlagUrl, getSwedenGradient, getSwedenHexColor, getSwedenPalette, getThailandAccent, getThailandColors, getThailandFlagUrl, getThailandGradient, getThailandHexColor, getThailandPalette, getTransition, getTurkeyAccent, getTurkeyColors, getTurkeyFlagUrl, getTurkeyGradient, getTurkeyHexColor, getTurkeyPalette, getUKAccent, getUKColors, getUKFlagUrl, getUKGradient, getUKHexColor, getUKPalette, getUsAccent, getUsColors, getUsFlagUrl, getUsGradient, getUsHexColor, getUsPalette, getVariants, hrWorkflow, inventoryWorkflow, iosColors, isValidArgentinaProvince, isValidAustraliaState, isValidBrazilState, isValidCanadaProvince, isValidChileRegion, isValidColombiaDepartment, isValidEgyptGovernorate, isValidFranceRegion, isValidGermanyState, isValidIndiaState, isValidIndonesiaProvince, isValidItalyRegion, isValidJapanPrefecture, isValidMexicoState, isValidNetherlandsProvince, isValidNewZealandRegion, isValidNigeriaState, isValidNorwayCounty, isValidPeruDepartment, isValidPhilippinesProvince, isValidPolandVoivodeship, isValidPortugalDistrict, isValidSouthAfricaProvince, isValidSouthKoreaProvince, isValidSpainProvince, isValidSubdivision, isValidSwedenCounty, isValidThailandProvince, isValidTurkeyProvince, isValidUKNation, isValidUsState, koriAssistantTheme, koriDepartmentFlows, lgpdWorkflow, listItem, listItemReduced, logisticsWorkflow, manufacturingWorkflow, marketingWorkflow, notificationBanner, notificationBannerReduced, pageControlDot, payrollWorkflow, prefersReducedMotion, registerCountry, registerSubdivisionTheme, resolveGlassAccentRgb, salesWorkflow, selectIsAuthenticated, selectShowShellChrome, selectUserInitial, selectUserName, shimmerClass, shimmerWhiteClass, slideDown, slideRight, slideUp, springPresets, springPresetsReduced, staggerContainer, supportWorkflow, swipeActionThreshold, swipeConstraints, useGeoMapState, useNotifications, usePlatformShellStore, usePullToRefresh, validateDashboardSpec, xScale, yScale };
25055
+ //# sourceMappingURL=chunk-JN6IL6OH.mjs.map
25056
+ //# sourceMappingURL=chunk-JN6IL6OH.mjs.map