@iblai/iblai-js 2.14.0 → 2.15.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.
@@ -1980,6 +1980,7 @@ var analyticsAnalyticsCourses$3 = {
1980
1980
  loading: "Loading...",
1981
1981
  colCourseName: "Course Name",
1982
1982
  colCourseId: "Course ID",
1983
+ openCourseAriaLabel: "Open course {id} in a new tab",
1983
1984
  colEnrollments: "Enrollments",
1984
1985
  viewCourseAriaLabel: "View details for {name}",
1985
1986
  goToFirstPage: "Go to first page",
@@ -2032,15 +2033,15 @@ var analyticsAnalyticsFinancialStats$3 = {
2032
2033
  viewTraces: "Traces →",
2033
2034
  costByLLMFooter: "{shown} models · ranked by cost"
2034
2035
  };
2036
+ var analyticsAgentScopeLink$3 = {
2037
+ scopeToAgent: "View analytics for {name}"
2038
+ };
2035
2039
  var analyticsAnalyticsMemoryStats$3 = {
2036
2040
  noPermission: "You do not have permission to view user memories.",
2037
2041
  scopeLabel: "Memory scope",
2038
2042
  scopeMentor: "This Agent",
2039
2043
  scopeAllMentors: "All Agents",
2040
2044
  scopeGlobal: "Global",
2041
- searchAgents: "Search Agents…",
2042
- searchAgentsTitle: "Search Agents",
2043
- clearAgentSearch: "Clear Agent Search",
2044
2045
  contentPlaceholder: "Search memory content",
2045
2046
  pickDateRange: "Pick a Date Range",
2046
2047
  allCategories: "All Categories",
@@ -2185,6 +2186,7 @@ var analyticsAnalyticsPrograms$3 = {
2185
2186
  loading: "Loading...",
2186
2187
  programName: "Program Name",
2187
2188
  programId: "Program ID",
2189
+ openProgramAriaLabel: "Open program {id} in a new tab",
2188
2190
  viewDetailsAriaLabel: "View details for {name}",
2189
2191
  goToFirstPage: "Go to first page",
2190
2192
  goToPreviousPage: "Go to previous page",
@@ -2264,7 +2266,6 @@ var analyticsAnalyticsTranscriptsStats$3 = {
2264
2266
  labelModel: "Model:",
2265
2267
  labelModelCard: "model:",
2266
2268
  labelUser: "User:",
2267
- labelUserId: "user_id:",
2268
2269
  roleUser: "User",
2269
2270
  roleAgent: "Agent",
2270
2271
  noMessages: "No messages in this conversation.",
@@ -8184,6 +8185,7 @@ var en = {
8184
8185
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$3,
8185
8186
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$3,
8186
8187
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$3,
8188
+ analyticsAgentScopeLink: analyticsAgentScopeLink$3,
8187
8189
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$3,
8188
8190
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$3,
8189
8191
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$3,
@@ -9131,6 +9133,7 @@ var analyticsAnalyticsCourses$2 = {
9131
9133
  loading: "Chargement...",
9132
9134
  colCourseName: "Nom du cours",
9133
9135
  colCourseId: "ID du cours",
9136
+ openCourseAriaLabel: "Ouvrir le cours {id} dans un nouvel onglet",
9134
9137
  colEnrollments: "Inscriptions",
9135
9138
  viewCourseAriaLabel: "Voir les détails de {name}",
9136
9139
  goToFirstPage: "Aller à la première page",
@@ -9183,15 +9186,15 @@ var analyticsAnalyticsFinancialStats$2 = {
9183
9186
  viewTraces: "Traces →",
9184
9187
  costByLLMFooter: "{shown} modèles · classés par coût"
9185
9188
  };
9189
+ var analyticsAgentScopeLink$2 = {
9190
+ scopeToAgent: "Voir les analyses de {name}"
9191
+ };
9186
9192
  var analyticsAnalyticsMemoryStats$2 = {
9187
9193
  noPermission: "Vous n'avez pas l'autorisation de consulter les mémoires des utilisateurs.",
9188
9194
  scopeLabel: "Portée de la mémoire",
9189
9195
  scopeMentor: "Cet agent",
9190
9196
  scopeAllMentors: "Tous les agents",
9191
9197
  scopeGlobal: "Global",
9192
- searchAgents: "Rechercher des agents…",
9193
- searchAgentsTitle: "Rechercher des agents",
9194
- clearAgentSearch: "Effacer la recherche d'agent",
9195
9198
  contentPlaceholder: "Rechercher dans le contenu des mémoires",
9196
9199
  pickDateRange: "Choisir une plage de dates",
9197
9200
  allCategories: "Toutes les catégories",
@@ -9336,6 +9339,7 @@ var analyticsAnalyticsPrograms$2 = {
9336
9339
  loading: "Chargement...",
9337
9340
  programName: "Nom du programme",
9338
9341
  programId: "ID du programme",
9342
+ openProgramAriaLabel: "Ouvrir le programme {id} dans un nouvel onglet",
9339
9343
  viewDetailsAriaLabel: "Voir les détails de {name}",
9340
9344
  goToFirstPage: "Aller à la première page",
9341
9345
  goToPreviousPage: "Aller à la page précédente",
@@ -9415,7 +9419,6 @@ var analyticsAnalyticsTranscriptsStats$2 = {
9415
9419
  labelModel: "Modèle :",
9416
9420
  labelModelCard: "modèle :",
9417
9421
  labelUser: "Utilisateur :",
9418
- labelUserId: "ID utilisateur :",
9419
9422
  roleUser: "Utilisateur",
9420
9423
  roleAgent: "Agent",
9421
9424
  noMessages: "Aucun message dans cette conversation.",
@@ -15335,6 +15338,7 @@ var fr = {
15335
15338
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$2,
15336
15339
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$2,
15337
15340
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$2,
15341
+ analyticsAgentScopeLink: analyticsAgentScopeLink$2,
15338
15342
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$2,
15339
15343
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$2,
15340
15344
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$2,
@@ -16282,6 +16286,7 @@ var analyticsAnalyticsCourses$1 = {
16282
16286
  loading: "Cargando...",
16283
16287
  colCourseName: "Nombre del curso",
16284
16288
  colCourseId: "ID del curso",
16289
+ openCourseAriaLabel: "Abrir el curso {id} en una pestaña nueva",
16285
16290
  colEnrollments: "Inscripciones",
16286
16291
  viewCourseAriaLabel: "Ver detalles de {name}",
16287
16292
  goToFirstPage: "Ir a la primera página",
@@ -16334,15 +16339,15 @@ var analyticsAnalyticsFinancialStats$1 = {
16334
16339
  viewTraces: "Trazas →",
16335
16340
  costByLLMFooter: "{shown} modelos · ordenados por costo"
16336
16341
  };
16342
+ var analyticsAgentScopeLink$1 = {
16343
+ scopeToAgent: "Ver analíticas de {name}"
16344
+ };
16337
16345
  var analyticsAnalyticsMemoryStats$1 = {
16338
16346
  noPermission: "No tienes permiso para ver los recuerdos de los usuarios.",
16339
16347
  scopeLabel: "Alcance de la memoria",
16340
16348
  scopeMentor: "Este agente",
16341
16349
  scopeAllMentors: "Todos los agentes",
16342
16350
  scopeGlobal: "Global",
16343
- searchAgents: "Buscar agentes…",
16344
- searchAgentsTitle: "Buscar agentes",
16345
- clearAgentSearch: "Borrar la búsqueda de agentes",
16346
16351
  contentPlaceholder: "Buscar en el contenido de los recuerdos",
16347
16352
  pickDateRange: "Elige un rango de fechas",
16348
16353
  allCategories: "Todas las categorías",
@@ -16487,6 +16492,7 @@ var analyticsAnalyticsPrograms$1 = {
16487
16492
  loading: "Cargando...",
16488
16493
  programName: "Nombre del programa",
16489
16494
  programId: "ID del programa",
16495
+ openProgramAriaLabel: "Abrir el programa {id} en una pestaña nueva",
16490
16496
  viewDetailsAriaLabel: "Ver detalles de {name}",
16491
16497
  goToFirstPage: "Ir a la primera página",
16492
16498
  goToPreviousPage: "Ir a la página anterior",
@@ -16566,7 +16572,6 @@ var analyticsAnalyticsTranscriptsStats$1 = {
16566
16572
  labelModel: "Modelo:",
16567
16573
  labelModelCard: "modelo:",
16568
16574
  labelUser: "Usuario:",
16569
- labelUserId: "ID de usuario:",
16570
16575
  roleUser: "Usuario",
16571
16576
  roleAgent: "Agente",
16572
16577
  noMessages: "No hay mensajes en esta conversación.",
@@ -22486,6 +22491,7 @@ var es = {
22486
22491
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail$1,
22487
22492
  analyticsAnalyticsCourses: analyticsAnalyticsCourses$1,
22488
22493
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats$1,
22494
+ analyticsAgentScopeLink: analyticsAgentScopeLink$1,
22489
22495
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats$1,
22490
22496
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats$1,
22491
22497
  analyticsAnalyticsOverview: analyticsAnalyticsOverview$1,
@@ -23433,6 +23439,7 @@ var analyticsAnalyticsCourses = {
23433
23439
  loading: "加载中...",
23434
23440
  colCourseName: "课程名称",
23435
23441
  colCourseId: "课程 ID",
23442
+ openCourseAriaLabel: "在新标签页中打开课程 {id}",
23436
23443
  colEnrollments: "注册人数",
23437
23444
  viewCourseAriaLabel: "查看 {name} 的详情",
23438
23445
  goToFirstPage: "跳转到第一页",
@@ -23485,15 +23492,15 @@ var analyticsAnalyticsFinancialStats = {
23485
23492
  viewTraces: "追踪 →",
23486
23493
  costByLLMFooter: "{shown} 个模型 · 按成本排序"
23487
23494
  };
23495
+ var analyticsAgentScopeLink = {
23496
+ scopeToAgent: "查看 {name} 的分析"
23497
+ };
23488
23498
  var analyticsAnalyticsMemoryStats = {
23489
23499
  noPermission: "您没有查看用户记忆的权限。",
23490
23500
  scopeLabel: "记忆范围",
23491
23501
  scopeMentor: "当前智能体",
23492
23502
  scopeAllMentors: "所有智能体",
23493
23503
  scopeGlobal: "全局",
23494
- searchAgents: "搜索智能体…",
23495
- searchAgentsTitle: "搜索智能体",
23496
- clearAgentSearch: "清除智能体搜索",
23497
23504
  contentPlaceholder: "搜索记忆内容",
23498
23505
  pickDateRange: "选择日期范围",
23499
23506
  allCategories: "所有类别",
@@ -23638,6 +23645,7 @@ var analyticsAnalyticsPrograms = {
23638
23645
  loading: "加载中...",
23639
23646
  programName: "项目名称",
23640
23647
  programId: "项目 ID",
23648
+ openProgramAriaLabel: "在新标签页中打开项目 {id}",
23641
23649
  viewDetailsAriaLabel: "查看 {name} 的详情",
23642
23650
  goToFirstPage: "跳至第一页",
23643
23651
  goToPreviousPage: "跳至上一页",
@@ -23717,7 +23725,6 @@ var analyticsAnalyticsTranscriptsStats = {
23717
23725
  labelModel: "模型:",
23718
23726
  labelModelCard: "模型:",
23719
23727
  labelUser: "用户:",
23720
- labelUserId: "用户 ID:",
23721
23728
  roleUser: "用户",
23722
23729
  roleAgent: "智能体",
23723
23730
  noMessages: "此对话中没有消息。",
@@ -29637,6 +29644,7 @@ var zh = {
29637
29644
  analyticsAnalyticsCourseDetail: analyticsAnalyticsCourseDetail,
29638
29645
  analyticsAnalyticsCourses: analyticsAnalyticsCourses,
29639
29646
  analyticsAnalyticsFinancialStats: analyticsAnalyticsFinancialStats,
29647
+ analyticsAgentScopeLink: analyticsAgentScopeLink,
29640
29648
  analyticsAnalyticsMemoryStats: analyticsAnalyticsMemoryStats,
29641
29649
  analyticsAnalyticsMonetizationStats: analyticsAnalyticsMonetizationStats,
29642
29650
  analyticsAnalyticsOverview: analyticsAnalyticsOverview,
@@ -78337,7 +78345,7 @@ const createLucideIcon = (iconName, iconNode) => {
78337
78345
  */
78338
78346
 
78339
78347
 
78340
- const __iconNode$2q = [
78348
+ const __iconNode$2r = [
78341
78349
  [
78342
78350
  "path",
78343
78351
  {
@@ -78346,7 +78354,7 @@ const __iconNode$2q = [
78346
78354
  }
78347
78355
  ]
78348
78356
  ];
78349
- const Activity = createLucideIcon("activity", __iconNode$2q);
78357
+ const Activity = createLucideIcon("activity", __iconNode$2r);
78350
78358
 
78351
78359
  /**
78352
78360
  * @license lucide-react v0.528.0 - ISC
@@ -78356,12 +78364,12 @@ const Activity = createLucideIcon("activity", __iconNode$2q);
78356
78364
  */
78357
78365
 
78358
78366
 
78359
- const __iconNode$2p = [
78367
+ const __iconNode$2q = [
78360
78368
  ["path", { d: "M17 12H7", key: "16if0g" }],
78361
78369
  ["path", { d: "M19 18H5", key: "18s9l3" }],
78362
78370
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
78363
78371
  ];
78364
- const AlignCenter = createLucideIcon("align-center", __iconNode$2p);
78372
+ const AlignCenter = createLucideIcon("align-center", __iconNode$2q);
78365
78373
 
78366
78374
  /**
78367
78375
  * @license lucide-react v0.528.0 - ISC
@@ -78371,12 +78379,12 @@ const AlignCenter = createLucideIcon("align-center", __iconNode$2p);
78371
78379
  */
78372
78380
 
78373
78381
 
78374
- const __iconNode$2o = [
78382
+ const __iconNode$2p = [
78375
78383
  ["path", { d: "M15 12H3", key: "6jk70r" }],
78376
78384
  ["path", { d: "M17 18H3", key: "1amg6g" }],
78377
78385
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
78378
78386
  ];
78379
- const AlignLeft = createLucideIcon("align-left", __iconNode$2o);
78387
+ const AlignLeft = createLucideIcon("align-left", __iconNode$2p);
78380
78388
 
78381
78389
  /**
78382
78390
  * @license lucide-react v0.528.0 - ISC
@@ -78386,12 +78394,12 @@ const AlignLeft = createLucideIcon("align-left", __iconNode$2o);
78386
78394
  */
78387
78395
 
78388
78396
 
78389
- const __iconNode$2n = [
78397
+ const __iconNode$2o = [
78390
78398
  ["path", { d: "M21 12H9", key: "dn1m92" }],
78391
78399
  ["path", { d: "M21 18H7", key: "1ygte8" }],
78392
78400
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
78393
78401
  ];
78394
- const AlignRight = createLucideIcon("align-right", __iconNode$2n);
78402
+ const AlignRight = createLucideIcon("align-right", __iconNode$2o);
78395
78403
 
78396
78404
  /**
78397
78405
  * @license lucide-react v0.528.0 - ISC
@@ -78401,12 +78409,12 @@ const AlignRight = createLucideIcon("align-right", __iconNode$2n);
78401
78409
  */
78402
78410
 
78403
78411
 
78404
- const __iconNode$2m = [
78412
+ const __iconNode$2n = [
78405
78413
  ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
78406
78414
  ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
78407
78415
  ["path", { d: "M10 12h4", key: "a56b0p" }]
78408
78416
  ];
78409
- const Archive = createLucideIcon("archive", __iconNode$2m);
78417
+ const Archive = createLucideIcon("archive", __iconNode$2n);
78410
78418
 
78411
78419
  /**
78412
78420
  * @license lucide-react v0.528.0 - ISC
@@ -78416,11 +78424,11 @@ const Archive = createLucideIcon("archive", __iconNode$2m);
78416
78424
  */
78417
78425
 
78418
78426
 
78419
- const __iconNode$2l = [
78427
+ const __iconNode$2m = [
78420
78428
  ["path", { d: "M12 5v14", key: "s699le" }],
78421
78429
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
78422
78430
  ];
78423
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$2l);
78431
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$2m);
78424
78432
 
78425
78433
  /**
78426
78434
  * @license lucide-react v0.528.0 - ISC
@@ -78430,11 +78438,11 @@ const ArrowDown = createLucideIcon("arrow-down", __iconNode$2l);
78430
78438
  */
78431
78439
 
78432
78440
 
78433
- const __iconNode$2k = [
78441
+ const __iconNode$2l = [
78434
78442
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
78435
78443
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
78436
78444
  ];
78437
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2k);
78445
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2l);
78438
78446
 
78439
78447
  /**
78440
78448
  * @license lucide-react v0.528.0 - ISC
@@ -78444,11 +78452,11 @@ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$2k);
78444
78452
  */
78445
78453
 
78446
78454
 
78447
- const __iconNode$2j = [
78455
+ const __iconNode$2k = [
78448
78456
  ["path", { d: "M5 12h14", key: "1ays0h" }],
78449
78457
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
78450
78458
  ];
78451
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$2j);
78459
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$2k);
78452
78460
 
78453
78461
  /**
78454
78462
  * @license lucide-react v0.528.0 - ISC
@@ -78458,11 +78466,11 @@ const ArrowRight = createLucideIcon("arrow-right", __iconNode$2j);
78458
78466
  */
78459
78467
 
78460
78468
 
78461
- const __iconNode$2i = [
78469
+ const __iconNode$2j = [
78462
78470
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
78463
78471
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
78464
78472
  ];
78465
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$2i);
78473
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$2j);
78466
78474
 
78467
78475
  /**
78468
78476
  * @license lucide-react v0.528.0 - ISC
@@ -78472,7 +78480,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$2i);
78472
78480
  */
78473
78481
 
78474
78482
 
78475
- const __iconNode$2h = [
78483
+ const __iconNode$2i = [
78476
78484
  [
78477
78485
  "path",
78478
78486
  {
@@ -78482,7 +78490,7 @@ const __iconNode$2h = [
78482
78490
  ],
78483
78491
  ["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }]
78484
78492
  ];
78485
- const Award = createLucideIcon("award", __iconNode$2h);
78493
+ const Award = createLucideIcon("award", __iconNode$2i);
78486
78494
 
78487
78495
  /**
78488
78496
  * @license lucide-react v0.528.0 - ISC
@@ -78492,11 +78500,11 @@ const Award = createLucideIcon("award", __iconNode$2h);
78492
78500
  */
78493
78501
 
78494
78502
 
78495
- const __iconNode$2g = [
78503
+ const __iconNode$2h = [
78496
78504
  ["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }],
78497
78505
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
78498
78506
  ];
78499
- const Ban = createLucideIcon("ban", __iconNode$2g);
78507
+ const Ban = createLucideIcon("ban", __iconNode$2h);
78500
78508
 
78501
78509
  /**
78502
78510
  * @license lucide-react v0.528.0 - ISC
@@ -78506,12 +78514,12 @@ const Ban = createLucideIcon("ban", __iconNode$2g);
78506
78514
  */
78507
78515
 
78508
78516
 
78509
- const __iconNode$2f = [
78517
+ const __iconNode$2g = [
78510
78518
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
78511
78519
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
78512
78520
  ["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
78513
78521
  ];
78514
- const Banknote = createLucideIcon("banknote", __iconNode$2f);
78522
+ const Banknote = createLucideIcon("banknote", __iconNode$2g);
78515
78523
 
78516
78524
  /**
78517
78525
  * @license lucide-react v0.528.0 - ISC
@@ -78521,7 +78529,7 @@ const Banknote = createLucideIcon("banknote", __iconNode$2f);
78521
78529
  */
78522
78530
 
78523
78531
 
78524
- const __iconNode$2e = [
78532
+ const __iconNode$2f = [
78525
78533
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
78526
78534
  ["path", { d: "M22 8c0-2.3-.8-4.3-2-6", key: "5bb3ad" }],
78527
78535
  [
@@ -78533,7 +78541,7 @@ const __iconNode$2e = [
78533
78541
  ],
78534
78542
  ["path", { d: "M4 2C2.8 3.7 2 5.7 2 8", key: "tap9e0" }]
78535
78543
  ];
78536
- const BellRing = createLucideIcon("bell-ring", __iconNode$2e);
78544
+ const BellRing = createLucideIcon("bell-ring", __iconNode$2f);
78537
78545
 
78538
78546
  /**
78539
78547
  * @license lucide-react v0.528.0 - ISC
@@ -78543,7 +78551,7 @@ const BellRing = createLucideIcon("bell-ring", __iconNode$2e);
78543
78551
  */
78544
78552
 
78545
78553
 
78546
- const __iconNode$2d = [
78554
+ const __iconNode$2e = [
78547
78555
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
78548
78556
  [
78549
78557
  "path",
@@ -78553,7 +78561,7 @@ const __iconNode$2d = [
78553
78561
  }
78554
78562
  ]
78555
78563
  ];
78556
- const Bell = createLucideIcon("bell", __iconNode$2d);
78564
+ const Bell = createLucideIcon("bell", __iconNode$2e);
78557
78565
 
78558
78566
  /**
78559
78567
  * @license lucide-react v0.528.0 - ISC
@@ -78563,13 +78571,13 @@ const Bell = createLucideIcon("bell", __iconNode$2d);
78563
78571
  */
78564
78572
 
78565
78573
 
78566
- const __iconNode$2c = [
78574
+ const __iconNode$2d = [
78567
78575
  [
78568
78576
  "path",
78569
78577
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
78570
78578
  ]
78571
78579
  ];
78572
- const Bold$1 = createLucideIcon("bold", __iconNode$2c);
78580
+ const Bold$1 = createLucideIcon("bold", __iconNode$2d);
78573
78581
 
78574
78582
  /**
78575
78583
  * @license lucide-react v0.528.0 - ISC
@@ -78579,7 +78587,7 @@ const Bold$1 = createLucideIcon("bold", __iconNode$2c);
78579
78587
  */
78580
78588
 
78581
78589
 
78582
- const __iconNode$2b = [
78590
+ const __iconNode$2c = [
78583
78591
  ["path", { d: "M12 7v14", key: "1akyts" }],
78584
78592
  [
78585
78593
  "path",
@@ -78589,7 +78597,7 @@ const __iconNode$2b = [
78589
78597
  }
78590
78598
  ]
78591
78599
  ];
78592
- const BookOpen = createLucideIcon("book-open", __iconNode$2b);
78600
+ const BookOpen = createLucideIcon("book-open", __iconNode$2c);
78593
78601
 
78594
78602
  /**
78595
78603
  * @license lucide-react v0.528.0 - ISC
@@ -78599,7 +78607,7 @@ const BookOpen = createLucideIcon("book-open", __iconNode$2b);
78599
78607
  */
78600
78608
 
78601
78609
 
78602
- const __iconNode$2a = [
78610
+ const __iconNode$2b = [
78603
78611
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
78604
78612
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
78605
78613
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -78607,7 +78615,7 @@ const __iconNode$2a = [
78607
78615
  ["path", { d: "M15 13v2", key: "1xurst" }],
78608
78616
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
78609
78617
  ];
78610
- const Bot = createLucideIcon("bot", __iconNode$2a);
78618
+ const Bot = createLucideIcon("bot", __iconNode$2b);
78611
78619
 
78612
78620
  /**
78613
78621
  * @license lucide-react v0.528.0 - ISC
@@ -78617,11 +78625,11 @@ const Bot = createLucideIcon("bot", __iconNode$2a);
78617
78625
  */
78618
78626
 
78619
78627
 
78620
- const __iconNode$29 = [
78628
+ const __iconNode$2a = [
78621
78629
  ["path", { d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16", key: "jecpp" }],
78622
78630
  ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2", key: "i6l2r4" }]
78623
78631
  ];
78624
- const Briefcase = createLucideIcon("briefcase", __iconNode$29);
78632
+ const Briefcase = createLucideIcon("briefcase", __iconNode$2a);
78625
78633
 
78626
78634
  /**
78627
78635
  * @license lucide-react v0.528.0 - ISC
@@ -78631,7 +78639,7 @@ const Briefcase = createLucideIcon("briefcase", __iconNode$29);
78631
78639
  */
78632
78640
 
78633
78641
 
78634
- const __iconNode$28 = [
78642
+ const __iconNode$29 = [
78635
78643
  ["path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z", key: "1b4qmf" }],
78636
78644
  ["path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2", key: "i71pzd" }],
78637
78645
  ["path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2", key: "10jefs" }],
@@ -78640,7 +78648,7 @@ const __iconNode$28 = [
78640
78648
  ["path", { d: "M10 14h4", key: "kelpxr" }],
78641
78649
  ["path", { d: "M10 18h4", key: "1ulq68" }]
78642
78650
  ];
78643
- const Building2 = createLucideIcon("building-2", __iconNode$28);
78651
+ const Building2 = createLucideIcon("building-2", __iconNode$29);
78644
78652
 
78645
78653
  /**
78646
78654
  * @license lucide-react v0.528.0 - ISC
@@ -78650,13 +78658,13 @@ const Building2 = createLucideIcon("building-2", __iconNode$28);
78650
78658
  */
78651
78659
 
78652
78660
 
78653
- const __iconNode$27 = [
78661
+ const __iconNode$28 = [
78654
78662
  ["path", { d: "M8 2v4", key: "1cmpym" }],
78655
78663
  ["path", { d: "M16 2v4", key: "4m81vk" }],
78656
78664
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
78657
78665
  ["path", { d: "M3 10h18", key: "8toen8" }]
78658
78666
  ];
78659
- const Calendar$1 = createLucideIcon("calendar", __iconNode$27);
78667
+ const Calendar$1 = createLucideIcon("calendar", __iconNode$28);
78660
78668
 
78661
78669
  /**
78662
78670
  * @license lucide-react v0.528.0 - ISC
@@ -78666,11 +78674,11 @@ const Calendar$1 = createLucideIcon("calendar", __iconNode$27);
78666
78674
  */
78667
78675
 
78668
78676
 
78669
- const __iconNode$26 = [
78677
+ const __iconNode$27 = [
78670
78678
  ["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
78671
78679
  ["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
78672
78680
  ];
78673
- const CheckCheck = createLucideIcon("check-check", __iconNode$26);
78681
+ const CheckCheck = createLucideIcon("check-check", __iconNode$27);
78674
78682
 
78675
78683
  /**
78676
78684
  * @license lucide-react v0.528.0 - ISC
@@ -78680,8 +78688,8 @@ const CheckCheck = createLucideIcon("check-check", __iconNode$26);
78680
78688
  */
78681
78689
 
78682
78690
 
78683
- const __iconNode$25 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
78684
- const Check = createLucideIcon("check", __iconNode$25);
78691
+ const __iconNode$26 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
78692
+ const Check = createLucideIcon("check", __iconNode$26);
78685
78693
 
78686
78694
  /**
78687
78695
  * @license lucide-react v0.528.0 - ISC
@@ -78691,8 +78699,8 @@ const Check = createLucideIcon("check", __iconNode$25);
78691
78699
  */
78692
78700
 
78693
78701
 
78694
- const __iconNode$24 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
78695
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$24);
78702
+ const __iconNode$25 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
78703
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$25);
78696
78704
 
78697
78705
  /**
78698
78706
  * @license lucide-react v0.528.0 - ISC
@@ -78702,11 +78710,11 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$24);
78702
78710
  */
78703
78711
 
78704
78712
 
78705
- const __iconNode$23 = [
78713
+ const __iconNode$24 = [
78706
78714
  ["path", { d: "m17 18-6-6 6-6", key: "1yerx2" }],
78707
78715
  ["path", { d: "M7 6v12", key: "1p53r6" }]
78708
78716
  ];
78709
- const ChevronFirst = createLucideIcon("chevron-first", __iconNode$23);
78717
+ const ChevronFirst = createLucideIcon("chevron-first", __iconNode$24);
78710
78718
 
78711
78719
  /**
78712
78720
  * @license lucide-react v0.528.0 - ISC
@@ -78716,11 +78724,11 @@ const ChevronFirst = createLucideIcon("chevron-first", __iconNode$23);
78716
78724
  */
78717
78725
 
78718
78726
 
78719
- const __iconNode$22 = [
78727
+ const __iconNode$23 = [
78720
78728
  ["path", { d: "m7 18 6-6-6-6", key: "lwmzdw" }],
78721
78729
  ["path", { d: "M17 6v12", key: "1o0aio" }]
78722
78730
  ];
78723
- const ChevronLast = createLucideIcon("chevron-last", __iconNode$22);
78731
+ const ChevronLast = createLucideIcon("chevron-last", __iconNode$23);
78724
78732
 
78725
78733
  /**
78726
78734
  * @license lucide-react v0.528.0 - ISC
@@ -78730,8 +78738,8 @@ const ChevronLast = createLucideIcon("chevron-last", __iconNode$22);
78730
78738
  */
78731
78739
 
78732
78740
 
78733
- const __iconNode$21 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
78734
- const ChevronLeft = createLucideIcon("chevron-left", __iconNode$21);
78741
+ const __iconNode$22 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
78742
+ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$22);
78735
78743
 
78736
78744
  /**
78737
78745
  * @license lucide-react v0.528.0 - ISC
@@ -78741,8 +78749,8 @@ const ChevronLeft = createLucideIcon("chevron-left", __iconNode$21);
78741
78749
  */
78742
78750
 
78743
78751
 
78744
- const __iconNode$20 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
78745
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$20);
78752
+ const __iconNode$21 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
78753
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$21);
78746
78754
 
78747
78755
  /**
78748
78756
  * @license lucide-react v0.528.0 - ISC
@@ -78752,8 +78760,8 @@ const ChevronRight = createLucideIcon("chevron-right", __iconNode$20);
78752
78760
  */
78753
78761
 
78754
78762
 
78755
- const __iconNode$1$ = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
78756
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$1$);
78763
+ const __iconNode$20 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
78764
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$20);
78757
78765
 
78758
78766
  /**
78759
78767
  * @license lucide-react v0.528.0 - ISC
@@ -78763,11 +78771,11 @@ const ChevronUp = createLucideIcon("chevron-up", __iconNode$1$);
78763
78771
  */
78764
78772
 
78765
78773
 
78766
- const __iconNode$1_ = [
78774
+ const __iconNode$1$ = [
78767
78775
  ["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
78768
78776
  ["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
78769
78777
  ];
78770
- const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$1_);
78778
+ const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$1$);
78771
78779
 
78772
78780
  /**
78773
78781
  * @license lucide-react v0.528.0 - ISC
@@ -78777,11 +78785,11 @@ const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$1_);
78777
78785
  */
78778
78786
 
78779
78787
 
78780
- const __iconNode$1Z = [
78788
+ const __iconNode$1_ = [
78781
78789
  ["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
78782
78790
  ["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
78783
78791
  ];
78784
- const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$1Z);
78792
+ const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$1_);
78785
78793
 
78786
78794
  /**
78787
78795
  * @license lucide-react v0.528.0 - ISC
@@ -78791,11 +78799,11 @@ const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$1Z);
78791
78799
  */
78792
78800
 
78793
78801
 
78794
- const __iconNode$1Y = [
78802
+ const __iconNode$1Z = [
78795
78803
  ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
78796
78804
  ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
78797
78805
  ];
78798
- const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1Y);
78806
+ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1Z);
78799
78807
 
78800
78808
  /**
78801
78809
  * @license lucide-react v0.528.0 - ISC
@@ -78805,12 +78813,12 @@ const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$1Y);
78805
78813
  */
78806
78814
 
78807
78815
 
78808
- const __iconNode$1X = [
78816
+ const __iconNode$1Y = [
78809
78817
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
78810
78818
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
78811
78819
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
78812
78820
  ];
78813
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$1X);
78821
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$1Y);
78814
78822
 
78815
78823
  /**
78816
78824
  * @license lucide-react v0.528.0 - ISC
@@ -78820,11 +78828,11 @@ const CircleAlert = createLucideIcon("circle-alert", __iconNode$1X);
78820
78828
  */
78821
78829
 
78822
78830
 
78823
- const __iconNode$1W = [
78831
+ const __iconNode$1X = [
78824
78832
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
78825
78833
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
78826
78834
  ];
78827
- const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$1W);
78835
+ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$1X);
78828
78836
 
78829
78837
  /**
78830
78838
  * @license lucide-react v0.528.0 - ISC
@@ -78834,11 +78842,11 @@ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$1W);
78834
78842
  */
78835
78843
 
78836
78844
 
78837
- const __iconNode$1V = [
78845
+ const __iconNode$1W = [
78838
78846
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
78839
78847
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
78840
78848
  ];
78841
- const CircleCheck = createLucideIcon("circle-check", __iconNode$1V);
78849
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$1W);
78842
78850
 
78843
78851
  /**
78844
78852
  * @license lucide-react v0.528.0 - ISC
@@ -78848,11 +78856,11 @@ const CircleCheck = createLucideIcon("circle-check", __iconNode$1V);
78848
78856
  */
78849
78857
 
78850
78858
 
78851
- const __iconNode$1U = [
78859
+ const __iconNode$1V = [
78852
78860
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
78853
78861
  ["path", { d: "M8 12h8", key: "1wcyev" }]
78854
78862
  ];
78855
- const CircleMinus$1 = createLucideIcon("circle-minus", __iconNode$1U);
78863
+ const CircleMinus$1 = createLucideIcon("circle-minus", __iconNode$1V);
78856
78864
 
78857
78865
  /**
78858
78866
  * @license lucide-react v0.528.0 - ISC
@@ -78862,11 +78870,11 @@ const CircleMinus$1 = createLucideIcon("circle-minus", __iconNode$1U);
78862
78870
  */
78863
78871
 
78864
78872
 
78865
- const __iconNode$1T = [
78873
+ const __iconNode$1U = [
78866
78874
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
78867
78875
  ["rect", { x: "9", y: "9", width: "6", height: "6", rx: "1", key: "1ssd4o" }]
78868
78876
  ];
78869
- const CircleStop = createLucideIcon("circle-stop", __iconNode$1T);
78877
+ const CircleStop = createLucideIcon("circle-stop", __iconNode$1U);
78870
78878
 
78871
78879
  /**
78872
78880
  * @license lucide-react v0.528.0 - ISC
@@ -78876,12 +78884,12 @@ const CircleStop = createLucideIcon("circle-stop", __iconNode$1T);
78876
78884
  */
78877
78885
 
78878
78886
 
78879
- const __iconNode$1S = [
78887
+ const __iconNode$1T = [
78880
78888
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
78881
78889
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
78882
78890
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
78883
78891
  ];
78884
- const CircleX = createLucideIcon("circle-x", __iconNode$1S);
78892
+ const CircleX = createLucideIcon("circle-x", __iconNode$1T);
78885
78893
 
78886
78894
  /**
78887
78895
  * @license lucide-react v0.528.0 - ISC
@@ -78891,8 +78899,8 @@ const CircleX = createLucideIcon("circle-x", __iconNode$1S);
78891
78899
  */
78892
78900
 
78893
78901
 
78894
- const __iconNode$1R = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
78895
- const Circle = createLucideIcon("circle", __iconNode$1R);
78902
+ const __iconNode$1S = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
78903
+ const Circle = createLucideIcon("circle", __iconNode$1S);
78896
78904
 
78897
78905
  /**
78898
78906
  * @license lucide-react v0.528.0 - ISC
@@ -78902,7 +78910,7 @@ const Circle = createLucideIcon("circle", __iconNode$1R);
78902
78910
  */
78903
78911
 
78904
78912
 
78905
- const __iconNode$1Q = [
78913
+ const __iconNode$1R = [
78906
78914
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
78907
78915
  [
78908
78916
  "path",
@@ -78916,7 +78924,7 @@ const __iconNode$1Q = [
78916
78924
  ["path", { d: "M8 11h.01", key: "1dfujw" }],
78917
78925
  ["path", { d: "M8 16h.01", key: "18s6g9" }]
78918
78926
  ];
78919
- const ClipboardList = createLucideIcon("clipboard-list", __iconNode$1Q);
78927
+ const ClipboardList = createLucideIcon("clipboard-list", __iconNode$1R);
78920
78928
 
78921
78929
  /**
78922
78930
  * @license lucide-react v0.528.0 - ISC
@@ -78926,11 +78934,11 @@ const ClipboardList = createLucideIcon("clipboard-list", __iconNode$1Q);
78926
78934
  */
78927
78935
 
78928
78936
 
78929
- const __iconNode$1P = [
78937
+ const __iconNode$1Q = [
78930
78938
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
78931
78939
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
78932
78940
  ];
78933
- const Clock = createLucideIcon("clock", __iconNode$1P);
78941
+ const Clock = createLucideIcon("clock", __iconNode$1Q);
78934
78942
 
78935
78943
  /**
78936
78944
  * @license lucide-react v0.528.0 - ISC
@@ -78940,12 +78948,12 @@ const Clock = createLucideIcon("clock", __iconNode$1P);
78940
78948
  */
78941
78949
 
78942
78950
 
78943
- const __iconNode$1O = [
78951
+ const __iconNode$1P = [
78944
78952
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
78945
78953
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
78946
78954
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
78947
78955
  ];
78948
- const CodeXml = createLucideIcon("code-xml", __iconNode$1O);
78956
+ const CodeXml = createLucideIcon("code-xml", __iconNode$1P);
78949
78957
 
78950
78958
  /**
78951
78959
  * @license lucide-react v0.528.0 - ISC
@@ -78955,11 +78963,11 @@ const CodeXml = createLucideIcon("code-xml", __iconNode$1O);
78955
78963
  */
78956
78964
 
78957
78965
 
78958
- const __iconNode$1N = [
78966
+ const __iconNode$1O = [
78959
78967
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
78960
78968
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
78961
78969
  ];
78962
- const Code$1 = createLucideIcon("code", __iconNode$1N);
78970
+ const Code$1 = createLucideIcon("code", __iconNode$1O);
78963
78971
 
78964
78972
  /**
78965
78973
  * @license lucide-react v0.528.0 - ISC
@@ -78969,11 +78977,11 @@ const Code$1 = createLucideIcon("code", __iconNode$1N);
78969
78977
  */
78970
78978
 
78971
78979
 
78972
- const __iconNode$1M = [
78980
+ const __iconNode$1N = [
78973
78981
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
78974
78982
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
78975
78983
  ];
78976
- const Copy = createLucideIcon("copy", __iconNode$1M);
78984
+ const Copy = createLucideIcon("copy", __iconNode$1N);
78977
78985
 
78978
78986
  /**
78979
78987
  * @license lucide-react v0.528.0 - ISC
@@ -78983,11 +78991,11 @@ const Copy = createLucideIcon("copy", __iconNode$1M);
78983
78991
  */
78984
78992
 
78985
78993
 
78986
- const __iconNode$1L = [
78994
+ const __iconNode$1M = [
78987
78995
  ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
78988
78996
  ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
78989
78997
  ];
78990
- const CreditCard = createLucideIcon("credit-card", __iconNode$1L);
78998
+ const CreditCard = createLucideIcon("credit-card", __iconNode$1M);
78991
78999
 
78992
79000
  /**
78993
79001
  * @license lucide-react v0.528.0 - ISC
@@ -78997,12 +79005,12 @@ const CreditCard = createLucideIcon("credit-card", __iconNode$1L);
78997
79005
  */
78998
79006
 
78999
79007
 
79000
- const __iconNode$1K = [
79008
+ const __iconNode$1L = [
79001
79009
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
79002
79010
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
79003
79011
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
79004
79012
  ];
79005
- const Database = createLucideIcon("database", __iconNode$1K);
79013
+ const Database = createLucideIcon("database", __iconNode$1L);
79006
79014
 
79007
79015
  /**
79008
79016
  * @license lucide-react v0.528.0 - ISC
@@ -79012,11 +79020,11 @@ const Database = createLucideIcon("database", __iconNode$1K);
79012
79020
  */
79013
79021
 
79014
79022
 
79015
- const __iconNode$1J = [
79023
+ const __iconNode$1K = [
79016
79024
  ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
79017
79025
  ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
79018
79026
  ];
79019
- const DollarSign = createLucideIcon("dollar-sign", __iconNode$1J);
79027
+ const DollarSign = createLucideIcon("dollar-sign", __iconNode$1K);
79020
79028
 
79021
79029
  /**
79022
79030
  * @license lucide-react v0.528.0 - ISC
@@ -79026,7 +79034,7 @@ const DollarSign = createLucideIcon("dollar-sign", __iconNode$1J);
79026
79034
  */
79027
79035
 
79028
79036
 
79029
- const __iconNode$1I = [
79037
+ const __iconNode$1J = [
79030
79038
  ["path", { d: "M11 20H2", key: "nlcfvz" }],
79031
79039
  [
79032
79040
  "path",
@@ -79039,7 +79047,7 @@ const __iconNode$1I = [
79039
79047
  ["path", { d: "M14 12h.01", key: "1jfl7z" }],
79040
79048
  ["path", { d: "M22 20h-3", key: "vhrsz" }]
79041
79049
  ];
79042
- const DoorOpen = createLucideIcon("door-open", __iconNode$1I);
79050
+ const DoorOpen = createLucideIcon("door-open", __iconNode$1J);
79043
79051
 
79044
79052
  /**
79045
79053
  * @license lucide-react v0.528.0 - ISC
@@ -79049,12 +79057,12 @@ const DoorOpen = createLucideIcon("door-open", __iconNode$1I);
79049
79057
  */
79050
79058
 
79051
79059
 
79052
- const __iconNode$1H = [
79060
+ const __iconNode$1I = [
79053
79061
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
79054
79062
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
79055
79063
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
79056
79064
  ];
79057
- const Download = createLucideIcon("download", __iconNode$1H);
79065
+ const Download = createLucideIcon("download", __iconNode$1I);
79058
79066
 
79059
79067
  /**
79060
79068
  * @license lucide-react v0.528.0 - ISC
@@ -79064,12 +79072,12 @@ const Download = createLucideIcon("download", __iconNode$1H);
79064
79072
  */
79065
79073
 
79066
79074
 
79067
- const __iconNode$1G = [
79075
+ const __iconNode$1H = [
79068
79076
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
79069
79077
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
79070
79078
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
79071
79079
  ];
79072
- const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$1G);
79080
+ const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$1H);
79073
79081
 
79074
79082
  /**
79075
79083
  * @license lucide-react v0.528.0 - ISC
@@ -79079,12 +79087,12 @@ const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$1G);
79079
79087
  */
79080
79088
 
79081
79089
 
79082
- const __iconNode$1F = [
79090
+ const __iconNode$1G = [
79083
79091
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
79084
79092
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
79085
79093
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
79086
79094
  ];
79087
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$1F);
79095
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$1G);
79088
79096
 
79089
79097
  /**
79090
79098
  * @license lucide-react v0.528.0 - ISC
@@ -79094,12 +79102,12 @@ const Ellipsis = createLucideIcon("ellipsis", __iconNode$1F);
79094
79102
  */
79095
79103
 
79096
79104
 
79097
- const __iconNode$1E = [
79105
+ const __iconNode$1F = [
79098
79106
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
79099
79107
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
79100
79108
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
79101
79109
  ];
79102
- const ExternalLink = createLucideIcon("external-link", __iconNode$1E);
79110
+ const ExternalLink = createLucideIcon("external-link", __iconNode$1F);
79103
79111
 
79104
79112
  /**
79105
79113
  * @license lucide-react v0.528.0 - ISC
@@ -79109,7 +79117,7 @@ const ExternalLink = createLucideIcon("external-link", __iconNode$1E);
79109
79117
  */
79110
79118
 
79111
79119
 
79112
- const __iconNode$1D = [
79120
+ const __iconNode$1E = [
79113
79121
  [
79114
79122
  "path",
79115
79123
  {
@@ -79127,7 +79135,7 @@ const __iconNode$1D = [
79127
79135
  ],
79128
79136
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
79129
79137
  ];
79130
- const EyeOff = createLucideIcon("eye-off", __iconNode$1D);
79138
+ const EyeOff = createLucideIcon("eye-off", __iconNode$1E);
79131
79139
 
79132
79140
  /**
79133
79141
  * @license lucide-react v0.528.0 - ISC
@@ -79137,7 +79145,7 @@ const EyeOff = createLucideIcon("eye-off", __iconNode$1D);
79137
79145
  */
79138
79146
 
79139
79147
 
79140
- const __iconNode$1C = [
79148
+ const __iconNode$1D = [
79141
79149
  [
79142
79150
  "path",
79143
79151
  {
@@ -79147,7 +79155,7 @@ const __iconNode$1C = [
79147
79155
  ],
79148
79156
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
79149
79157
  ];
79150
- const Eye = createLucideIcon("eye", __iconNode$1C);
79158
+ const Eye = createLucideIcon("eye", __iconNode$1D);
79151
79159
 
79152
79160
  /**
79153
79161
  * @license lucide-react v0.528.0 - ISC
@@ -79157,7 +79165,7 @@ const Eye = createLucideIcon("eye", __iconNode$1C);
79157
79165
  */
79158
79166
 
79159
79167
 
79160
- const __iconNode$1B = [
79168
+ const __iconNode$1C = [
79161
79169
  ["path", { d: "M10 12v-1", key: "v7bkov" }],
79162
79170
  ["path", { d: "M10 18v-2", key: "1cjy8d" }],
79163
79171
  ["path", { d: "M10 7V6", key: "dljcrl" }],
@@ -79168,7 +79176,7 @@ const __iconNode$1B = [
79168
79176
  ],
79169
79177
  ["circle", { cx: "10", cy: "20", r: "2", key: "1xzdoj" }]
79170
79178
  ];
79171
- const FileArchive = createLucideIcon("file-archive", __iconNode$1B);
79179
+ const FileArchive = createLucideIcon("file-archive", __iconNode$1C);
79172
79180
 
79173
79181
  /**
79174
79182
  * @license lucide-react v0.528.0 - ISC
@@ -79178,7 +79186,7 @@ const FileArchive = createLucideIcon("file-archive", __iconNode$1B);
79178
79186
  */
79179
79187
 
79180
79188
 
79181
- const __iconNode$1A = [
79189
+ const __iconNode$1B = [
79182
79190
  ["path", { d: "M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3", key: "rslqgf" }],
79183
79191
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79184
79192
  [
@@ -79189,7 +79197,7 @@ const __iconNode$1A = [
79189
79197
  }
79190
79198
  ]
79191
79199
  ];
79192
- const FileAudio = createLucideIcon("file-audio", __iconNode$1A);
79200
+ const FileAudio = createLucideIcon("file-audio", __iconNode$1B);
79193
79201
 
79194
79202
  /**
79195
79203
  * @license lucide-react v0.528.0 - ISC
@@ -79199,13 +79207,13 @@ const FileAudio = createLucideIcon("file-audio", __iconNode$1A);
79199
79207
  */
79200
79208
 
79201
79209
 
79202
- const __iconNode$1z = [
79210
+ const __iconNode$1A = [
79203
79211
  ["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
79204
79212
  ["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }],
79205
79213
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79206
79214
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }]
79207
79215
  ];
79208
- const FileCode = createLucideIcon("file-code", __iconNode$1z);
79216
+ const FileCode = createLucideIcon("file-code", __iconNode$1A);
79209
79217
 
79210
79218
  /**
79211
79219
  * @license lucide-react v0.528.0 - ISC
@@ -79215,13 +79223,13 @@ const FileCode = createLucideIcon("file-code", __iconNode$1z);
79215
79223
  */
79216
79224
 
79217
79225
 
79218
- const __iconNode$1y = [
79226
+ const __iconNode$1z = [
79219
79227
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
79220
79228
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79221
79229
  ["path", { d: "M12 18v-6", key: "17g6i2" }],
79222
79230
  ["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
79223
79231
  ];
79224
- const FileDown = createLucideIcon("file-down", __iconNode$1y);
79232
+ const FileDown = createLucideIcon("file-down", __iconNode$1z);
79225
79233
 
79226
79234
  /**
79227
79235
  * @license lucide-react v0.528.0 - ISC
@@ -79231,13 +79239,13 @@ const FileDown = createLucideIcon("file-down", __iconNode$1y);
79231
79239
  */
79232
79240
 
79233
79241
 
79234
- const __iconNode$1x = [
79242
+ const __iconNode$1y = [
79235
79243
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
79236
79244
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79237
79245
  ["circle", { cx: "10", cy: "12", r: "2", key: "737tya" }],
79238
79246
  ["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22", key: "wt3hpn" }]
79239
79247
  ];
79240
- const FileImage = createLucideIcon("file-image", __iconNode$1x);
79248
+ const FileImage = createLucideIcon("file-image", __iconNode$1y);
79241
79249
 
79242
79250
  /**
79243
79251
  * @license lucide-react v0.528.0 - ISC
@@ -79247,7 +79255,7 @@ const FileImage = createLucideIcon("file-image", __iconNode$1x);
79247
79255
  */
79248
79256
 
79249
79257
 
79250
- const __iconNode$1w = [
79258
+ const __iconNode$1x = [
79251
79259
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79252
79260
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }],
79253
79261
  [
@@ -79258,7 +79266,7 @@ const __iconNode$1w = [
79258
79266
  }
79259
79267
  ]
79260
79268
  ];
79261
- const FilePlay = createLucideIcon("file-play", __iconNode$1w);
79269
+ const FilePlay = createLucideIcon("file-play", __iconNode$1x);
79262
79270
 
79263
79271
  /**
79264
79272
  * @license lucide-react v0.528.0 - ISC
@@ -79268,7 +79276,7 @@ const FilePlay = createLucideIcon("file-play", __iconNode$1w);
79268
79276
  */
79269
79277
 
79270
79278
 
79271
- const __iconNode$1v = [
79279
+ const __iconNode$1w = [
79272
79280
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
79273
79281
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79274
79282
  ["path", { d: "M8 13h2", key: "yr2amv" }],
@@ -79276,7 +79284,7 @@ const __iconNode$1v = [
79276
79284
  ["path", { d: "M8 17h2", key: "2yhykz" }],
79277
79285
  ["path", { d: "M14 17h2", key: "10kma7" }]
79278
79286
  ];
79279
- const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$1v);
79287
+ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$1w);
79280
79288
 
79281
79289
  /**
79282
79290
  * @license lucide-react v0.528.0 - ISC
@@ -79286,14 +79294,14 @@ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$1v);
79286
79294
  */
79287
79295
 
79288
79296
 
79289
- const __iconNode$1u = [
79297
+ const __iconNode$1v = [
79290
79298
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
79291
79299
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
79292
79300
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
79293
79301
  ["path", { d: "M16 13H8", key: "t4e002" }],
79294
79302
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
79295
79303
  ];
79296
- const FileText = createLucideIcon("file-text", __iconNode$1u);
79304
+ const FileText = createLucideIcon("file-text", __iconNode$1v);
79297
79305
 
79298
79306
  /**
79299
79307
  * @license lucide-react v0.528.0 - ISC
@@ -79303,11 +79311,11 @@ const FileText = createLucideIcon("file-text", __iconNode$1u);
79303
79311
  */
79304
79312
 
79305
79313
 
79306
- const __iconNode$1t = [
79314
+ const __iconNode$1u = [
79307
79315
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
79308
79316
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
79309
79317
  ];
79310
- const File$1 = createLucideIcon("file", __iconNode$1t);
79318
+ const File$1 = createLucideIcon("file", __iconNode$1u);
79311
79319
 
79312
79320
  /**
79313
79321
  * @license lucide-react v0.528.0 - ISC
@@ -79317,7 +79325,7 @@ const File$1 = createLucideIcon("file", __iconNode$1t);
79317
79325
  */
79318
79326
 
79319
79327
 
79320
- const __iconNode$1s = [
79328
+ const __iconNode$1t = [
79321
79329
  [
79322
79330
  "path",
79323
79331
  {
@@ -79335,7 +79343,7 @@ const __iconNode$1s = [
79335
79343
  ["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
79336
79344
  ["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
79337
79345
  ];
79338
- const FolderTree = createLucideIcon("folder-tree", __iconNode$1s);
79346
+ const FolderTree = createLucideIcon("folder-tree", __iconNode$1t);
79339
79347
 
79340
79348
  /**
79341
79349
  * @license lucide-react v0.528.0 - ISC
@@ -79345,14 +79353,14 @@ const FolderTree = createLucideIcon("folder-tree", __iconNode$1s);
79345
79353
  */
79346
79354
 
79347
79355
 
79348
- const __iconNode$1r = [
79356
+ const __iconNode$1s = [
79349
79357
  ["path", { d: "m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8", key: "15492f" }],
79350
79358
  ["path", { d: "m16 16 6-6", key: "vzrcl6" }],
79351
79359
  ["path", { d: "m8 8 6-6", key: "18bi4p" }],
79352
79360
  ["path", { d: "m9 7 8 8", key: "5jnvq1" }],
79353
79361
  ["path", { d: "m21 11-8-8", key: "z4y7zo" }]
79354
79362
  ];
79355
- const Gavel = createLucideIcon("gavel", __iconNode$1r);
79363
+ const Gavel = createLucideIcon("gavel", __iconNode$1s);
79356
79364
 
79357
79365
  /**
79358
79366
  * @license lucide-react v0.528.0 - ISC
@@ -79362,13 +79370,13 @@ const Gavel = createLucideIcon("gavel", __iconNode$1r);
79362
79370
  */
79363
79371
 
79364
79372
 
79365
- const __iconNode$1q = [
79373
+ const __iconNode$1r = [
79366
79374
  ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
79367
79375
  ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
79368
79376
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
79369
79377
  ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
79370
79378
  ];
79371
- const GitBranch = createLucideIcon("git-branch", __iconNode$1q);
79379
+ const GitBranch = createLucideIcon("git-branch", __iconNode$1r);
79372
79380
 
79373
79381
  /**
79374
79382
  * @license lucide-react v0.528.0 - ISC
@@ -79378,12 +79386,12 @@ const GitBranch = createLucideIcon("git-branch", __iconNode$1q);
79378
79386
  */
79379
79387
 
79380
79388
 
79381
- const __iconNode$1p = [
79389
+ const __iconNode$1q = [
79382
79390
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
79383
79391
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
79384
79392
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
79385
79393
  ];
79386
- const Globe = createLucideIcon("globe", __iconNode$1p);
79394
+ const Globe = createLucideIcon("globe", __iconNode$1q);
79387
79395
 
79388
79396
  /**
79389
79397
  * @license lucide-react v0.528.0 - ISC
@@ -79393,7 +79401,7 @@ const Globe = createLucideIcon("globe", __iconNode$1p);
79393
79401
  */
79394
79402
 
79395
79403
 
79396
- const __iconNode$1o = [
79404
+ const __iconNode$1p = [
79397
79405
  [
79398
79406
  "path",
79399
79407
  {
@@ -79404,7 +79412,7 @@ const __iconNode$1o = [
79404
79412
  ["path", { d: "M22 10v6", key: "1lu8f3" }],
79405
79413
  ["path", { d: "M6 12.5V16a6 3 0 0 0 12 0v-3.5", key: "1r8lef" }]
79406
79414
  ];
79407
- const GraduationCap = createLucideIcon("graduation-cap", __iconNode$1o);
79415
+ const GraduationCap = createLucideIcon("graduation-cap", __iconNode$1p);
79408
79416
 
79409
79417
  /**
79410
79418
  * @license lucide-react v0.528.0 - ISC
@@ -79414,7 +79422,7 @@ const GraduationCap = createLucideIcon("graduation-cap", __iconNode$1o);
79414
79422
  */
79415
79423
 
79416
79424
 
79417
- const __iconNode$1n = [
79425
+ const __iconNode$1o = [
79418
79426
  ["path", { d: "M14 18a2 2 0 0 0-4 0", key: "1v8fkw" }],
79419
79427
  [
79420
79428
  "path",
@@ -79427,7 +79435,7 @@ const __iconNode$1n = [
79427
79435
  ["circle", { cx: "17", cy: "18", r: "3", key: "82mm0e" }],
79428
79436
  ["circle", { cx: "7", cy: "18", r: "3", key: "lvkj7j" }]
79429
79437
  ];
79430
- const HatGlasses = createLucideIcon("hat-glasses", __iconNode$1n);
79438
+ const HatGlasses = createLucideIcon("hat-glasses", __iconNode$1o);
79431
79439
 
79432
79440
  /**
79433
79441
  * @license lucide-react v0.528.0 - ISC
@@ -79437,13 +79445,13 @@ const HatGlasses = createLucideIcon("hat-glasses", __iconNode$1n);
79437
79445
  */
79438
79446
 
79439
79447
 
79440
- const __iconNode$1m = [
79448
+ const __iconNode$1n = [
79441
79449
  ["path", { d: "M4 12h8", key: "17cfdx" }],
79442
79450
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
79443
79451
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
79444
79452
  ["path", { d: "m17 12 3-2v8", key: "1hhhft" }]
79445
79453
  ];
79446
- const Heading1 = createLucideIcon("heading-1", __iconNode$1m);
79454
+ const Heading1 = createLucideIcon("heading-1", __iconNode$1n);
79447
79455
 
79448
79456
  /**
79449
79457
  * @license lucide-react v0.528.0 - ISC
@@ -79453,13 +79461,13 @@ const Heading1 = createLucideIcon("heading-1", __iconNode$1m);
79453
79461
  */
79454
79462
 
79455
79463
 
79456
- const __iconNode$1l = [
79464
+ const __iconNode$1m = [
79457
79465
  ["path", { d: "M4 12h8", key: "17cfdx" }],
79458
79466
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
79459
79467
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
79460
79468
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
79461
79469
  ];
79462
- const Heading2 = createLucideIcon("heading-2", __iconNode$1l);
79470
+ const Heading2 = createLucideIcon("heading-2", __iconNode$1m);
79463
79471
 
79464
79472
  /**
79465
79473
  * @license lucide-react v0.528.0 - ISC
@@ -79469,14 +79477,14 @@ const Heading2 = createLucideIcon("heading-2", __iconNode$1l);
79469
79477
  */
79470
79478
 
79471
79479
 
79472
- const __iconNode$1k = [
79480
+ const __iconNode$1l = [
79473
79481
  ["path", { d: "M4 12h8", key: "17cfdx" }],
79474
79482
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
79475
79483
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
79476
79484
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
79477
79485
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
79478
79486
  ];
79479
- const Heading3 = createLucideIcon("heading-3", __iconNode$1k);
79487
+ const Heading3 = createLucideIcon("heading-3", __iconNode$1l);
79480
79488
 
79481
79489
  /**
79482
79490
  * @license lucide-react v0.528.0 - ISC
@@ -79486,12 +79494,12 @@ const Heading3 = createLucideIcon("heading-3", __iconNode$1k);
79486
79494
  */
79487
79495
 
79488
79496
 
79489
- const __iconNode$1j = [
79497
+ const __iconNode$1k = [
79490
79498
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
79491
79499
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
79492
79500
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
79493
79501
  ];
79494
- const History = createLucideIcon("history", __iconNode$1j);
79502
+ const History = createLucideIcon("history", __iconNode$1k);
79495
79503
 
79496
79504
  /**
79497
79505
  * @license lucide-react v0.528.0 - ISC
@@ -79501,12 +79509,12 @@ const History = createLucideIcon("history", __iconNode$1j);
79501
79509
  */
79502
79510
 
79503
79511
 
79504
- const __iconNode$1i = [
79512
+ const __iconNode$1j = [
79505
79513
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
79506
79514
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
79507
79515
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
79508
79516
  ];
79509
- const Image$3 = createLucideIcon("image", __iconNode$1i);
79517
+ const Image$3 = createLucideIcon("image", __iconNode$1j);
79510
79518
 
79511
79519
  /**
79512
79520
  * @license lucide-react v0.528.0 - ISC
@@ -79516,7 +79524,7 @@ const Image$3 = createLucideIcon("image", __iconNode$1i);
79516
79524
  */
79517
79525
 
79518
79526
 
79519
- const __iconNode$1h = [
79527
+ const __iconNode$1i = [
79520
79528
  ["polyline", { points: "22 12 16 12 14 15 10 15 8 12 2 12", key: "o97t9d" }],
79521
79529
  [
79522
79530
  "path",
@@ -79526,7 +79534,7 @@ const __iconNode$1h = [
79526
79534
  }
79527
79535
  ]
79528
79536
  ];
79529
- const Inbox = createLucideIcon("inbox", __iconNode$1h);
79537
+ const Inbox = createLucideIcon("inbox", __iconNode$1i);
79530
79538
 
79531
79539
  /**
79532
79540
  * @license lucide-react v0.528.0 - ISC
@@ -79536,12 +79544,12 @@ const Inbox = createLucideIcon("inbox", __iconNode$1h);
79536
79544
  */
79537
79545
 
79538
79546
 
79539
- const __iconNode$1g = [
79547
+ const __iconNode$1h = [
79540
79548
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
79541
79549
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
79542
79550
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
79543
79551
  ];
79544
- const Info$3 = createLucideIcon("info", __iconNode$1g);
79552
+ const Info$3 = createLucideIcon("info", __iconNode$1h);
79545
79553
 
79546
79554
  /**
79547
79555
  * @license lucide-react v0.528.0 - ISC
@@ -79551,12 +79559,12 @@ const Info$3 = createLucideIcon("info", __iconNode$1g);
79551
79559
  */
79552
79560
 
79553
79561
 
79554
- const __iconNode$1f = [
79562
+ const __iconNode$1g = [
79555
79563
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
79556
79564
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
79557
79565
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
79558
79566
  ];
79559
- const Italic$1 = createLucideIcon("italic", __iconNode$1f);
79567
+ const Italic$1 = createLucideIcon("italic", __iconNode$1g);
79560
79568
 
79561
79569
  /**
79562
79570
  * @license lucide-react v0.528.0 - ISC
@@ -79566,7 +79574,7 @@ const Italic$1 = createLucideIcon("italic", __iconNode$1f);
79566
79574
  */
79567
79575
 
79568
79576
 
79569
- const __iconNode$1e = [
79577
+ const __iconNode$1f = [
79570
79578
  [
79571
79579
  "path",
79572
79580
  {
@@ -79576,7 +79584,7 @@ const __iconNode$1e = [
79576
79584
  ],
79577
79585
  ["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
79578
79586
  ];
79579
- const KeyRound = createLucideIcon("key-round", __iconNode$1e);
79587
+ const KeyRound = createLucideIcon("key-round", __iconNode$1f);
79580
79588
 
79581
79589
  /**
79582
79590
  * @license lucide-react v0.528.0 - ISC
@@ -79586,7 +79594,7 @@ const KeyRound = createLucideIcon("key-round", __iconNode$1e);
79586
79594
  */
79587
79595
 
79588
79596
 
79589
- const __iconNode$1d = [
79597
+ const __iconNode$1e = [
79590
79598
  ["path", { d: "M10 18v-7", key: "wt116b" }],
79591
79599
  [
79592
79600
  "path",
@@ -79600,7 +79608,7 @@ const __iconNode$1d = [
79600
79608
  ["path", { d: "M3 22h18", key: "8prr45" }],
79601
79609
  ["path", { d: "M6 18v-7", key: "1ivflk" }]
79602
79610
  ];
79603
- const Landmark = createLucideIcon("landmark", __iconNode$1d);
79611
+ const Landmark = createLucideIcon("landmark", __iconNode$1e);
79604
79612
 
79605
79613
  /**
79606
79614
  * @license lucide-react v0.528.0 - ISC
@@ -79610,7 +79618,7 @@ const Landmark = createLucideIcon("landmark", __iconNode$1d);
79610
79618
  */
79611
79619
 
79612
79620
 
79613
- const __iconNode$1c = [
79621
+ const __iconNode$1d = [
79614
79622
  [
79615
79623
  "path",
79616
79624
  {
@@ -79633,7 +79641,7 @@ const __iconNode$1c = [
79633
79641
  }
79634
79642
  ]
79635
79643
  ];
79636
- const Layers = createLucideIcon("layers", __iconNode$1c);
79644
+ const Layers = createLucideIcon("layers", __iconNode$1d);
79637
79645
 
79638
79646
  /**
79639
79647
  * @license lucide-react v0.528.0 - ISC
@@ -79643,12 +79651,12 @@ const Layers = createLucideIcon("layers", __iconNode$1c);
79643
79651
  */
79644
79652
 
79645
79653
 
79646
- const __iconNode$1b = [
79654
+ const __iconNode$1c = [
79647
79655
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
79648
79656
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
79649
79657
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
79650
79658
  ];
79651
- const Link2 = createLucideIcon("link-2", __iconNode$1b);
79659
+ const Link2 = createLucideIcon("link-2", __iconNode$1c);
79652
79660
 
79653
79661
  /**
79654
79662
  * @license lucide-react v0.528.0 - ISC
@@ -79658,11 +79666,11 @@ const Link2 = createLucideIcon("link-2", __iconNode$1b);
79658
79666
  */
79659
79667
 
79660
79668
 
79661
- const __iconNode$1a = [
79669
+ const __iconNode$1b = [
79662
79670
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
79663
79671
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
79664
79672
  ];
79665
- const Link$1 = createLucideIcon("link", __iconNode$1a);
79673
+ const Link$1 = createLucideIcon("link", __iconNode$1b);
79666
79674
 
79667
79675
  /**
79668
79676
  * @license lucide-react v0.528.0 - ISC
@@ -79672,7 +79680,7 @@ const Link$1 = createLucideIcon("link", __iconNode$1a);
79672
79680
  */
79673
79681
 
79674
79682
 
79675
- const __iconNode$19 = [
79683
+ const __iconNode$1a = [
79676
79684
  ["path", { d: "M10 12h11", key: "6m4ad9" }],
79677
79685
  ["path", { d: "M10 18h11", key: "11hvi2" }],
79678
79686
  ["path", { d: "M10 6h11", key: "c7qv1k" }],
@@ -79680,7 +79688,7 @@ const __iconNode$19 = [
79680
79688
  ["path", { d: "M4 6h1v4", key: "cnovpq" }],
79681
79689
  ["path", { d: "M6 18H4c0-1 2-2 2-3s-1-1.5-2-1", key: "m9a95d" }]
79682
79690
  ];
79683
- const ListOrdered = createLucideIcon("list-ordered", __iconNode$19);
79691
+ const ListOrdered = createLucideIcon("list-ordered", __iconNode$1a);
79684
79692
 
79685
79693
  /**
79686
79694
  * @license lucide-react v0.528.0 - ISC
@@ -79690,7 +79698,7 @@ const ListOrdered = createLucideIcon("list-ordered", __iconNode$19);
79690
79698
  */
79691
79699
 
79692
79700
 
79693
- const __iconNode$18 = [
79701
+ const __iconNode$19 = [
79694
79702
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
79695
79703
  ["path", { d: "M3 18h.01", key: "1tta3j" }],
79696
79704
  ["path", { d: "M3 6h.01", key: "1rqtza" }],
@@ -79698,7 +79706,7 @@ const __iconNode$18 = [
79698
79706
  ["path", { d: "M8 18h13", key: "1lx6n3" }],
79699
79707
  ["path", { d: "M8 6h13", key: "ik3vkj" }]
79700
79708
  ];
79701
- const List$1 = createLucideIcon("list", __iconNode$18);
79709
+ const List$1 = createLucideIcon("list", __iconNode$19);
79702
79710
 
79703
79711
  /**
79704
79712
  * @license lucide-react v0.528.0 - ISC
@@ -79708,8 +79716,8 @@ const List$1 = createLucideIcon("list", __iconNode$18);
79708
79716
  */
79709
79717
 
79710
79718
 
79711
- const __iconNode$17 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
79712
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$17);
79719
+ const __iconNode$18 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
79720
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$18);
79713
79721
 
79714
79722
  /**
79715
79723
  * @license lucide-react v0.528.0 - ISC
@@ -79719,11 +79727,11 @@ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$17);
79719
79727
  */
79720
79728
 
79721
79729
 
79722
- const __iconNode$16 = [
79730
+ const __iconNode$17 = [
79723
79731
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
79724
79732
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
79725
79733
  ];
79726
- const Lock = createLucideIcon("lock", __iconNode$16);
79734
+ const Lock = createLucideIcon("lock", __iconNode$17);
79727
79735
 
79728
79736
  /**
79729
79737
  * @license lucide-react v0.528.0 - ISC
@@ -79733,11 +79741,11 @@ const Lock = createLucideIcon("lock", __iconNode$16);
79733
79741
  */
79734
79742
 
79735
79743
 
79736
- const __iconNode$15 = [
79744
+ const __iconNode$16 = [
79737
79745
  ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
79738
79746
  ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
79739
79747
  ];
79740
- const Mail = createLucideIcon("mail", __iconNode$15);
79748
+ const Mail = createLucideIcon("mail", __iconNode$16);
79741
79749
 
79742
79750
  /**
79743
79751
  * @license lucide-react v0.528.0 - ISC
@@ -79747,10 +79755,10 @@ const Mail = createLucideIcon("mail", __iconNode$15);
79747
79755
  */
79748
79756
 
79749
79757
 
79750
- const __iconNode$14 = [
79758
+ const __iconNode$15 = [
79751
79759
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }]
79752
79760
  ];
79753
- const MessageSquare = createLucideIcon("message-square", __iconNode$14);
79761
+ const MessageSquare = createLucideIcon("message-square", __iconNode$15);
79754
79762
 
79755
79763
  /**
79756
79764
  * @license lucide-react v0.528.0 - ISC
@@ -79760,12 +79768,12 @@ const MessageSquare = createLucideIcon("message-square", __iconNode$14);
79760
79768
  */
79761
79769
 
79762
79770
 
79763
- const __iconNode$13 = [
79771
+ const __iconNode$14 = [
79764
79772
  ["path", { d: "M12 19v3", key: "npa21l" }],
79765
79773
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
79766
79774
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
79767
79775
  ];
79768
- const Mic = createLucideIcon("mic", __iconNode$13);
79776
+ const Mic = createLucideIcon("mic", __iconNode$14);
79769
79777
 
79770
79778
  /**
79771
79779
  * @license lucide-react v0.528.0 - ISC
@@ -79775,12 +79783,12 @@ const Mic = createLucideIcon("mic", __iconNode$13);
79775
79783
  */
79776
79784
 
79777
79785
 
79778
- const __iconNode$12 = [
79786
+ const __iconNode$13 = [
79779
79787
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
79780
79788
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
79781
79789
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
79782
79790
  ];
79783
- const Monitor = createLucideIcon("monitor", __iconNode$12);
79791
+ const Monitor = createLucideIcon("monitor", __iconNode$13);
79784
79792
 
79785
79793
  /**
79786
79794
  * @license lucide-react v0.528.0 - ISC
@@ -79790,7 +79798,7 @@ const Monitor = createLucideIcon("monitor", __iconNode$12);
79790
79798
  */
79791
79799
 
79792
79800
 
79793
- const __iconNode$11 = [
79801
+ const __iconNode$12 = [
79794
79802
  [
79795
79803
  "path",
79796
79804
  {
@@ -79799,7 +79807,7 @@ const __iconNode$11 = [
79799
79807
  }
79800
79808
  ]
79801
79809
  ];
79802
- const Paperclip = createLucideIcon("paperclip", __iconNode$11);
79810
+ const Paperclip = createLucideIcon("paperclip", __iconNode$12);
79803
79811
 
79804
79812
  /**
79805
79813
  * @license lucide-react v0.528.0 - ISC
@@ -79809,7 +79817,7 @@ const Paperclip = createLucideIcon("paperclip", __iconNode$11);
79809
79817
  */
79810
79818
 
79811
79819
 
79812
- const __iconNode$10 = [
79820
+ const __iconNode$11 = [
79813
79821
  ["path", { d: "M13 21h8", key: "1jsn5i" }],
79814
79822
  [
79815
79823
  "path",
@@ -79819,7 +79827,7 @@ const __iconNode$10 = [
79819
79827
  }
79820
79828
  ]
79821
79829
  ];
79822
- const PenLine = createLucideIcon("pen-line", __iconNode$10);
79830
+ const PenLine = createLucideIcon("pen-line", __iconNode$11);
79823
79831
 
79824
79832
  /**
79825
79833
  * @license lucide-react v0.528.0 - ISC
@@ -79829,7 +79837,7 @@ const PenLine = createLucideIcon("pen-line", __iconNode$10);
79829
79837
  */
79830
79838
 
79831
79839
 
79832
- const __iconNode$$ = [
79840
+ const __iconNode$10 = [
79833
79841
  [
79834
79842
  "path",
79835
79843
  {
@@ -79838,7 +79846,7 @@ const __iconNode$$ = [
79838
79846
  }
79839
79847
  ]
79840
79848
  ];
79841
- const Pen = createLucideIcon("pen", __iconNode$$);
79849
+ const Pen = createLucideIcon("pen", __iconNode$10);
79842
79850
 
79843
79851
  /**
79844
79852
  * @license lucide-react v0.528.0 - ISC
@@ -79848,7 +79856,7 @@ const Pen = createLucideIcon("pen", __iconNode$$);
79848
79856
  */
79849
79857
 
79850
79858
 
79851
- const __iconNode$_ = [
79859
+ const __iconNode$$ = [
79852
79860
  [
79853
79861
  "path",
79854
79862
  {
@@ -79858,7 +79866,7 @@ const __iconNode$_ = [
79858
79866
  ],
79859
79867
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
79860
79868
  ];
79861
- const Pencil = createLucideIcon("pencil", __iconNode$_);
79869
+ const Pencil = createLucideIcon("pencil", __iconNode$$);
79862
79870
 
79863
79871
  /**
79864
79872
  * @license lucide-react v0.528.0 - ISC
@@ -79868,7 +79876,7 @@ const Pencil = createLucideIcon("pencil", __iconNode$_);
79868
79876
  */
79869
79877
 
79870
79878
 
79871
- const __iconNode$Z = [
79879
+ const __iconNode$_ = [
79872
79880
  [
79873
79881
  "path",
79874
79882
  {
@@ -79877,7 +79885,7 @@ const __iconNode$Z = [
79877
79885
  }
79878
79886
  ]
79879
79887
  ];
79880
- const Play = createLucideIcon("play", __iconNode$Z);
79888
+ const Play = createLucideIcon("play", __iconNode$_);
79881
79889
 
79882
79890
  /**
79883
79891
  * @license lucide-react v0.528.0 - ISC
@@ -79887,11 +79895,11 @@ const Play = createLucideIcon("play", __iconNode$Z);
79887
79895
  */
79888
79896
 
79889
79897
 
79890
- const __iconNode$Y = [
79898
+ const __iconNode$Z = [
79891
79899
  ["path", { d: "M5 12h14", key: "1ays0h" }],
79892
79900
  ["path", { d: "M12 5v14", key: "s699le" }]
79893
79901
  ];
79894
- const Plus = createLucideIcon("plus", __iconNode$Y);
79902
+ const Plus = createLucideIcon("plus", __iconNode$Z);
79895
79903
 
79896
79904
  /**
79897
79905
  * @license lucide-react v0.528.0 - ISC
@@ -79901,12 +79909,12 @@ const Plus = createLucideIcon("plus", __iconNode$Y);
79901
79909
  */
79902
79910
 
79903
79911
 
79904
- const __iconNode$X = [
79912
+ const __iconNode$Y = [
79905
79913
  ["path", { d: "M2 3h20", key: "91anmk" }],
79906
79914
  ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
79907
79915
  ["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
79908
79916
  ];
79909
- const Presentation = createLucideIcon("presentation", __iconNode$X);
79917
+ const Presentation = createLucideIcon("presentation", __iconNode$Y);
79910
79918
 
79911
79919
  /**
79912
79920
  * @license lucide-react v0.528.0 - ISC
@@ -79916,7 +79924,7 @@ const Presentation = createLucideIcon("presentation", __iconNode$X);
79916
79924
  */
79917
79925
 
79918
79926
 
79919
- const __iconNode$W = [
79927
+ const __iconNode$X = [
79920
79928
  [
79921
79929
  "path",
79922
79930
  {
@@ -79925,7 +79933,7 @@ const __iconNode$W = [
79925
79933
  }
79926
79934
  ]
79927
79935
  ];
79928
- const Puzzle = createLucideIcon("puzzle", __iconNode$W);
79936
+ const Puzzle = createLucideIcon("puzzle", __iconNode$X);
79929
79937
 
79930
79938
  /**
79931
79939
  * @license lucide-react v0.528.0 - ISC
@@ -79935,7 +79943,7 @@ const Puzzle = createLucideIcon("puzzle", __iconNode$W);
79935
79943
  */
79936
79944
 
79937
79945
 
79938
- const __iconNode$V = [
79946
+ const __iconNode$W = [
79939
79947
  [
79940
79948
  "path",
79941
79949
  {
@@ -79951,7 +79959,7 @@ const __iconNode$V = [
79951
79959
  }
79952
79960
  ]
79953
79961
  ];
79954
- const Quote = createLucideIcon("quote", __iconNode$V);
79962
+ const Quote = createLucideIcon("quote", __iconNode$W);
79955
79963
 
79956
79964
  /**
79957
79965
  * @license lucide-react v0.528.0 - ISC
@@ -79961,14 +79969,14 @@ const Quote = createLucideIcon("quote", __iconNode$V);
79961
79969
  */
79962
79970
 
79963
79971
 
79964
- const __iconNode$U = [
79972
+ const __iconNode$V = [
79965
79973
  ["path", { d: "M16.247 7.761a6 6 0 0 1 0 8.478", key: "1fwjs5" }],
79966
79974
  ["path", { d: "M19.075 4.933a10 10 0 0 1 0 14.134", key: "ehdyv1" }],
79967
79975
  ["path", { d: "M4.925 19.067a10 10 0 0 1 0-14.134", key: "1q22gi" }],
79968
79976
  ["path", { d: "M7.753 16.239a6 6 0 0 1 0-8.478", key: "r2q7qm" }],
79969
79977
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }]
79970
79978
  ];
79971
- const Radio$1 = createLucideIcon("radio", __iconNode$U);
79979
+ const Radio$1 = createLucideIcon("radio", __iconNode$V);
79972
79980
 
79973
79981
  /**
79974
79982
  * @license lucide-react v0.528.0 - ISC
@@ -79978,13 +79986,13 @@ const Radio$1 = createLucideIcon("radio", __iconNode$U);
79978
79986
  */
79979
79987
 
79980
79988
 
79981
- const __iconNode$T = [
79989
+ const __iconNode$U = [
79982
79990
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
79983
79991
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
79984
79992
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
79985
79993
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
79986
79994
  ];
79987
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$T);
79995
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$U);
79988
79996
 
79989
79997
  /**
79990
79998
  * @license lucide-react v0.528.0 - ISC
@@ -79994,13 +80002,13 @@ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$T);
79994
80002
  */
79995
80003
 
79996
80004
 
79997
- const __iconNode$S = [
80005
+ const __iconNode$T = [
79998
80006
  ["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
79999
80007
  ["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
80000
80008
  ["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
80001
80009
  ["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
80002
80010
  ];
80003
- const Repeat = createLucideIcon("repeat", __iconNode$S);
80011
+ const Repeat = createLucideIcon("repeat", __iconNode$T);
80004
80012
 
80005
80013
  /**
80006
80014
  * @license lucide-react v0.528.0 - ISC
@@ -80010,11 +80018,11 @@ const Repeat = createLucideIcon("repeat", __iconNode$S);
80010
80018
  */
80011
80019
 
80012
80020
 
80013
- const __iconNode$R = [
80021
+ const __iconNode$S = [
80014
80022
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
80015
80023
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
80016
80024
  ];
80017
- const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$R);
80025
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$S);
80018
80026
 
80019
80027
  /**
80020
80028
  * @license lucide-react v0.528.0 - ISC
@@ -80024,11 +80032,11 @@ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$R);
80024
80032
  */
80025
80033
 
80026
80034
 
80027
- const __iconNode$Q = [
80035
+ const __iconNode$R = [
80028
80036
  ["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
80029
80037
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }]
80030
80038
  ];
80031
- const RotateCw = createLucideIcon("rotate-cw", __iconNode$Q);
80039
+ const RotateCw = createLucideIcon("rotate-cw", __iconNode$R);
80032
80040
 
80033
80041
  /**
80034
80042
  * @license lucide-react v0.528.0 - ISC
@@ -80038,12 +80046,12 @@ const RotateCw = createLucideIcon("rotate-cw", __iconNode$Q);
80038
80046
  */
80039
80047
 
80040
80048
 
80041
- const __iconNode$P = [
80049
+ const __iconNode$Q = [
80042
80050
  ["circle", { cx: "6", cy: "19", r: "3", key: "1kj8tv" }],
80043
80051
  ["path", { d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15", key: "1d8sl" }],
80044
80052
  ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }]
80045
80053
  ];
80046
- const Route = createLucideIcon("route", __iconNode$P);
80054
+ const Route = createLucideIcon("route", __iconNode$Q);
80047
80055
 
80048
80056
  /**
80049
80057
  * @license lucide-react v0.528.0 - ISC
@@ -80053,7 +80061,7 @@ const Route = createLucideIcon("route", __iconNode$P);
80053
80061
  */
80054
80062
 
80055
80063
 
80056
- const __iconNode$O = [
80064
+ const __iconNode$P = [
80057
80065
  [
80058
80066
  "path",
80059
80067
  {
@@ -80064,7 +80072,7 @@ const __iconNode$O = [
80064
80072
  ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
80065
80073
  ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
80066
80074
  ];
80067
- const Save = createLucideIcon("save", __iconNode$O);
80075
+ const Save = createLucideIcon("save", __iconNode$P);
80068
80076
 
80069
80077
  /**
80070
80078
  * @license lucide-react v0.528.0 - ISC
@@ -80074,7 +80082,7 @@ const Save = createLucideIcon("save", __iconNode$O);
80074
80082
  */
80075
80083
 
80076
80084
 
80077
- const __iconNode$N = [
80085
+ const __iconNode$O = [
80078
80086
  ["path", { d: "M14 22v-4a2 2 0 1 0-4 0v4", key: "hhkicm" }],
80079
80087
  [
80080
80088
  "path",
@@ -80088,7 +80096,7 @@ const __iconNode$N = [
80088
80096
  ["path", { d: "M6 5v17", key: "1xfsm0" }],
80089
80097
  ["circle", { cx: "12", cy: "9", r: "2", key: "1092wv" }]
80090
80098
  ];
80091
- const School = createLucideIcon("school", __iconNode$N);
80099
+ const School = createLucideIcon("school", __iconNode$O);
80092
80100
 
80093
80101
  /**
80094
80102
  * @license lucide-react v0.528.0 - ISC
@@ -80098,14 +80106,14 @@ const School = createLucideIcon("school", __iconNode$N);
80098
80106
  */
80099
80107
 
80100
80108
 
80101
- const __iconNode$M = [
80109
+ const __iconNode$N = [
80102
80110
  ["path", { d: "M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3", key: "i8wdob" }],
80103
80111
  ["path", { d: "M8 21h8", key: "1ev6f3" }],
80104
80112
  ["path", { d: "M12 17v4", key: "1riwvh" }],
80105
80113
  ["path", { d: "m17 8 5-5", key: "fqif7o" }],
80106
80114
  ["path", { d: "M17 3h5v5", key: "1o3tu8" }]
80107
80115
  ];
80108
- const ScreenShare = createLucideIcon("screen-share", __iconNode$M);
80116
+ const ScreenShare = createLucideIcon("screen-share", __iconNode$N);
80109
80117
 
80110
80118
  /**
80111
80119
  * @license lucide-react v0.528.0 - ISC
@@ -80115,7 +80123,7 @@ const ScreenShare = createLucideIcon("screen-share", __iconNode$M);
80115
80123
  */
80116
80124
 
80117
80125
 
80118
- const __iconNode$L = [
80126
+ const __iconNode$M = [
80119
80127
  ["path", { d: "M15 12h-5", key: "r7krc0" }],
80120
80128
  ["path", { d: "M15 8h-5", key: "1khuty" }],
80121
80129
  ["path", { d: "M19 17V5a2 2 0 0 0-2-2H4", key: "zz82l3" }],
@@ -80127,7 +80135,7 @@ const __iconNode$L = [
80127
80135
  }
80128
80136
  ]
80129
80137
  ];
80130
- const ScrollText = createLucideIcon("scroll-text", __iconNode$L);
80138
+ const ScrollText = createLucideIcon("scroll-text", __iconNode$M);
80131
80139
 
80132
80140
  /**
80133
80141
  * @license lucide-react v0.528.0 - ISC
@@ -80137,11 +80145,11 @@ const ScrollText = createLucideIcon("scroll-text", __iconNode$L);
80137
80145
  */
80138
80146
 
80139
80147
 
80140
- const __iconNode$K = [
80148
+ const __iconNode$L = [
80141
80149
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
80142
80150
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
80143
80151
  ];
80144
- const Search = createLucideIcon("search", __iconNode$K);
80152
+ const Search = createLucideIcon("search", __iconNode$L);
80145
80153
 
80146
80154
  /**
80147
80155
  * @license lucide-react v0.528.0 - ISC
@@ -80151,7 +80159,7 @@ const Search = createLucideIcon("search", __iconNode$K);
80151
80159
  */
80152
80160
 
80153
80161
 
80154
- const __iconNode$J = [
80162
+ const __iconNode$K = [
80155
80163
  [
80156
80164
  "path",
80157
80165
  {
@@ -80161,7 +80169,7 @@ const __iconNode$J = [
80161
80169
  ],
80162
80170
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
80163
80171
  ];
80164
- const Send = createLucideIcon("send", __iconNode$J);
80172
+ const Send = createLucideIcon("send", __iconNode$K);
80165
80173
 
80166
80174
  /**
80167
80175
  * @license lucide-react v0.528.0 - ISC
@@ -80171,13 +80179,13 @@ const Send = createLucideIcon("send", __iconNode$J);
80171
80179
  */
80172
80180
 
80173
80181
 
80174
- const __iconNode$I = [
80182
+ const __iconNode$J = [
80175
80183
  ["rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2", key: "ngkwjq" }],
80176
80184
  ["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2", key: "iecqi9" }],
80177
80185
  ["line", { x1: "6", x2: "6.01", y1: "6", y2: "6", key: "16zg32" }],
80178
80186
  ["line", { x1: "6", x2: "6.01", y1: "18", y2: "18", key: "nzw8ys" }]
80179
80187
  ];
80180
- const Server = createLucideIcon("server", __iconNode$I);
80188
+ const Server = createLucideIcon("server", __iconNode$J);
80181
80189
 
80182
80190
  /**
80183
80191
  * @license lucide-react v0.528.0 - ISC
@@ -80187,13 +80195,13 @@ const Server = createLucideIcon("server", __iconNode$I);
80187
80195
  */
80188
80196
 
80189
80197
 
80190
- const __iconNode$H = [
80198
+ const __iconNode$I = [
80191
80199
  ["path", { d: "M14 17H5", key: "gfn3mx" }],
80192
80200
  ["path", { d: "M19 7h-9", key: "6i9tg" }],
80193
80201
  ["circle", { cx: "17", cy: "17", r: "3", key: "18b49y" }],
80194
80202
  ["circle", { cx: "7", cy: "7", r: "3", key: "dfmy0x" }]
80195
80203
  ];
80196
- const Settings2 = createLucideIcon("settings-2", __iconNode$H);
80204
+ const Settings2 = createLucideIcon("settings-2", __iconNode$I);
80197
80205
 
80198
80206
  /**
80199
80207
  * @license lucide-react v0.528.0 - ISC
@@ -80203,7 +80211,7 @@ const Settings2 = createLucideIcon("settings-2", __iconNode$H);
80203
80211
  */
80204
80212
 
80205
80213
 
80206
- const __iconNode$G = [
80214
+ const __iconNode$H = [
80207
80215
  [
80208
80216
  "path",
80209
80217
  {
@@ -80213,7 +80221,7 @@ const __iconNode$G = [
80213
80221
  ],
80214
80222
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
80215
80223
  ];
80216
- const Settings = createLucideIcon("settings", __iconNode$G);
80224
+ const Settings = createLucideIcon("settings", __iconNode$H);
80217
80225
 
80218
80226
  /**
80219
80227
  * @license lucide-react v0.528.0 - ISC
@@ -80223,14 +80231,14 @@ const Settings = createLucideIcon("settings", __iconNode$G);
80223
80231
  */
80224
80232
 
80225
80233
 
80226
- const __iconNode$F = [
80234
+ const __iconNode$G = [
80227
80235
  ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
80228
80236
  ["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
80229
80237
  ["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
80230
80238
  ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
80231
80239
  ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
80232
80240
  ];
80233
- const Share2 = createLucideIcon("share-2", __iconNode$F);
80241
+ const Share2 = createLucideIcon("share-2", __iconNode$G);
80234
80242
 
80235
80243
  /**
80236
80244
  * @license lucide-react v0.528.0 - ISC
@@ -80240,7 +80248,7 @@ const Share2 = createLucideIcon("share-2", __iconNode$F);
80240
80248
  */
80241
80249
 
80242
80250
 
80243
- const __iconNode$E = [
80251
+ const __iconNode$F = [
80244
80252
  [
80245
80253
  "path",
80246
80254
  {
@@ -80251,7 +80259,7 @@ const __iconNode$E = [
80251
80259
  ["path", { d: "M12 8v4", key: "1got3b" }],
80252
80260
  ["path", { d: "M12 16h.01", key: "1drbdi" }]
80253
80261
  ];
80254
- const ShieldAlert = createLucideIcon("shield-alert", __iconNode$E);
80262
+ const ShieldAlert = createLucideIcon("shield-alert", __iconNode$F);
80255
80263
 
80256
80264
  /**
80257
80265
  * @license lucide-react v0.528.0 - ISC
@@ -80261,7 +80269,7 @@ const ShieldAlert = createLucideIcon("shield-alert", __iconNode$E);
80261
80269
  */
80262
80270
 
80263
80271
 
80264
- const __iconNode$D = [
80272
+ const __iconNode$E = [
80265
80273
  [
80266
80274
  "path",
80267
80275
  {
@@ -80271,7 +80279,7 @@ const __iconNode$D = [
80271
80279
  ],
80272
80280
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
80273
80281
  ];
80274
- const ShieldCheck = createLucideIcon("shield-check", __iconNode$D);
80282
+ const ShieldCheck = createLucideIcon("shield-check", __iconNode$E);
80275
80283
 
80276
80284
  /**
80277
80285
  * @license lucide-react v0.528.0 - ISC
@@ -80281,7 +80289,7 @@ const ShieldCheck = createLucideIcon("shield-check", __iconNode$D);
80281
80289
  */
80282
80290
 
80283
80291
 
80284
- const __iconNode$C = [
80292
+ const __iconNode$D = [
80285
80293
  [
80286
80294
  "path",
80287
80295
  {
@@ -80290,7 +80298,7 @@ const __iconNode$C = [
80290
80298
  }
80291
80299
  ]
80292
80300
  ];
80293
- const Shield = createLucideIcon("shield", __iconNode$C);
80301
+ const Shield = createLucideIcon("shield", __iconNode$D);
80294
80302
 
80295
80303
  /**
80296
80304
  * @license lucide-react v0.528.0 - ISC
@@ -80300,7 +80308,7 @@ const Shield = createLucideIcon("shield", __iconNode$C);
80300
80308
  */
80301
80309
 
80302
80310
 
80303
- const __iconNode$B = [
80311
+ const __iconNode$C = [
80304
80312
  ["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }],
80305
80313
  ["path", { d: "M3.103 6.034h17.794", key: "awc11p" }],
80306
80314
  [
@@ -80311,7 +80319,7 @@ const __iconNode$B = [
80311
80319
  }
80312
80320
  ]
80313
80321
  ];
80314
- const ShoppingBag = createLucideIcon("shopping-bag", __iconNode$B);
80322
+ const ShoppingBag = createLucideIcon("shopping-bag", __iconNode$C);
80315
80323
 
80316
80324
  /**
80317
80325
  * @license lucide-react v0.528.0 - ISC
@@ -80321,14 +80329,14 @@ const ShoppingBag = createLucideIcon("shopping-bag", __iconNode$B);
80321
80329
  */
80322
80330
 
80323
80331
 
80324
- const __iconNode$A = [
80332
+ const __iconNode$B = [
80325
80333
  ["path", { d: "m18 14 4 4-4 4", key: "10pe0f" }],
80326
80334
  ["path", { d: "m18 2 4 4-4 4", key: "pucp1d" }],
80327
80335
  ["path", { d: "M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22", key: "1ailkh" }],
80328
80336
  ["path", { d: "M2 6h1.972a4 4 0 0 1 3.6 2.2", key: "km57vx" }],
80329
80337
  ["path", { d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45", key: "os18l9" }]
80330
80338
  ];
80331
- const Shuffle = createLucideIcon("shuffle", __iconNode$A);
80339
+ const Shuffle = createLucideIcon("shuffle", __iconNode$B);
80332
80340
 
80333
80341
  /**
80334
80342
  * @license lucide-react v0.528.0 - ISC
@@ -80338,7 +80346,7 @@ const Shuffle = createLucideIcon("shuffle", __iconNode$A);
80338
80346
  */
80339
80347
 
80340
80348
 
80341
- const __iconNode$z = [
80349
+ const __iconNode$A = [
80342
80350
  ["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
80343
80351
  ["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
80344
80352
  ["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
@@ -80349,7 +80357,7 @@ const __iconNode$z = [
80349
80357
  ["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
80350
80358
  ["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
80351
80359
  ];
80352
- const SlidersHorizontal = createLucideIcon("sliders-horizontal", __iconNode$z);
80360
+ const SlidersHorizontal = createLucideIcon("sliders-horizontal", __iconNode$A);
80353
80361
 
80354
80362
  /**
80355
80363
  * @license lucide-react v0.528.0 - ISC
@@ -80359,11 +80367,11 @@ const SlidersHorizontal = createLucideIcon("sliders-horizontal", __iconNode$z);
80359
80367
  */
80360
80368
 
80361
80369
 
80362
- const __iconNode$y = [
80370
+ const __iconNode$z = [
80363
80371
  ["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
80364
80372
  ["path", { d: "M12 18h.01", key: "mhygvu" }]
80365
80373
  ];
80366
- const Smartphone = createLucideIcon("smartphone", __iconNode$y);
80374
+ const Smartphone = createLucideIcon("smartphone", __iconNode$z);
80367
80375
 
80368
80376
  /**
80369
80377
  * @license lucide-react v0.528.0 - ISC
@@ -80373,7 +80381,7 @@ const Smartphone = createLucideIcon("smartphone", __iconNode$y);
80373
80381
  */
80374
80382
 
80375
80383
 
80376
- const __iconNode$x = [
80384
+ const __iconNode$y = [
80377
80385
  [
80378
80386
  "path",
80379
80387
  {
@@ -80385,7 +80393,7 @@ const __iconNode$x = [
80385
80393
  ["path", { d: "M22 4h-4", key: "gwowj6" }],
80386
80394
  ["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
80387
80395
  ];
80388
- const Sparkles = createLucideIcon("sparkles", __iconNode$x);
80396
+ const Sparkles = createLucideIcon("sparkles", __iconNode$y);
80389
80397
 
80390
80398
  /**
80391
80399
  * @license lucide-react v0.528.0 - ISC
@@ -80395,7 +80403,7 @@ const Sparkles = createLucideIcon("sparkles", __iconNode$x);
80395
80403
  */
80396
80404
 
80397
80405
 
80398
- const __iconNode$w = [
80406
+ const __iconNode$x = [
80399
80407
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
80400
80408
  [
80401
80409
  "path",
@@ -80405,7 +80413,7 @@ const __iconNode$w = [
80405
80413
  }
80406
80414
  ]
80407
80415
  ];
80408
- const SquarePen = createLucideIcon("square-pen", __iconNode$w);
80416
+ const SquarePen = createLucideIcon("square-pen", __iconNode$x);
80409
80417
 
80410
80418
  /**
80411
80419
  * @license lucide-react v0.528.0 - ISC
@@ -80415,10 +80423,10 @@ const SquarePen = createLucideIcon("square-pen", __iconNode$w);
80415
80423
  */
80416
80424
 
80417
80425
 
80418
- const __iconNode$v = [
80426
+ const __iconNode$w = [
80419
80427
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
80420
80428
  ];
80421
- const Square$1 = createLucideIcon("square", __iconNode$v);
80429
+ const Square$1 = createLucideIcon("square", __iconNode$w);
80422
80430
 
80423
80431
  /**
80424
80432
  * @license lucide-react v0.528.0 - ISC
@@ -80428,7 +80436,7 @@ const Square$1 = createLucideIcon("square", __iconNode$v);
80428
80436
  */
80429
80437
 
80430
80438
 
80431
- const __iconNode$u = [
80439
+ const __iconNode$v = [
80432
80440
  [
80433
80441
  "path",
80434
80442
  {
@@ -80437,7 +80445,7 @@ const __iconNode$u = [
80437
80445
  }
80438
80446
  ]
80439
80447
  ];
80440
- const Star$1 = createLucideIcon("star", __iconNode$u);
80448
+ const Star$1 = createLucideIcon("star", __iconNode$v);
80441
80449
 
80442
80450
  /**
80443
80451
  * @license lucide-react v0.528.0 - ISC
@@ -80447,14 +80455,14 @@ const Star$1 = createLucideIcon("star", __iconNode$u);
80447
80455
  */
80448
80456
 
80449
80457
 
80450
- const __iconNode$t = [
80458
+ const __iconNode$u = [
80451
80459
  ["path", { d: "M11 2v2", key: "1539x4" }],
80452
80460
  ["path", { d: "M5 2v2", key: "1yf1q8" }],
80453
80461
  ["path", { d: "M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1", key: "rb5t3r" }],
80454
80462
  ["path", { d: "M8 15a6 6 0 0 0 12 0v-3", key: "x18d4x" }],
80455
80463
  ["circle", { cx: "20", cy: "10", r: "2", key: "ts1r5v" }]
80456
80464
  ];
80457
- const Stethoscope = createLucideIcon("stethoscope", __iconNode$t);
80465
+ const Stethoscope = createLucideIcon("stethoscope", __iconNode$u);
80458
80466
 
80459
80467
  /**
80460
80468
  * @license lucide-react v0.528.0 - ISC
@@ -80464,11 +80472,11 @@ const Stethoscope = createLucideIcon("stethoscope", __iconNode$t);
80464
80472
  */
80465
80473
 
80466
80474
 
80467
- const __iconNode$s = [
80475
+ const __iconNode$t = [
80468
80476
  ["path", { d: "M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z", key: "qazsjp" }],
80469
80477
  ["path", { d: "M15 3v4a2 2 0 0 0 2 2h4", key: "40519r" }]
80470
80478
  ];
80471
- const StickyNote = createLucideIcon("sticky-note", __iconNode$s);
80479
+ const StickyNote = createLucideIcon("sticky-note", __iconNode$t);
80472
80480
 
80473
80481
  /**
80474
80482
  * @license lucide-react v0.528.0 - ISC
@@ -80478,7 +80486,7 @@ const StickyNote = createLucideIcon("sticky-note", __iconNode$s);
80478
80486
  */
80479
80487
 
80480
80488
 
80481
- const __iconNode$r = [
80489
+ const __iconNode$s = [
80482
80490
  ["path", { d: "m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7", key: "ztvudi" }],
80483
80491
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }],
80484
80492
  ["path", { d: "M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4", key: "2ebpfo" }],
@@ -80491,7 +80499,7 @@ const __iconNode$r = [
80491
80499
  }
80492
80500
  ]
80493
80501
  ];
80494
- const Store$1 = createLucideIcon("store", __iconNode$r);
80502
+ const Store$1 = createLucideIcon("store", __iconNode$s);
80495
80503
 
80496
80504
  /**
80497
80505
  * @license lucide-react v0.528.0 - ISC
@@ -80501,7 +80509,7 @@ const Store$1 = createLucideIcon("store", __iconNode$r);
80501
80509
  */
80502
80510
 
80503
80511
 
80504
- const __iconNode$q = [
80512
+ const __iconNode$r = [
80505
80513
  [
80506
80514
  "path",
80507
80515
  {
@@ -80511,7 +80519,7 @@ const __iconNode$q = [
80511
80519
  ],
80512
80520
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
80513
80521
  ];
80514
- const Tag = createLucideIcon("tag", __iconNode$q);
80522
+ const Tag = createLucideIcon("tag", __iconNode$r);
80515
80523
 
80516
80524
  /**
80517
80525
  * @license lucide-react v0.528.0 - ISC
@@ -80521,7 +80529,7 @@ const Tag = createLucideIcon("tag", __iconNode$q);
80521
80529
  */
80522
80530
 
80523
80531
 
80524
- const __iconNode$p = [
80532
+ const __iconNode$q = [
80525
80533
  ["path", { d: "m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19", key: "1cbfv1" }],
80526
80534
  [
80527
80535
  "path",
@@ -80532,7 +80540,7 @@ const __iconNode$p = [
80532
80540
  ],
80533
80541
  ["circle", { cx: "6.5", cy: "9.5", r: ".5", fill: "currentColor", key: "5pm5xn" }]
80534
80542
  ];
80535
- const Tags = createLucideIcon("tags", __iconNode$p);
80543
+ const Tags = createLucideIcon("tags", __iconNode$q);
80536
80544
 
80537
80545
  /**
80538
80546
  * @license lucide-react v0.528.0 - ISC
@@ -80542,11 +80550,11 @@ const Tags = createLucideIcon("tags", __iconNode$p);
80542
80550
  */
80543
80551
 
80544
80552
 
80545
- const __iconNode$o = [
80553
+ const __iconNode$p = [
80546
80554
  ["path", { d: "M12 19h8", key: "baeox8" }],
80547
80555
  ["path", { d: "m4 17 6-6-6-6", key: "1yngyt" }]
80548
80556
  ];
80549
- const Terminal = createLucideIcon("terminal", __iconNode$o);
80557
+ const Terminal = createLucideIcon("terminal", __iconNode$p);
80550
80558
 
80551
80559
  /**
80552
80560
  * @license lucide-react v0.528.0 - ISC
@@ -80556,7 +80564,7 @@ const Terminal = createLucideIcon("terminal", __iconNode$o);
80556
80564
  */
80557
80565
 
80558
80566
 
80559
- const __iconNode$n = [
80567
+ const __iconNode$o = [
80560
80568
  ["path", { d: "M17 14V2", key: "8ymqnk" }],
80561
80569
  [
80562
80570
  "path",
@@ -80566,7 +80574,7 @@ const __iconNode$n = [
80566
80574
  }
80567
80575
  ]
80568
80576
  ];
80569
- const ThumbsDown = createLucideIcon("thumbs-down", __iconNode$n);
80577
+ const ThumbsDown = createLucideIcon("thumbs-down", __iconNode$o);
80570
80578
 
80571
80579
  /**
80572
80580
  * @license lucide-react v0.528.0 - ISC
@@ -80576,7 +80584,7 @@ const ThumbsDown = createLucideIcon("thumbs-down", __iconNode$n);
80576
80584
  */
80577
80585
 
80578
80586
 
80579
- const __iconNode$m = [
80587
+ const __iconNode$n = [
80580
80588
  ["path", { d: "M7 10v12", key: "1qc93n" }],
80581
80589
  [
80582
80590
  "path",
@@ -80586,7 +80594,7 @@ const __iconNode$m = [
80586
80594
  }
80587
80595
  ]
80588
80596
  ];
80589
- const ThumbsUp = createLucideIcon("thumbs-up", __iconNode$m);
80597
+ const ThumbsUp = createLucideIcon("thumbs-up", __iconNode$n);
80590
80598
 
80591
80599
  /**
80592
80600
  * @license lucide-react v0.528.0 - ISC
@@ -80596,14 +80604,14 @@ const ThumbsUp = createLucideIcon("thumbs-up", __iconNode$m);
80596
80604
  */
80597
80605
 
80598
80606
 
80599
- const __iconNode$l = [
80607
+ const __iconNode$m = [
80600
80608
  ["path", { d: "M10 11v6", key: "nco0om" }],
80601
80609
  ["path", { d: "M14 11v6", key: "outv1u" }],
80602
80610
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
80603
80611
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
80604
80612
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
80605
80613
  ];
80606
- const Trash2 = createLucideIcon("trash-2", __iconNode$l);
80614
+ const Trash2 = createLucideIcon("trash-2", __iconNode$m);
80607
80615
 
80608
80616
  /**
80609
80617
  * @license lucide-react v0.528.0 - ISC
@@ -80613,12 +80621,26 @@ const Trash2 = createLucideIcon("trash-2", __iconNode$l);
80613
80621
  */
80614
80622
 
80615
80623
 
80616
- const __iconNode$k = [
80624
+ const __iconNode$l = [
80617
80625
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
80618
80626
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
80619
80627
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
80620
80628
  ];
80621
- const Trash = createLucideIcon("trash", __iconNode$k);
80629
+ const Trash = createLucideIcon("trash", __iconNode$l);
80630
+
80631
+ /**
80632
+ * @license lucide-react v0.528.0 - ISC
80633
+ *
80634
+ * This source code is licensed under the ISC license.
80635
+ * See the LICENSE file in the root directory of this source tree.
80636
+ */
80637
+
80638
+
80639
+ const __iconNode$k = [
80640
+ ["path", { d: "M16 7h6v6", key: "box55l" }],
80641
+ ["path", { d: "m22 7-8.5 8.5-5-5L2 17", key: "1t1m79" }]
80642
+ ];
80643
+ const TrendingUp = createLucideIcon("trending-up", __iconNode$k);
80622
80644
 
80623
80645
  /**
80624
80646
  * @license lucide-react v0.528.0 - ISC
@@ -185540,7 +185562,7 @@ function MultiSearchSelect({ labels, selected, onSelect, onRemove, searchTerm, o
185540
185562
  */
185541
185563
  function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured, category, subjects, llm, types, includeMainPublicMentors, orderDirection, skip = false, }) {
185542
185564
  var _a, _b, _c;
185543
- const { data, isLoading, isFetching, refetch } = useGetAiSearchMentorsQuery({
185565
+ const { data, isLoading, isFetching, isUninitialized, refetch } = useGetAiSearchMentorsQuery({
185544
185566
  platform_key: tenantKey,
185545
185567
  query: query || undefined,
185546
185568
  limit,
@@ -185564,6 +185586,7 @@ function useAgentSearch({ tenantKey, query, limit = 6, offset, starred, featured
185564
185586
  totalPages: (_c = data === null || data === void 0 ? void 0 : data.total_pages) !== null && _c !== void 0 ? _c : 0,
185565
185587
  isLoading,
185566
185588
  isFetching,
185589
+ isUninitialized,
185567
185590
  refetch,
185568
185591
  };
185569
185592
  }
@@ -194215,29 +194238,60 @@ function SpendLimitsSection({ tenantKey, labels: labelsOverride }) {
194215
194238
  return (jsxs(Fragment$1, { children: [jsxs("div", { "data-testid": "spend-limits-workspace-section", className: "rounded-lg border border-[#e5e5e5] bg-white shadow-[0_1px_2px_0_rgba(0,0,0,0.05)] dark:bg-zinc-900 dark:border-zinc-800", children: [jsx("div", { className: "flex flex-col gap-2 p-4 sm:flex-row sm:items-start sm:justify-between", children: jsxs("div", { className: "space-y-0.5", children: [jsx("h3", { className: "text-[16px] font-medium leading-6 text-[#101828] dark:text-gray-100", children: labels.tenantSections.workspace.title }), jsx("p", { className: "text-[13px] font-normal leading-5 text-[#4a5565] dark:text-gray-400", children: labels.tenantSections.workspace.description })] }) }), jsx("div", { className: "border-t border-[#e5e7eb] dark:border-zinc-800 px-4 py-3", children: isTenantCapLoading ? (jsx("div", { className: "flex items-center justify-center py-8", "data-testid": "tenant-cap-loading", children: jsx(Spinner, {}) })) : isTenantForbidden ? (jsxs("div", { className: "flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-10 text-center", "data-testid": "spend-limits-denied", children: [jsx(ShieldAlert, { className: "h-6 w-6 text-gray-400" }), jsx("p", { className: "text-sm font-medium text-gray-900", children: labels.denied.title }), jsx("p", { className: "max-w-sm text-xs text-gray-600", children: labels.denied.description })] })) : (jsxs("div", { className: "space-y-4", children: [!tenantCap && (monthlySpend != null || totalSpend != null) && (jsxs("div", { className: "space-y-1", "data-testid": "workspace-actual-spend-stats", children: [jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [monthlySpend != null && (jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-[11px] font-medium uppercase tracking-wide text-[#6a7282] dark:text-gray-400", children: labels.tenantSections.noCapStats.spentThisMonth }), jsx("p", { className: "text-[18px] font-semibold leading-6 text-[#101828] dark:text-gray-100", "data-testid": "workspace-actual-spend-month", children: formatUsd$2(String(monthlySpend)) })] })), totalSpend != null && (jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-[11px] font-medium uppercase tracking-wide text-[#6a7282] dark:text-gray-400", children: labels.tenantSections.noCapStats.spentAllTime }), jsx("p", { className: "text-[18px] font-semibold leading-6 text-[#101828] dark:text-gray-100", "data-testid": "workspace-actual-spend-total", children: formatUsd$2(String(totalSpend)) })] }))] }), jsx("p", { className: "text-[12px] font-normal leading-4 text-[#6a7282] dark:text-gray-500", children: labels.tenantSections.noCapStats.hint })] })), jsx(SpendCapForm, { labels: labels, cap: tenantCap, isSaving: isSavingTenantCap, isDeleting: isDeletingTenantCap, onSave: saveTenantCap, onDelete: () => setIsDeleteOpen(true), testId: "tenant-cap" })] })) })] }), jsx(Dialog, { open: isDeleteOpen, onOpenChange: () => setIsDeleteOpen(false), children: jsxs(DialogContent, { "aria-describedby": "tenant-cap-delete-description", "data-testid": "tenant-cap-delete-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: labels.deleteModal.title }) }), jsx("div", { className: "my-5", id: "tenant-cap-delete-description", children: jsx("p", { className: "text-sm text-[#646464]", children: labels.deleteModal.description }) }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button$1, { variant: "outline", onClick: () => setIsDeleteOpen(false), children: labels.deleteModal.cancel }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleConfirmDelete, disabled: isDeletingTenantCap, "data-testid": "tenant-cap-delete-confirm", children: isDeletingTenantCap ? labels.form.removing : labels.deleteModal.confirm })] })] }) })] }));
194216
194239
  }
194217
194240
 
194241
+ /** SPAs whose users have coursework, so the profile leads with a Gradebook tab. */
194242
+ const GRADEBOOK_SPAS = ['lms', 'skills'];
194243
+ /**
194244
+ * The customization `Profile` is opened with: whatever the host passed, with
194245
+ * the Gradebook tab defaulted from the SPA it runs in. An explicit
194246
+ * `showGradebookTab` always wins, so a host can force it either way.
194247
+ */
194248
+ function profileCustomization(customization, currentSPA) {
194249
+ var _a;
194250
+ return {
194251
+ ...customization,
194252
+ showGradebookTab: (_a = customization === null || customization === void 0 ? void 0 : customization.showGradebookTab) !== null && _a !== void 0 ? _a : GRADEBOOK_SPAS.includes((currentSPA !== null && currentSPA !== void 0 ? currentSPA : '').trim().toLowerCase()),
194253
+ };
194254
+ }
194218
194255
  /**
194219
194256
  * The shared `Profile` viewer in a dialog — the same modal the tenant
194220
194257
  * Management tab opens when a user row is clicked. Controlled variant for
194221
194258
  * hosts that trigger it from a whole table row.
194259
+ *
194260
+ * Radix portals the dialog into `document.body`, but a React portal still
194261
+ * bubbles its events through the React tree — so without the guard below, a
194262
+ * click *inside* the open profile would reach the row this dialog is rendered
194263
+ * from and fire its `onClick` (e.g. opening the enrollment progress modal
194264
+ * behind the profile). The wrapper is `display: contents`, so it adds nothing
194265
+ * to the host's layout.
194222
194266
  */
194223
- function UserProfileDialog({ tenantKey, username, isOpen, onClose }) {
194267
+ function UserProfileDialog({ tenantKey, username, isOpen, onClose, customization, currentSPA, }) {
194224
194268
  const t = useT();
194225
194269
  if (!isOpen)
194226
194270
  return null;
194227
- return (jsx(Dialog, { open: true, onOpenChange: onClose, children: jsxs(DialogContent, { autoFocus: false, className: "profile-component-dialog max-w-7xl w-[85vw] gap-0 overflow-hidden bg-white p-0", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, "data-testid": "user-profile-link-dialog", children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenantKey, tenants: [], username: username, onClose: onClose })] }) }));
194271
+ return (jsx("span", { className: "contents", onClick: (event) => event.stopPropagation(), onMouseDown: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: jsx(Dialog, { open: true, onOpenChange: onClose, children: jsxs(DialogContent, { autoFocus: false, className: "profile-component-dialog max-w-7xl w-[85vw] gap-0 overflow-hidden bg-white p-0", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, "data-testid": "user-profile-link-dialog", children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenantKey, tenants: [], username: username, onClose: onClose, customization: profileCustomization(customization, currentSPA), currentSPA: currentSPA })] }) }) }));
194228
194272
  }
194229
194273
  /**
194230
194274
  * Clickable user identity that opens the shared `Profile` viewer in a dialog
194231
194275
  * — the same modal the tenant Management tab opens when a user row is
194232
- * clicked. Used by the per-user limits table and the user-limit modal.
194276
+ * clicked. `Profile` drops into preview (read-only) mode on its own for anyone
194277
+ * but the signed-in user. Used by the spend-cap tables and every analytics
194278
+ * surface that names a user; safe inside clickable rows and cards, since
194279
+ * neither its clicks nor its key presses reach the host's handlers.
194233
194280
  */
194234
- function UserProfileLink({ tenantKey, username, display, className, testId, }) {
194281
+ function UserProfileLink({ tenantKey, username, display, className, testId, customization, currentSPA, }) {
194235
194282
  const t = useT();
194236
194283
  const [isOpen, setIsOpen] = React__default.useState(false);
194284
+ if (!username) {
194285
+ // `inline-block`, or `truncate`'s `overflow: hidden` has nothing to clip:
194286
+ // an inline box takes its width from its own text.
194287
+ return (jsx("span", { className: cn('inline-block max-w-full truncate', className), "data-testid": testId, children: display }));
194288
+ }
194237
194289
  return (jsxs(Fragment$1, { children: [jsx("button", { type: "button", onClick: (event) => {
194238
194290
  event.stopPropagation();
194239
194291
  setIsOpen(true);
194240
- }, className: cn('max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none', className), "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: display }), "data-testid": testId, children: display }), jsx(UserProfileDialog, { tenantKey: tenantKey, username: username, isOpen: isOpen, onClose: () => setIsOpen(false) })] }));
194292
+ },
194293
+ // Rows that open on Enter/Space would otherwise swallow the key press.
194294
+ onKeyDown: (event) => event.stopPropagation(), className: cn('max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none', className), "aria-label": t('tabsUserstab.viewProfileAriaLabel', { name: display }), "data-testid": testId, children: display }), jsx(UserProfileDialog, { tenantKey: tenantKey, username: username, isOpen: isOpen, onClose: () => setIsOpen(false), customization: customization, currentSPA: currentSPA })] }));
194241
194295
  }
194242
194296
 
194243
194297
  /**
@@ -229624,6 +229678,13 @@ const AnalyticsScopeProvider = AnalyticsScopeContext.Provider;
229624
229678
  function useAnalyticsScope() {
229625
229679
  return useContext(AnalyticsScopeContext);
229626
229680
  }
229681
+ /**
229682
+ * The scope setter, or `undefined` where the page can't be re-scoped — no
229683
+ * provider, or a provider with no picker on screen.
229684
+ */
229685
+ function useAnalyticsScopeSetter() {
229686
+ return useContext(AnalyticsScopeContext).setScopedMentor;
229687
+ }
229627
229688
  /**
229628
229689
  * The agent a container should report on, in precedence order:
229629
229690
  *
@@ -229695,12 +229756,12 @@ const xAxisProps = (xKey) => ({
229695
229756
  interval: 'preserveStartEnd',
229696
229757
  minTickGap: 28,
229697
229758
  });
229698
- const yAxisProps = ({ yTickFormatter, yDomain, yTickCount = 5, allowDecimals = false, }) => ({
229759
+ const yAxisProps = ({ yTickFormatter, yDomain, yTickCount = 5, allowDecimals = false, yAxisWidth = 44, }) => ({
229699
229760
  tick: AXIS_TICK,
229700
229761
  axisLine: false,
229701
229762
  tickLine: false,
229702
229763
  tickMargin: 8,
229703
- width: 44,
229764
+ width: yAxisWidth,
229704
229765
  tickCount: yTickCount,
229705
229766
  allowDecimals,
229706
229767
  domain: yDomain,
@@ -229708,15 +229769,15 @@ const yAxisProps = ({ yTickFormatter, yDomain, yTickCount = 5, allowDecimals = f
229708
229769
  });
229709
229770
  /** Change over time: 2px monotone line over a soft gradient wash, crosshair +
229710
229771
  * ring marker on hover. */
229711
- function AnalyticsAreaChart({ data, xKey = 'date', dataKey = 'value', color = CHART_SINGLE_SERIES_COLOR, tooltipLabel, yTickFormatter, tooltipValue, tooltipAriaLabel, yDomain, yTickCount, allowDecimals, width, height, }) {
229772
+ function AnalyticsAreaChart({ data, xKey = 'date', dataKey = 'value', color = CHART_SINGLE_SERIES_COLOR, tooltipLabel, yTickFormatter, tooltipValue, tooltipAriaLabel, yDomain, yTickCount, allowDecimals, yAxisWidth, width, height, }) {
229712
229773
  const gradientId = React__default.useId();
229713
229774
  const tooltip = useChartTooltip({ dataKey, tooltipLabel, tooltipValue, tooltipAriaLabel });
229714
- return (jsxs(AreaChart, { width: width, height: height, data: data, margin: { top: 12, right: 12, left: 0, bottom: 4 }, children: [jsx("defs", { children: jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.2 }), jsx("stop", { offset: "100%", stopColor: color, stopOpacity: 0 })] }) }), jsx(CartesianGrid, { stroke: GRID_INK, vertical: false }), jsx(XAxis, { ...xAxisProps(xKey) }), jsx(YAxis, { ...yAxisProps({ yTickFormatter, yDomain, yTickCount, allowDecimals }) }), jsx(Tooltip, { content: tooltip, cursor: { stroke: color, strokeWidth: 1, strokeDasharray: '4 4', opacity: 0.55 }, wrapperStyle: { outline: 'none' } }), jsx(Area, { type: "monotone", dataKey: dataKey, stroke: color, strokeWidth: 2, fill: `url(#${gradientId})`, dot: false, activeDot: { r: 5, fill: '#ffffff', stroke: color, strokeWidth: 2.5 } })] }));
229775
+ return (jsxs(AreaChart, { width: width, height: height, data: data, margin: { top: 12, right: 12, left: 0, bottom: 4 }, children: [jsx("defs", { children: jsxs("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.2 }), jsx("stop", { offset: "100%", stopColor: color, stopOpacity: 0 })] }) }), jsx(CartesianGrid, { stroke: GRID_INK, vertical: false }), jsx(XAxis, { ...xAxisProps(xKey) }), jsx(YAxis, { ...yAxisProps({ yTickFormatter, yDomain, yTickCount, allowDecimals, yAxisWidth }) }), jsx(Tooltip, { content: tooltip, cursor: { stroke: color, strokeWidth: 1, strokeDasharray: '4 4', opacity: 0.55 }, wrapperStyle: { outline: 'none' } }), jsx(Area, { type: "monotone", dataKey: dataKey, stroke: color, strokeWidth: 2, fill: `url(#${gradientId})`, dot: false, activeDot: { r: 5, fill: '#ffffff', stroke: color, strokeWidth: 2.5 } })] }));
229715
229776
  }
229716
229777
  /** Magnitude per period: 4px-rounded bar tops anchored to the baseline. */
229717
- function AnalyticsBarChart({ data, xKey = 'date', dataKey = 'value', color = CHART_SINGLE_SERIES_COLOR, tooltipLabel, yTickFormatter, tooltipValue, tooltipAriaLabel, yDomain, yTickCount, allowDecimals, width, height, }) {
229778
+ function AnalyticsBarChart({ data, xKey = 'date', dataKey = 'value', color = CHART_SINGLE_SERIES_COLOR, tooltipLabel, yTickFormatter, tooltipValue, tooltipAriaLabel, yDomain, yTickCount, allowDecimals, yAxisWidth, width, height, }) {
229718
229779
  const tooltip = useChartTooltip({ dataKey, tooltipLabel, tooltipValue, tooltipAriaLabel });
229719
- return (jsxs(BarChart, { width: width, height: height, data: data, margin: { top: 12, right: 12, left: 0, bottom: 4 }, barCategoryGap: "28%", children: [jsx(CartesianGrid, { stroke: GRID_INK, vertical: false }), jsx(XAxis, { ...xAxisProps(xKey) }), jsx(YAxis, { ...yAxisProps({ yTickFormatter, yDomain, yTickCount, allowDecimals }) }), jsx(Tooltip, { content: tooltip, cursor: { fill: 'rgba(0, 0, 0, 0.04)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: dataKey, fill: color, radius: [4, 4, 0, 0], maxBarSize: 22 })] }));
229780
+ return (jsxs(BarChart, { width: width, height: height, data: data, margin: { top: 12, right: 12, left: 0, bottom: 4 }, barCategoryGap: "28%", children: [jsx(CartesianGrid, { stroke: GRID_INK, vertical: false }), jsx(XAxis, { ...xAxisProps(xKey) }), jsx(YAxis, { ...yAxisProps({ yTickFormatter, yDomain, yTickCount, allowDecimals, yAxisWidth }) }), jsx(Tooltip, { content: tooltip, cursor: { fill: 'rgba(0, 0, 0, 0.04)' }, wrapperStyle: { outline: 'none' } }), jsx(Bar, { dataKey: dataKey, fill: color, radius: [4, 4, 0, 0], maxBarSize: 22 })] }));
229720
229781
  }
229721
229782
  /**
229722
229783
  * Identity ranked by magnitude, as rows rather than a rotated bar chart:
@@ -229757,6 +229818,26 @@ const AGENTS_PAGE_SIZE = 20;
229757
229818
  const SEARCH_DEBOUNCE_MS$1 = 300;
229758
229819
  /** cmdk needs a non-empty value; the handler treats this one as "clear". */
229759
229820
  const ALL_AGENTS_VALUE = '__all_agents__';
229821
+ /**
229822
+ * The scope an agent-search result stands for, or `null` when the result has
229823
+ * no `unique_id` — that is what the analytics endpoints filter on, so a
229824
+ * selection without one would silently report on everything.
229825
+ *
229826
+ * Shared with {@link AnalyticsLayout}, which runs the same search to fill in
229827
+ * the `dbId` for a scope set by clicking an agent's name in a stats row.
229828
+ */
229829
+ function toScopedMentor(agent) {
229830
+ if (!agent.unique_id)
229831
+ return null;
229832
+ return {
229833
+ uniqueId: agent.unique_id,
229834
+ // Search returns the DB id as a number, but every consumer downstream
229835
+ // types it as a string.
229836
+ dbId: String(agent.id),
229837
+ name: agent.name,
229838
+ profileImage: agent.profile_image,
229839
+ };
229840
+ }
229760
229841
  function useDebouncedValue$1(value, delay) {
229761
229842
  const [debounced, setDebounced] = useState(value);
229762
229843
  useEffect(() => {
@@ -229787,10 +229868,9 @@ function AnalyticsAgentPicker({ tenantKey, value, onChange, className, }) {
229787
229868
  limit: AGENTS_PAGE_SIZE,
229788
229869
  skip: !open,
229789
229870
  });
229790
- const results = useMemo(
229791
- // `unique_id` is what the analytics endpoints filter on. A result without
229792
- // one would produce a selection that silently reports on everything.
229793
- () => agents.filter((agent) => !!agent.unique_id), [agents]);
229871
+ const results = useMemo(() => agents
229872
+ .map((agent) => ({ agent, scope: toScopedMentor(agent) }))
229873
+ .filter((entry) => Boolean(entry.scope)), [agents]);
229794
229874
  const handleSelect = (mentor) => {
229795
229875
  onChange(mentor);
229796
229876
  setOpen(false);
@@ -229806,19 +229886,15 @@ function AnalyticsAgentPicker({ tenantKey, value, onChange, className, }) {
229806
229886
  variant: "ghost", role: "combobox", "aria-expanded": open, "aria-label": t('analyticsAnalyticsAgentPicker.analyticsScope'), className: cn(
229807
229887
  // Capped so a long agent name ellipsizes instead of pushing the tab
229808
229888
  // strip along; the label below is what actually truncates.
229809
- 'h-9 max-w-[220px] justify-between bg-transparent pl-2 font-normal', className), children: [jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [value ? (jsxs(Avatar, { className: "h-5 w-5 shrink-0", children: [jsx(AvatarImage, { src: value.profileImage, alt: "" }), jsx(AvatarFallback, { className: "text-[10px]", children: value.name.charAt(0).toUpperCase() })] })) : (jsx(Globe, { className: "h-4 w-4 shrink-0 opacity-70", "aria-hidden": "true" })), jsx("span", { className: "min-w-0 truncate", children: value ? value.name : t('analyticsAnalyticsAgentPicker.allAgents') })] }), jsx(ChevronDown, { className: "h-4 w-4 shrink-0 opacity-50", "aria-hidden": "true" })] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-[280px] p-0", align: "start", children: jsxs(Command, { shouldFilter: false, children: [jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: t('analyticsAnalyticsAgentPicker.searchAgents') }), jsxs(CommandList, { children: [jsx(CommandGroup, { children: jsxs(CommandItem, { value: ALL_AGENTS_VALUE, onSelect: () => handleSelect(null), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value ? 'opacity-0' : 'opacity-100') }), jsx(Globe, { className: "mr-2 h-4 w-4 opacity-70", "aria-hidden": "true" }), t('analyticsAnalyticsAgentPicker.allAgents')] }) }), results.length > 0 && (jsx(CommandGroup, { heading: t('analyticsAnalyticsAgentPicker.agents'), children: results.map((agent) => {
229889
+ 'h-9 max-w-[220px] justify-between bg-transparent pl-2 font-normal', className), children: [jsxs("span", { className: "flex min-w-0 items-center gap-2", children: [value ? (jsxs(Avatar, { className: "h-5 w-5 shrink-0", children: [jsx(AvatarImage, { src: value.profileImage, alt: "" }), jsx(AvatarFallback, { className: "text-[10px]", children: value.name.charAt(0).toUpperCase() })] })) : (jsx(Globe, { className: "h-4 w-4 shrink-0 opacity-70", "aria-hidden": "true" })), jsx("span", { className: "min-w-0 truncate", children: value ? value.name : t('analyticsAnalyticsAgentPicker.allAgents') })] }), jsx(ChevronDown, { className: "h-4 w-4 shrink-0 opacity-50", "aria-hidden": "true" })] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-[280px] p-0", align: "start", children: jsxs(Command, { shouldFilter: false, children: [jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: t('analyticsAnalyticsAgentPicker.searchAgents') }), jsxs(CommandList, { children: [jsx(CommandGroup, { children: jsxs(CommandItem, { value: ALL_AGENTS_VALUE, onSelect: () => handleSelect(null), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value ? 'opacity-0' : 'opacity-100') }), jsx(Globe, { className: "mr-2 h-4 w-4 opacity-70", "aria-hidden": "true" }), t('analyticsAnalyticsAgentPicker.allAgents')] }) }), results.length > 0 && (jsx(CommandGroup, { heading: t('analyticsAnalyticsAgentPicker.agents'), children: results.map(({ agent, scope }) => {
229810
229890
  var _a;
229811
- const uniqueId = agent.unique_id;
229812
229891
  return (jsxs(CommandItem, {
229892
+ // A long name wraps rather than ellipsizing, so the whole
229893
+ // name is readable in a 280px popover; the check and
229894
+ // avatar stay on its first line.
229895
+ className: "items-start",
229813
229896
  // cmdk keys items by value; the search itself is server-side.
229814
- value: uniqueId, onSelect: () => handleSelect({
229815
- uniqueId,
229816
- // Search returns the DB id as a number, but every
229817
- // consumer downstream types it as a string.
229818
- dbId: String(agent.id),
229819
- name: agent.name,
229820
- profileImage: agent.profile_image,
229821
- }), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', (value === null || value === void 0 ? void 0 : value.uniqueId) === uniqueId ? 'opacity-100' : 'opacity-0') }), jsxs(Avatar, { className: "mr-2 h-5 w-5 shrink-0", children: [jsx(AvatarImage, { src: agent.profile_image, alt: "" }), jsx(AvatarFallback, { className: "text-[10px]", children: (_a = agent.name) === null || _a === void 0 ? void 0 : _a.charAt(0).toUpperCase() })] }), jsx("span", { className: "truncate", children: agent.name })] }, uniqueId));
229897
+ value: scope.uniqueId, onSelect: () => handleSelect(scope), children: [jsx(Check, { className: cn('mt-0.5 mr-2 h-4 w-4', (value === null || value === void 0 ? void 0 : value.uniqueId) === scope.uniqueId ? 'opacity-100' : 'opacity-0') }), jsxs(Avatar, { className: "mr-2 h-5 w-5 shrink-0", children: [jsx(AvatarImage, { src: agent.profile_image, alt: "" }), jsx(AvatarFallback, { className: "text-[10px]", children: (_a = agent.name) === null || _a === void 0 ? void 0 : _a.charAt(0).toUpperCase() })] }), jsx("span", { className: "min-w-0 flex-1 break-words whitespace-normal", children: agent.name })] }, scope.uniqueId));
229822
229898
  }) })), isFetching && results.length === 0 && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsAnalyticsAgentPicker.loading') })), !isFetching && results.length === 0 && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsAnalyticsAgentPicker.noAgentsFound') }))] })] }) })] }));
229823
229899
  }
229824
229900
 
@@ -229937,6 +230013,12 @@ const defaultTabs = [
229937
230013
  value: 'monetization',
229938
230014
  },*/
229939
230015
  ];
230016
+ /**
230017
+ * How many results the `dbId` lookup asks for. The query is the agent's own
230018
+ * `unique_id`, so the match is normally first; a handful of rows covers a
230019
+ * backend that treats the term as a loose text search.
230020
+ */
230021
+ const SCOPE_LOOKUP_LIMIT = 5;
229940
230022
  const className = 'inline-flex h-7 shrink-0 items-center justify-center whitespace-nowrap rounded-[5px] px-2 sm:px-2.5 py-0 text-sm text-gray-500 ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-blue-600 data-[state=active]:font-semibold font-medium data-[state=active]:bg-[#f5f7fb] data-[state=active]:shadow-none cursor-pointer';
229941
230023
  function AnalyticsLayout({ children, currentPath, basePath, onTabChange, tabs = defaultTabs, activeTabClassName = '', beforeDataReports, excludeTabs = [], showPicker = false, tenantKey, scopedMentor, onScopedMentorChange, }) {
229942
230024
  var _a, _b;
@@ -229950,17 +230032,59 @@ function AnalyticsLayout({ children, currentPath, basePath, onTabChange, tabs =
229950
230032
  const [internalScopedMentor, setInternalScopedMentor] = useState(null);
229951
230033
  const isScopeControlled = onScopedMentorChange !== undefined;
229952
230034
  const activeScopedMentor = (_a = (isScopeControlled ? scopedMentor : internalScopedMentor)) !== null && _a !== void 0 ? _a : null;
229953
- const handleScopedMentorChange = useCallback((mentor) => {
230035
+ const pickerTenantKey = (_b = tenantKey !== null && tenantKey !== void 0 ? tenantKey : currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.key) !== null && _b !== void 0 ? _b : '';
230036
+ const publishScopedMentor = useCallback((mentor) => {
229954
230037
  if (isScopeControlled) {
229955
230038
  onScopedMentorChange === null || onScopedMentorChange === void 0 ? void 0 : onScopedMentorChange(mentor);
229956
230039
  return;
229957
230040
  }
229958
230041
  setInternalScopedMentor(mentor);
229959
230042
  }, [isScopeControlled, onScopedMentorChange]);
230043
+ // A scope set by clicking an agent's name in a stats row carries the
230044
+ // `unique_id` alone — those payloads hold nothing else. Reports filters by
230045
+ // the database id, so publishing that straight through would leave the
230046
+ // Reports tab listing every report while the picker names one agent, and
230047
+ // would hand a controlling host a half-filled value to mirror. Resolve the
230048
+ // missing id first, through the same search the picker itself runs.
230049
+ const [pendingScopedMentor, setPendingScopedMentor] = useState(null);
230050
+ const { agents: scopeLookupResults, isFetching: isLookingUpScope, isUninitialized: isScopeLookupIdle, } = useAgentSearch({
230051
+ tenantKey: pickerTenantKey,
230052
+ query: pendingScopedMentor === null || pendingScopedMentor === void 0 ? void 0 : pendingScopedMentor.uniqueId,
230053
+ limit: SCOPE_LOOKUP_LIMIT,
230054
+ skip: !pendingScopedMentor,
230055
+ });
230056
+ useEffect(() => {
230057
+ if (!pendingScopedMentor || isLookingUpScope || isScopeLookupIdle)
230058
+ return;
230059
+ const match = scopeLookupResults.find((agent) => agent.unique_id === pendingScopedMentor.uniqueId);
230060
+ // A lookup that comes back empty still scopes the page: every stats tab
230061
+ // needs only the `unique_id`, and a click that did nothing at all would be
230062
+ // worse than a Reports tab that stays unfiltered.
230063
+ publishScopedMentor((match && toScopedMentor(match)) || pendingScopedMentor);
230064
+ setPendingScopedMentor(null);
230065
+ }, [
230066
+ pendingScopedMentor,
230067
+ isLookingUpScope,
230068
+ isScopeLookupIdle,
230069
+ scopeLookupResults,
230070
+ publishScopedMentor,
230071
+ ]);
230072
+ const handleScopedMentorChange = useCallback((mentor) => {
230073
+ if (mentor && !mentor.dbId) {
230074
+ setPendingScopedMentor(mentor);
230075
+ return;
230076
+ }
230077
+ setPendingScopedMentor(null);
230078
+ publishScopedMentor(mentor);
230079
+ }, [publishScopedMentor]);
229960
230080
  const scopeValue = useMemo(
229961
230081
  // Only a rendered picker may scope the page — otherwise a host that stops
229962
- // showing it would leave a stale agent filtering every chart.
229963
- () => ({ scopedMentor: showPicker ? activeScopedMentor : null }), [showPicker, activeScopedMentor]);
230082
+ // showing it would leave a stale agent filtering every chart, and an agent
230083
+ // name clicked in a table would re-scope with nothing on screen saying so.
230084
+ () => ({
230085
+ scopedMentor: showPicker ? activeScopedMentor : null,
230086
+ setScopedMentor: showPicker ? handleScopedMentorChange : undefined,
230087
+ }), [showPicker, activeScopedMentor, handleScopedMentorChange]);
229964
230088
  // Only a pure watcher narrows the tab strip — everyone else keeps whatever
229965
230089
  // the caller passed, custom tabs included.
229966
230090
  const isRestricted = isPureWatcher(rbacPermissions, currentTenant);
@@ -230035,7 +230159,7 @@ function AnalyticsLayout({ children, currentPath, basePath, onTabChange, tabs =
230035
230159
  .map((tab) => {
230036
230160
  const isActive = activeTab === tab.value;
230037
230161
  return (jsx(TabsTrigger, { value: tab.value, className: cn(className, isActive && activeTabClassName), onClick: () => handleTabClick(tab.value), children: tab.label }, tab.value));
230038
- }) }) }) }) }), jsx("div", { className: "flex w-full shrink-0 items-center justify-end gap-3 sm:w-auto", children: canAccessTab('reports') && (jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) })) })] }), jsxs(AnalyticsControlBar, { className: "mb-4 sm:mb-4", children: [showPicker && (jsx(AnalyticsAgentPicker, { tenantKey: (_b = tenantKey !== null && tenantKey !== void 0 ? tenantKey : currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.key) !== null && _b !== void 0 ? _b : '', value: activeScopedMentor, onChange: handleScopedMentorChange })), beforeDataReports] })] }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }) }) }));
230162
+ }) }) }) }) }), jsx("div", { className: "flex w-full shrink-0 items-center justify-end gap-3 sm:w-auto", children: canAccessTab('reports') && (jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) })) })] }), jsxs(AnalyticsControlBar, { className: "mb-4 sm:mb-4", children: [showPicker && (jsx(AnalyticsAgentPicker, { tenantKey: pickerTenantKey, value: activeScopedMentor, onChange: handleScopedMentorChange })), beforeDataReports] })] }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }) }) }));
230039
230163
  }
230040
230164
 
230041
230165
  const accessTimeData = [
@@ -230254,7 +230378,7 @@ const formatRelativeTime$1 = (dateString, t) => {
230254
230378
  return t('analyticsAnalyticsUsersStats.daysAgo', { count: diffInDays });
230255
230379
  return date.toLocaleDateString();
230256
230380
  };
230257
- function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupIds, }) {
230381
+ function AnalyticsUsersStats({ tenantKey, currentSPA, mentorId, selectedMentorId, usergroupIds, }) {
230258
230382
  var _a, _b, _c, _d, _e, _f, _g;
230259
230383
  const t = useT();
230260
230384
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
@@ -230262,7 +230386,7 @@ function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupI
230262
230386
  return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInNow'), value: (currentlyActiveUsers === null || currentlyActiveUsers === void 0 ? void 0 : currentlyActiveUsers.count) || 0, loading: isLoadingCurrentlyActiveUsers, description: t('analyticsAnalyticsUsersStats.usersLoggedInNowDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.usersLoggedInPast30Days'), value: (activeUsers30D === null || activeUsers30D === void 0 ? void 0 : activeUsers30D.count) || 0, loading: isLoadingActiveUsers30D, description: t('analyticsAnalyticsUsersStats.usersLoggedInPast30DaysDescription') }), jsx(StatCard, { title: t('analyticsAnalyticsUsersStats.totalRegisteredUsers'), value: (registeredUsers === null || registeredUsers === void 0 ? void 0 : registeredUsers.count) || 0, loading: isLoadingRegisteredUsers, description: t('analyticsAnalyticsUsersStats.totalRegisteredUsersDescription') })] }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.activeUsersTitle'), label: t('analyticsAnalyticsUsersStats.activeUsersLabel'), filters: activeUsersStatsDateFilter, setOutsideFilters: setActiveUsersStatsDateFilter, description: t('analyticsAnalyticsUsersStats.activeUsersChartDescription'), children: isLoadingActiveUsers ? (jsx(ChartLoading, {})) : ((_a = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _a === void 0 ? void 0 : _a.length) && ((_b = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsx(AnalyticsBarChart, { data: (_c = activeUsers === null || activeUsers === void 0 ? void 0 : activeUsers.points) === null || _c === void 0 ? void 0 : _c.map((point) => ({
230263
230387
  date: formatDateToShortFormat$2(point.date, activeUsersStatsDateFilter.activeFilter === 'today'),
230264
230388
  value: point.value,
230265
- })), tooltipLabel: t('analyticsAnalyticsUsersStats.activeUsersLabel'), tooltipAriaLabel: (label) => t('analyticsAnalyticsUsersStats.activeUsersAriaLabel', { label }) })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.accessTimesTitle'), label: t('analyticsAnalyticsUsersStats.accessTimesLabel'), filters: accessTimeHeatmapDateFilter, setOutsideFilters: setAccessTimeHeatmapDateFilter, description: t('analyticsAnalyticsUsersStats.accessTimesDescription'), children: jsx(AccessTimeHeatmap, { loading: isLoadingAccessTimeHeatmap, accessTimeData: accessTimeHeatmap }) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.userDetailsTitle'), label: t('analyticsAnalyticsUsersStats.userDetailsLabel'), filters: userDetailsStatsDateFilter, setOutsideFilters: setUserDetailsStatsDateFilter, overflowAuto: true, height: "450px", description: t('analyticsAnalyticsUsersStats.userDetailsDescription'), children: jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-user", type: "text", placeholder: t('analyticsAnalyticsUsersStats.searchPlaceholder'), value: userDetailsStatsSearch, onChange: handleSearchInputChange, required: true, className: `pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11` })] }), jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[200px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUsername') }), jsx(TableHead, { children: t('analyticsAnalyticsUsersStats.tableHeaderMessages') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsUsersStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_d = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _d === void 0 ? void 0 : _d.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: user.email || t('analyticsAnalyticsUsersStats.anonymous') }) }), jsx(TableCell, { children: user.full_name || '' }), jsx(TableCell, { children: user.messages }), jsx(TableCell, { className: "text-right", children: user.last_activity ? formatRelativeTime$1(user.last_activity, t) : '-' })] }, index))) })] }) }), isLoadingUserDetailsStats && (jsx("div", { className: "flex items-center justify-center py-4", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsUsersStats.loading') }) })), !isLoadingUserDetailsStats &&
230389
+ })), tooltipLabel: t('analyticsAnalyticsUsersStats.activeUsersLabel'), tooltipAriaLabel: (label) => t('analyticsAnalyticsUsersStats.activeUsersAriaLabel', { label }) })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.accessTimesTitle'), label: t('analyticsAnalyticsUsersStats.accessTimesLabel'), filters: accessTimeHeatmapDateFilter, setOutsideFilters: setAccessTimeHeatmapDateFilter, description: t('analyticsAnalyticsUsersStats.accessTimesDescription'), children: jsx(AccessTimeHeatmap, { loading: isLoadingAccessTimeHeatmap, accessTimeData: accessTimeHeatmap }) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsUsersStats.userDetailsTitle'), label: t('analyticsAnalyticsUsersStats.userDetailsLabel'), filters: userDetailsStatsDateFilter, setOutsideFilters: setUserDetailsStatsDateFilter, overflowAuto: true, height: "450px", description: t('analyticsAnalyticsUsersStats.userDetailsDescription'), children: jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-user", type: "text", placeholder: t('analyticsAnalyticsUsersStats.searchPlaceholder'), value: userDetailsStatsSearch, onChange: handleSearchInputChange, required: true, className: `pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11` })] }), jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[200px]", children: t('analyticsAnalyticsUsersStats.tableHeaderUsername') }), jsx(TableHead, { children: t('analyticsAnalyticsUsersStats.tableHeaderMessages') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsUsersStats.tableHeaderLastActive') })] }) }), jsx(TableBody, { children: (_d = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _d === void 0 ? void 0 : _d.map((user, index) => (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: user.email ? (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: user.username, display: user.email })) : (t('analyticsAnalyticsUsersStats.anonymous')) }) }), jsx(TableCell, { children: user.full_name ? (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: user.username, display: user.full_name })) : null }), jsx(TableCell, { children: user.messages }), jsx(TableCell, { className: "text-right", children: user.last_activity ? formatRelativeTime$1(user.last_activity, t) : '-' })] }, index))) })] }) }), isLoadingUserDetailsStats && (jsx("div", { className: "flex items-center justify-center py-4", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsUsersStats.loading') }) })), !isLoadingUserDetailsStats &&
230266
230390
  (!((_e = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _e === void 0 ? void 0 : _e.length) || ((_f = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _f === void 0 ? void 0 : _f.length) === 0) && (jsx(EmptyStats, {})), (userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.pagination) && ((_g = userDetailsStats === null || userDetailsStats === void 0 ? void 0 : userDetailsStats.results) === null || _g === void 0 ? void 0 : _g.length) > 0 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setUserDetailsStatsPage(1), disabled: !userDetailsStats.pagination.has_previous, children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsUsersStats.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setUserDetailsStatsPage(userDetailsStats.pagination.page - 1), disabled: !userDetailsStats.pagination.has_previous, children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsUsersStats.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: userDetailsStats.pagination.total_pages }, (_, i) => i + 1)
230267
230391
  .filter((page) => {
230268
230392
  const current = userDetailsStats.pagination.page;
@@ -230744,6 +230868,15 @@ const SELF_VALUE = '__self__';
230744
230868
  * whose memories would then come back 403.
230745
230869
  */
230746
230870
  const MEMORY_LIST_ACTION = 'Ibl.Mentor/Memory/list';
230871
+ /** Most recognizable label first: full name, then email, then username. */
230872
+ const primaryLabel = (user) => { var _a, _b; return ((_a = user.name) === null || _a === void 0 ? void 0 : _a.trim()) || ((_b = user.email) === null || _b === void 0 ? void 0 : _b.trim()) || user.username; };
230873
+ /** The next identifier down, so two users sharing a name stay distinguishable. */
230874
+ const secondaryLabel = (user) => {
230875
+ var _a, _b, _c;
230876
+ if ((_a = user.name) === null || _a === void 0 ? void 0 : _a.trim())
230877
+ return ((_b = user.email) === null || _b === void 0 ? void 0 : _b.trim()) || user.username;
230878
+ return ((_c = user.email) === null || _c === void 0 ? void 0 : _c.trim()) ? user.username : '';
230879
+ };
230747
230880
  function useDebouncedValue(value, delay) {
230748
230881
  const [debounced, setDebounced] = useState(value);
230749
230882
  useEffect(() => {
@@ -230769,13 +230902,16 @@ function UserFilterSelect({ tenantKey, currentUsername, value, onChange, showSel
230769
230902
  const t = useT();
230770
230903
  const [open, setOpen] = useState(false);
230771
230904
  const [search, setSearch] = useState('');
230905
+ // The filter value is only a username, so the picked row is kept to label
230906
+ // the trigger with its name or email.
230907
+ const [selectedUser, setSelectedUser] = useState(null);
230772
230908
  const debouncedSearch = useDebouncedValue(search, SEARCH_DEBOUNCE_MS);
230773
230909
  const { currentTenant } = useCurrentTenant();
230774
230910
  const rbacPermissions = useSelector(selectRbacPermissions);
230775
230911
  const isWatcher = isPureWatcher(rbacPermissions, currentTenant);
230776
- // Only fetched once the dropdown is open — the trigger shows the selected
230777
- // username, which is the filter value itself, so nothing needs looking up
230778
- // first.
230912
+ // Only fetched once the dropdown is open — the trigger labels the selection
230913
+ // from the row that was picked, falling back to the username value itself,
230914
+ // so nothing needs looking up first.
230779
230915
  const { data, isFetching: isFetchingPlatformUsers } = usePlatformUsersQuery({
230780
230916
  platform_key: tenantKey,
230781
230917
  platform_org: tenantKey,
@@ -230832,16 +230968,22 @@ function UserFilterSelect({ tenantKey, currentUsername, value, onChange, showSel
230832
230968
  // them at the top of the list.
230833
230969
  (user) => !!user.username && !(showSelfOption && user.username === currentUsername));
230834
230970
  }, [isWatcher, accessibleUsers, data, currentUsername, showSelfOption]);
230835
- const handleSelect = (username) => {
230836
- onChange(username);
230971
+ const handleSelect = (user) => {
230972
+ var _a;
230973
+ setSelectedUser(user);
230974
+ onChange((_a = user === null || user === void 0 ? void 0 : user.username) !== null && _a !== void 0 ? _a : '');
230837
230975
  setOpen(false);
230838
230976
  };
230839
- return (jsxs(Popover, { open: open, onOpenChange: setOpen, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": open, "aria-label": t('analyticsUserFilterSelect.filterByUser'), className: cn('h-9 w-full justify-between bg-white font-normal', className), children: [jsx("span", { className: "truncate", children: value ||
230977
+ // A value set from outside (e.g. the Cost table's "View traces" hand-off)
230978
+ // has no picked row; it resolves once the list holds it, else stays a username.
230979
+ const selectedLabelUser = (selectedUser === null || selectedUser === void 0 ? void 0 : selectedUser.username) === value ? selectedUser : users.find((user) => user.username === value);
230980
+ const triggerLabel = value ? (selectedLabelUser ? primaryLabel(selectedLabelUser) : value) : '';
230981
+ return (jsxs(Popover, { open: open, onOpenChange: setOpen, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", role: "combobox", "aria-expanded": open, "aria-label": t('analyticsUserFilterSelect.filterByUser'), className: cn('h-9 w-full justify-between bg-white font-normal', className), children: [jsx("span", { className: "truncate", children: triggerLabel ||
230840
230982
  t(showSelfOption
230841
230983
  ? 'analyticsUserFilterSelect.you'
230842
- : 'analyticsUserFilterSelect.allUsers') }), jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-[280px] p-0", align: "start", children: jsxs(Command, { shouldFilter: false, children: [jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: t('analyticsUserFilterSelect.searchPlaceholder') }), jsxs(CommandList, { children: [jsxs(CommandGroup, { children: [showSelfOption && (jsxs(CommandItem, { value: SELF_VALUE, onSelect: () => handleSelect(''), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value ? 'opacity-0' : 'opacity-100') }), t('analyticsUserFilterSelect.you')] })), users.map((user) => (jsxs(CommandItem, {
230984
+ : 'analyticsUserFilterSelect.allUsers') }), jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-[280px] p-0", align: "start", children: jsxs(Command, { shouldFilter: false, children: [jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: t('analyticsUserFilterSelect.searchPlaceholder') }), jsxs(CommandList, { children: [jsxs(CommandGroup, { children: [showSelfOption && (jsxs(CommandItem, { value: SELF_VALUE, onSelect: () => handleSelect(null), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value ? 'opacity-0' : 'opacity-100') }), t('analyticsUserFilterSelect.you')] })), users.map((user) => (jsxs(CommandItem, {
230843
230985
  // cmdk keys items by value; the search itself is server-side.
230844
- value: user.username, onSelect: () => handleSelect(user.username), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value === user.username ? 'opacity-100' : 'opacity-0') }), jsxs("div", { className: "flex min-w-0 flex-col", children: [jsx("span", { className: "truncate font-medium", children: user.name || user.username }), jsx("span", { className: "truncate text-xs text-gray-500", children: user.email || user.username })] })] }, user.key)))] }), isFetching && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsUserFilterSelect.loadingUsers') })), !isFetching && users.length === 0 && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsUserFilterSelect.noUsersFound') }))] })] }) })] }));
230986
+ value: user.username, onSelect: () => handleSelect(user), children: [jsx(Check, { className: cn('mr-2 h-4 w-4', value === user.username ? 'opacity-100' : 'opacity-0') }), jsxs("div", { className: "flex min-w-0 flex-col", children: [jsx("span", { className: "truncate font-medium", children: primaryLabel(user) }), secondaryLabel(user) && (jsx("span", { className: "truncate text-xs text-gray-500", children: secondaryLabel(user) }))] })] }, user.key)))] }), isFetching && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsUserFilterSelect.loadingUsers') })), !isFetching && users.length === 0 && (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-500", children: t('analyticsUserFilterSelect.noUsersFound') }))] })] }) })] }));
230845
230987
  }
230846
230988
 
230847
230989
  const CELL$1 = 'p-3 text-[#646464]';
@@ -230887,7 +231029,7 @@ function ObservationRow({ observation, traceStart, traceDuration, }) {
230887
231029
  background: colorForSeries(observation.name || observation.type || ''),
230888
231030
  } }) }), jsx("div", { className: "w-[52px] shrink-0 text-right text-xs text-[#646464] tabular-nums", children: seconds !== undefined ? `${seconds.toFixed(2)}s` : '—' }), jsx("div", { className: "w-[58px] shrink-0 text-right text-xs text-[#646464] tabular-nums", children: tokens !== undefined ? tokens.toLocaleString() : '—' }), jsx("div", { className: "w-[64px] shrink-0 text-right text-xs font-semibold text-[#484848] tabular-nums", children: formatCost(cost) })] }));
230889
231031
  }
230890
- function TraceDetail({ trace, observations, isLoadingObservations, onClose, onOpenTranscript, }) {
231032
+ function TraceDetail({ tenantKey, currentSPA, trace, observations, isLoadingObservations, onClose, onOpenTranscript, }) {
230891
231033
  var _a;
230892
231034
  const t = useT();
230893
231035
  const { traceStart, traceDuration } = useMemo(() => {
@@ -230903,7 +231045,12 @@ function TraceDetail({ trace, observations, isLoadingObservations, onClose, onOp
230903
231045
  }, [observations]);
230904
231046
  const totalCost = (_a = trace.totalCost) !== null && _a !== void 0 ? _a : observations.reduce((sum, o) => { var _a, _b; return sum + ((_b = (_a = o.calculatedTotalCost) !== null && _a !== void 0 ? _a : o.totalCost) !== null && _b !== void 0 ? _b : 0); }, 0);
230905
231047
  const meta = [
230906
- [t('analyticsTraces.detailUser'), trace.userId || '—'],
231048
+ [
231049
+ t('analyticsTraces.detailUser'),
231050
+ trace.userId ? (
231051
+ // Langfuse's userId is the platform username the traces filter sends.
231052
+ jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: trace.userId, display: trace.userId })) : ('—'),
231053
+ ],
230907
231054
  [t('analyticsTraces.detailSession'), trace.sessionId || '—'],
230908
231055
  [t('analyticsTraces.detailEnvironment'), trace.environment || '—'],
230909
231056
  [t('analyticsTraces.detailStarted'), formatTime(trace.timestamp)],
@@ -230915,7 +231062,7 @@ function TraceDetail({ trace, observations, isLoadingObservations, onClose, onOp
230915
231062
  * observations as a waterfall. Ranked totals stay on the Spend sub-tab; this
230916
231063
  * surface answers "what actually happened on that call".
230917
231064
  */
230918
- function AnalyticsTraces({ tenantKey, mentorId, filters, onOpenTranscript, initialUsername, }) {
231065
+ function AnalyticsTraces({ tenantKey, currentSPA, mentorId, filters, onOpenTranscript, initialUsername, }) {
230919
231066
  var _a;
230920
231067
  const t = useT();
230921
231068
  const { traces, meta, isLoadingTraces, isTracesUnavailable, isForbidden, page, setPage, username, traceName, setFilter, selectedTraceId, setSelectedTraceId, selectedTrace, observations, isLoadingObservations, } = useLlmTraces({
@@ -230939,7 +231086,7 @@ function AnalyticsTraces({ tenantKey, mentorId, filters, onOpenTranscript, initi
230939
231086
  count: meta.totalItems.toLocaleString(),
230940
231087
  }) }))] }), isLoadingTraces ? (jsx("div", { className: "flex w-full items-center justify-center py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : traces.length === 0 ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsTraces.noTraces') }) })) : (jsx("div", { className: "overflow-x-auto", children: jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: HEAD$1, children: t('analyticsTraces.colStarted') }), jsx(TableHead, { className: HEAD$1, children: t('analyticsTraces.colService') }), jsx(TableHead, { className: HEAD$1, children: t('analyticsTraces.colUser') }), jsx(TableHead, { className: cn(HEAD$1, 'text-right'), children: t('analyticsTraces.colLatency') }), jsx(TableHead, { className: cn(HEAD$1, 'text-right'), children: t('analyticsTraces.colCost') }), jsx(TableHead, { className: "w-[36px] p-3" })] }) }), jsx(TableBody, { children: traces.map((trace) => {
230941
231088
  const selected = trace.id === selectedTraceId;
230942
- return (jsxs(TableRow, { "aria-selected": selected, className: cn('cursor-pointer border-b border-[oklch(0.922_0_0)] last:border-0', selected ? 'bg-blue-50' : 'hover:bg-gray-50'), onClick: () => setSelectedTraceId(selected ? '' : trace.id), children: [jsx(TableCell, { className: cn(CELL$1, 'whitespace-nowrap tabular-nums'), children: formatTime(trace.timestamp) }), jsx(TableCell, { className: CELL$1, children: jsx(ServiceTag, { name: trace.name || '—' }) }), jsx(TableCell, { className: cn(CELL$1, 'max-w-[180px] truncate', selected && 'font-medium text-[#484848]'), children: trace.userId || t('analyticsTraces.anonymous') }), jsx(TableCell, { className: cn(CELL$1, 'text-right tabular-nums'), children: trace.latency !== undefined
231089
+ return (jsxs(TableRow, { "aria-selected": selected, className: cn('cursor-pointer border-b border-[oklch(0.922_0_0)] last:border-0', selected ? 'bg-blue-50' : 'hover:bg-gray-50'), onClick: () => setSelectedTraceId(selected ? '' : trace.id), children: [jsx(TableCell, { className: cn(CELL$1, 'whitespace-nowrap tabular-nums'), children: formatTime(trace.timestamp) }), jsx(TableCell, { className: CELL$1, children: jsx(ServiceTag, { name: trace.name || '—' }) }), jsx(TableCell, { className: cn(CELL$1, 'max-w-[180px] truncate', selected && 'font-medium text-[#484848]'), children: trace.userId ? (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: trace.userId, display: trace.userId })) : (t('analyticsTraces.anonymous')) }), jsx(TableCell, { className: cn(CELL$1, 'text-right tabular-nums'), children: trace.latency !== undefined
230943
231090
  ? `${Number(trace.latency).toFixed(2)}s`
230944
231091
  : '—' }), jsx(TableCell, { className: cn(CELL$1, 'text-right font-semibold text-[#484848] tabular-nums'), children: formatCost(trace.totalCost) }), jsx(TableCell, { className: "p-3 text-right text-gray-400", children: jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": "true" }) })] }, trace.id));
230945
231092
  }) })] }) })), totalPages > 1 && (jsxs("div", { className: "flex items-center justify-between border-t border-[oklch(0.922_0_0)] px-4 py-3", children: [jsx("span", { className: "text-[13px] text-[#898989] tabular-nums", children: t('analyticsTraces.pageOf', { page, totalPages }) }), jsxs("div", { className: "flex items-center gap-1.5", children: [jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-0", disabled: page <= 1, "aria-label": t('analyticsTraces.previousPage'), onClick: () => {
@@ -230948,13 +231095,27 @@ function AnalyticsTraces({ tenantKey, mentorId, filters, onOpenTranscript, initi
230948
231095
  }, children: jsx(ChevronLeft, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-0", disabled: page >= totalPages, "aria-label": t('analyticsTraces.nextPage'), onClick: () => {
230949
231096
  setSelectedTraceId('');
230950
231097
  setPage(page + 1);
230951
- }, children: jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": "true" }) })] })] }))] }), selectedTraceId && selectedTrace && (jsx(TraceDetail, { trace: selectedTrace, observations: observations, isLoadingObservations: isLoadingObservations, onClose: () => setSelectedTraceId(''), onOpenTranscript: onOpenTranscript }))] }), mentorId && (jsx(AnalyticsNotice, { tone: "gray", title: t('analyticsTraces.mentorScopeTitle'), children: t('analyticsTraces.mentorScopeBody') }))] }));
231098
+ }, children: jsx(ChevronRight, { className: "h-4 w-4", "aria-hidden": "true" }) })] })] }))] }), selectedTraceId && selectedTrace && (jsx(TraceDetail, { tenantKey: tenantKey, currentSPA: currentSPA, trace: selectedTrace, observations: observations, isLoadingObservations: isLoadingObservations, onClose: () => setSelectedTraceId(''), onOpenTranscript: onOpenTranscript }))] }), mentorId && (jsx(AnalyticsNotice, { tone: "gray", title: t('analyticsTraces.mentorScopeTitle'), children: t('analyticsTraces.mentorScopeBody') }))] }));
230952
231099
  }
230953
231100
 
230954
231101
  /** An unreachable cost store must never render as $0.00 — it renders as this. */
230955
231102
  const COST_UNAVAILABLE = '\u2014';
230956
231103
  const hasCostValue = (value, isError) => !isError && value !== undefined && value !== null;
230957
231104
  const costValue = (value, isError) => hasCostValue(value, isError) ? Number(value).toFixed(2) : COST_UNAVAILABLE;
231105
+ /**
231106
+ * A dollar amount as a y-axis tick. Ticks land on round numbers, so trailing
231107
+ * zeros only widen the labels ("$12.000" overflowed the axis) — but a tenant
231108
+ * whose whole range sits below a hundredth of a cent would get a column of
231109
+ * identical "$0"s at fixed precision, so amounts under that keep two
231110
+ * significant digits instead.
231111
+ */
231112
+ const costTick = (value) => {
231113
+ if (value === 0)
231114
+ return '0';
231115
+ if (Math.abs(value) >= 0.0001)
231116
+ return String(parseFloat(value.toFixed(4)));
231117
+ return String(Number(value.toPrecision(2)));
231118
+ };
230958
231119
  /**
230959
231120
  * The spend side of the unified cost surface: billing totals, ranked per-user
230960
231121
  * history, provider and model breakdowns — all from the ClickHouse
@@ -230962,7 +231123,7 @@ const costValue = (value, isError) => hasCostValue(value, isError) ? Number(valu
230962
231123
  * family is deprecated), with the daily spend series from Langfuse, the only
230963
231124
  * backend with a bucketed cost series.
230964
231125
  */
230965
- function SpendTab({ tenantKey, mentorId: currentMentorId, userId, onOpenUserTraces, }) {
231126
+ function SpendTab({ tenantKey, currentSPA, mentorId: currentMentorId, userId, onOpenUserTraces, }) {
230966
231127
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
230967
231128
  const t = useT();
230968
231129
  const { weeklyCostData, isLoadingWeeklyCostData, isErrorWeeklyCostData, monthlyCostData, isLoadingMonthlyCostData, isErrorMonthlyCostData, totalCostData, isLoadingTotalCostData, isErrorTotalCostData, detailedCostPerDayData, isLoadingDetailedCostPerDayData, detailedCostPerDayFilters, setDetailedCostPerDayFilters, detailedCostPerProviderData, isLoadingDetailedCostPerProviderData, detailedCostPerProviderFilters, setDetailedCostPerProviderFilters, detailedCostPerUserData, isLoadingDetailedCostPerUserData, detailedCostPerUserFilters, setDetailedCostPerUserFilters, costPerUserPage, setCostPerUserPage, costPerUserLimit, providerColors, detailedLLMCostData, isLoadingDetailedLLMCostData, detailedLLMCostFilters, setDetailedLLMCostFilters, } = useFinancial({ tenantKey, mentorId: currentMentorId, userId });
@@ -231034,7 +231195,7 @@ function SpendTab({ tenantKey, mentorId: currentMentorId, userId, onOpenUserTrac
231034
231195
  ((_e = detailedCostPerDayData === null || detailedCostPerDayData === void 0 ? void 0 : detailedCostPerDayData.overtime) === null || _e === void 0 ? void 0 : _e.length) > 0 ? (jsx(AnalyticsBarChart, { data: detailedCostPerDayData.overtime.map((item) => ({
231035
231196
  date: formatDateToShortFormat$2(item.date, detailedCostPerDayFilters.activeFilter === 'today'),
231036
231197
  value: item.value,
231037
- })), tooltipLabel: t('analyticsAnalyticsFinancialStats.costPerDayLabel'), tooltipValue: (point) => `$${(Number(point.value) || 0).toFixed(3)}`, tooltipAriaLabel: (label) => t('analyticsAnalyticsFinancialStats.costDetailsAriaLabel', { label }), yTickFormatter: (value) => `$${value.toFixed(3)}`, allowDecimals: true })) : (jsx(EmptyStats, {})) }) }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByProviderTitle'), source: "clickhouse", label: t('analyticsAnalyticsFinancialStats.costByProviderLabel'), filters: detailedCostPerProviderFilters, setOutsideFilters: setDetailedCostPerProviderFilters, description: t('analyticsAnalyticsFinancialStats.costByProviderDescription'), children: isLoadingDetailedCostPerProviderData ? (jsx(ChartLoading, {})) : ((_f = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _f === void 0 ? void 0 : _f.length) &&
231198
+ })), tooltipLabel: t('analyticsAnalyticsFinancialStats.costPerDayLabel'), tooltipValue: (point) => `$${(Number(point.value) || 0).toFixed(3)}`, tooltipAriaLabel: (label) => t('analyticsAnalyticsFinancialStats.costDetailsAriaLabel', { label }), yTickFormatter: (value) => `$${costTick(value)}`, yAxisWidth: 60, allowDecimals: true })) : (jsx(EmptyStats, {})) }) }), jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-5", children: [jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByProviderTitle'), source: "clickhouse", label: t('analyticsAnalyticsFinancialStats.costByProviderLabel'), filters: detailedCostPerProviderFilters, setOutsideFilters: setDetailedCostPerProviderFilters, description: t('analyticsAnalyticsFinancialStats.costByProviderDescription'), children: isLoadingDetailedCostPerProviderData ? (jsx(ChartLoading, {})) : ((_f = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _f === void 0 ? void 0 : _f.length) &&
231038
231199
  ((_g = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _g === void 0 ? void 0 : _g.length) > 0 ? (jsxs(PieChart, { children: [jsx(Pie, { data: (_h = detailedCostPerProviderData === null || detailedCostPerProviderData === void 0 ? void 0 : detailedCostPerProviderData.rows) === null || _h === void 0 ? void 0 : _h.map((item) => ({
231039
231200
  name: item.provider,
231040
231201
  value: item.total_cost,
@@ -231048,7 +231209,7 @@ function SpendTab({ tenantKey, mentorId: currentMentorId, userId, onOpenUserTrac
231048
231209
  const data = (_a = payload[0]) === null || _a === void 0 ? void 0 : _a.payload;
231049
231210
  return (jsxs("div", { className: "bg-background border border-border rounded-md p-3 shadow-lg z-[99999999]", style: { borderColor: 'oklch(.922 0 0)' }, role: "tooltip", "aria-label": t('analyticsAnalyticsFinancialStats.providerCostDetailsAriaLabel', {
231050
231211
  label,
231051
- }), tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsxs("span", { className: "text-muted-foreground", children: [data === null || data === void 0 ? void 0 : data.name, ":"] }), jsxs("span", { className: "font-medium text-foreground", children: ["$", (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toFixed(2)] })] }) })] }));
231212
+ }), tabIndex: -1, children: [jsx("div", { className: "font-medium text-foreground mb-2 text-base", children: label }), jsx("div", { className: "space-y-2 text-sm", children: jsxs("div", { className: "flex justify-between items-center", children: [jsxs("span", { className: "text-muted-foreground", children: [data === null || data === void 0 ? void 0 : data.name, ": "] }), jsxs("span", { className: "font-medium text-foreground", children: ["$", (_b = data === null || data === void 0 ? void 0 : data.value) === null || _b === void 0 ? void 0 : _b.toFixed(2)] })] }) })] }));
231052
231213
  }, wrapperStyle: { outline: 'none' } })] })) : (jsx(EmptyStats, {})) }), jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costByLLMTitle'), source: "clickhouse", label: t('analyticsAnalyticsFinancialStats.costByLLMLabel'), filters: detailedLLMCostFilters, setOutsideFilters: setDetailedLLMCostFilters, description: t('analyticsAnalyticsFinancialStats.costByLLMDescription'), overflowAuto: true, children: isLoadingDetailedLLMCostData ? (jsx(ChartLoading, {})) : ((_k = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _k === void 0 ? void 0 : _k.length) && ((_l = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _l === void 0 ? void 0 : _l.length) > 0 ? (jsx(RankedBars, { items: [...((_m = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) !== null && _m !== void 0 ? _m : [])]
231053
231214
  .sort((a, b) => Number(b.total_cost) - Number(a.total_cost))
231054
231215
  .map((item, index) => ({
@@ -231059,9 +231220,7 @@ function SpendTab({ tenantKey, mentorId: currentMentorId, userId, onOpenUserTrac
231059
231220
  shown: (_p = (_o = detailedLLMCostData === null || detailedLLMCostData === void 0 ? void 0 : detailedLLMCostData.rows) === null || _o === void 0 ? void 0 : _o.length) !== null && _p !== void 0 ? _p : 0,
231060
231221
  }) })) : (jsx(EmptyStats, {})) })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsFinancialStats.costPerUserTitle'), source: "clickhouse", label: t('analyticsAnalyticsFinancialStats.costPerUserLabel'), filters: detailedCostPerUserFilters, setOutsideFilters: setDetailedCostPerUserFilters, overflowAuto: true, height: "450px", description: t('analyticsAnalyticsFinancialStats.costPerUserDescription'), children: jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "rounded-md", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "w-[250px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderUserEmail') }), jsx(TableHead, { className: "w-[120px]", children: t('analyticsAnalyticsFinancialStats.tableHeaderTotalCost') }), hasSessions && (jsx(TableHead, { children: t('analyticsAnalyticsFinancialStats.tableHeaderSessions') })), hasLastActive && (jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsFinancialStats.tableHeaderLastActive') })), onOpenUserTraces && jsx(TableHead, { className: "w-[90px]" })] }) }), jsx(TableBody, { children: (_q = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _q === void 0 ? void 0 : _q.map((user, index) => {
231061
231222
  var _a;
231062
- return (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: (user === null || user === void 0 ? void 0 : user.email) ||
231063
- (user === null || user === void 0 ? void 0 : user.username) ||
231064
- t('analyticsAnalyticsFinancialStats.anonymous') }) }), jsxs(TableCell, { className: "font-medium", children: ["$", Number(user.total_cost || 0).toFixed(2)] }), hasSessions && jsx(TableCell, { children: (_a = user.sessions) !== null && _a !== void 0 ? _a : '\u2014' }), hasLastActive && (jsx(TableCell, { className: "text-right", children: user.last_active ? formatRelativeTime$2(user.last_active) : '-' })), onOpenUserTraces && (jsx(TableCell, { className: "text-right", children: (user === null || user === void 0 ? void 0 : user.username) || (user === null || user === void 0 ? void 0 : user.email) ? (jsx("button", { type: "button", className: "cursor-pointer text-sm font-semibold text-blue-600 hover:text-blue-700 hover:underline", onClick: () => onOpenUserTraces(String(user.username || user.email)), children: t('analyticsAnalyticsFinancialStats.viewTraces') })) : null }))] }, index));
231223
+ return (jsxs(TableRow, { className: cn(index % 2 === 0 ? 'bg-gray-50' : '', 'h-[48px]'), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("div", { className: "flex items-center", children: (user === null || user === void 0 ? void 0 : user.email) || (user === null || user === void 0 ? void 0 : user.username) ? (jsx(UserProfileLink, { tenantKey: tenantKey, currentSPA: currentSPA, username: user.username, display: String(user.email || user.username) })) : (t('analyticsAnalyticsFinancialStats.anonymous')) }) }), jsxs(TableCell, { className: "font-medium", children: ["$", Number(user.total_cost || 0).toFixed(2)] }), hasSessions && jsx(TableCell, { children: (_a = user.sessions) !== null && _a !== void 0 ? _a : '\u2014' }), hasLastActive && (jsx(TableCell, { className: "text-right", children: user.last_active ? formatRelativeTime$2(user.last_active) : '-' })), onOpenUserTraces && (jsx(TableCell, { className: "text-right", children: (user === null || user === void 0 ? void 0 : user.username) || (user === null || user === void 0 ? void 0 : user.email) ? (jsx("button", { type: "button", className: "cursor-pointer text-sm font-semibold text-blue-600 hover:text-blue-700 hover:underline", onClick: () => onOpenUserTraces(String(user.username || user.email)), children: t('analyticsAnalyticsFinancialStats.viewTraces') })) : null }))] }, index));
231065
231224
  }) })] }) }), isLoadingDetailedCostPerUserData && (jsx("div", { className: "h-[60px]", children: jsx(ChartLoading, {}) })), !isLoadingDetailedCostPerUserData &&
231066
231225
  (!((_r = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _r === void 0 ? void 0 : _r.length) ||
231067
231226
  ((_s = detailedCostPerUserData === null || detailedCostPerUserData === void 0 ? void 0 : detailedCostPerUserData.rows) === null || _s === void 0 ? void 0 : _s.length) === 0) && (jsx("div", { className: "h-[60px]", children: jsx(EmptyStats, {}) })), detailedCostPerUserData && detailedCostPerUserData.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-between py-3", children: [jsx("div", { className: "text-sm text-gray-700", children: t('analyticsAnalyticsFinancialStats.paginationShowing', {
@@ -231077,7 +231236,7 @@ function SpendTab({ tenantKey, mentorId: currentMentorId, userId, onOpenUserTrac
231077
231236
  * (tokens, latency percentiles, per-call drill-down). Every card names its
231078
231237
  * source so a number is never read against the wrong question.
231079
231238
  */
231080
- function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, userId, onOpenTranscript, }) {
231239
+ function AnalyticsFinancialStats({ tenantKey, currentSPA, mentorId, selectedMentorId, userId, onOpenTranscript, }) {
231081
231240
  var _a, _b;
231082
231241
  const t = useT();
231083
231242
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
@@ -231106,9 +231265,9 @@ function AnalyticsFinancialStats({ tenantKey, mentorId, selectedMentorId, userId
231106
231265
  }, className: cn('relative h-[38px] cursor-pointer whitespace-nowrap px-px text-sm transition-colors', active
231107
231266
  ? 'font-semibold text-[#484848]'
231108
231267
  : 'font-medium text-gray-500 hover:text-gray-700'), children: [tab.label, active && (jsx("span", { className: "absolute inset-x-0 -bottom-px h-0.5 rounded-sm bg-blue-600" }))] }, tab.value));
231109
- }) }), subTab === 'spend' && (jsx(SpendTab, { tenantKey: tenantKey, mentorId: currentMentorId, userId: currentUserId, onOpenUserTraces: openUserTraces })), subTab === 'usage' && (jsx(AnalyticsLlmUsageStats, { tenantKey: tenantKey, mentorId: currentMentorId, filters: llmFilters })), subTab === 'traces' && (jsx(AnalyticsTraces
231268
+ }) }), subTab === 'spend' && (jsx(SpendTab, { tenantKey: tenantKey, currentSPA: currentSPA, mentorId: currentMentorId, userId: currentUserId, onOpenUserTraces: openUserTraces })), subTab === 'usage' && (jsx(AnalyticsLlmUsageStats, { tenantKey: tenantKey, mentorId: currentMentorId, filters: llmFilters })), subTab === 'traces' && (jsx(AnalyticsTraces
231110
231269
  // Remount when the hand-off user changes so the seeded filter takes.
231111
- , { tenantKey: tenantKey, mentorId: currentMentorId, filters: llmFilters, onOpenTranscript: onOpenTranscript, initialUsername: tracesUsername || undefined }, tracesUsername || 'all'))] }));
231270
+ , { tenantKey: tenantKey, currentSPA: currentSPA, mentorId: currentMentorId, filters: llmFilters, onOpenTranscript: onOpenTranscript, initialUsername: tracesUsername || undefined }, tracesUsername || 'all'))] }));
231112
231271
  }
231113
231272
 
231114
231273
  const useTranscripts = ({ tenantKey, mentorId, usergroupIds, }) => {
@@ -231186,6 +231345,37 @@ const useTranscripts = ({ tenantKey, mentorId, usergroupIds, }) => {
231186
231345
  };
231187
231346
  };
231188
231347
 
231348
+ /**
231349
+ * An agent named in a stats row, clickable to re-scope the whole analytics
231350
+ * page to that agent — the same thing the control bar's picker does, reached
231351
+ * from the data instead of from a search box.
231352
+ *
231353
+ * It renders as plain text wherever re-scoping is impossible or pointless: on
231354
+ * per-agent pages (no picker, so nothing would visibly change), and on rows
231355
+ * whose agent the payload identifies by name alone. Safe inside clickable rows
231356
+ * and cards — neither its clicks nor its key presses reach their handlers.
231357
+ */
231358
+ function AgentScopeLink({ uniqueId, name, fallback = '-', onScoped, className, testId, }) {
231359
+ const t = useT();
231360
+ const setScopedMentor = useAnalyticsScopeSetter();
231361
+ const { scopedMentor } = useAnalyticsScope();
231362
+ const display = name || uniqueId || fallback;
231363
+ if (!setScopedMentor || !uniqueId) {
231364
+ return (jsx("span", { className: className, "data-testid": testId, children: display }));
231365
+ }
231366
+ const isCurrent = (scopedMentor === null || scopedMentor === void 0 ? void 0 : scopedMentor.uniqueId) === uniqueId;
231367
+ return (jsx("button", { type: "button", onClick: (event) => {
231368
+ event.stopPropagation();
231369
+ // No `dbId`: these payloads carry the `unique_id` only. AnalyticsLayout
231370
+ // resolves the rest before the scope reaches anyone — see
231371
+ // AnalyticsScopedMentor.
231372
+ setScopedMentor({ uniqueId, name: name || uniqueId });
231373
+ onScoped === null || onScoped === void 0 ? void 0 : onScoped();
231374
+ },
231375
+ // Rows that open on Enter/Space would otherwise swallow the key press.
231376
+ onKeyDown: (event) => event.stopPropagation(), className: cn('max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none', isCurrent && 'font-medium text-blue-600', className), "aria-label": t('analyticsAgentScopeLink.scopeToAgent', { name: display }), "aria-current": isCurrent ? 'true' : undefined, "data-testid": testId, children: display }));
231377
+ }
231378
+
231189
231379
  /**
231190
231380
  * Attachments on a transcript turn. A turn can carry files with no text at
231191
231381
  * all (an uploaded image and nothing else), so the bubble renders these even
@@ -231245,8 +231435,8 @@ const getMessageContent = (content) => {
231245
231435
  * name / username stand in behind it.
231246
231436
  */
231247
231437
  const identifyUser = (...candidates) => candidates.find((candidate) => !!candidate) || '-';
231248
- function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, usergroupIds, }) {
231249
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
231438
+ function AnalyticsTranscriptsStats({ tenantKey, currentSPA, mentorId, selectedMentorId, usergroupIds, }) {
231439
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
231250
231440
  const t = useT();
231251
231441
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
231252
231442
  const [isModalOpen, setIsModalOpen] = useState(false);
@@ -231355,14 +231545,14 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
231355
231545
  };
231356
231546
  // Transcript Detail Component (reusable for both desktop and mobile)
231357
231547
  const TranscriptDetail = ({ className = '' }) => {
231358
- var _a, _b, _c, _d, _e, _f, _g, _h;
231548
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
231359
231549
  return (jsx("div", { className: cn('h-full flex flex-col', className), children: !selectedTranscript ? (jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx(ArrowLeft, { className: "h-6 w-6 mx-auto mb-2" }), jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.selectConversation') })] }) })) : isLoadingTranscriptsMessagesDetailsData ? (
231360
231550
  /* Loading state */
231361
231551
  jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-3", "aria-hidden": "true" }), jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.loadingTranscript') })] }) })) : isErrorTranscriptsMessagesDetailsData || !transcriptsMessagesDetailsData ? (
231362
231552
  /* Error or no data state */
231363
231553
  jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx(X$1, { className: "h-6 w-6 mx-auto mb-2 text-red-400" }), jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.noTranscriptDetails') }), jsx("p", { className: "text-sm mt-1", children: t('analyticsAnalyticsTranscriptsStats.unableToLoadTranscript') })] }) })) : (
231364
231554
  /* Data loaded successfully */
231365
- jsxs(Fragment$1, { children: [jsxs("div", { className: "mb-4 flex-shrink-0", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: t('analyticsAnalyticsTranscriptsStats.conversationTranscript') }), jsxs("div", { className: "text-sm text-gray-500", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelFullName'), ' ', identifyUser((_a = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _a === void 0 ? void 0 : _a.email, (_b = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _b === void 0 ? void 0 : _b.name)] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUsername'), ' ', identifyUser((_c = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _c === void 0 ? void 0 : _c.email, (_d = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _d === void 0 ? void 0 : _d.username)] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', ((_e = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _e === void 0 ? void 0 : _e.mentor) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModel'), ' ', ((_f = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _f === void 0 ? void 0 : _f.model) || '-'] })] })] }), jsx("div", { className: "flex-1 overflow-y-auto space-y-4 min-h-0", children: ((_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _g === void 0 ? void 0 : _g.length) > 0 ? ((_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _h === void 0 ? void 0 : _h.map((message, index) => {
231555
+ jsxs(Fragment$1, { children: [jsxs("div", { className: "mb-4 flex-shrink-0", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: t('analyticsAnalyticsTranscriptsStats.conversationTranscript') }), jsxs("div", { className: "text-sm text-gray-500", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelFullName'), ' ', jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: (_a = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _a === void 0 ? void 0 : _a.username, display: identifyUser((_b = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _b === void 0 ? void 0 : _b.email, (_c = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _c === void 0 ? void 0 : _c.name) })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUsername'), ' ', jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: (_d = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _d === void 0 ? void 0 : _d.username, display: identifyUser((_e = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _e === void 0 ? void 0 : _e.email, (_f = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _f === void 0 ? void 0 : _f.username) })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', jsx(AgentScopeLink, { uniqueId: (_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _g === void 0 ? void 0 : _g.mentor_unique_id, name: (_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _h === void 0 ? void 0 : _h.mentor })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModel'), ' ', ((_j = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _j === void 0 ? void 0 : _j.model) || '-'] })] })] }), jsx("div", { className: "flex-1 overflow-y-auto space-y-4 min-h-0", children: ((_k = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _k === void 0 ? void 0 : _k.length) > 0 ? ((_l = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _l === void 0 ? void 0 : _l.map((message, index) => {
231366
231556
  var _a, _b;
231367
231557
  return (jsxs(React__default.Fragment, { children: [((message === null || message === void 0 ? void 0 : message.human) || !!((_a = message === null || message === void 0 ? void 0 : message.human_files) === null || _a === void 0 ? void 0 : _a.length)) && (jsxs("div", { className: `p-3 rounded-lg bg-blue-100 ml-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleUser') }) }), message.human && (jsx("p", { className: "text-sm", children: getMessageContent(message.human) })), jsx(TranscriptFiles, { files: message.human_files })] }, `${index}-human`)), ((message === null || message === void 0 ? void 0 : message.ai) || !!((_b = message === null || message === void 0 ? void 0 : message.ai_files) === null || _b === void 0 ? void 0 : _b.length)) && (jsxs("div", { className: `p-3 rounded-lg bg-white mr-4`, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleAgent') }) }), message.ai && jsx(Markdown, { children: getMessageContent(message.ai) }), jsx(TranscriptFiles, { files: message.ai_files })] }, `${index}-ai`))] }, index));
231368
231558
  })) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.noMessages') }) })) })] })) }));
@@ -231386,7 +231576,7 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
231386
231576
  ? t('analyticsAnalyticsTranscriptsStats.sentimentNegative')
231387
231577
  : transcript.sentiment === 'positive'
231388
231578
  ? t('analyticsAnalyticsTranscriptsStats.sentimentPositive')
231389
- : t('analyticsAnalyticsTranscriptsStats.sentimentNeutral'), ' ', t('analyticsAnalyticsTranscriptsStats.userSentiment')] })] }) }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUser'), ' ', identifyUser(transcript === null || transcript === void 0 ? void 0 : transcript.email, transcript === null || transcript === void 0 ? void 0 : transcript.name, transcript === null || transcript === void 0 ? void 0 : transcript.username)] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', (transcript === null || transcript === void 0 ? void 0 : transcript.mentor) || '-'] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModelCard'), ' ', (transcript === null || transcript === void 0 ? void 0 : transcript.model) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUserId'), ' ', identifyUser(transcript === null || transcript === void 0 ? void 0 : transcript.email, transcript === null || transcript === void 0 ? void 0 : transcript.username)] })] }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500", children: [jsxs("div", { children: [transcript.message_count, " ", t('analyticsAnalyticsTranscriptsStats.messages')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: ["$", Number((transcript === null || transcript === void 0 ? void 0 : transcript.cost) || 0).toFixed(2), ' ', t('analyticsAnalyticsTranscriptsStats.estimatedCost')] }), (transcript === null || transcript === void 0 ? void 0 : transcript.created_at) && (jsxs(Fragment$1, { children: [jsx("div", { children: "\u2022" }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.created'), ' ', formatRelativeTime(transcript.created_at, t)] })] }))] })] }, transcript.session));
231579
+ : t('analyticsAnalyticsTranscriptsStats.sentimentNeutral'), ' ', t('analyticsAnalyticsTranscriptsStats.userSentiment')] })] }) }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUser'), ' ', jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: transcript === null || transcript === void 0 ? void 0 : transcript.username, display: identifyUser(transcript === null || transcript === void 0 ? void 0 : transcript.email, transcript === null || transcript === void 0 ? void 0 : transcript.name, transcript === null || transcript === void 0 ? void 0 : transcript.username) })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', jsx(AgentScopeLink, { uniqueId: transcript === null || transcript === void 0 ? void 0 : transcript.mentor_unique_id, name: transcript === null || transcript === void 0 ? void 0 : transcript.mentor })] })] }), jsx("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500 mb-2", children: jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModelCard'), ' ', (transcript === null || transcript === void 0 ? void 0 : transcript.model) || '-'] }) }), jsxs("div", { className: "flex flex-wrap gap-x-6 gap-y-2 text-xs text-gray-500", children: [jsxs("div", { children: [transcript.message_count, " ", t('analyticsAnalyticsTranscriptsStats.messages')] }), jsx("div", { children: "\u2022" }), jsxs("div", { children: ["$", Number((transcript === null || transcript === void 0 ? void 0 : transcript.cost) || 0).toFixed(2), ' ', t('analyticsAnalyticsTranscriptsStats.estimatedCost')] }), (transcript === null || transcript === void 0 ? void 0 : transcript.created_at) && (jsxs(Fragment$1, { children: [jsx("div", { children: "\u2022" }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.created'), ' ', formatRelativeTime(transcript.created_at, t)] })] }))] })] }, transcript.session));
231390
231580
  })) : (
231391
231581
  // Empty state
231392
231582
  jsx("div", { className: "text-center py-12", children: jsx("p", { className: "text-gray-500", children: filters.topicSearch || filters.userSearch || filters.rating
@@ -231422,7 +231612,7 @@ function AnalyticsTranscriptsStats({ tenantKey, mentorId, selectedMentorId, user
231422
231612
  /* Error or no data state */
231423
231613
  jsx("div", { className: "flex items-center justify-center h-full text-gray-400", children: jsxs("div", { className: "text-center", children: [jsx(X$1, { className: "h-6 w-6 mx-auto mb-2 text-red-400" }), jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.noTranscriptDetails') }), jsx("p", { className: "text-sm mt-1", children: t('analyticsAnalyticsTranscriptsStats.unableToLoadTranscript') })] }) })) : (
231424
231614
  /* Data loaded successfully */
231425
- jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "text-sm text-gray-500 space-y-1", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelFullName'), ' ', identifyUser((_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _g === void 0 ? void 0 : _g.email, (_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _h === void 0 ? void 0 : _h.name)] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUsername'), ' ', identifyUser((_j = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _j === void 0 ? void 0 : _j.email, (_k = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _k === void 0 ? void 0 : _k.username)] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', ((_l = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _l === void 0 ? void 0 : _l.mentor) || '-'] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModel'), ' ', ((_m = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _m === void 0 ? void 0 : _m.model) || '-'] })] }) }), jsx("div", { className: "space-y-4 pb-4", children: ((_o = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _o === void 0 ? void 0 : _o.length) > 0 ? ((_p = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _p === void 0 ? void 0 : _p.map((message, index) => {
231615
+ jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "mb-4", children: jsxs("div", { className: "text-sm text-gray-500 space-y-1", children: [jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelFullName'), ' ', jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: (_g = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _g === void 0 ? void 0 : _g.username, display: identifyUser((_h = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _h === void 0 ? void 0 : _h.email, (_j = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _j === void 0 ? void 0 : _j.name) })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelUsername'), ' ', jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: (_k = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _k === void 0 ? void 0 : _k.username, display: identifyUser((_l = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _l === void 0 ? void 0 : _l.email, (_m = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _m === void 0 ? void 0 : _m.username) })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelAgent'), ' ', jsx(AgentScopeLink, { uniqueId: (_o = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _o === void 0 ? void 0 : _o.mentor_unique_id, name: (_p = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _p === void 0 ? void 0 : _p.mentor })] }), jsxs("div", { children: [t('analyticsAnalyticsTranscriptsStats.labelModel'), ' ', ((_q = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.summary) === null || _q === void 0 ? void 0 : _q.model) || '-'] })] }) }), jsx("div", { className: "space-y-4 pb-4", children: ((_r = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _r === void 0 ? void 0 : _r.length) > 0 ? ((_s = transcriptsMessagesDetailsData === null || transcriptsMessagesDetailsData === void 0 ? void 0 : transcriptsMessagesDetailsData.messages) === null || _s === void 0 ? void 0 : _s.map((message, index) => {
231426
231616
  var _a, _b;
231427
231617
  return (jsxs(React__default.Fragment, { children: [((message === null || message === void 0 ? void 0 : message.human) || !!((_a = message === null || message === void 0 ? void 0 : message.human_files) === null || _a === void 0 ? void 0 : _a.length)) && (jsxs("div", { className: "p-3 rounded-lg bg-blue-100 ml-4", children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleUser') }) }), message.human && (jsx("p", { className: "text-sm", children: getMessageContent(message.human) })), jsx(TranscriptFiles, { files: message.human_files })] })), ((message === null || message === void 0 ? void 0 : message.ai) || !!((_b = message === null || message === void 0 ? void 0 : message.ai_files) === null || _b === void 0 ? void 0 : _b.length)) && (jsxs("div", { className: "p-3 rounded-lg bg-white mr-4 border", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("div", { className: "flex justify-between items-start mb-1", children: jsx("span", { className: "font-medium text-sm", children: t('analyticsAnalyticsTranscriptsStats.roleAgent') }) }), message.ai && jsx(Markdown, { children: getMessageContent(message.ai) }), jsx(TranscriptFiles, { files: message.ai_files })] }))] }, index));
231428
231618
  })) : (jsx("div", { className: "text-center text-gray-500 py-8", children: jsx("p", { children: t('analyticsAnalyticsTranscriptsStats.noMessages') }) })) })] })) })] }) }))] }));
@@ -232439,6 +232629,8 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
232439
232629
  mentor_unique_id: mentorId,
232440
232630
  limit: coursesListLimit,
232441
232631
  page: coursesListPage,
232632
+ // Busiest courses first — this list reads as a leaderboard.
232633
+ sort_by: 'active_enrollments',
232442
232634
  ...(debouncedSearch && { search: debouncedSearch }),
232443
232635
  });
232444
232636
  }, [
@@ -232477,11 +232669,31 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
232477
232669
  debouncedCourseEnrollmentsSearch,
232478
232670
  ]);
232479
232671
  // Query for courses list and summary
232480
- const { data: contentAnalyticsData, isLoading: isLoadingContentAnalytics, isFetching: isFetchingContentAnalytics, } = useGetContentAnalyticsQuery(contentAnalyticsParams);
232672
+ const { data: contentAnalyticsData, currentData: currentContentAnalyticsData, isLoading: isLoadingContentAnalytics, isFetching: isFetchingContentAnalytics, } = useGetContentAnalyticsQuery(contentAnalyticsParams);
232481
232673
  // Query for course details (only when courseId is provided)
232482
- const { data: courseDetailsData, isLoading: isLoadingCourseDetails, isFetching: isFetchingCourseDetails, } = useGetContentAnalyticsDetailsQuery(courseDetailsParams, {
232674
+ const { data: courseDetailsData, currentData: currentCourseDetailsData, isLoading: isLoadingCourseDetails, isFetching: isFetchingCourseDetails, } = useGetContentAnalyticsDetailsQuery(courseDetailsParams, {
232483
232675
  skip: !courseDetailsParams,
232484
232676
  });
232677
+ // Searching the table re-runs the one request the summary cards and the chart
232678
+ // also read from. RTK keeps the previous arguments' response in `data` while
232679
+ // the new one is in flight, so those sections never blank mid-search — but
232680
+ // `currentData` alone can't tell a search apart from an agent or date change,
232681
+ // which those sections *do* vary with. Comparing their own inputs does: while
232682
+ // they differ from the last settled response, the sections report loading
232683
+ // rather than showing the previous scope's numbers with nothing saying so.
232684
+ const statsKey = JSON.stringify({ tenantKey, mentorId, enrollmentStatsDateFilter });
232685
+ const settledStatsKey = React__default.useRef(statsKey);
232686
+ if (currentContentAnalyticsData)
232687
+ settledStatsKey.current = statsKey;
232688
+ const detailStatsKey = JSON.stringify({
232689
+ courseId,
232690
+ tenantKey,
232691
+ mentorId,
232692
+ timeSpentStatsDateFilter,
232693
+ });
232694
+ const settledDetailStatsKey = React__default.useRef(detailStatsKey);
232695
+ if (currentCourseDetailsData)
232696
+ settledDetailStatsKey.current = detailStatsKey;
232485
232697
  // Map content analytics data to courseStats
232486
232698
  const courseStats = useMemo(() => {
232487
232699
  if (!contentAnalyticsData) {
@@ -232576,8 +232788,21 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
232576
232788
  isFetchingContentAnalytics ||
232577
232789
  isLoadingCourseDetails ||
232578
232790
  isFetchingCourseDetails;
232791
+ // Loading for the sections that don't vary with the table search — see
232792
+ // `statsKey` above for why the key comparison is what distinguishes a search
232793
+ // from a change those sections do have to redraw for.
232794
+ const isStatsLoading = isLoadingContentAnalytics ||
232795
+ (isFetchingContentAnalytics &&
232796
+ currentContentAnalyticsData === undefined &&
232797
+ settledStatsKey.current !== statsKey);
232798
+ const isDetailStatsLoading = isLoadingCourseDetails ||
232799
+ (isFetchingCourseDetails &&
232800
+ currentCourseDetailsData === undefined &&
232801
+ settledDetailStatsKey.current !== detailStatsKey);
232579
232802
  return {
232580
232803
  courseStats,
232804
+ isStatsLoading,
232805
+ isDetailStatsLoading,
232581
232806
  isLoading,
232582
232807
  enrollmentStats,
232583
232808
  enrollmentStatsDateFilter,
@@ -232626,30 +232851,40 @@ const formatSecondsToTime$1 = (seconds) => {
232626
232851
  const formatSecondsToHours$1 = (seconds) => {
232627
232852
  return Math.round((seconds / 3600) * 10) / 10;
232628
232853
  };
232629
- function AnalyticsCourses({ tenantKey, mentorId, selectedMentorId, basePath = '', }) {
232854
+ function AnalyticsCourses({ tenantKey, mentorId, selectedMentorId, basePath = '', getCourseURL, }) {
232630
232855
  var _a, _b, _c;
232631
232856
  const t = useT();
232632
232857
  const router = useRouter();
232633
232858
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
232634
- const { courseStats, isLoading, enrollmentStats, enrollmentStatsDateFilter, setEnrollmentStatsDateFilter, coursesList, setCoursesListPage, coursesListSearch, handleSearchInputChange, coursesPagination, } = useCourses({ tenantKey, mentorId: currentMentorId });
232859
+ const { courseStats, isLoading, isStatsLoading, enrollmentStats, enrollmentStatsDateFilter, setEnrollmentStatsDateFilter, coursesList, setCoursesListPage, coursesListSearch, handleSearchInputChange, coursesPagination, } = useCourses({ tenantKey, mentorId: currentMentorId });
232635
232860
  const handleCourseClick = (courseId) => {
232636
232861
  router.push(`${basePath}/courses/${courseId}`);
232637
232862
  };
232638
232863
  const hasEnrollmentStatsPoints = Number((_a = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _a === void 0 ? void 0 : _a.length) > 0;
232639
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.activeCourses'), value: courseStats.active_courses, percentage: courseStats.active_courses_percentage, description: t('analyticsAnalyticsCourses.activeCoursesDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalCourses'), value: courseStats.total_courses, percentage: courseStats.total_courses_percentage, description: t('analyticsAnalyticsCourses.totalCoursesDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.enrollments'), value: courseStats.enrollments, percentage: courseStats.enrollments_percentage, description: t('analyticsAnalyticsCourses.enrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourses.totalLearners'), value: courseStats.total_learners,
232864
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsCourses.activeCourses'), value: courseStats.active_courses, percentage: courseStats.active_courses_percentage, description: t('analyticsAnalyticsCourses.activeCoursesDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsCourses.totalCourses'), value: courseStats.total_courses, percentage: courseStats.total_courses_percentage, description: t('analyticsAnalyticsCourses.totalCoursesDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsCourses.enrollments'), value: courseStats.enrollments, percentage: courseStats.enrollments_percentage, description: t('analyticsAnalyticsCourses.enrollmentsDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsCourses.totalLearners'), value: courseStats.total_learners,
232640
232865
  //percentage={courseStats.enrollments_percentage}
232641
- description: t('analyticsAnalyticsCourses.totalLearnersDescription') })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsCourses.courseOvertime'), label: t('analyticsAnalyticsCourses.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsCourses.courseOvertimeDescription'), children: isLoading ? (jsx(ChartLoading, {})) : (jsx(AnalyticsAreaChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
232866
+ description: t('analyticsAnalyticsCourses.totalLearnersDescription') })] }), (isStatsLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsCourses.courseOvertime'), label: t('analyticsAnalyticsCourses.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsCourses.courseOvertimeDescription'), children: isStatsLoading ? (jsx(ChartLoading, {})) : (jsx(AnalyticsAreaChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
232642
232867
  date: formatDateToShortFormat$1(point.date, enrollmentStatsDateFilter.activeFilter === 'today'),
232643
232868
  value: formatSecondsToHours$1(point.value),
232644
232869
  rawSeconds: point.value,
232645
- }))) || [], tooltipLabel: t('analyticsAnalyticsCourses.tooltipTimeSpentLabel'), tooltipValue: (point) => formatSecondsToTime$1(Number(point.rawSeconds) || 0), tooltipAriaLabel: (label) => t('analyticsAnalyticsCourses.tooltipAriaLabel', { label }), yTickFormatter: (value) => `${value}h` })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourses.coursesTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourses.coursesHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourses.coursesHeading'), description: t('analyticsAnalyticsCourses.coursesTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-course", type: "text", placeholder: t('analyticsAnalyticsCourses.searchPlaceholder'), value: coursesListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourses.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourses.loading') }) })) : ((_c = coursesList === null || coursesList === void 0 ? void 0 : coursesList.courses) === null || _c === void 0 ? void 0 : _c.length) && coursesList.courses.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourses.colEnrollments') })] }) }), jsx(TableBody, { children: coursesList.courses.map((course, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleCourseClick(course.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
232646
- if (e.key === 'Enter' || e.key === ' ') {
232647
- e.preventDefault();
232648
- handleCourseClick(course.id);
232649
- }
232650
- }, "aria-label": t('analyticsAnalyticsCourses.viewCourseAriaLabel', {
232651
- name: course.name,
232652
- }), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: course.name }), jsx(TableCell, { className: "text-muted-foreground", children: course.id }), jsx(TableCell, { className: "text-right", children: course.enrollments.toLocaleString() })] }, course.id))) })] }) }), coursesPagination && coursesPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(1), disabled: coursesPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourses.goToFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(coursesPagination.current_page - 1), disabled: coursesPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourses.goToPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: coursesPagination.total_pages }, (_, i) => i + 1)
232870
+ }))) || [], tooltipLabel: t('analyticsAnalyticsCourses.tooltipTimeSpentLabel'), tooltipValue: (point) => formatSecondsToTime$1(Number(point.rawSeconds) || 0), tooltipAriaLabel: (label) => t('analyticsAnalyticsCourses.tooltipAriaLabel', { label }), yTickFormatter: (value) => `${value}h` })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourses.coursesTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourses.coursesHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourses.coursesHeading'), description: t('analyticsAnalyticsCourses.coursesTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-course", type: "text", placeholder: t('analyticsAnalyticsCourses.searchPlaceholder'), value: coursesListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourses.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourses.loading') }) })) : ((_c = coursesList === null || coursesList === void 0 ? void 0 : coursesList.courses) === null || _c === void 0 ? void 0 : _c.length) && coursesList.courses.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourses.colCourseId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourses.colEnrollments') })] }) }), jsx(TableBody, { children: coursesList.courses.map((course, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`,
232871
+ // Mouse shortcut only; the id cell may hold a link,
232872
+ // so the row itself must not be a button —
232873
+ // interactive content inside one is invalid, and
232874
+ // the row's label would rename the link. Keyboard
232875
+ // and screen-reader users open the detail page
232876
+ // through the course name below.
232877
+ onClick: () => handleCourseClick(course.id), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("button", { type: "button", className: "max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none", onClick: (e) => {
232878
+ e.stopPropagation();
232879
+ handleCourseClick(course.id);
232880
+ }, "aria-label": t('analyticsAnalyticsCourses.viewCourseAriaLabel', {
232881
+ name: course.name,
232882
+ }), children: course.name }) }), jsx(TableCell, { className: "text-muted-foreground", children: getCourseURL ? (jsx("a", { href: getCourseURL(course.id), target: "_blank", rel: "noopener noreferrer",
232883
+ // The row navigates to the analytics detail
232884
+ // page; this link goes to the course itself.
232885
+ onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), className: "cursor-pointer hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none", "aria-label": t('analyticsAnalyticsCourses.openCourseAriaLabel', {
232886
+ id: course.id,
232887
+ }), children: course.id })) : (course.id) }), jsx(TableCell, { className: "text-right", children: course.enrollments.toLocaleString() })] }, course.id))) })] }) }), coursesPagination && coursesPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(1), disabled: coursesPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourses.goToFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(coursesPagination.current_page - 1), disabled: coursesPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourses.goToPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: coursesPagination.total_pages }, (_, i) => i + 1)
232653
232888
  .filter((page) => {
232654
232889
  const current = coursesPagination.current_page;
232655
232890
  const total = coursesPagination.total_pages;
@@ -232668,11 +232903,11 @@ function AnalyticsCourses({ tenantKey, mentorId, selectedMentorId, basePath = ''
232668
232903
  }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(coursesPagination.current_page + 1), disabled: coursesPagination.current_page === coursesPagination.total_pages, "aria-label": t('analyticsAnalyticsCourses.goToNextPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToNextPage') }), jsx(ChevronRight, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCoursesListPage(coursesPagination.total_pages), disabled: coursesPagination.current_page === coursesPagination.total_pages, "aria-label": t('analyticsAnalyticsCourses.goToLastPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourses.goToLastPage') }), jsx(ChevronsRight, { className: "h-4 w-4" })] })] }))] })) : (jsx(EmptyStats, { title: t('analyticsAnalyticsCourses.noCoursesAvailable') }))] })] }) }) })] }));
232669
232904
  }
232670
232905
 
232671
- function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId, courseName, showCourseTitle = true, onBack, }) {
232906
+ function AnalyticsCourseDetail({ tenantKey, currentSPA, mentorId, selectedMentorId, courseId, courseName, showCourseTitle = true, onBack, }) {
232672
232907
  var _a, _b;
232673
232908
  const t = useT();
232674
232909
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
232675
- const { courseDetailStats, isLoading, courseEnrollments, courseEnrollmentsSearch, handleCourseEnrollmentsSearchInputChange, setCourseEnrollmentsPage, courseEnrollmentsPagination, courseInfo, } = useCourses({
232910
+ const { courseDetailStats, isLoading, isDetailStatsLoading, courseEnrollments, courseEnrollmentsSearch, handleCourseEnrollmentsSearchInputChange, setCourseEnrollmentsPage, courseEnrollmentsPagination, courseInfo, } = useCourses({
232676
232911
  tenantKey,
232677
232912
  mentorId: currentMentorId,
232678
232913
  courseId,
@@ -232680,17 +232915,23 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
232680
232915
  const [selectedEnrollment, setSelectedEnrollment] = useState(null);
232681
232916
  const resolvedCourseName = courseName || (courseInfo === null || courseInfo === void 0 ? void 0 : courseInfo.name);
232682
232917
  const showTitle = showCourseTitle && !!resolvedCourseName;
232683
- return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsCourseDetail.goBackAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), showTitle && (jsx("h2", { className: "flex-1 text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedCourseName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.activeEnrollments'), value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.activeEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsCourseDetail.completedEnrollments'), value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.completedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourseDetail.courseEnrollmentsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourseDetail.enrolledUsers') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourseDetail.enrolledUsers'), description: t('analyticsAnalyticsCourseDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsCourseDetail.searchPlaceholder'), value: courseEnrollmentsSearch, onChange: handleCourseEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourseDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourseDetail.loadingLabel') }) })) : ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
232684
- courseEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnLastActiveOn') })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
232685
- if (e.key === 'Enter' || e.key === ' ') {
232686
- e.preventDefault();
232687
- setSelectedEnrollment(enrollment);
232688
- }
232689
- }, "aria-label": t('analyticsAnalyticsCourseDetail.viewCourseProgressAriaLabel', { name: enrollment.name }), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: enrollment.enrollment_date
232918
+ return (jsxs("div", { className: "space-y-8", children: [(onBack || showTitle) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsCourseDetail.goBackAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), showTitle && (jsx("h2", { className: "flex-1 text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedCourseName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsx(StatCard, { loading: isDetailStatsLoading, title: t('analyticsAnalyticsCourseDetail.activeEnrollments'), value: courseDetailStats.active_enrollments, percentage: courseDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.activeEnrollmentsDescription') }), jsx(StatCard, { loading: isDetailStatsLoading, title: t('analyticsAnalyticsCourseDetail.completedEnrollments'), value: courseDetailStats.completed_enrollments, percentage: courseDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsCourseDetail.completedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsCourseDetail.courseEnrollmentsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsCourseDetail.enrolledUsers') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsCourseDetail.enrolledUsers'), description: t('analyticsAnalyticsCourseDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsCourseDetail.searchPlaceholder'), value: courseEnrollmentsSearch, onChange: handleCourseEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsCourseDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsCourseDetail.loadingLabel') }) })) : ((_a = courseEnrollments === null || courseEnrollments === void 0 ? void 0 : courseEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
232919
+ courseEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsCourseDetail.columnEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsCourseDetail.columnLastActiveOn') }), jsx(TableHead, { className: "w-[1%] text-right whitespace-nowrap", children: t('analyticsAnalyticsCourseDetail.columnProgress') })] }) }), jsx(TableBody, { children: courseEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`,
232920
+ // Mouse shortcut only; the name and email cells hold profile
232921
+ // links, so keyboard and screen-reader users reach the
232922
+ // progress modal through the Progress column's button.
232923
+ onClick: () => setSelectedEnrollment(enrollment), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name && (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: enrollment.username, display: enrollment.name })) }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email && (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: enrollment.username, display: enrollment.email })) }), jsx(TableCell, { className: "text-right", children: enrollment.enrollment_date
232690
232924
  ? new Date(enrollment.enrollment_date).toLocaleDateString()
232691
232925
  : '—' }), jsx(TableCell, { className: "text-right", children: enrollment.last_active_on
232692
232926
  ? new Date(enrollment.last_active_on).toLocaleDateString()
232693
- : '—' })] }, index))) })] }) }), courseEnrollmentsPagination && courseEnrollmentsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCourseEnrollmentsPage(1), disabled: courseEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourseDetail.paginationFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourseDetail.paginationFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCourseEnrollmentsPage(courseEnrollmentsPagination.current_page - 1), disabled: courseEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourseDetail.paginationPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourseDetail.paginationPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: courseEnrollmentsPagination.total_pages }, (_, i) => i + 1)
232927
+ : '—' }), jsx(TableCell, { className: "text-right", children: jsx(Button$1, { variant: "ghost", size: "icon", className: "h-8 w-8 text-gray-500 hover:text-blue-600", onClick: (e) => {
232928
+ e.stopPropagation();
232929
+ setSelectedEnrollment(enrollment);
232930
+ }, "aria-label": t('analyticsAnalyticsCourseDetail.viewCourseProgressAriaLabel', {
232931
+ name: enrollment.name || enrollment.email,
232932
+ }), title: t('analyticsAnalyticsCourseDetail.viewCourseProgressAriaLabel', {
232933
+ name: enrollment.name || enrollment.email,
232934
+ }), children: jsx(TrendingUp, { className: "h-4 w-4", "aria-hidden": "true" }) }) })] }, index))) })] }) }), courseEnrollmentsPagination && courseEnrollmentsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCourseEnrollmentsPage(1), disabled: courseEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourseDetail.paginationFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourseDetail.paginationFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setCourseEnrollmentsPage(courseEnrollmentsPagination.current_page - 1), disabled: courseEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsCourseDetail.paginationPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsCourseDetail.paginationPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: courseEnrollmentsPagination.total_pages }, (_, i) => i + 1)
232694
232935
  .filter((page) => {
232695
232936
  const current = courseEnrollmentsPagination.current_page;
232696
232937
  const total = courseEnrollmentsPagination.total_pages;
@@ -232785,6 +233026,8 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
232785
233026
  mentor_unique_id: mentorId,
232786
233027
  limit: programsListLimit,
232787
233028
  page: programsListPage,
233029
+ // Busiest programs first — this list reads as a leaderboard.
233030
+ sort_by: 'active_enrollments',
232788
233031
  ...(debouncedSearch && { search: debouncedSearch }),
232789
233032
  });
232790
233033
  }, [
@@ -232825,11 +233068,31 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
232825
233068
  debouncedProgramEnrollmentsSearch,
232826
233069
  ]);
232827
233070
  // Query for programs list and summary
232828
- const { data: contentAnalyticsData, isLoading: isLoadingContentAnalytics, isFetching: isFetchingContentAnalytics, } = useGetContentAnalyticsQuery(contentAnalyticsParams);
233071
+ const { data: contentAnalyticsData, currentData: currentContentAnalyticsData, isLoading: isLoadingContentAnalytics, isFetching: isFetchingContentAnalytics, } = useGetContentAnalyticsQuery(contentAnalyticsParams);
232829
233072
  // Query for program details (only when programId is provided)
232830
- const { data: programDetailsData, isLoading: isLoadingProgramDetails, isFetching: isFetchingProgramDetails, } = useGetContentAnalyticsDetailsQuery(programDetailsParams, {
233073
+ const { data: programDetailsData, currentData: currentProgramDetailsData, isLoading: isLoadingProgramDetails, isFetching: isFetchingProgramDetails, } = useGetContentAnalyticsDetailsQuery(programDetailsParams, {
232831
233074
  skip: !programDetailsParams,
232832
233075
  });
233076
+ // Searching the table re-runs the one request the summary cards and the chart
233077
+ // also read from. RTK keeps the previous arguments' response in `data` while
233078
+ // the new one is in flight, so those sections never blank mid-search — but
233079
+ // `currentData` alone can't tell a search apart from an agent or date change,
233080
+ // which those sections *do* vary with. Comparing their own inputs does: while
233081
+ // they differ from the last settled response, the sections report loading
233082
+ // rather than showing the previous scope's numbers with nothing saying so.
233083
+ const statsKey = JSON.stringify({ tenantKey, mentorId, enrollmentStatsDateFilter });
233084
+ const settledStatsKey = React__default.useRef(statsKey);
233085
+ if (currentContentAnalyticsData)
233086
+ settledStatsKey.current = statsKey;
233087
+ const detailStatsKey = JSON.stringify({
233088
+ programId,
233089
+ tenantKey,
233090
+ mentorId,
233091
+ timeSpentStatsDateFilter,
233092
+ });
233093
+ const settledDetailStatsKey = React__default.useRef(detailStatsKey);
233094
+ if (currentProgramDetailsData)
233095
+ settledDetailStatsKey.current = detailStatsKey;
232833
233096
  // Map content analytics data to programStats
232834
233097
  const programStats = useMemo(() => {
232835
233098
  if (!contentAnalyticsData) {
@@ -232869,6 +233132,7 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
232869
233132
  id: program.id,
232870
233133
  name: program.name,
232871
233134
  enrollments: program.analytics.enrollments || 0,
233135
+ program_id: program.program_id,
232872
233136
  })),
232873
233137
  total: contentAnalyticsData.pagination.count,
232874
233138
  };
@@ -232924,8 +233188,21 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
232924
233188
  isFetchingContentAnalytics ||
232925
233189
  isLoadingProgramDetails ||
232926
233190
  isFetchingProgramDetails;
233191
+ // Loading for the sections that don't vary with the table search — see
233192
+ // `statsKey` above for why the key comparison is what distinguishes a search
233193
+ // from a change those sections do have to redraw for.
233194
+ const isStatsLoading = isLoadingContentAnalytics ||
233195
+ (isFetchingContentAnalytics &&
233196
+ currentContentAnalyticsData === undefined &&
233197
+ settledStatsKey.current !== statsKey);
233198
+ const isDetailStatsLoading = isLoadingProgramDetails ||
233199
+ (isFetchingProgramDetails &&
233200
+ currentProgramDetailsData === undefined &&
233201
+ settledDetailStatsKey.current !== detailStatsKey);
232927
233202
  return {
232928
233203
  programStats,
233204
+ isStatsLoading,
233205
+ isDetailStatsLoading,
232929
233206
  isLoading,
232930
233207
  enrollmentStats,
232931
233208
  enrollmentStatsDateFilter,
@@ -232974,30 +233251,40 @@ const formatSecondsToTime = (seconds) => {
232974
233251
  const formatSecondsToHours = (seconds) => {
232975
233252
  return Math.round((seconds / 3600) * 10) / 10;
232976
233253
  };
232977
- function AnalyticsPrograms({ tenantKey, mentorId, selectedMentorId, basePath = '', }) {
233254
+ function AnalyticsPrograms({ tenantKey, mentorId, selectedMentorId, basePath = '', getProgramURL, }) {
232978
233255
  var _a, _b, _c;
232979
233256
  const t = useT();
232980
233257
  const router = useRouter();
232981
233258
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
232982
- const { programStats, isLoading, enrollmentStats, enrollmentStatsDateFilter, setEnrollmentStatsDateFilter, programsList, setProgramsListPage, programsListSearch, handleSearchInputChange, programsPagination, } = usePrograms({ tenantKey, mentorId: currentMentorId });
233259
+ const { programStats, isLoading, isStatsLoading, enrollmentStats, enrollmentStatsDateFilter, setEnrollmentStatsDateFilter, programsList, setProgramsListPage, programsListSearch, handleSearchInputChange, programsPagination, } = usePrograms({ tenantKey, mentorId: currentMentorId });
232983
233260
  const handleProgramClick = (programId) => {
232984
233261
  router.push(`${basePath}/programs/${programId}`);
232985
233262
  };
232986
233263
  const hasEnrollmentStatsPoints = Number((_a = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _a === void 0 ? void 0 : _a.length) > 0;
232987
- return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.activePrograms'), value: programStats.active_programs, percentage: programStats.active_programs_percentage, description: t('analyticsAnalyticsPrograms.activeProgramsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalPrograms'), value: programStats.total_programs, percentage: programStats.total_programs_percentage, description: t('analyticsAnalyticsPrograms.totalProgramsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.enrollments'), value: programStats.enrollments, percentage: programStats.enrollments_percentage, description: t('analyticsAnalyticsPrograms.enrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsPrograms.totalLearners'), value: programStats.total_learners,
233264
+ return (jsxs("div", { className: "space-y-8", children: [jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6", children: [jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsPrograms.activePrograms'), value: programStats.active_programs, percentage: programStats.active_programs_percentage, description: t('analyticsAnalyticsPrograms.activeProgramsDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsPrograms.totalPrograms'), value: programStats.total_programs, percentage: programStats.total_programs_percentage, description: t('analyticsAnalyticsPrograms.totalProgramsDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsPrograms.enrollments'), value: programStats.enrollments, percentage: programStats.enrollments_percentage, description: t('analyticsAnalyticsPrograms.enrollmentsDescription') }), jsx(StatCard, { loading: isStatsLoading, title: t('analyticsAnalyticsPrograms.totalLearners'), value: programStats.total_learners,
232988
233265
  //percentage={programStats.enrollments_percentage}
232989
- description: t('analyticsAnalyticsPrograms.totalLearnersDescription') })] }), (isLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsPrograms.programOvertime'), label: t('analyticsAnalyticsPrograms.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsPrograms.programOvertimeDescription'), children: isLoading ? (jsx(ChartLoading, {})) : (jsx(AnalyticsAreaChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
233266
+ description: t('analyticsAnalyticsPrograms.totalLearnersDescription') })] }), (isStatsLoading || hasEnrollmentStatsPoints) && (jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(ChartCardWrapper, { title: t('analyticsAnalyticsPrograms.programOvertime'), label: t('analyticsAnalyticsPrograms.timeSpent'), filters: enrollmentStatsDateFilter, setOutsideFilters: setEnrollmentStatsDateFilter, description: t('analyticsAnalyticsPrograms.programOvertimeDescription'), children: isStatsLoading ? (jsx(ChartLoading, {})) : (jsx(AnalyticsAreaChart, { data: ((_b = enrollmentStats === null || enrollmentStats === void 0 ? void 0 : enrollmentStats.points) === null || _b === void 0 ? void 0 : _b.map((point) => ({
232990
233267
  date: formatDateToShortFormat(point.date, enrollmentStatsDateFilter.activeFilter === 'today'),
232991
233268
  value: formatSecondsToHours(point.value),
232992
233269
  rawSeconds: point.value,
232993
- }))) || [], tooltipLabel: t('analyticsAnalyticsPrograms.timeSpent'), tooltipValue: (point) => formatSecondsToTime(Number(point.rawSeconds) || 0), tooltipAriaLabel: (label) => t('analyticsAnalyticsPrograms.tooltipAriaLabel', { label }), yTickFormatter: (value) => `${value}h` })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsPrograms.programsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsPrograms.programs') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsPrograms.programs'), description: t('analyticsAnalyticsPrograms.programsTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-program", type: "text", placeholder: t('analyticsAnalyticsPrograms.searchPlaceholder'), value: programsListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsPrograms.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsPrograms.loading') }) })) : ((_c = programsList === null || programsList === void 0 ? void 0 : programsList.programs) === null || _c === void 0 ? void 0 : _c.length) && programsList.programs.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsPrograms.enrollments') })] }) }), jsx(TableBody, { children: programsList.programs.map((program, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => handleProgramClick(program.id), role: "button", tabIndex: 0, onKeyDown: (e) => {
232994
- if (e.key === 'Enter' || e.key === ' ') {
232995
- e.preventDefault();
232996
- handleProgramClick(program.id);
232997
- }
232998
- }, "aria-label": t('analyticsAnalyticsPrograms.viewDetailsAriaLabel', {
232999
- name: program.name,
233000
- }), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: program.name }), jsx(TableCell, { className: "text-muted-foreground", children: program.id }), jsx(TableCell, { className: "text-right", children: program.enrollments.toLocaleString() })] }, program.id))) })] }) }), programsPagination && programsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(1), disabled: programsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsPrograms.goToFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(programsPagination.current_page - 1), disabled: programsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsPrograms.goToPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: programsPagination.total_pages }, (_, i) => i + 1)
233270
+ }))) || [], tooltipLabel: t('analyticsAnalyticsPrograms.timeSpent'), tooltipValue: (point) => formatSecondsToTime(Number(point.rawSeconds) || 0), tooltipAriaLabel: (label) => t('analyticsAnalyticsPrograms.tooltipAriaLabel', { label }), yTickFormatter: (value) => `${value}h` })) }) })), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsPrograms.programsTableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsPrograms.programs') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsPrograms.programs'), description: t('analyticsAnalyticsPrograms.programsTableDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-program", type: "text", placeholder: t('analyticsAnalyticsPrograms.searchPlaceholder'), value: programsListSearch, onChange: handleSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsPrograms.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsPrograms.loading') }) })) : ((_c = programsList === null || programsList === void 0 ? void 0 : programsList.programs) === null || _c === void 0 ? void 0 : _c.length) && programsList.programs.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsPrograms.programId') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsPrograms.enrollments') })] }) }), jsx(TableBody, { children: programsList.programs.map((program, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`,
233271
+ // Mouse shortcut only; the id cell may hold a link,
233272
+ // so the row itself must not be a button —
233273
+ // interactive content inside one is invalid, and
233274
+ // the row's label would rename the link. Keyboard
233275
+ // and screen-reader users open the detail page
233276
+ // through the program name below.
233277
+ onClick: () => handleProgramClick(program.id), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: jsx("button", { type: "button", className: "max-w-full cursor-pointer truncate text-left hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none", onClick: (e) => {
233278
+ e.stopPropagation();
233279
+ handleProgramClick(program.id);
233280
+ }, "aria-label": t('analyticsAnalyticsPrograms.viewDetailsAriaLabel', {
233281
+ name: program.name,
233282
+ }), children: program.name }) }), jsx(TableCell, { className: "text-muted-foreground", children: getProgramURL && program.program_id ? (jsx("a", { href: getProgramURL(program.program_id), target: "_blank", rel: "noopener noreferrer",
233283
+ // The row navigates to the analytics detail
233284
+ // page; this link goes to the program itself.
233285
+ onClick: (e) => e.stopPropagation(), onKeyDown: (e) => e.stopPropagation(), className: "cursor-pointer hover:text-blue-600 hover:underline focus:text-blue-600 focus:outline-none", "aria-label": t('analyticsAnalyticsPrograms.openProgramAriaLabel', {
233286
+ id: program.program_id,
233287
+ }), children: program.id })) : (program.id) }), jsx(TableCell, { className: "text-right", children: program.enrollments.toLocaleString() })] }, program.id))) })] }) }), programsPagination && programsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(1), disabled: programsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsPrograms.goToFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(programsPagination.current_page - 1), disabled: programsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsPrograms.goToPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: programsPagination.total_pages }, (_, i) => i + 1)
233001
233288
  .filter((page) => {
233002
233289
  const current = programsPagination.current_page;
233003
233290
  const total = programsPagination.total_pages;
@@ -233016,28 +233303,34 @@ function AnalyticsPrograms({ tenantKey, mentorId, selectedMentorId, basePath = '
233016
233303
  }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(programsPagination.current_page + 1), disabled: programsPagination.current_page === programsPagination.total_pages, "aria-label": t('analyticsAnalyticsPrograms.goToNextPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToNextPage') }), jsx(ChevronRight, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramsListPage(programsPagination.total_pages), disabled: programsPagination.current_page === programsPagination.total_pages, "aria-label": t('analyticsAnalyticsPrograms.goToLastPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPrograms.goToLastPage') }), jsx(ChevronsRight, { className: "h-4 w-4" })] })] }))] })) : (jsx(EmptyStats, { title: t('analyticsAnalyticsPrograms.noProgramsAvailable') }))] })] }) }) })] }));
233017
233304
  }
233018
233305
 
233019
- function AnalyticsProgramDetail({ tenantKey, mentorId, selectedMentorId, programId, programName, onBack, }) {
233306
+ function AnalyticsProgramDetail({ tenantKey, currentSPA, mentorId, selectedMentorId, programId, programName, onBack, }) {
233020
233307
  var _a, _b;
233021
233308
  const t = useT();
233022
233309
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
233023
- const { programDetailStats, isLoading, programEnrollments, programEnrollmentsSearch, handleProgramEnrollmentsSearchInputChange, setProgramEnrollmentsPage, programEnrollmentsPagination, programInfo, } = usePrograms({
233310
+ const { programDetailStats, isLoading, isDetailStatsLoading, programEnrollments, programEnrollmentsSearch, handleProgramEnrollmentsSearchInputChange, setProgramEnrollmentsPage, programEnrollmentsPagination, programInfo, } = usePrograms({
233024
233311
  tenantKey,
233025
233312
  mentorId: currentMentorId,
233026
233313
  programId,
233027
233314
  });
233028
233315
  const [selectedEnrollment, setSelectedEnrollment] = useState(null);
233029
233316
  const resolvedProgramName = programName || (programInfo === null || programInfo === void 0 ? void 0 : programInfo.name);
233030
- return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsProgramDetail.backAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), resolvedProgramName && (jsx("h2", { className: "flex-1 truncate text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedProgramName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statTotalEnrollments'), value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statTotalEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statActiveEnrollments'), value: programDetailStats.active_enrollments, percentage: programDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statActiveEnrollmentsDescription') }), jsx(StatCard, { loading: isLoading, title: t('analyticsAnalyticsProgramDetail.statCompletedEnrollments'), value: programDetailStats.completed_enrollments, percentage: programDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statCompletedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsProgramDetail.tableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading'), description: t('analyticsAnalyticsProgramDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsProgramDetail.searchPlaceholder'), value: programEnrollmentsSearch, onChange: handleProgramEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsProgramDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsProgramDetail.loadingLabel') }) })) : ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
233031
- programEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colLastActiveOn') })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`, onClick: () => setSelectedEnrollment(enrollment), role: "button", tabIndex: 0, onKeyDown: (e) => {
233032
- if (e.key === 'Enter' || e.key === ' ') {
233033
- e.preventDefault();
233034
- setSelectedEnrollment(enrollment);
233035
- }
233036
- }, "aria-label": t('analyticsAnalyticsProgramDetail.viewProgramProgressAriaLabel', { name: enrollment.name }), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email }), jsx(TableCell, { className: "text-right", children: enrollment.enrollment_date
233317
+ return (jsxs("div", { className: "space-y-8", children: [(onBack || resolvedProgramName) && (jsxs("div", { className: "mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4", children: [jsx("div", { className: "flex flex-1 justify-start", children: onBack && (jsx(Button$1, { variant: "ghost", size: "icon", onClick: onBack, "aria-label": t('analyticsAnalyticsProgramDetail.backAriaLabel'), className: "h-8 w-8 rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white", children: jsx(ArrowLeft, { className: "h-4 w-4" }) })) }), resolvedProgramName && (jsx("h2", { className: "flex-1 truncate text-left text-2xl font-medium text-gray-700 sm:text-center", children: resolvedProgramName })), jsx("div", { className: "hidden flex-1 sm:block" })] })), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-4 mb-6", children: [jsx(StatCard, { loading: isDetailStatsLoading, title: t('analyticsAnalyticsProgramDetail.statTotalEnrollments'), value: programDetailStats.enrollments, percentage: programDetailStats.enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statTotalEnrollmentsDescription') }), jsx(StatCard, { loading: isDetailStatsLoading, title: t('analyticsAnalyticsProgramDetail.statActiveEnrollments'), value: programDetailStats.active_enrollments, percentage: programDetailStats.active_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statActiveEnrollmentsDescription') }), jsx(StatCard, { loading: isDetailStatsLoading, title: t('analyticsAnalyticsProgramDetail.statCompletedEnrollments'), value: programDetailStats.completed_enrollments, percentage: programDetailStats.completed_enrollments_percentage, description: t('analyticsAnalyticsProgramDetail.statCompletedEnrollmentsDescription') })] }), jsx("div", { className: "grid grid-cols-1 gap-6", children: jsx(Card, { className: "w-full bg-white shadow-xs", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", "aria-label": t('analyticsAnalyticsProgramDetail.tableAriaLabel'), children: [jsxs("div", { className: "flex items-center gap-1 mb-4", children: [jsx("h3", { className: "text-base font-medium text-gray-700", children: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading') }), jsx(CardInfoIcon, { title: t('analyticsAnalyticsProgramDetail.enrolledUsersHeading'), description: t('analyticsAnalyticsProgramDetail.enrolledUsersDescription') })] }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "relative flex-1 w-full", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { id: "search-enrolled-user", type: "text", placeholder: t('analyticsAnalyticsProgramDetail.searchPlaceholder'), value: programEnrollmentsSearch, onChange: handleProgramEnrollmentsSearchInputChange, className: "pl-9 border-gray-300 focus:bg-transparent focus:color-transparent h-11", "aria-label": t('analyticsAnalyticsProgramDetail.searchAriaLabel') })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-8", children: jsx("div", { className: "text-sm text-gray-500", children: t('analyticsAnalyticsProgramDetail.loadingLabel') }) })) : ((_a = programEnrollments === null || programEnrollments === void 0 ? void 0 : programEnrollments.enrollments) === null || _a === void 0 ? void 0 : _a.length) &&
233318
+ programEnrollments.enrollments.length > 0 ? (jsxs(Fragment$1, { children: [jsx("div", { className: "rounded-md overflow-x-auto", style: { borderColor: 'oklch(.922 0 0)', borderWidth: '1px' }, children: jsxs(Table, { children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "h-[48px]", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colName') }), jsx(TableHead, { className: "text-left", children: t('analyticsAnalyticsProgramDetail.colEmail') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colEnrollmentDate') }), jsx(TableHead, { className: "text-right", children: t('analyticsAnalyticsProgramDetail.colLastActiveOn') }), jsx(TableHead, { className: "w-[1%] text-right whitespace-nowrap", children: t('analyticsAnalyticsProgramDetail.colProgress') })] }) }), jsx(TableBody, { children: programEnrollments.enrollments.map((enrollment, index) => (jsxs(TableRow, { className: `cursor-pointer hover:bg-muted/50 h-[48px] ${index % 2 === 0 ? 'bg-gray-50' : ''}`,
233319
+ // Mouse shortcut only; the name and email cells hold profile
233320
+ // links, so keyboard and screen-reader users reach the
233321
+ // progress modal through the Progress column's button.
233322
+ onClick: () => setSelectedEnrollment(enrollment), style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx(TableCell, { className: "font-medium", children: enrollment.name && (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: enrollment.username, display: enrollment.name })) }), jsx(TableCell, { className: "text-muted-foreground", children: enrollment.email && (jsx(UserProfileLink, { currentSPA: currentSPA, tenantKey: tenantKey, username: enrollment.username, display: enrollment.email })) }), jsx(TableCell, { className: "text-right", children: enrollment.enrollment_date
233037
233323
  ? new Date(enrollment.enrollment_date).toLocaleDateString()
233038
233324
  : '—' }), jsx(TableCell, { className: "text-right", children: enrollment.last_active_on
233039
233325
  ? new Date(enrollment.last_active_on).toLocaleDateString()
233040
- : '—' })] }, index))) })] }) }), programEnrollmentsPagination && programEnrollmentsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramEnrollmentsPage(1), disabled: programEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsProgramDetail.paginationFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsProgramDetail.paginationFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramEnrollmentsPage(programEnrollmentsPagination.current_page - 1), disabled: programEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsProgramDetail.paginationPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsProgramDetail.paginationPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: programEnrollmentsPagination.total_pages }, (_, i) => i + 1)
233326
+ : '—' }), jsx(TableCell, { className: "text-right", children: jsx(Button$1, { variant: "ghost", size: "icon", className: "h-8 w-8 text-gray-500 hover:text-blue-600", onClick: (e) => {
233327
+ e.stopPropagation();
233328
+ setSelectedEnrollment(enrollment);
233329
+ }, "aria-label": t('analyticsAnalyticsProgramDetail.viewProgramProgressAriaLabel', {
233330
+ name: enrollment.name || enrollment.email,
233331
+ }), title: t('analyticsAnalyticsProgramDetail.viewProgramProgressAriaLabel', {
233332
+ name: enrollment.name || enrollment.email,
233333
+ }), children: jsx(TrendingUp, { className: "h-4 w-4", "aria-hidden": "true" }) }) })] }, index))) })] }) }), programEnrollmentsPagination && programEnrollmentsPagination.total_pages > 1 && (jsxs("div", { className: "flex items-center justify-center space-x-2 py-4", children: [jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramEnrollmentsPage(1), disabled: programEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsProgramDetail.paginationFirstPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsProgramDetail.paginationFirstPage') }), jsx(ChevronsLeft, { className: "h-4 w-4" })] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 w-8 p-2 !w-auto !inline-flex bg-transparent", onClick: () => setProgramEnrollmentsPage(programEnrollmentsPagination.current_page - 1), disabled: programEnrollmentsPagination.current_page === 1, "aria-label": t('analyticsAnalyticsProgramDetail.paginationPreviousPage'), children: [jsx("span", { className: "sr-only", children: t('analyticsAnalyticsProgramDetail.paginationPreviousPage') }), jsx(ChevronLeft, { className: "h-4 w-4" })] }), Array.from({ length: programEnrollmentsPagination.total_pages }, (_, i) => i + 1)
233041
233334
  .filter((page) => {
233042
233335
  const current = programEnrollmentsPagination.current_page;
233043
233336
  const total = programEnrollmentsPagination.total_pages;
@@ -233628,14 +233921,14 @@ function DetailRow({ label, value }) {
233628
233921
  * decided by the `event_type === null` branch: CRUD entries get the field-level
233629
233922
  * `changes` diff, manual events get their `metadata`.
233630
233923
  */
233631
- function PlatformAuditLogDetailSheet({ entry, open, onOpenChange, timeZone, }) {
233924
+ function PlatformAuditLogDetailSheet({ entry, open, onOpenChange, timeZone, platformKey, currentSPA, }) {
233632
233925
  const t = useT();
233633
233926
  const { eventTypeLabel, actionLabel } = usePlatformAuditLabels();
233634
233927
  const isCrudEntry = entry ? entry.event_type === null : false;
233635
233928
  const placeholder = t('analyticsPlatformAuditLogDetailSheet.notAvailable');
233636
233929
  return (jsx(Sheet, { open: open, onOpenChange: onOpenChange, children: jsxs(SheetContent, { side: "right", className: "w-full overflow-y-auto sm:max-w-xl", "data-testid": "platform-audit-detail", children: [jsxs(SheetHeader, { children: [jsx(SheetTitle, { children: t('analyticsPlatformAuditLogDetailSheet.title') }), jsx(SheetDescription, { children: t('analyticsPlatformAuditLogDetailSheet.description') })] }), entry && (jsxs("div", { className: "space-y-6 px-4 pb-6", children: [jsxs("dl", { className: "divide-y divide-gray-100", children: [jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.timestamp'), value: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(DetailRow, { label: isCrudEntry
233637
233930
  ? t('analyticsPlatformAuditLogDetailSheet.action')
233638
- : t('analyticsPlatformAuditLogDetailSheet.event'), value: isCrudEntry ? actionLabel(entry.action) : eventTypeLabel(String(entry.event_type)) }), !isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.action'), value: actionLabel(entry.action) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.actor'), value: entry.actor_username || entry.actor_email ? (jsxs("span", { className: "flex flex-col", children: [entry.actor_username && jsx("span", { children: entry.actor_username }), entry.actor_email && (jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email }))] })) : (placeholder) }), isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.resource'), value: entry.resource_type || entry.resource_repr ? (jsxs("span", { className: "flex flex-col", children: [entry.resource_repr && jsx("span", { children: entry.resource_repr }), jsx("span", { className: "text-xs text-gray-500", children: [
233931
+ : t('analyticsPlatformAuditLogDetailSheet.event'), value: isCrudEntry ? actionLabel(entry.action) : eventTypeLabel(String(entry.event_type)) }), !isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.action'), value: actionLabel(entry.action) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.actor'), value: entry.actor_username || entry.actor_email ? (jsxs("span", { className: "flex flex-col items-start", children: [entry.actor_username && (jsx(UserProfileLink, { tenantKey: platformKey !== null && platformKey !== void 0 ? platformKey : '', currentSPA: currentSPA, username: platformKey ? entry.actor_username : null, display: entry.actor_username })), entry.actor_email && (jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email }))] })) : (placeholder) }), isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.resource'), value: entry.resource_type || entry.resource_repr ? (jsxs("span", { className: "flex flex-col", children: [entry.resource_repr && jsx("span", { children: entry.resource_repr }), jsx("span", { className: "text-xs text-gray-500", children: [
233639
233932
  entry.resource_type ? humanizeAuditToken(entry.resource_type) : null,
233640
233933
  entry.resource_id ? `#${entry.resource_id}` : null,
233641
233934
  ]
@@ -233783,12 +234076,12 @@ const SKELETON_ROW_KEYS = ['a', 'b', 'c', 'd', 'e'];
233783
234076
  function isCrudEntry(entry) {
233784
234077
  return entry.event_type === null;
233785
234078
  }
233786
- function formatActor(entry, placeholder) {
234079
+ function formatActor(entry, placeholder, platformKey, currentSPA) {
233787
234080
  if (!entry.actor_username && !entry.actor_email)
233788
234081
  return null;
233789
- return (jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: entry.actor_username || placeholder }), entry.actor_email && jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email })] }));
234082
+ return (jsxs("span", { className: "flex flex-col items-start", children: [jsx(UserProfileLink, { tenantKey: platformKey, currentSPA: currentSPA, username: entry.actor_username, display: entry.actor_username || placeholder, className: "font-medium text-gray-700" }), entry.actor_email && jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email })] }));
233790
234083
  }
233791
- function AnalyticsPlatformAuditLog({ platformKey, timezone, }) {
234084
+ function AnalyticsPlatformAuditLog({ platformKey, timezone, currentSPA, }) {
233792
234085
  var _a, _b, _c;
233793
234086
  const t = useT();
233794
234087
  const [selectedEntry, setSelectedEntry] = useState(null);
@@ -233815,7 +234108,7 @@ function AnalyticsPlatformAuditLog({ platformKey, timezone, }) {
233815
234108
  timezone: timeZoneLabel,
233816
234109
  }) }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colEvent') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colActor') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colResource') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colIpAddress') }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPlatformAuditLog.colDetails') }) })] }) }), jsx(TableBody, { children: results.map((entry) => {
233817
234110
  const crud = isCrudEntry(entry);
233818
- const actor = formatActor(entry, placeholder);
234111
+ const actor = formatActor(entry, placeholder, platformKey, currentSPA);
233819
234112
  return (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(TableCell, { className: "p-3 text-[#646464]", children: jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: crud
233820
234113
  ? actionLabel(entry.action)
233821
234114
  : eventTypeLabel(String(entry.event_type)) }), jsx("span", { className: "text-xs text-gray-500", children: crud
@@ -233827,7 +234120,7 @@ function AnalyticsPlatformAuditLog({ platformKey, timezone, }) {
233827
234120
  }) })), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }), jsx(PlatformAuditLogDetailSheet, { entry: selectedEntry, open: selectedEntry !== null, onOpenChange: (open) => {
233828
234121
  if (!open)
233829
234122
  setSelectedEntry(null);
233830
- }, timeZone: timeZone })] }));
234123
+ }, timeZone: timeZone, platformKey: platformKey, currentSPA: currentSPA })] }));
233831
234124
  }
233832
234125
 
233833
234126
  const ACTION_LABELS = {
@@ -233978,7 +234271,7 @@ function summarizeChanges(entry) {
233978
234271
  return `${action} ${target}`;
233979
234272
  }
233980
234273
  /** The per-agent change log — the original audit view, unchanged. */
233981
- function AgentAuditLogView({ tenantKey, mentorId, userId, selectedMentorId, }) {
234274
+ function AgentAuditLogView({ tenantKey, mentorId, userId, selectedMentorId, currentSPA, }) {
233982
234275
  var _a;
233983
234276
  const t = useT();
233984
234277
  const currentMentorId = useScopedMentorId(selectedMentorId, mentorId);
@@ -234016,9 +234309,9 @@ function AgentAuditLogView({ tenantKey, mentorId, userId, selectedMentorId, }) {
234016
234309
  }, numberOfMonths: 2 }) })] }), jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: actionFilter !== undefined ? String(actionFilter) : 'all', onValueChange: (val) => {
234017
234310
  setActionFilter(val === 'all' ? undefined : Number(val));
234018
234311
  setPage(1);
234019
- }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsAuditLogStats.allActions') }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.loadError') })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsAnalyticsAuditLogStats.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colUser') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colAction') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colTime') })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: entry.actor_email }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
234312
+ }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsAuditLogStats.allActions') }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.loadError') })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsAnalyticsAuditLogStats.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colUser') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colAction') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colTime') })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: jsx(UserProfileLink, { tenantKey: tenantKey, currentSPA: currentSPA, username: entry.actor_username, display: entry.actor_email || entry.actor_username }) }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
234020
234313
  }
234021
- function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId, defaultScope = 'agent', timezone, canViewPlatformAudit, }) {
234314
+ function AnalyticsAuditLogStats({ tenantKey, currentSPA, mentorId, userId, selectedMentorId, defaultScope = 'agent', timezone, canViewPlatformAudit, }) {
234022
234315
  const t = useT();
234023
234316
  const { currentTenant } = useCurrentTenant();
234024
234317
  const rbacPermissions = useSelector(selectRbacPermissions);
@@ -234041,28 +234334,7 @@ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId,
234041
234334
  : 'font-medium text-gray-500 hover:text-gray-700'), children: [tab.label, active && (jsx("span", { className: "absolute inset-x-0 -bottom-px h-0.5 rounded-sm bg-blue-600" }))] }, tab.value));
234042
234335
  }) }), jsx("p", { className: "hidden pb-2 text-xs text-gray-500 sm:block", children: activeScope === 'agent'
234043
234336
  ? t('analyticsAnalyticsAuditLogStats.scopeAgentHint')
234044
- : t('analyticsAnalyticsAuditLogStats.scopePlatformHint') })] })), activeScope === 'platform' ? (jsx(AnalyticsPlatformAuditLog, { platformKey: tenantKey, timezone: timezone })) : (jsx(AgentAuditLogView, { tenantKey: tenantKey, mentorId: mentorId, userId: userId, selectedMentorId: selectedMentorId }))] }));
234045
- }
234046
-
234047
- function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
234048
- const t = useT();
234049
- const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
234050
- // Update search query with debounce effect handled by the hook
234051
- React__default.useEffect(() => {
234052
- setMentorSearch(searchQuery);
234053
- }, [searchQuery]);
234054
- const isMentorSelected = (mentorId) => {
234055
- return selectedMentorIds.includes(mentorId);
234056
- };
234057
- return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
234058
- const isSelected = isMentorSelected(mentor.unique_id || '');
234059
- const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
234060
- return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
234061
- ? 'border-blue-500 bg-blue-50'
234062
- : isAlreadyAdded
234063
- ? 'bg-blue-25 border-blue-300'
234064
- : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
234065
- })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
234337
+ : t('analyticsAnalyticsAuditLogStats.scopePlatformHint') })] })), activeScope === 'platform' ? (jsx(AnalyticsPlatformAuditLog, { platformKey: tenantKey, timezone: timezone, currentSPA: currentSPA })) : (jsx(AgentAuditLogView, { tenantKey: tenantKey, currentSPA: currentSPA, mentorId: mentorId, userId: userId, selectedMentorId: selectedMentorId }))] }));
234066
234338
  }
234067
234339
 
234068
234340
  /**
@@ -234085,6 +234357,7 @@ function toRowFromMentorMemory(memory) {
234085
234357
  categoryName: (_b = (_a = memory.category) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null,
234086
234358
  categorySlug: (_d = (_c = memory.category) === null || _c === void 0 ? void 0 : _c.slug) !== null && _d !== void 0 ? _d : null,
234087
234359
  learner: memory.email || memory.username,
234360
+ username: memory.username,
234088
234361
  email: memory.email || null,
234089
234362
  mentorId: (_e = memory.mentor_id) !== null && _e !== void 0 ? _e : null,
234090
234363
  mentorName: 'mentor_name' in memory ? ((_f = memory.mentor_name) !== null && _f !== void 0 ? _f : null) : null,
@@ -234100,6 +234373,7 @@ function toRowFromGlobalMemory(memory) {
234100
234373
  categoryName: null,
234101
234374
  categorySlug: null,
234102
234375
  learner: memory.username,
234376
+ username: memory.username,
234103
234377
  email: null,
234104
234378
  mentorId: null,
234105
234379
  mentorName: null,
@@ -234109,50 +234383,40 @@ function toRowFromGlobalMemory(memory) {
234109
234383
  };
234110
234384
  }
234111
234385
  /**
234112
- * Backs the analytics Memory tab. Owns scope selection (including an agent
234113
- * picked through the dropdown's search), the shared filter state, and
234114
- * pagination, and normalizes the three differently-shaped memory endpoints
234115
- * into a single row type.
234386
+ * Backs the analytics Memory tab. Owns scope selection, the shared filter
234387
+ * state and pagination, and normalizes the three differently-shaped memory
234388
+ * endpoints into a single row type.
234116
234389
  *
234117
234390
  * All three list queries are always mounted (RTK Query hooks can't be called
234118
234391
  * conditionally); `skip` keeps only the active scope's request in flight.
234119
234392
  */
234120
234393
  const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234121
- const [searchedMentor, setSearchedMentor] = useState(null);
234122
- // An agent picked from the scope dropdown's search stands in for the route
234123
- // agent, so admins can inspect any agent's memories without leaving the tab.
234124
- const activeMentorId = (searchedMentor === null || searchedMentor === void 0 ? void 0 : searchedMentor.id) || mentorId;
234125
- const hasMentor = !!activeMentorId;
234394
+ const hasMentor = !!mentorId;
234126
234395
  // Global (agent-independent) memories lead: they are the ones that hold for
234127
234396
  // the user everywhere, so the tab opens on them and the dropdown lists them
234128
- // first.
234129
- const availableScopes = useMemo(() => (hasMentor ? ['global', 'mentor', 'all-mentors'] : ['global', 'all-mentors']), [hasMentor]);
234397
+ // first. The agent dimension is whatever the analytics agent picker resolved
234398
+ // to — one agent or all of them — never both, so the tab can't disagree with
234399
+ // the picker about which agents are on screen.
234400
+ const availableScopes = useMemo(() => (hasMentor ? ['global', 'mentor'] : ['global', 'all-mentors']), [hasMentor]);
234130
234401
  const [scope, setScope] = useState('global');
234131
234402
  const [page, setPage] = useState(1);
234132
234403
  const [learnerFilter, setLearnerFilter] = useState('');
234133
234404
  const [categoryFilter, setCategoryFilter] = useState(ALL_CATEGORIES);
234134
234405
  const [contentFilter, setContentFilter] = useState('');
234135
234406
  const [dateRange, setDateRange] = useState(undefined);
234136
- const selectSearchedMentor = useCallback((mentor) => {
234137
- setSearchedMentor(mentor);
234138
- // Categories belong to a single agent, so a slug carried over from the
234139
- // previous one would filter the new agent's memories down to nothing.
234140
- setCategoryFilter(ALL_CATEGORIES);
234141
- if (mentor)
234142
- setScope('mentor');
234143
- }, []);
234144
- // Picking an agent in the analytics switcher is the more explicit choice, so
234145
- // it drops whatever the tab's own search had pinned.
234407
+ // Categories belong to a single agent, so a slug carried over from the
234408
+ // previous one would filter the new agent's memories down to nothing.
234146
234409
  useEffect(() => {
234147
- setSearchedMentor(null);
234148
234410
  setCategoryFilter(ALL_CATEGORIES);
234149
234411
  }, [mentorId]);
234150
- // The agent scope disappears when the analytics page has no agent selected;
234151
- // fall back rather than leaving the tab stuck on an unqueryable scope.
234412
+ // Whichever agent scope the picker just took off the menu, move to the one it
234413
+ // put there — staying put would leave the tab on a scope it no longer offers
234414
+ // (and, for `mentor` without an agent, one it can't even query).
234152
234415
  useEffect(() => {
234153
- if (!hasMentor && scope === 'mentor') {
234416
+ if (!hasMentor && scope === 'mentor')
234154
234417
  setScope('all-mentors');
234155
- }
234418
+ if (hasMentor && scope === 'all-mentors')
234419
+ setScope('mentor');
234156
234420
  }, [hasMentor, scope]);
234157
234421
  // Only the agent-scoped endpoint takes a `category`, and the category list is
234158
234422
  // that agent's. Drop the selection anywhere else so a filter the UI no longer
@@ -234181,7 +234445,7 @@ const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234181
234445
  ...(endDate ? { end_date: endDate } : {}),
234182
234446
  ...(myMemory ? { my_memory: true } : {}),
234183
234447
  }), [page, categoryFilter, learnerFilter, startDate, endDate, myMemory]);
234184
- const { data: mentorList, isLoading: isLoadingMentorList, isFetching: isFetchingMentorList, error: mentorListError, } = useGetMentorMemoriesListQuery({ org: tenantKey, userId, mentorId: activeMentorId !== null && activeMentorId !== void 0 ? activeMentorId : '', params: mentorListParams }, { skip: !hasIdentity || !isMentorScope });
234448
+ const { data: mentorList, isLoading: isLoadingMentorList, isFetching: isFetchingMentorList, error: mentorListError, } = useGetMentorMemoriesListQuery({ org: tenantKey, userId, mentorId: mentorId !== null && mentorId !== void 0 ? mentorId : '', params: mentorListParams }, { skip: !hasIdentity || !isMentorScope });
234185
234449
  // Unpaginated, grouped-by-category companion to the list above. It honors the
234186
234450
  // same filters, so it's the only place we can source aggregates that describe
234187
234451
  // the whole filtered set instead of just the visible page.
@@ -234191,7 +234455,7 @@ const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234191
234455
  ...(endDate ? { end_date: endDate } : {}),
234192
234456
  ...(myMemory ? { my_memory: true } : {}),
234193
234457
  }), [learnerFilter, startDate, endDate, myMemory]);
234194
- const { data: mentorGrouped, isLoading: isLoadingMentorGrouped } = useGetMentorMemoriesQuery({ org: tenantKey, userId, mentorId: activeMentorId !== null && activeMentorId !== void 0 ? activeMentorId : '', params: mentorSnapshotParams }, { skip: !hasIdentity || !isMentorScope });
234458
+ const { data: mentorGrouped, isLoading: isLoadingMentorGrouped } = useGetMentorMemoriesQuery({ org: tenantKey, userId, mentorId: mentorId !== null && mentorId !== void 0 ? mentorId : '', params: mentorSnapshotParams }, { skip: !hasIdentity || !isMentorScope });
234195
234459
  // Deliberately unfiltered by mentor — the point of this scope is to span
234196
234460
  // every agent. Per-agent numbers come from the `mentor` scope instead.
234197
234461
  const allMentorsParams = useMemo(() => ({
@@ -234211,7 +234475,7 @@ const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234211
234475
  ...(endDate ? { end_date: endDate } : {}),
234212
234476
  }), [page, learnerFilter, contentFilter, startDate, endDate]);
234213
234477
  const { data: globalMemories, isLoading: isLoadingGlobal, isFetching: isFetchingGlobal, error: globalError, } = useGetGlobalMemoriesQuery({ org: tenantKey, userId, params: globalParams }, { skip: !hasIdentity || !isGlobalScope });
234214
- const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({ org: tenantKey, mentorId: activeMentorId !== null && activeMentorId !== void 0 ? activeMentorId : '' }, { skip: !tenantKey || !hasMentor });
234478
+ const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({ org: tenantKey, mentorId: mentorId !== null && mentorId !== void 0 ? mentorId : '' }, { skip: !tenantKey || !hasMentor });
234215
234479
  const rows = useMemo(() => {
234216
234480
  var _a, _b, _c;
234217
234481
  if (isMentorScope)
@@ -234275,8 +234539,6 @@ const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234275
234539
  scope,
234276
234540
  setScope,
234277
234541
  availableScopes,
234278
- searchedMentor,
234279
- selectSearchedMentor,
234280
234542
  rows,
234281
234543
  aggregates,
234282
234544
  totalCount,
@@ -234302,59 +234564,48 @@ const useMemory = ({ tenantKey, userId, mentorId, myMemory = false, }) => {
234302
234564
 
234303
234565
  const CELL = 'p-3 text-[#646464]';
234304
234566
  const HEAD = 'p-3 text-left text-sm whitespace-nowrap text-[#646464]';
234305
- /**
234306
- * Action items that share the scope dropdown. Radix rejects empty values and
234307
- * matches the trigger label by value, so these are sentinels the change handler
234308
- * intercepts rather than selectable scopes.
234309
- */
234310
- const SEARCH_AGENTS_ACTION = '__search-agents__';
234311
- const CLEAR_AGENT_ACTION = '__clear-agent__';
234312
- function MemoryDetailDialog({ memory, onClose, scope, }) {
234567
+ function MemoryDetailDialog({ memory, onClose, scope, tenantKey, currentSPA, }) {
234313
234568
  const t = useT();
234314
- return (jsx(Dialog, { open: !!memory, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { className: "max-w-lg", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('analyticsAnalyticsMemoryStats.detailTitle') }) }), memory && (jsxs("div", { className: "space-y-4", children: [jsx("p", { className: "text-sm whitespace-pre-wrap text-gray-700", children: memory.content }), jsxs("dl", { className: "grid grid-cols-2 gap-3 border-t border-gray-100 pt-3 text-xs", children: [jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailUser') }), jsx("dd", { className: "mt-0.5 font-medium break-all text-gray-800", children: memory.learner })] }), memory.categoryName && (jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailCategory') }), jsx("dd", { className: "mt-0.5 font-medium text-gray-800", children: memory.categoryName })] })), scope === 'all-mentors' && (jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailAgent') }), jsx("dd", { className: "mt-0.5 font-medium break-all text-gray-800", children: memory.mentorName || memory.mentorId || '—' })] })), jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailSource') }), jsx("dd", { className: "mt-0.5 font-medium text-gray-800", children: memory.isAutoGenerated
234569
+ return (jsx(Dialog, { open: !!memory, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { className: "max-w-lg", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('analyticsAnalyticsMemoryStats.detailTitle') }) }), memory && (jsxs("div", { className: "space-y-4", children: [jsx("p", { className: "text-sm whitespace-pre-wrap text-gray-700", children: memory.content }), jsxs("dl", { className: "grid grid-cols-2 gap-3 border-t border-gray-100 pt-3 text-xs", children: [jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailUser') }), jsx("dd", { className: "mt-0.5 font-medium break-all text-gray-800", children: jsx(UserProfileLink, { tenantKey: tenantKey, currentSPA: currentSPA, username: memory.username, display: memory.learner }) })] }), memory.categoryName && (jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailCategory') }), jsx("dd", { className: "mt-0.5 font-medium text-gray-800", children: memory.categoryName })] })), scope === 'all-mentors' && (jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailAgent') }), jsx("dd", { className: "mt-0.5 font-medium break-all text-gray-800", children: jsx(AgentScopeLink, { uniqueId: memory.mentorId, name: memory.mentorName, fallback: "\u2014",
234570
+ // Re-scoping reloads the table underneath; this dialog
234571
+ // would otherwise stay open on a memory that the new
234572
+ // scope may not even list.
234573
+ onScoped: onClose }) })] })), jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailSource') }), jsx("dd", { className: "mt-0.5 font-medium text-gray-800", children: memory.isAutoGenerated
234315
234574
  ? t('analyticsAnalyticsMemoryStats.sourceAuto')
234316
234575
  : t('analyticsAnalyticsMemoryStats.sourceManual') })] }), jsxs("div", { children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailCaptured') }), jsx("dd", { className: "mt-0.5 font-medium text-gray-800", children: format$1(new Date(memory.createdAt), "MMM dd, yyyy 'at' h:mm a") })] }), memory.sourceSessionId && (jsxs("div", { className: "col-span-2", children: [jsx("dt", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.detailSession') }), jsx("dd", { className: "mt-0.5 font-mono text-[11px] break-all text-gray-800", children: memory.sourceSessionId })] }))] })] }))] }) }));
234317
234576
  }
234318
- function AgentSearchDialog({ tenantKey, open, onClose, selectedMentorId, onSelect, }) {
234319
- const t = useT();
234320
- const [query, setQuery] = useState('');
234321
- return (jsx(Dialog, { open: open, onOpenChange: (next) => !next && onClose(), children: jsxs(DialogContent, { className: "max-w-2xl", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('analyticsAnalyticsMemoryStats.searchAgentsTitle') }) }), jsx(MentorSelectionGrid, { tenantKey: tenantKey, searchQuery: query, onSearchChange: setQuery, selectedMentorIds: selectedMentorId ? [selectedMentorId] : [], itemsPerPage: 6, minHeight: "240px", onMentorSelect: (mentor) => {
234322
- if (!(mentor === null || mentor === void 0 ? void 0 : mentor.unique_id))
234323
- return;
234324
- onSelect({ id: mentor.unique_id, name: mentor.name });
234325
- onClose();
234326
- } })] }) }));
234327
- }
234328
234577
  /**
234329
234578
  * Analytics "Memory" tab. Surfaces the memories memsearch captures while users
234330
- * chat with agents, across three scopes: the selected agent, every agent in the
234331
- * tenant, and global (agent-independent) memories. The scope dropdown also
234332
- * offers an agent search, so any agent's memories can be pulled up without
234333
- * leaving the tab.
234579
+ * chat with agents.
234580
+ *
234581
+ * The scope dropdown is a single choice between global (agent-independent)
234582
+ * memories and the agent dimension, which follows the control bar's agent
234583
+ * picker rather than repeating it: with an agent picked it reads "This Agent"
234584
+ * (named), and with none it reads "All Agents".
234334
234585
  *
234335
234586
  * Hosts are expected to gate this behind `GET .../memsearch-status/`; the
234336
234587
  * component itself only handles the per-request permission failure (403).
234337
234588
  */
234338
- function AnalyticsMemoryStats({ tenantKey, mentorId, userId, selectedMentorId, myMemory = false, }) {
234589
+ function AnalyticsMemoryStats({ tenantKey, mentorId, userId, selectedMentorId, myMemory = false, currentSPA, }) {
234339
234590
  const t = useT();
234340
234591
  const scopedMentorId = useScopedMentorId(selectedMentorId, mentorId);
234592
+ const { scopedMentor } = useAnalyticsScope();
234341
234593
  const [selectedMemory, setSelectedMemory] = useState(null);
234342
- const [agentSearchOpen, setAgentSearchOpen] = useState(false);
234343
234594
  // The content search is committed on Enter/blur rather than per-keystroke so
234344
234595
  // we don't fire a request (and reset pagination) on every character typed.
234345
234596
  const [contentInput, setContentInput] = useState('');
234346
- const { scope, setScope, availableScopes, searchedMentor, selectSearchedMentor, rows, aggregates, categories, isLoading, error, isForbidden, page, setPage, totalPages, learnerFilter, setLearnerFilter, categoryFilter, setCategoryFilter, setContentFilter, dateRange, setDateRange, } = useMemory({
234597
+ const { scope, setScope, availableScopes, rows, aggregates, categories, isLoading, error, isForbidden, page, setPage, totalPages, learnerFilter, setLearnerFilter, categoryFilter, setCategoryFilter, setContentFilter, dateRange, setDateRange, } = useMemory({
234347
234598
  tenantKey,
234348
234599
  userId,
234349
- // The agent scope picker feeds the same slot the route agent would, so the
234350
- // tab's own agent search still overrides it (`searchedMentor || mentorId`)
234351
- // rather than the two controls fighting over the scope.
234600
+ // The only agent input: whatever the control bar's picker (or the route)
234601
+ // resolved to. The tab no longer picks an agent of its own.
234352
234602
  mentorId: scopedMentorId,
234353
234603
  myMemory,
234354
234604
  });
234355
234605
  const scopeLabels = {
234356
- // A searched agent takes over the agent scope, so name it in the trigger.
234357
- mentor: (searchedMentor === null || searchedMentor === void 0 ? void 0 : searchedMentor.name) || t('analyticsAnalyticsMemoryStats.scopeMentor'),
234606
+ // Name the picked agent where the picker knows it, so the trigger says
234607
+ // which agent "This Agent" means.
234608
+ mentor: (scopedMentor === null || scopedMentor === void 0 ? void 0 : scopedMentor.name) || t('analyticsAnalyticsMemoryStats.scopeMentor'),
234358
234609
  'all-mentors': t('analyticsAnalyticsMemoryStats.scopeAllMentors'),
234359
234610
  global: t('analyticsAnalyticsMemoryStats.scopeGlobal'),
234360
234611
  };
@@ -234366,19 +234617,7 @@ function AnalyticsMemoryStats({ tenantKey, mentorId, userId, selectedMentorId, m
234366
234617
  if (isForbidden) {
234367
234618
  return (jsx(Card, { className: "rounded-lg border border-gray-100 bg-white shadow-sm", children: jsx(CardContent, { className: "p-8 text-center", children: jsx("p", { className: "text-gray-500", children: t('analyticsAnalyticsMemoryStats.noPermission') }) }) }));
234368
234619
  }
234369
- return (jsxs("div", { className: "space-y-6", children: [jsx("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: jsxs("div", { className: "flex flex-col gap-3 lg:flex-row", children: [jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: scope, onValueChange: (value) => {
234370
- // The trailing items are actions, not scopes — the Select stays
234371
- // on whatever scope is currently active.
234372
- if (value === SEARCH_AGENTS_ACTION) {
234373
- setAgentSearchOpen(true);
234374
- return;
234375
- }
234376
- if (value === CLEAR_AGENT_ACTION) {
234377
- selectSearchedMentor(null);
234378
- return;
234379
- }
234380
- setScope(value);
234381
- }, children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsMemoryStats.scopeLabel'), children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [availableScopes.map((value) => (jsx(SelectItem, { value: value, children: scopeLabels[value] }, value))), jsx(SelectSeparator, {}), jsx(SelectItem, { value: SEARCH_AGENTS_ACTION, children: jsxs("span", { className: "flex items-center gap-2", children: [jsx(Search, { className: "h-3.5 w-3.5" }), t('analyticsAnalyticsMemoryStats.searchAgents')] }) }), searchedMentor && (jsx(SelectItem, { value: CLEAR_AGENT_ACTION, children: jsxs("span", { className: "flex items-center gap-2", children: [jsx(X$1, { className: "h-3.5 w-3.5" }), t('analyticsAnalyticsMemoryStats.clearAgentSearch')] }) }))] })] }) }), jsx("div", { className: "min-w-[200px] flex-1", children: jsx(UserFilterSelect, { tenantKey: tenantKey, currentUsername: userId, value: learnerFilter, onChange: setLearnerFilter }) }), scope === 'global' && (jsx("form", { className: "min-w-[180px] flex-1", onSubmit: (event) => {
234620
+ return (jsxs("div", { className: "space-y-6", children: [jsx("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: jsxs("div", { className: "flex flex-col gap-3 lg:flex-row", children: [jsx("div", { className: "min-w-[160px]", children: jsxs(Select$1, { value: scope, onValueChange: (value) => setScope(value), children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsMemoryStats.scopeLabel'), children: jsx(SelectValue, {}) }), jsx(SelectContent, { children: availableScopes.map((value) => (jsx(SelectItem, { value: value, children: scopeLabels[value] }, value))) })] }) }), jsx("div", { className: "min-w-[200px] flex-1", children: jsx(UserFilterSelect, { tenantKey: tenantKey, currentUsername: userId, value: learnerFilter, onChange: setLearnerFilter }) }), scope === 'global' && (jsx("form", { className: "min-w-[180px] flex-1", onSubmit: (event) => {
234382
234621
  event.preventDefault();
234383
234622
  setContentFilter(contentInput.trim());
234384
234623
  }, children: jsx(Input, { value: contentInput, onChange: (event) => setContentInput(event.target.value), onBlur: () => setContentFilter(contentInput.trim()), placeholder: t('analyticsAnalyticsMemoryStats.contentPlaceholder'), "aria-label": t('analyticsAnalyticsMemoryStats.contentPlaceholder'), className: "h-9 bg-white" }) })), jsxs(Popover, { modal: true, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "flex h-9 w-full items-center gap-2 bg-white font-normal whitespace-nowrap lg:w-auto", children: [jsx(Calendar$1, { className: "h-4 w-4" }), (dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.to)
@@ -234393,8 +234632,8 @@ function AnalyticsMemoryStats({ tenantKey, mentorId, userId, selectedMentorId, m
234393
234632
  }) })] }), jsx("div", { className: "h-2 w-full overflow-hidden rounded-full bg-gray-100", children: jsx("div", { className: "h-full rounded-full bg-blue-600", style: { width: `${percent}%` } }) })] }, category.slug));
234394
234633
  }) })] })), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex w-full items-center justify-center py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsMemoryStats.loadError') })) : rows.length === 0 ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsAnalyticsMemoryStats.noMemories') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: HEAD, children: t('analyticsAnalyticsMemoryStats.colUser') }), jsx(TableHead, { className: HEAD, children: t('analyticsAnalyticsMemoryStats.colMemory') }), showAgentColumn && (jsx(TableHead, { className: HEAD, children: t('analyticsAnalyticsMemoryStats.colAgent') })), showCategoryColumn && (jsx(TableHead, { className: HEAD, children: t('analyticsAnalyticsMemoryStats.colCategory') })), jsx(TableHead, { className: HEAD, children: t('analyticsAnalyticsMemoryStats.colCaptured') })] }) }), jsx(TableBody, { children: rows.map((row) => {
234395
234634
  var _a;
234396
- return (jsxs(TableRow, { onClick: () => setSelectedMemory(row), className: "cursor-pointer border-b border-[oklch(0.922_0_0)] last:border-0 hover:bg-gray-50", children: [jsx(TableCell, { className: cn(CELL, 'font-medium whitespace-nowrap'), children: row.learner }), jsx(TableCell, { className: cn(CELL, 'min-w-[280px]'), children: jsx("span", { className: "line-clamp-2", children: row.content }) }), showAgentColumn && (jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: row.mentorName || row.mentorId || '—' })), showCategoryColumn && (jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: row.categoryName ? (jsx("span", { className: "rounded-md bg-blue-100 px-2 py-1 text-xs text-blue-700", children: row.categoryName })) : ('—') })), jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: formatDistanceToNow(new Date(row.createdAt), { addSuffix: true }) })] }, `${(_a = row.mentorId) !== null && _a !== void 0 ? _a : 'global'}-${row.id}`));
234397
- }) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading }), jsx(MemoryDetailDialog, { memory: selectedMemory, scope: scope, onClose: () => setSelectedMemory(null) }), agentSearchOpen && (jsx(AgentSearchDialog, { open: true, tenantKey: tenantKey, selectedMentorId: searchedMentor === null || searchedMentor === void 0 ? void 0 : searchedMentor.id, onSelect: selectSearchedMentor, onClose: () => setAgentSearchOpen(false) }))] }));
234635
+ return (jsxs(TableRow, { onClick: () => setSelectedMemory(row), className: "cursor-pointer border-b border-[oklch(0.922_0_0)] last:border-0 hover:bg-gray-50", children: [jsx(TableCell, { className: cn(CELL, 'font-medium whitespace-nowrap'), children: jsx(UserProfileLink, { tenantKey: tenantKey, currentSPA: currentSPA, username: row.username, display: row.learner }) }), jsx(TableCell, { className: cn(CELL, 'min-w-[280px]'), children: jsx("span", { className: "line-clamp-2", children: row.content }) }), showAgentColumn && (jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: jsx(AgentScopeLink, { uniqueId: row.mentorId, name: row.mentorName, fallback: "\u2014" }) })), showCategoryColumn && (jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: row.categoryName ? (jsx("span", { className: "rounded-md bg-blue-100 px-2 py-1 text-xs text-blue-700", children: row.categoryName })) : ('—') })), jsx(TableCell, { className: cn(CELL, 'whitespace-nowrap'), children: formatDistanceToNow(new Date(row.createdAt), { addSuffix: true }) })] }, `${(_a = row.mentorId) !== null && _a !== void 0 ? _a : 'global'}-${row.id}`));
234636
+ }) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading }), jsx(MemoryDetailDialog, { memory: selectedMemory, scope: scope, tenantKey: tenantKey, currentSPA: currentSPA, onClose: () => setSelectedMemory(null) })] }));
234398
234637
  }
234399
234638
 
234400
234639
  const SkeletonMultiplier = ({ Skeleton, multiplier }) => {
@@ -241337,6 +241576,27 @@ var minimumMentorAlert = /*#__PURE__*/Object.freeze({
241337
241576
  MinimumMentorAlert: MinimumMentorAlert
241338
241577
  });
241339
241578
 
241579
+ function MentorSelectionGrid({ selectedMentorIds, onMentorSelect, searchQuery, onSearchChange, tenantKey, itemsPerPage = 8, showSearch = true, minHeight = '400px', }) {
241580
+ const t = useT();
241581
+ const { agents: mentors, isLoading: isMentorsLoading, isFetching: isMentorsFetching, currentPage, totalPages, setSearchQuery: setMentorSearch, handlePageChange, } = useAgentSearchWithPagination({ tenantKey, itemsPerPage });
241582
+ // Update search query with debounce effect handled by the hook
241583
+ React__default.useEffect(() => {
241584
+ setMentorSearch(searchQuery);
241585
+ }, [searchQuery]);
241586
+ const isMentorSelected = (mentorId) => {
241587
+ return selectedMentorIds.includes(mentorId);
241588
+ };
241589
+ return (jsxs("div", { className: "space-y-4", children: [showSearch && (jsxs("div", { className: "relative", children: [isMentorsFetching ? (jsx(Spinner, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })) : (jsx(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform text-gray-400" })), jsx(Input, { placeholder: t('mentorsMentorSelectionGrid.searchAgentsPlaceholder'), value: searchQuery, onChange: (e) => onSearchChange(e.target.value), className: "h-10 border-gray-200 pl-10 focus:border-blue-500 focus:ring-0" })] })), jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "grid max-h-96 auto-rows-min grid-cols-1 items-start gap-3 overflow-y-auto rounded-lg border border-gray-200 p-4 md:max-h-none md:grid-cols-2", style: { minHeight }, children: isMentorsLoading ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.loadingAgents') })) : mentors.length === 0 ? (jsx("div", { className: "col-span-full py-8 text-center text-gray-500", children: t('mentorsMentorSelectionGrid.noAgentsFound') })) : (mentors.map((mentor) => {
241590
+ const isSelected = isMentorSelected(mentor.unique_id || '');
241591
+ const isAlreadyAdded = selectedMentorIds.includes(mentor.unique_id || '');
241592
+ return (jsxs("button", { onClick: () => onMentorSelect(mentor), className: `flex cursor-pointer items-center gap-3 rounded-lg border-2 p-3 transition-all ${isSelected
241593
+ ? 'border-blue-500 bg-blue-50'
241594
+ : isAlreadyAdded
241595
+ ? 'bg-blue-25 border-blue-300'
241596
+ : 'border-gray-200 hover:border-gray-300 hover:bg-gray-50'}`, children: [jsxs(Avatar, { className: "h-12 w-12 flex-shrink-0", children: [jsx(AvatarImage, { src: mentor.profile_image || '/placeholder.svg', alt: mentor.name }), jsx(AvatarFallback, { children: mentor.name.substring(0, 2) })] }), jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-start text-left", children: [jsx("h4", { className: "truncate text-sm font-medium text-gray-900", children: mentor.name }), jsx("p", { className: "line-clamp-2 text-xs text-gray-600", children: mentor.description })] }), isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-600", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) })), isAlreadyAdded && !isSelected && (jsx("div", { className: "flex-shrink-0", children: jsx("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-blue-400", children: jsx(Check, { className: "h-4 w-4 text-white" }) }) }))] }, mentor.unique_id));
241597
+ })) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isMentorsFetching || isMentorsLoading })] })] }));
241598
+ }
241599
+
241340
241600
  function CreateProjectModal({ isOpen, onClose, tenantKey, username, navigateToMentorInProject, }) {
241341
241601
  const t = useT();
241342
241602
  const dispatch = useDispatch();
@@ -245812,5 +246072,5 @@ var trainOrDeleteModal = /*#__PURE__*/Object.freeze({
245812
246072
  TrainOrDeleteModal: TrainOrDeleteModal
245813
246073
  });
245814
246074
 
245815
- export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAgentPicker, AnalyticsAreaChart, AnalyticsAuditLogStats, AnalyticsBarChart, AnalyticsControlBar, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsGlobalFiltersProvider, AnalyticsLayout, AnalyticsLlmUsageStats, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsNotice, AnalyticsOverview, AnalyticsPlatformAuditLog, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsScopeProvider, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTraces, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, AuditLogChangesView, AuditLogJsonView, BUY_NOW_LABEL, BillingTab, CATALOGS, CHART_ORDINAL_RAMP, CHART_SERIES_COLORS, CHART_SINGLE_SERIES_COLOR, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CardInfoIcon, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChartTooltipCard, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_LLM_CHANGED_EVENT, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MemoryAdminTab, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_FIELD_TYPES, ONBOARDING_SECTORS, OnboardingField, OnboardingShell, OnboardingWizard, PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD, PLATFORM_AUDIT_PAGE_SIZE, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformAuditLogDetailSheet, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RankedBars, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SERVICE_COLOR_ORDER, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, SourceChip, Spinner, StatCard, StepHeader, SummerNoteTextEditor, TAURI_COMMANDS, TAURI_EVENTS, TRACES_PAGE_SIZE, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, TrendSparkline, USER_ONBOARDING_FORM_SLUG, USER_ONBOARDING_FORM_VERSION, USER_ONBOARDING_SUBMISSION_SLUG, UpgradePackageModal, UserAvatar, UserOnboardingWizard, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, areChartFiltersEqual, availablePlacementExams, buildOnboardingAgentPath, buildUserOnboardingFormMetadata, buildUserOnboardingSubmissionMetadata, coerceOnboardingAgent, coerceOnboardingAgents, coerceUserOnboardingForm, colorForRank, colorForSeries, emptyUserOnboardingForm, findLastResumeBlock, findOnboardingAgent, findSequentialParent, flattenVerticalBlocks, formatAuditTimestamp, formatCompactNumber, formatLatencySeconds, formatTimeZoneLabel, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, granularityForFilter, hasOnboardingContent, humanizeAuditToken, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLlmUsageForbidden, isLlmUsageUnavailable, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, isValidTimeZone, llmUsageDateArgs, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, readUserOnboardingForm, readUserOnboardingSubmission, readUserOnboardingSubmissions, resolveAuditTimeZone, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsGlobalFilters, useAnalyticsScope, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLlmTraces, useLlmUsage, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, usePlatformAuditLabels, usePlatformAuditLog, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useScopedMentorDbId, useScopedMentorId, useSelectedLocalModel, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
246075
+ export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentScopeLink, AgentSkills, AlertsTab, AnalyticsAgentPicker, AnalyticsAreaChart, AnalyticsAuditLogStats, AnalyticsBarChart, AnalyticsControlBar, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsGlobalFiltersProvider, AnalyticsLayout, AnalyticsLlmUsageStats, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsNotice, AnalyticsOverview, AnalyticsPlatformAuditLog, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsScopeProvider, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTraces, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, AuditLogChangesView, AuditLogJsonView, BUY_NOW_LABEL, BillingTab, CATALOGS, CHART_ORDINAL_RAMP, CHART_SERIES_COLORS, CHART_SINGLE_SERIES_COLOR, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CardInfoIcon, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChartTooltipCard, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_LLM_CHANGED_EVENT, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MemoryAdminTab, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_FIELD_TYPES, ONBOARDING_SECTORS, OnboardingField, OnboardingShell, OnboardingWizard, PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD, PLATFORM_AUDIT_PAGE_SIZE, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformAuditLogDetailSheet, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RankedBars, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SERVICE_COLOR_ORDER, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, SourceChip, Spinner, StatCard, StepHeader, SummerNoteTextEditor, TAURI_COMMANDS, TAURI_EVENTS, TRACES_PAGE_SIZE, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, TrendSparkline, USER_ONBOARDING_FORM_SLUG, USER_ONBOARDING_FORM_VERSION, USER_ONBOARDING_SUBMISSION_SLUG, UpgradePackageModal, UserAvatar, UserOnboardingWizard, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, areChartFiltersEqual, availablePlacementExams, buildOnboardingAgentPath, buildUserOnboardingFormMetadata, buildUserOnboardingSubmissionMetadata, coerceOnboardingAgent, coerceOnboardingAgents, coerceUserOnboardingForm, colorForRank, colorForSeries, emptyUserOnboardingForm, findLastResumeBlock, findOnboardingAgent, findSequentialParent, flattenVerticalBlocks, formatAuditTimestamp, formatCompactNumber, formatLatencySeconds, formatTimeZoneLabel, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, granularityForFilter, hasOnboardingContent, humanizeAuditToken, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLlmUsageForbidden, isLlmUsageUnavailable, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, isValidTimeZone, llmUsageDateArgs, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, readUserOnboardingForm, readUserOnboardingSubmission, readUserOnboardingSubmissions, resolveAuditTimeZone, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsGlobalFilters, useAnalyticsScope, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLlmTraces, useLlmUsage, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, usePlatformAuditLabels, usePlatformAuditLog, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useScopedMentorDbId, useScopedMentorId, useSelectedLocalModel, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
245816
246076
  //# sourceMappingURL=index.esm.js.map