@burdenoff/microfe-store 2026.1028.1 → 2026.1102.1

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 (31) hide show
  1. package/dist/StoreAdminRoutes.js +22 -12
  2. package/dist/StoreAdminRoutes.js.map +1 -1
  3. package/dist/StoreRoot.js +47 -36
  4. package/dist/StoreRoot.js.map +1 -1
  5. package/dist/StoreRoutes.js +72 -59
  6. package/dist/StoreRoutes.js.map +1 -1
  7. package/dist/components/TemplateRevisionsQueue.d.ts +10 -0
  8. package/dist/components/TemplateRevisionsQueue.js +300 -0
  9. package/dist/components/TemplateRevisionsQueue.js.map +1 -0
  10. package/dist/components/WorkflowTemplatePreviewPanel.d.ts +50 -0
  11. package/dist/components/WorkflowTemplatePreviewPanel.js +221 -0
  12. package/dist/components/WorkflowTemplatePreviewPanel.js.map +1 -0
  13. package/dist/components/governance/ReportListingCard.d.ts +11 -0
  14. package/dist/components/governance/ReportListingCard.js +100 -0
  15. package/dist/components/governance/ReportListingCard.js.map +1 -0
  16. package/dist/pages/AdminDashboardPage.js +48 -27
  17. package/dist/pages/AdminDashboardPage.js.map +1 -1
  18. package/dist/pages/AdminGovernancePage.d.ts +3 -0
  19. package/dist/pages/AdminGovernancePage.js +883 -0
  20. package/dist/pages/AdminGovernancePage.js.map +1 -0
  21. package/dist/pages/AdminSubmissionsQueuePage.js +468 -335
  22. package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
  23. package/dist/pages/ProductDetailPage.js +220 -215
  24. package/dist/pages/ProductDetailPage.js.map +1 -1
  25. package/dist/pages/PublisherGovernancePage.d.ts +3 -0
  26. package/dist/pages/PublisherGovernancePage.js +230 -0
  27. package/dist/pages/PublisherGovernancePage.js.map +1 -0
  28. package/dist/utils/governance.d.ts +158 -0
  29. package/dist/utils/governance.js +129 -0
  30. package/dist/utils/governance.js.map +1 -0
  31. package/package.json +1 -1
@@ -1,35 +1,45 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
2
  import { formatPriceForModel as t } from "../utils/index.js";
3
- import { Markdown as n } from "../node_modules/react-markdown/lib/index.js";
4
- import { InstallAppModal as r } from "../components/InstallAppModal.js";
5
- import { useCallback as i, useEffect as a, useState as o } from "react";
6
- import { useNavigate as ee } from "react-router";
7
- import { ArrowLeft as te, Check as ne, ChevronDown as re, ChevronUp as ie, Clock as ae, Download as s, ExternalLink as oe, FileJson as c, FlaskConical as se, GitBranch as l, Hash as ce, History as le, PackageCheck as ue, RefreshCw as u, ShieldCheck as de, Tag as fe, User as pe, X as d } from "lucide-react";
8
- import { graphqlFetch as f } from "@burdenoff/fe-libs/shared/graphql";
9
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
- import { IllustratedEmptyState as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
3
+ import { GOVERNANCE_STATS_QUERY as n, runGovernanceOperation as r } from "../utils/governance.js";
4
+ import { Markdown as i } from "../node_modules/react-markdown/lib/index.js";
5
+ import { InstallAppModal as a } from "../components/InstallAppModal.js";
6
+ import { WORKFLOW_TEMPLATE_PREVIEW_FIELDS as o, WorkflowTemplatePreviewPanel as ee } from "../components/WorkflowTemplatePreviewPanel.js";
7
+ import { TEMPLATE_REVISION_COUNT_QUERY as te, TemplateRevisionsQueue as ne } from "../components/TemplateRevisionsQueue.js";
8
+ import { useCallback as s, useEffect as c, useRef as re, useState as l } from "react";
9
+ import { useNavigate as ie } from "react-router";
10
+ import { ArrowLeft as ae, Check as oe, ChevronDown as se, ChevronUp as ce, Clock as le, Download as u, ExternalLink as ue, FileJson as d, FlaskConical as de, GitBranch as fe, Hash as pe, History as me, PackageCheck as he, RefreshCw as f, ShieldCheck as ge, Tag as _e, User as ve, X as p } from "lucide-react";
11
+ import { graphqlFetch as m } from "@burdenoff/fe-libs/shared/graphql";
12
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
13
+ import { IllustratedEmptyState as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
11
14
  //#region src/pages/AdminSubmissionsQueuePage.tsx
12
- function h(e) {
15
+ function _(e) {
13
16
  let t = e?.sandboxBuildStatus;
14
17
  return typeof t == "string" ? t : null;
15
18
  }
16
- function g(e) {
19
+ function v(e) {
17
20
  let t = e?.sandboxBuildError;
18
21
  return typeof t == "string" ? t : null;
19
22
  }
20
- var ge = {
23
+ var xe = {
21
24
  PENDING: "Build pending",
22
25
  READY: "Build ready",
23
26
  FAILED: "Build failed",
24
27
  DISPATCH_FAILED: "Dispatch failed",
25
28
  UNSUPPORTED: "Unsupported provider"
26
- }, _ = {
29
+ }, Se = {
27
30
  PENDING: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
28
31
  READY: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
29
32
  FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
30
33
  DISPATCH_FAILED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]",
31
34
  UNSUPPORTED: "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]"
32
- }, _e = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendingReviewProducts(limit: $limit, offset: $offset) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n }\n", ve = "\n query AdminProducts($limit: Int, $offset: Int, $status: ProductStatus) {\n products(filter: { status: $status }, limit: $limit, offset: $offset) {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n", ye = "\n mutation ApproveProduct($id: ID!, $notes: String) {\n approveProduct(id: $id, notes: $notes) {\n id\n status\n publishedAt\n }\n }\n", be = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n rejectedReason\n }\n }\n", xe = "\n mutation DelistProduct($id: ID!, $reason: String) {\n delistProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", Se = "\n query AdminAppPackageUrl($id: ID!) {\n application(id: $id) {\n id\n versions(first: 1) {\n edges {\n node {\n id\n packageUrl\n metadata\n }\n }\n }\n }\n }\n", Ce = "\n mutation RefreshApplicationVersionPackageUrl($id: ID!) {\n refreshApplicationVersionPackageUrl(id: $id)\n }\n", we = "\n query AdminPendingVersionApps($limit: Int, $offset: Int) {\n applicationsWithPendingVersions(limit: $limit, offset: $offset) {\n totalCount\n edges {\n node {\n id\n name\n slug\n appType\n iconUrl\n shortDescription\n description\n versions(first: 5) {\n edges {\n node {\n id\n version\n status\n releaseNotes\n packageUrl\n packageSize\n isLatest\n reviewNotes\n manifest\n metadata\n createdAt\n }\n }\n }\n }\n }\n }\n }\n", Te = "\n mutation AdminApproveApplicationVersion($id: ID!, $notes: String) {\n approveApplicationVersion(id: $id, notes: $notes) {\n id\n status\n }\n }\n", Ee = "\n mutation AdminRejectApplicationVersion($id: ID!, $reason: String!) {\n rejectApplicationVersion(id: $id, reason: $reason) {\n id\n status\n }\n }\n", De = "\n mutation AdminRetryNodeSandboxBuild($id: ID!) {\n retryNodeSandboxBuild(id: $id)\n }\n", Oe = [
35
+ }, Ce = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendingReviewProducts(limit: $limit, offset: $offset) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n reviewDueAt\n isReviewOverdue\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n }\n", we = "\n query AdminProducts($limit: Int, $offset: Int, $status: ProductStatus) {\n products(filter: { status: $status }, limit: $limit, offset: $offset) {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n productId\n zipFileUrl\n manifest\n requiredPermissions\n publisher {\n id\n name\n email\n }\n }\n }\n", Te = `
36
+ query AdminWorkflowTemplatePreview($id: ID!) {
37
+ product(id: $id) {
38
+ id
39
+ workflowTemplatePreview { ${o} }
40
+ }
41
+ }
42
+ `, y = 50, Ee = "\n mutation ApproveProduct($id: ID!, $notes: String) {\n approveProduct(id: $id, notes: $notes) {\n id\n status\n publishedAt\n }\n }\n", De = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n rejectedReason\n }\n }\n", Oe = "\n mutation DelistProduct($id: ID!, $reason: String) {\n delistProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", ke = "\n query AdminAppPackageUrl($id: ID!) {\n application(id: $id) {\n id\n versions(first: 1) {\n edges {\n node {\n id\n packageUrl\n metadata\n }\n }\n }\n }\n }\n", Ae = "\n mutation RefreshApplicationVersionPackageUrl($id: ID!) {\n refreshApplicationVersionPackageUrl(id: $id)\n }\n", je = "\n query AdminPendingVersionApps($limit: Int, $offset: Int) {\n applicationsWithPendingVersions(limit: $limit, offset: $offset) {\n totalCount\n edges {\n node {\n id\n name\n slug\n appType\n iconUrl\n shortDescription\n description\n versions(first: 5) {\n edges {\n node {\n id\n version\n status\n releaseNotes\n packageUrl\n packageSize\n isLatest\n reviewNotes\n manifest\n metadata\n createdAt\n }\n }\n }\n }\n }\n }\n }\n", Me = "\n mutation AdminApproveApplicationVersion($id: ID!, $notes: String) {\n approveApplicationVersion(id: $id, notes: $notes) {\n id\n status\n }\n }\n", Ne = "\n mutation AdminRejectApplicationVersion($id: ID!, $reason: String!) {\n rejectApplicationVersion(id: $id, reason: $reason) {\n id\n status\n }\n }\n", Pe = "\n mutation AdminRetryNodeSandboxBuild($id: ID!) {\n retryNodeSandboxBuild(id: $id)\n }\n", Fe = [
33
43
  {
34
44
  label: "Pending review",
35
45
  value: "PENDING_REVIEW"
@@ -42,6 +52,10 @@ var ge = {
42
52
  label: "Rejected",
43
53
  value: "REJECTED"
44
54
  },
55
+ {
56
+ label: "Template revisions",
57
+ value: "TEMPLATE_REVISIONS"
58
+ },
45
59
  {
46
60
  label: "Version Updates",
47
61
  value: "VERSION_UPDATES"
@@ -50,16 +64,16 @@ var ge = {
50
64
  label: "All",
51
65
  value: "ALL"
52
66
  }
53
- ], v = {
67
+ ], b = {
54
68
  NODE: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)]",
55
69
  WORKFLOW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
56
70
  INTEGRATION: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
57
71
  VIBEMODULE: "bg-[var(--color-surface-accent-muted)] text-[var(--color-text-accent)]"
58
- }, y = {
72
+ }, x = {
59
73
  PENDING_REVIEW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
60
74
  PUBLISHED: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
61
75
  REJECTED: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)]"
62
- }, b = new Set([
76
+ }, S = new Set([
63
77
  "NODE",
64
78
  "WORKFLOW",
65
79
  "VIBEMODULE",
@@ -67,13 +81,13 @@ var ge = {
67
81
  "DATASINK",
68
82
  "CONSOLE"
69
83
  ]);
70
- function ke(e) {
71
- return v[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
84
+ function Ie(e) {
85
+ return b[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
72
86
  }
73
- function Ae(e) {
74
- return y[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
87
+ function Le(e) {
88
+ return x[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
75
89
  }
76
- function x(e) {
90
+ function C(e) {
77
91
  return e ? new Date(e).toLocaleString(void 0, {
78
92
  month: "short",
79
93
  day: "numeric",
@@ -82,138 +96,177 @@ function x(e) {
82
96
  minute: "2-digit"
83
97
  }) : "—";
84
98
  }
85
- var S = () => {
86
- let v = ee(), { authToken: y, basePath: S } = e(), [C, w] = o([]), [T, je] = o(0), [E, D] = o(!1), [O, k] = o(null), [A, j] = o(null), [M, Me] = o("PENDING_REVIEW"), [Ne, N] = o(null), [P, F] = o(""), [I, L] = o(null), [R, z] = o(null), [B, Pe] = o([]), [V, Fe] = o(0), [H, U] = o(null), [W, Ie] = o(null), [Le, G] = o(null), [K, q] = o(""), [Re, J] = o(null), [Y, ze] = o({}), [X, Be] = o(null), Z = i(async () => {
87
- D(!0), k(null);
99
+ var w = () => {
100
+ let o = ie(), { authToken: b, basePath: x } = e(), [w, Re] = l([]), [T, ze] = l(0), [Be, Ve] = l(!1), [He, Ue] = l(0);
101
+ c(() => {
102
+ let e = !1;
103
+ return r(n, void 0, b, "Failed to load the review SLA counters").then((t) => {
104
+ e || Ue(t.storeGovernanceStats.overdueSubmissions);
105
+ }).catch(() => {
106
+ e || Ue(0);
107
+ }), () => {
108
+ e = !0;
109
+ };
110
+ }, [b, T]);
111
+ let [E, D] = l({}), O = re({});
112
+ c(() => {
113
+ O.current = E;
114
+ }, [E]);
115
+ let [k, A] = l(!1), [We, j] = l(null), [M, N] = l(null), [P, Ge] = l("PENDING_REVIEW"), [Ke, F] = l(null), [I, L] = l(""), [R, qe] = l(null), [z, B] = l(null), [V, Je] = l([]), [Ye, Xe] = l(0), [H, U] = l(null), [W, Ze] = l(null), [Qe, G] = l(null), [K, q] = l(""), [$e, J] = l(null), [Y, et] = l({}), [X, tt] = l(null), [Z, nt] = l(0), rt = re(0), [it, at] = l(0);
116
+ c(() => {
117
+ let e = !1;
118
+ return (async () => {
119
+ try {
120
+ let t = await m({
121
+ gateway: "global",
122
+ query: te,
123
+ authToken: b || void 0
124
+ });
125
+ e || nt(t.data?.pendingWorkflowTemplateRevisions.totalCount ?? 0);
126
+ } catch {}
127
+ })(), () => {
128
+ e = !0;
129
+ };
130
+ }, [b]);
131
+ let Q = s(async () => {
132
+ A(!0), j(null);
88
133
  try {
89
- let e = await f({
134
+ let e = await m({
90
135
  gateway: "global",
91
- query: we,
136
+ query: je,
92
137
  variables: {
93
- limit: 50,
138
+ limit: 20,
94
139
  offset: 0
95
140
  },
96
- authToken: y || void 0
141
+ authToken: b || void 0
97
142
  });
98
143
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load version updates");
99
- Pe((e.data?.applicationsWithPendingVersions.edges ?? []).map((e) => e.node)), Fe(e.data?.applicationsWithPendingVersions.totalCount ?? 0);
144
+ Je((e.data?.applicationsWithPendingVersions.edges ?? []).map((e) => e.node)), Xe(e.data?.applicationsWithPendingVersions.totalCount ?? 0);
100
145
  } catch (e) {
101
- k(e instanceof Error ? e.message : "Failed to load version updates");
146
+ j(e instanceof Error ? e.message : "Failed to load version updates");
102
147
  } finally {
103
- D(!1);
148
+ A(!1);
104
149
  }
105
- }, [y]), Ve = async (e, t, n) => {
106
- U(e), k(null);
150
+ }, [b]), ot = async (e, t, n) => {
151
+ U(e), j(null);
107
152
  try {
108
- let t = await f({
153
+ let t = await m({
109
154
  gateway: "global",
110
- query: Te,
155
+ query: Me,
111
156
  variables: {
112
157
  id: e,
113
158
  notes: n || null
114
159
  },
115
- authToken: y || void 0
160
+ authToken: b || void 0
116
161
  });
117
162
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
118
- await Z();
163
+ await Q();
119
164
  } catch (e) {
120
- k(e instanceof Error ? e.message : "Approval failed");
165
+ j(e instanceof Error ? e.message : "Approval failed");
121
166
  } finally {
122
167
  U(null);
123
168
  }
124
- }, He = async (e, t, n) => {
169
+ }, st = async (e, t, n) => {
125
170
  if (!n.trim()) {
126
- k("Rejection reason is required");
171
+ j("Rejection reason is required");
127
172
  return;
128
173
  }
129
- U(e), k(null);
174
+ U(e), j(null);
130
175
  try {
131
- let t = await f({
176
+ let t = await m({
132
177
  gateway: "global",
133
- query: Ee,
178
+ query: Ne,
134
179
  variables: {
135
180
  id: e,
136
181
  reason: n.trim()
137
182
  },
138
- authToken: y || void 0
183
+ authToken: b || void 0
139
184
  });
140
185
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
141
- G(null), q(""), J(null), await Z();
186
+ G(null), q(""), J(null), await Q();
142
187
  } catch (e) {
143
- k(e instanceof Error ? e.message : "Rejection failed");
188
+ j(e instanceof Error ? e.message : "Rejection failed");
144
189
  } finally {
145
190
  U(null);
146
191
  }
147
- }, Ue = async (e) => {
148
- Ie(e), k(null);
192
+ }, ct = async (e) => {
193
+ Ze(e), j(null);
149
194
  try {
150
- let t = await f({
195
+ let t = await m({
151
196
  gateway: "global",
152
- query: De,
197
+ query: Pe,
153
198
  variables: { id: e },
154
- authToken: y || void 0
199
+ authToken: b || void 0
155
200
  });
156
201
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Retry failed");
157
- await Promise.all([Z(), Q(M)]);
202
+ await Promise.all([Q(), $(P)]);
158
203
  } catch (e) {
159
- k(e instanceof Error ? e.message : "Retry failed");
204
+ j(e instanceof Error ? e.message : "Retry failed");
160
205
  } finally {
161
- Ie(null);
206
+ Ze(null);
162
207
  }
163
- }, Q = i(async (e) => {
208
+ }, $ = s(async (e, t = 0) => {
209
+ let n = ++rt.current, r = () => n === rt.current;
164
210
  if (e === "VERSION_UPDATES") {
165
- await Z();
211
+ await Q();
166
212
  return;
167
213
  }
168
- D(!0), k(null);
214
+ if (e === "TEMPLATE_REVISIONS") {
215
+ A(!1), at((e) => e + 1);
216
+ return;
217
+ }
218
+ A(!0), j(null), t === 0 && (O.current = {}, D({}));
169
219
  try {
170
220
  if (e === "PENDING_REVIEW") {
171
- let e = await f({
221
+ let e = await m({
172
222
  gateway: "global",
173
- query: _e,
223
+ query: Ce,
174
224
  variables: {
175
- limit: 100,
176
- offset: 0
225
+ limit: y,
226
+ offset: t
177
227
  },
178
- authToken: y || void 0
228
+ authToken: b || void 0
179
229
  });
230
+ if (!r()) return;
180
231
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load pending products");
181
- w(e.data?.pendingReviewProducts.products ?? []), je(e.data?.pendingReviewProducts.totalCount ?? 0);
232
+ let n = e.data?.pendingReviewProducts.products ?? [], i = e.data?.pendingReviewProducts.totalCount ?? 0;
233
+ Re((e) => t > 0 ? [...e, ...n] : n), ze(i), Ve(t + n.length < i);
182
234
  } else {
183
- let t = await f({
235
+ let n = await m({
184
236
  gateway: "global",
185
- query: ve,
237
+ query: we,
186
238
  variables: {
187
- limit: 100,
188
- offset: 0,
239
+ limit: y,
240
+ offset: t,
189
241
  ...e !== "ALL" && { status: e }
190
242
  },
191
- authToken: y || void 0
243
+ authToken: b || void 0
192
244
  });
193
- if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to load products");
194
- let n = t.data?.products ?? [];
195
- w(n), je(n.length);
245
+ if (!r()) return;
246
+ if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Failed to load products");
247
+ let i = n.data?.products ?? [];
248
+ Re((e) => t > 0 ? [...e, ...i] : i), ze((e) => t > 0 ? e + i.length : i.length), Ve(i.length === y);
196
249
  }
197
250
  } catch (e) {
198
- k(e instanceof Error ? e.message : "Failed to load products");
251
+ r() && j(e instanceof Error ? e.message : "Failed to load products");
199
252
  } finally {
200
- D(!1);
253
+ r() && A(!1);
201
254
  }
202
- }, [y, Z]);
203
- a(() => {
204
- Q(M);
205
- }, [Q, M]), a(() => {
206
- Z();
207
- }, [Z]), a(() => {
208
- let e = C.filter((e) => e.productId && (e.type === "NODE" || b.has(e.type) && !e.zipFileUrl));
255
+ }, [b, Q]);
256
+ c(() => {
257
+ $(P);
258
+ }, [$, P]), c(() => {
259
+ Q();
260
+ }, [Q]), c(() => {
261
+ let e = w.filter((e) => e.productId && (e.type === "NODE" || S.has(e.type) && !e.zipFileUrl));
209
262
  e.length !== 0 && (async () => {
210
- let t = await Promise.allSettled(e.map((e) => f({
263
+ let t = await Promise.allSettled(e.map((e) => m({
211
264
  gateway: "global",
212
- query: Se,
265
+ query: ke,
213
266
  variables: { id: e.productId },
214
- authToken: y || void 0
267
+ authToken: b || void 0
215
268
  })));
216
- ze((n) => {
269
+ et((n) => {
217
270
  let r = { ...n };
218
271
  return t.forEach((t, n) => {
219
272
  if (t.status === "fulfilled") {
@@ -227,275 +280,324 @@ var S = () => {
227
280
  }), r;
228
281
  });
229
282
  })();
230
- }, [C, y]);
231
- let We = async (e) => {
232
- Be(e);
283
+ }, [w, b]);
284
+ let lt = async (e) => {
285
+ tt(e);
233
286
  try {
234
- let t = (await f({
287
+ let t = (await m({
235
288
  gateway: "global",
236
- query: Ce,
289
+ query: Ae,
237
290
  variables: { id: e },
238
- authToken: y || void 0
291
+ authToken: b || void 0
239
292
  })).data?.refreshApplicationVersionPackageUrl;
240
- t ? window.open(t, "_blank", "noreferrer") : k("Could not generate a download URL. S3 credentials may not be configured.");
293
+ t ? window.open(t, "_blank", "noreferrer") : j("Could not generate a download URL. S3 credentials may not be configured.");
241
294
  } catch (e) {
242
- k(e instanceof Error ? e.message : "Failed to refresh download URL");
295
+ j(e instanceof Error ? e.message : "Failed to refresh download URL");
243
296
  } finally {
244
- Be(null);
297
+ tt(null);
298
+ }
299
+ }, ut = s(async (e) => {
300
+ let t = O.current[e]?.state;
301
+ if (!(t === "loaded" || t === "loading")) {
302
+ O.current = {
303
+ ...O.current,
304
+ [e]: { state: "loading" }
305
+ }, D((t) => ({
306
+ ...t,
307
+ [e]: { state: "loading" }
308
+ }));
309
+ try {
310
+ let t = await m({
311
+ gateway: "global",
312
+ query: Te,
313
+ variables: { id: e },
314
+ authToken: b || void 0
315
+ });
316
+ if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to load the template contents");
317
+ let n = t.data?.product?.workflowTemplatePreview ?? null;
318
+ D((t) => ({
319
+ ...t,
320
+ [e]: {
321
+ state: "loaded",
322
+ preview: n
323
+ }
324
+ }));
325
+ } catch (t) {
326
+ let n = t instanceof Error ? t.message : "Failed to load the template contents";
327
+ D((t) => ({
328
+ ...t,
329
+ [e]: {
330
+ state: "error",
331
+ message: n
332
+ }
333
+ }));
334
+ }
245
335
  }
246
- }, Ge = async (e) => {
247
- j(e), k(null);
336
+ }, [b]), dt = async (e) => {
337
+ N(e), j(null);
248
338
  try {
249
- let t = await f({
339
+ let t = await m({
250
340
  gateway: "global",
251
- query: ye,
341
+ query: Ee,
252
342
  variables: {
253
343
  id: e,
254
344
  notes: null
255
345
  },
256
- authToken: y || void 0
346
+ authToken: b || void 0
257
347
  });
258
348
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
259
- await Q(M);
349
+ await $(P);
260
350
  } catch (e) {
261
- k(e instanceof Error ? e.message : "Approval failed");
351
+ j(e instanceof Error ? e.message : "Approval failed");
262
352
  } finally {
263
- j(null);
353
+ N(null);
264
354
  }
265
- }, Ke = async (e) => {
266
- if (!P.trim()) {
267
- k("Rejection reason is required");
355
+ }, ft = async (e) => {
356
+ if (!I.trim()) {
357
+ j("Rejection reason is required");
268
358
  return;
269
359
  }
270
- j(e), k(null);
360
+ N(e), j(null);
271
361
  try {
272
- let t = await f({
362
+ let t = await m({
273
363
  gateway: "global",
274
- query: be,
364
+ query: De,
275
365
  variables: {
276
366
  id: e,
277
- reason: P.trim()
367
+ reason: I.trim()
278
368
  },
279
- authToken: y || void 0
369
+ authToken: b || void 0
280
370
  });
281
371
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
282
- N(null), F(""), await Q(M);
372
+ F(null), L(""), await $(P);
283
373
  } catch (e) {
284
- k(e instanceof Error ? e.message : "Rejection failed");
374
+ j(e instanceof Error ? e.message : "Rejection failed");
285
375
  } finally {
286
- j(null);
376
+ N(null);
287
377
  }
288
- }, qe = async (e) => {
289
- j(e), k(null);
378
+ }, pt = async (e) => {
379
+ N(e), j(null);
290
380
  try {
291
- let t = await f({
381
+ let t = await m({
292
382
  gateway: "global",
293
- query: xe,
383
+ query: Oe,
294
384
  variables: {
295
385
  id: e,
296
- reason: P.trim() || void 0
386
+ reason: I.trim() || void 0
297
387
  },
298
- authToken: y || void 0
388
+ authToken: b || void 0
299
389
  });
300
390
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Delist failed");
301
- N(null), F(""), await Q(M);
391
+ F(null), L(""), await $(P);
302
392
  } catch (e) {
303
- k(e instanceof Error ? e.message : "Delist failed");
393
+ j(e instanceof Error ? e.message : "Delist failed");
304
394
  } finally {
305
- j(null);
395
+ N(null);
306
396
  }
307
- }, $ = C.filter((e) => e.status === "PENDING_REVIEW").length;
308
- return /* @__PURE__ */ m("div", {
397
+ }, mt = w.filter((e) => e.status === "PENDING_REVIEW").length;
398
+ return /* @__PURE__ */ g("div", {
309
399
  className: "min-h-screen bg-[var(--color-surface-default)]",
310
400
  children: [
311
- /* @__PURE__ */ p("header", {
401
+ /* @__PURE__ */ h("header", {
312
402
  className: "sticky top-0 z-10 border-b border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
313
- children: /* @__PURE__ */ m("div", {
403
+ children: /* @__PURE__ */ g("div", {
314
404
  className: "mx-auto max-w-5xl px-6 py-4",
315
- children: [/* @__PURE__ */ m("div", {
405
+ children: [/* @__PURE__ */ g("div", {
316
406
  className: "flex items-center justify-between gap-4",
317
- children: [/* @__PURE__ */ m("div", {
407
+ children: [/* @__PURE__ */ g("div", {
318
408
  className: "flex items-center gap-3 min-w-0",
319
409
  children: [
320
- /* @__PURE__ */ m("button", {
410
+ /* @__PURE__ */ g("button", {
321
411
  type: "button",
322
- onClick: () => v(`${S}/dashboard`),
412
+ onClick: () => o(`${x}/dashboard`),
323
413
  className: "inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
324
- children: [/* @__PURE__ */ p(te, { className: "size-4 shrink-0" }), "Back"]
414
+ children: [/* @__PURE__ */ h(ae, { className: "size-4 shrink-0" }), "Back"]
325
415
  }),
326
- /* @__PURE__ */ p("div", { className: "h-5 w-px bg-[var(--color-border-seam)]" }),
327
- /* @__PURE__ */ p(ue, { className: "size-5 shrink-0 text-[var(--color-text-primary)]" }),
328
- /* @__PURE__ */ p("h1", {
416
+ /* @__PURE__ */ h("div", { className: "h-5 w-px bg-[var(--color-border-seam)]" }),
417
+ /* @__PURE__ */ h(he, { className: "size-5 shrink-0 text-[var(--color-text-primary)]" }),
418
+ /* @__PURE__ */ h("h1", {
329
419
  className: "text-lg font-semibold text-[var(--color-text-primary)] truncate",
330
420
  children: "Submission Queue"
331
421
  }),
332
- T > 0 && /* @__PURE__ */ p("span", {
422
+ T > 0 && /* @__PURE__ */ h("span", {
333
423
  className: "shrink-0 rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-warning-text)]",
334
424
  children: T
425
+ }),
426
+ He > 0 && /* @__PURE__ */ g("span", {
427
+ className: "shrink-0 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-error-text)]",
428
+ children: [He, " overdue"]
335
429
  })
336
430
  ]
337
- }), /* @__PURE__ */ m("button", {
431
+ }), /* @__PURE__ */ g("button", {
338
432
  type: "button",
339
- onClick: () => void Q(M),
433
+ onClick: () => void $(P),
340
434
  className: "shrink-0 inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-sm text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
341
- disabled: E,
342
- children: [/* @__PURE__ */ p(u, { className: `size-4 ${E ? "animate-spin" : ""}` }), "Refresh"]
435
+ disabled: k,
436
+ children: [/* @__PURE__ */ h(f, { className: `size-4 ${k ? "animate-spin" : ""}` }), "Refresh"]
343
437
  })]
344
- }), /* @__PURE__ */ p("div", {
438
+ }), /* @__PURE__ */ h("div", {
345
439
  className: "mt-3 flex gap-1.5 flex-wrap",
346
- children: Oe.map((e) => /* @__PURE__ */ m("button", {
440
+ children: Fe.map((e) => /* @__PURE__ */ g("button", {
347
441
  type: "button",
348
- onClick: () => Me(e.value),
349
- className: `rounded-full px-3.5 py-1 text-xs font-medium transition-colors ${M === e.value ? "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)]"}`,
442
+ onClick: () => Ge(e.value),
443
+ className: `rounded-full px-3.5 py-1 text-xs font-medium transition-colors ${P === e.value ? "bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)]"}`,
350
444
  children: [
351
445
  e.label,
352
- e.value === "PENDING_REVIEW" && $ > 0 && M !== "PENDING_REVIEW" && /* @__PURE__ */ p("span", {
446
+ e.value === "PENDING_REVIEW" && mt > 0 && P !== "PENDING_REVIEW" && /* @__PURE__ */ h("span", {
353
447
  className: "ml-1.5 rounded-full bg-[var(--color-status-warning-text)] px-1.5 py-0.5 text-[10px] text-white",
354
- children: $
448
+ children: mt
449
+ }),
450
+ e.value === "TEMPLATE_REVISIONS" && Z > 0 && P !== "TEMPLATE_REVISIONS" && /* @__PURE__ */ h("span", {
451
+ className: "ml-1.5 rounded-full bg-[var(--color-status-info-text)] px-1.5 py-0.5 text-[10px] text-[var(--color-text-inverse)]",
452
+ children: Z
355
453
  }),
356
- e.value === "VERSION_UPDATES" && V > 0 && M !== "VERSION_UPDATES" && /* @__PURE__ */ p("span", {
454
+ e.value === "VERSION_UPDATES" && Ye > 0 && P !== "VERSION_UPDATES" && /* @__PURE__ */ h("span", {
357
455
  className: "ml-1.5 rounded-full bg-[var(--color-status-info-text)] px-1.5 py-0.5 text-[10px] text-white",
358
- children: V
456
+ children: Ye
359
457
  })
360
458
  ]
361
459
  }, e.value))
362
460
  })]
363
461
  })
364
462
  }),
365
- /* @__PURE__ */ m("main", {
463
+ /* @__PURE__ */ g("main", {
366
464
  className: "mx-auto max-w-5xl space-y-4 p-6",
367
465
  children: [
368
- /* @__PURE__ */ p(he, {
466
+ /* @__PURE__ */ h(be, {
369
467
  className: "mb-2",
370
468
  children: "Every publisher submission lands here for your review. Inspect the manifest, permissions, and package details — then approve to publish or reject with a clear reason the developer will see."
371
469
  }),
372
- O && /* @__PURE__ */ p("div", {
470
+ We && /* @__PURE__ */ h("div", {
373
471
  role: "alert",
374
472
  className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-3 text-sm text-[var(--color-text-danger)]",
375
- children: O
473
+ children: We
376
474
  }),
377
- M === "VERSION_UPDATES" ? E && B.length === 0 ? /* @__PURE__ */ p("div", {
475
+ P === "TEMPLATE_REVISIONS" ? /* @__PURE__ */ h(ne, {
476
+ authToken: b,
477
+ onCountChange: nt,
478
+ refreshKey: it
479
+ }) : P === "VERSION_UPDATES" ? k && V.length === 0 ? /* @__PURE__ */ h("div", {
378
480
  className: "flex items-center justify-center py-24",
379
- children: /* @__PURE__ */ p(u, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
380
- }) : B.length === 0 ? /* @__PURE__ */ p(me, {
481
+ children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
482
+ }) : V.length === 0 ? /* @__PURE__ */ h(ye, {
381
483
  illustration: "empty-data",
382
484
  title: "No pending version updates",
383
485
  description: "All published apps are up to date. When a developer submits a new version, it will appear here for your review."
384
- }) : /* @__PURE__ */ p("ul", {
486
+ }) : /* @__PURE__ */ h("ul", {
385
487
  className: "space-y-4",
386
- children: B.map((e) => {
488
+ children: V.map((e) => {
387
489
  let t = e.versions.edges.map((e) => e.node).filter((e) => e.status === "pending_review");
388
- return t.length === 0 ? null : /* @__PURE__ */ m("li", {
490
+ return t.length === 0 ? null : /* @__PURE__ */ g("li", {
389
491
  className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
390
- children: [/* @__PURE__ */ m("div", {
492
+ children: [/* @__PURE__ */ g("div", {
391
493
  className: "flex items-center gap-4 p-5 border-b border-[var(--color-border-seam)]",
392
494
  children: [
393
- e.iconUrl ? /* @__PURE__ */ p("img", {
495
+ e.iconUrl ? /* @__PURE__ */ h("img", {
394
496
  src: e.iconUrl,
395
497
  alt: "",
396
498
  className: "size-12 shrink-0 rounded-xl object-cover shadow-sm"
397
- }) : /* @__PURE__ */ p("div", {
499
+ }) : /* @__PURE__ */ h("div", {
398
500
  className: "flex size-12 shrink-0 items-center justify-center rounded-xl bg-[var(--color-surface-muted)] text-sm font-bold text-[var(--color-text-muted)] uppercase",
399
501
  children: e.name.slice(0, 2)
400
502
  }),
401
- /* @__PURE__ */ m("div", {
503
+ /* @__PURE__ */ g("div", {
402
504
  className: "flex-1 min-w-0",
403
- children: [/* @__PURE__ */ m("div", {
505
+ children: [/* @__PURE__ */ g("div", {
404
506
  className: "flex items-center gap-2 flex-wrap",
405
- children: [/* @__PURE__ */ p("h3", {
507
+ children: [/* @__PURE__ */ h("h3", {
406
508
  className: "text-base font-semibold text-[var(--color-text-primary)]",
407
509
  children: e.name
408
- }), /* @__PURE__ */ m("span", {
510
+ }), /* @__PURE__ */ g("span", {
409
511
  className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-status-info-bg-subtle)] px-2 py-0.5 text-[11px] font-semibold text-[var(--color-status-info-text)]",
410
512
  children: [
411
- /* @__PURE__ */ p(l, { className: "size-3" }),
513
+ /* @__PURE__ */ h(fe, { className: "size-3" }),
412
514
  t.length,
413
515
  " version",
414
516
  t.length === 1 ? "" : "s",
415
517
  " pending"
416
518
  ]
417
519
  })]
418
- }), (e.shortDescription ?? e.description) && /* @__PURE__ */ p("p", {
520
+ }), (e.shortDescription ?? e.description) && /* @__PURE__ */ h("p", {
419
521
  className: "mt-0.5 text-sm text-[var(--color-text-secondary)] line-clamp-1",
420
522
  children: e.shortDescription ?? e.description
421
523
  })]
422
524
  }),
423
- /* @__PURE__ */ m("a", {
525
+ /* @__PURE__ */ g("a", {
424
526
  href: `/devportal/apps/${e.id}`,
425
527
  target: "_blank",
426
528
  rel: "noreferrer",
427
529
  className: "shrink-0 inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
428
- children: [/* @__PURE__ */ p(oe, { className: "size-3.5" }), "Devportal"]
530
+ children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
429
531
  })
430
532
  ]
431
- }), /* @__PURE__ */ p("div", {
533
+ }), /* @__PURE__ */ h("div", {
432
534
  className: "divide-y divide-[var(--color-border-seam)]",
433
- children: t.map((t) => /* @__PURE__ */ m("div", {
535
+ children: t.map((t) => /* @__PURE__ */ g("div", {
434
536
  className: "p-5 space-y-3",
435
537
  children: [
436
- /* @__PURE__ */ m("div", {
538
+ /* @__PURE__ */ g("div", {
437
539
  className: "flex items-center gap-2 flex-wrap",
438
540
  children: [
439
- /* @__PURE__ */ p(l, { className: "size-4 text-[var(--color-text-secondary)] shrink-0" }),
440
- /* @__PURE__ */ p("span", {
541
+ /* @__PURE__ */ h(fe, { className: "size-4 text-[var(--color-text-secondary)] shrink-0" }),
542
+ /* @__PURE__ */ h("span", {
441
543
  className: "font-mono font-semibold text-sm text-[var(--color-text-primary)]",
442
544
  children: t.version
443
545
  }),
444
- t.isLatest && /* @__PURE__ */ p("span", {
546
+ t.isLatest && /* @__PURE__ */ h("span", {
445
547
  className: "rounded-full bg-[var(--color-surface-muted)] px-2 py-0.5 text-[10px] text-[var(--color-text-secondary)]",
446
548
  children: "Latest"
447
549
  }),
448
- /* @__PURE__ */ p("span", {
550
+ /* @__PURE__ */ h("span", {
449
551
  className: "rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-[10px] font-medium text-[var(--color-status-warning-text)] uppercase",
450
552
  children: "New Version"
451
553
  }),
452
554
  e.appType === "NODE" && (() => {
453
- let e = h(t.metadata);
454
- return e ? /* @__PURE__ */ p("span", {
455
- className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${_[e]}`,
456
- title: g(t.metadata) ?? void 0,
457
- children: ge[e]
555
+ let e = _(t.metadata);
556
+ return e ? /* @__PURE__ */ h("span", {
557
+ className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${Se[e]}`,
558
+ title: v(t.metadata) ?? void 0,
559
+ children: xe[e]
458
560
  }) : null;
459
561
  })(),
460
- /* @__PURE__ */ m("span", {
562
+ /* @__PURE__ */ g("span", {
461
563
  className: "ml-auto flex items-center gap-1 text-xs text-[var(--color-text-secondary)]",
462
- children: [/* @__PURE__ */ p(ae, { className: "size-3" }), x(t.createdAt)]
564
+ children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(t.createdAt)]
463
565
  })
464
566
  ]
465
567
  }),
466
- t.releaseNotes && /* @__PURE__ */ p("div", {
568
+ t.releaseNotes && /* @__PURE__ */ h("div", {
467
569
  className: "text-sm text-[var(--color-text-secondary)]",
468
- children: /* @__PURE__ */ p(n, { children: t.releaseNotes })
570
+ children: /* @__PURE__ */ h(i, { children: t.releaseNotes })
469
571
  }),
470
- e.appType === "NODE" && g(t.metadata) && /* @__PURE__ */ p("p", {
572
+ e.appType === "NODE" && v(t.metadata) && /* @__PURE__ */ h("p", {
471
573
  className: "text-xs text-[var(--color-status-error-text)]",
472
- children: g(t.metadata)
574
+ children: v(t.metadata)
473
575
  }),
474
- /* @__PURE__ */ m("div", {
576
+ /* @__PURE__ */ g("div", {
475
577
  className: "flex flex-wrap gap-2",
476
578
  children: [
477
- e.appType === "NODE" && h(t.metadata) !== "READY" && /* @__PURE__ */ m("button", {
579
+ e.appType === "NODE" && _(t.metadata) !== "READY" && /* @__PURE__ */ g("button", {
478
580
  type: "button",
479
- onClick: () => void Ue(t.id),
581
+ onClick: () => void ct(t.id),
480
582
  disabled: W === t.id,
481
583
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors disabled:opacity-50",
482
- children: [W === t.id ? /* @__PURE__ */ p(u, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(u, { className: "size-3.5" }), "Retry Deployment"]
584
+ children: [W === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5" }), "Retry Deployment"]
483
585
  }),
484
- e.appType === "NODE" && /* @__PURE__ */ m("button", {
586
+ e.appType === "NODE" && /* @__PURE__ */ g("button", {
485
587
  type: "button",
486
- onClick: () => v(`${S}/sandbox-builds?versionId=${t.id}`),
588
+ onClick: () => o(`${x}/sandbox-builds?versionId=${t.id}`),
487
589
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
488
- children: [/* @__PURE__ */ p(le, { className: "size-3.5" }), "View build history"]
590
+ children: [/* @__PURE__ */ h(me, { className: "size-3.5" }), "View build history"]
489
591
  }),
490
- t.packageUrl && /* @__PURE__ */ m("button", {
592
+ t.packageUrl && /* @__PURE__ */ g("button", {
491
593
  type: "button",
492
- onClick: () => void We(t.id),
594
+ onClick: () => void lt(t.id),
493
595
  disabled: X === t.id,
494
596
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
495
597
  children: [
496
- X === t.id ? /* @__PURE__ */ p(u, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(s, { className: "size-3.5" }),
598
+ X === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }),
497
599
  "Download Package",
498
- t.packageSize != null && /* @__PURE__ */ m("span", {
600
+ t.packageSize != null && /* @__PURE__ */ g("span", {
499
601
  className: "text-[var(--color-text-muted)]",
500
602
  children: [
501
603
  "(",
@@ -505,48 +607,48 @@ var S = () => {
505
607
  })
506
608
  ]
507
609
  }),
508
- t.manifest && /* @__PURE__ */ m("button", {
610
+ t.manifest && /* @__PURE__ */ g("button", {
509
611
  type: "button",
510
- onClick: () => L(I === t.id ? null : t.id),
612
+ onClick: () => qe(R === t.id ? null : t.id),
511
613
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
512
614
  children: [
513
- /* @__PURE__ */ p(c, { className: "size-3.5" }),
514
- I === t.id ? "Hide manifest" : "View manifest",
515
- I === t.id ? /* @__PURE__ */ p(ie, { className: "size-3" }) : /* @__PURE__ */ p(re, { className: "size-3" })
615
+ /* @__PURE__ */ h(d, { className: "size-3.5" }),
616
+ R === t.id ? "Hide manifest" : "View manifest",
617
+ R === t.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
516
618
  ]
517
619
  })
518
620
  ]
519
621
  }),
520
- I === t.id && t.manifest && /* @__PURE__ */ p("pre", {
622
+ R === t.id && t.manifest && /* @__PURE__ */ h("pre", {
521
623
  className: "overflow-x-auto rounded-lg border border-[var(--color-border-seam)] bg-[var(--color-surface-default)] p-4 text-[11px] leading-relaxed text-[var(--color-text-primary)] max-h-48 overflow-y-auto",
522
624
  children: JSON.stringify(t.manifest, null, 2)
523
625
  }),
524
- Le === t.id && Re === e.id && /* @__PURE__ */ m("div", {
626
+ Qe === t.id && $e === e.id && /* @__PURE__ */ g("div", {
525
627
  className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)]/30 p-3 space-y-2",
526
628
  children: [
527
- /* @__PURE__ */ p("p", {
629
+ /* @__PURE__ */ h("p", {
528
630
  className: "text-xs font-semibold text-[var(--color-text-danger)]",
529
631
  children: "Rejection reason (the developer will see this)"
530
632
  }),
531
- /* @__PURE__ */ p("textarea", {
633
+ /* @__PURE__ */ h("textarea", {
532
634
  value: K,
533
635
  onChange: (e) => q(e.target.value),
534
636
  rows: 2,
535
637
  className: "w-full rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
536
638
  placeholder: "Be specific — what needs to change before this version can be approved…"
537
639
  }),
538
- /* @__PURE__ */ m("div", {
640
+ /* @__PURE__ */ g("div", {
539
641
  className: "flex gap-2 justify-end",
540
- children: [/* @__PURE__ */ p("button", {
642
+ children: [/* @__PURE__ */ h("button", {
541
643
  type: "button",
542
644
  onClick: () => {
543
645
  G(null), q(""), J(null);
544
646
  },
545
647
  className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
546
648
  children: "Cancel"
547
- }), /* @__PURE__ */ p("button", {
649
+ }), /* @__PURE__ */ h("button", {
548
650
  type: "button",
549
- onClick: () => void He(t.id, e.id, K),
651
+ onClick: () => void st(t.id, e.id, K),
550
652
  disabled: !K.trim() || H === t.id,
551
653
  className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
552
654
  children: "Submit rejection"
@@ -554,22 +656,22 @@ var S = () => {
554
656
  })
555
657
  ]
556
658
  }),
557
- /* @__PURE__ */ m("div", {
659
+ /* @__PURE__ */ g("div", {
558
660
  className: "flex items-center gap-2",
559
- children: [/* @__PURE__ */ m("button", {
661
+ children: [/* @__PURE__ */ g("button", {
560
662
  type: "button",
561
- onClick: () => void Ve(t.id, e.id, ""),
663
+ onClick: () => void ot(t.id, e.id, ""),
562
664
  disabled: H === t.id,
563
665
  className: "inline-flex items-center gap-1.5 rounded-md bg-[var(--color-surface-success)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
564
- children: [H === t.id ? /* @__PURE__ */ p(u, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(ne, { className: "size-3.5" }), "Approve version"]
565
- }), Le !== t.id && /* @__PURE__ */ m("button", {
666
+ children: [H === t.id ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(oe, { className: "size-3.5" }), "Approve version"]
667
+ }), Qe !== t.id && /* @__PURE__ */ g("button", {
566
668
  type: "button",
567
669
  onClick: () => {
568
670
  G(t.id), q(""), J(e.id);
569
671
  },
570
672
  disabled: H === t.id,
571
673
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
572
- children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), "Reject version"]
674
+ children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Reject version"]
573
675
  })]
574
676
  })
575
677
  ]
@@ -577,71 +679,71 @@ var S = () => {
577
679
  })]
578
680
  }, e.id);
579
681
  })
580
- }) : E && C.length === 0 ? /* @__PURE__ */ p("div", {
682
+ }) : k && w.length === 0 ? /* @__PURE__ */ h("div", {
581
683
  className: "flex items-center justify-center py-24",
582
- children: /* @__PURE__ */ p(u, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
583
- }) : C.length === 0 ? /* @__PURE__ */ p(me, {
584
- illustration: M === "PENDING_REVIEW" ? "empty-notifications" : "empty-data",
585
- title: M === "PENDING_REVIEW" ? "Queue is clear" : "No products match this filter",
586
- description: M === "PENDING_REVIEW" ? "No submissions are awaiting review. New submissions will appear here as publishers send them in." : "Nothing matches the current filter. Try switching to a different status above."
587
- }) : /* @__PURE__ */ p("ul", {
684
+ children: /* @__PURE__ */ h(f, { className: "size-6 animate-spin text-[var(--color-text-muted)]" })
685
+ }) : w.length === 0 ? /* @__PURE__ */ h(ye, {
686
+ illustration: P === "PENDING_REVIEW" ? "empty-notifications" : "empty-data",
687
+ title: P === "PENDING_REVIEW" ? "Queue is clear" : "No products match this filter",
688
+ description: P === "PENDING_REVIEW" ? "No submissions are awaiting review. New submissions will appear here as publishers send them in." : "Nothing matches the current filter. Try switching to a different status above."
689
+ }) : /* @__PURE__ */ h("ul", {
588
690
  className: "space-y-3",
589
- children: C.map((e) => /* @__PURE__ */ m("li", {
691
+ children: w.map((e) => /* @__PURE__ */ g("li", {
590
692
  className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)] transition-[box-shadow,border-color] hover:border-[var(--color-border-strong)] hover:shadow-[var(--shadow-elevation-2)]",
591
693
  children: [
592
- /* @__PURE__ */ m("div", {
694
+ /* @__PURE__ */ g("div", {
593
695
  className: "flex items-start gap-4 p-5",
594
- children: [e.icon ? /* @__PURE__ */ p("img", {
696
+ children: [e.icon ? /* @__PURE__ */ h("img", {
595
697
  src: e.icon,
596
698
  alt: "",
597
699
  className: "size-14 shrink-0 rounded-xl object-cover shadow-sm"
598
- }) : /* @__PURE__ */ p("div", {
700
+ }) : /* @__PURE__ */ h("div", {
599
701
  className: "flex size-14 shrink-0 items-center justify-center rounded-xl bg-[var(--color-surface-muted)] text-sm font-bold text-[var(--color-text-muted)] uppercase",
600
702
  children: e.type.slice(0, 2)
601
- }), /* @__PURE__ */ m("div", {
703
+ }), /* @__PURE__ */ g("div", {
602
704
  className: "min-w-0 flex-1",
603
705
  children: [
604
- /* @__PURE__ */ m("div", {
706
+ /* @__PURE__ */ g("div", {
605
707
  className: "flex flex-wrap items-center gap-2",
606
708
  children: [
607
- /* @__PURE__ */ p("h3", {
709
+ /* @__PURE__ */ h("h3", {
608
710
  className: "text-base font-semibold text-[var(--color-text-primary)]",
609
711
  children: e.name
610
712
  }),
611
- /* @__PURE__ */ p("span", {
612
- className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${ke(e.type)}`,
713
+ /* @__PURE__ */ h("span", {
714
+ className: `rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${Ie(e.type)}`,
613
715
  children: e.type
614
716
  }),
615
- /* @__PURE__ */ p("span", {
616
- className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Ae(e.status)}`,
717
+ /* @__PURE__ */ h("span", {
718
+ className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Le(e.status)}`,
617
719
  children: e.status.replace("_", " ")
618
720
  }),
619
721
  e.type === "NODE" && e.productId && (() => {
620
- let t = h(Y[e.productId]?.metadata);
621
- return t ? /* @__PURE__ */ p("span", {
622
- className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${_[t]}`,
623
- title: g(Y[e.productId]?.metadata) ?? void 0,
624
- children: ge[t]
722
+ let t = _(Y[e.productId]?.metadata);
723
+ return t ? /* @__PURE__ */ h("span", {
724
+ className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${Se[t]}`,
725
+ title: v(Y[e.productId]?.metadata) ?? void 0,
726
+ children: xe[t]
625
727
  }) : null;
626
728
  })()
627
729
  ]
628
730
  }),
629
- /* @__PURE__ */ m("div", {
731
+ /* @__PURE__ */ g("div", {
630
732
  className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-[var(--color-text-secondary)]",
631
733
  children: [
632
- /* @__PURE__ */ m("span", {
734
+ /* @__PURE__ */ g("span", {
633
735
  className: "flex items-center gap-1",
634
- children: [/* @__PURE__ */ p(ce, { className: "size-3" }), /* @__PURE__ */ p("span", {
736
+ children: [/* @__PURE__ */ h(pe, { className: "size-3" }), /* @__PURE__ */ h("span", {
635
737
  className: "font-mono",
636
738
  children: e.slug
637
739
  })]
638
740
  }),
639
- e.publisher && /* @__PURE__ */ m("span", {
741
+ e.publisher && /* @__PURE__ */ g("span", {
640
742
  className: "flex items-center gap-1",
641
743
  children: [
642
- /* @__PURE__ */ p(pe, { className: "size-3" }),
744
+ /* @__PURE__ */ h(ve, { className: "size-3" }),
643
745
  e.publisher.name,
644
- e.publisher.email && /* @__PURE__ */ m("span", {
746
+ e.publisher.email && /* @__PURE__ */ g("span", {
645
747
  className: "text-[var(--color-text-muted)]",
646
748
  children: [
647
749
  "(",
@@ -651,137 +753,144 @@ var S = () => {
651
753
  })
652
754
  ]
653
755
  }),
654
- e.submittedAt && /* @__PURE__ */ m("span", {
756
+ e.submittedAt && /* @__PURE__ */ g("span", {
655
757
  className: "flex items-center gap-1",
656
- children: [/* @__PURE__ */ p(ae, { className: "size-3" }), x(e.submittedAt)]
758
+ children: [/* @__PURE__ */ h(le, { className: "size-3" }), C(e.submittedAt)]
657
759
  }),
658
- /* @__PURE__ */ m("span", {
760
+ e.reviewDueAt && /* @__PURE__ */ g("span", {
761
+ className: e.isReviewOverdue ? "inline-flex items-center gap-1 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2 py-0.5 font-semibold text-[var(--color-status-error-text)]" : "flex items-center gap-1",
762
+ children: [e.isReviewOverdue ? "Overdue · was due " : "Due ", C(e.reviewDueAt)]
763
+ }),
764
+ /* @__PURE__ */ g("span", {
659
765
  className: "flex items-center gap-1",
660
- children: [/* @__PURE__ */ p(fe, { className: "size-3" }), t(e.price, e.currency, e.pricingModel)]
766
+ children: [/* @__PURE__ */ h(_e, { className: "size-3" }), t(e.price, e.currency, e.pricingModel)]
661
767
  })
662
768
  ]
663
769
  }),
664
- e.description && /* @__PURE__ */ p("p", {
770
+ e.description && /* @__PURE__ */ h("p", {
665
771
  className: "mt-2 line-clamp-2 text-sm text-[var(--color-text-secondary)]",
666
772
  children: e.description
667
773
  }),
668
- e.type === "NODE" && e.productId && g(Y[e.productId]?.metadata) && /* @__PURE__ */ p("p", {
774
+ e.type === "NODE" && e.productId && v(Y[e.productId]?.metadata) && /* @__PURE__ */ h("p", {
669
775
  className: "mt-2 text-xs text-[var(--color-status-error-text)]",
670
- children: g(Y[e.productId]?.metadata)
776
+ children: v(Y[e.productId]?.metadata)
671
777
  })
672
778
  ]
673
779
  })]
674
780
  }),
675
- /* @__PURE__ */ m("div", {
781
+ /* @__PURE__ */ g("div", {
676
782
  className: "flex flex-wrap items-center justify-between gap-2 border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] px-5 py-3",
677
- children: [/* @__PURE__ */ m("div", {
783
+ children: [/* @__PURE__ */ g("div", {
678
784
  className: "flex flex-wrap items-center gap-2",
679
785
  children: [
680
- e.productId && /* @__PURE__ */ m("a", {
786
+ e.productId && /* @__PURE__ */ g("a", {
681
787
  href: `/devportal/apps/${e.productId}`,
682
788
  target: "_blank",
683
789
  rel: "noreferrer",
684
790
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
685
- children: [/* @__PURE__ */ p(oe, { className: "size-3.5" }), "Devportal"]
791
+ children: [/* @__PURE__ */ h(ue, { className: "size-3.5" }), "Devportal"]
686
792
  }),
687
- b.has(e.type) && (() => {
688
- let t = e.productId ? Y[e.productId]?.versionId ?? B.find((t) => t.id === e.productId)?.versions?.edges?.[0]?.node?.id : void 0;
793
+ S.has(e.type) && (() => {
794
+ let t = e.productId ? Y[e.productId]?.versionId ?? V.find((t) => t.id === e.productId)?.versions?.edges?.[0]?.node?.id : void 0;
689
795
  if (!t && !e.zipFileUrl) return null;
690
796
  let n = X === t;
691
- return t ? /* @__PURE__ */ m("button", {
797
+ return t ? /* @__PURE__ */ g("button", {
692
798
  type: "button",
693
- onClick: () => void We(t),
799
+ onClick: () => void lt(t),
694
800
  disabled: n,
695
801
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors disabled:opacity-50",
696
- children: [n ? /* @__PURE__ */ p(u, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(s, { className: "size-3.5" }), "Download Package"]
697
- }) : /* @__PURE__ */ m("a", {
802
+ children: [n ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
803
+ }) : /* @__PURE__ */ g("a", {
698
804
  href: e.zipFileUrl,
699
805
  download: !0,
700
806
  target: "_blank",
701
807
  rel: "noreferrer",
702
808
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
703
- children: [/* @__PURE__ */ p(s, { className: "size-3.5" }), "Download Package"]
809
+ children: [/* @__PURE__ */ h(u, { className: "size-3.5" }), "Download Package"]
704
810
  });
705
811
  })(),
706
- e.type === "NODE" && e.productId && Y[e.productId]?.versionId && h(Y[e.productId]?.metadata) !== "READY" && /* @__PURE__ */ m("button", {
812
+ e.type === "NODE" && e.productId && Y[e.productId]?.versionId && _(Y[e.productId]?.metadata) !== "READY" && /* @__PURE__ */ g("button", {
707
813
  type: "button",
708
- onClick: () => void Ue(Y[e.productId].versionId),
814
+ onClick: () => void ct(Y[e.productId].versionId),
709
815
  disabled: W === Y[e.productId]?.versionId,
710
816
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors disabled:opacity-50",
711
- children: [W === Y[e.productId]?.versionId ? /* @__PURE__ */ p(u, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(u, { className: "size-3.5" }), "Retry Deployment"]
817
+ children: [W === Y[e.productId]?.versionId ? /* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ h(f, { className: "size-3.5" }), "Retry Deployment"]
712
818
  }),
713
- b.has(e.type) && /* @__PURE__ */ m("button", {
819
+ S.has(e.type) && /* @__PURE__ */ g("button", {
714
820
  type: "button",
715
- onClick: () => z(e),
821
+ onClick: () => B(e),
716
822
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-accent)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-accent)] hover:bg-[var(--color-surface-accent-muted)] transition-colors",
717
- children: [/* @__PURE__ */ p(se, { className: "size-3.5" }), "Test in workspace"]
823
+ children: [/* @__PURE__ */ h(de, { className: "size-3.5" }), "Test in workspace"]
718
824
  }),
719
- /* @__PURE__ */ m("button", {
825
+ /* @__PURE__ */ g("button", {
720
826
  type: "button",
721
- onClick: () => L(I === e.id ? null : e.id),
827
+ onClick: () => {
828
+ let t = R !== e.id;
829
+ qe(t ? e.id : null), t && e.type === "WORKFLOW" && ut(e.id);
830
+ },
722
831
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
723
832
  children: [
724
- /* @__PURE__ */ p(c, { className: "size-3.5" }),
725
- I === e.id ? "Hide details" : "Inspect details",
726
- I === e.id ? /* @__PURE__ */ p(ie, { className: "size-3" }) : /* @__PURE__ */ p(re, { className: "size-3" })
833
+ /* @__PURE__ */ h(d, { className: "size-3.5" }),
834
+ R === e.id ? "Hide details" : "Inspect details",
835
+ R === e.id ? /* @__PURE__ */ h(ce, { className: "size-3" }) : /* @__PURE__ */ h(se, { className: "size-3" })
727
836
  ]
728
837
  })
729
838
  ]
730
- }), /* @__PURE__ */ m("div", {
839
+ }), /* @__PURE__ */ g("div", {
731
840
  className: "flex items-center gap-2",
732
841
  children: [
733
- e.status !== "PUBLISHED" && /* @__PURE__ */ m("button", {
842
+ e.status !== "PUBLISHED" && /* @__PURE__ */ g("button", {
734
843
  type: "button",
735
- onClick: () => void Ge(e.id),
736
- disabled: A === e.id,
844
+ onClick: () => void dt(e.id),
845
+ disabled: M === e.id,
737
846
  className: "inline-flex items-center gap-1.5 rounded-md bg-[var(--color-surface-success)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
738
- children: [/* @__PURE__ */ p(ne, { className: "size-3.5" }), "Approve"]
847
+ children: [/* @__PURE__ */ h(oe, { className: "size-3.5" }), "Approve"]
739
848
  }),
740
- e.status === "PENDING_REVIEW" && /* @__PURE__ */ m("button", {
849
+ e.status === "PENDING_REVIEW" && /* @__PURE__ */ g("button", {
741
850
  type: "button",
742
851
  onClick: () => {
743
- N(e.id), F("");
852
+ F(e.id), L("");
744
853
  },
745
- disabled: A === e.id,
854
+ disabled: M === e.id,
746
855
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
747
- children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), "Reject"]
856
+ children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Reject"]
748
857
  }),
749
- e.status === "PUBLISHED" && /* @__PURE__ */ m("button", {
858
+ e.status === "PUBLISHED" && /* @__PURE__ */ g("button", {
750
859
  type: "button",
751
860
  onClick: () => {
752
- N(e.id), F("");
861
+ F(e.id), L("");
753
862
  },
754
- disabled: A === e.id,
863
+ disabled: M === e.id,
755
864
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-warning)] bg-[var(--color-surface-warning-muted)] px-4 py-1.5 text-xs font-semibold text-[var(--color-text-warning)] hover:bg-[var(--color-surface-warning)] hover:text-[var(--color-text-on-warning)] disabled:opacity-50 transition-colors",
756
- children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), "Delist"]
865
+ children: [/* @__PURE__ */ h(p, { className: "size-3.5" }), "Delist"]
757
866
  })
758
867
  ]
759
868
  })]
760
869
  }),
761
- I === e.id && /* @__PURE__ */ m("div", {
870
+ R === e.id && /* @__PURE__ */ g("div", {
762
871
  className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] p-5 space-y-5",
763
872
  children: [
764
- /* @__PURE__ */ m("div", {
873
+ /* @__PURE__ */ g("div", {
765
874
  className: "grid grid-cols-2 gap-x-8 gap-y-3 text-xs sm:grid-cols-3",
766
875
  children: [
767
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
876
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
768
877
  className: "font-medium text-[var(--color-text-secondary)]",
769
878
  children: "Store product ID"
770
- }), /* @__PURE__ */ p("dd", {
879
+ }), /* @__PURE__ */ h("dd", {
771
880
  className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
772
881
  children: e.id
773
882
  })] }),
774
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
883
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
775
884
  className: "font-medium text-[var(--color-text-secondary)]",
776
885
  children: "Slug"
777
- }), /* @__PURE__ */ p("dd", {
886
+ }), /* @__PURE__ */ h("dd", {
778
887
  className: "mt-0.5 font-mono text-[var(--color-text-primary)]",
779
888
  children: e.slug
780
889
  })] }),
781
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
890
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
782
891
  className: "font-medium text-[var(--color-text-secondary)]",
783
892
  children: "Type / Nature"
784
- }), /* @__PURE__ */ m("dd", {
893
+ }), /* @__PURE__ */ g("dd", {
785
894
  className: "mt-0.5 text-[var(--color-text-primary)]",
786
895
  children: [
787
896
  e.type,
@@ -789,22 +898,22 @@ var S = () => {
789
898
  e.nature
790
899
  ]
791
900
  })] }),
792
- e.category && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
901
+ e.category && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
793
902
  className: "font-medium text-[var(--color-text-secondary)]",
794
903
  children: "Category"
795
- }), /* @__PURE__ */ p("dd", {
904
+ }), /* @__PURE__ */ h("dd", {
796
905
  className: "mt-0.5 text-[var(--color-text-primary)]",
797
906
  children: e.category
798
907
  })] }),
799
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
908
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
800
909
  className: "font-medium text-[var(--color-text-secondary)]",
801
910
  children: "Pricing"
802
- }), /* @__PURE__ */ m("dd", {
911
+ }), /* @__PURE__ */ g("dd", {
803
912
  className: "mt-0.5 text-[var(--color-text-primary)]",
804
913
  children: [
805
914
  t(e.price, e.currency, e.pricingModel),
806
915
  " ",
807
- /* @__PURE__ */ m("span", {
916
+ /* @__PURE__ */ g("span", {
808
917
  className: "text-[var(--color-text-muted)]",
809
918
  children: [
810
919
  "(",
@@ -814,81 +923,95 @@ var S = () => {
814
923
  })
815
924
  ]
816
925
  })] }),
817
- e.productId && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
926
+ e.productId && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
818
927
  className: "font-medium text-[var(--color-text-secondary)]",
819
928
  children: "Devportal app ID"
820
- }), /* @__PURE__ */ p("dd", {
929
+ }), /* @__PURE__ */ h("dd", {
821
930
  className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
822
931
  children: e.productId
823
932
  })] }),
824
- e.submittedBy && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
933
+ e.submittedBy && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("dt", {
825
934
  className: "font-medium text-[var(--color-text-secondary)]",
826
935
  children: "Submitted by (actor)"
827
- }), /* @__PURE__ */ p("dd", {
936
+ }), /* @__PURE__ */ h("dd", {
828
937
  className: "mt-0.5 font-mono text-[var(--color-text-primary)] break-all",
829
938
  children: e.submittedBy
830
939
  })] })
831
940
  ]
832
941
  }),
833
- e.requiredPermissions && e.requiredPermissions.length > 0 && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("h4", {
942
+ e.requiredPermissions && e.requiredPermissions.length > 0 && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", {
834
943
  className: "mb-2 flex items-center gap-1.5 text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wide",
835
- children: [/* @__PURE__ */ p(de, { className: "size-3.5 text-[var(--color-status-success-text)]" }), "Required Permissions"]
836
- }), /* @__PURE__ */ p("div", {
944
+ children: [/* @__PURE__ */ h(ge, { className: "size-3.5 text-[var(--color-status-success-text)]" }), "Required Permissions"]
945
+ }), /* @__PURE__ */ h("div", {
837
946
  className: "flex flex-wrap gap-1.5",
838
- children: e.requiredPermissions.map((e) => /* @__PURE__ */ p("span", {
947
+ children: e.requiredPermissions.map((e) => /* @__PURE__ */ h("span", {
839
948
  className: "inline-flex items-center gap-1 rounded-md bg-[var(--color-surface-default)] border border-[var(--color-border-seam)] px-2 py-1 text-xs font-mono text-[var(--color-text-primary)]",
840
949
  children: e
841
950
  }, e))
842
951
  })] }),
843
- e.manifest && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("h4", {
952
+ e.type === "WORKFLOW" && (() => {
953
+ let t = E[e.id];
954
+ return !t || t.state === "loading" ? /* @__PURE__ */ g("p", {
955
+ className: "flex items-center gap-2 text-xs text-[var(--color-text-muted)]",
956
+ children: [/* @__PURE__ */ h(f, { className: "size-3.5 animate-spin" }), "Loading template contents…"]
957
+ }) : t.state === "error" ? /* @__PURE__ */ g("p", {
958
+ role: "alert",
959
+ className: "text-xs text-[var(--color-text-danger)]",
960
+ children: ["Could not load the template contents: ", t.message]
961
+ }) : t.preview ? /* @__PURE__ */ h(ee, { preview: t.preview }) : /* @__PURE__ */ h("p", {
962
+ className: "text-xs text-[var(--color-text-muted)]",
963
+ children: "This submission has no workflow definition to preview."
964
+ });
965
+ })(),
966
+ e.manifest && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h4", {
844
967
  className: "mb-2 flex items-center gap-1.5 text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wide",
845
- children: [/* @__PURE__ */ p(c, { className: "size-3.5" }), "Manifest"]
846
- }), /* @__PURE__ */ p("pre", {
968
+ children: [/* @__PURE__ */ h(d, { className: "size-3.5" }), "Manifest"]
969
+ }), /* @__PURE__ */ h("pre", {
847
970
  className: "overflow-x-auto rounded-lg border border-[var(--color-border-seam)] bg-[var(--color-surface-default)] p-4 text-[11px] leading-relaxed text-[var(--color-text-primary)] max-h-72 overflow-y-auto scrollbar-thin",
848
971
  children: JSON.stringify(e.manifest, null, 2)
849
972
  })] })
850
973
  ]
851
974
  }),
852
- Ne === e.id && /* @__PURE__ */ m("div", {
975
+ Ke === e.id && /* @__PURE__ */ g("div", {
853
976
  className: `border-t border-[var(--color-border-seam)] px-5 py-4 ${e.status === "PUBLISHED" ? "bg-[var(--color-surface-warning-muted)]/30" : "bg-[var(--color-surface-danger-muted)]/30"}`,
854
977
  children: [
855
- e.status === "PUBLISHED" ? /* @__PURE__ */ p("p", {
978
+ e.status === "PUBLISHED" ? /* @__PURE__ */ h("p", {
856
979
  className: "mb-2 text-xs font-semibold text-[var(--color-text-warning)]",
857
980
  children: "Delist — this removes the product from the store for new users. Existing installs keep working. Reason is optional."
858
- }) : /* @__PURE__ */ p("p", {
981
+ }) : /* @__PURE__ */ h("p", {
859
982
  className: "mb-2 text-xs font-semibold text-[var(--color-text-danger)]",
860
983
  children: "Reject — provide a reason (the publisher will see this)"
861
984
  }),
862
- /* @__PURE__ */ p("textarea", {
985
+ /* @__PURE__ */ h("textarea", {
863
986
  id: `reject-reason-${e.id}`,
864
987
  "aria-label": e.status === "PUBLISHED" ? "Delist reason" : "Rejection reason",
865
- value: P,
866
- onChange: (e) => F(e.target.value),
988
+ value: I,
989
+ onChange: (e) => L(e.target.value),
867
990
  rows: 3,
868
991
  required: e.status !== "PUBLISHED",
869
992
  "aria-required": e.status !== "PUBLISHED",
870
993
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus:border-[var(--color-border-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
871
994
  placeholder: e.status === "PUBLISHED" ? "Optional — reason for delisting…" : "Be specific — e.g. 'Manifest is missing the identity.version field' or 'ZIP file is empty'…"
872
995
  }),
873
- /* @__PURE__ */ m("div", {
996
+ /* @__PURE__ */ g("div", {
874
997
  className: "mt-2 flex items-center justify-end gap-2",
875
- children: [/* @__PURE__ */ p("button", {
998
+ children: [/* @__PURE__ */ h("button", {
876
999
  type: "button",
877
1000
  onClick: () => {
878
- N(null), F("");
1001
+ F(null), L("");
879
1002
  },
880
1003
  className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
881
1004
  children: "Cancel"
882
- }), e.status === "PUBLISHED" ? /* @__PURE__ */ p("button", {
1005
+ }), e.status === "PUBLISHED" ? /* @__PURE__ */ h("button", {
883
1006
  type: "button",
884
- onClick: () => void qe(e.id),
885
- disabled: A === e.id,
1007
+ onClick: () => void pt(e.id),
1008
+ disabled: M === e.id,
886
1009
  className: "rounded-md bg-[var(--color-surface-warning)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-warning)] hover:opacity-90 disabled:opacity-50 transition-opacity",
887
1010
  children: "Confirm delist"
888
- }) : /* @__PURE__ */ p("button", {
1011
+ }) : /* @__PURE__ */ h("button", {
889
1012
  type: "button",
890
- onClick: () => void Ke(e.id),
891
- disabled: !P.trim() || A === e.id,
1013
+ onClick: () => void ft(e.id),
1014
+ disabled: !I.trim() || M === e.id,
892
1015
  className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
893
1016
  children: "Submit rejection"
894
1017
  })]
@@ -897,23 +1020,33 @@ var S = () => {
897
1020
  })
898
1021
  ]
899
1022
  }, e.id))
1023
+ }),
1024
+ P !== "VERSION_UPDATES" && P !== "TEMPLATE_REVISIONS" && Be && w.length > 0 && /* @__PURE__ */ h("div", {
1025
+ className: "flex justify-center",
1026
+ children: /* @__PURE__ */ g("button", {
1027
+ type: "button",
1028
+ onClick: () => void $(P, w.length),
1029
+ disabled: k,
1030
+ className: "inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-4 py-1.5 text-sm text-[var(--color-text-primary)] transition-colors hover:bg-[var(--color-surface-hover)] disabled:opacity-50",
1031
+ children: [k && /* @__PURE__ */ h(f, { className: "size-4 animate-spin" }), "Load more"]
1032
+ })
900
1033
  })
901
1034
  ]
902
1035
  }),
903
- R && /* @__PURE__ */ p(r, {
1036
+ z && /* @__PURE__ */ h(a, {
904
1037
  isOpen: !0,
905
- onClose: () => z(null),
1038
+ onClose: () => B(null),
906
1039
  app: {
907
- id: R.id,
908
- name: R.name,
909
- slug: R.slug,
910
- icon: R.icon ?? void 0,
911
- type: R.type,
912
- permissions: R.requiredPermissions?.length ? R.requiredPermissions : void 0
1040
+ id: z.id,
1041
+ name: z.name,
1042
+ slug: z.slug,
1043
+ icon: z.icon ?? void 0,
1044
+ type: z.type,
1045
+ permissions: z.requiredPermissions?.length ? z.requiredPermissions : void 0
913
1046
  },
914
1047
  purchaseState: "free",
915
1048
  onInstallSuccess: () => {
916
- z(null);
1049
+ B(null);
917
1050
  },
918
1051
  onInstallError: () => {}
919
1052
  })
@@ -921,6 +1054,6 @@ var S = () => {
921
1054
  });
922
1055
  };
923
1056
  //#endregion
924
- export { S as AdminSubmissionsQueuePage };
1057
+ export { w as AdminSubmissionsQueuePage };
925
1058
 
926
1059
  //# sourceMappingURL=AdminSubmissionsQueuePage.js.map