@burdenoff/microfe-devportal 2026.624.15 → 2026.624.17

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.
@@ -2,29 +2,29 @@ import { useDevportal as e } from "../providers/DevportalProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { LoadingState as n } from "../components/LoadingState.js";
4
4
  import { EmptyState as r } from "../components/EmptyState.js";
5
- import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetWebhooksQuery as c, useGetWorkspaceInstallationQuery as l, useInstallApplicationMutation as u, useRevokeDelegationMutation as d, useRotateAppSecretMutation as f, useSubmitApplicationMutation as p, useUninstallApplicationMutation as m, useUpdateApplicationMutation as h } from "../../generated/global-operations.js";
6
- import { PageLayout as g, PageSection as _ } from "../components/PageLayout.js";
7
- import { APP_TYPE_LABELS as v } from "../utils/constants.js";
8
- import { FeaturedBadge as y, StatusBadge as b, VerifiedBadge as x } from "../components/StatusBadge.js";
9
- import { SelectionCheckbox as S } from "../components/SelectionCheckbox.js";
5
+ import { useCurrentUserDelegationsQuery as i, useDeactivateAppMutation as a, useGetApplicationAnalyticsQuery as o, useGetApplicationQuery as s, useGetMyPublisherProductIdsQuery as c, useGetStoreInstallationsQuery as l, useGetWebhooksQuery as u, useGetWorkspaceInstallationQuery as d, useInstallApplicationMutation as f, useRevokeDelegationMutation as p, useRotateAppSecretMutation as m, useSubmitApplicationMutation as h, useUninstallApplicationMutation as g, useUpdateApplicationMutation as _ } from "../../generated/global-operations.js";
6
+ import { PageLayout as v, PageSection as y } from "../components/PageLayout.js";
7
+ import { APP_TYPE_LABELS as b } from "../utils/constants.js";
8
+ import { FeaturedBadge as ee, StatusBadge as x, VerifiedBadge as S } from "../components/StatusBadge.js";
9
+ import { SelectionCheckbox as te } from "../components/SelectionCheckbox.js";
10
10
  import { nativeNotify as C } from "../../utils/nativeBridge.js";
11
- import { NewSecretAlert as ee } from "../components/SecretDisplay.js";
12
- import { DataTable as w, DetailList as te } from "../components/DataTable.js";
13
- import { InputField as T, SelectField as E, TextareaField as D } from "../components/FormField.js";
14
- import { ConfirmDialog as O } from "../components/ConfirmDialog.js";
15
- import { GrantDelegationModal as k } from "../components/GrantDelegationModal.js";
16
- import { DEVPORTAL_PERMISSIONS as ne } from "../constants/permissions.js";
17
- import { useDevportalPermission as re } from "../hooks/usePermission.js";
18
- import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
19
- import { useCallback as j, useEffect as ie, useMemo as M, useRef as N, useState as P } from "react";
20
- import { useI18n as F } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertCircle as ae, AppWindow as oe, BarChart3 as I, CheckCircle as L, Clock as se, Download as ce, Edit as le, ExternalLink as R, FlaskConical as ue, Info as z, Key as de, Loader2 as B, MoreHorizontal as fe, Plus as V, Power as pe, RefreshCw as me, SendHorizontal as he, Shield as H, Store as U, Upload as W, Users as G, Webhook as ge, X as K, XCircle as _e } from "lucide-react";
22
- import { useParams as ve } from "react-router-dom";
23
- import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
24
- import { gql as X } from "@apollo/client";
25
- import { useMutation as ye, useQuery as be } from "@apollo/client/react";
11
+ import { NewSecretAlert as ne } from "../components/SecretDisplay.js";
12
+ import { DataTable as w, DetailList as T } from "../components/DataTable.js";
13
+ import { InputField as E, SelectField as D, TextareaField as re } from "../components/FormField.js";
14
+ import { ConfirmDialog as ie } from "../components/ConfirmDialog.js";
15
+ import { GrantDelegationModal as ae } from "../components/GrantDelegationModal.js";
16
+ import { DEVPORTAL_PERMISSIONS as oe } from "../constants/permissions.js";
17
+ import { useDevportalPermission as se } from "../hooks/usePermission.js";
18
+ import { usePackageUpload as O } from "../hooks/usePackageUpload.js";
19
+ import { useCallback as k, useEffect as ce, useMemo as A, useRef as j, useState as M } from "react";
20
+ import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { AlertCircle as le, AppWindow as P, BarChart3 as F, CheckCircle as I, Clock as L, Download as ue, Edit as de, ExternalLink as R, FlaskConical as fe, Info as z, Key as pe, Loader2 as B, MoreHorizontal as me, Plus as V, Power as he, RefreshCw as ge, SendHorizontal as _e, Shield as H, Store as ve, Upload as U, Users as W, Webhook as ye, X as G, XCircle as be } from "lucide-react";
22
+ import { useParams as xe } from "react-router-dom";
23
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
24
+ import { gql as Se } from "@apollo/client";
25
+ import { useMutation as Ce, useQuery as we } from "@apollo/client/react";
26
26
  //#region src/devportal/pages/ApplicationDetailPage.tsx
27
- function xe(e) {
27
+ function Te(e) {
28
28
  return e ? {
29
29
  id: e.id,
30
30
  name: e.name,
@@ -79,7 +79,7 @@ function xe(e) {
79
79
  updatedAt: e.updatedAt
80
80
  } : null;
81
81
  }
82
- function Se(e) {
82
+ function Y(e) {
83
83
  return {
84
84
  id: e.id,
85
85
  applicationId: e.applicationId,
@@ -103,7 +103,7 @@ function Se(e) {
103
103
  updatedAt: e.updatedAt
104
104
  };
105
105
  }
106
- function Ce(e) {
106
+ function Ee(e) {
107
107
  return {
108
108
  id: e.id,
109
109
  applicationId: e.applicationId,
@@ -119,7 +119,7 @@ function Ce(e) {
119
119
  createdAt: e.createdAt
120
120
  };
121
121
  }
122
- function Z(e) {
122
+ function De(e) {
123
123
  return {
124
124
  id: e.id,
125
125
  appId: e.appId,
@@ -141,11 +141,11 @@ function Z(e) {
141
141
  revokedBy: e.revokedBy || void 0
142
142
  };
143
143
  }
144
- var we = [
144
+ var Oe = [
145
145
  {
146
146
  id: "overview",
147
147
  label: "Overview",
148
- icon: oe
148
+ icon: P
149
149
  },
150
150
  {
151
151
  id: "permissions",
@@ -155,17 +155,17 @@ var we = [
155
155
  {
156
156
  id: "webhooks",
157
157
  label: "Webhooks",
158
- icon: ge
158
+ icon: ye
159
159
  },
160
160
  {
161
161
  id: "delegations",
162
162
  label: "Delegations",
163
- icon: G
163
+ icon: W
164
164
  },
165
165
  {
166
166
  id: "analytics",
167
167
  label: "Analytics",
168
- icon: I
168
+ icon: F
169
169
  },
170
170
  {
171
171
  id: "playground",
@@ -175,361 +175,361 @@ var we = [
175
175
  {
176
176
  id: "store-listing",
177
177
  label: "Marketplace Listing",
178
- icon: U
178
+ icon: ve
179
179
  }
180
- ], Te = {
180
+ ], ke = {
181
181
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
182
182
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
183
183
  EXPIRED: "bg-bg-sunken text-text-secondary"
184
- }, Ee = ({ message: e = "Loading..." }) => /* @__PURE__ */ Y("div", {
184
+ }, X = ({ message: e = "Loading..." }) => /* @__PURE__ */ J("div", {
185
185
  className: "flex items-center justify-center gap-3 py-12",
186
- children: [/* @__PURE__ */ J(B, {
186
+ children: [/* @__PURE__ */ q(B, {
187
187
  size: 20,
188
188
  className: "animate-spin text-muted-foreground"
189
- }), /* @__PURE__ */ J("p", {
189
+ }), /* @__PURE__ */ q("p", {
190
190
  className: "text-sm text-muted-foreground",
191
191
  children: e
192
192
  })]
193
- }), De = ({ message: e }) => /* @__PURE__ */ Y("div", {
193
+ }), Z = ({ message: e }) => /* @__PURE__ */ J("div", {
194
194
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
195
- children: [/* @__PURE__ */ J(ae, {
195
+ children: [/* @__PURE__ */ q(le, {
196
196
  size: 32,
197
197
  className: "text-destructive"
198
- }), /* @__PURE__ */ J("p", {
198
+ }), /* @__PURE__ */ q("p", {
199
199
  className: "text-sm text-muted-foreground",
200
200
  children: e
201
201
  })]
202
- }), Oe = () => {
203
- let { navigate: i, basePath: o, workspaceId: c } = e(), { t: d } = F(), p = (e, t) => {
204
- let n = d(e);
202
+ }), Ae = () => {
203
+ let { navigate: i, basePath: o, workspaceId: c } = e(), { t: l } = N(), u = (e, t) => {
204
+ let n = l(e);
205
205
  return n === e ? t : n;
206
- }, { allowed: h } = re(ne.APP_UPDATE), { allowed: _ } = re(ne.APP_DELETE), { appId: S } = ve(), [w, te] = P("overview"), [T, E] = P(!1), [D, A] = P(!1), [ie, M] = P(null), [N, I] = P(!1), { data: L, loading: ce, error: R } = s({
207
- variables: { id: S },
208
- skip: !S
209
- }), [z, { loading: de }] = f(), [fe, { loading: V }] = a(), [H, { loading: U }] = u(), [W, { loading: G }] = m(), { data: ge, refetch: K } = l({
206
+ }, { allowed: p } = se(oe.APP_UPDATE), { allowed: h } = se(oe.APP_DELETE), { appId: _ } = xe(), [y, te] = M("overview"), [w, T] = M(!1), [E, D] = M(!1), [re, O] = M(null), [ce, A] = M(!1), { data: j, loading: F, error: I } = s({
207
+ variables: { id: _ },
208
+ skip: !_
209
+ }), [ue, { loading: R }] = m(), [z, { loading: pe }] = a(), [me, { loading: V }] = f(), [H, { loading: ve }] = g(), { data: U, refetch: W } = d({
210
210
  variables: {
211
- applicationId: S,
211
+ applicationId: _,
212
212
  workspaceId: c ?? void 0
213
213
  },
214
- skip: !c || !S,
214
+ skip: !c || !_,
215
215
  fetchPolicy: "cache-and-network"
216
- }), q = ge?.appInstallations?.edges?.[0]?.node ?? null, X = j((e) => {
216
+ }), ye = U?.appInstallations?.edges?.[0]?.node ?? null, G = k((e) => {
217
217
  i?.(`${o}${e}`);
218
- }, [i, o]), ye = j(async () => {
219
- let e = L?.application?.appId;
218
+ }, [i, o]), K = k(async () => {
219
+ let e = j?.application?.appId;
220
220
  if (e) try {
221
- let t = (await z({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
222
- t && M(t), E(!1);
221
+ let t = (await ue({ variables: { id: e } })).data?.rotateAppSecret.clientSecret;
222
+ t && O(t), T(!1);
223
223
  } catch {}
224
- }, [L?.application?.appId, z]), be = j(async () => {
225
- if (S) try {
226
- await fe({ variables: { id: S } }), A(!1), X("/apps");
224
+ }, [j?.application?.appId, ue]), Se = k(async () => {
225
+ if (_) try {
226
+ await z({ variables: { id: _ } }), D(!1), G("/apps");
227
227
  } catch {}
228
228
  }, [
229
- S,
230
- fe,
231
- X
232
- ]), Se = j(async () => {
233
- if (!(!S || !c)) try {
234
- await H({ variables: { input: {
235
- applicationId: S,
229
+ _,
230
+ z,
231
+ G
232
+ ]), Ce = k(async () => {
233
+ if (!(!_ || !c)) try {
234
+ await me({ variables: { input: {
235
+ applicationId: _,
236
236
  scope: "WORKSPACE",
237
237
  workspaceId: c,
238
238
  autoUpdate: !1
239
- } } }), K(), C("success");
239
+ } } }), W(), C("success");
240
240
  } catch (e) {
241
241
  console.error("[DevPortal] Test in Workspace failed:", e), C("error");
242
242
  }
243
243
  }, [
244
- S,
244
+ _,
245
245
  c,
246
- H,
247
- K
248
- ]), Ce = j(async (e) => {
246
+ me,
247
+ W
248
+ ]), we = k(async (e) => {
249
249
  try {
250
- await W({ variables: { id: e } }), K(), C("success");
250
+ await H({ variables: { id: e } }), W(), C("success");
251
251
  } catch {
252
252
  C("error");
253
253
  }
254
- }, [W, K]);
255
- if (ce && !L) return /* @__PURE__ */ J(n, { message: p("devportal.loadingApplication", "Loading application...") });
256
- if (R) return /* @__PURE__ */ J(g, {
257
- title: p("devportal.error", "Error"),
254
+ }, [H, W]);
255
+ if (F && !j) return /* @__PURE__ */ q(n, { message: u("devportal.loadingApplication", "Loading application...") });
256
+ if (I) return /* @__PURE__ */ q(v, {
257
+ title: u("devportal.error", "Error"),
258
258
  backLink: `${o}/apps`,
259
- backLabel: p("devportal.backToApplications", "Back to Applications"),
260
- children: /* @__PURE__ */ Y("div", {
259
+ backLabel: u("devportal.backToApplications", "Back to Applications"),
260
+ children: /* @__PURE__ */ J("div", {
261
261
  className: "flex flex-col items-center justify-center py-12 text-center",
262
262
  children: [
263
- /* @__PURE__ */ J(ae, {
263
+ /* @__PURE__ */ q(le, {
264
264
  size: 48,
265
265
  className: "text-destructive mb-4"
266
266
  }),
267
- /* @__PURE__ */ J("h3", {
267
+ /* @__PURE__ */ q("h3", {
268
268
  className: "text-lg font-semibold mb-2",
269
- children: p("devportal.failedToLoadApplication", "Failed to load application")
269
+ children: u("devportal.failedToLoadApplication", "Failed to load application")
270
270
  }),
271
- /* @__PURE__ */ J("p", {
271
+ /* @__PURE__ */ q("p", {
272
272
  className: "text-sm text-muted-foreground",
273
- children: R.message
273
+ children: I.message
274
274
  })
275
275
  ]
276
276
  })
277
277
  });
278
- let Z = xe(L?.application);
279
- return Z ? /* @__PURE__ */ Y(g, {
280
- title: Z.name,
281
- description: Z.shortDescription,
278
+ let Y = Te(j?.application);
279
+ return Y ? /* @__PURE__ */ J(v, {
280
+ title: Y.name,
281
+ description: Y.shortDescription,
282
282
  backLink: `${o}/apps`,
283
- backLabel: p("devportal.backToApplications", "Back to Applications"),
284
- actions: /* @__PURE__ */ Y("div", {
283
+ backLabel: u("devportal.backToApplications", "Back to Applications"),
284
+ actions: /* @__PURE__ */ J("div", {
285
285
  className: "flex items-center gap-2",
286
286
  children: [
287
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && /* @__PURE__ */ Y("button", {
288
- onClick: () => E(!0),
289
- disabled: !Z.appId,
290
- title: Z.appId ? p("devportal.rotateSecretHint", "Generate a new client secret") : p("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
287
+ Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && /* @__PURE__ */ J("button", {
288
+ onClick: () => T(!0),
289
+ disabled: !Y.appId,
290
+ title: Y.appId ? u("devportal.rotateSecretHint", "Generate a new client secret") : u("devportal.rotateSecretNoClient", "Create an OAuth client first to enable secret rotation"),
291
291
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
292
- children: [/* @__PURE__ */ J(me, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
292
+ children: [/* @__PURE__ */ q(ge, { size: 16 }), u("devportal.rotateSecret", "Rotate Secret")]
293
293
  }),
294
- /* @__PURE__ */ Y("button", {
295
- onClick: () => X(`/apps/${Z.id}/versions`),
294
+ /* @__PURE__ */ J("button", {
295
+ onClick: () => G(`/apps/${Y.id}/versions`),
296
296
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
297
- children: [/* @__PURE__ */ J(se, { size: 16 }), p("devportal.versions", "Versions")]
297
+ children: [/* @__PURE__ */ q(L, { size: 16 }), u("devportal.versions", "Versions")]
298
298
  }),
299
- Z.status !== "PUBLISHED" && /* @__PURE__ */ Y("button", {
300
- onClick: () => X(`/apps/${Z.id}/publish`),
299
+ Y.status !== "PUBLISHED" && /* @__PURE__ */ J("button", {
300
+ onClick: () => G(`/apps/${Y.id}/publish`),
301
301
  className: "inline-flex items-center gap-2 rounded-md border border-primary/40 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 transition-colors",
302
- children: [/* @__PURE__ */ J(he, { size: 16 }), p("devportal.submitForReview", "Submit for Review")]
302
+ children: [/* @__PURE__ */ q(_e, { size: 16 }), u("devportal.submitForReview", "Submit for Review")]
303
303
  }),
304
- Z.appType !== "NODE" && Z.appType !== "WORKFLOW" && (q ? /* @__PURE__ */ Y("button", {
305
- onClick: () => void Ce(q.id),
306
- disabled: G || !c,
307
- title: p("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
304
+ Y.appType !== "NODE" && Y.appType !== "WORKFLOW" && (ye ? /* @__PURE__ */ J("button", {
305
+ onClick: () => void we(ye.id),
306
+ disabled: ve || !c,
307
+ title: u("devportal.uninstallFromWorkspace", "Uninstall this app from your current workspace"),
308
308
  className: "inline-flex items-center gap-2 rounded-md border border-destructive/50 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
309
- children: [G ? /* @__PURE__ */ J(B, {
309
+ children: [ve ? /* @__PURE__ */ q(B, {
310
310
  size: 16,
311
311
  className: "animate-spin"
312
- }) : /* @__PURE__ */ J(_e, { size: 16 }), p("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
313
- }) : /* @__PURE__ */ Y("button", {
314
- onClick: () => void Se(),
315
- disabled: U || !c,
312
+ }) : /* @__PURE__ */ q(be, { size: 16 }), u("devportal.uninstallFromWorkspace", "Uninstall from Workspace")]
313
+ }) : /* @__PURE__ */ J("button", {
314
+ onClick: () => void Ce(),
315
+ disabled: V || !c,
316
316
  "aria-disabled": !c,
317
- title: c ? p("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : p("devportal.noWorkspaceContext", "No workspace context available"),
317
+ title: c ? u("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : u("devportal.noWorkspaceContext", "No workspace context available"),
318
318
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
319
- children: [U ? /* @__PURE__ */ J(B, {
319
+ children: [V ? /* @__PURE__ */ q(B, {
320
320
  size: 16,
321
321
  className: "animate-spin"
322
- }) : /* @__PURE__ */ J(ue, { size: 16 }), p("devportal.testInWorkspace", "Test in Workspace")]
322
+ }) : /* @__PURE__ */ q(fe, { size: 16 }), u("devportal.testInWorkspace", "Test in Workspace")]
323
323
  })),
324
- Z.appType === "NODE" && /* @__PURE__ */ Y("button", {
325
- onClick: () => i?.(`/workflows/new?nodeId=${Z.id}`),
324
+ Y.appType === "NODE" && /* @__PURE__ */ J("button", {
325
+ onClick: () => i?.(`/workflows/new?nodeId=${Y.id}`),
326
326
  disabled: !c,
327
327
  "aria-disabled": !c,
328
- title: c ? p("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : p("devportal.noWorkspaceContext", "No workspace context available"),
328
+ title: c ? u("devportal.testInWorkflowBuilderHint", "Open a new workflow with this node available in the builder") : u("devportal.noWorkspaceContext", "No workspace context available"),
329
329
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
330
- children: [/* @__PURE__ */ J(ue, { size: 16 }), p("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
330
+ children: [/* @__PURE__ */ q(fe, { size: 16 }), u("devportal.testInWorkflowBuilder", "Test in Workflow Builder")]
331
331
  }),
332
- /* @__PURE__ */ Y("button", {
333
- onClick: () => X(`/apps/${Z.id}/edit`),
334
- disabled: !h,
335
- "aria-disabled": !h,
332
+ /* @__PURE__ */ J("button", {
333
+ onClick: () => G(`/apps/${Y.id}/edit`),
334
+ disabled: !p,
335
+ "aria-disabled": !p,
336
336
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
337
- children: [/* @__PURE__ */ J(le, { size: 16 }), p("devportal.editApp", "Edit App")]
337
+ children: [/* @__PURE__ */ q(de, { size: 16 }), u("devportal.editApp", "Edit App")]
338
338
  }),
339
- /* @__PURE__ */ Y("button", {
340
- onClick: () => A(!0),
341
- disabled: !_,
342
- "aria-disabled": !_,
339
+ /* @__PURE__ */ J("button", {
340
+ onClick: () => D(!0),
341
+ disabled: !h,
342
+ "aria-disabled": !h,
343
343
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
344
- children: [/* @__PURE__ */ J(pe, { size: 16 }), p("devportal.deactivate", "Deactivate")]
344
+ children: [/* @__PURE__ */ q(he, { size: 16 }), u("devportal.deactivate", "Deactivate")]
345
345
  })
346
346
  ]
347
347
  }),
348
348
  children: [
349
- ie && /* @__PURE__ */ J(ee, {
350
- title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
351
- secret: ie,
352
- description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
353
- onDismiss: () => M(null)
349
+ re && /* @__PURE__ */ q(ne, {
350
+ title: u("devportal.newAppSecretGenerated", "New App Secret Generated"),
351
+ secret: re,
352
+ description: u("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
353
+ onDismiss: () => O(null)
354
354
  }),
355
- /* @__PURE__ */ Y("div", {
355
+ /* @__PURE__ */ J("div", {
356
356
  className: "flex flex-wrap items-center gap-2",
357
357
  children: [
358
- /* @__PURE__ */ J(b, {
359
- status: Z.status,
358
+ /* @__PURE__ */ q(x, {
359
+ status: Y.status,
360
360
  type: "app"
361
361
  }),
362
- /* @__PURE__ */ J(b, {
363
- status: Z.visibility,
362
+ /* @__PURE__ */ q(x, {
363
+ status: Y.visibility,
364
364
  type: "app"
365
365
  }),
366
- Z.isVerified && /* @__PURE__ */ J(x, { verified: !0 }),
367
- Z.isFeatured && /* @__PURE__ */ J(y, {}),
368
- /* @__PURE__ */ J("span", {
366
+ Y.isVerified && /* @__PURE__ */ q(S, { verified: !0 }),
367
+ Y.isFeatured && /* @__PURE__ */ q(ee, {}),
368
+ /* @__PURE__ */ q("span", {
369
369
  className: "text-sm text-muted-foreground",
370
- children: v[Z.appType] || Z.appType
370
+ children: b[Y.appType] || Y.appType
371
371
  })
372
372
  ]
373
373
  }),
374
- /* @__PURE__ */ J("div", {
374
+ /* @__PURE__ */ q("div", {
375
375
  className: "border-b",
376
- children: /* @__PURE__ */ J("nav", {
376
+ children: /* @__PURE__ */ q("nav", {
377
377
  className: "-mb-px flex gap-4 overflow-x-auto",
378
378
  role: "tablist",
379
- "aria-label": p("devportal.applicationSections", "Application sections"),
380
- children: we.filter((e) => !((Z.appType === "NODE" || Z.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
379
+ "aria-label": u("devportal.applicationSections", "Application sections"),
380
+ children: Oe.filter((e) => !((Y.appType === "NODE" || Y.appType === "WORKFLOW") && (e.id === "permissions" || e.id === "webhooks" || e.id === "delegations" || e.id === "playground"))).map((e) => {
381
381
  let n = e.icon;
382
- return /* @__PURE__ */ Y("button", {
382
+ return /* @__PURE__ */ J("button", {
383
383
  id: `application-tab-${e.id}`,
384
384
  role: "tab",
385
- "aria-selected": w === e.id,
385
+ "aria-selected": y === e.id,
386
386
  "aria-controls": `application-panel-${e.id}`,
387
387
  onClick: () => te(e.id),
388
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", w === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
389
- children: [/* @__PURE__ */ J(n, { size: 16 }), e.label]
388
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", y === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
389
+ children: [/* @__PURE__ */ q(n, { size: 16 }), e.label]
390
390
  }, e.id);
391
391
  })
392
392
  })
393
393
  }),
394
- /* @__PURE__ */ Y("div", {
394
+ /* @__PURE__ */ J("div", {
395
395
  className: "mt-6",
396
- id: `application-panel-${w}`,
396
+ id: `application-panel-${y}`,
397
397
  role: "tabpanel",
398
- "aria-labelledby": `application-tab-${w}`,
398
+ "aria-labelledby": `application-tab-${y}`,
399
399
  tabIndex: 0,
400
400
  children: [
401
- w === "overview" && /* @__PURE__ */ J(Me, { app: Z }),
402
- w === "permissions" && /* @__PURE__ */ J(Ye, { app: Z }),
403
- w === "webhooks" && /* @__PURE__ */ J(ke, {
404
- appId: Z.id,
405
- onNavigate: X
401
+ y === "overview" && /* @__PURE__ */ q(Pe, { app: Y }),
402
+ y === "permissions" && /* @__PURE__ */ q(Ze, { app: Y }),
403
+ y === "webhooks" && /* @__PURE__ */ q(je, {
404
+ appId: Y.id,
405
+ onNavigate: G
406
406
  }),
407
- w === "delegations" && /* @__PURE__ */ J(Ae, {
408
- authAppId: Z.appId || void 0,
409
- appName: Z.name,
410
- onGrantDelegation: () => I(!0),
411
- onNavigate: X
407
+ y === "delegations" && /* @__PURE__ */ q(Me, {
408
+ authAppId: Y.appId || void 0,
409
+ appName: Y.name,
410
+ onGrantDelegation: () => A(!0),
411
+ onNavigate: G
412
412
  }),
413
- w === "analytics" && /* @__PURE__ */ J(je, { appId: Z.id }),
414
- w === "playground" && /* @__PURE__ */ J(Le, { app: Z }),
415
- w === "store-listing" && /* @__PURE__ */ J(Ke, { app: Z })
413
+ y === "analytics" && /* @__PURE__ */ q(Ne, { app: Y }),
414
+ y === "playground" && /* @__PURE__ */ q(ze, { app: Y }),
415
+ y === "store-listing" && /* @__PURE__ */ q(Je, { app: Y })
416
416
  ]
417
417
  }),
418
- /* @__PURE__ */ J(O, {
419
- open: T,
420
- onOpenChange: E,
421
- onConfirm: ye,
422
- title: p("devportal.rotateAppSecret", "Rotate App Secret"),
423
- description: p("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
424
- confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
425
- cancelLabel: p("devportal.cancel", "Cancel"),
418
+ /* @__PURE__ */ q(ie, {
419
+ open: w,
420
+ onOpenChange: T,
421
+ onConfirm: K,
422
+ title: u("devportal.rotateAppSecret", "Rotate App Secret"),
423
+ description: u("devportal.rotateAppSecretDescription", "This will generate a new client secret and invalidate the current one. All existing integrations using the old secret will stop working immediately."),
424
+ confirmLabel: u("devportal.rotateSecret", "Rotate Secret"),
425
+ cancelLabel: u("devportal.cancel", "Cancel"),
426
426
  variant: "warning",
427
- loading: de
427
+ loading: R
428
428
  }),
429
- /* @__PURE__ */ J(O, {
430
- open: D,
431
- onOpenChange: A,
432
- onConfirm: be,
433
- title: p("devportal.deactivateApplication", "Deactivate Application"),
434
- description: p("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
435
- confirmLabel: p("devportal.deactivate", "Deactivate"),
436
- cancelLabel: p("devportal.cancel", "Cancel"),
429
+ /* @__PURE__ */ q(ie, {
430
+ open: E,
431
+ onOpenChange: D,
432
+ onConfirm: Se,
433
+ title: u("devportal.deactivateApplication", "Deactivate Application"),
434
+ description: u("devportal.deactivateApplicationDescription", "This will deactivate the application. All OAuth clients, API keys, and webhooks associated with this app will stop functioning. This action can be reversed by reactivating the app."),
435
+ confirmLabel: u("devportal.deactivate", "Deactivate"),
436
+ cancelLabel: u("devportal.cancel", "Cancel"),
437
437
  variant: "destructive",
438
- loading: V
438
+ loading: pe
439
439
  }),
440
- /* @__PURE__ */ J(k, {
441
- open: N,
442
- onOpenChange: I,
443
- appId: Z.appId || "",
444
- appName: Z.name,
445
- appScopes: Z.scopes?.map((e) => e.scope) ?? [],
440
+ /* @__PURE__ */ q(ae, {
441
+ open: ce,
442
+ onOpenChange: A,
443
+ appId: Y.appId || "",
444
+ appName: Y.name,
445
+ appScopes: Y.scopes?.map((e) => e.scope) ?? [],
446
446
  onSuccess: () => {
447
- I(!1);
447
+ A(!1);
448
448
  }
449
449
  })
450
450
  ]
451
- }) : /* @__PURE__ */ J(g, {
452
- title: p("devportal.notFound", "Not Found"),
451
+ }) : /* @__PURE__ */ q(v, {
452
+ title: u("devportal.notFound", "Not Found"),
453
453
  backLink: `${o}/apps`,
454
- backLabel: p("devportal.backToApplications", "Back to Applications"),
455
- children: /* @__PURE__ */ J(r, {
456
- icon: /* @__PURE__ */ J(oe, { size: 48 }),
457
- title: p("devportal.applicationNotFound", "Application not found"),
458
- description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
454
+ backLabel: u("devportal.backToApplications", "Back to Applications"),
455
+ children: /* @__PURE__ */ q(r, {
456
+ icon: /* @__PURE__ */ q(P, { size: 48 }),
457
+ title: u("devportal.applicationNotFound", "Application not found"),
458
+ description: u("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
459
459
  })
460
460
  });
461
- }, ke = ({ appId: e, onNavigate: t }) => {
462
- let { t: n } = F(), r = (e, t) => {
461
+ }, je = ({ appId: e, onNavigate: t }) => {
462
+ let { t: n } = N(), r = (e, t) => {
463
463
  let r = n(e);
464
464
  return r === e ? t : r;
465
- }, { data: i, loading: a, error: o } = c({ variables: { applicationId: e } });
466
- return a ? /* @__PURE__ */ J(Ee, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ J(De, { message: o.message }) : /* @__PURE__ */ J(Ne, {
465
+ }, { data: i, loading: a, error: o } = u({ variables: { applicationId: e } });
466
+ return a ? /* @__PURE__ */ q(X, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ q(Z, { message: o.message }) : /* @__PURE__ */ q(Fe, {
467
467
  appId: e,
468
- webhooks: (i?.webhooks ?? []).map(Se),
468
+ webhooks: (i?.webhooks ?? []).map(Y),
469
469
  onNavigate: t
470
470
  });
471
- }, Ae = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
472
- let { t: o } = F(), s = (e, t) => {
471
+ }, Me = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: a }) => {
472
+ let { t: o } = N(), s = (e, t) => {
473
473
  let n = o(e);
474
474
  return n === e ? t : n;
475
- }, { data: c, loading: l, error: u, refetch: f } = i(), [p] = d(), [m, h] = P([]), [g, _] = P(!1), [v, y] = P(/* @__PURE__ */ new Set()), [b, x] = P(null), S = M(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(Z) : [], [e, c]), C = M(() => S.filter((e) => e.status === "ACTIVE"), [S]), ee = M(() => C.filter((e) => v.has(e.id)), [C, v]), w = C.length > 0 && C.every((e) => v.has(e.id)), te = C.some((e) => v.has(e.id)) && !w, T = j((e, t) => {
475
+ }, { data: c, loading: l, error: u, refetch: d } = i(), [f] = p(), [m, h] = M([]), [g, _] = M(!1), [v, y] = M(/* @__PURE__ */ new Set()), [b, ee] = M(null), x = A(() => c?.currentUserDelegations?.delegations ? c.currentUserDelegations.delegations.filter((t) => t.appId === e).map(De) : [], [e, c]), S = A(() => x.filter((e) => e.status === "ACTIVE"), [x]), te = A(() => S.filter((e) => v.has(e.id)), [S, v]), C = S.length > 0 && S.every((e) => v.has(e.id)), ne = S.some((e) => v.has(e.id)) && !C, w = k((e, t) => {
476
476
  y((n) => {
477
477
  let r = new Set(n);
478
478
  return t ? r.add(e) : r.delete(e), r;
479
479
  });
480
- }, []), E = j((e) => {
480
+ }, []), T = k((e) => {
481
481
  y((t) => {
482
482
  let n = new Set(t);
483
- return C.forEach((t) => {
483
+ return S.forEach((t) => {
484
484
  e ? n.add(t.id) : n.delete(t.id);
485
485
  }), n;
486
486
  });
487
- }, [C]), D = j(() => {
487
+ }, [S]), E = k(() => {
488
488
  y(/* @__PURE__ */ new Set());
489
- }, []), k = j(async (e) => {
489
+ }, []), D = k(async (e) => {
490
490
  _(!0);
491
491
  try {
492
- let t = await Promise.allSettled(e.map((e) => p({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
493
- x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
492
+ let t = await Promise.allSettled(e.map((e) => f({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
493
+ ee(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
494
494
  let n = new Set(t);
495
495
  return e.forEach((e) => n.delete(e)), n;
496
- }), h([]), f();
496
+ }), h([]), d();
497
497
  } catch {} finally {
498
498
  _(!1);
499
499
  }
500
- }, [p, f]);
501
- return e ? l ? /* @__PURE__ */ J(Ee, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ J(De, { message: u.message }) : /* @__PURE__ */ Y(q, { children: [
502
- b && /* @__PURE__ */ J("div", {
500
+ }, [f, d]);
501
+ return e ? l ? /* @__PURE__ */ q(X, { message: s("devportal.loadingDelegations", "Loading delegations...") }) : u ? /* @__PURE__ */ q(Z, { message: u.message }) : /* @__PURE__ */ J(K, { children: [
502
+ b && /* @__PURE__ */ q("div", {
503
503
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
504
- children: /* @__PURE__ */ Y("div", {
504
+ children: /* @__PURE__ */ J("div", {
505
505
  className: "flex items-center justify-between gap-3",
506
- children: [/* @__PURE__ */ J("span", { children: b }), /* @__PURE__ */ J("button", {
507
- onClick: () => x(null),
506
+ children: [/* @__PURE__ */ q("span", { children: b }), /* @__PURE__ */ q("button", {
507
+ onClick: () => ee(null),
508
508
  className: "text-status-success-text hover:text-status-success-text",
509
509
  children: s("devportal.dismiss", "Dismiss")
510
510
  })]
511
511
  })
512
512
  }),
513
- /* @__PURE__ */ J(Pe, {
513
+ /* @__PURE__ */ q(Ie, {
514
514
  appName: t,
515
- delegations: S,
515
+ delegations: x,
516
516
  onGrantDelegation: n,
517
517
  onRevokeDelegation: (e) => h([e]),
518
518
  selectedDelegationIds: v,
519
- onToggleSelectDelegation: T,
520
- onToggleAllDelegations: E,
521
- onClearSelection: D,
522
- onRevokeSelected: () => h(ee.map((e) => e.id)),
523
- allVisibleSelected: w,
524
- partiallySelected: te
519
+ onToggleSelectDelegation: w,
520
+ onToggleAllDelegations: T,
521
+ onClearSelection: E,
522
+ onRevokeSelected: () => h(te.map((e) => e.id)),
523
+ allVisibleSelected: C,
524
+ partiallySelected: ne
525
525
  }),
526
- /* @__PURE__ */ J(O, {
526
+ /* @__PURE__ */ q(ie, {
527
527
  open: m.length > 0,
528
528
  onOpenChange: (e) => {
529
529
  e || h([]);
530
530
  },
531
531
  onConfirm: () => {
532
- m.length > 0 && k(m);
532
+ m.length > 0 && D(m);
533
533
  },
534
534
  title: m.length > 1 ? s("devportal.revokeDelegations", "Revoke Delegations") : s("devportal.revokeDelegation", "Revoke Delegation"),
535
535
  description: m.length > 1 ? s("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${m.length} selected delegations.`) : s("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
@@ -538,90 +538,159 @@ var we = [
538
538
  variant: "destructive",
539
539
  loading: g
540
540
  })
541
- ] }) : /* @__PURE__ */ J(r, {
542
- icon: /* @__PURE__ */ J(H, { size: 32 }),
541
+ ] }) : /* @__PURE__ */ q(r, {
542
+ icon: /* @__PURE__ */ q(H, { size: 32 }),
543
543
  title: s("devportal.linkAuthAppFirst", "Link an auth app first"),
544
544
  description: s("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
545
- action: /* @__PURE__ */ Y("button", {
545
+ action: /* @__PURE__ */ J("button", {
546
546
  onClick: () => a("/oauth"),
547
547
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
548
- children: [/* @__PURE__ */ J(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
548
+ children: [/* @__PURE__ */ q(R, { size: 16 }), s("devportal.manageOAuthApps", "Manage OAuth Apps")]
549
549
  })
550
550
  });
551
- }, je = ({ appId: e }) => {
552
- let { t } = F(), n = (e, n) => {
551
+ }, Ne = ({ app: e }) => {
552
+ let { t } = N(), n = (e, n) => {
553
553
  let r = t(e);
554
554
  return r === e ? n : r;
555
- }, r = M(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: s } = o({ variables: {
556
- applicationId: e,
557
- period: "daily",
558
- startDate: M(() => {
559
- let e = new Date(r);
560
- return e.setDate(e.getDate() - 30), e;
561
- }, [r]).toISOString(),
562
- endDate: r.toISOString()
563
- } });
564
- return a ? /* @__PURE__ */ J(Ee, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : s ? /* @__PURE__ */ J(De, { message: s.message }) : /* @__PURE__ */ J(Fe, { analytics: (i?.applicationAnalytics ?? []).map(Ce) });
565
- }, Me = ({ app: e }) => {
566
- let { t } = F(), n = (e, n) => {
555
+ }, r = e.appType === "NODE" || e.appType === "WORKFLOW", i = A(() => /* @__PURE__ */ new Date(), []), a = A(() => {
556
+ let e = new Date(i);
557
+ return e.setDate(e.getDate() - 30), e;
558
+ }, [i]), { data: s } = c({
559
+ fetchPolicy: "cache-first",
560
+ skip: !r
561
+ }), u = s?.myPublisher?.products.find((t) => t.productId === e.id)?.id ?? null, { data: d, loading: f } = l({
562
+ variables: { productId: u ?? "" },
563
+ skip: !r || !u,
564
+ fetchPolicy: "cache-and-network"
565
+ }), { data: p, loading: m, error: h } = o({
566
+ variables: {
567
+ applicationId: e.id,
568
+ period: "daily",
569
+ startDate: a.toISOString(),
570
+ endDate: i.toISOString()
571
+ },
572
+ skip: r
573
+ });
574
+ if (r) {
575
+ let t = d?.productInstallations?.items ?? [], r = d?.productInstallations?.total ?? 0, i = t.filter((e) => e.status === "ACTIVE").length;
576
+ return f && !d ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : /* @__PURE__ */ J("div", {
577
+ className: "space-y-6",
578
+ children: [/* @__PURE__ */ J("div", {
579
+ className: "grid gap-4 sm:grid-cols-4",
580
+ children: [
581
+ /* @__PURE__ */ q(Q, {
582
+ label: n("devportal.totalInstalls", "Total Installs"),
583
+ value: r.toLocaleString()
584
+ }),
585
+ /* @__PURE__ */ q(Q, {
586
+ label: n("devportal.activeInstalls", "Active Installs"),
587
+ value: i.toLocaleString()
588
+ }),
589
+ /* @__PURE__ */ q(Q, {
590
+ label: n("devportal.averageRating", "Average Rating"),
591
+ value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
592
+ }),
593
+ /* @__PURE__ */ q(Q, {
594
+ label: n("devportal.reviews", "Reviews"),
595
+ value: e.reviewCount.toString()
596
+ })
597
+ ]
598
+ }), t.length > 0 && /* @__PURE__ */ q(y, {
599
+ title: n("devportal.installBreakdown", "Install Breakdown"),
600
+ children: /* @__PURE__ */ q(w, {
601
+ data: t,
602
+ keyField: "id",
603
+ columns: [
604
+ {
605
+ key: "workspaceId",
606
+ header: n("devportal.workspace", "Workspace"),
607
+ render: (e) => e.workspaceId
608
+ },
609
+ {
610
+ key: "version",
611
+ header: n("devportal.version", "Version"),
612
+ render: (e) => e.version ?? "—"
613
+ },
614
+ {
615
+ key: "status",
616
+ header: n("devportal.status", "Status"),
617
+ render: (e) => e.status
618
+ },
619
+ {
620
+ key: "installedAt",
621
+ header: n("devportal.installedAt", "Installed"),
622
+ render: (e) => new Date(e.installedAt).toLocaleDateString(void 0, {
623
+ month: "short",
624
+ day: "numeric",
625
+ year: "numeric"
626
+ })
627
+ }
628
+ ]
629
+ })
630
+ })]
631
+ });
632
+ }
633
+ return m ? /* @__PURE__ */ q(X, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : h ? /* @__PURE__ */ q(Z, { message: h.message }) : /* @__PURE__ */ q(Le, { analytics: (p?.applicationAnalytics ?? []).map(Ee) });
634
+ }, Pe = ({ app: e }) => {
635
+ let { t } = N(), n = (e, n) => {
567
636
  let r = t(e);
568
637
  return r === e ? n : r;
569
638
  };
570
- return /* @__PURE__ */ Y("div", {
639
+ return /* @__PURE__ */ J("div", {
571
640
  className: "grid gap-6 lg:grid-cols-3",
572
- children: [/* @__PURE__ */ Y("div", {
641
+ children: [/* @__PURE__ */ J("div", {
573
642
  className: "lg:col-span-2 space-y-6",
574
643
  children: [
575
- /* @__PURE__ */ Y("div", {
644
+ /* @__PURE__ */ J("div", {
576
645
  className: "grid gap-4 sm:grid-cols-4",
577
646
  children: [
578
- /* @__PURE__ */ J(Q, {
647
+ /* @__PURE__ */ q(Q, {
579
648
  label: n("devportal.totalInstalls", "Total Installs"),
580
649
  value: e.installCount.toLocaleString()
581
650
  }),
582
- /* @__PURE__ */ J(Q, {
651
+ /* @__PURE__ */ q(Q, {
583
652
  label: n("devportal.activeInstalls", "Active Installs"),
584
653
  value: e.activeInstallCount.toLocaleString()
585
654
  }),
586
- /* @__PURE__ */ J(Q, {
655
+ /* @__PURE__ */ q(Q, {
587
656
  label: n("devportal.averageRating", "Average Rating"),
588
657
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
589
658
  }),
590
- /* @__PURE__ */ J(Q, {
659
+ /* @__PURE__ */ q(Q, {
591
660
  label: n("devportal.reviews", "Reviews"),
592
661
  value: e.reviewCount.toString()
593
662
  })
594
663
  ]
595
664
  }),
596
- /* @__PURE__ */ J(_, {
665
+ /* @__PURE__ */ q(y, {
597
666
  title: n("devportal.description", "Description"),
598
- children: /* @__PURE__ */ J("div", {
667
+ children: /* @__PURE__ */ q("div", {
599
668
  className: "prose prose-sm max-w-none",
600
- children: /* @__PURE__ */ J("pre", {
669
+ children: /* @__PURE__ */ q("pre", {
601
670
  className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
602
671
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
603
672
  })
604
673
  })
605
674
  }),
606
- /* @__PURE__ */ J(_, {
675
+ /* @__PURE__ */ q(y, {
607
676
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
608
- children: /* @__PURE__ */ Y("div", {
677
+ children: /* @__PURE__ */ J("div", {
609
678
  className: "space-y-3",
610
- children: [e.tags.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
679
+ children: [e.tags.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
611
680
  className: "text-xs text-muted-foreground mb-2",
612
681
  children: n("devportal.tags", "Tags")
613
- }), /* @__PURE__ */ J("div", {
682
+ }), /* @__PURE__ */ q("div", {
614
683
  className: "flex flex-wrap gap-2",
615
- children: e.tags.map((e) => /* @__PURE__ */ J("span", {
684
+ children: e.tags.map((e) => /* @__PURE__ */ q("span", {
616
685
  className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
617
686
  children: e
618
687
  }, e))
619
- })] }), e.keywords.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
688
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
620
689
  className: "text-xs text-muted-foreground mb-2",
621
690
  children: n("devportal.keywords", "Keywords")
622
- }), /* @__PURE__ */ J("div", {
691
+ }), /* @__PURE__ */ q("div", {
623
692
  className: "flex flex-wrap gap-2",
624
- children: e.keywords.map((e) => /* @__PURE__ */ J("span", {
693
+ children: e.keywords.map((e) => /* @__PURE__ */ q("span", {
625
694
  className: "rounded-full bg-muted px-3 py-1 text-xs",
626
695
  children: e
627
696
  }, e))
@@ -629,14 +698,14 @@ var we = [
629
698
  })
630
699
  })
631
700
  ]
632
- }), /* @__PURE__ */ Y("div", {
701
+ }), /* @__PURE__ */ J("div", {
633
702
  className: "space-y-6",
634
- children: [/* @__PURE__ */ J(_, {
703
+ children: [/* @__PURE__ */ q(y, {
635
704
  title: n("devportal.details", "Details"),
636
- children: /* @__PURE__ */ J(te, { items: [
705
+ children: /* @__PURE__ */ q(T, { items: [
637
706
  {
638
707
  label: n("devportal.appId", "App ID"),
639
- value: /* @__PURE__ */ J("code", {
708
+ value: /* @__PURE__ */ q("code", {
640
709
  className: "text-xs",
641
710
  children: e.id
642
711
  })
@@ -666,32 +735,32 @@ var we = [
666
735
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
667
736
  }
668
737
  ] })
669
- }), /* @__PURE__ */ J(_, {
738
+ }), /* @__PURE__ */ q(y, {
670
739
  title: n("devportal.links", "Links"),
671
- children: /* @__PURE__ */ Y("div", {
740
+ children: /* @__PURE__ */ J("div", {
672
741
  className: "space-y-2",
673
742
  children: [
674
- e.websiteUrl && /* @__PURE__ */ J($, {
743
+ e.websiteUrl && /* @__PURE__ */ q($, {
675
744
  label: n("devportal.website", "Website"),
676
745
  url: e.websiteUrl
677
746
  }),
678
- e.documentationUrl && /* @__PURE__ */ J($, {
747
+ e.documentationUrl && /* @__PURE__ */ q($, {
679
748
  label: n("devportal.documentation", "Documentation"),
680
749
  url: e.documentationUrl
681
750
  }),
682
- e.supportUrl && /* @__PURE__ */ J($, {
751
+ e.supportUrl && /* @__PURE__ */ q($, {
683
752
  label: n("devportal.support", "Support"),
684
753
  url: e.supportUrl
685
754
  }),
686
- e.githubUrl && /* @__PURE__ */ J($, {
755
+ e.githubUrl && /* @__PURE__ */ q($, {
687
756
  label: n("devportal.github", "GitHub"),
688
757
  url: e.githubUrl
689
758
  }),
690
- e.privacyPolicyUrl && /* @__PURE__ */ J($, {
759
+ e.privacyPolicyUrl && /* @__PURE__ */ q($, {
691
760
  label: n("devportal.privacyPolicy", "Privacy Policy"),
692
761
  url: e.privacyPolicyUrl
693
762
  }),
694
- e.termsOfServiceUrl && /* @__PURE__ */ J($, {
763
+ e.termsOfServiceUrl && /* @__PURE__ */ q($, {
695
764
  label: n("devportal.termsOfService", "Terms of Service"),
696
765
  url: e.termsOfServiceUrl
697
766
  })
@@ -700,16 +769,16 @@ var we = [
700
769
  })]
701
770
  })]
702
771
  });
703
- }, Ne = ({ appId: e, webhooks: t, onNavigate: n }) => {
704
- let { t: i } = F(), a = (e, t) => {
772
+ }, Fe = ({ appId: e, webhooks: t, onNavigate: n }) => {
773
+ let { t: i } = N(), a = (e, t) => {
705
774
  let n = i(e);
706
775
  return n === e ? t : n;
707
776
  };
708
- return /* @__PURE__ */ Y("div", {
777
+ return /* @__PURE__ */ J("div", {
709
778
  className: "space-y-6",
710
- children: [/* @__PURE__ */ Y("div", {
779
+ children: [/* @__PURE__ */ J("div", {
711
780
  className: "flex items-center justify-between",
712
- children: [/* @__PURE__ */ Y("p", {
781
+ children: [/* @__PURE__ */ J("p", {
713
782
  className: "text-sm text-muted-foreground",
714
783
  children: [
715
784
  t.length,
@@ -718,81 +787,81 @@ var we = [
718
787
  " ",
719
788
  a("devportal.configured", "configured")
720
789
  ]
721
- }), /* @__PURE__ */ Y("button", {
790
+ }), /* @__PURE__ */ J("button", {
722
791
  onClick: () => n(`/apps/${e}/webhooks/new`),
723
792
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
724
- children: [/* @__PURE__ */ J(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
793
+ children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
725
794
  })]
726
- }), t.length > 0 ? /* @__PURE__ */ J("div", {
795
+ }), t.length > 0 ? /* @__PURE__ */ q("div", {
727
796
  className: "space-y-4",
728
- children: t.map((t) => /* @__PURE__ */ Y("div", {
797
+ children: t.map((t) => /* @__PURE__ */ J("div", {
729
798
  className: "rounded-lg border bg-card p-4 space-y-4",
730
799
  children: [
731
- /* @__PURE__ */ Y("div", {
800
+ /* @__PURE__ */ J("div", {
732
801
  className: "flex items-start justify-between",
733
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
802
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
734
803
  className: "flex items-center gap-2",
735
- children: [/* @__PURE__ */ J("h3", {
804
+ children: [/* @__PURE__ */ q("h3", {
736
805
  className: "font-medium",
737
806
  children: t.name
738
- }), /* @__PURE__ */ J(b, {
807
+ }), /* @__PURE__ */ q(x, {
739
808
  status: t.status,
740
809
  type: "webhook"
741
810
  })]
742
- }), t.description && /* @__PURE__ */ J("p", {
811
+ }), t.description && /* @__PURE__ */ q("p", {
743
812
  className: "text-sm text-muted-foreground mt-1",
744
813
  children: t.description
745
- })] }), /* @__PURE__ */ J("button", {
814
+ })] }), /* @__PURE__ */ q("button", {
746
815
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
747
816
  className: "rounded-md p-1 hover:bg-muted",
748
- children: /* @__PURE__ */ J(fe, { size: 20 })
817
+ children: /* @__PURE__ */ q(me, { size: 20 })
749
818
  })]
750
819
  }),
751
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
820
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
752
821
  className: "text-xs text-muted-foreground mb-1",
753
822
  children: a("devportal.endpointUrl", "Endpoint URL")
754
- }), /* @__PURE__ */ J("code", {
823
+ }), /* @__PURE__ */ q("code", {
755
824
  className: "text-sm bg-muted px-2 py-1 rounded block truncate",
756
825
  children: t.url
757
826
  })] }),
758
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
827
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
759
828
  className: "text-xs text-muted-foreground mb-2",
760
829
  children: a("devportal.events", "Events")
761
- }), /* @__PURE__ */ J("div", {
830
+ }), /* @__PURE__ */ q("div", {
762
831
  className: "flex flex-wrap gap-2",
763
- children: t.events.map((e) => /* @__PURE__ */ J("span", {
832
+ children: t.events.map((e) => /* @__PURE__ */ q("span", {
764
833
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
765
834
  children: e
766
835
  }, e))
767
836
  })] }),
768
- /* @__PURE__ */ Y("div", {
837
+ /* @__PURE__ */ J("div", {
769
838
  className: "grid gap-4 sm:grid-cols-4 text-sm",
770
839
  children: [
771
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
840
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
772
841
  className: "text-xs text-muted-foreground",
773
842
  children: a("devportal.success", "Success")
774
- }), /* @__PURE__ */ J("p", {
843
+ }), /* @__PURE__ */ q("p", {
775
844
  className: "font-medium text-status-success-text",
776
845
  children: t.successCount.toLocaleString()
777
846
  })] }),
778
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
847
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
779
848
  className: "text-xs text-muted-foreground",
780
849
  children: a("devportal.failed", "Failed")
781
- }), /* @__PURE__ */ J("p", {
850
+ }), /* @__PURE__ */ q("p", {
782
851
  className: "font-medium text-status-error-text",
783
852
  children: t.failureCount.toLocaleString()
784
853
  })] }),
785
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
854
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
786
855
  className: "text-xs text-muted-foreground",
787
856
  children: a("devportal.successRate", "Success Rate")
788
- }), /* @__PURE__ */ Y("p", {
857
+ }), /* @__PURE__ */ J("p", {
789
858
  className: "font-medium",
790
859
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
791
860
  })] }),
792
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
861
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
793
862
  className: "text-xs text-muted-foreground",
794
863
  children: a("devportal.lastTriggered", "Last Triggered")
795
- }), /* @__PURE__ */ J("p", {
864
+ }), /* @__PURE__ */ q("p", {
796
865
  className: "font-medium",
797
866
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
798
867
  })] })
@@ -800,28 +869,28 @@ var we = [
800
869
  })
801
870
  ]
802
871
  }, t.id))
803
- }) : /* @__PURE__ */ J(r, {
804
- icon: /* @__PURE__ */ J(ge, { size: 32 }),
872
+ }) : /* @__PURE__ */ q(r, {
873
+ icon: /* @__PURE__ */ q(ye, { size: 32 }),
805
874
  title: a("devportal.noWebhooks", "No webhooks"),
806
875
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
807
- action: /* @__PURE__ */ Y("button", {
876
+ action: /* @__PURE__ */ J("button", {
808
877
  onClick: () => n(`/apps/${e}/webhooks/new`),
809
878
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
810
- children: [/* @__PURE__ */ J(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
879
+ children: [/* @__PURE__ */ q(V, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
811
880
  })
812
881
  })]
813
882
  });
814
- }, Pe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
815
- let { t: p } = F(), m = (e, t) => {
883
+ }, Ie = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: u, allVisibleSelected: d, partiallySelected: f }) => {
884
+ let { t: p } = N(), m = (e, t) => {
816
885
  let n = p(e);
817
886
  return n === e ? t : n;
818
887
  }, h = n.filter((e) => e.status === "ACTIVE"), g = n.filter((e) => e.status !== "ACTIVE");
819
- return /* @__PURE__ */ Y("div", {
888
+ return /* @__PURE__ */ J("div", {
820
889
  className: "space-y-6",
821
890
  children: [
822
- /* @__PURE__ */ Y("div", {
891
+ /* @__PURE__ */ J("div", {
823
892
  className: "flex items-center justify-between",
824
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
893
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
825
894
  className: "text-sm text-muted-foreground",
826
895
  children: [
827
896
  n.length,
@@ -832,7 +901,7 @@ var we = [
832
901
  " ",
833
902
  e
834
903
  ]
835
- }), h.length > 0 && /* @__PURE__ */ Y("p", {
904
+ }), h.length > 0 && /* @__PURE__ */ J("p", {
836
905
  className: "text-xs text-muted-foreground mt-0.5",
837
906
  children: [
838
907
  h.length,
@@ -844,44 +913,44 @@ var we = [
844
913
  " ",
845
914
  m("devportal.revokedExpired", "revoked/expired")
846
915
  ]
847
- })] }), /* @__PURE__ */ Y("button", {
916
+ })] }), /* @__PURE__ */ J("button", {
848
917
  onClick: i,
849
918
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
850
- children: [/* @__PURE__ */ J(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
919
+ children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
851
920
  })]
852
921
  }),
853
- h.length > 0 && /* @__PURE__ */ J("div", {
922
+ h.length > 0 && /* @__PURE__ */ q("div", {
854
923
  className: "rounded-lg border bg-card p-4",
855
- children: /* @__PURE__ */ Y("div", {
924
+ children: /* @__PURE__ */ J("div", {
856
925
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
857
- children: [/* @__PURE__ */ Y("div", {
926
+ children: [/* @__PURE__ */ J("div", {
858
927
  className: "flex flex-wrap items-center gap-3",
859
- children: [/* @__PURE__ */ Y("div", {
928
+ children: [/* @__PURE__ */ J("div", {
860
929
  className: "flex items-center gap-2",
861
- children: [/* @__PURE__ */ J(S, {
930
+ children: [/* @__PURE__ */ q(te, {
862
931
  checked: d,
863
932
  indeterminate: f,
864
933
  onChange: c,
865
934
  ariaLabel: m("devportal.selectAllActiveDelegations", "Select all active app delegations")
866
- }), /* @__PURE__ */ J("span", {
935
+ }), /* @__PURE__ */ q("span", {
867
936
  className: "text-sm font-medium",
868
937
  children: m("devportal.selectAllActive", "Select all active")
869
938
  })]
870
- }), o.size > 0 && /* @__PURE__ */ J("button", {
939
+ }), o.size > 0 && /* @__PURE__ */ q("button", {
871
940
  onClick: l,
872
941
  className: "text-sm text-muted-foreground hover:text-foreground",
873
942
  children: m("devportal.clearSelection", "Clear selection")
874
943
  })]
875
- }), /* @__PURE__ */ Y("div", {
944
+ }), /* @__PURE__ */ J("div", {
876
945
  className: "flex flex-wrap items-center gap-2",
877
- children: [/* @__PURE__ */ Y("span", {
946
+ children: [/* @__PURE__ */ J("span", {
878
947
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
879
948
  children: [
880
949
  o.size,
881
950
  " ",
882
951
  m("devportal.selected", "selected")
883
952
  ]
884
- }), /* @__PURE__ */ Y("button", {
953
+ }), /* @__PURE__ */ J("button", {
885
954
  onClick: u,
886
955
  disabled: o.size === 0,
887
956
  className: "rounded-md border border-status-error-bg px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
@@ -890,33 +959,33 @@ var we = [
890
959
  })]
891
960
  })
892
961
  }),
893
- n.length > 0 ? /* @__PURE__ */ J("div", {
962
+ n.length > 0 ? /* @__PURE__ */ q("div", {
894
963
  className: "space-y-4",
895
- children: n.map((e) => /* @__PURE__ */ Y("div", {
964
+ children: n.map((e) => /* @__PURE__ */ J("div", {
896
965
  className: "rounded-lg border bg-card p-4 space-y-4",
897
966
  children: [
898
- /* @__PURE__ */ Y("div", {
967
+ /* @__PURE__ */ J("div", {
899
968
  className: "flex items-start justify-between",
900
- children: [/* @__PURE__ */ Y("div", {
969
+ children: [/* @__PURE__ */ J("div", {
901
970
  className: "flex items-start gap-3",
902
- children: [e.status === "ACTIVE" && /* @__PURE__ */ J("div", {
971
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ q("div", {
903
972
  onClick: (e) => e.stopPropagation(),
904
- children: /* @__PURE__ */ J(S, {
973
+ children: /* @__PURE__ */ q(te, {
905
974
  checked: o.has(e.id),
906
975
  onChange: (t) => s(e.id, t),
907
976
  ariaLabel: `Select delegation ${e.id}`,
908
977
  className: "mt-1"
909
978
  })
910
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("div", {
979
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("div", {
911
980
  className: "flex items-center gap-2",
912
- children: [/* @__PURE__ */ Y("h3", {
981
+ children: [/* @__PURE__ */ J("h3", {
913
982
  className: "font-medium",
914
983
  children: ["Delegation #", e.id.slice(0, 8)]
915
- }), /* @__PURE__ */ J("span", {
916
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", Te[e.status]),
984
+ }), /* @__PURE__ */ q("span", {
985
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", ke[e.status]),
917
986
  children: e.status
918
987
  })]
919
- }), /* @__PURE__ */ Y("p", {
988
+ }), /* @__PURE__ */ J("p", {
920
989
  className: "text-sm text-muted-foreground mt-1",
921
990
  children: [
922
991
  m("devportal.granted", "Granted"),
@@ -928,55 +997,55 @@ var we = [
928
997
  e.grantedBy === e.userId ? m("devportal.you", "you") : e.grantedBy.slice(0, 8)
929
998
  ]
930
999
  })] })]
931
- }), e.status === "ACTIVE" && /* @__PURE__ */ Y("button", {
1000
+ }), e.status === "ACTIVE" && /* @__PURE__ */ J("button", {
932
1001
  onClick: () => a(e.id),
933
1002
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
934
- children: [/* @__PURE__ */ J(_e, { size: 14 }), m("devportal.revoke", "Revoke")]
1003
+ children: [/* @__PURE__ */ q(be, { size: 14 }), m("devportal.revoke", "Revoke")]
935
1004
  })]
936
1005
  }),
937
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1006
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
938
1007
  className: "text-xs text-muted-foreground mb-2",
939
1008
  children: m("devportal.grantedScopes", "Granted Scopes")
940
- }), /* @__PURE__ */ J("div", {
1009
+ }), /* @__PURE__ */ q("div", {
941
1010
  className: "flex flex-wrap gap-2",
942
- children: e.scopes.map((e) => /* @__PURE__ */ J("span", {
1011
+ children: e.scopes.map((e) => /* @__PURE__ */ q("span", {
943
1012
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
944
1013
  children: e
945
1014
  }, e))
946
1015
  })] }),
947
- e.workspaceIds.length > 0 && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
1016
+ e.workspaceIds.length > 0 && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
948
1017
  className: "text-xs text-muted-foreground mb-2",
949
1018
  children: m("devportal.workspaceScope", "Workspace Scope")
950
- }), /* @__PURE__ */ J("div", {
1019
+ }), /* @__PURE__ */ q("div", {
951
1020
  className: "flex flex-wrap gap-2",
952
- children: e.workspaceIds.map((e) => /* @__PURE__ */ J("code", {
1021
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ q("code", {
953
1022
  className: "rounded bg-muted px-2 py-0.5 text-xs",
954
1023
  children: e
955
1024
  }, e))
956
1025
  })] }),
957
- /* @__PURE__ */ Y("div", {
1026
+ /* @__PURE__ */ J("div", {
958
1027
  className: "flex items-center gap-4 text-xs text-muted-foreground",
959
1028
  children: [
960
- e.expiresAt && /* @__PURE__ */ Y("span", {
1029
+ e.expiresAt && /* @__PURE__ */ J("span", {
961
1030
  className: "flex items-center gap-1",
962
1031
  children: [
963
- /* @__PURE__ */ J(se, { size: 12 }),
1032
+ /* @__PURE__ */ q(L, { size: 12 }),
964
1033
  m("devportal.expires", "Expires"),
965
1034
  " ",
966
1035
  new Date(e.expiresAt).toLocaleDateString()
967
1036
  ]
968
1037
  }),
969
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ Y("span", {
1038
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ J("span", {
970
1039
  className: "flex items-center gap-1",
971
- children: [/* @__PURE__ */ J(L, {
1040
+ children: [/* @__PURE__ */ q(I, {
972
1041
  size: 12,
973
1042
  className: "text-status-success-text"
974
1043
  }), m("devportal.noExpiration", "No expiration")]
975
1044
  }),
976
- e.revokedAt && /* @__PURE__ */ Y("span", {
1045
+ e.revokedAt && /* @__PURE__ */ J("span", {
977
1046
  className: "flex items-center gap-1",
978
1047
  children: [
979
- /* @__PURE__ */ J(_e, {
1048
+ /* @__PURE__ */ q(be, {
980
1049
  size: 12,
981
1050
  className: "text-status-error-text"
982
1051
  }),
@@ -989,52 +1058,52 @@ var we = [
989
1058
  })
990
1059
  ]
991
1060
  }, e.id))
992
- }) : /* @__PURE__ */ J(r, {
993
- icon: /* @__PURE__ */ J(G, { size: 32 }),
1061
+ }) : /* @__PURE__ */ q(r, {
1062
+ icon: /* @__PURE__ */ q(W, { size: 32 }),
994
1063
  title: m("devportal.noDelegations", "No delegations"),
995
1064
  description: m("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
996
- action: /* @__PURE__ */ Y("button", {
1065
+ action: /* @__PURE__ */ J("button", {
997
1066
  onClick: i,
998
1067
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
999
- children: [/* @__PURE__ */ J(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1068
+ children: [/* @__PURE__ */ q(V, { size: 16 }), m("devportal.grantDelegation", "Grant Delegation")]
1000
1069
  })
1001
1070
  })
1002
1071
  ]
1003
1072
  });
1004
- }, Fe = ({ analytics: e }) => {
1005
- let { t } = F(), n = (e, n) => {
1073
+ }, Le = ({ analytics: e }) => {
1074
+ let { t } = N(), n = (e, n) => {
1006
1075
  let r = t(e);
1007
1076
  return r === e ? n : r;
1008
1077
  }, i = e[0], a = e[1], o = (e, t) => t ? (e - t) / t * 100 : 0;
1009
- return /* @__PURE__ */ Y("div", {
1078
+ return /* @__PURE__ */ J("div", {
1010
1079
  className: "space-y-6",
1011
- children: [/* @__PURE__ */ Y("div", {
1080
+ children: [/* @__PURE__ */ J("div", {
1012
1081
  className: "grid gap-4 sm:grid-cols-4",
1013
1082
  children: [
1014
- /* @__PURE__ */ J(Q, {
1083
+ /* @__PURE__ */ q(Q, {
1015
1084
  label: n("devportal.activeUsers", "Active Users"),
1016
1085
  value: i?.activeUsers.toLocaleString() || "0",
1017
1086
  trend: a ? o(i.activeUsers, a.activeUsers) : void 0
1018
1087
  }),
1019
- /* @__PURE__ */ J(Q, {
1088
+ /* @__PURE__ */ q(Q, {
1020
1089
  label: n("devportal.apiCalls", "API Calls"),
1021
1090
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
1022
1091
  trend: a ? o(i.apiCalls, a.apiCalls) : void 0
1023
1092
  }),
1024
- /* @__PURE__ */ J(Q, {
1093
+ /* @__PURE__ */ q(Q, {
1025
1094
  label: n("devportal.avgResponseTime", "Avg Response Time"),
1026
1095
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
1027
1096
  trend: a && i?.avgResponseTime ? -o(i.avgResponseTime, a.avgResponseTime || 1) : void 0
1028
1097
  }),
1029
- /* @__PURE__ */ J(Q, {
1098
+ /* @__PURE__ */ q(Q, {
1030
1099
  label: n("devportal.errorRate", "Error Rate"),
1031
1100
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1032
1101
  trend: a && i && i.apiCalls > 0 && a.apiCalls > 0 ? -o(i.errors / i.apiCalls, a.errors / a.apiCalls) : void 0
1033
1102
  })
1034
1103
  ]
1035
- }), /* @__PURE__ */ J(_, {
1104
+ }), /* @__PURE__ */ q(y, {
1036
1105
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1037
- children: e.length > 0 ? /* @__PURE__ */ J(w, {
1106
+ children: e.length > 0 ? /* @__PURE__ */ q(w, {
1038
1107
  data: e,
1039
1108
  keyField: "id",
1040
1109
  columns: [
@@ -1074,18 +1143,18 @@ var we = [
1074
1143
  render: (e) => e.sessions.toLocaleString()
1075
1144
  }
1076
1145
  ]
1077
- }) : /* @__PURE__ */ J(r, {
1078
- icon: /* @__PURE__ */ J(I, { size: 32 }),
1146
+ }) : /* @__PURE__ */ q(r, {
1147
+ icon: /* @__PURE__ */ q(F, { size: 32 }),
1079
1148
  title: n("devportal.noAnalyticsData", "No analytics data"),
1080
1149
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1081
1150
  })
1082
1151
  })]
1083
1152
  });
1084
- }, Ie = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", Le = ({ app: t }) => {
1085
- let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = F(), o = (e, t) => {
1153
+ }, Re = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", ze = ({ app: t }) => {
1154
+ let { apiGatewayUrl: n, workspacesGatewayUrl: r, authToken: i } = e(), { t: a } = N(), o = (e, t) => {
1086
1155
  let n = a(e);
1087
1156
  return n === e ? t : n;
1088
- }, [s, c] = P(Ie), [l, u] = P("{}"), [d, f] = P(""), [p, m] = P(!1), [h, g] = P(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = P(i || ""), [y, b] = P(!1), x = j(async () => {
1157
+ }, [s, c] = M(Re), [l, u] = M("{}"), [d, f] = M(""), [p, m] = M(!1), [h, g] = M(`${n || "https://gw-global.local.burdenoff.com"}/global/graphql`), [_, v] = M(i || ""), [y, b] = M(!1), ee = k(async () => {
1089
1158
  m(!0), f("");
1090
1159
  try {
1091
1160
  let e = {};
@@ -1116,24 +1185,24 @@ var we = [
1116
1185
  l,
1117
1186
  h,
1118
1187
  _
1119
- ]), S = j(() => {
1188
+ ]), x = k(() => {
1120
1189
  i && v(i), b(!0);
1121
1190
  }, [i]);
1122
- return /* @__PURE__ */ Y("div", {
1191
+ return /* @__PURE__ */ J("div", {
1123
1192
  className: "space-y-4",
1124
1193
  children: [
1125
- /* @__PURE__ */ Y("div", {
1194
+ /* @__PURE__ */ J("div", {
1126
1195
  className: "flex items-center justify-between",
1127
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("h3", {
1196
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("h3", {
1128
1197
  className: "text-lg font-semibold",
1129
1198
  children: o("devportal.apiPlayground", "API Playground")
1130
- }), /* @__PURE__ */ Y("p", {
1199
+ }), /* @__PURE__ */ J("p", {
1131
1200
  className: "text-sm text-muted-foreground",
1132
1201
  children: [
1133
1202
  o("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1134
1203
  " ",
1135
- /* @__PURE__ */ J("strong", { children: t.name }),
1136
- t.appId && /* @__PURE__ */ Y("span", {
1204
+ /* @__PURE__ */ q("strong", { children: t.name }),
1205
+ t.appId && /* @__PURE__ */ J("span", {
1137
1206
  className: "ml-1 text-xs text-muted-foreground",
1138
1207
  children: [
1139
1208
  "(OAuth App: ",
@@ -1142,39 +1211,39 @@ var we = [
1142
1211
  ]
1143
1212
  })
1144
1213
  ]
1145
- })] }), /* @__PURE__ */ Y("button", {
1146
- onClick: S,
1214
+ })] }), /* @__PURE__ */ J("button", {
1215
+ onClick: x,
1147
1216
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1148
- children: [/* @__PURE__ */ J(de, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1217
+ children: [/* @__PURE__ */ q(pe, { size: 14 }), o("devportal.autoFillCredentials", "Auto-fill Credentials")]
1149
1218
  })]
1150
1219
  }),
1151
- y && /* @__PURE__ */ Y("div", {
1220
+ y && /* @__PURE__ */ J("div", {
1152
1221
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1153
1222
  children: [
1154
- /* @__PURE__ */ J("p", {
1223
+ /* @__PURE__ */ q("p", {
1155
1224
  className: "font-medium text-status-info-text",
1156
1225
  children: o("devportal.authenticationGuide", "Authentication Guide")
1157
1226
  }),
1158
- /* @__PURE__ */ Y("p", {
1227
+ /* @__PURE__ */ J("p", {
1159
1228
  className: "text-status-info-text",
1160
1229
  children: [
1161
1230
  o("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1162
1231
  " ",
1163
- /* @__PURE__ */ J("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1232
+ /* @__PURE__ */ q("strong", { children: o("devportal.oauthClientsTab", "OAuth Clients") }),
1164
1233
  " ",
1165
1234
  o("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1166
1235
  ]
1167
1236
  }),
1168
- /* @__PURE__ */ J("pre", {
1237
+ /* @__PURE__ */ q("pre", {
1169
1238
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1170
1239
  children: "mutation {\n authenticateApp(input: {\n clientId: \"<your-client-id>\"\n clientSecret: \"<your-client-secret>\"\n scopes: []\n }) {\n accessToken\n tokenType\n expiresIn\n }\n}"
1171
1240
  }),
1172
- /* @__PURE__ */ Y("p", {
1241
+ /* @__PURE__ */ J("p", {
1173
1242
  className: "text-status-info-text",
1174
1243
  children: [
1175
1244
  o("devportal.useReturnedAccessToken", "Use the returned"),
1176
1245
  " ",
1177
- /* @__PURE__ */ J("code", {
1246
+ /* @__PURE__ */ q("code", {
1178
1247
  className: "bg-status-info-bg-subtle px-1 rounded",
1179
1248
  children: "accessToken"
1180
1249
  }),
@@ -1182,129 +1251,129 @@ var we = [
1182
1251
  o("devportal.asBearerToken", "as the Bearer token below.")
1183
1252
  ]
1184
1253
  }),
1185
- /* @__PURE__ */ J("button", {
1254
+ /* @__PURE__ */ q("button", {
1186
1255
  onClick: () => b(!1),
1187
1256
  className: "text-xs text-accent-blue hover:underline",
1188
1257
  children: o("devportal.dismiss", "Dismiss")
1189
1258
  })
1190
1259
  ]
1191
1260
  }),
1192
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1261
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1193
1262
  className: "block text-sm font-medium mb-1",
1194
1263
  children: o("devportal.gatewayEndpoint", "Gateway Endpoint")
1195
- }), /* @__PURE__ */ Y("div", {
1264
+ }), /* @__PURE__ */ J("div", {
1196
1265
  className: "flex gap-2",
1197
- children: [/* @__PURE__ */ J("input", {
1266
+ children: [/* @__PURE__ */ q("input", {
1198
1267
  type: "text",
1199
1268
  value: h,
1200
1269
  onChange: (e) => g(e.target.value),
1201
1270
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
1202
- }), /* @__PURE__ */ Y("select", {
1271
+ }), /* @__PURE__ */ J("select", {
1203
1272
  onChange: (e) => g(e.target.value),
1204
1273
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1205
1274
  value: h,
1206
- children: [/* @__PURE__ */ J("option", {
1275
+ children: [/* @__PURE__ */ q("option", {
1207
1276
  value: `${n || "https://gw-global.local.burdenoff.com"}/global/graphql`,
1208
1277
  children: o("devportal.globalGateway", "Global Gateway")
1209
- }), /* @__PURE__ */ J("option", {
1278
+ }), /* @__PURE__ */ q("option", {
1210
1279
  value: `${r || "https://gw-wspace.local.burdenoff.com"}/workspaces/graphql`,
1211
1280
  children: o("devportal.workspaceGateway", "Workspace Gateway")
1212
1281
  })]
1213
1282
  })]
1214
1283
  })] }),
1215
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1284
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1216
1285
  className: "block text-sm font-medium mb-1",
1217
1286
  children: o("devportal.bearerToken", "Bearer Token")
1218
- }), /* @__PURE__ */ J("input", {
1287
+ }), /* @__PURE__ */ q("input", {
1219
1288
  type: "password",
1220
1289
  value: _,
1221
1290
  onChange: (e) => v(e.target.value),
1222
1291
  placeholder: o("devportal.pasteAccessToken", "Paste access token here..."),
1223
1292
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
1224
1293
  })] }),
1225
- /* @__PURE__ */ Y("div", {
1294
+ /* @__PURE__ */ J("div", {
1226
1295
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1227
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1296
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1228
1297
  className: "block text-sm font-medium mb-1",
1229
1298
  children: o("devportal.query", "Query")
1230
- }), /* @__PURE__ */ J("textarea", {
1299
+ }), /* @__PURE__ */ q("textarea", {
1231
1300
  value: s,
1232
1301
  onChange: (e) => c(e.target.value),
1233
1302
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1234
1303
  spellCheck: !1
1235
- })] }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1304
+ })] }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1236
1305
  className: "block text-sm font-medium mb-1",
1237
1306
  children: o("devportal.variablesJson", "Variables (JSON)")
1238
- }), /* @__PURE__ */ J("textarea", {
1307
+ }), /* @__PURE__ */ q("textarea", {
1239
1308
  value: l,
1240
1309
  onChange: (e) => u(e.target.value),
1241
1310
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1242
1311
  spellCheck: !1
1243
1312
  })] })]
1244
1313
  }),
1245
- /* @__PURE__ */ Y("button", {
1246
- onClick: x,
1314
+ /* @__PURE__ */ J("button", {
1315
+ onClick: ee,
1247
1316
  disabled: p,
1248
1317
  className: "flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
1249
- children: [p ? /* @__PURE__ */ J(B, {
1318
+ children: [p ? /* @__PURE__ */ q(B, {
1250
1319
  size: 16,
1251
1320
  className: "animate-spin"
1252
- }) : /* @__PURE__ */ J(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1321
+ }) : /* @__PURE__ */ q(R, { size: 16 }), p ? o("devportal.executing", "Executing...") : o("devportal.executeQuery", "Execute Query")]
1253
1322
  }),
1254
- d && /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
1323
+ d && /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
1255
1324
  className: "block text-sm font-medium mb-1",
1256
1325
  children: o("devportal.response", "Response")
1257
- }), /* @__PURE__ */ J("pre", {
1326
+ }), /* @__PURE__ */ q("pre", {
1258
1327
  className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
1259
1328
  children: d
1260
1329
  })] })
1261
1330
  ]
1262
1331
  });
1263
- }, Re = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1264
- let d = N(null), f = j(async (e) => {
1332
+ }, Be = ({ label: e, value: n, onChange: r, hint: i, accept: a = "image/png,image/jpeg,image/webp,image/gif,image/svg+xml", aspectClass: o = "aspect-square", upload: s, uploading: c, progress: l, error: u }) => {
1333
+ let d = j(null), f = k(async (e) => {
1265
1334
  try {
1266
1335
  r((await s(e)).downloadUrl);
1267
1336
  } catch {}
1268
1337
  }, [s, r]);
1269
- return /* @__PURE__ */ Y("div", {
1338
+ return /* @__PURE__ */ J("div", {
1270
1339
  className: "space-y-1.5",
1271
1340
  children: [
1272
- /* @__PURE__ */ J("label", {
1341
+ /* @__PURE__ */ q("label", {
1273
1342
  className: "text-sm font-medium",
1274
1343
  children: e
1275
1344
  }),
1276
- /* @__PURE__ */ Y("div", {
1345
+ /* @__PURE__ */ J("div", {
1277
1346
  className: "flex gap-3 items-start",
1278
- children: [/* @__PURE__ */ Y("div", {
1347
+ children: [/* @__PURE__ */ J("div", {
1279
1348
  className: t("relative shrink-0 w-20 rounded-lg border border-border bg-bg-sunken overflow-hidden flex items-center justify-center", o),
1280
- children: [n ? /* @__PURE__ */ J("img", {
1349
+ children: [n ? /* @__PURE__ */ q("img", {
1281
1350
  src: n,
1282
1351
  alt: e,
1283
1352
  className: "w-full h-full object-cover"
1284
- }) : /* @__PURE__ */ J(W, {
1353
+ }) : /* @__PURE__ */ q(U, {
1285
1354
  size: 18,
1286
1355
  className: "text-text-secondary opacity-40"
1287
- }), c && /* @__PURE__ */ Y("div", {
1356
+ }), c && /* @__PURE__ */ J("div", {
1288
1357
  className: "absolute inset-0 bg-black/40 flex flex-col items-center justify-center gap-1",
1289
- children: [/* @__PURE__ */ J(B, {
1358
+ children: [/* @__PURE__ */ q(B, {
1290
1359
  size: 14,
1291
1360
  className: "animate-spin text-white"
1292
- }), /* @__PURE__ */ Y("span", {
1361
+ }), /* @__PURE__ */ J("span", {
1293
1362
  className: "text-white text-xs",
1294
1363
  children: [l, "%"]
1295
1364
  })]
1296
1365
  })]
1297
- }), /* @__PURE__ */ Y("div", {
1366
+ }), /* @__PURE__ */ J("div", {
1298
1367
  className: "flex-1 space-y-1.5",
1299
1368
  children: [
1300
- /* @__PURE__ */ J("input", {
1369
+ /* @__PURE__ */ q("input", {
1301
1370
  type: "url",
1302
1371
  value: n,
1303
1372
  onChange: (e) => r(e.target.value),
1304
1373
  placeholder: "https://...",
1305
1374
  className: "w-full rounded-md border border-border bg-bg-input px-3 py-1.5 text-sm placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-primary/30"
1306
1375
  }),
1307
- /* @__PURE__ */ J("input", {
1376
+ /* @__PURE__ */ q("input", {
1308
1377
  ref: d,
1309
1378
  type: "file",
1310
1379
  accept: a,
@@ -1314,28 +1383,28 @@ var we = [
1314
1383
  t && f(t), e.target.value = "";
1315
1384
  }
1316
1385
  }),
1317
- /* @__PURE__ */ Y("button", {
1386
+ /* @__PURE__ */ J("button", {
1318
1387
  type: "button",
1319
1388
  disabled: c,
1320
1389
  onClick: () => d.current?.click(),
1321
1390
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors disabled:opacity-50",
1322
- children: [/* @__PURE__ */ J(W, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1391
+ children: [/* @__PURE__ */ q(U, { size: 11 }), c ? `Uploading… ${l}%` : "Upload image"]
1323
1392
  }),
1324
- u && /* @__PURE__ */ J("p", {
1393
+ u && /* @__PURE__ */ q("p", {
1325
1394
  className: "text-xs text-status-error-text",
1326
1395
  children: u
1327
1396
  })
1328
1397
  ]
1329
1398
  })]
1330
1399
  }),
1331
- i && /* @__PURE__ */ J("p", {
1400
+ i && /* @__PURE__ */ q("p", {
1332
1401
  className: "text-xs text-text-secondary",
1333
1402
  children: i
1334
1403
  })
1335
1404
  ]
1336
1405
  });
1337
- }, ze = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1338
- let s = N(null), c = j(async (t) => {
1406
+ }, Ve = ({ urls: e, onChange: n, upload: r, uploading: i, progress: a, error: o }) => {
1407
+ let s = j(null), c = k(async (t) => {
1339
1408
  try {
1340
1409
  let i = await r(t);
1341
1410
  n([...e, i.downloadUrl]);
@@ -1347,45 +1416,45 @@ var we = [
1347
1416
  ]), l = (t) => {
1348
1417
  n(e.filter((e, n) => n !== t));
1349
1418
  };
1350
- return /* @__PURE__ */ Y("div", {
1419
+ return /* @__PURE__ */ J("div", {
1351
1420
  className: "space-y-2",
1352
1421
  children: [
1353
- /* @__PURE__ */ J("label", {
1422
+ /* @__PURE__ */ q("label", {
1354
1423
  className: "text-sm font-medium",
1355
1424
  children: "Screenshots"
1356
1425
  }),
1357
- /* @__PURE__ */ Y("div", {
1426
+ /* @__PURE__ */ J("div", {
1358
1427
  className: "flex flex-wrap gap-3",
1359
- children: [e.map((e, t) => /* @__PURE__ */ Y("div", {
1428
+ children: [e.map((e, t) => /* @__PURE__ */ J("div", {
1360
1429
  className: "relative group w-36 aspect-video rounded-lg border border-border overflow-hidden bg-bg-sunken",
1361
- children: [/* @__PURE__ */ J("img", {
1430
+ children: [/* @__PURE__ */ q("img", {
1362
1431
  src: e,
1363
1432
  alt: `Screenshot ${t + 1}`,
1364
1433
  className: "w-full h-full object-cover"
1365
- }), /* @__PURE__ */ J("button", {
1434
+ }), /* @__PURE__ */ q("button", {
1366
1435
  type: "button",
1367
1436
  onClick: () => l(t),
1368
1437
  className: "absolute top-1 right-1 rounded-full bg-black/60 text-white p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
1369
- children: /* @__PURE__ */ J(K, { size: 12 })
1438
+ children: /* @__PURE__ */ q(G, { size: 12 })
1370
1439
  })]
1371
- }, t)), /* @__PURE__ */ J("button", {
1440
+ }, t)), /* @__PURE__ */ q("button", {
1372
1441
  type: "button",
1373
1442
  disabled: i,
1374
1443
  onClick: () => s.current?.click(),
1375
1444
  className: t("w-36 aspect-video rounded-lg border-2 border-dashed border-border flex flex-col items-center justify-center gap-1.5 text-text-secondary hover:border-border-strong hover:bg-bg-sunken transition-colors disabled:opacity-50"),
1376
- children: i ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
1445
+ children: i ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
1377
1446
  size: 18,
1378
1447
  className: "animate-spin text-primary"
1379
- }), /* @__PURE__ */ Y("span", {
1448
+ }), /* @__PURE__ */ J("span", {
1380
1449
  className: "text-xs",
1381
1450
  children: [a, "%"]
1382
- })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, { size: 18 }), /* @__PURE__ */ J("span", {
1451
+ })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, { size: 18 }), /* @__PURE__ */ q("span", {
1383
1452
  className: "text-xs",
1384
1453
  children: "Add screenshot"
1385
1454
  })] })
1386
1455
  })]
1387
1456
  }),
1388
- /* @__PURE__ */ J("input", {
1457
+ /* @__PURE__ */ q("input", {
1389
1458
  ref: s,
1390
1459
  type: "file",
1391
1460
  accept: "image/png,image/jpeg,image/webp,image/gif",
@@ -1395,19 +1464,19 @@ var we = [
1395
1464
  t && c(t), e.target.value = "";
1396
1465
  }
1397
1466
  }),
1398
- o && /* @__PURE__ */ J("p", {
1467
+ o && /* @__PURE__ */ q("p", {
1399
1468
  className: "text-xs text-status-error-text",
1400
1469
  children: o
1401
1470
  })
1402
1471
  ]
1403
1472
  });
1404
- }, Be = new Set(["workflow", "template"]), Ve = [{
1473
+ }, He = new Set(["workflow", "template"]), Ue = [{
1405
1474
  value: "FREE",
1406
1475
  label: "Free"
1407
1476
  }, {
1408
1477
  value: "PAID",
1409
1478
  label: "Paid"
1410
- }], He = [
1479
+ }], We = [
1411
1480
  {
1412
1481
  value: "agent",
1413
1482
  label: "Agent"
@@ -1477,7 +1546,7 @@ var we = [
1477
1546
  label: "Component"
1478
1547
  }
1479
1548
  ];
1480
- function Ue(e) {
1549
+ function Ge(e) {
1481
1550
  let t = e.manifest ?? {}, n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [], o = e.pricingDetails ?? {}, s = Array.isArray(e.screenshots) ? e.screenshots.join("\n") : "";
1482
1551
  return {
1483
1552
  iconUrl: e.iconUrl ?? "",
@@ -1506,33 +1575,33 @@ function Ue(e) {
1506
1575
  manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1507
1576
  };
1508
1577
  }
1509
- var We = X`
1578
+ var Ke = Se`
1510
1579
  query MyPublisherProducts {
1511
1580
  myPublisher { id products { id productId name } }
1512
1581
  }
1513
- `, Ge = X`
1582
+ `, qe = Se`
1514
1583
  mutation UpdateStoreProduct($input: UpdateProductInput!) {
1515
1584
  updateProduct(input: $input) { id name description }
1516
1585
  }
1517
- `, Ke = ({ app: n }) => {
1518
- let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = F(), u = (e, t) => {
1586
+ `, Je = ({ app: n }) => {
1587
+ let { workspacesGatewayUrl: r, authToken: i, workspaceId: a, getWorkspaceToken: o, navigate: s, basePath: c } = e(), { t: l } = N(), u = (e, t) => {
1519
1588
  let n = l(e);
1520
1589
  return n === e ? t : n;
1521
- }, [d, f] = P(() => Ue(n)), [m, g] = P(!1), [v, y] = P(!1), b = N(n);
1590
+ }, [d, f] = M(() => Ge(n)), [p, m] = M(!1), [g, v] = M(!1), b = j(n);
1522
1591
  b.current = n;
1523
- let { data: x } = be(We, { fetchPolicy: "cache-first" }), S = x?.myPublisher?.products.find((e) => e.productId === n.id)?.id ?? null, [ee] = ye(Ge), [w] = h(), [te, { loading: O }] = p();
1524
- ie(() => {
1525
- f(Ue(b.current));
1592
+ let { data: ee } = we(Ke, { fetchPolicy: "cache-first" }), x = ee?.myPublisher?.products.find((e) => e.productId === n.id)?.id ?? null, [S] = Ce(qe), [te] = _(), [ne, { loading: w }] = h();
1593
+ ce(() => {
1594
+ f(Ge(b.current));
1526
1595
  }, [n.id]);
1527
- let k = (e, t) => {
1596
+ let T = (e, t) => {
1528
1597
  f((n) => ({
1529
1598
  ...n,
1530
1599
  [e]: t
1531
1600
  }));
1532
- }, ne = async () => {
1533
- g(!0);
1601
+ }, ie = async () => {
1602
+ m(!0);
1534
1603
  try {
1535
- let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Be.has(d.manifestItemType), i = n.manifest ?? {}, a = {
1604
+ let e = d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), t = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = He.has(d.manifestItemType), i = n.manifest ?? {}, a = {
1536
1605
  manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1537
1606
  itemType: d.manifestItemType || void 0,
1538
1607
  identity: {
@@ -1550,7 +1619,7 @@ var We = X`
1550
1619
  let e = parseFloat(d.price);
1551
1620
  isNaN(e) || (o.price = e), d.currency && (o.currency = d.currency);
1552
1621
  }
1553
- await w({ variables: {
1622
+ await te({ variables: {
1554
1623
  id: n.id,
1555
1624
  input: {
1556
1625
  iconUrl: d.iconUrl || null,
@@ -1569,8 +1638,8 @@ var We = X`
1569
1638
  pricingDetails: Object.keys(o).length > 0 ? o : null,
1570
1639
  manifest: a
1571
1640
  }
1572
- } }), S && await ee({ variables: { input: {
1573
- id: S,
1641
+ } }), x && await S({ variables: { input: {
1642
+ id: x,
1574
1643
  name: n.name,
1575
1644
  description: d.shortDescription || void 0,
1576
1645
  longDescription: d.description || void 0,
@@ -1582,37 +1651,37 @@ var We = X`
1582
1651
  } catch {
1583
1652
  C("error");
1584
1653
  } finally {
1585
- g(!1);
1654
+ m(!1);
1586
1655
  }
1587
- }, re = async () => {
1656
+ }, ae = async () => {
1588
1657
  try {
1589
- await te({ variables: { id: n.id } }), C("success");
1658
+ await ne({ variables: { id: n.id } }), C("success");
1590
1659
  } catch {
1591
1660
  C("error");
1592
1661
  }
1593
- }, M = N(null), oe = N(null), { upload: I, uploading: le, progress: R, error: ue } = A(r, i, a, o), { upload: de, uploading: fe, progress: V, error: pe } = A(r, i, a, o, "/DevPortal/Assets"), { upload: me, uploading: H, progress: G, error: ge } = A(r, i, a, o, "/DevPortal/Assets"), { upload: K, uploading: _e, progress: ve, error: X } = A(r, i, a, o, "/DevPortal/Assets"), xe = j(async (e) => {
1662
+ }, oe = j(null), se = j(null), { upload: A, uploading: P, progress: F, error: de } = O(r, i, a, o), { upload: R, uploading: fe, progress: pe, error: me } = O(r, i, a, o, "/DevPortal/Assets"), { upload: V, uploading: he, progress: ge, error: H } = O(r, i, a, o, "/DevPortal/Assets"), { upload: W, uploading: ye, progress: G, error: be } = O(r, i, a, o, "/DevPortal/Assets"), xe = k(async (e) => {
1594
1663
  let t = e.target.files?.[0];
1595
1664
  if (t) {
1596
1665
  e.target.value = "";
1597
1666
  try {
1598
- let e = await I(t);
1667
+ let e = await A(t);
1599
1668
  f((t) => ({
1600
1669
  ...t,
1601
1670
  manifestRegistryUrl: e.downloadUrl
1602
1671
  }));
1603
1672
  } catch {}
1604
1673
  }
1605
- }, [I]), Se = j(async (e) => {
1606
- e.preventDefault(), y(!1);
1674
+ }, [A]), Se = k(async (e) => {
1675
+ e.preventDefault(), v(!1);
1607
1676
  let t = e.dataTransfer.files?.[0];
1608
1677
  if (t) try {
1609
- let e = await I(t);
1678
+ let e = await A(t);
1610
1679
  f((t) => ({
1611
1680
  ...t,
1612
1681
  manifestRegistryUrl: e.downloadUrl
1613
1682
  }));
1614
1683
  } catch {}
1615
- }, [I]), Ce = j((e) => {
1684
+ }, [A]), Te = k((e) => {
1616
1685
  let t = e.target.files?.[0];
1617
1686
  if (!t) return;
1618
1687
  let n = new FileReader();
@@ -1631,8 +1700,8 @@ var We = X`
1631
1700
  }));
1632
1701
  } catch {}
1633
1702
  }, n.readAsText(t), e.target.value = "";
1634
- }, []), Z = j(() => {
1635
- let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = Be.has(d.manifestItemType), r = {
1703
+ }, []), Y = k(() => {
1704
+ let e = d.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), t = He.has(d.manifestItemType), r = {
1636
1705
  manifestVersion: "1.0",
1637
1706
  itemType: d.manifestItemType || void 0,
1638
1707
  identity: {
@@ -1647,9 +1716,9 @@ var We = X`
1647
1716
  compatibility: { minPlatformVersion: d.manifestMinPlatformVersion }
1648
1717
  }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1649
1718
  o.href = a, o.download = `${n.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1650
- }, [n.slug, d]), we = Be.has(d.manifestItemType), Te = d.manifestInstallType === "builtin", Ee = d.pricingType !== "FREE", De = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1719
+ }, [n.slug, d]), Ee = He.has(d.manifestItemType), De = d.manifestInstallType === "builtin", Oe = d.pricingType !== "FREE", ke = d.manifestRegistryUrl ? d.manifestRegistryUrl.split("/").pop()?.split("?")[0] ?? "" : "";
1651
1720
  n.status;
1652
- let Oe = n.status === "SUBMITTED", ke = n.status === "PUBLISHED", Ae = n.appType === "NODE" || n.appType === "WORKFLOW", je = [
1721
+ let X = n.status === "SUBMITTED", Z = n.status === "PUBLISHED", Ae = n.appType === "NODE" || n.appType === "WORKFLOW", je = [
1653
1722
  {
1654
1723
  label: "Short description",
1655
1724
  done: !!d.shortDescription.trim()
@@ -1671,37 +1740,37 @@ var We = X`
1671
1740
  done: !!d.termsOfServiceUrl.trim()
1672
1741
  }
1673
1742
  ], Me = je.filter((e) => e.done).length, Ne = je.length;
1674
- return /* @__PURE__ */ Y("div", {
1743
+ return /* @__PURE__ */ J("div", {
1675
1744
  className: "space-y-8 max-w-3xl",
1676
1745
  children: [
1677
- /* @__PURE__ */ Y("div", {
1746
+ /* @__PURE__ */ J("div", {
1678
1747
  className: "rounded-lg border border-primary/20 bg-primary/5 px-4 py-3 space-y-2",
1679
- children: [/* @__PURE__ */ J("p", {
1748
+ children: [/* @__PURE__ */ q("p", {
1680
1749
  className: "text-sm font-semibold text-primary",
1681
1750
  children: u("devportal.listingTabPurpose", "What is this tab for?")
1682
- }), /* @__PURE__ */ Y("ul", {
1751
+ }), /* @__PURE__ */ J("ul", {
1683
1752
  className: "text-sm text-muted-foreground space-y-1 list-none pl-0",
1684
1753
  children: [
1685
- /* @__PURE__ */ Y("li", {
1754
+ /* @__PURE__ */ J("li", {
1686
1755
  className: "flex items-start gap-2",
1687
- children: [/* @__PURE__ */ J(U, {
1756
+ children: [/* @__PURE__ */ q(ve, {
1688
1757
  size: 14,
1689
1758
  className: "mt-0.5 shrink-0 text-primary"
1690
- }), /* @__PURE__ */ Y("span", { children: [
1691
- /* @__PURE__ */ J("strong", { children: u("devportal.thisTab", "This tab") }),
1759
+ }), /* @__PURE__ */ J("span", { children: [
1760
+ /* @__PURE__ */ q("strong", { children: u("devportal.thisTab", "This tab") }),
1692
1761
  " ",
1693
1762
  u("devportal.listingTabDesc", "controls your store card — the name, description, icon and screenshots users see in the marketplace. Save changes here any time without creating a new release.")
1694
1763
  ] })]
1695
1764
  }),
1696
- Ae && /* @__PURE__ */ Y("li", {
1765
+ Ae && /* @__PURE__ */ J("li", {
1697
1766
  className: "flex items-start gap-2",
1698
- children: [/* @__PURE__ */ J(se, {
1767
+ children: [/* @__PURE__ */ q(L, {
1699
1768
  size: 14,
1700
1769
  className: "mt-0.5 shrink-0 text-primary"
1701
- }), /* @__PURE__ */ Y("span", { children: [
1770
+ }), /* @__PURE__ */ J("span", { children: [
1702
1771
  u("devportal.versionsTabDesc", "To release a new version (ZIP package + manifest), go to the"),
1703
1772
  " ",
1704
- /* @__PURE__ */ J("button", {
1773
+ /* @__PURE__ */ q("button", {
1705
1774
  type: "button",
1706
1775
  className: "underline text-primary hover:no-underline",
1707
1776
  onClick: () => s?.(`${c}/apps/${n.id}/versions`),
@@ -1710,26 +1779,26 @@ var We = X`
1710
1779
  "."
1711
1780
  ] })]
1712
1781
  }),
1713
- /* @__PURE__ */ Y("li", {
1782
+ /* @__PURE__ */ J("li", {
1714
1783
  className: "flex items-start gap-2",
1715
- children: [/* @__PURE__ */ J(he, {
1784
+ children: [/* @__PURE__ */ q(_e, {
1716
1785
  size: 14,
1717
1786
  className: "mt-0.5 shrink-0 text-primary"
1718
- }), /* @__PURE__ */ J("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
1787
+ }), /* @__PURE__ */ q("span", { children: u("devportal.submitTabDesc", "When your listing is ready, click \"Submit for Review\" to send it to the review team.") })]
1719
1788
  })
1720
1789
  ]
1721
1790
  })]
1722
1791
  }),
1723
- !ke && /* @__PURE__ */ Y("div", {
1792
+ !Z && /* @__PURE__ */ J("div", {
1724
1793
  className: "rounded-lg border bg-card p-4 space-y-3",
1725
- children: [/* @__PURE__ */ Y("div", {
1794
+ children: [/* @__PURE__ */ J("div", {
1726
1795
  className: "flex items-center justify-between",
1727
- children: [/* @__PURE__ */ Y("p", {
1796
+ children: [/* @__PURE__ */ J("p", {
1728
1797
  className: "text-sm font-medium",
1729
1798
  children: [
1730
1799
  u("devportal.listingCompleteness", "Listing completeness"),
1731
1800
  " ",
1732
- /* @__PURE__ */ Y("span", {
1801
+ /* @__PURE__ */ J("span", {
1733
1802
  className: t("ml-1 text-xs font-semibold", Me === Ne ? "text-status-success-text" : "text-status-warning-text"),
1734
1803
  children: [
1735
1804
  Me,
@@ -1738,38 +1807,38 @@ var We = X`
1738
1807
  ]
1739
1808
  })
1740
1809
  ]
1741
- }), Me === Ne && /* @__PURE__ */ Y("span", {
1810
+ }), Me === Ne && /* @__PURE__ */ J("span", {
1742
1811
  className: "text-xs text-status-success-text flex items-center gap-1",
1743
- children: [/* @__PURE__ */ J(L, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
1812
+ children: [/* @__PURE__ */ q(I, { size: 12 }), u("devportal.readyToSubmit", "Ready to submit")]
1744
1813
  })]
1745
- }), /* @__PURE__ */ J("div", {
1814
+ }), /* @__PURE__ */ q("div", {
1746
1815
  className: "grid grid-cols-2 sm:grid-cols-3 gap-2",
1747
- children: je.map((e) => /* @__PURE__ */ Y("div", {
1816
+ children: je.map((e) => /* @__PURE__ */ J("div", {
1748
1817
  className: "flex items-center gap-1.5 text-xs",
1749
- children: [e.done ? /* @__PURE__ */ J(L, {
1818
+ children: [e.done ? /* @__PURE__ */ q(I, {
1750
1819
  size: 12,
1751
1820
  className: "text-status-success-text shrink-0"
1752
- }) : /* @__PURE__ */ J(ae, {
1821
+ }) : /* @__PURE__ */ q(le, {
1753
1822
  size: 12,
1754
1823
  className: "text-status-warning-text shrink-0"
1755
- }), /* @__PURE__ */ J("span", {
1824
+ }), /* @__PURE__ */ q("span", {
1756
1825
  className: e.done ? "text-foreground" : "text-muted-foreground",
1757
1826
  children: e.label
1758
1827
  })]
1759
1828
  }, e.label))
1760
1829
  })]
1761
1830
  }),
1762
- ke ? /* @__PURE__ */ Y("div", {
1831
+ Z ? /* @__PURE__ */ J("div", {
1763
1832
  className: "flex items-start gap-3 rounded-lg border border-success/30 bg-success/10 px-4 py-3",
1764
- children: [/* @__PURE__ */ J(L, {
1833
+ children: [/* @__PURE__ */ q(I, {
1765
1834
  size: 16,
1766
1835
  className: "text-success mt-0.5 shrink-0"
1767
- }), /* @__PURE__ */ Y("div", {
1836
+ }), /* @__PURE__ */ J("div", {
1768
1837
  className: "text-sm",
1769
- children: [/* @__PURE__ */ J("span", {
1838
+ children: [/* @__PURE__ */ q("span", {
1770
1839
  className: "font-medium text-success",
1771
1840
  children: u("devportal.storeListing.published", "Published")
1772
- }), n.publishedAt && /* @__PURE__ */ Y("span", {
1841
+ }), n.publishedAt && /* @__PURE__ */ J("span", {
1773
1842
  className: "text-muted-foreground ml-2",
1774
1843
  children: [
1775
1844
  u("devportal.storeListing.since", "since"),
@@ -1778,234 +1847,234 @@ var We = X`
1778
1847
  ]
1779
1848
  })]
1780
1849
  })]
1781
- }) : Oe ? /* @__PURE__ */ Y("div", {
1850
+ }) : X ? /* @__PURE__ */ J("div", {
1782
1851
  className: "flex items-start gap-3 rounded-lg border border-primary/30 bg-primary/5 px-4 py-3",
1783
- children: [/* @__PURE__ */ J(se, {
1852
+ children: [/* @__PURE__ */ q(L, {
1784
1853
  size: 16,
1785
1854
  className: "text-primary mt-0.5 shrink-0"
1786
- }), /* @__PURE__ */ Y("div", {
1855
+ }), /* @__PURE__ */ J("div", {
1787
1856
  className: "text-sm",
1788
1857
  children: [
1789
- /* @__PURE__ */ J("span", {
1858
+ /* @__PURE__ */ q("span", {
1790
1859
  className: "font-medium text-primary",
1791
1860
  children: u("devportal.storeListing.underReview", "Submitted for review")
1792
1861
  }),
1793
- n.submittedAt && /* @__PURE__ */ J("span", {
1862
+ n.submittedAt && /* @__PURE__ */ q("span", {
1794
1863
  className: "text-muted-foreground ml-2",
1795
1864
  children: new Date(n.submittedAt).toLocaleDateString()
1796
1865
  }),
1797
- n.reviewStatus && /* @__PURE__ */ Y("span", {
1866
+ n.reviewStatus && /* @__PURE__ */ J("span", {
1798
1867
  className: "text-muted-foreground ml-2",
1799
1868
  children: ["· ", n.reviewStatus]
1800
1869
  })
1801
1870
  ]
1802
1871
  })]
1803
- }) : /* @__PURE__ */ Y("div", {
1872
+ }) : /* @__PURE__ */ J("div", {
1804
1873
  className: "flex items-start gap-3 rounded-lg border border-warning/30 bg-warning/5 px-4 py-3",
1805
- children: [/* @__PURE__ */ J(ae, {
1874
+ children: [/* @__PURE__ */ q(le, {
1806
1875
  size: 16,
1807
1876
  className: "text-warning mt-0.5 shrink-0"
1808
- }), /* @__PURE__ */ Y("div", {
1877
+ }), /* @__PURE__ */ J("div", {
1809
1878
  className: "text-sm",
1810
- children: [/* @__PURE__ */ J("span", {
1879
+ children: [/* @__PURE__ */ q("span", {
1811
1880
  className: "font-medium text-warning",
1812
1881
  children: u("devportal.storeListing.draft", "Draft")
1813
- }), /* @__PURE__ */ J("span", {
1882
+ }), /* @__PURE__ */ q("span", {
1814
1883
  className: "text-muted-foreground ml-2",
1815
1884
  children: u("devportal.storeListing.draftHint", "Complete your store listing and submit for review to publish.")
1816
1885
  })]
1817
1886
  })]
1818
1887
  }),
1819
- Ae ? /* @__PURE__ */ Y("div", {
1888
+ Ae ? /* @__PURE__ */ J("div", {
1820
1889
  className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-4 flex items-start gap-3",
1821
- children: [/* @__PURE__ */ J(z, {
1890
+ children: [/* @__PURE__ */ q(z, {
1822
1891
  size: 16,
1823
1892
  className: "shrink-0 mt-0.5 text-muted-foreground"
1824
- }), /* @__PURE__ */ Y("div", {
1893
+ }), /* @__PURE__ */ J("div", {
1825
1894
  className: "text-sm space-y-1",
1826
- children: [/* @__PURE__ */ J("p", {
1895
+ children: [/* @__PURE__ */ q("p", {
1827
1896
  className: "font-medium",
1828
1897
  children: u("devportal.packageManagedInVersions", "ZIP package & manifest are managed in Versions")
1829
- }), /* @__PURE__ */ J("p", {
1898
+ }), /* @__PURE__ */ q("p", {
1830
1899
  className: "text-muted-foreground",
1831
1900
  children: u("devportal.packageManagedInVersionsDesc", "For NODE and WORKFLOW types, each release is uploaded through the Versions page — including the ZIP archive and manifest.json. This keeps your code releases separate from your store card.")
1832
1901
  })]
1833
1902
  })]
1834
- }) : /* @__PURE__ */ J(_, {
1903
+ }) : /* @__PURE__ */ q(y, {
1835
1904
  title: u("devportal.package", "Package"),
1836
1905
  description: u("devportal.packageDescription", "Technical configuration — how FluidGrid installs and runs this item"),
1837
- children: /* @__PURE__ */ Y("div", {
1906
+ children: /* @__PURE__ */ J("div", {
1838
1907
  className: "space-y-6",
1839
1908
  children: [
1840
- /* @__PURE__ */ J(E, {
1909
+ /* @__PURE__ */ q(D, {
1841
1910
  label: u("devportal.storeItemType", "Item Type"),
1842
1911
  value: d.manifestItemType,
1843
1912
  onChange: (e) => {
1844
1913
  let t = e.target.value;
1845
- k("manifestItemType", t), Be.has(t) ? k("manifestInstallType", "json") : d.manifestInstallType === "json" && k("manifestInstallType", "zip");
1914
+ T("manifestItemType", t), He.has(t) ? T("manifestInstallType", "json") : d.manifestInstallType === "json" && T("manifestInstallType", "zip");
1846
1915
  },
1847
- options: He,
1916
+ options: We,
1848
1917
  placeholder: u("devportal.selectItemType", "Select item type…"),
1849
1918
  hint: u("devportal.storeItemTypeHint", "Determines how this item is categorised and how the platform runs it")
1850
1919
  }),
1851
- /* @__PURE__ */ Y("div", {
1920
+ /* @__PURE__ */ J("div", {
1852
1921
  className: "grid gap-4 sm:grid-cols-2",
1853
- children: [/* @__PURE__ */ J(T, {
1922
+ children: [/* @__PURE__ */ q(E, {
1854
1923
  label: u("devportal.manifestDisplayName", "Display Name"),
1855
1924
  value: d.manifestDisplayName,
1856
- onChange: (e) => k("manifestDisplayName", e.target.value),
1925
+ onChange: (e) => T("manifestDisplayName", e.target.value),
1857
1926
  placeholder: "My Awesome Node"
1858
- }), /* @__PURE__ */ J(T, {
1927
+ }), /* @__PURE__ */ q(E, {
1859
1928
  label: u("devportal.manifestVersion", "Version"),
1860
1929
  value: d.manifestVersion,
1861
- onChange: (e) => k("manifestVersion", e.target.value),
1930
+ onChange: (e) => T("manifestVersion", e.target.value),
1862
1931
  placeholder: "1.0.0",
1863
1932
  hint: u("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1864
1933
  })]
1865
1934
  }),
1866
- we && /* @__PURE__ */ J(D, {
1935
+ Ee && /* @__PURE__ */ q(re, {
1867
1936
  label: u("devportal.jsonContent", d.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1868
1937
  value: d.manifestJsonContent,
1869
- onChange: (e) => k("manifestJsonContent", e.target.value),
1938
+ onChange: (e) => T("manifestJsonContent", e.target.value),
1870
1939
  rows: 12,
1871
1940
  placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1872
1941
  hint: u("devportal.jsonContentHint", "Paste the full JSON definition. Stored and applied directly — no zip needed.")
1873
1942
  }),
1874
- !we && /* @__PURE__ */ Y("div", {
1943
+ !Ee && /* @__PURE__ */ J("div", {
1875
1944
  className: "space-y-3",
1876
1945
  children: [
1877
- /* @__PURE__ */ Y("div", {
1946
+ /* @__PURE__ */ J("div", {
1878
1947
  className: "flex items-center justify-between flex-wrap gap-2",
1879
- children: [/* @__PURE__ */ J("label", {
1948
+ children: [/* @__PURE__ */ q("label", {
1880
1949
  className: "text-sm font-medium",
1881
1950
  children: u("devportal.packageFile", "Package File")
1882
- }), /* @__PURE__ */ Y("label", {
1951
+ }), /* @__PURE__ */ J("label", {
1883
1952
  className: "flex items-center gap-2 text-sm cursor-pointer select-none",
1884
- children: [/* @__PURE__ */ J("input", {
1953
+ children: [/* @__PURE__ */ q("input", {
1885
1954
  type: "checkbox",
1886
- checked: Te,
1887
- onChange: (e) => k("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1955
+ checked: De,
1956
+ onChange: (e) => T("manifestInstallType", e.target.checked ? "builtin" : "zip"),
1888
1957
  className: "h-4 w-4 rounded border-border accent-primary"
1889
- }), /* @__PURE__ */ J("span", {
1958
+ }), /* @__PURE__ */ q("span", {
1890
1959
  className: "text-text-secondary",
1891
1960
  children: u("devportal.builtinToggle", "Built-in (pre-installed, no upload needed)")
1892
1961
  })]
1893
1962
  })]
1894
1963
  }),
1895
- !Te && /* @__PURE__ */ Y(q, { children: [
1896
- /* @__PURE__ */ Y("div", {
1964
+ !De && /* @__PURE__ */ J(K, { children: [
1965
+ /* @__PURE__ */ J("div", {
1897
1966
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1898
- children: [/* @__PURE__ */ J(z, {
1967
+ children: [/* @__PURE__ */ q(z, {
1899
1968
  size: 15,
1900
1969
  className: "mt-0.5 shrink-0"
1901
- }), /* @__PURE__ */ Y("span", { children: [
1970
+ }), /* @__PURE__ */ J("span", { children: [
1902
1971
  u("devportal.zipModelHint", "Package your code and a "),
1903
- /* @__PURE__ */ J("code", {
1972
+ /* @__PURE__ */ q("code", {
1904
1973
  className: "rounded bg-muted px-1 py-0.5 font-mono text-xs",
1905
1974
  children: "manifest.json"
1906
1975
  }),
1907
1976
  u("devportal.zipModelHint2", " into a single zip — like a Chrome extension. Upload it below and FluidGrid handles the rest automatically.")
1908
1977
  ] })]
1909
1978
  }),
1910
- /* @__PURE__ */ Y("div", {
1979
+ /* @__PURE__ */ J("div", {
1911
1980
  onDragOver: (e) => {
1912
- e.preventDefault(), y(!0);
1981
+ e.preventDefault(), v(!0);
1913
1982
  },
1914
- onDragLeave: () => y(!1),
1983
+ onDragLeave: () => v(!1),
1915
1984
  onDrop: (e) => void Se(e),
1916
- onClick: () => !le && oe.current?.click(),
1917
- className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", v ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", le && "pointer-events-none opacity-75"),
1918
- children: [/* @__PURE__ */ J("input", {
1919
- ref: oe,
1985
+ onClick: () => !P && se.current?.click(),
1986
+ className: t("relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed px-6 py-10 text-center transition-colors cursor-pointer", g ? "border-primary bg-primary/5" : "border-border hover:border-border-strong hover:bg-bg-sunken", P && "pointer-events-none opacity-75"),
1987
+ children: [/* @__PURE__ */ q("input", {
1988
+ ref: se,
1920
1989
  type: "file",
1921
1990
  accept: ".zip,application/zip,application/x-zip-compressed",
1922
1991
  className: "hidden",
1923
1992
  onChange: (e) => void xe(e)
1924
- }), le ? /* @__PURE__ */ Y(q, { children: [
1925
- /* @__PURE__ */ J(B, {
1993
+ }), P ? /* @__PURE__ */ J(K, { children: [
1994
+ /* @__PURE__ */ q(B, {
1926
1995
  size: 28,
1927
1996
  className: "animate-spin text-primary"
1928
1997
  }),
1929
- /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ Y("p", {
1998
+ /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J("p", {
1930
1999
  className: "text-sm font-medium",
1931
2000
  children: [
1932
2001
  u("devportal.uploading", "Uploading…"),
1933
2002
  " ",
1934
- R,
2003
+ F,
1935
2004
  "%"
1936
2005
  ]
1937
- }), /* @__PURE__ */ J("p", {
2006
+ }), /* @__PURE__ */ q("p", {
1938
2007
  className: "text-xs text-text-secondary mt-0.5",
1939
2008
  children: u("devportal.uploadingHint", "Stored securely in your workspace")
1940
2009
  })] }),
1941
- /* @__PURE__ */ J("div", {
2010
+ /* @__PURE__ */ q("div", {
1942
2011
  className: "w-48 h-1.5 rounded-full bg-muted overflow-hidden",
1943
- children: /* @__PURE__ */ J("div", {
2012
+ children: /* @__PURE__ */ q("div", {
1944
2013
  className: "h-full bg-primary transition-all",
1945
- style: { width: `${R}%` }
2014
+ style: { width: `${F}%` }
1946
2015
  })
1947
2016
  })
1948
- ] }) : De ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(L, {
2017
+ ] }) : ke ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(I, {
1949
2018
  size: 28,
1950
2019
  className: "text-status-success-text"
1951
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
2020
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1952
2021
  className: "text-sm font-medium",
1953
- children: De
1954
- }), /* @__PURE__ */ J("p", {
2022
+ children: ke
2023
+ }), /* @__PURE__ */ q("p", {
1955
2024
  className: "text-xs text-text-secondary mt-0.5",
1956
2025
  children: u("devportal.clickToReplace", "Click or drag to replace")
1957
- })] })] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(W, {
2026
+ })] })] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(U, {
1958
2027
  size: 28,
1959
2028
  className: "text-text-secondary"
1960
- }), /* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("p", {
2029
+ }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
1961
2030
  className: "text-sm font-medium",
1962
2031
  children: u("devportal.dropZipHere", "Drop your .zip here")
1963
- }), /* @__PURE__ */ J("p", {
2032
+ }), /* @__PURE__ */ q("p", {
1964
2033
  className: "text-xs text-text-secondary mt-0.5",
1965
2034
  children: u("devportal.orClickToBrowse", "or click to browse")
1966
2035
  })] })] })]
1967
2036
  }),
1968
- ue && /* @__PURE__ */ J("p", {
2037
+ de && /* @__PURE__ */ q("p", {
1969
2038
  className: "text-xs text-status-error-text",
1970
- children: ue
2039
+ children: de
1971
2040
  })
1972
2041
  ] }),
1973
- Te && /* @__PURE__ */ Y("div", {
2042
+ De && /* @__PURE__ */ J("div", {
1974
2043
  className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-3 text-sm text-text-secondary",
1975
- children: [/* @__PURE__ */ J(z, {
2044
+ children: [/* @__PURE__ */ q(z, {
1976
2045
  size: 15,
1977
2046
  className: "mt-0.5 shrink-0"
1978
- }), /* @__PURE__ */ J("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
2047
+ }), /* @__PURE__ */ q("span", { children: u("devportal.builtinHint", "Built-in items are pre-installed by the platform. No package upload is needed.") })]
1979
2048
  })
1980
2049
  ]
1981
2050
  }),
1982
- /* @__PURE__ */ Y("div", {
2051
+ /* @__PURE__ */ J("div", {
1983
2052
  className: "flex flex-wrap items-center gap-2 border-t pt-4",
1984
2053
  children: [
1985
- /* @__PURE__ */ J("input", {
1986
- ref: M,
2054
+ /* @__PURE__ */ q("input", {
2055
+ ref: oe,
1987
2056
  type: "file",
1988
2057
  accept: ".json,application/json",
1989
2058
  className: "hidden",
1990
- onChange: Ce
2059
+ onChange: Te
1991
2060
  }),
1992
- /* @__PURE__ */ J("span", {
2061
+ /* @__PURE__ */ q("span", {
1993
2062
  className: "text-xs text-text-secondary mr-1",
1994
2063
  children: "manifest.json:"
1995
2064
  }),
1996
- /* @__PURE__ */ Y("button", {
2065
+ /* @__PURE__ */ J("button", {
1997
2066
  type: "button",
1998
- onClick: () => M.current?.click(),
2067
+ onClick: () => oe.current?.click(),
1999
2068
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
2000
- children: [/* @__PURE__ */ J(W, { size: 12 }), u("devportal.importManifest", "Import")]
2069
+ children: [/* @__PURE__ */ q(U, { size: 12 }), u("devportal.importManifest", "Import")]
2001
2070
  }),
2002
- /* @__PURE__ */ Y("button", {
2071
+ /* @__PURE__ */ J("button", {
2003
2072
  type: "button",
2004
- onClick: Z,
2073
+ onClick: Y,
2005
2074
  className: "inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs font-medium hover:bg-muted transition-colors",
2006
- children: [/* @__PURE__ */ J(ce, { size: 12 }), u("devportal.exportManifest", "Export")]
2075
+ children: [/* @__PURE__ */ q(ue, { size: 12 }), u("devportal.exportManifest", "Export")]
2007
2076
  }),
2008
- /* @__PURE__ */ J("span", {
2077
+ /* @__PURE__ */ q("span", {
2009
2078
  className: "text-xs text-text-secondary",
2010
2079
  children: u("devportal.manifestTip", "— export to get a manifest.json to include inside your zip")
2011
2080
  })
@@ -2014,194 +2083,194 @@ var We = X`
2014
2083
  ]
2015
2084
  })
2016
2085
  }),
2017
- /* @__PURE__ */ J(_, {
2086
+ /* @__PURE__ */ q(y, {
2018
2087
  title: u("devportal.storePresentation", "Store Presence"),
2019
2088
  description: u("devportal.storePresentationDescription", "Visual assets and copy shown to users browsing the marketplace"),
2020
- children: /* @__PURE__ */ Y("div", {
2089
+ children: /* @__PURE__ */ J("div", {
2021
2090
  className: "space-y-5",
2022
2091
  children: [
2023
- /* @__PURE__ */ Y("div", {
2092
+ /* @__PURE__ */ J("div", {
2024
2093
  className: "grid gap-5 sm:grid-cols-2",
2025
- children: [/* @__PURE__ */ J(Re, {
2094
+ children: [/* @__PURE__ */ q(Be, {
2026
2095
  label: u("devportal.iconUrl", "Icon"),
2027
2096
  value: d.iconUrl,
2028
- onChange: (e) => k("iconUrl", e),
2097
+ onChange: (e) => T("iconUrl", e),
2029
2098
  hint: u("devportal.iconUrlHint", "Square, 256×256 px recommended"),
2030
2099
  aspectClass: "aspect-square",
2031
- upload: de,
2100
+ upload: R,
2032
2101
  uploading: fe,
2033
- progress: V,
2034
- error: pe
2035
- }), /* @__PURE__ */ J(Re, {
2102
+ progress: pe,
2103
+ error: me
2104
+ }), /* @__PURE__ */ q(Be, {
2036
2105
  label: u("devportal.bannerUrl", "Banner"),
2037
2106
  value: d.bannerUrl,
2038
- onChange: (e) => k("bannerUrl", e),
2107
+ onChange: (e) => T("bannerUrl", e),
2039
2108
  hint: u("devportal.bannerUrlHint", "1280×640 px recommended"),
2040
2109
  aspectClass: "aspect-video",
2041
- upload: me,
2042
- uploading: H,
2043
- progress: G,
2044
- error: ge
2110
+ upload: V,
2111
+ uploading: he,
2112
+ progress: ge,
2113
+ error: H
2045
2114
  })]
2046
2115
  }),
2047
- /* @__PURE__ */ J(T, {
2116
+ /* @__PURE__ */ q(E, {
2048
2117
  label: u("devportal.videoUrl", "Demo Video URL"),
2049
2118
  value: d.videoUrl,
2050
- onChange: (e) => k("videoUrl", e.target.value),
2119
+ onChange: (e) => T("videoUrl", e.target.value),
2051
2120
  placeholder: "https://...",
2052
2121
  hint: u("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
2053
2122
  }),
2054
- /* @__PURE__ */ J(D, {
2123
+ /* @__PURE__ */ q(re, {
2055
2124
  label: u("devportal.shortDescription", "Short Description"),
2056
2125
  value: d.shortDescription,
2057
- onChange: (e) => k("shortDescription", e.target.value),
2126
+ onChange: (e) => T("shortDescription", e.target.value),
2058
2127
  maxLength: 200,
2059
2128
  rows: 2,
2060
2129
  hint: `${d.shortDescription.length}/200 · ${u("devportal.shortDescHint", "Shown in search results and cards")}`
2061
2130
  }),
2062
- /* @__PURE__ */ J(D, {
2131
+ /* @__PURE__ */ q(re, {
2063
2132
  label: u("devportal.longDescription", "Full Description"),
2064
2133
  value: d.description,
2065
- onChange: (e) => k("description", e.target.value),
2134
+ onChange: (e) => T("description", e.target.value),
2066
2135
  rows: 5,
2067
2136
  hint: u("devportal.fullDescHint", "Markdown supported")
2068
2137
  }),
2069
- /* @__PURE__ */ J(ze, {
2138
+ /* @__PURE__ */ q(Ve, {
2070
2139
  urls: d.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean),
2071
- onChange: (e) => k("screenshotsText", e.join("\n")),
2072
- upload: K,
2073
- uploading: _e,
2074
- progress: ve,
2075
- error: X
2140
+ onChange: (e) => T("screenshotsText", e.join("\n")),
2141
+ upload: W,
2142
+ uploading: ye,
2143
+ progress: G,
2144
+ error: be
2076
2145
  })
2077
2146
  ]
2078
2147
  })
2079
2148
  }),
2080
- /* @__PURE__ */ J(_, {
2149
+ /* @__PURE__ */ q(y, {
2081
2150
  title: u("devportal.linksPolicies", "Links & Policies"),
2082
2151
  description: u("devportal.linksPoliciesDescription", "External resources and legal documents — privacy policy and terms are required for store submission"),
2083
- children: /* @__PURE__ */ Y("div", {
2152
+ children: /* @__PURE__ */ J("div", {
2084
2153
  className: "grid gap-4 sm:grid-cols-2",
2085
2154
  children: [
2086
- /* @__PURE__ */ J(T, {
2155
+ /* @__PURE__ */ q(E, {
2087
2156
  label: u("devportal.websiteUrl", "Website"),
2088
2157
  value: d.websiteUrl,
2089
- onChange: (e) => k("websiteUrl", e.target.value),
2158
+ onChange: (e) => T("websiteUrl", e.target.value),
2090
2159
  placeholder: "https://..."
2091
2160
  }),
2092
- /* @__PURE__ */ J(T, {
2161
+ /* @__PURE__ */ q(E, {
2093
2162
  label: u("devportal.documentationUrl", "Documentation"),
2094
2163
  value: d.documentationUrl,
2095
- onChange: (e) => k("documentationUrl", e.target.value),
2164
+ onChange: (e) => T("documentationUrl", e.target.value),
2096
2165
  placeholder: "https://..."
2097
2166
  }),
2098
- /* @__PURE__ */ J(T, {
2167
+ /* @__PURE__ */ q(E, {
2099
2168
  label: u("devportal.githubUrl", "GitHub"),
2100
2169
  value: d.githubUrl,
2101
- onChange: (e) => k("githubUrl", e.target.value),
2170
+ onChange: (e) => T("githubUrl", e.target.value),
2102
2171
  placeholder: "https://github.com/..."
2103
2172
  }),
2104
- /* @__PURE__ */ J(T, {
2173
+ /* @__PURE__ */ q(E, {
2105
2174
  label: u("devportal.supportUrl", "Support"),
2106
2175
  value: d.supportUrl,
2107
- onChange: (e) => k("supportUrl", e.target.value),
2176
+ onChange: (e) => T("supportUrl", e.target.value),
2108
2177
  placeholder: "https://..."
2109
2178
  }),
2110
- /* @__PURE__ */ J(T, {
2179
+ /* @__PURE__ */ q(E, {
2111
2180
  label: `${u("devportal.privacyPolicyUrl", "Privacy Policy")} *`,
2112
2181
  value: d.privacyPolicyUrl,
2113
- onChange: (e) => k("privacyPolicyUrl", e.target.value),
2182
+ onChange: (e) => T("privacyPolicyUrl", e.target.value),
2114
2183
  placeholder: "https://...",
2115
2184
  hint: u("devportal.requiredForStore", "Required for store submission")
2116
2185
  }),
2117
- /* @__PURE__ */ J(T, {
2186
+ /* @__PURE__ */ q(E, {
2118
2187
  label: `${u("devportal.termsOfServiceUrl", "Terms of Service")} *`,
2119
2188
  value: d.termsOfServiceUrl,
2120
- onChange: (e) => k("termsOfServiceUrl", e.target.value),
2189
+ onChange: (e) => T("termsOfServiceUrl", e.target.value),
2121
2190
  placeholder: "https://...",
2122
2191
  hint: u("devportal.requiredForStore", "Required for store submission")
2123
2192
  })
2124
2193
  ]
2125
2194
  })
2126
2195
  }),
2127
- /* @__PURE__ */ J(_, {
2196
+ /* @__PURE__ */ q(y, {
2128
2197
  title: u("devportal.pricing", "Pricing"),
2129
2198
  description: u("devportal.pricingDescription", "How this item is priced in the marketplace"),
2130
- children: /* @__PURE__ */ Y("div", {
2199
+ children: /* @__PURE__ */ J("div", {
2131
2200
  className: "space-y-4",
2132
- children: [/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J("label", {
2201
+ children: [/* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("label", {
2133
2202
  className: "mb-2 block text-sm font-medium",
2134
2203
  children: u("devportal.pricingType", "Pricing Type")
2135
- }), /* @__PURE__ */ J("div", {
2204
+ }), /* @__PURE__ */ q("div", {
2136
2205
  className: "flex flex-wrap gap-2",
2137
- children: Ve.map((e) => /* @__PURE__ */ J("button", {
2206
+ children: Ue.map((e) => /* @__PURE__ */ q("button", {
2138
2207
  type: "button",
2139
- onClick: () => k("pricingType", e.value),
2208
+ onClick: () => T("pricingType", e.value),
2140
2209
  className: t("rounded-md border px-3 py-1.5 text-sm font-medium transition-colors", d.pricingType === e.value ? "bg-primary text-primary-foreground border-primary" : "hover:bg-muted"),
2141
2210
  children: e.label
2142
2211
  }, e.value))
2143
- })] }), Ee && /* @__PURE__ */ Y("div", {
2212
+ })] }), Oe && /* @__PURE__ */ J("div", {
2144
2213
  className: "grid gap-4 sm:grid-cols-2",
2145
- children: [/* @__PURE__ */ J(T, {
2214
+ children: [/* @__PURE__ */ q(E, {
2146
2215
  label: u("devportal.price", "Price"),
2147
2216
  type: "number",
2148
2217
  value: d.price,
2149
- onChange: (e) => k("price", e.target.value),
2218
+ onChange: (e) => T("price", e.target.value),
2150
2219
  placeholder: "0.00"
2151
- }), /* @__PURE__ */ J(T, {
2220
+ }), /* @__PURE__ */ q(E, {
2152
2221
  label: u("devportal.currency", "Currency"),
2153
2222
  value: d.currency,
2154
- onChange: (e) => k("currency", e.target.value),
2223
+ onChange: (e) => T("currency", e.target.value),
2155
2224
  placeholder: "USD"
2156
2225
  })]
2157
2226
  })]
2158
2227
  })
2159
2228
  }),
2160
- /* @__PURE__ */ Y("div", {
2229
+ /* @__PURE__ */ J("div", {
2161
2230
  className: "border-t pt-6 flex items-center gap-3 flex-wrap",
2162
2231
  children: [
2163
- /* @__PURE__ */ J("button", {
2232
+ /* @__PURE__ */ q("button", {
2164
2233
  type: "button",
2165
- onClick: ne,
2166
- disabled: m,
2234
+ onClick: ie,
2235
+ disabled: p,
2167
2236
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2168
- children: m ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
2237
+ children: p ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
2169
2238
  size: 16,
2170
2239
  className: "animate-spin"
2171
- }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(U, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
2240
+ }), u("devportal.saving", "Saving…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ve, { size: 16 }), u("devportal.saveMarketplaceListing", "Save Marketplace Listing")] })
2172
2241
  }),
2173
- !ke && !Oe && /* @__PURE__ */ J("button", {
2242
+ !Z && !X && /* @__PURE__ */ q("button", {
2174
2243
  type: "button",
2175
- onClick: () => void re(),
2176
- disabled: O || m,
2244
+ onClick: () => void ae(),
2245
+ disabled: w || p,
2177
2246
  className: "inline-flex items-center gap-2 rounded-md border border-primary px-4 py-2 text-sm font-medium text-primary hover:bg-primary/5 transition-colors disabled:opacity-50",
2178
- children: O ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(B, {
2247
+ children: w ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(B, {
2179
2248
  size: 16,
2180
2249
  className: "animate-spin"
2181
- }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(he, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
2250
+ }), u("devportal.submitting", "Submitting…")] }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(_e, { size: 16 }), u("devportal.submitForReview", "Submit for Review")] })
2182
2251
  }),
2183
- !ke && Oe && /* @__PURE__ */ Y("p", {
2252
+ !Z && X && /* @__PURE__ */ J("p", {
2184
2253
  className: "text-xs text-muted-foreground flex items-center gap-1.5",
2185
- children: [/* @__PURE__ */ J(se, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
2254
+ children: [/* @__PURE__ */ q(L, { size: 12 }), u("devportal.awaitingReview", "Your listing is under review. You can still update and save — changes take effect after approval.")]
2186
2255
  })
2187
2256
  ]
2188
2257
  })
2189
2258
  ]
2190
2259
  });
2191
2260
  }, Q = ({ label: e, value: n, trend: r }) => {
2192
- let { t: i } = F();
2193
- return /* @__PURE__ */ Y("div", {
2261
+ let { t: i } = N();
2262
+ return /* @__PURE__ */ J("div", {
2194
2263
  className: "rounded-lg border bg-card p-4",
2195
2264
  children: [
2196
- /* @__PURE__ */ J("p", {
2265
+ /* @__PURE__ */ q("p", {
2197
2266
  className: "text-sm text-muted-foreground",
2198
2267
  children: e
2199
2268
  }),
2200
- /* @__PURE__ */ J("p", {
2269
+ /* @__PURE__ */ q("p", {
2201
2270
  className: "text-2xl font-bold",
2202
2271
  children: n
2203
2272
  }),
2204
- r !== void 0 && /* @__PURE__ */ Y("p", {
2273
+ r !== void 0 && /* @__PURE__ */ J("p", {
2205
2274
  className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
2206
2275
  children: [
2207
2276
  r > 0 ? "+" : "",
@@ -2215,13 +2284,13 @@ var We = X`
2215
2284
  })
2216
2285
  ]
2217
2286
  });
2218
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ Y("a", {
2287
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ J("a", {
2219
2288
  href: t,
2220
2289
  target: "_blank",
2221
2290
  rel: "noopener noreferrer",
2222
2291
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
2223
- children: [/* @__PURE__ */ J(R, { size: 14 }), e]
2224
- }), qe = [
2292
+ children: [/* @__PURE__ */ q(R, { size: 14 }), e]
2293
+ }), Ye = [
2225
2294
  {
2226
2295
  id: "auth",
2227
2296
  label: "Authentication",
@@ -2293,14 +2362,14 @@ var We = X`
2293
2362
  description: "Access control configuration"
2294
2363
  }
2295
2364
  ];
2296
- function Je(e) {
2297
- let t = Object.fromEntries(qe.map((e) => [e.id, "none"]));
2365
+ function Xe(e) {
2366
+ let t = Object.fromEntries(Ye.map((e) => [e.id, "none"]));
2298
2367
  if (!e || !Array.isArray(e.permissions)) return t;
2299
2368
  for (let n of e.permissions) n.resource in t && (t[n.resource] = n.level === "write" ? "write" : "read");
2300
2369
  return t;
2301
2370
  }
2302
- var Ye = ({ app: e }) => {
2303
- let t = e.manifest ?? {}, [n, r] = P(() => Je(t)), [i, a] = P(!1), [o, s] = P(!1), [c] = h(), l = (e, t) => {
2371
+ var Ze = ({ app: e }) => {
2372
+ let t = e.manifest ?? {}, [n, r] = M(() => Xe(t)), [i, a] = M(!1), [o, s] = M(!1), [c] = _(), l = (e, t) => {
2304
2373
  s(!1), r((n) => ({
2305
2374
  ...n,
2306
2375
  [e]: t
@@ -2331,41 +2400,41 @@ var Ye = ({ app: e }) => {
2331
2400
  "read",
2332
2401
  "write"
2333
2402
  ];
2334
- return /* @__PURE__ */ J(_, {
2403
+ return /* @__PURE__ */ q(y, {
2335
2404
  title: "Permissions",
2336
2405
  description: "Define what platform data this app can request access to. Users see these when authorizing the app.",
2337
- children: /* @__PURE__ */ Y("div", {
2406
+ children: /* @__PURE__ */ J("div", {
2338
2407
  className: "space-y-4",
2339
2408
  children: [
2340
- /* @__PURE__ */ J("div", {
2409
+ /* @__PURE__ */ q("div", {
2341
2410
  className: "overflow-x-auto rounded-lg border border-border",
2342
- children: /* @__PURE__ */ Y("table", {
2411
+ children: /* @__PURE__ */ J("table", {
2343
2412
  className: "w-full text-sm",
2344
- children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", {
2413
+ children: [/* @__PURE__ */ q("thead", { children: /* @__PURE__ */ J("tr", {
2345
2414
  className: "border-b border-border bg-muted/50",
2346
- children: [/* @__PURE__ */ J("th", {
2415
+ children: [/* @__PURE__ */ q("th", {
2347
2416
  className: "px-4 py-3 text-left font-medium text-muted-foreground w-1/2",
2348
2417
  children: "Resource"
2349
- }), f.map((e) => /* @__PURE__ */ J("th", {
2418
+ }), f.map((e) => /* @__PURE__ */ q("th", {
2350
2419
  className: "px-4 py-3 text-center font-medium text-muted-foreground",
2351
2420
  children: d[e]
2352
2421
  }, e))]
2353
- }) }), /* @__PURE__ */ J("tbody", {
2422
+ }) }), /* @__PURE__ */ q("tbody", {
2354
2423
  className: "divide-y divide-border",
2355
- children: qe.map((e) => /* @__PURE__ */ Y("tr", {
2424
+ children: Ye.map((e) => /* @__PURE__ */ J("tr", {
2356
2425
  className: "hover:bg-muted/30 transition-colors",
2357
- children: [/* @__PURE__ */ Y("td", {
2426
+ children: [/* @__PURE__ */ J("td", {
2358
2427
  className: "px-4 py-3",
2359
- children: [/* @__PURE__ */ J("p", {
2428
+ children: [/* @__PURE__ */ q("p", {
2360
2429
  className: "font-medium text-foreground",
2361
2430
  children: e.label
2362
- }), /* @__PURE__ */ J("p", {
2431
+ }), /* @__PURE__ */ q("p", {
2363
2432
  className: "text-xs text-muted-foreground",
2364
2433
  children: e.description
2365
2434
  })]
2366
- }), f.map((t) => /* @__PURE__ */ J("td", {
2435
+ }), f.map((t) => /* @__PURE__ */ q("td", {
2367
2436
  className: "px-4 py-3 text-center",
2368
- children: /* @__PURE__ */ J("input", {
2437
+ children: /* @__PURE__ */ q("input", {
2369
2438
  type: "radio",
2370
2439
  name: `perm-${e.id}`,
2371
2440
  value: t,
@@ -2378,27 +2447,27 @@ var Ye = ({ app: e }) => {
2378
2447
  })]
2379
2448
  })
2380
2449
  }),
2381
- /* @__PURE__ */ Y("div", {
2450
+ /* @__PURE__ */ J("div", {
2382
2451
  className: "rounded-lg border border-border-subtle bg-muted/30 p-3 flex gap-2 text-xs text-muted-foreground",
2383
- children: [/* @__PURE__ */ J(z, {
2452
+ children: [/* @__PURE__ */ q(z, {
2384
2453
  size: 14,
2385
2454
  className: "flex-shrink-0 mt-0.5"
2386
- }), /* @__PURE__ */ Y("span", { children: [/* @__PURE__ */ J("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2455
+ }), /* @__PURE__ */ J("span", { children: [/* @__PURE__ */ q("strong", { children: "Read & Write" }), " implies Read. Request only what your app genuinely needs — fewer permissions build more user trust."] })]
2387
2456
  }),
2388
- /* @__PURE__ */ Y("div", {
2457
+ /* @__PURE__ */ J("div", {
2389
2458
  className: "flex items-center justify-end gap-3",
2390
- children: [o && /* @__PURE__ */ Y("span", {
2459
+ children: [o && /* @__PURE__ */ J("span", {
2391
2460
  className: "flex items-center gap-1.5 text-sm text-status-success-text",
2392
- children: [/* @__PURE__ */ J(L, { size: 14 }), "Saved"]
2393
- }), /* @__PURE__ */ Y("button", {
2461
+ children: [/* @__PURE__ */ q(I, { size: 14 }), "Saved"]
2462
+ }), /* @__PURE__ */ J("button", {
2394
2463
  type: "button",
2395
2464
  onClick: () => void u(),
2396
2465
  disabled: i,
2397
2466
  className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
2398
- children: [i ? /* @__PURE__ */ J(B, {
2467
+ children: [i ? /* @__PURE__ */ q(B, {
2399
2468
  size: 14,
2400
2469
  className: "animate-spin"
2401
- }) : /* @__PURE__ */ J(H, { size: 14 }), "Save Permissions"]
2470
+ }) : /* @__PURE__ */ q(H, { size: 14 }), "Save Permissions"]
2402
2471
  })]
2403
2472
  })
2404
2473
  ]
@@ -2406,6 +2475,6 @@ var Ye = ({ app: e }) => {
2406
2475
  });
2407
2476
  };
2408
2477
  //#endregion
2409
- export { Oe as ApplicationDetailPage };
2478
+ export { Ae as ApplicationDetailPage };
2410
2479
 
2411
2480
  //# sourceMappingURL=ApplicationDetailPage.js.map