@burdenoff/microfe-devportal 2026.624.16 → 2026.624.18

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