nestlens 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/api/dto/cursor-query.dto.js +9 -1
  2. package/dist/core/data-masker.service.js +27 -5
  3. package/dist/dashboard/public/assets/{BatchDetailView-CNyv7Vc1.js → BatchDetailView-S21SOoT4.js} +1 -1
  4. package/dist/dashboard/public/assets/{BatchesPage-BrvAux3V.js → BatchesPage-B4mRZv-7.js} +1 -1
  5. package/dist/dashboard/public/assets/{CacheDetailView-CtmDMMR2.js → CacheDetailView-CUN4Xlj1.js} +1 -1
  6. package/dist/dashboard/public/assets/{CachePage-D-LhEY8p.js → CachePage-sSG3fOH-.js} +1 -1
  7. package/dist/dashboard/public/assets/{CommandDetailView-B_6u-4-M.js → CommandDetailView-DOnJl4--.js} +1 -1
  8. package/dist/dashboard/public/assets/{CommandsPage-BtMSnG2A.js → CommandsPage-DGSwYx1i.js} +1 -1
  9. package/dist/dashboard/public/assets/{CopyButton-C2sNp4HP.js → CopyButton-DkKluR16.js} +1 -1
  10. package/dist/dashboard/public/assets/{DashboardPage-wUYPGV_y.js → DashboardPage-DMggZXZm.js} +1 -1
  11. package/dist/dashboard/public/assets/{DataTable-PCSvmOPj.js → DataTable-CQVsrmrF.js} +1 -1
  12. package/dist/dashboard/public/assets/{DetailRow-CfonsGvS.js → DetailRow-CR50H99O.js} +1 -1
  13. package/dist/dashboard/public/assets/{DumpDetailView-DGy7eSQl.js → DumpDetailView-CB2MK264.js} +1 -1
  14. package/dist/dashboard/public/assets/{DumpsPage-jeUeiAuN.js → DumpsPage-BFejJT0i.js} +1 -1
  15. package/dist/dashboard/public/assets/{EntryDetailPage-C5QubCqk.js → EntryDetailPage-jW_ZykXS.js} +3 -3
  16. package/dist/dashboard/public/assets/{EntrySearchInput-DLuCL4Ys.js → EntrySearchInput-DRSpv1XV.js} +1 -1
  17. package/dist/dashboard/public/assets/{EventDetailView-DrExHdP3.js → EventDetailView-_Sg4kaoC.js} +1 -1
  18. package/dist/dashboard/public/assets/{EventsPage-CA-mVFw2.js → EventsPage-BGCQccD5.js} +1 -1
  19. package/dist/dashboard/public/assets/{ExceptionDetailView-xmNdG8Nb.js → ExceptionDetailView-wg6kccnW.js} +1 -1
  20. package/dist/dashboard/public/assets/{ExceptionsPage-D6ww4tft.js → ExceptionsPage-BP0Omwzc.js} +1 -1
  21. package/dist/dashboard/public/assets/{GateDetailView-Db3NrQmm.js → GateDetailView-B2GkdfXI.js} +1 -1
  22. package/dist/dashboard/public/assets/{GatesPage-CuEy3xE1.js → GatesPage-BQrbIY_I.js} +1 -1
  23. package/dist/dashboard/public/assets/{GraphQLDetailView-DZPwXidi.js → GraphQLDetailView-CVKiNjx8.js} +1 -1
  24. package/dist/dashboard/public/assets/{GraphQLPage-D4vF4fhg.js → GraphQLPage-DdXPF_EJ.js} +1 -1
  25. package/dist/dashboard/public/assets/{HttpClientDetailView-7v6RERdZ.js → HttpClientDetailView-BOKfN_N3.js} +1 -1
  26. package/dist/dashboard/public/assets/{HttpClientPage-Dz07Icgz.js → HttpClientPage-Dc4CyjM2.js} +1 -1
  27. package/dist/dashboard/public/assets/{JobDetailView-DrDFXY-t.js → JobDetailView-DGB3YKwK.js} +1 -1
  28. package/dist/dashboard/public/assets/{JobsPage-C7MOQ5N5.js → JobsPage-BtHUaYit.js} +1 -1
  29. package/dist/dashboard/public/assets/{LogDetailView-OhpY0czv.js → LogDetailView-Bg5bExCD.js} +1 -1
  30. package/dist/dashboard/public/assets/{LogsPage-CELJRQdo.js → LogsPage-DCO8kMBG.js} +1 -1
  31. package/dist/dashboard/public/assets/{MailDetailView-rmPDboFn.js → MailDetailView-Bh1b9g3u.js} +1 -1
  32. package/dist/dashboard/public/assets/{MailPage-CPmDY6cW.js → MailPage-yMJfR2pc.js} +1 -1
  33. package/dist/dashboard/public/assets/{ModelDetailView-DVh-32OU.js → ModelDetailView-C03CykA7.js} +1 -1
  34. package/dist/dashboard/public/assets/{ModelsPage-Bi2hB6U7.js → ModelsPage-DjLplWf-.js} +1 -1
  35. package/dist/dashboard/public/assets/{NotificationDetailView-C_IGKjY3.js → NotificationDetailView-BTOXMue0.js} +1 -1
  36. package/dist/dashboard/public/assets/{NotificationsPage-Bn3roYs1.js → NotificationsPage-Dw_KBVVy.js} +1 -1
  37. package/dist/dashboard/public/assets/{PageHeader-CIBDYg8j.js → PageHeader-Ce9Hbh0m.js} +1 -1
  38. package/dist/dashboard/public/assets/{QueriesPage-DzWPvH8G.js → QueriesPage-sxyFCofb.js} +1 -1
  39. package/dist/dashboard/public/assets/{QueryDetailView-RUxW9Uqs.js → QueryDetailView-D3qcL29Q.js} +1 -1
  40. package/dist/dashboard/public/assets/{RedisDetailView-Ceo27Mx3.js → RedisDetailView-BXlR80r_.js} +1 -1
  41. package/dist/dashboard/public/assets/{RedisPage-pBNy_8Qd.js → RedisPage-CJTBRYRA.js} +1 -1
  42. package/dist/dashboard/public/assets/{RequestDetailView-t5odupt4.js → RequestDetailView-BXn6Lehg.js} +1 -1
  43. package/dist/dashboard/public/assets/{RequestsPage-B2dLu5n_.js → RequestsPage-DzT18Gb7.js} +1 -1
  44. package/dist/dashboard/public/assets/{ScheduleDetailView-D8OZ-_yh.js → ScheduleDetailView-DKDN8aDq.js} +1 -1
  45. package/dist/dashboard/public/assets/{SchedulePage-CZ_j6ucP.js → SchedulePage-DpUQnTKK.js} +1 -1
  46. package/dist/dashboard/public/assets/{UserCard-Dom0aCbz.js → UserCard-BY0J84X6.js} +1 -1
  47. package/dist/dashboard/public/assets/{ViewDetailView-Bxd64RN9.js → ViewDetailView-DcZJa3Wh.js} +1 -1
  48. package/dist/dashboard/public/assets/{ViewsPage-Bvm7RI_3.js → ViewsPage-BrVbaxmk.js} +1 -1
  49. package/dist/dashboard/public/assets/{calendar-BMPz0Z6s.js → calendar-DHSpyI4Y.js} +1 -1
  50. package/dist/dashboard/public/assets/{circle-alert-t2lIvGjF.js → circle-alert-CraCmO0F.js} +1 -1
  51. package/dist/dashboard/public/assets/{circle-check-big-DfHJ1LXS.js → circle-check-big-ebbAguBz.js} +1 -1
  52. package/dist/dashboard/public/assets/{circle-x-Cgixh9fi.js → circle-x-CJZEsYDL.js} +1 -1
  53. package/dist/dashboard/public/assets/{eye-DRW5kZff.js → eye-BEruVuaB.js} +1 -1
  54. package/dist/dashboard/public/assets/{index-DOVqOa07.js → index-f3yHnTBu.js} +2 -2
  55. package/dist/dashboard/public/assets/{search-DgNz5G1h.js → search-B0XZ1Fr6.js} +1 -1
  56. package/dist/dashboard/public/assets/{send-BKsI3HhT.js → send-C1Uq07c-.js} +1 -1
  57. package/dist/dashboard/public/assets/{timer-hkll0vuQ.js → timer-Dk6Eg1NI.js} +1 -1
  58. package/dist/dashboard/public/assets/{types-nsz9P0qo.js → types-DZrHs5Iv.js} +1 -1
  59. package/dist/dashboard/public/assets/{users-CTNyAW4A.js → users-Bz2xBYFa.js} +1 -1
  60. package/dist/dashboard/public/assets/{zap-BolYLTQe.js → zap-C4mgfWMp.js} +1 -1
  61. package/dist/dashboard/public/index.html +1 -1
  62. package/package.json +1 -1
@@ -33,6 +33,8 @@ const ENTRY_TYPES = [
33
33
  'dump',
34
34
  'graphql',
35
35
  ];
36
+ /** Names that reach an object's prototype rather than its own properties. */
37
+ const UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
36
38
  /**
37
39
  * Complete cursor query DTO that combines pagination with all filter types.
38
40
  * Replaces 50+ individual @Query parameters with a single typed DTO.
@@ -43,9 +45,15 @@ class CursorQueryDto {
43
45
  * Returns undefined if no filters are set
44
46
  */
45
47
  toFilters() {
46
- const filters = {};
48
+ // Built without a prototype, and with the three names that reach one
49
+ // refused outright. The validation pipe runs with `whitelist: true`, so a
50
+ // query parameter the DTO does not declare is stripped before this runs —
51
+ // but that is a setting in another file, and a key taken from a request and
52
+ // written to an object should not depend on it.
53
+ const filters = Object.create(null);
47
54
  for (const [key, value] of Object.entries(this)) {
48
55
  if (!CursorQueryDto.PAGINATION_KEYS.includes(key) &&
56
+ !UNSAFE_KEYS.includes(key) &&
49
57
  value !== undefined &&
50
58
  typeof value !== 'function') {
51
59
  filters[key] = value;
@@ -93,6 +93,31 @@ const matchesSensitiveTerm = (fieldName, terms) => {
93
93
  const normalized = normalizeFieldName(fieldName);
94
94
  return terms.some((term) => term.length > 0 && normalized.includes(term));
95
95
  };
96
+ /**
97
+ * Replaces `(/absolute/path/to/file.js:1:2)` with `(...)`.
98
+ *
99
+ * Scanned rather than matched. The regex this replaces —
100
+ * `/\(\/[^)]+\)/g` — backtracks from every `(/` in a line with no closing
101
+ * parenthesis, which is quadratic in the length of a line that arrives inside
102
+ * an exception NestLens did not throw. A stack frame is attacker-influenced
103
+ * often enough — a thrown string, a message echoed back from a request — and
104
+ * this runs on every entry that carries one.
105
+ */
106
+ function replaceParenthesisedPaths(line) {
107
+ let result = '';
108
+ let index = 0;
109
+ while (index < line.length) {
110
+ const open = line.indexOf('(/', index);
111
+ if (open === -1)
112
+ break;
113
+ const close = line.indexOf(')', open + 2);
114
+ if (close === -1)
115
+ break;
116
+ result += line.slice(index, open) + '(...)';
117
+ index = close + 1;
118
+ }
119
+ return result + line.slice(index);
120
+ }
96
121
  let DataMaskerService = class DataMaskerService {
97
122
  constructor(config) {
98
123
  const headers = [...DEFAULT_SENSITIVE_HEADERS, ...(config?.sensitiveHeaders ?? [])];
@@ -216,11 +241,8 @@ let DataMaskerService = class DataMaskerService {
216
241
  // In production, simplify the stack trace
217
242
  return stack
218
243
  .split('\n')
219
- .map((line) => {
220
- // Remove absolute file paths, keep only relative paths
221
- return line.replace(/\(\/[^)]+\)/g, '(...)');
222
- })
223
- .slice(0, 10) // Limit to first 10 lines
244
+ .slice(0, 10) // Only the first ten lines are kept, so only they are scanned
245
+ .map((line) => replaceParenthesisedPaths(line))
224
246
  .join('\n');
225
247
  }
226
248
  /**
@@ -1 +1 @@
1
- import{j as e,L as o,A as y,C as u}from"./index-DOVqOa07.js";import{p as n,f as v}from"./badgeColors-DQ_P_DOX.js";import{D as r,f as k}from"./DetailRow-CfonsGvS.js";import{C as m}from"./types-nsz9P0qo.js";import{C as w}from"./CopyButton-C2sNp4HP.js";import{C as g}from"./circle-x-Cgixh9fi.js";import{C as j}from"./circle-alert-t2lIvGjF.js";import{C}from"./circle-check-big-DfHJ1LXS.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-C5QubCqk.js";import"./search-DgNz5G1h.js";const p={completed:{icon:C,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},partial:{icon:j,color:"text-yellow-500",bg:"bg-yellow-100 dark:bg-yellow-900/30"},failed:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"}};function h(a){return a?a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}KB`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}MB`:`${(a/(1024*1024*1024)).toFixed(1)}GB`:"-"}function E({entry:a}){const{payload:s,createdAt:c}=a,t=p[s.status]||p.completed,f=t.icon,{processedItems:x,totalItems:d,failedItems:l}=s,i=d>0?Math.round(x/d*100):0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Batch Operation"})]})]}),e.jsx(w,{text:s.name,label:"Copy batch name"})]})}),e.jsxs("div",{className:`grid ${s.memory!==void 0?"grid-cols-2 md:grid-cols-5":"grid-cols-2 md:grid-cols-4"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Progress"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[i,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"%"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),l>0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Failed"})]}),e.jsx("p",{className:"text-lg font-bold text-red-600 dark:text-red-400",children:l})]}),s.memory!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Memory"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:h(s.memory)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(r,{label:"Time",value:e.jsxs("span",{children:[k(n(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(n(c),{addSuffix:!0}),")"]})]})}),e.jsx(r,{label:"Name",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.name})}),s.operation&&e.jsx(r,{label:"Operation",value:e.jsx(m,{listType:"batches",filterType:"operations",filterValue:s.operation,children:s.operation})}),e.jsx(r,{label:"Status",value:e.jsx(m,{listType:"batches",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(r,{label:"Progress",value:e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-mono",children:[x," / ",d," (",i,"%)"]}),e.jsx("div",{className:"mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:e.jsx("div",{className:"bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all",style:{width:`${i}%`}})})]})}),l>0&&e.jsx(r,{label:"Failed Items",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-mono",children:l})}),e.jsx(r,{label:"Duration",value:`${s.duration}ms`}),s.batchSize&&e.jsx(r,{label:"Batch Size",value:s.batchSize}),s.memory!==void 0&&e.jsx(r,{label:"Memory",value:h(s.memory)})]})})]}),s.errors&&s.errors.length>0&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(j,{className:"h-5 w-5 text-red-500"}),e.jsxs("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:["Errors (",s.errors.length,")"]})]})}),e.jsx("div",{className:"divide-y divide-red-200 dark:divide-red-800",children:s.errors.map((N,b)=>e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:N})},b))})]})]})}export{E as default};
1
+ import{j as e,L as o,A as y,C as u}from"./index-f3yHnTBu.js";import{p as n,f as v}from"./badgeColors-DQ_P_DOX.js";import{D as r,f as k}from"./DetailRow-CR50H99O.js";import{C as m}from"./types-DZrHs5Iv.js";import{C as w}from"./CopyButton-DkKluR16.js";import{C as g}from"./circle-x-CJZEsYDL.js";import{C as j}from"./circle-alert-CraCmO0F.js";import{C}from"./circle-check-big-ebbAguBz.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-jW_ZykXS.js";import"./search-B0XZ1Fr6.js";const p={completed:{icon:C,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},partial:{icon:j,color:"text-yellow-500",bg:"bg-yellow-100 dark:bg-yellow-900/30"},failed:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"}};function h(a){return a?a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}KB`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}MB`:`${(a/(1024*1024*1024)).toFixed(1)}GB`:"-"}function E({entry:a}){const{payload:s,createdAt:c}=a,t=p[s.status]||p.completed,f=t.icon,{processedItems:x,totalItems:d,failedItems:l}=s,i=d>0?Math.round(x/d*100):0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Batch Operation"})]})]}),e.jsx(w,{text:s.name,label:"Copy batch name"})]})}),e.jsxs("div",{className:`grid ${s.memory!==void 0?"grid-cols-2 md:grid-cols-5":"grid-cols-2 md:grid-cols-4"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Progress"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[i,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"%"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),l>0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Failed"})]}),e.jsx("p",{className:"text-lg font-bold text-red-600 dark:text-red-400",children:l})]}),s.memory!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Memory"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:h(s.memory)})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(r,{label:"Time",value:e.jsxs("span",{children:[k(n(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(n(c),{addSuffix:!0}),")"]})]})}),e.jsx(r,{label:"Name",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.name})}),s.operation&&e.jsx(r,{label:"Operation",value:e.jsx(m,{listType:"batches",filterType:"operations",filterValue:s.operation,children:s.operation})}),e.jsx(r,{label:"Status",value:e.jsx(m,{listType:"batches",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(r,{label:"Progress",value:e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-mono",children:[x," / ",d," (",i,"%)"]}),e.jsx("div",{className:"mt-2 w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:e.jsx("div",{className:"bg-blue-600 dark:bg-blue-500 h-2 rounded-full transition-all",style:{width:`${i}%`}})})]})}),l>0&&e.jsx(r,{label:"Failed Items",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-mono",children:l})}),e.jsx(r,{label:"Duration",value:`${s.duration}ms`}),s.batchSize&&e.jsx(r,{label:"Batch Size",value:s.batchSize}),s.memory!==void 0&&e.jsx(r,{label:"Memory",value:h(s.memory)})]})})]}),s.errors&&s.errors.length>0&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(j,{className:"h-5 w-5 text-red-500"}),e.jsxs("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:["Errors (",s.errors.length,")"]})]})}),e.jsx("div",{className:"divide-y divide-red-200 dark:divide-red-800",children:s.errors.map((N,b)=>e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:N})},b))})]})]})}export{E as default};
@@ -1 +1 @@
1
- import{j as t,L as d}from"./index-DOVqOa07.js";import{e as D,b as F}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./badgeColors-DQ_P_DOX.js";import{u as A,P as L,N as R,L as $}from"./PageHeader-CIBDYg8j.js";import{u as I,q as H,C as c}from"./types-nsz9P0qo.js";import{T as s,D as S,b as W}from"./DataTable-PCSvmOPj.js";function K(){const h=D(),{addFilter:o,clearAll:p,serverFilters:u,headerFilters:x,hasFilters:m}=I("batches"),{entries:g,loading:y,refreshing:i,newEntriesCount:f,hasMore:j,loadMore:b,loadNew:k,autoRefreshEnabled:C,live:N,setAutoRefresh:w,meta:n,isHighlighted:E}=A({type:"batch",limit:50,filters:u}),l=g.filter(e=>H(e)),v=F.useMemo(()=>[{key:"name",header:"Name",minWidth:"200px",render:e=>t.jsx(s,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.name})},{key:"operation",header:"Operation",width:"150px",render:e=>{const a=e.payload.operation;return a?t.jsx(c,{onClick:r=>{r.stopPropagation(),o("operations",a)},children:a}):t.jsx(s,{secondary:!0,children:"-"})}},{key:"progress",header:"Progress",width:"150px",render:e=>{const{processedItems:a,totalItems:r}=e.payload,B=r>0?Math.round(a/r*100):0;return t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(s,{children:`${a}/${r}`}),t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",B,"%)"]})]})}},{key:"status",header:"Status",width:"120px",render:e=>t.jsx(c,{onClick:a=>{a.stopPropagation(),o("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(S,{ms:e.payload.duration}):t.jsx(s,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(s,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[o]);if(y&&l.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const P=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(L,{title:"Batches",icon:d,iconColor:"text-blue-600 dark:text-blue-400",count:l.length,totalCount:n==null?void 0:n.total,refreshing:i,autoRefreshEnabled:C,live:N,onAutoRefreshToggle:w,filters:x,onClearAllFilters:p}),t.jsxs("div",{className:`${P} space-y-4 transition-all duration-200`,children:[t.jsx(R,{count:f,onClick:k,loading:i}),t.jsx(W,{columns:v,data:l,keyExtractor:e=>e.id,onRowClick:e=>h(`/batches/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No batch operations recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx($,{hasMore:j,onClick:b,loading:i})]})]})}export{K as default};
1
+ import{j as t,L as d}from"./index-f3yHnTBu.js";import{e as D,b as F}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./badgeColors-DQ_P_DOX.js";import{u as A,P as L,N as R,L as $}from"./PageHeader-Ce9Hbh0m.js";import{u as I,q as H,C as c}from"./types-DZrHs5Iv.js";import{T as s,D as S,b as W}from"./DataTable-CQVsrmrF.js";function K(){const h=D(),{addFilter:o,clearAll:p,serverFilters:u,headerFilters:x,hasFilters:m}=I("batches"),{entries:g,loading:y,refreshing:i,newEntriesCount:f,hasMore:j,loadMore:b,loadNew:k,autoRefreshEnabled:C,live:N,setAutoRefresh:w,meta:n,isHighlighted:E}=A({type:"batch",limit:50,filters:u}),l=g.filter(e=>H(e)),v=F.useMemo(()=>[{key:"name",header:"Name",minWidth:"200px",render:e=>t.jsx(s,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.name})},{key:"operation",header:"Operation",width:"150px",render:e=>{const a=e.payload.operation;return a?t.jsx(c,{onClick:r=>{r.stopPropagation(),o("operations",a)},children:a}):t.jsx(s,{secondary:!0,children:"-"})}},{key:"progress",header:"Progress",width:"150px",render:e=>{const{processedItems:a,totalItems:r}=e.payload,B=r>0?Math.round(a/r*100):0;return t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(s,{children:`${a}/${r}`}),t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["(",B,"%)"]})]})}},{key:"status",header:"Status",width:"120px",render:e=>t.jsx(c,{onClick:a=>{a.stopPropagation(),o("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(S,{ms:e.payload.duration}):t.jsx(s,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(s,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[o]);if(y&&l.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const P=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(L,{title:"Batches",icon:d,iconColor:"text-blue-600 dark:text-blue-400",count:l.length,totalCount:n==null?void 0:n.total,refreshing:i,autoRefreshEnabled:C,live:N,onAutoRefreshToggle:w,filters:x,onClearAllFilters:p}),t.jsxs("div",{className:`${P} space-y-4 transition-all duration-200`,children:[t.jsx(R,{count:f,onClick:k,loading:i}),t.jsx(W,{columns:v,data:l,keyExtractor:e=>e.id,onRowClick:e=>h(`/batches/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No batch operations recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx($,{hasMore:j,onClick:b,loading:i})]})]})}export{K as default};
@@ -1,4 +1,4 @@
1
- import{c as h,j as e,D as d,C as g}from"./index-DOVqOa07.js";import{p as o,f as p}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as b}from"./DetailRow-CfonsGvS.js";import{C as x}from"./types-nsz9P0qo.js";import{u as j,C as y,T as f}from"./EntryDetailPage-C5QubCqk.js";import{C as u}from"./CopyButton-C2sNp4HP.js";import{C as N}from"./circle-check-big-DfHJ1LXS.js";import{C as v}from"./circle-x-Cgixh9fi.js";import{T as k}from"./timer-hkll0vuQ.js";import"./vendor-DBTT3jXp.js";import"./search-DgNz5G1h.js";/**
1
+ import{c as h,j as e,D as d,C as g}from"./index-f3yHnTBu.js";import{p as o,f as p}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as b}from"./DetailRow-CR50H99O.js";import{C as x}from"./types-DZrHs5Iv.js";import{u as j,C as y,T as f}from"./EntryDetailPage-jW_ZykXS.js";import{C as u}from"./CopyButton-DkKluR16.js";import{C as N}from"./circle-check-big-ebbAguBz.js";import{C as v}from"./circle-x-CJZEsYDL.js";import{T as k}from"./timer-Dk6Eg1NI.js";import"./vendor-DBTT3jXp.js";import"./search-B0XZ1Fr6.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as a,H as o}from"./index-DOVqOa07.js";import{e as T,b as E}from"./vendor-DBTT3jXp.js";import{f as v,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as M,P as R,N as A,L as F}from"./PageHeader-CIBDYg8j.js";import{u as H,f as P,C as l}from"./types-nsz9P0qo.js";import{T as i,D as B,b as I}from"./DataTable-PCSvmOPj.js";function V(){const n=T(),{clearAll:d,serverFilters:c,headerFilters:h,hasFilters:p}=H("cache"),{entries:u,loading:x,refreshing:t,newEntriesCount:m,hasMore:y,loadMore:g,loadNew:f,autoRefreshEnabled:j,live:k,setAutoRefresh:C,meta:r,isHighlighted:w}=M({type:"cache",limit:50,filters:c}),s=u.filter(e=>P(e)),N=E.useMemo(()=>[{key:"operation",header:"Operation",width:"100px",render:e=>a.jsx(l,{listType:"cache",filterType:"operations",children:e.payload.operation})},{key:"key",header:"Key",minWidth:"200px",render:e=>a.jsx(i,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.key.length>50?e.payload.key.substring(0,50)+"...":e.payload.key})},{key:"result",header:"Result",width:"80px",align:"center",render:e=>e.payload.operation==="get"?a.jsx(l,{listType:"cache",filterType:"tags",filterValue:e.payload.hit?"hit":"miss",children:e.payload.hit?"HIT":"MISS"}):a.jsx(i,{secondary:!0,children:"—"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(B,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:v(D(e.createdAt),{addSuffix:!0})})}],[]);if(x&&s.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(R,{title:"Cache",icon:o,iconColor:"text-cyan-600 dark:text-cyan-400",count:s.length,totalCount:r==null?void 0:r.total,refreshing:t,autoRefreshEnabled:j,live:k,onAutoRefreshToggle:C,filters:h,onClearAllFilters:d}),a.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[a.jsx(A,{count:m,onClick:f,loading:t}),a.jsx(I,{columns:N,data:s,keyExtractor:e=>e.id,onRowClick:e=>n(`/cache/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No cache operations recorded yet",emptyIcon:a.jsx(o,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(F,{hasMore:y,onClick:g,loading:t})]})]})}export{V as default};
1
+ import{j as a,H as o}from"./index-f3yHnTBu.js";import{e as T,b as E}from"./vendor-DBTT3jXp.js";import{f as v,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as M,P as R,N as A,L as F}from"./PageHeader-Ce9Hbh0m.js";import{u as H,f as P,C as l}from"./types-DZrHs5Iv.js";import{T as i,D as B,b as I}from"./DataTable-CQVsrmrF.js";function V(){const n=T(),{clearAll:d,serverFilters:c,headerFilters:h,hasFilters:p}=H("cache"),{entries:u,loading:x,refreshing:t,newEntriesCount:m,hasMore:y,loadMore:g,loadNew:f,autoRefreshEnabled:j,live:k,setAutoRefresh:C,meta:r,isHighlighted:w}=M({type:"cache",limit:50,filters:c}),s=u.filter(e=>P(e)),N=E.useMemo(()=>[{key:"operation",header:"Operation",width:"100px",render:e=>a.jsx(l,{listType:"cache",filterType:"operations",children:e.payload.operation})},{key:"key",header:"Key",minWidth:"200px",render:e=>a.jsx(i,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.key.length>50?e.payload.key.substring(0,50)+"...":e.payload.key})},{key:"result",header:"Result",width:"80px",align:"center",render:e=>e.payload.operation==="get"?a.jsx(l,{listType:"cache",filterType:"tags",filterValue:e.payload.hit?"hit":"miss",children:e.payload.hit?"HIT":"MISS"}):a.jsx(i,{secondary:!0,children:"—"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(B,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:v(D(e.createdAt),{addSuffix:!0})})}],[]);if(x&&s.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(R,{title:"Cache",icon:o,iconColor:"text-cyan-600 dark:text-cyan-400",count:s.length,totalCount:r==null?void 0:r.total,refreshing:t,autoRefreshEnabled:j,live:k,onAutoRefreshToggle:C,filters:h,onClearAllFilters:d}),a.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[a.jsx(A,{count:m,onClick:f,loading:t}),a.jsx(I,{columns:N,data:s,keyExtractor:e=>e.id,onRowClick:e=>n(`/cache/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No cache operations recorded yet",emptyIcon:a.jsx(o,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(F,{hasMore:y,onClick:g,loading:t})]})]})}export{V as default};
@@ -1 +1 @@
1
- import{j as e,a as m,C as p}from"./index-DOVqOa07.js";import{b as v}from"./vendor-DBTT3jXp.js";import{p as h,f as N}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as k}from"./DetailRow-CfonsGvS.js";import{C as b}from"./types-nsz9P0qo.js";import{u as c,C as n,T as C}from"./EntryDetailPage-C5QubCqk.js";import{C as T}from"./CopyButton-C2sNp4HP.js";import{C as w}from"./circle-check-big-DfHJ1LXS.js";import{C as g}from"./circle-x-Cgixh9fi.js";import"./search-DgNz5G1h.js";function I({entry:u}){const{payload:a,createdAt:x}=u,d=c(),l=c(),o=c(),[i,j]=v.useState("payload"),r=a.status==="completed"?{icon:w,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:a.status==="executing"?{icon:p,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},y=r.icon,s=[];a.payload!==void 0&&s.push({id:"payload",label:"Payload",content:e.jsx(n,{data:a.payload,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),a.result!==void 0&&s.push({id:"result",label:"Result",content:e.jsx(n,{data:a.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}),a.metadata!==void 0&&s.push({id:"metadata",label:"Metadata",content:e.jsx(n,{data:a.metadata,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})});const f=()=>{if(i==="payload"&&a.payload!==void 0)return e.jsx(d.Toolbar,{data:a.payload});if(i==="result"&&a.result!==void 0)return e.jsx(l.Toolbar,{data:a.result});if(i==="metadata"&&a.metadata!==void 0)return e.jsx(o.Toolbar,{data:a.metadata})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(m,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Command Execution"})]})]}),e.jsx(T,{text:a.name,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.name,children:a.name})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[k(h(x),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",N(h(x),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Command",value:e.jsx(b,{listType:"commands",filterType:"names",filterValue:a.name,children:a.name})}),a.handler&&e.jsx(t,{label:"Handler",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.handler})}),e.jsx(t,{label:"Status",value:e.jsx(b,{listType:"commands",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(t,{label:"Duration",value:a.duration!==void 0?`${a.duration}ms`:"-"})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),s.length>0&&e.jsx(C,{tabs:s,defaultTab:"payload",hashKey:"command",headerRight:f(),onTabChange:j})]})}export{I as default};
1
+ import{j as e,a as m,C as p}from"./index-f3yHnTBu.js";import{b as v}from"./vendor-DBTT3jXp.js";import{p as h,f as N}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as k}from"./DetailRow-CR50H99O.js";import{C as b}from"./types-DZrHs5Iv.js";import{u as c,C as n,T as C}from"./EntryDetailPage-jW_ZykXS.js";import{C as T}from"./CopyButton-DkKluR16.js";import{C as w}from"./circle-check-big-ebbAguBz.js";import{C as g}from"./circle-x-CJZEsYDL.js";import"./search-B0XZ1Fr6.js";function I({entry:u}){const{payload:a,createdAt:x}=u,d=c(),l=c(),o=c(),[i,j]=v.useState("payload"),r=a.status==="completed"?{icon:w,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:a.status==="executing"?{icon:p,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},y=r.icon,s=[];a.payload!==void 0&&s.push({id:"payload",label:"Payload",content:e.jsx(n,{data:a.payload,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),a.result!==void 0&&s.push({id:"result",label:"Result",content:e.jsx(n,{data:a.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})}),a.metadata!==void 0&&s.push({id:"metadata",label:"Metadata",content:e.jsx(n,{data:a.metadata,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})});const f=()=>{if(i==="payload"&&a.payload!==void 0)return e.jsx(d.Toolbar,{data:a.payload});if(i==="result"&&a.result!==void 0)return e.jsx(l.Toolbar,{data:a.result});if(i==="metadata"&&a.metadata!==void 0)return e.jsx(o.Toolbar,{data:a.metadata})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(m,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Command Execution"})]})]}),e.jsx(T,{text:a.name,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.name,children:a.name})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(t,{label:"Time",value:e.jsxs("span",{children:[k(h(x),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",N(h(x),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Command",value:e.jsx(b,{listType:"commands",filterType:"names",filterValue:a.name,children:a.name})}),a.handler&&e.jsx(t,{label:"Handler",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.handler})}),e.jsx(t,{label:"Status",value:e.jsx(b,{listType:"commands",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(t,{label:"Duration",value:a.duration!==void 0?`${a.duration}ms`:"-"})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),s.length>0&&e.jsx(C,{tabs:s,defaultTab:"payload",hashKey:"command",headerRight:f(),onTabChange:j})]})}export{I as default};
@@ -1 +1 @@
1
- import{j as a,a as l}from"./index-DOVqOa07.js";import{e as P,b as T}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as A,P as M,N as R,L as B}from"./PageHeader-CIBDYg8j.js";import{u as H,o as L,C as d}from"./types-nsz9P0qo.js";import{T as i,D as W,b as S}from"./DataTable-PCSvmOPj.js";function J(){const m=P(),{addFilter:t,clearAll:c,serverFilters:u,headerFilters:h,hasFilters:p}=H("commands"),{entries:x,loading:g,refreshing:r,newEntriesCount:f,hasMore:y,loadMore:C,loadNew:j,autoRefreshEnabled:k,live:N,setAutoRefresh:w,meta:s,isHighlighted:b}=A({type:"command",limit:50,filters:u}),o=x.filter(e=>L(e)),E=T.useMemo(()=>[{key:"name",header:"Command",minWidth:"250px",render:e=>a.jsx(d,{onClick:n=>{n.stopPropagation(),t("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"handler",header:"Handler",minWidth:"200px",render:e=>e.payload.handler?a.jsx(i,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.handler}):a.jsx(i,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(d,{onClick:n=>{n.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(W,{ms:e.payload.duration??0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const v=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(M,{title:"Commands",icon:l,iconColor:"text-green-600 dark:text-green-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,live:N,onAutoRefreshToggle:w,filters:h,onClearAllFilters:c}),a.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[a.jsx(R,{count:f,onClick:j,loading:r}),a.jsx(S,{columns:E,data:o,keyExtractor:e=>e.id,onRowClick:e=>m(`/commands/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No commands recorded yet",emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:y,onClick:C,loading:r})]})]})}export{J as default};
1
+ import{j as a,a as l}from"./index-f3yHnTBu.js";import{e as P,b as T}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as A,P as M,N as R,L as B}from"./PageHeader-Ce9Hbh0m.js";import{u as H,o as L,C as d}from"./types-DZrHs5Iv.js";import{T as i,D as W,b as S}from"./DataTable-CQVsrmrF.js";function J(){const m=P(),{addFilter:t,clearAll:c,serverFilters:u,headerFilters:h,hasFilters:p}=H("commands"),{entries:x,loading:g,refreshing:r,newEntriesCount:f,hasMore:y,loadMore:C,loadNew:j,autoRefreshEnabled:k,live:N,setAutoRefresh:w,meta:s,isHighlighted:b}=A({type:"command",limit:50,filters:u}),o=x.filter(e=>L(e)),E=T.useMemo(()=>[{key:"name",header:"Command",minWidth:"250px",render:e=>a.jsx(d,{onClick:n=>{n.stopPropagation(),t("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"handler",header:"Handler",minWidth:"200px",render:e=>e.payload.handler?a.jsx(i,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.handler}):a.jsx(i,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(d,{onClick:n=>{n.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(W,{ms:e.payload.duration??0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const v=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(M,{title:"Commands",icon:l,iconColor:"text-green-600 dark:text-green-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,live:N,onAutoRefreshToggle:w,filters:h,onClearAllFilters:c}),a.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[a.jsx(R,{count:f,onClick:j,loading:r}),a.jsx(S,{columns:E,data:o,keyExtractor:e=>e.id,onRowClick:e=>m(`/commands/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No commands recorded yet",emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:y,onClick:C,loading:r})]})]})}export{J as default};
@@ -1,3 +1,3 @@
1
- import{j as e,z as n}from"./index-DOVqOa07.js";import{b as p}from"./vendor-DBTT3jXp.js";import{a as i,b as c}from"./EntryDetailPage-C5QubCqk.js";function y({text:l,label:r="Copy",successMessage:x="Copied to clipboard!",className:t="",iconOnly:d=!1}){const[s,a]=p.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(l),a(!0),n.success(x),setTimeout(()=>a(!1),2e3)}catch{n.error("Failed to copy")}};return d?e.jsx("button",{onClick:o,className:`p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${t}`,title:r,children:s?e.jsx(i,{className:"h-4 w-4 text-green-500"}):e.jsx(c,{className:"h-4 w-4 text-gray-500"})}):e.jsx("button",{onClick:o,className:`inline-flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-lg
1
+ import{j as e,z as n}from"./index-f3yHnTBu.js";import{b as p}from"./vendor-DBTT3jXp.js";import{a as i,b as c}from"./EntryDetailPage-jW_ZykXS.js";function y({text:l,label:r="Copy",successMessage:x="Copied to clipboard!",className:t="",iconOnly:d=!1}){const[s,a]=p.useState(!1),o=async()=>{try{await navigator.clipboard.writeText(l),a(!0),n.success(x),setTimeout(()=>a(!1),2e3)}catch{n.error("Failed to copy")}};return d?e.jsx("button",{onClick:o,className:`p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors ${t}`,title:r,children:s?e.jsx(i,{className:"h-4 w-4 text-green-500"}):e.jsx(c,{className:"h-4 w-4 text-gray-500"})}):e.jsx("button",{onClick:o,className:`inline-flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-lg
2
2
  bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600
3
3
  text-gray-700 dark:text-gray-300 transition-colors ${t}`,children:s?e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"h-4 w-4 text-green-500"}),e.jsx("span",{children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(c,{className:"h-4 w-4"}),e.jsx("span",{children:r})]})})}export{y as C};
@@ -1,4 +1,4 @@
1
- import{c as D,u as ge,j as e,D as ae,T as A,C as R,A as M,G as xe,F as me,B as ue,P as ye,a as be,H as B,b as he,L as pe,d as ke,M as fe,e as ve,R as je,f as Ne,S as we,g as V,h as W,i as Se,k as _,l as K,r as qe,m as Y}from"./index-DOVqOa07.js";import{e as Ce,b as c,L as Ee}from"./vendor-DBTT3jXp.js";import{g as Pe,f,p as v}from"./badgeColors-DQ_P_DOX.js";import{Z as Te}from"./zap-BolYLTQe.js";import{C as $e}from"./calendar-BMPz0Z6s.js";/**
1
+ import{c as D,u as ge,j as e,D as ae,T as A,C as R,A as M,G as xe,F as me,B as ue,P as ye,a as be,H as B,b as he,L as pe,d as ke,M as fe,e as ve,R as je,f as Ne,S as we,g as V,h as W,i as Se,k as _,l as K,r as qe,m as Y}from"./index-f3yHnTBu.js";import{e as Ce,b as c,L as Ee}from"./vendor-DBTT3jXp.js";import{g as Pe,f,p as v}from"./badgeColors-DQ_P_DOX.js";import{Z as Te}from"./zap-C4mgfWMp.js";import{C as $e}from"./calendar-DHSpyI4Y.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as A,j as e,g as S}from"./index-DOVqOa07.js";import{b as c}from"./vendor-DBTT3jXp.js";import{g as b}from"./badgeColors-DQ_P_DOX.js";/**
1
+ import{c as A,j as e,g as S}from"./index-f3yHnTBu.js";import{b as c}from"./vendor-DBTT3jXp.js";import{g as b}from"./badgeColors-DQ_P_DOX.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{t as m,a as M,c as b,n as _,b as E,m as Q,d as F,e as B}from"./badgeColors-DQ_P_DOX.js";import{j as T}from"./index-DOVqOa07.js";function Y(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.weekStartsOn)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,a=m(r,e==null?void 0:e.in),s=a.getDay(),i=(s<n?7:0)+s-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function D(r,e){return Y(r,{...e,weekStartsOn:1})}function H(r,e){const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=b(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=D(a),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const u=D(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function S(r,e){const t=m(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function X(r,e,t){const[n,a]=_(t==null?void 0:t.in,r,e),s=S(n),i=S(a),u=+s-E(s),o=+i-E(i);return Math.round((u-o)/Q)}function L(r,e){const t=H(r,e),n=b(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),D(n)}function R(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function I(r){return!(!R(r)&&typeof r!="number"||isNaN(+m(r)))}function j(r,e){const t=m(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function $(r,e){const t=m(r,e==null?void 0:e.in);return X(t,j(t))+1}function V(r,e){const t=m(r,e==null?void 0:e.in),n=+D(t)-+L(t);return Math.round(n/F)+1}function C(r,e){var h,O,x,k;const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=M(),s=(e==null?void 0:e.firstWeekContainsDate)??((O=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(x=a.locale)==null?void 0:x.options)==null?void 0:k.firstWeekContainsDate)??1,i=b((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const u=Y(i,e),o=b((e==null?void 0:e.in)||r,0);o.setFullYear(n,0,s),o.setHours(0,0,0,0);const l=Y(o,e);return+t>=+u?n+1:+t>=+l?n:n-1}function J(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.firstWeekContainsDate)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,a=C(r,e),s=b((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),Y(s,e)}function K(r,e){const t=m(r,e==null?void 0:e.in),n=+Y(t,e)-+J(t,e);return Math.round(n/F)+1}function c(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const g={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return c(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):c(t+1,2)},d(r,e){return c(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return c(r.getHours()%12||12,e.length)},H(r,e){return c(r.getHours(),e.length)},m(r,e){return c(r.getMinutes(),e.length)},s(r,e){return c(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return c(a,e.length)}},y={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},W={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return g.y(r,e)},Y:function(r,e,t,n){const a=C(r,n),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return c(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):c(s,e.length)},R:function(r,e){const t=H(r);return c(t,e.length)},u:function(r,e){const t=r.getFullYear();return c(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return c(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return c(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return g.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return c(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=K(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(r,e,t){const n=V(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):c(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):g.d(r,e)},D:function(r,e,t){const n=$(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):c(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return c(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return c(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=y.noon:n===0?a=y.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=y.evening:n>=12?a=y.afternoon:n>=4?a=y.morning:a=y.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return g.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):g.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):g.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):g.s(r,e)},S:function(r,e){return g.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return w(n);case"XXXXX":case"XXX":default:return w(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return w(n);case"xxxxx":case"xxx":default:return w(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(n,":");case"OOOO":default:return"GMT"+w(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(n,":");case"zzzz":default:return"GMT"+w(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return c(n,e.length)},T:function(r,e,t){return c(+r,e.length)}};function q(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+c(s,2)}function N(r,e){return r%60===0?(r>0?"-":"+")+c(Math.abs(r)/60,2):w(r,e)}function w(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=c(Math.trunc(n/60),2),s=c(n%60,2);return t+a+e+s}const v=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},U=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return v(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",v(n,e)).replace("{{time}}",G(a,e))},Z={p:G,P:U},A=/^D+$/,z=/^Y+$/,p=["D","DD","YY","YYYY"];function ee(r){return A.test(r)}function te(r){return z.test(r)}function re(r,e,t){const n=ne(r,e,t);if(console.warn(n),p.includes(r))throw new RangeError(n)}function ne(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,se=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ce=/^'([^]*?)'?$/,ie=/''/g,ue=/[a-zA-Z]/;function he(r,e,t){var h,O,x,k;const n=M(),a=n.locale??B,s=n.firstWeekContainsDate??((O=(h=n.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??1,i=n.weekStartsOn??((k=(x=n.locale)==null?void 0:x.options)==null?void 0:k.weekStartsOn)??0,u=m(r,t==null?void 0:t.in);if(!I(u))throw new RangeError("Invalid time value");let o=e.match(se).map(f=>{const d=f[0];if(d==="p"||d==="P"){const P=Z[d];return P(f,a.formatLong)}return f}).join("").match(ae).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:oe(f)};if(W[d])return{isToken:!0,value:f};if(d.match(ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});a.localize.preprocessor&&(o=a.localize.preprocessor(u,o));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return o.map(f=>{if(!f.isToken)return f.value;const d=f.value;(te(d)||ee(d))&&re(d,e,String(r));const P=W[d[0]];return P(u,d,a.localize,l)}).join("")}function oe(r){const e=r.match(ce);return e?e[1].replace(ie,"'"):r}function me({label:r,value:e,className:t=""}){return T.jsxs("div",{className:`grid grid-cols-[180px_1fr] gap-4 py-3 border-b border-gray-100 dark:border-gray-700 last:border-0 ${t}`,children:[T.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:r}),T.jsx("dd",{className:"text-sm text-gray-900 dark:text-white break-all",children:e})]})}export{me as D,he as f};
1
+ import{t as m,a as M,c as b,n as _,b as E,m as Q,d as F,e as B}from"./badgeColors-DQ_P_DOX.js";import{j as T}from"./index-f3yHnTBu.js";function Y(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.weekStartsOn)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.weekStartsOn)??t.weekStartsOn??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.weekStartsOn)??0,a=m(r,e==null?void 0:e.in),s=a.getDay(),i=(s<n?7:0)+s-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function D(r,e){return Y(r,{...e,weekStartsOn:1})}function H(r,e){const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=b(t,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const s=D(a),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const u=D(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1}function S(r,e){const t=m(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function X(r,e,t){const[n,a]=_(t==null?void 0:t.in,r,e),s=S(n),i=S(a),u=+s-E(s),o=+i-E(i);return Math.round((u-o)/Q)}function L(r,e){const t=H(r,e),n=b(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),D(n)}function R(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function I(r){return!(!R(r)&&typeof r!="number"||isNaN(+m(r)))}function j(r,e){const t=m(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function $(r,e){const t=m(r,e==null?void 0:e.in);return X(t,j(t))+1}function V(r,e){const t=m(r,e==null?void 0:e.in),n=+D(t)-+L(t);return Math.round(n/F)+1}function C(r,e){var h,O,x,k;const t=m(r,e==null?void 0:e.in),n=t.getFullYear(),a=M(),s=(e==null?void 0:e.firstWeekContainsDate)??((O=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(x=a.locale)==null?void 0:x.options)==null?void 0:k.firstWeekContainsDate)??1,i=b((e==null?void 0:e.in)||r,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);const u=Y(i,e),o=b((e==null?void 0:e.in)||r,0);o.setFullYear(n,0,s),o.setHours(0,0,0,0);const l=Y(o,e);return+t>=+u?n+1:+t>=+l?n:n-1}function J(r,e){var u,o,l,h;const t=M(),n=(e==null?void 0:e.firstWeekContainsDate)??((o=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:o.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(l=t.locale)==null?void 0:l.options)==null?void 0:h.firstWeekContainsDate)??1,a=C(r,e),s=b((e==null?void 0:e.in)||r,0);return s.setFullYear(a,0,n),s.setHours(0,0,0,0),Y(s,e)}function K(r,e){const t=m(r,e==null?void 0:e.in),n=+Y(t,e)-+J(t,e);return Math.round(n/F)+1}function c(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const g={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return c(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):c(t+1,2)},d(r,e){return c(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return c(r.getHours()%12||12,e.length)},H(r,e){return c(r.getHours(),e.length)},m(r,e){return c(r.getMinutes(),e.length)},s(r,e){return c(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),a=Math.trunc(n*Math.pow(10,t-3));return c(a,e.length)}},y={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},W={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),a=n>0?n:1-n;return t.ordinalNumber(a,{unit:"year"})}return g.y(r,e)},Y:function(r,e,t,n){const a=C(r,n),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return c(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):c(s,e.length)},R:function(r,e){const t=H(r);return c(t,e.length)},u:function(r,e){const t=r.getFullYear();return c(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return c(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return c(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return g.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return c(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const a=K(r,n);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(r,e,t){const n=V(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):c(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):g.d(r,e)},D:function(r,e,t){const n=$(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):c(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return c(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const a=r.getDay(),s=(a-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return c(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),a=n===0?7:n;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const a=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let a;switch(n===12?a=y.noon:n===0?a=y.midnight:a=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let a;switch(n>=17?a=y.evening:n>=12?a=y.afternoon:n>=4?a=y.morning:a=y.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return g.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):g.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):c(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):g.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):g.s(r,e)},S:function(r,e){return g.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return N(n);case"XXXX":case"XX":return w(n);case"XXXXX":case"XXX":default:return w(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return N(n);case"xxxx":case"xx":return w(n);case"xxxxx":case"xxx":default:return w(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(n,":");case"OOOO":default:return"GMT"+w(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(n,":");case"zzzz":default:return"GMT"+w(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return c(n,e.length)},T:function(r,e,t){return c(+r,e.length)}};function q(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=Math.trunc(n/60),s=n%60;return s===0?t+String(a):t+String(a)+e+c(s,2)}function N(r,e){return r%60===0?(r>0?"-":"+")+c(Math.abs(r)/60,2):w(r,e)}function w(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),a=c(Math.trunc(n/60),2),s=c(n%60,2);return t+a+e+s}const v=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},G=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},U=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],a=t[2];if(!a)return v(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",v(n,e)).replace("{{time}}",G(a,e))},Z={p:G,P:U},A=/^D+$/,z=/^Y+$/,p=["D","DD","YY","YYYY"];function ee(r){return A.test(r)}function te(r){return z.test(r)}function re(r,e,t){const n=ne(r,e,t);if(console.warn(n),p.includes(r))throw new RangeError(n)}function ne(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,se=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ce=/^'([^]*?)'?$/,ie=/''/g,ue=/[a-zA-Z]/;function he(r,e,t){var h,O,x,k;const n=M(),a=n.locale??B,s=n.firstWeekContainsDate??((O=(h=n.locale)==null?void 0:h.options)==null?void 0:O.firstWeekContainsDate)??1,i=n.weekStartsOn??((k=(x=n.locale)==null?void 0:x.options)==null?void 0:k.weekStartsOn)??0,u=m(r,t==null?void 0:t.in);if(!I(u))throw new RangeError("Invalid time value");let o=e.match(se).map(f=>{const d=f[0];if(d==="p"||d==="P"){const P=Z[d];return P(f,a.formatLong)}return f}).join("").match(ae).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const d=f[0];if(d==="'")return{isToken:!1,value:oe(f)};if(W[d])return{isToken:!0,value:f};if(d.match(ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:f}});a.localize.preprocessor&&(o=a.localize.preprocessor(u,o));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return o.map(f=>{if(!f.isToken)return f.value;const d=f.value;(te(d)||ee(d))&&re(d,e,String(r));const P=W[d[0]];return P(u,d,a.localize,l)}).join("")}function oe(r){const e=r.match(ce);return e?e[1].replace(ie,"'"):r}function me({label:r,value:e,className:t=""}){return T.jsxs("div",{className:`grid grid-cols-[180px_1fr] gap-4 py-3 border-b border-gray-100 dark:border-gray-700 last:border-0 ${t}`,children:[T.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:r}),T.jsx("dd",{className:"text-sm text-gray-900 dark:text-white break-all",children:e})]})}export{me as D,he as f};
@@ -1,4 +1,4 @@
1
- import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-DOVqOa07.js";import{p as c,f as u}from"./badgeColors-DQ_P_DOX.js";import{D as a,f}from"./DetailRow-CfonsGvS.js";import{C as l}from"./types-nsz9P0qo.js";import{C as N}from"./CopyButton-C2sNp4HP.js";import{C as y}from"./circle-check-big-DfHJ1LXS.js";import{C as x}from"./circle-x-Cgixh9fi.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-C5QubCqk.js";import"./search-DgNz5G1h.js";/**
1
+ import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-f3yHnTBu.js";import{p as c,f as u}from"./badgeColors-DQ_P_DOX.js";import{D as a,f}from"./DetailRow-CR50H99O.js";import{C as l}from"./types-DZrHs5Iv.js";import{C as N}from"./CopyButton-DkKluR16.js";import{C as y}from"./circle-check-big-ebbAguBz.js";import{C as x}from"./circle-x-CJZEsYDL.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-jW_ZykXS.js";import"./search-B0XZ1Fr6.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as a,H as l}from"./index-DOVqOa07.js";import{e as P,b as B}from"./vendor-DBTT3jXp.js";import{f as M,p as R}from"./badgeColors-DQ_P_DOX.js";import{u as S,P as T,N as $,L as A}from"./PageHeader-CIBDYg8j.js";import{u as z,r as H,C as d}from"./types-nsz9P0qo.js";import{T as o,D as L,b}from"./DataTable-PCSvmOPj.js";function J(){const p=P(),{addFilter:t,clearAll:u,serverFilters:c,headerFilters:h,hasFilters:m}=z("dumps"),{entries:x,loading:g,refreshing:i,newEntriesCount:f,hasMore:j,loadMore:y,loadNew:C,autoRefreshEnabled:k,live:w,setAutoRefresh:N,meta:s,isHighlighted:v}=S({type:"dump",limit:50,filters:c}),n=x.filter(e=>H(e)),D=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",E=B.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?a.jsx(o,{children:e.payload.recordCount.toLocaleString()}):a.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>a.jsx(o,{children:D(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(L,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(o,{secondary:!0,className:"text-xs",children:M(R(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&n.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const F=m?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(T,{title:"Dumps",icon:l,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:s==null?void 0:s.total,refreshing:i,autoRefreshEnabled:k,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:u}),a.jsxs("div",{className:`${F} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:f,onClick:C,loading:i}),a.jsx(b,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>p(`/dumps/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(A,{hasMore:j,onClick:y,loading:i})]})]})}export{J as default};
1
+ import{j as a,H as l}from"./index-f3yHnTBu.js";import{e as P,b as B}from"./vendor-DBTT3jXp.js";import{f as M,p as R}from"./badgeColors-DQ_P_DOX.js";import{u as S,P as T,N as $,L as A}from"./PageHeader-Ce9Hbh0m.js";import{u as z,r as H,C as d}from"./types-DZrHs5Iv.js";import{T as o,D as L,b}from"./DataTable-CQVsrmrF.js";function J(){const p=P(),{addFilter:t,clearAll:u,serverFilters:c,headerFilters:h,hasFilters:m}=z("dumps"),{entries:x,loading:g,refreshing:i,newEntriesCount:f,hasMore:j,loadMore:y,loadNew:C,autoRefreshEnabled:k,live:w,setAutoRefresh:N,meta:s,isHighlighted:v}=S({type:"dump",limit:50,filters:c}),n=x.filter(e=>H(e)),D=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",E=B.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?a.jsx(o,{children:e.payload.recordCount.toLocaleString()}):a.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>a.jsx(o,{children:D(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(d,{onClick:r=>{r.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(L,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(o,{secondary:!0,className:"text-xs",children:M(R(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&n.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const F=m?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(T,{title:"Dumps",icon:l,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:s==null?void 0:s.total,refreshing:i,autoRefreshEnabled:k,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:u}),a.jsxs("div",{className:`${F} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:f,onClick:C,loading:i}),a.jsx(b,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>p(`/dumps/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(A,{hasMore:j,onClick:y,loading:i})]})]})}export{J as default};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetailView-t5odupt4.js","./index-DOVqOa07.js","./vendor-DBTT3jXp.js","./index-B9BCPNKv.css","./badgeColors-DQ_P_DOX.js","./DetailRow-CfonsGvS.js","./types-nsz9P0qo.js","./UserCard-Dom0aCbz.js","./search-DgNz5G1h.js","./QueryDetailView-RUxW9Uqs.js","./ExceptionDetailView-xmNdG8Nb.js","./LogDetailView-OhpY0czv.js","./EventDetailView-DrExHdP3.js","./CopyButton-C2sNp4HP.js","./zap-BolYLTQe.js","./users-CTNyAW4A.js","./JobDetailView-DrDFXY-t.js","./circle-alert-t2lIvGjF.js","./circle-check-big-DfHJ1LXS.js","./CacheDetailView-CtmDMMR2.js","./circle-x-Cgixh9fi.js","./timer-hkll0vuQ.js","./MailDetailView-rmPDboFn.js","./ScheduleDetailView-D8OZ-_yh.js","./format-BlNP-apw.js","./calendar-BMPz0Z6s.js","./HttpClientDetailView-7v6RERdZ.js","./RedisDetailView-Ceo27Mx3.js","./ModelDetailView-DVh-32OU.js","./NotificationDetailView-C_IGKjY3.js","./send-BKsI3HhT.js","./ViewDetailView-Bxd64RN9.js","./eye-DRW5kZff.js","./CommandDetailView-B_6u-4-M.js","./GateDetailView-Db3NrQmm.js","./BatchDetailView-CNyv7Vc1.js","./DumpDetailView-DGy7eSQl.js","./GraphQLDetailView-DZPwXidi.js","./DataTable-PCSvmOPj.js"])))=>i.map(i=>d[i]);
2
- import{c as P,j as e,X as W,z as O,t as ge,g as ue,v as fe,_ as u}from"./index-DOVqOa07.js";import{b as r,h as je,L as J}from"./vendor-DBTT3jXp.js";import{f as be,p as ke}from"./badgeColors-DQ_P_DOX.js";import{i as B,C as p,a as H,b as G,c as Q,d as ae,e as re,f as se,g as ne,h as le,j as X,k as ie,l as oe,m as ce,n as de,o as xe,p as ye,q as pe,r as he,s as Y}from"./types-nsz9P0qo.js";import{S as L}from"./search-DgNz5G1h.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetailView-BXn6Lehg.js","./index-f3yHnTBu.js","./vendor-DBTT3jXp.js","./index-B9BCPNKv.css","./badgeColors-DQ_P_DOX.js","./DetailRow-CR50H99O.js","./types-DZrHs5Iv.js","./UserCard-BY0J84X6.js","./search-B0XZ1Fr6.js","./QueryDetailView-D3qcL29Q.js","./ExceptionDetailView-wg6kccnW.js","./LogDetailView-Bg5bExCD.js","./EventDetailView-_Sg4kaoC.js","./CopyButton-DkKluR16.js","./zap-C4mgfWMp.js","./users-Bz2xBYFa.js","./JobDetailView-DGB3YKwK.js","./circle-alert-CraCmO0F.js","./circle-check-big-ebbAguBz.js","./CacheDetailView-CUN4Xlj1.js","./circle-x-CJZEsYDL.js","./timer-Dk6Eg1NI.js","./MailDetailView-Bh1b9g3u.js","./ScheduleDetailView-DKDN8aDq.js","./format-BlNP-apw.js","./calendar-DHSpyI4Y.js","./HttpClientDetailView-BOKfN_N3.js","./RedisDetailView-BXlR80r_.js","./ModelDetailView-C03CykA7.js","./NotificationDetailView-BTOXMue0.js","./send-C1Uq07c-.js","./ViewDetailView-DcZJa3Wh.js","./eye-BEruVuaB.js","./CommandDetailView-DOnJl4--.js","./GateDetailView-B2GkdfXI.js","./BatchDetailView-S21SOoT4.js","./DumpDetailView-CB2MK264.js","./GraphQLDetailView-CVKiNjx8.js","./DataTable-CQVsrmrF.js"])))=>i.map(i=>d[i]);
2
+ import{c as P,j as e,X as W,z as O,t as ge,g as ue,v as fe,_ as u}from"./index-f3yHnTBu.js";import{b as r,h as je,L as J}from"./vendor-DBTT3jXp.js";import{f as be,p as ke}from"./badgeColors-DQ_P_DOX.js";import{i as B,C as p,a as H,b as G,c as Q,d as ae,e as re,f as se,g as ne,h as le,j as X,k as ie,l as oe,m as ce,n as de,o as xe,p as ye,q as pe,r as he,s as Y}from"./types-DZrHs5Iv.js";import{S as L}from"./search-B0XZ1Fr6.js";/**
3
3
  * @license lucide-react v0.468.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -24,4 +24,4 @@ import{c as P,j as e,X as W,z as O,t as ge,g as ue,v as fe,_ as u}from"./index-D
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const ee=P("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function me(a,t){if(!a||typeof window>"u")return t;const s=window.location.hash.slice(1);if(!s)return t;try{return new URLSearchParams(s).get(a)||t}catch{return t}}function Ne({tabs:a,defaultTab:t,hashKey:s,headerRight:i,onTabChange:f}){var S,N;const g=t||((S=a[0])==null?void 0:S.id),[h,b]=r.useState(()=>me(s,g));r.useEffect(()=>{if(!s)return;const n=()=>{const y=me(s,g);b(y)};return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[s,g]);const w=r.useCallback(n=>{if(b(n),f==null||f(n),!s)return;const y=window.location.hash.slice(1),c=new URLSearchParams(y);n===g?c.delete(s):c.set(s,n);const T=c.toString(),D=T?`#${T}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",D)},[s,g,f]),o=(N=a.find(n=>n.id===h))==null?void 0:N.content,x=r.useRef(new Map),l=r.useCallback((n,y)=>{var T;let c=null;switch(n.key){case"ArrowLeft":n.preventDefault(),c=y===0?a.length-1:y-1;break;case"ArrowRight":n.preventDefault(),c=y===a.length-1?0:y+1;break;case"Home":n.preventDefault(),c=0;break;case"End":n.preventDefault(),c=a.length-1;break}if(c!==null){const D=a[c];w(D.id),(T=x.current.get(D.id))==null||T.focus()}},[a,w]);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("div",{className:"flex flex-1",role:"tablist","aria-label":"Content tabs",children:a.map((n,y)=>e.jsxs("button",{ref:c=>{c&&x.current.set(n.id,c)},role:"tab","aria-selected":h===n.id,"aria-controls":`tabpanel-${n.id}`,id:`tab-${n.id}`,tabIndex:h===n.id?0:-1,onClick:()=>w(n.id),onKeyDown:c=>l(c,y),className:`px-4 py-2.5 text-sm font-medium transition-colors relative ${h===n.id?"text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-900":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[n.label,n.badge!==void 0&&n.badge>0&&e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 rounded",children:n.badge})]}),h===n.id&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-indigo-600 dark:bg-indigo-400","aria-hidden":"true"})]},n.id))}),i&&e.jsx("div",{className:"px-3 flex items-center",children:i})]}),e.jsx("div",{role:"tabpanel",id:`tabpanel-${h}`,"aria-labelledby":`tab-${h}`,tabIndex:0,className:"bg-white dark:bg-gray-900",children:o})]})}function Ee(a){return a===null?"null":a===void 0?"undefined":Array.isArray(a)?"array":typeof a}function Te(a,t){return t==="array"?a.length:t==="object"?Object.keys(a).length:0}function ve(a,t,s){if(!t)return!1;const i=t.toLowerCase();return a===null?"null".includes(i):typeof a=="string"?a.toLowerCase().includes(i):typeof a=="number"||typeof a=="boolean"?String(a).includes(i):!1}function te(a,t){if(!t)return!1;const s=t.toLowerCase();return a===null?"null".includes(s):typeof a=="string"?a.toLowerCase().includes(s):typeof a=="number"||typeof a=="boolean"?String(a).includes(s):Array.isArray(a)?a.some(i=>te(i,t)):typeof a=="object"&&a!==null?Object.entries(a).some(([i,f])=>i.toLowerCase().includes(s)||te(f,t)):!1}const Ce=r.memo(function a({keyName:t,value:s,depth:i,expandedPaths:f,onToggle:g,searchTerm:h,path:b,isArrayItem:w=!1}){const o=Ee(s),x=o==="object"||o==="array",l=f.has(b),S=Te(s,o),N=S===0,n=!!h&&((t==null?void 0:t.toLowerCase().includes(h.toLowerCase()))??!1),y=ve(s,h),c=n||y,T=r.useCallback(()=>{g(b)},[g,b]),D=r.useCallback(E=>{E.stopPropagation();const j=typeof s=="string"?s:JSON.stringify(s,null,2);navigator.clipboard.writeText(j),O.success("Copied!")},[s]),V=()=>{const E=y?"bg-yellow-400/30 rounded px-0.5":"";switch(o){case"null":return e.jsx("span",{className:`text-orange-600 dark:text-orange-400 italic ${E}`,children:"null"});case"undefined":return e.jsx("span",{className:`text-gray-500 italic ${E}`,children:"undefined"});case"boolean":return e.jsx("span",{className:`text-purple-600 dark:text-purple-400 ${E}`,children:String(s)});case"number":return e.jsx("span",{className:`text-cyan-600 dark:text-cyan-400 ${E}`,children:String(s)});case"string":{const j=s,A=300,$=j.length>A,R=$?j.slice(0,A):j,M=/^https?:\/\//.test(j),U=/^\d{4}-\d{2}-\d{2}/.test(j),m=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j);return e.jsxs("span",{className:`text-green-600 dark:text-green-400 ${E}`,children:['"',R,$&&e.jsxs("span",{className:"text-gray-500",children:["... (",j.length-A," more)"]}),'"',M&&e.jsx("span",{className:"ml-1 text-blue-600 dark:text-blue-400 text-xs",children:"(URL)"}),U&&e.jsx("span",{className:"ml-1 text-amber-600 dark:text-yellow-400 text-xs",children:"(Date)"}),m&&e.jsx("span",{className:"ml-1 text-pink-600 dark:text-pink-400 text-xs",children:"(Email)"})]})}case"array":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"["}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["[",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," items"]}),"]"]});case"object":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"{"}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["{",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," keys"]}),"}"]});default:return e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:String(s)})}},z=()=>{if(!x||!l)return null;const E=o==="array"?s.map((j,A)=>[String(A),j]):Object.entries(s);return e.jsxs(e.Fragment,{children:[E.map(([j,A])=>e.jsx(a,{keyName:j,value:A,depth:i+1,expandedPaths:f,onToggle:g,searchTerm:h,path:`${b}.${j}`,isArrayItem:o==="array"},`${b}.${j}`)),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"w-6 flex-shrink-0"}),e.jsx("div",{style:{paddingLeft:i*16+16},className:"text-gray-600 dark:text-gray-400",children:o==="array"?"]":"}"})]})]})},F=i*16;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`group flex items-start py-[1px] hover:bg-gray-100 dark:hover:bg-white/5 rounded cursor-pointer transition-colors ${c?"bg-yellow-500/10":""}`,onClick:x?T:void 0,children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:D,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Copy value",children:e.jsx(I,{className:"w-4 h-4"})})}),e.jsxs("div",{className:"flex items-start flex-1",style:{paddingLeft:F},children:[e.jsx("span",{className:"w-4 h-5 flex items-center justify-center flex-shrink-0",children:x&&!N&&(l?e.jsx(ge,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}):e.jsx(ue,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}))}),t!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`${w?"text-gray-500":"text-blue-700 dark:text-blue-300"} ${n?"bg-yellow-400/30 rounded px-0.5":""}`,children:w?t:`"${t}"`}),e.jsx("span",{className:"text-gray-500 mx-1",children:":"})]}),e.jsx("span",{className:"flex-1",children:V()})]})]}),z()]})});function _e({data:a,title:t,initialExpanded:s=!0,maxInitialDepth:i=2,searchable:f=!0,maxHeight:g=500,inline:h=!1,showToolbar:b=!1,externalSearchTerm:w}){const[o,x]=r.useState(!1),[l,S]=r.useState(""),[N,n]=r.useState(!1),y=w??l,c=S,[T,D]=r.useState(()=>{const m=new Set;if(s){const k=(d,v,C)=>{C>=i||(m.add(v),Array.isArray(d)?d.forEach((_,q)=>k(_,`${v}.${q}`,C+1)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([_,q])=>k(q,`${v}.${_}`,C+1)))};k(a,"root",0)}return m}),V=r.useMemo(()=>{const m=new Set;if(!y)return m;const k=(d,v)=>{te(d,y)&&m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};return k(a,"root"),m},[y,a]),z=r.useMemo(()=>V.size===0?T:new Set([...T,...V]),[T,V]),F=r.useCallback(m=>{D(k=>{const d=new Set(k);return d.has(m)?d.delete(m):d.add(m),d})},[]),E=r.useCallback(()=>{const m=new Set,k=(d,v)=>{m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};k(a,"root"),D(m)},[a]),j=r.useCallback(()=>{D(new Set)},[]),A=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(a,null,2)),x(!0),O.success("JSON copied!"),setTimeout(()=>x(!1),2e3)}catch{O.error("Failed to copy")}},$=()=>{n(m=>!m),N&&c("")},R=e.jsx("div",{className:`p-3 overflow-auto font-mono text-sm ${h?"":"bg-white dark:bg-gray-800"}`,style:{maxHeight:typeof g=="number"?`${g}px`:g},children:e.jsx(Ce,{keyName:null,value:a,depth:0,expandedPaths:z,onToggle:F,searchTerm:y,path:"root"})}),M=e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsxs("div",{className:`flex items-center space-x-1 ${t?"":"ml-auto"}`,children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]})]}),U=N&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})});return h?b?e.jsxs("div",{children:[M,U,R]}):R:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsx("span",{className:"text-xs text-gray-500",children:Array.isArray(a)?`${a.length} items`:typeof a=="object"&&a!==null?`${Object.keys(a).length} keys`:""})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search (Ctrl+F)",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}),e.jsx("span",{className:"text-green-500",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Copy"})]})})]})]}),N&&e.jsx("div",{className:"px-3 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/30",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}),R]})}function Se({data:a,toolbarState:t,maxHeight:s=400,searchBar:i}){const f=`${t.expandAllTrigger}-${t.collapseAllTrigger}`,g=t.expandAllTrigger>t.collapseAllTrigger,h=g?100:t.collapseAllTrigger>0?0:2;return e.jsxs("div",{children:[i,e.jsx(_e,{data:a,inline:!0,maxHeight:s,initialExpanded:g||t.expandAllTrigger===0,maxInitialDepth:h,searchable:!1,showToolbar:!1,externalSearchTerm:t.searchTerm},f)]})}function De(){const[a,t]=r.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[s,i]=r.useState(!1),f=r.useCallback(()=>{t(l=>({...l,expandAllTrigger:l.expandAllTrigger+1}))},[]),g=r.useCallback(()=>{t(l=>({...l,collapseAllTrigger:l.collapseAllTrigger+1}))},[]),h=r.useCallback(()=>{t(l=>({...l,showSearch:!l.showSearch,searchTerm:l.showSearch?"":l.searchTerm}))},[]),b=r.useCallback(l=>{t(S=>({...S,searchTerm:l}))},[]),w=r.useCallback(async l=>{try{await navigator.clipboard.writeText(JSON.stringify(l,null,2)),i(!0),O.success("Copied!"),setTimeout(()=>i(!1),2e3)}catch{O.error("Failed to copy")}},[]),o=({data:l})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:f,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:g,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:h,className:`p-1.5 rounded transition-colors ${a.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),l&&e.jsx("button",{onClick:()=>w(l),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:s?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]}),x=a.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:a.searchTerm,onChange:l=>b(l.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),a.searchTerm&&e.jsx("button",{onClick:()=>b(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}):null;return{state:a,Toolbar:o,SearchBar:x}}function Ae(){return e.jsxs("div",{className:"animate-pulse space-y-3","aria-hidden":"true",children:[e.jsx("div",{className:"h-8 rounded bg-gray-100 dark:bg-gray-800"}),e.jsx("div",{className:"h-40 rounded bg-gray-100 dark:bg-gray-800"})]})}const Le=r.lazy(()=>u(()=>import("./RequestDetailView-t5odupt4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),Ve=r.lazy(()=>u(()=>import("./QueryDetailView-RUxW9Uqs.js"),__vite__mapDeps([9,1,2,3,4,5,6,8]),import.meta.url)),$e=r.lazy(()=>u(()=>import("./ExceptionDetailView-xmNdG8Nb.js"),__vite__mapDeps([10,1,2,3,4,5,6,8]),import.meta.url)),Re=r.lazy(()=>u(()=>import("./LogDetailView-OhpY0czv.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]),import.meta.url)),Oe=r.lazy(()=>u(()=>import("./EventDetailView-DrExHdP3.js"),__vite__mapDeps([12,1,2,3,13,6,4,14,15,8]),import.meta.url)),Pe=r.lazy(()=>u(()=>import("./JobDetailView-DrDFXY-t.js"),__vite__mapDeps([16,1,2,3,4,5,6,13,17,18,8]),import.meta.url)),Ie=r.lazy(()=>u(()=>import("./CacheDetailView-CtmDMMR2.js"),__vite__mapDeps([19,1,2,3,4,5,6,13,18,20,21,8]),import.meta.url)),ze=r.lazy(()=>u(()=>import("./MailDetailView-rmPDboFn.js"),__vite__mapDeps([22,1,2,3,6,4,5,13,20,18,15,17,8]),import.meta.url)),Fe=r.lazy(()=>u(()=>import("./ScheduleDetailView-D8OZ-_yh.js"),__vite__mapDeps([23,1,2,3,24,6,4,5,20,18,21,25]),import.meta.url)),Me=r.lazy(()=>u(()=>import("./HttpClientDetailView-7v6RERdZ.js"),__vite__mapDeps([26,1,2,3,4,5,6,8]),import.meta.url)),Ue=r.lazy(()=>u(()=>import("./RedisDetailView-Ceo27Mx3.js"),__vite__mapDeps([27,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),qe=r.lazy(()=>u(()=>import("./ModelDetailView-DVh-32OU.js"),__vite__mapDeps([28,1,2,3,4,5,6,13,20,8]),import.meta.url)),Je=r.lazy(()=>u(()=>import("./NotificationDetailView-C_IGKjY3.js"),__vite__mapDeps([29,1,2,3,4,5,6,13,18,20,30,8]),import.meta.url)),We=r.lazy(()=>u(()=>import("./ViewDetailView-Bxd64RN9.js"),__vite__mapDeps([31,1,2,3,4,5,6,13,32,18,20,8]),import.meta.url)),Be=r.lazy(()=>u(()=>import("./CommandDetailView-B_6u-4-M.js"),__vite__mapDeps([33,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),He=r.lazy(()=>u(()=>import("./GateDetailView-Db3NrQmm.js"),__vite__mapDeps([34,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Ge=r.lazy(()=>u(()=>import("./BatchDetailView-CNyv7Vc1.js"),__vite__mapDeps([35,1,2,3,4,5,6,13,20,17,18,8]),import.meta.url)),Qe=r.lazy(()=>u(()=>import("./DumpDetailView-DGy7eSQl.js"),__vite__mapDeps([36,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Xe=r.lazy(()=>u(()=>import("./GraphQLDetailView-DZPwXidi.js"),__vite__mapDeps([37,1,2,3,4,5,6,38,7,8,14,30]),import.meta.url));function Ye(a,t){return a!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function Ze(a){const t=a.trim().toUpperCase();return t.startsWith("SELECT")?"SELECT":t.startsWith("INSERT")?"INSERT":t.startsWith("UPDATE")?"UPDATE":t.startsWith("DELETE")?"DELETE":t.startsWith("CREATE")?"CREATE":t.startsWith("ALTER")?"ALTER":t.startsWith("DROP")?"DROP":t.startsWith("TRUNCATE")?"TRUNCATE":t.startsWith("BEGIN")||t.startsWith("START")?"TRANSACTION":t.startsWith("COMMIT")?"COMMIT":t.startsWith("ROLLBACK")?"ROLLBACK":"QUERY"}function Ke(){const{id:a}=je(),[t,s]=r.useState(null),[i,f]=r.useState([]),[g,h]=r.useState(!0),b=De();if(r.useEffect(()=>{(async()=>{if(a)try{const x=await fe(parseInt(a));s(x.data),f(x.related??[])}catch(x){console.error("Failed to fetch entry:",x)}finally{h(!1)}})()},[a]),g)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!t)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Entry not found"}),e.jsx(J,{to:"/",className:"text-primary-600 hover:text-primary-700 mt-4 inline-block",children:"Go back to dashboard"})]});const w=()=>{if(B(t))return e.jsx(Le,{entry:t,related:i});if(H(t))return e.jsx(Ve,{entry:t});if(G(t))return e.jsx($e,{entry:t});if(Q(t))return e.jsx(Re,{entry:t});if(ae(t))return e.jsx(Oe,{entry:t});if(re(t))return e.jsx(Pe,{entry:t});if(se(t))return e.jsx(Ie,{entry:t});if(ne(t))return e.jsx(ze,{entry:t});if(le(t))return e.jsx(Fe,{entry:t});if(X(t))return e.jsx(Me,{entry:t});if(ie(t))return e.jsx(Ue,{entry:t});if(oe(t))return e.jsx(qe,{entry:t});if(ce(t))return e.jsx(Je,{entry:t});if(de(t))return e.jsx(We,{entry:t});if(xe(t))return e.jsx(Be,{entry:t});if(ye(t))return e.jsx(He,{entry:t});if(pe(t))return e.jsx(Ge,{entry:t});if(he(t))return e.jsx(Qe,{entry:t});if(Y(t))return e.jsx(Xe,{entry:t});const x=t.payload,l=[{id:"payload",label:"Payload",content:e.jsx(Se,{data:x,toolbarState:b.state,searchBar:b.SearchBar,maxHeight:400})}];return e.jsx(Ne,{tabs:l,defaultTab:"payload",headerRight:e.jsx(b.Toolbar,{data:x})})};return e.jsxs("div",{children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 h-16 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center space-x-4 px-4 lg:px-6 h-full",children:[e.jsx(J,{to:-1,className:"p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-lg transition-colors",children:e.jsx(we,{className:"h-5 w-5 text-gray-500"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center space-x-3",children:B(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"requests",children:Ye(t.payload.path,t.payload.method)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.path})]}):H(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"queries",filterType:"types",children:Ze(t.payload.query)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.query.length>100?t.payload.query.substring(0,100)+"...":t.payload.query})]}):G(t)?(()=>{var x;const o=t.payload.name&&t.payload.name.toLowerCase()!=="error"?t.payload.name:t.payload.code?String(t.payload.code):"Exception";return e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"exceptions",filterType:"names",children:o}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:((x=t.payload.request)==null?void 0:x.url)||t.payload.message})]})})():Q(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"logs",filterType:"levels",children:t.payload.level.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.message.length>100?t.payload.message.substring(0,100)+"...":t.payload.message})]}):ae(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"events",filterType:"names",children:t.payload.name}),e.jsxs("h1",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t.payload.listeners.length," listener",t.payload.listeners.length!==1?"s":""," · ",t.payload.duration,"ms"]})]}):re(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"jobs",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.payload.queue," · ",t.payload.duration?`${t.payload.duration}ms`:"-"]})]}):se(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"cache",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),t.payload.operation==="get"&&e.jsx(p,{listType:"cache",children:t.payload.hit?"HIT":"MISS"}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.key.length>60?t.payload.key.substring(0,60)+"...":t.payload.key})]}):ne(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"mail",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.subject.length>60?t.payload.subject.substring(0,60)+"...":t.payload.subject})]}):le(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"schedule",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),t.payload.cron&&e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-mono",children:t.payload.cron})]}):X(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"http-client",filterType:"methods",filterValue:t.payload.method,children:t.payload.method}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.hostname||t.payload.url})]}):ie(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"redis",filterType:"commands",filterValue:t.payload.command,children:t.payload.command}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.keyPattern||"Redis Command"})]}):oe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"models",filterType:"actions",filterValue:t.payload.action,children:t.payload.action.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.entity})]}):ce(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"notifications",filterType:"types",filterValue:t.payload.type,children:t.payload.type}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.title||t.payload.recipient})]}):de(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"views",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.template})]}):xe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"commands",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):ye(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"gates",filterType:"results",filterValue:t.payload.allowed?"ALLOWED":"DENIED",children:t.payload.allowed?"ALLOWED":"DENIED"}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.gate})]}):pe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"batches",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):he(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"dumps",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.format})]}):Y(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"graphql",filterType:"operationTypes",filterValue:t.payload.operationType,children:t.payload.operationType.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.operationName||"(anonymous)"}),t.payload.hasErrors&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",children:"Error"})]}):(()=>{const o=t;return e.jsxs(e.Fragment,{children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:o.requestId||`#${o.id}`})]})})()})})]})}),e.jsxs("div",{className:"pt-16 space-y-6",children:[e.jsx(r.Suspense,{fallback:e.jsx(Ae,{}),children:w()}),i.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Related Entries (",i.length,")"]})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:i.map(o=>e.jsx(J,{to:et(o),className:"p-4 block hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:tt(o)})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:be(ke(o.createdAt),{addSuffix:!0})})]})},o.id))})]})]})]})}function et(a){return`/${{request:"requests",query:"queries",exception:"exceptions",log:"logs",event:"events",job:"jobs",cache:"cache",mail:"mail",schedule:"schedule","http-client":"http-client",redis:"redis",model:"models",notification:"notifications",view:"views",command:"commands",gate:"gates",batch:"batches",dump:"dumps",graphql:"graphql"}[a.type]||"entries"}/${a.id}`}function tt(a){if(H(a)){const t=a.payload.query;return t.length>50?t.substring(0,50)+"...":t}if(G(a))return`${a.payload.name}: ${a.payload.message}`;if(Q(a)){const t=a.payload.message;return t.length>50?t.substring(0,50)+"...":t}return B(a)?`${a.payload.method} ${a.payload.path}`:X(a)?`${a.payload.method} ${a.payload.hostname||a.payload.url}`:Y(a)?`${a.payload.operationType} ${a.payload.operationName||"(anonymous)"}`:`Entry #${a.id}`}const it=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{Se as C,it as E,K as M,Ne as T,Z as a,I as b,ee as c,De as u};
27
+ */const ee=P("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function me(a,t){if(!a||typeof window>"u")return t;const s=window.location.hash.slice(1);if(!s)return t;try{return new URLSearchParams(s).get(a)||t}catch{return t}}function Ne({tabs:a,defaultTab:t,hashKey:s,headerRight:i,onTabChange:f}){var S,N;const g=t||((S=a[0])==null?void 0:S.id),[h,b]=r.useState(()=>me(s,g));r.useEffect(()=>{if(!s)return;const n=()=>{const y=me(s,g);b(y)};return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[s,g]);const w=r.useCallback(n=>{if(b(n),f==null||f(n),!s)return;const y=window.location.hash.slice(1),c=new URLSearchParams(y);n===g?c.delete(s):c.set(s,n);const T=c.toString(),D=T?`#${T}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",D)},[s,g,f]),o=(N=a.find(n=>n.id===h))==null?void 0:N.content,x=r.useRef(new Map),l=r.useCallback((n,y)=>{var T;let c=null;switch(n.key){case"ArrowLeft":n.preventDefault(),c=y===0?a.length-1:y-1;break;case"ArrowRight":n.preventDefault(),c=y===a.length-1?0:y+1;break;case"Home":n.preventDefault(),c=0;break;case"End":n.preventDefault(),c=a.length-1;break}if(c!==null){const D=a[c];w(D.id),(T=x.current.get(D.id))==null||T.focus()}},[a,w]);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("div",{className:"flex flex-1",role:"tablist","aria-label":"Content tabs",children:a.map((n,y)=>e.jsxs("button",{ref:c=>{c&&x.current.set(n.id,c)},role:"tab","aria-selected":h===n.id,"aria-controls":`tabpanel-${n.id}`,id:`tab-${n.id}`,tabIndex:h===n.id?0:-1,onClick:()=>w(n.id),onKeyDown:c=>l(c,y),className:`px-4 py-2.5 text-sm font-medium transition-colors relative ${h===n.id?"text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-900":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[n.label,n.badge!==void 0&&n.badge>0&&e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 rounded",children:n.badge})]}),h===n.id&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-indigo-600 dark:bg-indigo-400","aria-hidden":"true"})]},n.id))}),i&&e.jsx("div",{className:"px-3 flex items-center",children:i})]}),e.jsx("div",{role:"tabpanel",id:`tabpanel-${h}`,"aria-labelledby":`tab-${h}`,tabIndex:0,className:"bg-white dark:bg-gray-900",children:o})]})}function Ee(a){return a===null?"null":a===void 0?"undefined":Array.isArray(a)?"array":typeof a}function Te(a,t){return t==="array"?a.length:t==="object"?Object.keys(a).length:0}function ve(a,t,s){if(!t)return!1;const i=t.toLowerCase();return a===null?"null".includes(i):typeof a=="string"?a.toLowerCase().includes(i):typeof a=="number"||typeof a=="boolean"?String(a).includes(i):!1}function te(a,t){if(!t)return!1;const s=t.toLowerCase();return a===null?"null".includes(s):typeof a=="string"?a.toLowerCase().includes(s):typeof a=="number"||typeof a=="boolean"?String(a).includes(s):Array.isArray(a)?a.some(i=>te(i,t)):typeof a=="object"&&a!==null?Object.entries(a).some(([i,f])=>i.toLowerCase().includes(s)||te(f,t)):!1}const Ce=r.memo(function a({keyName:t,value:s,depth:i,expandedPaths:f,onToggle:g,searchTerm:h,path:b,isArrayItem:w=!1}){const o=Ee(s),x=o==="object"||o==="array",l=f.has(b),S=Te(s,o),N=S===0,n=!!h&&((t==null?void 0:t.toLowerCase().includes(h.toLowerCase()))??!1),y=ve(s,h),c=n||y,T=r.useCallback(()=>{g(b)},[g,b]),D=r.useCallback(E=>{E.stopPropagation();const j=typeof s=="string"?s:JSON.stringify(s,null,2);navigator.clipboard.writeText(j),O.success("Copied!")},[s]),V=()=>{const E=y?"bg-yellow-400/30 rounded px-0.5":"";switch(o){case"null":return e.jsx("span",{className:`text-orange-600 dark:text-orange-400 italic ${E}`,children:"null"});case"undefined":return e.jsx("span",{className:`text-gray-500 italic ${E}`,children:"undefined"});case"boolean":return e.jsx("span",{className:`text-purple-600 dark:text-purple-400 ${E}`,children:String(s)});case"number":return e.jsx("span",{className:`text-cyan-600 dark:text-cyan-400 ${E}`,children:String(s)});case"string":{const j=s,A=300,$=j.length>A,R=$?j.slice(0,A):j,M=/^https?:\/\//.test(j),U=/^\d{4}-\d{2}-\d{2}/.test(j),m=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j);return e.jsxs("span",{className:`text-green-600 dark:text-green-400 ${E}`,children:['"',R,$&&e.jsxs("span",{className:"text-gray-500",children:["... (",j.length-A," more)"]}),'"',M&&e.jsx("span",{className:"ml-1 text-blue-600 dark:text-blue-400 text-xs",children:"(URL)"}),U&&e.jsx("span",{className:"ml-1 text-amber-600 dark:text-yellow-400 text-xs",children:"(Date)"}),m&&e.jsx("span",{className:"ml-1 text-pink-600 dark:text-pink-400 text-xs",children:"(Email)"})]})}case"array":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"["}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["[",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," items"]}),"]"]});case"object":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"{"}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["{",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," keys"]}),"}"]});default:return e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:String(s)})}},z=()=>{if(!x||!l)return null;const E=o==="array"?s.map((j,A)=>[String(A),j]):Object.entries(s);return e.jsxs(e.Fragment,{children:[E.map(([j,A])=>e.jsx(a,{keyName:j,value:A,depth:i+1,expandedPaths:f,onToggle:g,searchTerm:h,path:`${b}.${j}`,isArrayItem:o==="array"},`${b}.${j}`)),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"w-6 flex-shrink-0"}),e.jsx("div",{style:{paddingLeft:i*16+16},className:"text-gray-600 dark:text-gray-400",children:o==="array"?"]":"}"})]})]})},F=i*16;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`group flex items-start py-[1px] hover:bg-gray-100 dark:hover:bg-white/5 rounded cursor-pointer transition-colors ${c?"bg-yellow-500/10":""}`,onClick:x?T:void 0,children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:D,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Copy value",children:e.jsx(I,{className:"w-4 h-4"})})}),e.jsxs("div",{className:"flex items-start flex-1",style:{paddingLeft:F},children:[e.jsx("span",{className:"w-4 h-5 flex items-center justify-center flex-shrink-0",children:x&&!N&&(l?e.jsx(ge,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}):e.jsx(ue,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}))}),t!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`${w?"text-gray-500":"text-blue-700 dark:text-blue-300"} ${n?"bg-yellow-400/30 rounded px-0.5":""}`,children:w?t:`"${t}"`}),e.jsx("span",{className:"text-gray-500 mx-1",children:":"})]}),e.jsx("span",{className:"flex-1",children:V()})]})]}),z()]})});function _e({data:a,title:t,initialExpanded:s=!0,maxInitialDepth:i=2,searchable:f=!0,maxHeight:g=500,inline:h=!1,showToolbar:b=!1,externalSearchTerm:w}){const[o,x]=r.useState(!1),[l,S]=r.useState(""),[N,n]=r.useState(!1),y=w??l,c=S,[T,D]=r.useState(()=>{const m=new Set;if(s){const k=(d,v,C)=>{C>=i||(m.add(v),Array.isArray(d)?d.forEach((_,q)=>k(_,`${v}.${q}`,C+1)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([_,q])=>k(q,`${v}.${_}`,C+1)))};k(a,"root",0)}return m}),V=r.useMemo(()=>{const m=new Set;if(!y)return m;const k=(d,v)=>{te(d,y)&&m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};return k(a,"root"),m},[y,a]),z=r.useMemo(()=>V.size===0?T:new Set([...T,...V]),[T,V]),F=r.useCallback(m=>{D(k=>{const d=new Set(k);return d.has(m)?d.delete(m):d.add(m),d})},[]),E=r.useCallback(()=>{const m=new Set,k=(d,v)=>{m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};k(a,"root"),D(m)},[a]),j=r.useCallback(()=>{D(new Set)},[]),A=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(a,null,2)),x(!0),O.success("JSON copied!"),setTimeout(()=>x(!1),2e3)}catch{O.error("Failed to copy")}},$=()=>{n(m=>!m),N&&c("")},R=e.jsx("div",{className:`p-3 overflow-auto font-mono text-sm ${h?"":"bg-white dark:bg-gray-800"}`,style:{maxHeight:typeof g=="number"?`${g}px`:g},children:e.jsx(Ce,{keyName:null,value:a,depth:0,expandedPaths:z,onToggle:F,searchTerm:y,path:"root"})}),M=e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsxs("div",{className:`flex items-center space-x-1 ${t?"":"ml-auto"}`,children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]})]}),U=N&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})});return h?b?e.jsxs("div",{children:[M,U,R]}):R:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsx("span",{className:"text-xs text-gray-500",children:Array.isArray(a)?`${a.length} items`:typeof a=="object"&&a!==null?`${Object.keys(a).length} keys`:""})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search (Ctrl+F)",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}),e.jsx("span",{className:"text-green-500",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Copy"})]})})]})]}),N&&e.jsx("div",{className:"px-3 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/30",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}),R]})}function Se({data:a,toolbarState:t,maxHeight:s=400,searchBar:i}){const f=`${t.expandAllTrigger}-${t.collapseAllTrigger}`,g=t.expandAllTrigger>t.collapseAllTrigger,h=g?100:t.collapseAllTrigger>0?0:2;return e.jsxs("div",{children:[i,e.jsx(_e,{data:a,inline:!0,maxHeight:s,initialExpanded:g||t.expandAllTrigger===0,maxInitialDepth:h,searchable:!1,showToolbar:!1,externalSearchTerm:t.searchTerm},f)]})}function De(){const[a,t]=r.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[s,i]=r.useState(!1),f=r.useCallback(()=>{t(l=>({...l,expandAllTrigger:l.expandAllTrigger+1}))},[]),g=r.useCallback(()=>{t(l=>({...l,collapseAllTrigger:l.collapseAllTrigger+1}))},[]),h=r.useCallback(()=>{t(l=>({...l,showSearch:!l.showSearch,searchTerm:l.showSearch?"":l.searchTerm}))},[]),b=r.useCallback(l=>{t(S=>({...S,searchTerm:l}))},[]),w=r.useCallback(async l=>{try{await navigator.clipboard.writeText(JSON.stringify(l,null,2)),i(!0),O.success("Copied!"),setTimeout(()=>i(!1),2e3)}catch{O.error("Failed to copy")}},[]),o=({data:l})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:f,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:g,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:h,className:`p-1.5 rounded transition-colors ${a.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),l&&e.jsx("button",{onClick:()=>w(l),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:s?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]}),x=a.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:a.searchTerm,onChange:l=>b(l.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),a.searchTerm&&e.jsx("button",{onClick:()=>b(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}):null;return{state:a,Toolbar:o,SearchBar:x}}function Ae(){return e.jsxs("div",{className:"animate-pulse space-y-3","aria-hidden":"true",children:[e.jsx("div",{className:"h-8 rounded bg-gray-100 dark:bg-gray-800"}),e.jsx("div",{className:"h-40 rounded bg-gray-100 dark:bg-gray-800"})]})}const Le=r.lazy(()=>u(()=>import("./RequestDetailView-BXn6Lehg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),Ve=r.lazy(()=>u(()=>import("./QueryDetailView-D3qcL29Q.js"),__vite__mapDeps([9,1,2,3,4,5,6,8]),import.meta.url)),$e=r.lazy(()=>u(()=>import("./ExceptionDetailView-wg6kccnW.js"),__vite__mapDeps([10,1,2,3,4,5,6,8]),import.meta.url)),Re=r.lazy(()=>u(()=>import("./LogDetailView-Bg5bExCD.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]),import.meta.url)),Oe=r.lazy(()=>u(()=>import("./EventDetailView-_Sg4kaoC.js"),__vite__mapDeps([12,1,2,3,13,6,4,14,15,8]),import.meta.url)),Pe=r.lazy(()=>u(()=>import("./JobDetailView-DGB3YKwK.js"),__vite__mapDeps([16,1,2,3,4,5,6,13,17,18,8]),import.meta.url)),Ie=r.lazy(()=>u(()=>import("./CacheDetailView-CUN4Xlj1.js"),__vite__mapDeps([19,1,2,3,4,5,6,13,18,20,21,8]),import.meta.url)),ze=r.lazy(()=>u(()=>import("./MailDetailView-Bh1b9g3u.js"),__vite__mapDeps([22,1,2,3,6,4,5,13,20,18,15,17,8]),import.meta.url)),Fe=r.lazy(()=>u(()=>import("./ScheduleDetailView-DKDN8aDq.js"),__vite__mapDeps([23,1,2,3,24,6,4,5,20,18,21,25]),import.meta.url)),Me=r.lazy(()=>u(()=>import("./HttpClientDetailView-BOKfN_N3.js"),__vite__mapDeps([26,1,2,3,4,5,6,8]),import.meta.url)),Ue=r.lazy(()=>u(()=>import("./RedisDetailView-BXlR80r_.js"),__vite__mapDeps([27,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),qe=r.lazy(()=>u(()=>import("./ModelDetailView-C03CykA7.js"),__vite__mapDeps([28,1,2,3,4,5,6,13,20,8]),import.meta.url)),Je=r.lazy(()=>u(()=>import("./NotificationDetailView-BTOXMue0.js"),__vite__mapDeps([29,1,2,3,4,5,6,13,18,20,30,8]),import.meta.url)),We=r.lazy(()=>u(()=>import("./ViewDetailView-DcZJa3Wh.js"),__vite__mapDeps([31,1,2,3,4,5,6,13,32,18,20,8]),import.meta.url)),Be=r.lazy(()=>u(()=>import("./CommandDetailView-DOnJl4--.js"),__vite__mapDeps([33,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),He=r.lazy(()=>u(()=>import("./GateDetailView-B2GkdfXI.js"),__vite__mapDeps([34,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Ge=r.lazy(()=>u(()=>import("./BatchDetailView-S21SOoT4.js"),__vite__mapDeps([35,1,2,3,4,5,6,13,20,17,18,8]),import.meta.url)),Qe=r.lazy(()=>u(()=>import("./DumpDetailView-CB2MK264.js"),__vite__mapDeps([36,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Xe=r.lazy(()=>u(()=>import("./GraphQLDetailView-CVKiNjx8.js"),__vite__mapDeps([37,1,2,3,4,5,6,38,7,8,14,30]),import.meta.url));function Ye(a,t){return a!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function Ze(a){const t=a.trim().toUpperCase();return t.startsWith("SELECT")?"SELECT":t.startsWith("INSERT")?"INSERT":t.startsWith("UPDATE")?"UPDATE":t.startsWith("DELETE")?"DELETE":t.startsWith("CREATE")?"CREATE":t.startsWith("ALTER")?"ALTER":t.startsWith("DROP")?"DROP":t.startsWith("TRUNCATE")?"TRUNCATE":t.startsWith("BEGIN")||t.startsWith("START")?"TRANSACTION":t.startsWith("COMMIT")?"COMMIT":t.startsWith("ROLLBACK")?"ROLLBACK":"QUERY"}function Ke(){const{id:a}=je(),[t,s]=r.useState(null),[i,f]=r.useState([]),[g,h]=r.useState(!0),b=De();if(r.useEffect(()=>{(async()=>{if(a)try{const x=await fe(parseInt(a));s(x.data),f(x.related??[])}catch(x){console.error("Failed to fetch entry:",x)}finally{h(!1)}})()},[a]),g)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!t)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Entry not found"}),e.jsx(J,{to:"/",className:"text-primary-600 hover:text-primary-700 mt-4 inline-block",children:"Go back to dashboard"})]});const w=()=>{if(B(t))return e.jsx(Le,{entry:t,related:i});if(H(t))return e.jsx(Ve,{entry:t});if(G(t))return e.jsx($e,{entry:t});if(Q(t))return e.jsx(Re,{entry:t});if(ae(t))return e.jsx(Oe,{entry:t});if(re(t))return e.jsx(Pe,{entry:t});if(se(t))return e.jsx(Ie,{entry:t});if(ne(t))return e.jsx(ze,{entry:t});if(le(t))return e.jsx(Fe,{entry:t});if(X(t))return e.jsx(Me,{entry:t});if(ie(t))return e.jsx(Ue,{entry:t});if(oe(t))return e.jsx(qe,{entry:t});if(ce(t))return e.jsx(Je,{entry:t});if(de(t))return e.jsx(We,{entry:t});if(xe(t))return e.jsx(Be,{entry:t});if(ye(t))return e.jsx(He,{entry:t});if(pe(t))return e.jsx(Ge,{entry:t});if(he(t))return e.jsx(Qe,{entry:t});if(Y(t))return e.jsx(Xe,{entry:t});const x=t.payload,l=[{id:"payload",label:"Payload",content:e.jsx(Se,{data:x,toolbarState:b.state,searchBar:b.SearchBar,maxHeight:400})}];return e.jsx(Ne,{tabs:l,defaultTab:"payload",headerRight:e.jsx(b.Toolbar,{data:x})})};return e.jsxs("div",{children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 h-16 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center space-x-4 px-4 lg:px-6 h-full",children:[e.jsx(J,{to:-1,className:"p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-lg transition-colors",children:e.jsx(we,{className:"h-5 w-5 text-gray-500"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center space-x-3",children:B(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"requests",children:Ye(t.payload.path,t.payload.method)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.path})]}):H(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"queries",filterType:"types",children:Ze(t.payload.query)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.query.length>100?t.payload.query.substring(0,100)+"...":t.payload.query})]}):G(t)?(()=>{var x;const o=t.payload.name&&t.payload.name.toLowerCase()!=="error"?t.payload.name:t.payload.code?String(t.payload.code):"Exception";return e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"exceptions",filterType:"names",children:o}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:((x=t.payload.request)==null?void 0:x.url)||t.payload.message})]})})():Q(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"logs",filterType:"levels",children:t.payload.level.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.message.length>100?t.payload.message.substring(0,100)+"...":t.payload.message})]}):ae(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"events",filterType:"names",children:t.payload.name}),e.jsxs("h1",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t.payload.listeners.length," listener",t.payload.listeners.length!==1?"s":""," · ",t.payload.duration,"ms"]})]}):re(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"jobs",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.payload.queue," · ",t.payload.duration?`${t.payload.duration}ms`:"-"]})]}):se(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"cache",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),t.payload.operation==="get"&&e.jsx(p,{listType:"cache",children:t.payload.hit?"HIT":"MISS"}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.key.length>60?t.payload.key.substring(0,60)+"...":t.payload.key})]}):ne(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"mail",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.subject.length>60?t.payload.subject.substring(0,60)+"...":t.payload.subject})]}):le(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"schedule",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),t.payload.cron&&e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-mono",children:t.payload.cron})]}):X(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"http-client",filterType:"methods",filterValue:t.payload.method,children:t.payload.method}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.hostname||t.payload.url})]}):ie(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"redis",filterType:"commands",filterValue:t.payload.command,children:t.payload.command}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.keyPattern||"Redis Command"})]}):oe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"models",filterType:"actions",filterValue:t.payload.action,children:t.payload.action.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.entity})]}):ce(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"notifications",filterType:"types",filterValue:t.payload.type,children:t.payload.type}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.title||t.payload.recipient})]}):de(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"views",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.template})]}):xe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"commands",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):ye(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"gates",filterType:"results",filterValue:t.payload.allowed?"ALLOWED":"DENIED",children:t.payload.allowed?"ALLOWED":"DENIED"}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.gate})]}):pe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"batches",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):he(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"dumps",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.format})]}):Y(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"graphql",filterType:"operationTypes",filterValue:t.payload.operationType,children:t.payload.operationType.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.operationName||"(anonymous)"}),t.payload.hasErrors&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",children:"Error"})]}):(()=>{const o=t;return e.jsxs(e.Fragment,{children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:o.requestId||`#${o.id}`})]})})()})})]})}),e.jsxs("div",{className:"pt-16 space-y-6",children:[e.jsx(r.Suspense,{fallback:e.jsx(Ae,{}),children:w()}),i.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Related Entries (",i.length,")"]})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:i.map(o=>e.jsx(J,{to:et(o),className:"p-4 block hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:tt(o)})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:be(ke(o.createdAt),{addSuffix:!0})})]})},o.id))})]})]})]})}function et(a){return`/${{request:"requests",query:"queries",exception:"exceptions",log:"logs",event:"events",job:"jobs",cache:"cache",mail:"mail",schedule:"schedule","http-client":"http-client",redis:"redis",model:"models",notification:"notifications",view:"views",command:"commands",gate:"gates",batch:"batches",dump:"dumps",graphql:"graphql"}[a.type]||"entries"}/${a.id}`}function tt(a){if(H(a)){const t=a.payload.query;return t.length>50?t.substring(0,50)+"...":t}if(G(a))return`${a.payload.name}: ${a.payload.message}`;if(Q(a)){const t=a.payload.message;return t.length>50?t.substring(0,50)+"...":t}return B(a)?`${a.payload.method} ${a.payload.path}`:X(a)?`${a.payload.method} ${a.payload.hostname||a.payload.url}`:Y(a)?`${a.payload.operationType} ${a.payload.operationName||"(anonymous)"}`:`Entry #${a.id}`}const it=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{Se as C,it as E,K as M,Ne as T,Z as a,I as b,ee as c,De as u};
@@ -1 +1 @@
1
- import{j as t,X as p}from"./index-DOVqOa07.js";import{f as g,b as o}from"./vendor-DBTT3jXp.js";import{S as x}from"./search-DgNz5G1h.js";function S({placeholder:n="Search..."}){const[u,l]=g(),r=u.get("search")??"",[e,s]=o.useState(r),[h,i]=o.useState(r);return r!==h&&(i(r),s(r)),o.useEffect(()=>{const c=setTimeout(()=>{l(m=>{const a=new URLSearchParams(m);return(a.get("search")||"")===e||(e?a.set("search",e):a.delete("search")),a},{replace:!0})},350);return()=>clearTimeout(c)},[e,l]),t.jsxs("div",{className:"relative",children:[t.jsx(x,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),t.jsx("input",{type:"text",value:e,onChange:c=>s(c.target.value),placeholder:n,"aria-label":n,className:"w-full pl-9 pr-9 py-2 text-sm rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),e&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":"Clear search",children:t.jsx(p,{className:"h-4 w-4"})})]})}export{S as E};
1
+ import{j as t,X as p}from"./index-f3yHnTBu.js";import{f as g,b as o}from"./vendor-DBTT3jXp.js";import{S as x}from"./search-B0XZ1Fr6.js";function S({placeholder:n="Search..."}){const[u,l]=g(),r=u.get("search")??"",[e,s]=o.useState(r),[h,i]=o.useState(r);return r!==h&&(i(r),s(r)),o.useEffect(()=>{const c=setTimeout(()=>{l(m=>{const a=new URLSearchParams(m);return(a.get("search")||"")===e||(e?a.set("search",e):a.delete("search")),a},{replace:!0})},350);return()=>clearTimeout(c)},[e,l]),t.jsxs("div",{className:"relative",children:[t.jsx(x,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),t.jsx("input",{type:"text",value:e,onChange:c=>s(c.target.value),placeholder:n,"aria-label":n,className:"w-full pl-9 pr-9 py-2 text-sm rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),e&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":"Clear search",children:t.jsx(p,{className:"h-4 w-4"})})]})}export{S as E};
@@ -1 +1 @@
1
- import{j as e,C as x,D as o}from"./index-DOVqOa07.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-C5QubCqk.js";import{C as l}from"./CopyButton-C2sNp4HP.js";import{C as y}from"./types-nsz9P0qo.js";import{Z as j}from"./zap-BolYLTQe.js";import{U as N}from"./users-CTNyAW4A.js";import"./badgeColors-DQ_P_DOX.js";import"./search-DgNz5G1h.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
1
+ import{j as e,C as x,D as o}from"./index-f3yHnTBu.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-jW_ZykXS.js";import{C as l}from"./CopyButton-DkKluR16.js";import{C as y}from"./types-DZrHs5Iv.js";import{Z as j}from"./zap-C4mgfWMp.js";import{U as N}from"./users-Bz2xBYFa.js";import"./badgeColors-DQ_P_DOX.js";import"./search-B0XZ1Fr6.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
@@ -1 +1 @@
1
- import{j as t,R as i}from"./index-DOVqOa07.js";import{e as b,b as R}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as P,P as T,N as A,L as M}from"./PageHeader-CIBDYg8j.js";import{u as L,d as B,C as H}from"./types-nsz9P0qo.js";import{T as o,D as $,b as I}from"./DataTable-PCSvmOPj.js";function K(){const l=b(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m,hasFilters:h}=L("events"),{entries:u,loading:g,refreshing:a,newEntriesCount:x,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:v,live:j,setAutoRefresh:C,meta:s,isHighlighted:E}=P({type:"event",limit:50,filters:c}),r=u.filter(e=>B(e)),N=R.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx(H,{onClick:w=>{w.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(o,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[n]);if(g&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const k=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(T,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:v,live:j,onAutoRefreshToggle:C,filters:m,onClearAllFilters:d}),t.jsxs("div",{className:`${k} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:x,onClick:y,loading:a}),t.jsx(I,{columns:N,data:r,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:p,onClick:f,loading:a})]})]})}export{K as default};
1
+ import{j as t,R as i}from"./index-f3yHnTBu.js";import{e as b,b as R}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as P,P as T,N as A,L as M}from"./PageHeader-Ce9Hbh0m.js";import{u as L,d as B,C as H}from"./types-DZrHs5Iv.js";import{T as o,D as $,b as I}from"./DataTable-CQVsrmrF.js";function K(){const l=b(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m,hasFilters:h}=L("events"),{entries:u,loading:g,refreshing:a,newEntriesCount:x,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:v,live:j,setAutoRefresh:C,meta:s,isHighlighted:E}=P({type:"event",limit:50,filters:c}),r=u.filter(e=>B(e)),N=R.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx(H,{onClick:w=>{w.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(o,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[n]);if(g&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const k=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(T,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:v,live:j,onAutoRefreshToggle:C,filters:m,onClearAllFilters:d}),t.jsxs("div",{className:`${k} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:x,onClick:y,loading:a}),t.jsx(I,{columns:N,data:r,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:p,onClick:f,loading:a})]})]})}export{K as default};