@lunora/studio 1.0.0-alpha.34 → 1.0.0-alpha.35

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 (81) hide show
  1. package/dist/index.d.ts +5 -1
  2. package/dist/index.js +6 -6
  3. package/dist/mount.js +1 -1
  4. package/dist/packem_chunks/ApiTab.js +1 -1
  5. package/dist/packem_chunks/AuditPanel.js +1 -1
  6. package/dist/packem_chunks/ExportImportPanel.js +1 -1
  7. package/dist/packem_chunks/FileBrowser.js +1 -1
  8. package/dist/packem_chunks/FunctionRunner.js +1 -1
  9. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  10. package/dist/packem_chunks/HealthPanel.js +1 -1
  11. package/dist/packem_chunks/InsightsPanel.js +1 -1
  12. package/dist/packem_chunks/LogsPanel.js +1 -1
  13. package/dist/packem_chunks/MailPanel.js +3 -91
  14. package/dist/packem_chunks/MetricsPanel.js +1 -1
  15. package/dist/packem_chunks/MigrationsPanel.js +1 -1
  16. package/dist/packem_chunks/PitrPanel.js +1 -1
  17. package/dist/packem_chunks/SchemaViewer.js +1 -1
  18. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  19. package/dist/packem_chunks/SettingsPanel.js +1 -1
  20. package/dist/packem_chunks/SqlEditorPanel.js +1 -1
  21. package/dist/packem_chunks/TableEditor.js +1 -1
  22. package/dist/packem_chunks/containers-panel.js +1 -1
  23. package/dist/packem_chunks/dashboards-panel.js +1 -1
  24. package/dist/packem_chunks/fanout-panel.js +1 -1
  25. package/dist/packem_chunks/flags-panel.js +1 -1
  26. package/dist/packem_chunks/kv-browser.js +1 -1
  27. package/dist/packem_chunks/payments-panel.js +1 -1
  28. package/dist/packem_chunks/permissions-panel.js +1 -1
  29. package/dist/packem_chunks/queues-panel.js +975 -71
  30. package/dist/packem_chunks/rls-panel.js +1 -1
  31. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  32. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  33. package/dist/packem_chunks/workflows-panel.js +1 -1
  34. package/dist/packem_shared/{ADMIN_FUNCTIONS-CdaxLGkE.js → ADMIN_FUNCTIONS-BHHJi3Gb.js} +4 -0
  35. package/dist/packem_shared/{ApiDocsPanel-Cu6mD4u7.js → ApiDocsPanel-D4CJf2ad.js} +1 -1
  36. package/dist/packem_shared/{DataBrowser-DSNK1tPg.js → DataBrowser-BeVNxSVm.js} +1 -1
  37. package/dist/packem_shared/{HomePanel-DQk3P8xX.js → HomePanel-D9MQk8I7.js} +2 -2
  38. package/dist/packem_shared/{Studio-Biu37c3O.js → Studio-C48P1K5W.js} +2 -2
  39. package/dist/packem_shared/{StudioApp-D6a2ZmXS.js → StudioApp-Cqh-SYm2.js} +1 -1
  40. package/dist/packem_shared/{home-panel-Bo-Mgrkn.js → home-panel-CoGxi-oj.js} +1 -1
  41. package/dist/packem_shared/scroll-area-DLhcy-ml.js +93 -0
  42. package/dist/packem_shared/{studio-C4sgu0F7.js → studio-CPHA_-3I.js} +1 -1
  43. package/dist/standalone/{chunk-YM6BBZDN.js → chunk-46K3NKPA.js} +1 -1
  44. package/dist/standalone/{chunk-DFP2DADO.js → chunk-474C2O7W.js} +1 -1
  45. package/dist/standalone/{chunk-JIDZFLTB.js → chunk-6UGM5IHN.js} +1 -1
  46. package/dist/standalone/{chunk-T5HRXUSY.js → chunk-6WRZP62V.js} +1 -1
  47. package/dist/standalone/{chunk-EVPLBWUT.js → chunk-7WNJ4Q7Z.js} +1 -1
  48. package/dist/standalone/{chunk-PA3LN4XJ.js → chunk-BI35RXKQ.js} +1 -1
  49. package/dist/standalone/chunk-BOXSWNXZ.js +1 -0
  50. package/dist/standalone/{chunk-K4ZDRTQM.js → chunk-DVC6YWVP.js} +1 -1
  51. package/dist/standalone/{chunk-G2ICR3DL.js → chunk-DWTBY343.js} +1 -1
  52. package/dist/standalone/{chunk-KTK3V4DC.js → chunk-EIQW6ACH.js} +1 -1
  53. package/dist/standalone/chunk-EUIHTPKI.js +1 -0
  54. package/dist/standalone/{chunk-E6WUCLSI.js → chunk-ILCTSAOB.js} +1 -1
  55. package/dist/standalone/{chunk-GZDWDDXN.js → chunk-IODYGARQ.js} +1 -1
  56. package/dist/standalone/{chunk-XIGIWZLO.js → chunk-JE2YOAB7.js} +1 -1
  57. package/dist/standalone/{chunk-SGDQIWAR.js → chunk-JFSZIUZT.js} +1 -1
  58. package/dist/standalone/{chunk-QHIIRFG7.js → chunk-LD2R263D.js} +1 -1
  59. package/dist/standalone/{chunk-ISJAJWYI.js → chunk-M55U7NHO.js} +1 -1
  60. package/dist/standalone/{chunk-VEZO7G5Q.js → chunk-MPTM7ZU3.js} +1 -1
  61. package/dist/standalone/{chunk-5PQMXK24.js → chunk-NJFMWO6P.js} +1 -1
  62. package/dist/standalone/{chunk-BET2625I.js → chunk-OCHNCAXJ.js} +1 -1
  63. package/dist/standalone/{chunk-7M3F6U4L.js → chunk-PACH5AHG.js} +1 -1
  64. package/dist/standalone/chunk-QLM6FYZW.js +2 -0
  65. package/dist/standalone/{chunk-X72PYOEW.js → chunk-RRAFQ5G2.js} +1 -1
  66. package/dist/standalone/{chunk-SYEIXTEU.js → chunk-SLKF2L74.js} +1 -1
  67. package/dist/standalone/{chunk-DCECRP45.js → chunk-TO4JQX7W.js} +1 -1
  68. package/dist/standalone/{chunk-TM7CMA7X.js → chunk-VTGBPW24.js} +1 -1
  69. package/dist/standalone/{chunk-MFPTVCJ6.js → chunk-X6F22DBL.js} +1 -1
  70. package/dist/standalone/{chunk-E7WLF6IU.js → chunk-XGMIDFUK.js} +1 -1
  71. package/dist/standalone/{chunk-VYMCCC6O.js → chunk-XZE2RNDA.js} +1 -1
  72. package/dist/standalone/chunk-YAECF5LW.js +1 -0
  73. package/dist/standalone/{chunk-GJ6PGSES.js → chunk-YEVCU7TB.js} +1 -1
  74. package/dist/standalone/{chunk-TY7L2V4E.js → chunk-YV43BOP7.js} +1 -1
  75. package/dist/standalone/{chunk-4MLAVZP4.js → chunk-ZU4DZ6NK.js} +1 -1
  76. package/dist/standalone/studio.js +1 -1
  77. package/dist/styles.css +1 -1
  78. package/package.json +2 -2
  79. package/dist/standalone/chunk-AQGOX5DK.js +0 -1
  80. package/dist/standalone/chunk-GVRM4U6W.js +0 -2
  81. package/dist/standalone/chunk-UDSVXA42.js +0 -1
@@ -1,73 +1,85 @@
1
1
  import { c } from 'react/compiler-runtime';
2
- import 'react';
2
+ import { useLunora } from '@lunora/react';
3
+ import { useState } from 'react';
3
4
  import { E as ErrorAlert } from '../packem_shared/error-alert-BBT6D22d.js';
5
+ import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
6
+ import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
4
7
  import { C as Card, a as CardContent } from '../packem_shared/card-DURq3ElK.js';
5
8
  import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
9
+ import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
10
+ import { S as ScrollArea } from '../packem_shared/scroll-area-DLhcy-ml.js';
6
11
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
12
+ import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
7
13
  import { u as useAdminQuery } from '../packem_shared/use-admin-query-BHPKmPuj.js';
14
+ import { useAutoRefresh } from '../packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
8
15
  import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
9
- import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js';
10
- import { jsxDEV } from 'react/jsx-dev-runtime';
16
+ import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-BHHJi3Gb.js';
17
+ import { c as callOptions, e as errorMessage, f as fireAndForget, a as adminRef, i as formatTimestamp } from '../packem_shared/internal-DTsYVn-g.js';
18
+ import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
11
19
 
12
- const QueuesPanel = () => {
13
- const $ = c(18);
14
- const t = useT();
15
- let t0;
16
- if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
17
- t0 = {};
18
- $[0] = t0;
19
- } else {
20
- t0 = $[0];
20
+ const DEFAULT_MESSAGE_LIMIT = 200;
21
+ const SEND_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.sendQueueMessage);
22
+ const REPLAY_QUEUE_MESSAGE = adminRef(ADMIN_FUNCTIONS.replayQueueMessage);
23
+ const CLEAR_QUEUE_MESSAGES = adminRef(ADMIN_FUNCTIONS.clearQueueMessages);
24
+ const BODY_PREVIEW_MAX = 96;
25
+ const formatBody = (value) => {
26
+ if (value === void 0) {
27
+ return "—";
28
+ }
29
+ try {
30
+ return JSON.stringify(value);
31
+ } catch {
32
+ return "[unserializable]";
33
+ }
34
+ };
35
+ const truncate = (text) => text.length > BODY_PREVIEW_MAX ? `${text.slice(0, BODY_PREVIEW_MAX)}…` : text;
36
+ const outcomeVariant = (outcome) => {
37
+ if (outcome === "error") {
38
+ return "destructive";
21
39
  }
40
+ if (outcome === "retry") {
41
+ return "outline";
42
+ }
43
+ return "secondary";
44
+ };
45
+ const tabLabel = (value, t) => {
46
+ if (value === "messages") {
47
+ return t("Messages");
48
+ }
49
+ if (value === "send") {
50
+ return t("Send");
51
+ }
52
+ return t("Declared");
53
+ };
54
+ const QueuesDeclaredTab = (t0) => {
55
+ const $ = c(11);
22
56
  const {
23
- data,
24
- error,
25
- errorSource
26
- } = useAdminQuery(ADMIN_FUNCTIONS.listQueues, t0);
27
- const loaded = data !== void 0;
57
+ loaded,
58
+ queues
59
+ } = t0;
60
+ const t = useT();
28
61
  let t1;
29
- if ($[1] !== data) {
30
- t1 = Array.isArray(data?.queues) ? [...data.queues].toSorted(_temp) : [];
31
- $[1] = data;
32
- $[2] = t1;
62
+ if ($[0] !== t) {
63
+ t1 = t("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker.");
64
+ $[0] = t;
65
+ $[1] = t1;
33
66
  } else {
34
- t1 = $[2];
67
+ t1 = $[1];
35
68
  }
36
- const queues = t1;
37
69
  let t2;
38
- if ($[3] !== error || $[4] !== errorSource) {
39
- t2 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
40
- error: errorSource,
41
- testId: "queues-error"
42
- }, void 0, false);
43
- $[3] = error;
44
- $[4] = errorSource;
45
- $[5] = t2;
46
- } else {
47
- t2 = $[5];
48
- }
49
- let t3;
50
- if ($[6] !== t) {
51
- t3 = t("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker.");
52
- $[6] = t;
53
- $[7] = t3;
54
- } else {
55
- t3 = $[7];
56
- }
57
- let t4;
58
- if ($[8] !== t3) {
59
- t4 = /* @__PURE__ */ jsxDEV("p", {
70
+ if ($[2] !== t1) {
71
+ t2 = /* @__PURE__ */ jsxDEV("p", {
60
72
  className: "text-sm text-muted-foreground",
61
- children: t3
73
+ children: t1
62
74
  }, void 0, false);
63
- $[8] = t3;
64
- $[9] = t4;
75
+ $[2] = t1;
76
+ $[3] = t2;
65
77
  } else {
66
- t4 = $[9];
78
+ t2 = $[3];
67
79
  }
68
- let t5;
69
- if ($[10] !== loaded || $[11] !== queues || $[12] !== t) {
70
- t5 = loaded && queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
80
+ let t3;
81
+ if ($[4] !== loaded || $[5] !== queues || $[6] !== t) {
82
+ t3 = loaded && queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
71
83
  description: t("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),
72
84
  testId: "queues-empty",
73
85
  title: t("No queues defined")
@@ -92,38 +104,921 @@ const QueuesPanel = () => {
92
104
  }, void 0, false)]
93
105
  }, void 0, true)
94
106
  }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
95
- children: queues.map(_temp2)
107
+ children: queues.map(_temp)
96
108
  }, void 0, false)]
97
109
  }, void 0, true)
98
110
  }, void 0, false)
99
111
  }, void 0, false);
100
- $[10] = loaded;
101
- $[11] = queues;
102
- $[12] = t;
103
- $[13] = t5;
112
+ $[4] = loaded;
113
+ $[5] = queues;
114
+ $[6] = t;
115
+ $[7] = t3;
116
+ } else {
117
+ t3 = $[7];
118
+ }
119
+ let t4;
120
+ if ($[8] !== t2 || $[9] !== t3) {
121
+ t4 = /* @__PURE__ */ jsxDEV("div", {
122
+ className: "flex flex-col gap-4",
123
+ "data-testid": "queues-declared",
124
+ children: [t2, t3]
125
+ }, void 0, true);
126
+ $[8] = t2;
127
+ $[9] = t3;
128
+ $[10] = t4;
104
129
  } else {
105
- t5 = $[13];
130
+ t4 = $[10];
106
131
  }
132
+ return t4;
133
+ };
134
+ const QueueLogRow = (t0) => {
135
+ const $ = c(67);
136
+ const {
137
+ message,
138
+ onReplay,
139
+ replayingId
140
+ } = t0;
141
+ const t = useT();
142
+ let T0;
143
+ let T1;
144
+ let t1;
145
+ let t2;
146
+ let t3;
147
+ let t4;
148
+ let t5;
107
149
  let t6;
108
- if ($[14] !== t2 || $[15] !== t4 || $[16] !== t5) {
109
- t6 = /* @__PURE__ */ jsxDEV("div", {
150
+ let t7;
151
+ let t8;
152
+ if ($[0] !== message.attempts || $[1] !== message.body || $[2] !== message.deadLettered || $[3] !== message.exportName || $[4] !== message.id || $[5] !== message.messageId || $[6] !== message.outcome || $[7] !== message.queue || $[8] !== t) {
153
+ const body = formatBody(message.body);
154
+ T1 = TableRow;
155
+ t4 = `queues-message-${message.id}`;
156
+ const t92 = message.exportName ?? message.queue;
157
+ if ($[19] !== t92) {
158
+ t5 = /* @__PURE__ */ jsxDEV(TableCell, {
159
+ className: "font-mono text-xs",
160
+ children: t92
161
+ }, void 0, false);
162
+ $[19] = t92;
163
+ $[20] = t5;
164
+ } else {
165
+ t5 = $[20];
166
+ }
167
+ if ($[21] !== message.messageId) {
168
+ t6 = /* @__PURE__ */ jsxDEV(TableCell, {
169
+ className: "max-w-[16ch] truncate font-mono text-xs text-muted-foreground",
170
+ title: message.messageId,
171
+ children: message.messageId
172
+ }, void 0, false);
173
+ $[21] = message.messageId;
174
+ $[22] = t6;
175
+ } else {
176
+ t6 = $[22];
177
+ }
178
+ if ($[23] !== message.attempts) {
179
+ t7 = /* @__PURE__ */ jsxDEV(TableCell, {
180
+ className: "font-mono text-xs tabular-nums",
181
+ children: message.attempts
182
+ }, void 0, false);
183
+ $[23] = message.attempts;
184
+ $[24] = t7;
185
+ } else {
186
+ t7 = $[24];
187
+ }
188
+ const t102 = `queues-outcome-${message.id}`;
189
+ let t112;
190
+ if ($[25] !== message.outcome) {
191
+ t112 = outcomeVariant(message.outcome);
192
+ $[25] = message.outcome;
193
+ $[26] = t112;
194
+ } else {
195
+ t112 = $[26];
196
+ }
197
+ let t122;
198
+ if ($[27] !== message.outcome || $[28] !== t102 || $[29] !== t112) {
199
+ t122 = /* @__PURE__ */ jsxDEV(Badge, {
200
+ "data-testid": t102,
201
+ variant: t112,
202
+ children: message.outcome
203
+ }, void 0, false);
204
+ $[27] = message.outcome;
205
+ $[28] = t102;
206
+ $[29] = t112;
207
+ $[30] = t122;
208
+ } else {
209
+ t122 = $[30];
210
+ }
211
+ let t132;
212
+ if ($[31] !== message.deadLettered || $[32] !== message.id || $[33] !== t) {
213
+ t132 = message.deadLettered && /* @__PURE__ */ jsxDEV(Badge, {
214
+ "data-testid": `queues-dlq-${message.id}`,
215
+ variant: "destructive",
216
+ children: t("DLQ")
217
+ }, void 0, false);
218
+ $[31] = message.deadLettered;
219
+ $[32] = message.id;
220
+ $[33] = t;
221
+ $[34] = t132;
222
+ } else {
223
+ t132 = $[34];
224
+ }
225
+ if ($[35] !== t122 || $[36] !== t132) {
226
+ t8 = /* @__PURE__ */ jsxDEV(TableCell, {
227
+ children: /* @__PURE__ */ jsxDEV("span", {
228
+ className: "inline-flex items-center gap-1",
229
+ children: [t122, t132]
230
+ }, void 0, true)
231
+ }, void 0, false);
232
+ $[35] = t122;
233
+ $[36] = t132;
234
+ $[37] = t8;
235
+ } else {
236
+ t8 = $[37];
237
+ }
238
+ T0 = TableCell;
239
+ t1 = "max-w-[32ch] truncate font-mono text-xs text-muted-foreground";
240
+ t2 = body;
241
+ t3 = truncate(body);
242
+ $[0] = message.attempts;
243
+ $[1] = message.body;
244
+ $[2] = message.deadLettered;
245
+ $[3] = message.exportName;
246
+ $[4] = message.id;
247
+ $[5] = message.messageId;
248
+ $[6] = message.outcome;
249
+ $[7] = message.queue;
250
+ $[8] = t;
251
+ $[9] = T0;
252
+ $[10] = T1;
253
+ $[11] = t1;
254
+ $[12] = t2;
255
+ $[13] = t3;
256
+ $[14] = t4;
257
+ $[15] = t5;
258
+ $[16] = t6;
259
+ $[17] = t7;
260
+ $[18] = t8;
261
+ } else {
262
+ T0 = $[9];
263
+ T1 = $[10];
264
+ t1 = $[11];
265
+ t2 = $[12];
266
+ t3 = $[13];
267
+ t4 = $[14];
268
+ t5 = $[15];
269
+ t6 = $[16];
270
+ t7 = $[17];
271
+ t8 = $[18];
272
+ }
273
+ let t9;
274
+ if ($[38] !== T0 || $[39] !== t1 || $[40] !== t2 || $[41] !== t3) {
275
+ t9 = /* @__PURE__ */ jsxDEV(T0, {
276
+ className: t1,
277
+ title: t2,
278
+ children: t3
279
+ }, void 0, false);
280
+ $[38] = T0;
281
+ $[39] = t1;
282
+ $[40] = t2;
283
+ $[41] = t3;
284
+ $[42] = t9;
285
+ } else {
286
+ t9 = $[42];
287
+ }
288
+ let t10;
289
+ if ($[43] !== message.capturedAt) {
290
+ t10 = formatTimestamp(message.capturedAt, "—");
291
+ $[43] = message.capturedAt;
292
+ $[44] = t10;
293
+ } else {
294
+ t10 = $[44];
295
+ }
296
+ let t11;
297
+ if ($[45] !== t10) {
298
+ t11 = /* @__PURE__ */ jsxDEV(TableCell, {
299
+ className: "text-xs text-muted-foreground tabular-nums",
300
+ children: t10
301
+ }, void 0, false);
302
+ $[45] = t10;
303
+ $[46] = t11;
304
+ } else {
305
+ t11 = $[46];
306
+ }
307
+ const t12 = `queues-replay-${message.id}`;
308
+ const t13 = replayingId !== null;
309
+ let t14;
310
+ if ($[47] !== message.id || $[48] !== replayingId || $[49] !== t) {
311
+ t14 = replayingId === message.id ? t("Replaying…") : t("Replay");
312
+ $[47] = message.id;
313
+ $[48] = replayingId;
314
+ $[49] = t;
315
+ $[50] = t14;
316
+ } else {
317
+ t14 = $[50];
318
+ }
319
+ let t15;
320
+ if ($[51] !== message.id || $[52] !== onReplay || $[53] !== t12 || $[54] !== t13 || $[55] !== t14) {
321
+ t15 = /* @__PURE__ */ jsxDEV(TableCell, {
322
+ children: /* @__PURE__ */ jsxDEV(Button, {
323
+ "data-id": message.id,
324
+ "data-testid": t12,
325
+ disabled: t13,
326
+ onClick: onReplay,
327
+ size: "xs",
328
+ type: "button",
329
+ variant: "outline",
330
+ children: t14
331
+ }, void 0, false)
332
+ }, void 0, false);
333
+ $[51] = message.id;
334
+ $[52] = onReplay;
335
+ $[53] = t12;
336
+ $[54] = t13;
337
+ $[55] = t14;
338
+ $[56] = t15;
339
+ } else {
340
+ t15 = $[56];
341
+ }
342
+ let t16;
343
+ if ($[57] !== T1 || $[58] !== t11 || $[59] !== t15 || $[60] !== t4 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== t9) {
344
+ t16 = /* @__PURE__ */ jsxDEV(T1, {
345
+ "data-testid": t4,
346
+ children: [t5, t6, t7, t8, t9, t11, t15]
347
+ }, void 0, true);
348
+ $[57] = T1;
349
+ $[58] = t11;
350
+ $[59] = t15;
351
+ $[60] = t4;
352
+ $[61] = t5;
353
+ $[62] = t6;
354
+ $[63] = t7;
355
+ $[64] = t8;
356
+ $[65] = t9;
357
+ $[66] = t16;
358
+ } else {
359
+ t16 = $[66];
360
+ }
361
+ return t16;
362
+ };
363
+ const QueuesMessagesTab = (t0) => {
364
+ const $ = c(26);
365
+ const {
366
+ hasError,
367
+ messages,
368
+ onClear,
369
+ onReplay,
370
+ replayingId
371
+ } = t0;
372
+ const t = useT();
373
+ let t1;
374
+ if ($[0] !== t) {
375
+ t1 = t("Cloudflare Queues have no peek API, so this is what push consumers actually processed — not pending depth.");
376
+ $[0] = t;
377
+ $[1] = t1;
378
+ } else {
379
+ t1 = $[1];
380
+ }
381
+ let t2;
382
+ if ($[2] !== t1) {
383
+ t2 = /* @__PURE__ */ jsxDEV("p", {
384
+ className: "text-sm text-muted-foreground",
385
+ children: t1
386
+ }, void 0, false);
387
+ $[2] = t1;
388
+ $[3] = t2;
389
+ } else {
390
+ t2 = $[3];
391
+ }
392
+ const t3 = messages.length === 0;
393
+ let t4;
394
+ if ($[4] !== t) {
395
+ t4 = t("Clear log");
396
+ $[4] = t;
397
+ $[5] = t4;
398
+ } else {
399
+ t4 = $[5];
400
+ }
401
+ let t5;
402
+ if ($[6] !== onClear || $[7] !== t3 || $[8] !== t4) {
403
+ t5 = /* @__PURE__ */ jsxDEV(Button, {
404
+ className: "ml-auto",
405
+ "data-testid": "queues-clear",
406
+ disabled: t3,
407
+ onClick: onClear,
408
+ size: "sm",
409
+ type: "button",
410
+ variant: "outline",
411
+ children: t4
412
+ }, void 0, false);
413
+ $[6] = onClear;
414
+ $[7] = t3;
415
+ $[8] = t4;
416
+ $[9] = t5;
417
+ } else {
418
+ t5 = $[9];
419
+ }
420
+ let t6;
421
+ if ($[10] !== messages.length || $[11] !== t) {
422
+ t6 = messages.length > 0 && /* @__PURE__ */ jsxDEV(Badge, {
423
+ "data-testid": "queues-count",
424
+ variant: "secondary",
425
+ children: t("{count} messages", {
426
+ count: messages.length
427
+ })
428
+ }, void 0, false);
429
+ $[10] = messages.length;
430
+ $[11] = t;
431
+ $[12] = t6;
432
+ } else {
433
+ t6 = $[12];
434
+ }
435
+ let t7;
436
+ if ($[13] !== t2 || $[14] !== t5 || $[15] !== t6) {
437
+ t7 = /* @__PURE__ */ jsxDEV("div", {
438
+ className: "flex flex-wrap items-center gap-2",
439
+ children: [t2, t5, t6]
440
+ }, void 0, true);
441
+ $[13] = t2;
442
+ $[14] = t5;
443
+ $[15] = t6;
444
+ $[16] = t7;
445
+ } else {
446
+ t7 = $[16];
447
+ }
448
+ let t8;
449
+ if ($[17] !== hasError || $[18] !== messages || $[19] !== onReplay || $[20] !== replayingId || $[21] !== t) {
450
+ t8 = !hasError && messages.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
451
+ description: t("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),
452
+ testId: "queues-messages-empty",
453
+ title: t("No consumed messages yet.")
454
+ }, void 0, false) : /* @__PURE__ */ jsxDEV(Card, {
455
+ className: "overflow-hidden py-0",
456
+ children: /* @__PURE__ */ jsxDEV(CardContent, {
457
+ className: "px-0",
458
+ children: /* @__PURE__ */ jsxDEV(ScrollArea, {
459
+ className: "max-h-[32rem]",
460
+ "data-testid": "queues-messages-scroll",
461
+ children: /* @__PURE__ */ jsxDEV(Table, {
462
+ "data-testid": "queues-messages-table",
463
+ children: [/* @__PURE__ */ jsxDEV(TableHeader, {
464
+ children: /* @__PURE__ */ jsxDEV(TableRow, {
465
+ children: [/* @__PURE__ */ jsxDEV(TableHead, {
466
+ children: t("Export")
467
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
468
+ children: t("Message")
469
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
470
+ children: t("Attempts")
471
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
472
+ children: t("Outcome")
473
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
474
+ children: t("Body")
475
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {
476
+ children: t("Captured")
477
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableHead, {}, void 0, false)]
478
+ }, void 0, true)
479
+ }, void 0, false), /* @__PURE__ */ jsxDEV(TableBody, {
480
+ children: messages.map((message) => /* @__PURE__ */ jsxDEV(QueueLogRow, {
481
+ message,
482
+ onReplay,
483
+ replayingId
484
+ }, message.id, false))
485
+ }, void 0, false)]
486
+ }, void 0, true)
487
+ }, void 0, false)
488
+ }, void 0, false)
489
+ }, void 0, false);
490
+ $[17] = hasError;
491
+ $[18] = messages;
492
+ $[19] = onReplay;
493
+ $[20] = replayingId;
494
+ $[21] = t;
495
+ $[22] = t8;
496
+ } else {
497
+ t8 = $[22];
498
+ }
499
+ let t9;
500
+ if ($[23] !== t7 || $[24] !== t8) {
501
+ t9 = /* @__PURE__ */ jsxDEV("div", {
502
+ className: "flex flex-col gap-4",
503
+ "data-testid": "queues-messages",
504
+ children: [t7, t8]
505
+ }, void 0, true);
506
+ $[23] = t7;
507
+ $[24] = t8;
508
+ $[25] = t9;
509
+ } else {
510
+ t9 = $[25];
511
+ }
512
+ return t9;
513
+ };
514
+ const QueuesSendTab = (t0) => {
515
+ const $ = c(20);
516
+ const {
517
+ batchMode,
518
+ bodyText,
519
+ delayText,
520
+ onBatchModeChange,
521
+ onBodyChange,
522
+ onDelayChange,
523
+ onSelectExport,
524
+ onSend,
525
+ queues,
526
+ selectedExportName,
527
+ sending
528
+ } = t0;
529
+ const t = useT();
530
+ let t1;
531
+ if ($[0] !== t) {
532
+ t1 = t("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it.");
533
+ $[0] = t;
534
+ $[1] = t1;
535
+ } else {
536
+ t1 = $[1];
537
+ }
538
+ let t2;
539
+ if ($[2] !== t1) {
540
+ t2 = /* @__PURE__ */ jsxDEV("p", {
541
+ className: "text-sm text-muted-foreground",
542
+ children: t1
543
+ }, void 0, false);
544
+ $[2] = t1;
545
+ $[3] = t2;
546
+ } else {
547
+ t2 = $[3];
548
+ }
549
+ let t3;
550
+ if ($[4] !== batchMode || $[5] !== bodyText || $[6] !== delayText || $[7] !== onBatchModeChange || $[8] !== onBodyChange || $[9] !== onDelayChange || $[10] !== onSelectExport || $[11] !== onSend || $[12] !== queues || $[13] !== selectedExportName || $[14] !== sending || $[15] !== t) {
551
+ t3 = queues.length === 0 ? /* @__PURE__ */ jsxDEV(EmptyState, {
552
+ description: t("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),
553
+ testId: "queues-send-empty",
554
+ title: t("No queues to send to")
555
+ }, void 0, false) : /* @__PURE__ */ jsxDEV(Fragment, {
556
+ children: [/* @__PURE__ */ jsxDEV("div", {
557
+ className: "flex flex-wrap items-center gap-2",
558
+ children: [/* @__PURE__ */ jsxDEV("select", {
559
+ "aria-label": t("Queue"),
560
+ className: "h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50",
561
+ "data-testid": "queues-send-select",
562
+ onChange: onSelectExport,
563
+ value: selectedExportName,
564
+ children: queues.map(_temp2)
565
+ }, void 0, false), /* @__PURE__ */ jsxDEV(Input, {
566
+ "aria-label": t("Delay (seconds)"),
567
+ className: "max-w-36",
568
+ "data-testid": "queues-send-delay",
569
+ min: 0,
570
+ onChange: onDelayChange,
571
+ placeholder: t("Delay (s)"),
572
+ type: "number",
573
+ value: delayText
574
+ }, void 0, false), /* @__PURE__ */ jsxDEV("label", {
575
+ className: "flex items-center gap-1.5 text-xs text-muted-foreground",
576
+ htmlFor: "queues-send-batch",
577
+ children: [/* @__PURE__ */ jsxDEV("input", {
578
+ checked: batchMode,
579
+ "data-testid": "queues-send-batch",
580
+ id: "queues-send-batch",
581
+ onChange: onBatchModeChange,
582
+ type: "checkbox"
583
+ }, void 0, false), t("Send as batch (JSON array)")]
584
+ }, void 0, true), /* @__PURE__ */ jsxDEV(Button, {
585
+ className: "ml-auto",
586
+ "data-testid": "queues-send-button",
587
+ disabled: sending || selectedExportName === "",
588
+ onClick: onSend,
589
+ type: "button",
590
+ children: sending ? t("Sending…") : t("Send message")
591
+ }, void 0, false)]
592
+ }, void 0, true), /* @__PURE__ */ jsxDEV(Textarea, {
593
+ "aria-label": t("Message body (JSON)"),
594
+ className: "font-mono",
595
+ "data-testid": "queues-send-body",
596
+ onChange: onBodyChange,
597
+ placeholder: batchMode ? '[ { "hello": "world" } ]' : '{ "hello": "world" }',
598
+ value: bodyText
599
+ }, void 0, false)]
600
+ }, void 0, true);
601
+ $[4] = batchMode;
602
+ $[5] = bodyText;
603
+ $[6] = delayText;
604
+ $[7] = onBatchModeChange;
605
+ $[8] = onBodyChange;
606
+ $[9] = onDelayChange;
607
+ $[10] = onSelectExport;
608
+ $[11] = onSend;
609
+ $[12] = queues;
610
+ $[13] = selectedExportName;
611
+ $[14] = sending;
612
+ $[15] = t;
613
+ $[16] = t3;
614
+ } else {
615
+ t3 = $[16];
616
+ }
617
+ let t4;
618
+ if ($[17] !== t2 || $[18] !== t3) {
619
+ t4 = /* @__PURE__ */ jsxDEV("div", {
620
+ className: "flex flex-col gap-3",
621
+ "data-testid": "queues-send",
622
+ children: [t2, t3]
623
+ }, void 0, true);
624
+ $[17] = t2;
625
+ $[18] = t3;
626
+ $[19] = t4;
627
+ } else {
628
+ t4 = $[19];
629
+ }
630
+ return t4;
631
+ };
632
+ const QueuesPanel = (t0) => {
633
+ const $ = c(74);
634
+ const {
635
+ limit
636
+ } = t0;
637
+ const messageLimit = limit ?? DEFAULT_MESSAGE_LIMIT;
638
+ const client = useLunora();
639
+ const t = useT();
640
+ const [tab, setTab] = useState("declared");
641
+ const [actionError, setActionError] = useState(null);
642
+ let t1;
643
+ if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
644
+ t1 = {};
645
+ $[0] = t1;
646
+ } else {
647
+ t1 = $[0];
648
+ }
649
+ const {
650
+ data: queuesData,
651
+ error: queuesError,
652
+ errorSource: queuesErrorSource
653
+ } = useAdminQuery(ADMIN_FUNCTIONS.listQueues, t1);
654
+ let t2;
655
+ if ($[1] !== messageLimit) {
656
+ t2 = {
657
+ limit: messageLimit
658
+ };
659
+ $[1] = messageLimit;
660
+ $[2] = t2;
661
+ } else {
662
+ t2 = $[2];
663
+ }
664
+ const {
665
+ data: messagesData,
666
+ error: messagesError,
667
+ errorSource: messagesErrorSource,
668
+ refetch: refetchMessages
669
+ } = useAdminQuery(ADMIN_FUNCTIONS.getQueueMessages, t2);
670
+ const queues = Array.isArray(queuesData?.queues) ? [...queuesData.queues].toSorted(_temp3) : [];
671
+ let t3;
672
+ if ($[3] !== messagesData?.entries) {
673
+ t3 = messagesData?.entries ?? [];
674
+ $[3] = messagesData?.entries;
675
+ $[4] = t3;
676
+ } else {
677
+ t3 = $[4];
678
+ }
679
+ const messages = t3;
680
+ const [selectedExport, setSelectedExport] = useState("");
681
+ const [bodyText, setBodyText] = useState("");
682
+ const [delayText, setDelayText] = useState("");
683
+ const [batchMode, setBatchMode] = useState(false);
684
+ const [sending, setSending] = useState(false);
685
+ const [replayingId, setReplayingId] = useState(null);
686
+ const selectedExportName = queues.some((queue) => queue.exportName === selectedExport) ? selectedExport : queues[0]?.exportName ?? "";
687
+ const readError = tab === "messages" ? messagesError : queuesError;
688
+ const readErrorSource = tab === "messages" ? messagesErrorSource : queuesErrorSource;
689
+ const error = readError ?? actionError;
690
+ const errorSource = readError === null ? actionError : readErrorSource;
691
+ let t4;
692
+ if ($[5] !== refetchMessages) {
693
+ t4 = () => {
694
+ refetchMessages();
695
+ };
696
+ $[5] = refetchMessages;
697
+ $[6] = t4;
698
+ } else {
699
+ t4 = $[6];
700
+ }
701
+ useAutoRefresh(t4, tab === "messages");
702
+ let t5;
703
+ if ($[7] !== batchMode || $[8] !== bodyText || $[9] !== client || $[10] !== delayText || $[11] !== refetchMessages || $[12] !== selectedExportName || $[13] !== setSending || $[14] !== t) {
704
+ t5 = async () => {
705
+ setActionError(null);
706
+ const exportName = selectedExportName;
707
+ if (exportName === "") {
708
+ return;
709
+ }
710
+ let body = null;
711
+ const trimmedBody = bodyText.trim();
712
+ if (trimmedBody !== "") {
713
+ try {
714
+ body = JSON.parse(trimmedBody);
715
+ } catch {
716
+ setActionError(t("Body must be valid JSON."));
717
+ return;
718
+ }
719
+ }
720
+ let delaySeconds;
721
+ const trimmedDelay = delayText.trim();
722
+ if (trimmedDelay !== "") {
723
+ const parsed = Number(trimmedDelay);
724
+ if (!Number.isFinite(parsed) || parsed < 0) {
725
+ setActionError(t("Delay must be a non-negative number of seconds."));
726
+ return;
727
+ }
728
+ delaySeconds = parsed;
729
+ }
730
+ if (batchMode && !Array.isArray(body)) {
731
+ setActionError(t("Batch mode needs a JSON array body — each element is enqueued as one message."));
732
+ return;
733
+ }
734
+ setSending(true);
735
+ const args = batchMode ? {
736
+ batch: body,
737
+ delaySeconds,
738
+ exportName
739
+ } : {
740
+ body,
741
+ delaySeconds,
742
+ exportName
743
+ };
744
+ try {
745
+ await client.query(SEND_QUEUE_MESSAGE, args, callOptions(""));
746
+ refetchMessages();
747
+ } catch (t62) {
748
+ const error_ = t62;
749
+ setActionError(errorMessage(error_));
750
+ }
751
+ setSending(false);
752
+ };
753
+ $[7] = batchMode;
754
+ $[8] = bodyText;
755
+ $[9] = client;
756
+ $[10] = delayText;
757
+ $[11] = refetchMessages;
758
+ $[12] = selectedExportName;
759
+ $[13] = setSending;
760
+ $[14] = t;
761
+ $[15] = t5;
762
+ } else {
763
+ t5 = $[15];
764
+ }
765
+ const send = t5;
766
+ let t6;
767
+ if ($[16] !== client || $[17] !== refetchMessages || $[18] !== setReplayingId) {
768
+ t6 = async (id) => {
769
+ setActionError(null);
770
+ setReplayingId(id);
771
+ try {
772
+ await client.query(REPLAY_QUEUE_MESSAGE, {
773
+ id
774
+ }, callOptions(""));
775
+ refetchMessages();
776
+ } catch (t72) {
777
+ const error__0 = t72;
778
+ setActionError(errorMessage(error__0));
779
+ }
780
+ setReplayingId(null);
781
+ };
782
+ $[16] = client;
783
+ $[17] = refetchMessages;
784
+ $[18] = setReplayingId;
785
+ $[19] = t6;
786
+ } else {
787
+ t6 = $[19];
788
+ }
789
+ const replay = t6;
790
+ let t7;
791
+ if ($[20] !== client || $[21] !== refetchMessages) {
792
+ t7 = async () => {
793
+ setActionError(null);
794
+ try {
795
+ await client.query(CLEAR_QUEUE_MESSAGES, {}, callOptions(""));
796
+ refetchMessages();
797
+ } catch (t82) {
798
+ const error__1 = t82;
799
+ setActionError(errorMessage(error__1));
800
+ }
801
+ };
802
+ $[20] = client;
803
+ $[21] = refetchMessages;
804
+ $[22] = t7;
805
+ } else {
806
+ t7 = $[22];
807
+ }
808
+ const clearLog = t7;
809
+ let t8;
810
+ if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
811
+ t8 = (event) => {
812
+ const next = event.currentTarget.dataset.tab;
813
+ if (next === "declared" || next === "messages" || next === "send") {
814
+ setTab(next);
815
+ }
816
+ };
817
+ $[23] = t8;
818
+ } else {
819
+ t8 = $[23];
820
+ }
821
+ const onSelectTab = t8;
822
+ let t9;
823
+ if ($[24] !== setSelectedExport) {
824
+ t9 = (event_0) => {
825
+ setSelectedExport(event_0.currentTarget.value);
826
+ };
827
+ $[24] = setSelectedExport;
828
+ $[25] = t9;
829
+ } else {
830
+ t9 = $[25];
831
+ }
832
+ const onSelectExport = t9;
833
+ let t10;
834
+ if ($[26] !== setBodyText) {
835
+ t10 = (event_1) => {
836
+ setBodyText(event_1.currentTarget.value);
837
+ };
838
+ $[26] = setBodyText;
839
+ $[27] = t10;
840
+ } else {
841
+ t10 = $[27];
842
+ }
843
+ const onBodyChange = t10;
844
+ let t11;
845
+ if ($[28] !== setDelayText) {
846
+ t11 = (event_2) => {
847
+ setDelayText(event_2.currentTarget.value);
848
+ };
849
+ $[28] = setDelayText;
850
+ $[29] = t11;
851
+ } else {
852
+ t11 = $[29];
853
+ }
854
+ const onDelayChange = t11;
855
+ let t12;
856
+ if ($[30] !== setBatchMode) {
857
+ t12 = (event_3) => {
858
+ setBatchMode(event_3.currentTarget.checked);
859
+ };
860
+ $[30] = setBatchMode;
861
+ $[31] = t12;
862
+ } else {
863
+ t12 = $[31];
864
+ }
865
+ const onBatchModeChange = t12;
866
+ let t13;
867
+ if ($[32] !== send) {
868
+ t13 = () => {
869
+ fireAndForget(send());
870
+ };
871
+ $[32] = send;
872
+ $[33] = t13;
873
+ } else {
874
+ t13 = $[33];
875
+ }
876
+ const onSend = t13;
877
+ let t14;
878
+ if ($[34] !== replay) {
879
+ t14 = (event_4) => {
880
+ const {
881
+ id: id_0
882
+ } = event_4.currentTarget.dataset;
883
+ if (id_0 !== void 0) {
884
+ fireAndForget(replay(id_0));
885
+ }
886
+ };
887
+ $[34] = replay;
888
+ $[35] = t14;
889
+ } else {
890
+ t14 = $[35];
891
+ }
892
+ const onReplay = t14;
893
+ let t15;
894
+ if ($[36] !== clearLog) {
895
+ t15 = () => {
896
+ fireAndForget(clearLog());
897
+ };
898
+ $[36] = clearLog;
899
+ $[37] = t15;
900
+ } else {
901
+ t15 = $[37];
902
+ }
903
+ const onClear = t15;
904
+ let t16;
905
+ if ($[38] !== t || $[39] !== tab) {
906
+ t16 = /* @__PURE__ */ jsxDEV("div", {
907
+ className: "flex items-center gap-1",
908
+ "data-testid": "queues-tabs",
909
+ role: "tablist",
910
+ children: ["declared", "messages", "send"].map((value) => /* @__PURE__ */ jsxDEV(Button, {
911
+ "aria-selected": tab === value,
912
+ "data-tab": value,
913
+ "data-testid": `queues-tab-${value}`,
914
+ onClick: onSelectTab,
915
+ role: "tab",
916
+ size: "sm",
917
+ type: "button",
918
+ variant: tab === value ? "secondary" : "ghost",
919
+ children: tabLabel(value, t)
920
+ }, value, false))
921
+ }, void 0, false);
922
+ $[38] = t;
923
+ $[39] = tab;
924
+ $[40] = t16;
925
+ } else {
926
+ t16 = $[40];
927
+ }
928
+ let t17;
929
+ if ($[41] !== error || $[42] !== errorSource) {
930
+ t17 = error !== null && /* @__PURE__ */ jsxDEV(ErrorAlert, {
931
+ error: errorSource,
932
+ testId: "queues-error"
933
+ }, void 0, false);
934
+ $[41] = error;
935
+ $[42] = errorSource;
936
+ $[43] = t17;
937
+ } else {
938
+ t17 = $[43];
939
+ }
940
+ let t18;
941
+ if ($[44] !== queues || $[45] !== queuesData || $[46] !== tab) {
942
+ t18 = tab === "declared" && /* @__PURE__ */ jsxDEV(QueuesDeclaredTab, {
943
+ loaded: queuesData !== void 0,
944
+ queues
945
+ }, void 0, false);
946
+ $[44] = queues;
947
+ $[45] = queuesData;
948
+ $[46] = tab;
949
+ $[47] = t18;
950
+ } else {
951
+ t18 = $[47];
952
+ }
953
+ let t19;
954
+ if ($[48] !== messages || $[49] !== messagesError || $[50] !== onClear || $[51] !== onReplay || $[52] !== replayingId || $[53] !== tab) {
955
+ t19 = tab === "messages" && /* @__PURE__ */ jsxDEV(QueuesMessagesTab, {
956
+ hasError: messagesError !== null,
957
+ messages,
958
+ onClear,
959
+ onReplay,
960
+ replayingId
961
+ }, void 0, false);
962
+ $[48] = messages;
963
+ $[49] = messagesError;
964
+ $[50] = onClear;
965
+ $[51] = onReplay;
966
+ $[52] = replayingId;
967
+ $[53] = tab;
968
+ $[54] = t19;
969
+ } else {
970
+ t19 = $[54];
971
+ }
972
+ let t20;
973
+ if ($[55] !== batchMode || $[56] !== bodyText || $[57] !== delayText || $[58] !== onBatchModeChange || $[59] !== onBodyChange || $[60] !== onDelayChange || $[61] !== onSelectExport || $[62] !== onSend || $[63] !== queues || $[64] !== selectedExportName || $[65] !== sending || $[66] !== tab) {
974
+ t20 = tab === "send" && /* @__PURE__ */ jsxDEV(QueuesSendTab, {
975
+ batchMode,
976
+ bodyText,
977
+ delayText,
978
+ onBatchModeChange,
979
+ onBodyChange,
980
+ onDelayChange,
981
+ onSelectExport,
982
+ onSend,
983
+ queues,
984
+ selectedExportName,
985
+ sending
986
+ }, void 0, false);
987
+ $[55] = batchMode;
988
+ $[56] = bodyText;
989
+ $[57] = delayText;
990
+ $[58] = onBatchModeChange;
991
+ $[59] = onBodyChange;
992
+ $[60] = onDelayChange;
993
+ $[61] = onSelectExport;
994
+ $[62] = onSend;
995
+ $[63] = queues;
996
+ $[64] = selectedExportName;
997
+ $[65] = sending;
998
+ $[66] = tab;
999
+ $[67] = t20;
1000
+ } else {
1001
+ t20 = $[67];
1002
+ }
1003
+ let t21;
1004
+ if ($[68] !== t16 || $[69] !== t17 || $[70] !== t18 || $[71] !== t19 || $[72] !== t20) {
1005
+ t21 = /* @__PURE__ */ jsxDEV("div", {
110
1006
  className: "flex flex-col gap-6",
111
1007
  "data-testid": "lunora-queues-panel",
112
- children: [t2, t4, t5]
1008
+ children: [t16, t17, t18, t19, t20]
113
1009
  }, void 0, true);
114
- $[14] = t2;
115
- $[15] = t4;
116
- $[16] = t5;
117
- $[17] = t6;
1010
+ $[68] = t16;
1011
+ $[69] = t17;
1012
+ $[70] = t18;
1013
+ $[71] = t19;
1014
+ $[72] = t20;
1015
+ $[73] = t21;
118
1016
  } else {
119
- t6 = $[17];
1017
+ t21 = $[73];
120
1018
  }
121
- return t6;
1019
+ return t21;
122
1020
  };
123
- function _temp(a, b) {
124
- return a.exportName.localeCompare(b.exportName);
125
- }
126
- function _temp2(queue) {
1021
+ function _temp(queue) {
127
1022
  return /* @__PURE__ */ jsxDEV(TableRow, {
128
1023
  "data-testid": `queues-row-${queue.exportName}`,
129
1024
  children: [/* @__PURE__ */ jsxDEV(TableCell, {
@@ -144,5 +1039,14 @@ function _temp2(queue) {
144
1039
  }, void 0, false)]
145
1040
  }, queue.exportName, true);
146
1041
  }
1042
+ function _temp2(queue) {
1043
+ return /* @__PURE__ */ jsxDEV("option", {
1044
+ value: queue.exportName,
1045
+ children: queue.exportName
1046
+ }, queue.exportName, false);
1047
+ }
1048
+ function _temp3(a, b) {
1049
+ return a.exportName.localeCompare(b.exportName);
1050
+ }
147
1051
 
148
1052
  export { QueuesPanel as default };