@burdenoff/microfe-devportal 2026.609.4 → 2026.611.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/devportal/DevportalRoot.js +6 -1
  2. package/dist/devportal/DevportalRoot.js.map +1 -1
  3. package/dist/devportal/DevportalRoutes.js +169 -158
  4. package/dist/devportal/DevportalRoutes.js.map +1 -1
  5. package/dist/devportal/hooks/usePackageUpload.js +120 -0
  6. package/dist/devportal/hooks/usePackageUpload.js.map +1 -0
  7. package/dist/devportal/pages/AnalyticsDashboardPage.js +73 -62
  8. package/dist/devportal/pages/AnalyticsDashboardPage.js.map +1 -1
  9. package/dist/devportal/pages/AppLogsPage.js +89 -82
  10. package/dist/devportal/pages/AppLogsPage.js.map +1 -1
  11. package/dist/devportal/pages/ApplicationDetailPage.js +948 -367
  12. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  13. package/dist/devportal/pages/ApplicationVersionsPage.js +56 -45
  14. package/dist/devportal/pages/ApplicationVersionsPage.js.map +1 -1
  15. package/dist/devportal/pages/CreateApiKeyPage.js +30 -32
  16. package/dist/devportal/pages/CreateApiKeyPage.js.map +1 -1
  17. package/dist/devportal/pages/CreateApplicationPage.js +8 -3
  18. package/dist/devportal/pages/CreateApplicationPage.js.map +1 -1
  19. package/dist/devportal/pages/CreateOAuthClientPage.js +4 -4
  20. package/dist/devportal/pages/CreateOAuthClientPage.js.map +1 -1
  21. package/dist/devportal/pages/CreateOrganizationPage.js +233 -228
  22. package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
  23. package/dist/devportal/pages/CreateWebhookPage.js +159 -148
  24. package/dist/devportal/pages/CreateWebhookPage.js.map +1 -1
  25. package/dist/devportal/pages/DelegationsPage.js +1 -1
  26. package/dist/devportal/pages/DelegationsPage.js.map +1 -1
  27. package/dist/devportal/pages/EditApplicationPage.js +25 -17
  28. package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
  29. package/dist/devportal/pages/ListingPreviewPage.js +159 -153
  30. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  31. package/dist/devportal/pages/OAuthClientDetailPage.js.map +1 -1
  32. package/dist/devportal/pages/OAuthClientsPage.js +2 -2
  33. package/dist/devportal/pages/OAuthClientsPage.js.map +1 -1
  34. package/dist/devportal/pages/OrganizationDetailPage.js +158 -153
  35. package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
  36. package/dist/devportal/pages/OrganizationMembersPage.js +223 -212
  37. package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
  38. package/dist/devportal/pages/PublishPage.js +172 -165
  39. package/dist/devportal/pages/PublishPage.js.map +1 -1
  40. package/dist/devportal/pages/ResourcesPage.js.map +1 -1
  41. package/dist/devportal/pages/RevenueDashboardPage.js +405 -0
  42. package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -0
  43. package/dist/devportal/pages/SetupPage.js +186 -181
  44. package/dist/devportal/pages/SetupPage.js.map +1 -1
  45. package/dist/devportal/pages/StoreSubmissionPage.js +76 -97
  46. package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
  47. package/dist/devportal/pages/WebhookDetailPage.js +172 -154
  48. package/dist/devportal/pages/WebhookDetailPage.js.map +1 -1
  49. package/dist/devportal/pages/WebhooksPage.js +218 -200
  50. package/dist/devportal/pages/WebhooksPage.js.map +1 -1
  51. package/dist/devportal/providers/DevportalProvider.js +16 -13
  52. package/dist/devportal/providers/DevportalProvider.js.map +1 -1
  53. package/dist/devportal/types/index.js.map +1 -1
  54. package/dist/generated/global-operations.js +310 -225
  55. package/dist/generated/global-operations.js.map +1 -1
  56. package/package.json +1 -1
  57. package/dist/devportal/pages/RevenueRedirectPage.js +0 -14
  58. package/dist/devportal/pages/RevenueRedirectPage.js.map +0 -1
@@ -6,20 +6,23 @@ import { PageLayout as i, PageSection as a } from "../components/PageLayout.js";
6
6
  import { APP_TYPE_LABELS as o } from "../utils/constants.js";
7
7
  import { FeaturedBadge as s, StatusBadge as c, VerifiedBadge as l } from "../components/StatusBadge.js";
8
8
  import { SelectionCheckbox as u } from "../components/SelectionCheckbox.js";
9
- import { NewSecretAlert as d } from "../components/SecretDisplay.js";
10
- import { DataTable as f, DetailList as p } from "../components/DataTable.js";
11
- import { ConfirmDialog as m } from "../components/ConfirmDialog.js";
12
- import { useCurrentUserDelegationsQuery as h, useDeactivateAppMutation as g, useGetApplicationAnalyticsQuery as _, useGetApplicationQuery as v, useGetWebhooksQuery as y, useRevokeDelegationMutation as b, useRotateAppSecretMutation as x } from "../../generated/global-operations.js";
13
- import { GrantDelegationModal as S } from "../components/GrantDelegationModal.js";
14
- import { DEVPORTAL_PERMISSIONS as C } from "../constants/permissions.js";
15
- import { useDevportalPermission as w } from "../hooks/usePermission.js";
16
- import { useCallback as T, useMemo as E, useState as D } from "react";
17
- import { useI18n as O } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { AlertCircle as k, AppWindow as A, BarChart3 as j, CheckCircle as M, Clock as N, Edit as P, ExternalLink as F, Key as I, Loader2 as L, MoreHorizontal as R, Plus as z, Power as ee, RefreshCw as te, Shield as B, Users as V, Webhook as H, XCircle as U } from "lucide-react";
19
- import { useParams as ne } from "react-router-dom";
20
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
9
+ import { nativeNotify as d } from "../../utils/nativeBridge.js";
10
+ import { NewSecretAlert as f } from "../components/SecretDisplay.js";
11
+ import { DataTable as p, DetailList as m } from "../components/DataTable.js";
12
+ import { InputField as h, SelectField as g, TextareaField as _ } from "../components/FormField.js";
13
+ import { ConfirmDialog as v } from "../components/ConfirmDialog.js";
14
+ import { useCurrentUserDelegationsQuery as y, useDeactivateAppMutation as b, useGetApplicationAnalyticsQuery as x, useGetApplicationQuery as S, useGetWebhooksQuery as C, useInstallApplicationMutation as w, useRevokeDelegationMutation as T, useRotateAppSecretMutation as E, useUpdateApplicationMutation as D } from "../../generated/global-operations.js";
15
+ import { GrantDelegationModal as ee } from "../components/GrantDelegationModal.js";
16
+ import { DEVPORTAL_PERMISSIONS as O } from "../constants/permissions.js";
17
+ import { useDevportalPermission as k } from "../hooks/usePermission.js";
18
+ import { usePackageUpload as A } from "../hooks/usePackageUpload.js";
19
+ import { useCallback as j, useEffect as M, useMemo as N, useRef as P, useState as F } from "react";
20
+ import { useI18n as I } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { AlertCircle as L, AppWindow as te, BarChart3 as R, CheckCircle as z, Clock as ne, Download as re, Edit as ie, ExternalLink as B, FlaskConical as ae, Info as oe, Key as V, Loader2 as H, MoreHorizontal as se, Plus as U, Power as ce, RefreshCw as le, Shield as W, Store as G, Upload as K, Users as q, Webhook as ue, XCircle as de } from "lucide-react";
22
+ import { useParams as fe } from "react-router-dom";
23
+ import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
21
24
  //#region src/devportal/pages/ApplicationDetailPage.tsx
22
- function re(e) {
25
+ function pe(e) {
23
26
  return e ? {
24
27
  id: e.id,
25
28
  name: e.name,
@@ -59,7 +62,7 @@ function re(e) {
59
62
  updatedAt: e.updatedAt
60
63
  } : null;
61
64
  }
62
- function ie(e) {
65
+ function Z(e) {
63
66
  return {
64
67
  id: e.id,
65
68
  applicationId: e.applicationId,
@@ -83,7 +86,7 @@ function ie(e) {
83
86
  updatedAt: e.updatedAt
84
87
  };
85
88
  }
86
- function q(e) {
89
+ function me(e) {
87
90
  return {
88
91
  id: e.id,
89
92
  applicationId: e.applicationId,
@@ -99,7 +102,7 @@ function q(e) {
99
102
  createdAt: e.createdAt
100
103
  };
101
104
  }
102
- function ae(e) {
105
+ function he(e) {
103
106
  return {
104
107
  id: e.id,
105
108
  appId: e.appId,
@@ -121,476 +124,508 @@ function ae(e) {
121
124
  revokedBy: e.revokedBy || void 0
122
125
  };
123
126
  }
124
- var oe = [
127
+ var ge = [
125
128
  {
126
129
  id: "overview",
127
130
  label: "Overview",
128
- icon: A
131
+ icon: te
129
132
  },
130
133
  {
131
134
  id: "oauth",
132
135
  label: "OAuth Clients",
133
- icon: B
136
+ icon: W
134
137
  },
135
138
  {
136
139
  id: "api-keys",
137
140
  label: "API Keys",
138
- icon: I
141
+ icon: V
139
142
  },
140
143
  {
141
144
  id: "webhooks",
142
145
  label: "Webhooks",
143
- icon: H
146
+ icon: ue
144
147
  },
145
148
  {
146
149
  id: "delegations",
147
150
  label: "Delegations",
148
- icon: V
151
+ icon: q
149
152
  },
150
153
  {
151
154
  id: "analytics",
152
155
  label: "Analytics",
153
- icon: j
156
+ icon: R
154
157
  },
155
158
  {
156
159
  id: "playground",
157
160
  label: "API Playground",
158
- icon: F
161
+ icon: B
162
+ },
163
+ {
164
+ id: "store-listing",
165
+ label: "Store Listing",
166
+ icon: G
159
167
  }
160
- ], J = {
168
+ ], _e = {
161
169
  ACTIVE: "bg-status-success-bg-subtle text-status-success-text",
162
170
  REVOKED: "bg-status-error-bg-subtle text-status-error-text",
163
171
  EXPIRED: "bg-bg-sunken text-text-secondary"
164
- }, Y = ({ message: e = "Loading..." }) => /* @__PURE__ */ K("div", {
172
+ }, ve = ({ message: e = "Loading..." }) => /* @__PURE__ */ X("div", {
165
173
  className: "flex items-center justify-center gap-3 py-12",
166
- children: [/* @__PURE__ */ G(L, {
174
+ children: [/* @__PURE__ */ Y(H, {
167
175
  size: 20,
168
176
  className: "animate-spin text-muted-foreground"
169
- }), /* @__PURE__ */ G("p", {
177
+ }), /* @__PURE__ */ Y("p", {
170
178
  className: "text-sm text-muted-foreground",
171
179
  children: e
172
180
  })]
173
- }), X = ({ message: e }) => /* @__PURE__ */ K("div", {
181
+ }), ye = ({ message: e }) => /* @__PURE__ */ X("div", {
174
182
  className: "flex flex-col items-center justify-center gap-2 py-12 text-center",
175
- children: [/* @__PURE__ */ G(k, {
183
+ children: [/* @__PURE__ */ Y(L, {
176
184
  size: 32,
177
185
  className: "text-destructive"
178
- }), /* @__PURE__ */ G("p", {
186
+ }), /* @__PURE__ */ Y("p", {
179
187
  className: "text-sm text-muted-foreground",
180
188
  children: e
181
189
  })]
182
- }), Z = () => {
183
- let { navigate: a, basePath: u } = e(), { t: f } = O(), p = (e, t) => {
184
- let n = f(e);
190
+ }), be = () => {
191
+ let { navigate: a, basePath: u, workspaceId: p } = e(), { t: m } = I(), h = (e, t) => {
192
+ let n = m(e);
185
193
  return n === e ? t : n;
186
- }, { allowed: h } = w(C.APP_UPDATE), { allowed: _ } = w(C.APP_DELETE), { appId: y } = ne(), [b, E] = D("overview"), [j, M] = D(!1), [F, I] = D(!1), [L, R] = D(null), [z, B] = D(!1), { data: V, loading: H, error: U } = v({
194
+ }, { allowed: g } = k(O.APP_UPDATE), { allowed: _ } = k(O.APP_DELETE), { appId: y } = fe(), [x, C] = F("overview"), [T, D] = F(!1), [A, M] = F(!1), [N, P] = F(null), [R, z] = F(!1), { data: re, loading: B, error: oe } = S({
187
195
  variables: { id: y },
188
196
  skip: !y
189
- }), [W, { loading: ie }] = x(), [q, { loading: ae }] = g(), J = T((e) => {
197
+ }), [V, { loading: se }] = E(), [U, { loading: W }] = b(), [G, { loading: K }] = w(), q = j((e) => {
190
198
  a?.(`${u}${e}`);
191
- }, [a, u]), Y = T(async () => {
199
+ }, [a, u]), ue = j(async () => {
192
200
  if (y) try {
193
- let e = (await W({ variables: { id: y } })).data?.rotateAppSecret.clientSecret;
194
- e && R(e), M(!1);
201
+ let e = (await V({ variables: { id: y } })).data?.rotateAppSecret.clientSecret;
202
+ e && P(e), D(!1);
195
203
  } catch {}
196
- }, [y, W]), X = T(async () => {
204
+ }, [y, V]), de = j(async () => {
197
205
  if (y) try {
198
- await q({ variables: { id: y } }), I(!1), J("/apps");
206
+ await U({ variables: { id: y } }), M(!1), q("/apps");
199
207
  } catch {}
200
208
  }, [
201
209
  y,
202
- q,
203
- J
210
+ U,
211
+ q
212
+ ]), J = j(async () => {
213
+ if (!(!y || !p)) try {
214
+ await G({ variables: { input: {
215
+ applicationId: y,
216
+ scope: "WORKSPACE",
217
+ workspaceId: p,
218
+ autoUpdate: !1
219
+ } } }), d("success");
220
+ } catch {
221
+ d("error");
222
+ }
223
+ }, [
224
+ y,
225
+ p,
226
+ G
204
227
  ]);
205
- if (H) return /* @__PURE__ */ G(n, { message: p("devportal.loadingApplication", "Loading application...") });
206
- if (U) return /* @__PURE__ */ G(i, {
207
- title: p("devportal.error", "Error"),
228
+ if (B && !re) return /* @__PURE__ */ Y(n, { message: h("devportal.loadingApplication", "Loading application...") });
229
+ if (oe) return /* @__PURE__ */ Y(i, {
230
+ title: h("devportal.error", "Error"),
208
231
  backLink: `${u}/apps`,
209
- backLabel: p("devportal.backToApplications", "Back to Applications"),
210
- children: /* @__PURE__ */ K("div", {
232
+ backLabel: h("devportal.backToApplications", "Back to Applications"),
233
+ children: /* @__PURE__ */ X("div", {
211
234
  className: "flex flex-col items-center justify-center py-12 text-center",
212
235
  children: [
213
- /* @__PURE__ */ G(k, {
236
+ /* @__PURE__ */ Y(L, {
214
237
  size: 48,
215
238
  className: "text-destructive mb-4"
216
239
  }),
217
- /* @__PURE__ */ G("h3", {
240
+ /* @__PURE__ */ Y("h3", {
218
241
  className: "text-lg font-semibold mb-2",
219
- children: p("devportal.failedToLoadApplication", "Failed to load application")
242
+ children: h("devportal.failedToLoadApplication", "Failed to load application")
220
243
  }),
221
- /* @__PURE__ */ G("p", {
244
+ /* @__PURE__ */ Y("p", {
222
245
  className: "text-sm text-muted-foreground",
223
- children: U.message
246
+ children: oe.message
224
247
  })
225
248
  ]
226
249
  })
227
250
  });
228
- let Z = re(V?.application);
229
- return Z ? /* @__PURE__ */ K(i, {
251
+ let Z = pe(re?.application);
252
+ return Z ? /* @__PURE__ */ X(i, {
230
253
  title: Z.name,
231
254
  description: Z.shortDescription,
232
255
  backLink: `${u}/apps`,
233
- backLabel: p("devportal.backToApplications", "Back to Applications"),
234
- actions: /* @__PURE__ */ K("div", {
256
+ backLabel: h("devportal.backToApplications", "Back to Applications"),
257
+ actions: /* @__PURE__ */ X("div", {
235
258
  className: "flex items-center gap-2",
236
259
  children: [
237
- /* @__PURE__ */ K("button", {
238
- onClick: () => M(!0),
260
+ /* @__PURE__ */ X("button", {
261
+ onClick: () => D(!0),
239
262
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
240
- children: [/* @__PURE__ */ G(te, { size: 16 }), p("devportal.rotateSecret", "Rotate Secret")]
263
+ children: [/* @__PURE__ */ Y(le, { size: 16 }), h("devportal.rotateSecret", "Rotate Secret")]
241
264
  }),
242
- /* @__PURE__ */ K("button", {
243
- onClick: () => J(`/apps/${Z.id}/versions`),
265
+ /* @__PURE__ */ X("button", {
266
+ onClick: () => q(`/apps/${Z.id}/versions`),
244
267
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-muted transition-colors",
245
- children: [/* @__PURE__ */ G(N, { size: 16 }), p("devportal.versions", "Versions")]
268
+ children: [/* @__PURE__ */ Y(ne, { size: 16 }), h("devportal.versions", "Versions")]
269
+ }),
270
+ /* @__PURE__ */ X("button", {
271
+ onClick: () => void J(),
272
+ disabled: K || !p,
273
+ "aria-disabled": !p,
274
+ title: p ? h("devportal.testInWorkspaceHint", "Install this app into your current workspace to test it") : h("devportal.noWorkspaceContext", "No workspace context available"),
275
+ 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",
276
+ children: [K ? /* @__PURE__ */ Y(H, {
277
+ size: 16,
278
+ className: "animate-spin"
279
+ }) : /* @__PURE__ */ Y(ae, { size: 16 }), h("devportal.testInWorkspace", "Test in Workspace")]
246
280
  }),
247
- /* @__PURE__ */ K("button", {
248
- onClick: () => J(`/apps/${Z.id}/edit`),
249
- disabled: !h,
250
- "aria-disabled": !h,
281
+ /* @__PURE__ */ X("button", {
282
+ onClick: () => q(`/apps/${Z.id}/edit`),
283
+ disabled: !g,
284
+ "aria-disabled": !g,
251
285
  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",
252
- children: [/* @__PURE__ */ G(P, { size: 16 }), p("devportal.editApp", "Edit App")]
286
+ children: [/* @__PURE__ */ Y(ie, { size: 16 }), h("devportal.editApp", "Edit App")]
253
287
  }),
254
- /* @__PURE__ */ K("button", {
255
- onClick: () => I(!0),
288
+ /* @__PURE__ */ X("button", {
289
+ onClick: () => M(!0),
256
290
  disabled: !_,
257
291
  "aria-disabled": !_,
258
292
  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",
259
- children: [/* @__PURE__ */ G(ee, { size: 16 }), p("devportal.deactivate", "Deactivate")]
293
+ children: [/* @__PURE__ */ Y(ce, { size: 16 }), h("devportal.deactivate", "Deactivate")]
260
294
  })
261
295
  ]
262
296
  }),
263
297
  children: [
264
- L && /* @__PURE__ */ G(d, {
265
- title: p("devportal.newAppSecretGenerated", "New App Secret Generated"),
266
- secret: L,
267
- description: p("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
268
- onDismiss: () => R(null)
298
+ N && /* @__PURE__ */ Y(f, {
299
+ title: h("devportal.newAppSecretGenerated", "New App Secret Generated"),
300
+ secret: N,
301
+ description: h("devportal.appSecretRotatedDescription", "Your app secret has been rotated. The old secret is no longer valid."),
302
+ onDismiss: () => P(null)
269
303
  }),
270
- /* @__PURE__ */ K("div", {
304
+ /* @__PURE__ */ X("div", {
271
305
  className: "flex flex-wrap items-center gap-2",
272
306
  children: [
273
- /* @__PURE__ */ G(c, {
307
+ /* @__PURE__ */ Y(c, {
274
308
  status: Z.status,
275
309
  type: "app"
276
310
  }),
277
- /* @__PURE__ */ G(c, {
311
+ /* @__PURE__ */ Y(c, {
278
312
  status: Z.visibility,
279
313
  type: "app"
280
314
  }),
281
- Z.isVerified && /* @__PURE__ */ G(l, { verified: !0 }),
282
- Z.isFeatured && /* @__PURE__ */ G(s, {}),
283
- /* @__PURE__ */ G("span", {
315
+ Z.isVerified && /* @__PURE__ */ Y(l, { verified: !0 }),
316
+ Z.isFeatured && /* @__PURE__ */ Y(s, {}),
317
+ /* @__PURE__ */ Y("span", {
284
318
  className: "text-sm text-muted-foreground",
285
319
  children: o[Z.appType] || Z.appType
286
320
  })
287
321
  ]
288
322
  }),
289
- /* @__PURE__ */ G("div", {
323
+ /* @__PURE__ */ Y("div", {
290
324
  className: "border-b",
291
- children: /* @__PURE__ */ G("nav", {
325
+ children: /* @__PURE__ */ Y("nav", {
292
326
  className: "-mb-px flex gap-4 overflow-x-auto",
293
327
  role: "tablist",
294
- "aria-label": p("devportal.applicationSections", "Application sections"),
295
- children: oe.map((e) => {
328
+ "aria-label": h("devportal.applicationSections", "Application sections"),
329
+ children: ge.map((e) => {
296
330
  let n = e.icon;
297
- return /* @__PURE__ */ K("button", {
331
+ return /* @__PURE__ */ X("button", {
298
332
  id: `application-tab-${e.id}`,
299
333
  role: "tab",
300
- "aria-selected": b === e.id,
334
+ "aria-selected": x === e.id,
301
335
  "aria-controls": `application-panel-${e.id}`,
302
- onClick: () => E(e.id),
303
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", b === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
304
- children: [/* @__PURE__ */ G(n, { size: 16 }), e.label]
336
+ onClick: () => C(e.id),
337
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", x === e.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"),
338
+ children: [/* @__PURE__ */ Y(n, { size: 16 }), e.label]
305
339
  }, e.id);
306
340
  })
307
341
  })
308
342
  }),
309
- /* @__PURE__ */ K("div", {
343
+ /* @__PURE__ */ X("div", {
310
344
  className: "mt-6",
311
- id: `application-panel-${b}`,
345
+ id: `application-panel-${x}`,
312
346
  role: "tabpanel",
313
- "aria-labelledby": `application-tab-${b}`,
347
+ "aria-labelledby": `application-tab-${x}`,
314
348
  tabIndex: 0,
315
349
  children: [
316
- b === "overview" && /* @__PURE__ */ G(fe, { app: Z }),
317
- b === "oauth" && /* @__PURE__ */ G(se, {
350
+ x === "overview" && /* @__PURE__ */ Y(Ee, { app: Z }),
351
+ x === "oauth" && /* @__PURE__ */ Y(xe, {
318
352
  appId: Z.appId || Z.id,
319
- onNavigate: J
353
+ onNavigate: q
320
354
  }),
321
- b === "api-keys" && /* @__PURE__ */ G(ce, {
355
+ x === "api-keys" && /* @__PURE__ */ Y(Se, {
322
356
  appId: Z.appId || Z.id,
323
- onNavigate: J
357
+ onNavigate: q
324
358
  }),
325
- b === "webhooks" && /* @__PURE__ */ G(le, {
359
+ x === "webhooks" && /* @__PURE__ */ Y(Ce, {
326
360
  appId: Z.id,
327
- onNavigate: J
361
+ onNavigate: q
328
362
  }),
329
- b === "delegations" && /* @__PURE__ */ G(ue, {
363
+ x === "delegations" && /* @__PURE__ */ Y(we, {
330
364
  authAppId: Z.appId || void 0,
331
365
  appName: Z.name,
332
- onGrantDelegation: () => B(!0),
333
- onNavigate: J
366
+ onGrantDelegation: () => z(!0),
367
+ onNavigate: q
334
368
  }),
335
- b === "analytics" && /* @__PURE__ */ G(de, { appId: Z.id }),
336
- b === "playground" && /* @__PURE__ */ G(_e, { app: Z })
369
+ x === "analytics" && /* @__PURE__ */ Y(Te, { appId: Z.id }),
370
+ x === "playground" && /* @__PURE__ */ Y(je, { app: Z }),
371
+ x === "store-listing" && /* @__PURE__ */ Y(Le, { app: Z })
337
372
  ]
338
373
  }),
339
- /* @__PURE__ */ G(m, {
340
- open: j,
341
- onOpenChange: M,
342
- onConfirm: Y,
343
- title: p("devportal.rotateAppSecret", "Rotate App Secret"),
344
- 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."),
345
- confirmLabel: p("devportal.rotateSecret", "Rotate Secret"),
346
- cancelLabel: p("devportal.cancel", "Cancel"),
374
+ /* @__PURE__ */ Y(v, {
375
+ open: T,
376
+ onOpenChange: D,
377
+ onConfirm: ue,
378
+ title: h("devportal.rotateAppSecret", "Rotate App Secret"),
379
+ description: h("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."),
380
+ confirmLabel: h("devportal.rotateSecret", "Rotate Secret"),
381
+ cancelLabel: h("devportal.cancel", "Cancel"),
347
382
  variant: "warning",
348
- loading: ie
383
+ loading: se
349
384
  }),
350
- /* @__PURE__ */ G(m, {
351
- open: F,
352
- onOpenChange: I,
353
- onConfirm: X,
354
- title: p("devportal.deactivateApplication", "Deactivate Application"),
355
- 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."),
356
- confirmLabel: p("devportal.deactivate", "Deactivate"),
357
- cancelLabel: p("devportal.cancel", "Cancel"),
385
+ /* @__PURE__ */ Y(v, {
386
+ open: A,
387
+ onOpenChange: M,
388
+ onConfirm: de,
389
+ title: h("devportal.deactivateApplication", "Deactivate Application"),
390
+ description: h("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."),
391
+ confirmLabel: h("devportal.deactivate", "Deactivate"),
392
+ cancelLabel: h("devportal.cancel", "Cancel"),
358
393
  variant: "destructive",
359
- loading: ae
394
+ loading: W
360
395
  }),
361
- /* @__PURE__ */ G(S, {
362
- open: z,
363
- onOpenChange: B,
396
+ /* @__PURE__ */ Y(ee, {
397
+ open: R,
398
+ onOpenChange: z,
364
399
  appId: Z.appId || "",
365
400
  appName: Z.name,
366
401
  appScopes: Z.scopes?.map((e) => e.scope) ?? [],
367
402
  onSuccess: () => {
368
- B(!1);
403
+ z(!1);
369
404
  }
370
405
  })
371
406
  ]
372
- }) : /* @__PURE__ */ G(i, {
373
- title: p("devportal.notFound", "Not Found"),
407
+ }) : /* @__PURE__ */ Y(i, {
408
+ title: h("devportal.notFound", "Not Found"),
374
409
  backLink: `${u}/apps`,
375
- backLabel: p("devportal.backToApplications", "Back to Applications"),
376
- children: /* @__PURE__ */ G(r, {
377
- icon: /* @__PURE__ */ G(A, { size: 48 }),
378
- title: p("devportal.applicationNotFound", "Application not found"),
379
- description: p("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
410
+ backLabel: h("devportal.backToApplications", "Back to Applications"),
411
+ children: /* @__PURE__ */ Y(r, {
412
+ icon: /* @__PURE__ */ Y(te, { size: 48 }),
413
+ title: h("devportal.applicationNotFound", "Application not found"),
414
+ description: h("devportal.applicationNotFoundDescription", "The application you're looking for doesn't exist or you don't have access to it.")
380
415
  })
381
416
  });
382
- }, se = ({ onNavigate: e }) => {
383
- let { t } = O(), n = (e, n) => {
417
+ }, xe = ({ onNavigate: e }) => {
418
+ let { t } = I(), n = (e, n) => {
384
419
  let r = t(e);
385
420
  return r === e ? n : r;
386
421
  };
387
- return /* @__PURE__ */ K("div", {
422
+ return /* @__PURE__ */ X("div", {
388
423
  className: "space-y-4 py-4 text-center",
389
424
  children: [
390
- /* @__PURE__ */ G(B, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
391
- /* @__PURE__ */ G("h3", {
425
+ /* @__PURE__ */ Y(W, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
426
+ /* @__PURE__ */ Y("h3", {
392
427
  className: "font-medium",
393
428
  children: n("devportal.oauthApps", "OAuth Apps")
394
429
  }),
395
- /* @__PURE__ */ G("p", {
430
+ /* @__PURE__ */ Y("p", {
396
431
  className: "text-sm text-muted-foreground",
397
432
  children: n("devportal.oauthAppsManagedCentrally", "OAuth apps are now managed centrally. Visit the OAuth Apps page to create and manage your apps.")
398
433
  }),
399
- /* @__PURE__ */ K("button", {
434
+ /* @__PURE__ */ X("button", {
400
435
  onClick: () => e("/oauth"),
401
436
  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",
402
- children: [/* @__PURE__ */ G(F, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
437
+ children: [/* @__PURE__ */ Y(B, { size: 16 }), n("devportal.manageOAuthApps", "Manage OAuth Apps")]
403
438
  })
404
439
  ]
405
440
  });
406
- }, ce = ({ onNavigate: e }) => {
407
- let { t } = O(), n = (e, n) => {
441
+ }, Se = ({ onNavigate: e }) => {
442
+ let { t } = I(), n = (e, n) => {
408
443
  let r = t(e);
409
444
  return r === e ? n : r;
410
445
  };
411
- return /* @__PURE__ */ K("div", {
446
+ return /* @__PURE__ */ X("div", {
412
447
  className: "space-y-4 py-4 text-center",
413
448
  children: [
414
- /* @__PURE__ */ G(I, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
415
- /* @__PURE__ */ G("h3", {
449
+ /* @__PURE__ */ Y(V, { className: "mx-auto h-10 w-10 text-muted-foreground" }),
450
+ /* @__PURE__ */ Y("h3", {
416
451
  className: "font-medium",
417
452
  children: n("devportal.apiKeys", "API Keys")
418
453
  }),
419
- /* @__PURE__ */ G("p", {
454
+ /* @__PURE__ */ Y("p", {
420
455
  className: "text-sm text-muted-foreground",
421
456
  children: n("devportal.apiKeysManagedCentrally", "API keys are now managed centrally. Visit the API Keys page to generate and manage your keys.")
422
457
  }),
423
- /* @__PURE__ */ K("button", {
458
+ /* @__PURE__ */ X("button", {
424
459
  onClick: () => e("/api-keys"),
425
460
  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",
426
- children: [/* @__PURE__ */ G(F, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
461
+ children: [/* @__PURE__ */ Y(B, { size: 16 }), n("devportal.manageApiKeys", "Manage API Keys")]
427
462
  })
428
463
  ]
429
464
  });
430
- }, le = ({ appId: e, onNavigate: t }) => {
431
- let { t: n } = O(), r = (e, t) => {
465
+ }, Ce = ({ appId: e, onNavigate: t }) => {
466
+ let { t: n } = I(), r = (e, t) => {
432
467
  let r = n(e);
433
468
  return r === e ? t : r;
434
- }, { data: i, loading: a, error: o } = y({ variables: { applicationId: e } });
435
- return a ? /* @__PURE__ */ G(Y, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ G(X, { message: o.message }) : /* @__PURE__ */ G(pe, {
469
+ }, { data: i, loading: a, error: o } = C({ variables: { applicationId: e } });
470
+ return a ? /* @__PURE__ */ Y(ve, { message: r("devportal.loadingWebhooks", "Loading webhooks...") }) : o ? /* @__PURE__ */ Y(ye, { message: o.message }) : /* @__PURE__ */ Y(De, {
436
471
  appId: e,
437
- webhooks: (i?.webhooks ?? []).map(ie),
472
+ webhooks: (i?.webhooks ?? []).map(Z),
438
473
  onNavigate: t
439
474
  });
440
- }, ue = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: i }) => {
441
- let { t: a } = O(), o = (e, t) => {
475
+ }, we = ({ authAppId: e, appName: t, onGrantDelegation: n, onNavigate: i }) => {
476
+ let { t: a } = I(), o = (e, t) => {
442
477
  let n = a(e);
443
478
  return n === e ? t : n;
444
- }, { data: s, loading: c, error: l, refetch: u } = h(), [d] = b(), [f, p] = D([]), [g, _] = D(!1), [v, y] = D(/* @__PURE__ */ new Set()), [x, S] = D(null), C = E(() => s?.currentUserDelegations ? s.currentUserDelegations.filter((t) => t.appId === e).map(ae) : [], [e, s]), w = E(() => C.filter((e) => e.status === "ACTIVE"), [C]), k = E(() => w.filter((e) => v.has(e.id)), [w, v]), A = w.length > 0 && w.every((e) => v.has(e.id)), j = w.some((e) => v.has(e.id)) && !A, M = T((e, t) => {
445
- y((n) => {
479
+ }, { data: s, loading: c, error: l, refetch: u } = y(), [d] = T(), [f, p] = F([]), [m, h] = F(!1), [g, _] = F(/* @__PURE__ */ new Set()), [b, x] = F(null), S = N(() => s?.currentUserDelegations ? s.currentUserDelegations.filter((t) => t.appId === e).map(he) : [], [e, s]), C = N(() => S.filter((e) => e.status === "ACTIVE"), [S]), w = N(() => C.filter((e) => g.has(e.id)), [C, g]), E = C.length > 0 && C.every((e) => g.has(e.id)), D = C.some((e) => g.has(e.id)) && !E, ee = j((e, t) => {
480
+ _((n) => {
446
481
  let r = new Set(n);
447
482
  return t ? r.add(e) : r.delete(e), r;
448
483
  });
449
- }, []), N = T((e) => {
450
- y((t) => {
484
+ }, []), O = j((e) => {
485
+ _((t) => {
451
486
  let n = new Set(t);
452
- return w.forEach((t) => {
487
+ return C.forEach((t) => {
453
488
  e ? n.add(t.id) : n.delete(t.id);
454
489
  }), n;
455
490
  });
456
- }, [w]), P = T(() => {
457
- y(/* @__PURE__ */ new Set());
458
- }, []), I = T(async (e) => {
459
- _(!0);
491
+ }, [C]), k = j(() => {
492
+ _(/* @__PURE__ */ new Set());
493
+ }, []), A = j(async (e) => {
494
+ h(!0);
460
495
  try {
461
496
  let t = await Promise.allSettled(e.map((e) => d({ variables: { id: e } }))), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
462
- S(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), y((t) => {
497
+ x(`Revoked ${n} delegation${n === 1 ? "" : "s"}${r > 0 ? ` • ${r} failed` : ""}`), _((t) => {
463
498
  let n = new Set(t);
464
499
  return e.forEach((e) => n.delete(e)), n;
465
500
  }), p([]), u();
466
501
  } catch {} finally {
467
- _(!1);
502
+ h(!1);
468
503
  }
469
504
  }, [d, u]);
470
- return e ? c ? /* @__PURE__ */ G(Y, { message: o("devportal.loadingDelegations", "Loading delegations...") }) : l ? /* @__PURE__ */ G(X, { message: l.message }) : /* @__PURE__ */ K(W, { children: [
471
- x && /* @__PURE__ */ G("div", {
505
+ return e ? c ? /* @__PURE__ */ Y(ve, { message: o("devportal.loadingDelegations", "Loading delegations...") }) : l ? /* @__PURE__ */ Y(ye, { message: l.message }) : /* @__PURE__ */ X(J, { children: [
506
+ b && /* @__PURE__ */ Y("div", {
472
507
  className: "rounded-lg border border-border-subtle bg-status-success-bg-subtle p-3 text-sm text-status-success-text",
473
- children: /* @__PURE__ */ K("div", {
508
+ children: /* @__PURE__ */ X("div", {
474
509
  className: "flex items-center justify-between gap-3",
475
- children: [/* @__PURE__ */ G("span", { children: x }), /* @__PURE__ */ G("button", {
476
- onClick: () => S(null),
510
+ children: [/* @__PURE__ */ Y("span", { children: b }), /* @__PURE__ */ Y("button", {
511
+ onClick: () => x(null),
477
512
  className: "text-status-success-text hover:text-status-success-text",
478
513
  children: o("devportal.dismiss", "Dismiss")
479
514
  })]
480
515
  })
481
516
  }),
482
- /* @__PURE__ */ G(me, {
517
+ /* @__PURE__ */ Y(Oe, {
483
518
  appName: t,
484
- delegations: C,
519
+ delegations: S,
485
520
  onGrantDelegation: n,
486
521
  onRevokeDelegation: (e) => p([e]),
487
- selectedDelegationIds: v,
488
- onToggleSelectDelegation: M,
489
- onToggleAllDelegations: N,
490
- onClearSelection: P,
491
- onRevokeSelected: () => p(k.map((e) => e.id)),
492
- allVisibleSelected: A,
493
- partiallySelected: j
522
+ selectedDelegationIds: g,
523
+ onToggleSelectDelegation: ee,
524
+ onToggleAllDelegations: O,
525
+ onClearSelection: k,
526
+ onRevokeSelected: () => p(w.map((e) => e.id)),
527
+ allVisibleSelected: E,
528
+ partiallySelected: D
494
529
  }),
495
- /* @__PURE__ */ G(m, {
530
+ /* @__PURE__ */ Y(v, {
496
531
  open: f.length > 0,
497
532
  onOpenChange: (e) => {
498
533
  e || p([]);
499
534
  },
500
535
  onConfirm: () => {
501
- f.length > 0 && I(f);
536
+ f.length > 0 && A(f);
502
537
  },
503
538
  title: f.length > 1 ? o("devportal.revokeDelegations", "Revoke Delegations") : o("devportal.revokeDelegation", "Revoke Delegation"),
504
539
  description: f.length > 1 ? o("devportal.revokeMultipleDelegationsDescription", `This will immediately revoke ${f.length} selected delegations.`) : o("devportal.revokeDelegationDescription", "This will immediately revoke the delegation. The app will no longer be able to act on your behalf with the selected permissions."),
505
540
  confirmLabel: o("devportal.revoke", "Revoke"),
506
541
  cancelLabel: o("devportal.cancel", "Cancel"),
507
542
  variant: "destructive",
508
- loading: g
543
+ loading: m
509
544
  })
510
- ] }) : /* @__PURE__ */ G(r, {
511
- icon: /* @__PURE__ */ G(B, { size: 32 }),
545
+ ] }) : /* @__PURE__ */ Y(r, {
546
+ icon: /* @__PURE__ */ Y(W, { size: 32 }),
512
547
  title: o("devportal.linkAuthAppFirst", "Link an auth app first"),
513
548
  description: o("devportal.linkAuthAppFirstDescription", "Delegations are managed through auth apps. Create or link an auth app before granting app-as-user access."),
514
- action: /* @__PURE__ */ K("button", {
549
+ action: /* @__PURE__ */ X("button", {
515
550
  onClick: () => i("/oauth"),
516
551
  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",
517
- children: [/* @__PURE__ */ G(F, { size: 16 }), o("devportal.manageOAuthApps", "Manage OAuth Apps")]
552
+ children: [/* @__PURE__ */ Y(B, { size: 16 }), o("devportal.manageOAuthApps", "Manage OAuth Apps")]
518
553
  })
519
554
  });
520
- }, de = ({ appId: e }) => {
521
- let { t } = O(), n = (e, n) => {
555
+ }, Te = ({ appId: e }) => {
556
+ let { t } = I(), n = (e, n) => {
522
557
  let r = t(e);
523
558
  return r === e ? n : r;
524
- }, r = E(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: o } = _({ variables: {
559
+ }, r = N(() => /* @__PURE__ */ new Date(), []), { data: i, loading: a, error: o } = x({ variables: {
525
560
  applicationId: e,
526
561
  period: "daily",
527
- startDate: E(() => {
562
+ startDate: N(() => {
528
563
  let e = new Date(r);
529
564
  return e.setDate(e.getDate() - 30), e;
530
565
  }, [r]).toISOString(),
531
566
  endDate: r.toISOString()
532
567
  } });
533
- return a ? /* @__PURE__ */ G(Y, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : o ? /* @__PURE__ */ G(X, { message: o.message }) : /* @__PURE__ */ G(he, { analytics: (i?.applicationAnalytics ?? []).map(q) });
534
- }, fe = ({ app: e }) => {
535
- let { t } = O(), n = (e, n) => {
568
+ return a ? /* @__PURE__ */ Y(ve, { message: n("devportal.loadingAnalytics", "Loading analytics...") }) : o ? /* @__PURE__ */ Y(ye, { message: o.message }) : /* @__PURE__ */ Y(ke, { analytics: (i?.applicationAnalytics ?? []).map(me) });
569
+ }, Ee = ({ app: e }) => {
570
+ let { t } = I(), n = (e, n) => {
536
571
  let r = t(e);
537
572
  return r === e ? n : r;
538
573
  };
539
- return /* @__PURE__ */ K("div", {
574
+ return /* @__PURE__ */ X("div", {
540
575
  className: "grid gap-6 lg:grid-cols-3",
541
- children: [/* @__PURE__ */ K("div", {
576
+ children: [/* @__PURE__ */ X("div", {
542
577
  className: "lg:col-span-2 space-y-6",
543
578
  children: [
544
- /* @__PURE__ */ K("div", {
579
+ /* @__PURE__ */ X("div", {
545
580
  className: "grid gap-4 sm:grid-cols-4",
546
581
  children: [
547
- /* @__PURE__ */ G(Q, {
582
+ /* @__PURE__ */ Y(Q, {
548
583
  label: n("devportal.totalInstalls", "Total Installs"),
549
584
  value: e.installCount.toLocaleString()
550
585
  }),
551
- /* @__PURE__ */ G(Q, {
586
+ /* @__PURE__ */ Y(Q, {
552
587
  label: n("devportal.activeInstalls", "Active Installs"),
553
588
  value: e.activeInstallCount.toLocaleString()
554
589
  }),
555
- /* @__PURE__ */ G(Q, {
590
+ /* @__PURE__ */ Y(Q, {
556
591
  label: n("devportal.averageRating", "Average Rating"),
557
592
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : n("devportal.notAvailable", "N/A")
558
593
  }),
559
- /* @__PURE__ */ G(Q, {
594
+ /* @__PURE__ */ Y(Q, {
560
595
  label: n("devportal.reviews", "Reviews"),
561
596
  value: e.reviewCount.toString()
562
597
  })
563
598
  ]
564
599
  }),
565
- /* @__PURE__ */ G(a, {
600
+ /* @__PURE__ */ Y(a, {
566
601
  title: n("devportal.description", "Description"),
567
- children: /* @__PURE__ */ G("div", {
602
+ children: /* @__PURE__ */ Y("div", {
568
603
  className: "prose prose-sm max-w-none",
569
- children: /* @__PURE__ */ G("pre", {
604
+ children: /* @__PURE__ */ Y("pre", {
570
605
  className: "whitespace-pre-wrap font-sans text-sm text-foreground bg-transparent p-0 m-0",
571
606
  children: e.description || n("devportal.noDescriptionProvided", "No description provided.")
572
607
  })
573
608
  })
574
609
  }),
575
- /* @__PURE__ */ G(a, {
610
+ /* @__PURE__ */ Y(a, {
576
611
  title: n("devportal.tagsAndKeywords", "Tags & Keywords"),
577
- children: /* @__PURE__ */ K("div", {
612
+ children: /* @__PURE__ */ X("div", {
578
613
  className: "space-y-3",
579
- children: [e.tags.length > 0 && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
614
+ children: [e.tags.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
580
615
  className: "text-xs text-muted-foreground mb-2",
581
616
  children: n("devportal.tags", "Tags")
582
- }), /* @__PURE__ */ G("div", {
617
+ }), /* @__PURE__ */ Y("div", {
583
618
  className: "flex flex-wrap gap-2",
584
- children: e.tags.map((e) => /* @__PURE__ */ G("span", {
619
+ children: e.tags.map((e) => /* @__PURE__ */ Y("span", {
585
620
  className: "rounded-full bg-primary/10 px-3 py-1 text-xs font-medium text-primary",
586
621
  children: e
587
622
  }, e))
588
- })] }), e.keywords.length > 0 && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
623
+ })] }), e.keywords.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
589
624
  className: "text-xs text-muted-foreground mb-2",
590
625
  children: n("devportal.keywords", "Keywords")
591
- }), /* @__PURE__ */ G("div", {
626
+ }), /* @__PURE__ */ Y("div", {
592
627
  className: "flex flex-wrap gap-2",
593
- children: e.keywords.map((e) => /* @__PURE__ */ G("span", {
628
+ children: e.keywords.map((e) => /* @__PURE__ */ Y("span", {
594
629
  className: "rounded-full bg-muted px-3 py-1 text-xs",
595
630
  children: e
596
631
  }, e))
@@ -598,14 +633,14 @@ var oe = [
598
633
  })
599
634
  })
600
635
  ]
601
- }), /* @__PURE__ */ K("div", {
636
+ }), /* @__PURE__ */ X("div", {
602
637
  className: "space-y-6",
603
- children: [/* @__PURE__ */ G(a, {
638
+ children: [/* @__PURE__ */ Y(a, {
604
639
  title: n("devportal.details", "Details"),
605
- children: /* @__PURE__ */ G(p, { items: [
640
+ children: /* @__PURE__ */ Y(m, { items: [
606
641
  {
607
642
  label: n("devportal.appId", "App ID"),
608
- value: /* @__PURE__ */ G("code", {
643
+ value: /* @__PURE__ */ Y("code", {
609
644
  className: "text-xs",
610
645
  children: e.id
611
646
  })
@@ -635,32 +670,32 @@ var oe = [
635
670
  value: e.publishedAt ? new Date(e.publishedAt).toLocaleDateString() : n("devportal.notPublished", "Not published")
636
671
  }
637
672
  ] })
638
- }), /* @__PURE__ */ G(a, {
673
+ }), /* @__PURE__ */ Y(a, {
639
674
  title: n("devportal.links", "Links"),
640
- children: /* @__PURE__ */ K("div", {
675
+ children: /* @__PURE__ */ X("div", {
641
676
  className: "space-y-2",
642
677
  children: [
643
- e.websiteUrl && /* @__PURE__ */ G($, {
678
+ e.websiteUrl && /* @__PURE__ */ Y($, {
644
679
  label: n("devportal.website", "Website"),
645
680
  url: e.websiteUrl
646
681
  }),
647
- e.documentationUrl && /* @__PURE__ */ G($, {
682
+ e.documentationUrl && /* @__PURE__ */ Y($, {
648
683
  label: n("devportal.documentation", "Documentation"),
649
684
  url: e.documentationUrl
650
685
  }),
651
- e.supportUrl && /* @__PURE__ */ G($, {
686
+ e.supportUrl && /* @__PURE__ */ Y($, {
652
687
  label: n("devportal.support", "Support"),
653
688
  url: e.supportUrl
654
689
  }),
655
- e.githubUrl && /* @__PURE__ */ G($, {
690
+ e.githubUrl && /* @__PURE__ */ Y($, {
656
691
  label: n("devportal.github", "GitHub"),
657
692
  url: e.githubUrl
658
693
  }),
659
- e.privacyPolicyUrl && /* @__PURE__ */ G($, {
694
+ e.privacyPolicyUrl && /* @__PURE__ */ Y($, {
660
695
  label: n("devportal.privacyPolicy", "Privacy Policy"),
661
696
  url: e.privacyPolicyUrl
662
697
  }),
663
- e.termsOfServiceUrl && /* @__PURE__ */ G($, {
698
+ e.termsOfServiceUrl && /* @__PURE__ */ Y($, {
664
699
  label: n("devportal.termsOfService", "Terms of Service"),
665
700
  url: e.termsOfServiceUrl
666
701
  })
@@ -669,16 +704,16 @@ var oe = [
669
704
  })]
670
705
  })]
671
706
  });
672
- }, pe = ({ appId: e, webhooks: t, onNavigate: n }) => {
673
- let { t: i } = O(), a = (e, t) => {
707
+ }, De = ({ appId: e, webhooks: t, onNavigate: n }) => {
708
+ let { t: i } = I(), a = (e, t) => {
674
709
  let n = i(e);
675
710
  return n === e ? t : n;
676
711
  };
677
- return /* @__PURE__ */ K("div", {
712
+ return /* @__PURE__ */ X("div", {
678
713
  className: "space-y-6",
679
- children: [/* @__PURE__ */ K("div", {
714
+ children: [/* @__PURE__ */ X("div", {
680
715
  className: "flex items-center justify-between",
681
- children: [/* @__PURE__ */ K("p", {
716
+ children: [/* @__PURE__ */ X("p", {
682
717
  className: "text-sm text-muted-foreground",
683
718
  children: [
684
719
  t.length,
@@ -687,81 +722,81 @@ var oe = [
687
722
  " ",
688
723
  a("devportal.configured", "configured")
689
724
  ]
690
- }), /* @__PURE__ */ K("button", {
725
+ }), /* @__PURE__ */ X("button", {
691
726
  onClick: () => n(`/apps/${e}/webhooks/new`),
692
727
  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",
693
- children: [/* @__PURE__ */ G(z, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
728
+ children: [/* @__PURE__ */ Y(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
694
729
  })]
695
- }), t.length > 0 ? /* @__PURE__ */ G("div", {
730
+ }), t.length > 0 ? /* @__PURE__ */ Y("div", {
696
731
  className: "space-y-4",
697
- children: t.map((t) => /* @__PURE__ */ K("div", {
732
+ children: t.map((t) => /* @__PURE__ */ X("div", {
698
733
  className: "rounded-lg border bg-card p-4 space-y-4",
699
734
  children: [
700
- /* @__PURE__ */ K("div", {
735
+ /* @__PURE__ */ X("div", {
701
736
  className: "flex items-start justify-between",
702
- children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("div", {
737
+ children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
703
738
  className: "flex items-center gap-2",
704
- children: [/* @__PURE__ */ G("h3", {
739
+ children: [/* @__PURE__ */ Y("h3", {
705
740
  className: "font-medium",
706
741
  children: t.name
707
- }), /* @__PURE__ */ G(c, {
742
+ }), /* @__PURE__ */ Y(c, {
708
743
  status: t.status,
709
744
  type: "webhook"
710
745
  })]
711
- }), t.description && /* @__PURE__ */ G("p", {
746
+ }), t.description && /* @__PURE__ */ Y("p", {
712
747
  className: "text-sm text-muted-foreground mt-1",
713
748
  children: t.description
714
- })] }), /* @__PURE__ */ G("button", {
749
+ })] }), /* @__PURE__ */ Y("button", {
715
750
  onClick: () => n(`/apps/${e}/webhooks/${t.id}`),
716
751
  className: "rounded-md p-1 hover:bg-muted",
717
- children: /* @__PURE__ */ G(R, { size: 20 })
752
+ children: /* @__PURE__ */ Y(se, { size: 20 })
718
753
  })]
719
754
  }),
720
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
755
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
721
756
  className: "text-xs text-muted-foreground mb-1",
722
757
  children: a("devportal.endpointUrl", "Endpoint URL")
723
- }), /* @__PURE__ */ G("code", {
758
+ }), /* @__PURE__ */ Y("code", {
724
759
  className: "text-sm bg-muted px-2 py-1 rounded block truncate",
725
760
  children: t.url
726
761
  })] }),
727
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
762
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
728
763
  className: "text-xs text-muted-foreground mb-2",
729
764
  children: a("devportal.events", "Events")
730
- }), /* @__PURE__ */ G("div", {
765
+ }), /* @__PURE__ */ Y("div", {
731
766
  className: "flex flex-wrap gap-2",
732
- children: t.events.map((e) => /* @__PURE__ */ G("span", {
767
+ children: t.events.map((e) => /* @__PURE__ */ Y("span", {
733
768
  className: "rounded-full bg-muted px-2 py-0.5 text-xs",
734
769
  children: e
735
770
  }, e))
736
771
  })] }),
737
- /* @__PURE__ */ K("div", {
772
+ /* @__PURE__ */ X("div", {
738
773
  className: "grid gap-4 sm:grid-cols-4 text-sm",
739
774
  children: [
740
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
775
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
741
776
  className: "text-xs text-muted-foreground",
742
777
  children: a("devportal.success", "Success")
743
- }), /* @__PURE__ */ G("p", {
778
+ }), /* @__PURE__ */ Y("p", {
744
779
  className: "font-medium text-status-success-text",
745
780
  children: t.successCount.toLocaleString()
746
781
  })] }),
747
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
782
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
748
783
  className: "text-xs text-muted-foreground",
749
784
  children: a("devportal.failed", "Failed")
750
- }), /* @__PURE__ */ G("p", {
785
+ }), /* @__PURE__ */ Y("p", {
751
786
  className: "font-medium text-status-error-text",
752
787
  children: t.failureCount.toLocaleString()
753
788
  })] }),
754
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
789
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
755
790
  className: "text-xs text-muted-foreground",
756
791
  children: a("devportal.successRate", "Success Rate")
757
- }), /* @__PURE__ */ K("p", {
792
+ }), /* @__PURE__ */ X("p", {
758
793
  className: "font-medium",
759
794
  children: [t.successCount + t.failureCount > 0 ? (t.successCount / (t.successCount + t.failureCount) * 100).toFixed(1) : "0.0", "%"]
760
795
  })] }),
761
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
796
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
762
797
  className: "text-xs text-muted-foreground",
763
798
  children: a("devportal.lastTriggered", "Last Triggered")
764
- }), /* @__PURE__ */ G("p", {
799
+ }), /* @__PURE__ */ Y("p", {
765
800
  className: "font-medium",
766
801
  children: t.lastTriggeredAt ? new Date(t.lastTriggeredAt).toLocaleString() : a("devportal.never", "Never")
767
802
  })] })
@@ -769,28 +804,28 @@ var oe = [
769
804
  })
770
805
  ]
771
806
  }, t.id))
772
- }) : /* @__PURE__ */ G(r, {
773
- icon: /* @__PURE__ */ G(H, { size: 32 }),
807
+ }) : /* @__PURE__ */ Y(r, {
808
+ icon: /* @__PURE__ */ Y(ue, { size: 32 }),
774
809
  title: a("devportal.noWebhooks", "No webhooks"),
775
810
  description: a("devportal.noWebhooksDescription", "Add a webhook to receive event notifications"),
776
- action: /* @__PURE__ */ K("button", {
811
+ action: /* @__PURE__ */ X("button", {
777
812
  onClick: () => n(`/apps/${e}/webhooks/new`),
778
813
  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",
779
- children: [/* @__PURE__ */ G(z, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
814
+ children: [/* @__PURE__ */ Y(U, { size: 16 }), a("devportal.addWebhook", "Add Webhook")]
780
815
  })
781
816
  })]
782
817
  });
783
- }, me = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: d, allVisibleSelected: f, partiallySelected: p }) => {
784
- let { t: m } = O(), h = (e, t) => {
818
+ }, Oe = ({ appName: e, delegations: n, onGrantDelegation: i, onRevokeDelegation: a, selectedDelegationIds: o, onToggleSelectDelegation: s, onToggleAllDelegations: c, onClearSelection: l, onRevokeSelected: d, allVisibleSelected: f, partiallySelected: p }) => {
819
+ let { t: m } = I(), h = (e, t) => {
785
820
  let n = m(e);
786
821
  return n === e ? t : n;
787
822
  }, g = n.filter((e) => e.status === "ACTIVE"), _ = n.filter((e) => e.status !== "ACTIVE");
788
- return /* @__PURE__ */ K("div", {
823
+ return /* @__PURE__ */ X("div", {
789
824
  className: "space-y-6",
790
825
  children: [
791
- /* @__PURE__ */ K("div", {
826
+ /* @__PURE__ */ X("div", {
792
827
  className: "flex items-center justify-between",
793
- children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("p", {
828
+ children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("p", {
794
829
  className: "text-sm text-muted-foreground",
795
830
  children: [
796
831
  n.length,
@@ -801,7 +836,7 @@ var oe = [
801
836
  " ",
802
837
  e
803
838
  ]
804
- }), g.length > 0 && /* @__PURE__ */ K("p", {
839
+ }), g.length > 0 && /* @__PURE__ */ X("p", {
805
840
  className: "text-xs text-muted-foreground mt-0.5",
806
841
  children: [
807
842
  g.length,
@@ -813,44 +848,44 @@ var oe = [
813
848
  " ",
814
849
  h("devportal.revokedExpired", "revoked/expired")
815
850
  ]
816
- })] }), /* @__PURE__ */ K("button", {
851
+ })] }), /* @__PURE__ */ X("button", {
817
852
  onClick: i,
818
853
  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",
819
- children: [/* @__PURE__ */ G(z, { size: 16 }), h("devportal.grantDelegation", "Grant Delegation")]
854
+ children: [/* @__PURE__ */ Y(U, { size: 16 }), h("devportal.grantDelegation", "Grant Delegation")]
820
855
  })]
821
856
  }),
822
- g.length > 0 && /* @__PURE__ */ G("div", {
857
+ g.length > 0 && /* @__PURE__ */ Y("div", {
823
858
  className: "rounded-lg border bg-card p-4",
824
- children: /* @__PURE__ */ K("div", {
859
+ children: /* @__PURE__ */ X("div", {
825
860
  className: "flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
826
- children: [/* @__PURE__ */ K("div", {
861
+ children: [/* @__PURE__ */ X("div", {
827
862
  className: "flex flex-wrap items-center gap-3",
828
- children: [/* @__PURE__ */ K("div", {
863
+ children: [/* @__PURE__ */ X("div", {
829
864
  className: "flex items-center gap-2",
830
- children: [/* @__PURE__ */ G(u, {
865
+ children: [/* @__PURE__ */ Y(u, {
831
866
  checked: f,
832
867
  indeterminate: p,
833
868
  onChange: c,
834
869
  ariaLabel: h("devportal.selectAllActiveDelegations", "Select all active app delegations")
835
- }), /* @__PURE__ */ G("span", {
870
+ }), /* @__PURE__ */ Y("span", {
836
871
  className: "text-sm font-medium",
837
872
  children: h("devportal.selectAllActive", "Select all active")
838
873
  })]
839
- }), o.size > 0 && /* @__PURE__ */ G("button", {
874
+ }), o.size > 0 && /* @__PURE__ */ Y("button", {
840
875
  onClick: l,
841
876
  className: "text-sm text-muted-foreground hover:text-foreground",
842
877
  children: h("devportal.clearSelection", "Clear selection")
843
878
  })]
844
- }), /* @__PURE__ */ K("div", {
879
+ }), /* @__PURE__ */ X("div", {
845
880
  className: "flex flex-wrap items-center gap-2",
846
- children: [/* @__PURE__ */ K("span", {
881
+ children: [/* @__PURE__ */ X("span", {
847
882
  className: "rounded-full bg-muted px-3 py-1 text-sm font-medium text-muted-foreground",
848
883
  children: [
849
884
  o.size,
850
885
  " ",
851
886
  h("devportal.selected", "selected")
852
887
  ]
853
- }), /* @__PURE__ */ K("button", {
888
+ }), /* @__PURE__ */ X("button", {
854
889
  onClick: d,
855
890
  disabled: o.size === 0,
856
891
  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",
@@ -859,33 +894,33 @@ var oe = [
859
894
  })]
860
895
  })
861
896
  }),
862
- n.length > 0 ? /* @__PURE__ */ G("div", {
897
+ n.length > 0 ? /* @__PURE__ */ Y("div", {
863
898
  className: "space-y-4",
864
- children: n.map((e) => /* @__PURE__ */ K("div", {
899
+ children: n.map((e) => /* @__PURE__ */ X("div", {
865
900
  className: "rounded-lg border bg-card p-4 space-y-4",
866
901
  children: [
867
- /* @__PURE__ */ K("div", {
902
+ /* @__PURE__ */ X("div", {
868
903
  className: "flex items-start justify-between",
869
- children: [/* @__PURE__ */ K("div", {
904
+ children: [/* @__PURE__ */ X("div", {
870
905
  className: "flex items-start gap-3",
871
- children: [e.status === "ACTIVE" && /* @__PURE__ */ G("div", {
906
+ children: [e.status === "ACTIVE" && /* @__PURE__ */ Y("div", {
872
907
  onClick: (e) => e.stopPropagation(),
873
- children: /* @__PURE__ */ G(u, {
908
+ children: /* @__PURE__ */ Y(u, {
874
909
  checked: o.has(e.id),
875
910
  onChange: (t) => s(e.id, t),
876
911
  ariaLabel: `Select delegation ${e.id}`,
877
912
  className: "mt-1"
878
913
  })
879
- }), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K("div", {
914
+ }), /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ X("div", {
880
915
  className: "flex items-center gap-2",
881
- children: [/* @__PURE__ */ K("h3", {
916
+ children: [/* @__PURE__ */ X("h3", {
882
917
  className: "font-medium",
883
918
  children: ["Delegation #", e.id.slice(0, 8)]
884
- }), /* @__PURE__ */ G("span", {
885
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", J[e.status]),
919
+ }), /* @__PURE__ */ Y("span", {
920
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", _e[e.status]),
886
921
  children: e.status
887
922
  })]
888
- }), /* @__PURE__ */ K("p", {
923
+ }), /* @__PURE__ */ X("p", {
889
924
  className: "text-sm text-muted-foreground mt-1",
890
925
  children: [
891
926
  h("devportal.granted", "Granted"),
@@ -897,55 +932,55 @@ var oe = [
897
932
  e.grantedBy === e.userId ? h("devportal.you", "you") : e.grantedBy.slice(0, 8)
898
933
  ]
899
934
  })] })]
900
- }), e.status === "ACTIVE" && /* @__PURE__ */ K("button", {
935
+ }), e.status === "ACTIVE" && /* @__PURE__ */ X("button", {
901
936
  onClick: () => a(e.id),
902
937
  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",
903
- children: [/* @__PURE__ */ G(U, { size: 14 }), h("devportal.revoke", "Revoke")]
938
+ children: [/* @__PURE__ */ Y(de, { size: 14 }), h("devportal.revoke", "Revoke")]
904
939
  })]
905
940
  }),
906
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
941
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
907
942
  className: "text-xs text-muted-foreground mb-2",
908
943
  children: h("devportal.grantedScopes", "Granted Scopes")
909
- }), /* @__PURE__ */ G("div", {
944
+ }), /* @__PURE__ */ Y("div", {
910
945
  className: "flex flex-wrap gap-2",
911
- children: e.scopes.map((e) => /* @__PURE__ */ G("span", {
946
+ children: e.scopes.map((e) => /* @__PURE__ */ Y("span", {
912
947
  className: "rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs text-status-success-text",
913
948
  children: e
914
949
  }, e))
915
950
  })] }),
916
- e.workspaceIds.length > 0 && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("p", {
951
+ e.workspaceIds.length > 0 && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("p", {
917
952
  className: "text-xs text-muted-foreground mb-2",
918
953
  children: h("devportal.workspaceScope", "Workspace Scope")
919
- }), /* @__PURE__ */ G("div", {
954
+ }), /* @__PURE__ */ Y("div", {
920
955
  className: "flex flex-wrap gap-2",
921
- children: e.workspaceIds.map((e) => /* @__PURE__ */ G("code", {
956
+ children: e.workspaceIds.map((e) => /* @__PURE__ */ Y("code", {
922
957
  className: "rounded bg-muted px-2 py-0.5 text-xs",
923
958
  children: e
924
959
  }, e))
925
960
  })] }),
926
- /* @__PURE__ */ K("div", {
961
+ /* @__PURE__ */ X("div", {
927
962
  className: "flex items-center gap-4 text-xs text-muted-foreground",
928
963
  children: [
929
- e.expiresAt && /* @__PURE__ */ K("span", {
964
+ e.expiresAt && /* @__PURE__ */ X("span", {
930
965
  className: "flex items-center gap-1",
931
966
  children: [
932
- /* @__PURE__ */ G(N, { size: 12 }),
967
+ /* @__PURE__ */ Y(ne, { size: 12 }),
933
968
  h("devportal.expires", "Expires"),
934
969
  " ",
935
970
  new Date(e.expiresAt).toLocaleDateString()
936
971
  ]
937
972
  }),
938
- !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ K("span", {
973
+ !e.expiresAt && e.status === "ACTIVE" && /* @__PURE__ */ X("span", {
939
974
  className: "flex items-center gap-1",
940
- children: [/* @__PURE__ */ G(M, {
975
+ children: [/* @__PURE__ */ Y(z, {
941
976
  size: 12,
942
977
  className: "text-status-success-text"
943
978
  }), h("devportal.noExpiration", "No expiration")]
944
979
  }),
945
- e.revokedAt && /* @__PURE__ */ K("span", {
980
+ e.revokedAt && /* @__PURE__ */ X("span", {
946
981
  className: "flex items-center gap-1",
947
982
  children: [
948
- /* @__PURE__ */ G(U, {
983
+ /* @__PURE__ */ Y(de, {
949
984
  size: 12,
950
985
  className: "text-status-error-text"
951
986
  }),
@@ -958,52 +993,52 @@ var oe = [
958
993
  })
959
994
  ]
960
995
  }, e.id))
961
- }) : /* @__PURE__ */ G(r, {
962
- icon: /* @__PURE__ */ G(V, { size: 32 }),
996
+ }) : /* @__PURE__ */ Y(r, {
997
+ icon: /* @__PURE__ */ Y(q, { size: 32 }),
963
998
  title: h("devportal.noDelegations", "No delegations"),
964
999
  description: h("devportal.noDelegationsDescription", "Grant a delegation to allow this app to act on your behalf"),
965
- action: /* @__PURE__ */ K("button", {
1000
+ action: /* @__PURE__ */ X("button", {
966
1001
  onClick: i,
967
1002
  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",
968
- children: [/* @__PURE__ */ G(z, { size: 16 }), h("devportal.grantDelegation", "Grant Delegation")]
1003
+ children: [/* @__PURE__ */ Y(U, { size: 16 }), h("devportal.grantDelegation", "Grant Delegation")]
969
1004
  })
970
1005
  })
971
1006
  ]
972
1007
  });
973
- }, he = ({ analytics: e }) => {
974
- let { t } = O(), n = (e, n) => {
1008
+ }, ke = ({ analytics: e }) => {
1009
+ let { t } = I(), n = (e, n) => {
975
1010
  let r = t(e);
976
1011
  return r === e ? n : r;
977
1012
  }, i = e[0], o = e[1], s = (e, t) => t ? (e - t) / t * 100 : 0;
978
- return /* @__PURE__ */ K("div", {
1013
+ return /* @__PURE__ */ X("div", {
979
1014
  className: "space-y-6",
980
- children: [/* @__PURE__ */ K("div", {
1015
+ children: [/* @__PURE__ */ X("div", {
981
1016
  className: "grid gap-4 sm:grid-cols-4",
982
1017
  children: [
983
- /* @__PURE__ */ G(Q, {
1018
+ /* @__PURE__ */ Y(Q, {
984
1019
  label: n("devportal.activeUsers", "Active Users"),
985
1020
  value: i?.activeUsers.toLocaleString() || "0",
986
1021
  trend: o ? s(i.activeUsers, o.activeUsers) : void 0
987
1022
  }),
988
- /* @__PURE__ */ G(Q, {
1023
+ /* @__PURE__ */ Y(Q, {
989
1024
  label: n("devportal.apiCalls", "API Calls"),
990
1025
  value: i ? `${(i.apiCalls / 1e3).toFixed(1)}K` : "0",
991
1026
  trend: o ? s(i.apiCalls, o.apiCalls) : void 0
992
1027
  }),
993
- /* @__PURE__ */ G(Q, {
1028
+ /* @__PURE__ */ Y(Q, {
994
1029
  label: n("devportal.avgResponseTime", "Avg Response Time"),
995
1030
  value: i?.avgResponseTime ? `${i.avgResponseTime}ms` : n("devportal.notAvailable", "N/A"),
996
1031
  trend: o && i?.avgResponseTime ? -s(i.avgResponseTime, o.avgResponseTime || 1) : void 0
997
1032
  }),
998
- /* @__PURE__ */ G(Q, {
1033
+ /* @__PURE__ */ Y(Q, {
999
1034
  label: n("devportal.errorRate", "Error Rate"),
1000
1035
  value: i && i.apiCalls > 0 ? `${(i.errors / i.apiCalls * 100).toFixed(2)}%` : "0%",
1001
1036
  trend: o && i && i.apiCalls > 0 && o.apiCalls > 0 ? -s(i.errors / i.apiCalls, o.errors / o.apiCalls) : void 0
1002
1037
  })
1003
1038
  ]
1004
- }), /* @__PURE__ */ G(a, {
1039
+ }), /* @__PURE__ */ Y(a, {
1005
1040
  title: n("devportal.dailyBreakdown", "Daily Breakdown"),
1006
- children: e.length > 0 ? /* @__PURE__ */ G(f, {
1041
+ children: e.length > 0 ? /* @__PURE__ */ Y(p, {
1007
1042
  data: e,
1008
1043
  keyField: "id",
1009
1044
  columns: [
@@ -1043,18 +1078,18 @@ var oe = [
1043
1078
  render: (e) => e.sessions.toLocaleString()
1044
1079
  }
1045
1080
  ]
1046
- }) : /* @__PURE__ */ G(r, {
1047
- icon: /* @__PURE__ */ G(j, { size: 32 }),
1081
+ }) : /* @__PURE__ */ Y(r, {
1082
+ icon: /* @__PURE__ */ Y(R, { size: 32 }),
1048
1083
  title: n("devportal.noAnalyticsData", "No analytics data"),
1049
1084
  description: n("devportal.noAnalyticsDataDescription", "Analytics data will appear here once the application starts receiving traffic.")
1050
1085
  })
1051
1086
  })]
1052
1087
  });
1053
- }, ge = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", _e = ({ app: t }) => {
1054
- let { apiGatewayUrl: n, authToken: r } = e(), { t: i } = O(), a = (e, t) => {
1088
+ }, Ae = "# Sample query - modify as needed\nquery IntrospectSchema {\n __schema {\n queryType { name }\n mutationType { name }\n types {\n name\n kind\n }\n }\n}", je = ({ app: t }) => {
1089
+ let { apiGatewayUrl: n, authToken: r } = e(), { t: i } = I(), a = (e, t) => {
1055
1090
  let n = i(e);
1056
1091
  return n === e ? t : n;
1057
- }, [o, s] = D(ge), [c, l] = D("{}"), [u, d] = D(""), [f, p] = D(!1), [m, h] = D(`${n || "http://localhost:4000"}/global/graphql`), [g, _] = D(r || ""), [v, y] = D(!1), b = T(async () => {
1092
+ }, [o, s] = F(Ae), [c, l] = F("{}"), [u, d] = F(""), [f, p] = F(!1), [m, h] = F(`${n || "http://localhost:4000"}/global/graphql`), [g, _] = F(r || ""), [v, y] = F(!1), b = j(async () => {
1058
1093
  p(!0), d("");
1059
1094
  try {
1060
1095
  let e = {};
@@ -1085,24 +1120,24 @@ var oe = [
1085
1120
  c,
1086
1121
  m,
1087
1122
  g
1088
- ]), x = T(() => {
1123
+ ]), x = j(() => {
1089
1124
  r && _(r), y(!0);
1090
1125
  }, [r]);
1091
- return /* @__PURE__ */ K("div", {
1126
+ return /* @__PURE__ */ X("div", {
1092
1127
  className: "space-y-4",
1093
1128
  children: [
1094
- /* @__PURE__ */ K("div", {
1129
+ /* @__PURE__ */ X("div", {
1095
1130
  className: "flex items-center justify-between",
1096
- children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h3", {
1131
+ children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("h3", {
1097
1132
  className: "text-lg font-semibold",
1098
1133
  children: a("devportal.apiPlayground", "API Playground")
1099
- }), /* @__PURE__ */ K("p", {
1134
+ }), /* @__PURE__ */ X("p", {
1100
1135
  className: "text-sm text-muted-foreground",
1101
1136
  children: [
1102
1137
  a("devportal.apiPlaygroundDescription", "Test GraphQL APIs in the context of"),
1103
1138
  " ",
1104
- /* @__PURE__ */ G("strong", { children: t.name }),
1105
- t.appId && /* @__PURE__ */ K("span", {
1139
+ /* @__PURE__ */ Y("strong", { children: t.name }),
1140
+ t.appId && /* @__PURE__ */ X("span", {
1106
1141
  className: "ml-1 text-xs text-muted-foreground",
1107
1142
  children: [
1108
1143
  "(OAuth App: ",
@@ -1111,39 +1146,39 @@ var oe = [
1111
1146
  ]
1112
1147
  })
1113
1148
  ]
1114
- })] }), /* @__PURE__ */ K("button", {
1149
+ })] }), /* @__PURE__ */ X("button", {
1115
1150
  onClick: x,
1116
1151
  className: "flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-accent transition-colors",
1117
- children: [/* @__PURE__ */ G(I, { size: 14 }), a("devportal.autoFillCredentials", "Auto-fill Credentials")]
1152
+ children: [/* @__PURE__ */ Y(V, { size: 14 }), a("devportal.autoFillCredentials", "Auto-fill Credentials")]
1118
1153
  })]
1119
1154
  }),
1120
- v && /* @__PURE__ */ K("div", {
1155
+ v && /* @__PURE__ */ X("div", {
1121
1156
  className: "rounded-lg border bg-status-info-bg-subtle p-4 text-sm space-y-2",
1122
1157
  children: [
1123
- /* @__PURE__ */ G("p", {
1158
+ /* @__PURE__ */ Y("p", {
1124
1159
  className: "font-medium text-status-info-text",
1125
1160
  children: a("devportal.authenticationGuide", "Authentication Guide")
1126
1161
  }),
1127
- /* @__PURE__ */ K("p", {
1162
+ /* @__PURE__ */ X("p", {
1128
1163
  className: "text-status-info-text",
1129
1164
  children: [
1130
1165
  a("devportal.authenticationGuideText", "Your current session token has been filled in. For app-level authentication (Client Credentials flow), use the"),
1131
1166
  " ",
1132
- /* @__PURE__ */ G("strong", { children: a("devportal.oauthClientsTab", "OAuth Clients") }),
1167
+ /* @__PURE__ */ Y("strong", { children: a("devportal.oauthClientsTab", "OAuth Clients") }),
1133
1168
  " ",
1134
1169
  a("devportal.authenticationGuideText2", "tab to get the app's clientId and clientSecret, then call:")
1135
1170
  ]
1136
1171
  }),
1137
- /* @__PURE__ */ G("pre", {
1172
+ /* @__PURE__ */ Y("pre", {
1138
1173
  className: "rounded bg-status-info-bg-subtle p-2 text-xs overflow-x-auto text-status-info-text",
1139
1174
  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}"
1140
1175
  }),
1141
- /* @__PURE__ */ K("p", {
1176
+ /* @__PURE__ */ X("p", {
1142
1177
  className: "text-status-info-text",
1143
1178
  children: [
1144
1179
  a("devportal.useReturnedAccessToken", "Use the returned"),
1145
1180
  " ",
1146
- /* @__PURE__ */ G("code", {
1181
+ /* @__PURE__ */ Y("code", {
1147
1182
  className: "bg-status-info-bg-subtle px-1 rounded",
1148
1183
  children: "accessToken"
1149
1184
  }),
@@ -1151,98 +1186,644 @@ var oe = [
1151
1186
  a("devportal.asBearerToken", "as the Bearer token below.")
1152
1187
  ]
1153
1188
  }),
1154
- /* @__PURE__ */ G("button", {
1189
+ /* @__PURE__ */ Y("button", {
1155
1190
  onClick: () => y(!1),
1156
1191
  className: "text-xs text-accent-blue hover:underline",
1157
1192
  children: a("devportal.dismiss", "Dismiss")
1158
1193
  })
1159
1194
  ]
1160
1195
  }),
1161
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
1196
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1162
1197
  className: "block text-sm font-medium mb-1",
1163
1198
  children: a("devportal.gatewayEndpoint", "Gateway Endpoint")
1164
- }), /* @__PURE__ */ K("div", {
1199
+ }), /* @__PURE__ */ X("div", {
1165
1200
  className: "flex gap-2",
1166
- children: [/* @__PURE__ */ G("input", {
1201
+ children: [/* @__PURE__ */ Y("input", {
1167
1202
  type: "text",
1168
1203
  value: m,
1169
1204
  onChange: (e) => h(e.target.value),
1170
1205
  className: "flex-1 rounded-md border px-3 py-2 text-sm font-mono bg-background"
1171
- }), /* @__PURE__ */ K("select", {
1206
+ }), /* @__PURE__ */ X("select", {
1172
1207
  onChange: (e) => h(e.target.value),
1173
1208
  className: "rounded-md border px-3 py-2 text-sm bg-background",
1174
1209
  value: m,
1175
- children: [/* @__PURE__ */ G("option", {
1210
+ children: [/* @__PURE__ */ Y("option", {
1176
1211
  value: `${n || "http://localhost:4000"}/global/graphql`,
1177
1212
  children: a("devportal.globalGateway", "Global Gateway")
1178
- }), /* @__PURE__ */ G("option", {
1213
+ }), /* @__PURE__ */ Y("option", {
1179
1214
  value: `${n || "http://localhost:4000"}/workspaces/graphql`,
1180
1215
  children: a("devportal.workspaceGateway", "Workspace Gateway")
1181
1216
  })]
1182
1217
  })]
1183
1218
  })] }),
1184
- /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
1219
+ /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1185
1220
  className: "block text-sm font-medium mb-1",
1186
1221
  children: a("devportal.bearerToken", "Bearer Token")
1187
- }), /* @__PURE__ */ G("input", {
1222
+ }), /* @__PURE__ */ Y("input", {
1188
1223
  type: "password",
1189
1224
  value: g,
1190
1225
  onChange: (e) => _(e.target.value),
1191
1226
  placeholder: a("devportal.pasteAccessToken", "Paste access token here..."),
1192
1227
  className: "w-full rounded-md border px-3 py-2 text-sm font-mono bg-background"
1193
1228
  })] }),
1194
- /* @__PURE__ */ K("div", {
1229
+ /* @__PURE__ */ X("div", {
1195
1230
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
1196
- children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
1231
+ children: [/* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1197
1232
  className: "block text-sm font-medium mb-1",
1198
1233
  children: a("devportal.query", "Query")
1199
- }), /* @__PURE__ */ G("textarea", {
1234
+ }), /* @__PURE__ */ Y("textarea", {
1200
1235
  value: o,
1201
1236
  onChange: (e) => s(e.target.value),
1202
1237
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1203
1238
  spellCheck: !1
1204
- })] }), /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
1239
+ })] }), /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1205
1240
  className: "block text-sm font-medium mb-1",
1206
1241
  children: a("devportal.variablesJson", "Variables (JSON)")
1207
- }), /* @__PURE__ */ G("textarea", {
1242
+ }), /* @__PURE__ */ Y("textarea", {
1208
1243
  value: c,
1209
1244
  onChange: (e) => l(e.target.value),
1210
1245
  className: "w-full h-64 rounded-md border px-3 py-2 text-sm font-mono bg-background resize-y",
1211
1246
  spellCheck: !1
1212
1247
  })] })]
1213
1248
  }),
1214
- /* @__PURE__ */ K("button", {
1249
+ /* @__PURE__ */ X("button", {
1215
1250
  onClick: b,
1216
1251
  disabled: f,
1217
1252
  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",
1218
- children: [f ? /* @__PURE__ */ G(L, {
1253
+ children: [f ? /* @__PURE__ */ Y(H, {
1219
1254
  size: 16,
1220
1255
  className: "animate-spin"
1221
- }) : /* @__PURE__ */ G(F, { size: 16 }), f ? a("devportal.executing", "Executing...") : a("devportal.executeQuery", "Execute Query")]
1256
+ }) : /* @__PURE__ */ Y(B, { size: 16 }), f ? a("devportal.executing", "Executing...") : a("devportal.executeQuery", "Execute Query")]
1222
1257
  }),
1223
- u && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("label", {
1258
+ u && /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1224
1259
  className: "block text-sm font-medium mb-1",
1225
1260
  children: a("devportal.response", "Response")
1226
- }), /* @__PURE__ */ G("pre", {
1261
+ }), /* @__PURE__ */ Y("pre", {
1227
1262
  className: "w-full max-h-96 overflow-auto rounded-md border bg-muted p-4 text-xs font-mono",
1228
1263
  children: u
1229
1264
  })] })
1230
1265
  ]
1231
1266
  });
1267
+ }, Me = new Set(["workflow", "template"]), Ne = [
1268
+ {
1269
+ value: "FREE",
1270
+ label: "Free"
1271
+ },
1272
+ {
1273
+ value: "FREEMIUM",
1274
+ label: "Freemium"
1275
+ },
1276
+ {
1277
+ value: "PAID",
1278
+ label: "Paid"
1279
+ },
1280
+ {
1281
+ value: "SUBSCRIPTION",
1282
+ label: "Subscription"
1283
+ },
1284
+ {
1285
+ value: "USAGE_BASED",
1286
+ label: "Usage-based"
1287
+ }
1288
+ ], Pe = [
1289
+ {
1290
+ value: "agent",
1291
+ label: "Agent"
1292
+ },
1293
+ {
1294
+ value: "node",
1295
+ label: "Node"
1296
+ },
1297
+ {
1298
+ value: "widget",
1299
+ label: "Widget"
1300
+ },
1301
+ {
1302
+ value: "workflow",
1303
+ label: "Workflow"
1304
+ },
1305
+ {
1306
+ value: "botapp",
1307
+ label: "Bot App"
1308
+ },
1309
+ {
1310
+ value: "console",
1311
+ label: "Console"
1312
+ },
1313
+ {
1314
+ value: "vibemodule",
1315
+ label: "Vibe Module"
1316
+ },
1317
+ {
1318
+ value: "dashboard",
1319
+ label: "Dashboard"
1320
+ },
1321
+ {
1322
+ value: "parser",
1323
+ label: "Parser"
1324
+ },
1325
+ {
1326
+ value: "datasink",
1327
+ label: "Data Sink"
1328
+ },
1329
+ {
1330
+ value: "app",
1331
+ label: "App"
1332
+ },
1333
+ {
1334
+ value: "template",
1335
+ label: "Template"
1336
+ },
1337
+ {
1338
+ value: "integration",
1339
+ label: "Integration"
1340
+ },
1341
+ {
1342
+ value: "extension",
1343
+ label: "Extension"
1344
+ },
1345
+ {
1346
+ value: "theme",
1347
+ label: "Theme"
1348
+ },
1349
+ {
1350
+ value: "plugin",
1351
+ label: "Plugin"
1352
+ },
1353
+ {
1354
+ value: "component",
1355
+ label: "Component"
1356
+ }
1357
+ ], Fe = [
1358
+ {
1359
+ value: "npm",
1360
+ label: "npm"
1361
+ },
1362
+ {
1363
+ value: "git",
1364
+ label: "git"
1365
+ },
1366
+ {
1367
+ value: "zip",
1368
+ label: "zip"
1369
+ },
1370
+ {
1371
+ value: "builtin",
1372
+ label: "builtin"
1373
+ }
1374
+ ];
1375
+ function Ie(e) {
1376
+ 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") : "";
1377
+ return {
1378
+ iconUrl: e.iconUrl ?? "",
1379
+ bannerUrl: e.bannerUrl ?? "",
1380
+ videoUrl: e.videoUrl ?? "",
1381
+ shortDescription: e.shortDescription ?? "",
1382
+ description: e.description ?? "",
1383
+ screenshotsText: s,
1384
+ websiteUrl: e.websiteUrl ?? "",
1385
+ documentationUrl: e.documentationUrl ?? "",
1386
+ githubUrl: e.githubUrl ?? "",
1387
+ supportUrl: e.supportUrl ?? "",
1388
+ privacyPolicyUrl: e.privacyPolicyUrl ?? "",
1389
+ termsOfServiceUrl: e.termsOfServiceUrl ?? "",
1390
+ pricingType: e.pricingType ?? "",
1391
+ price: typeof o.price == "number" ? String(o.price) : "",
1392
+ currency: typeof o.currency == "string" ? o.currency : "",
1393
+ manifestItemType: typeof t.itemType == "string" ? t.itemType : "",
1394
+ manifestDisplayName: typeof n.displayName == "string" ? n.displayName : "",
1395
+ manifestVersion: typeof n.version == "string" ? n.version : "",
1396
+ manifestInstallType: typeof r.type == "string" ? r.type : "npm",
1397
+ manifestPackageName: typeof r.packageName == "string" ? r.packageName : "",
1398
+ manifestRegistryUrl: typeof r.registryUrl == "string" ? r.registryUrl : "",
1399
+ manifestPermissionsText: a.join("\n"),
1400
+ manifestMinPlatformVersion: typeof i.minPlatformVersion == "string" ? i.minPlatformVersion : "",
1401
+ manifestJsonContent: typeof t.jsonContent == "string" ? t.jsonContent : typeof t.content == "string" ? t.content : ""
1402
+ };
1403
+ }
1404
+ var Le = ({ app: t }) => {
1405
+ let { workspacesGatewayUrl: n, authToken: r, workspaceId: i, getWorkspaceToken: o } = e(), { t: s } = I(), c = (e, t) => {
1406
+ let n = s(e);
1407
+ return n === e ? t : n;
1408
+ }, [l, u] = F(() => Ie(t)), [f, p] = F(!1), m = P(t);
1409
+ m.current = t;
1410
+ let [v] = D();
1411
+ M(() => {
1412
+ u(Ie(m.current));
1413
+ }, [t.id]);
1414
+ let y = (e, t) => {
1415
+ u((n) => ({
1416
+ ...n,
1417
+ [e]: t
1418
+ }));
1419
+ }, b = async () => {
1420
+ p(!0);
1421
+ try {
1422
+ let e = l.screenshotsText.split("\n").map((e) => e.trim()).filter(Boolean), n = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), r = Me.has(l.manifestItemType), i = t.manifest ?? {}, a = {
1423
+ manifestVersion: typeof i.manifestVersion == "string" ? i.manifestVersion : "1.0",
1424
+ itemType: l.manifestItemType || void 0,
1425
+ identity: {
1426
+ version: l.manifestVersion || "1.0.0",
1427
+ displayName: l.manifestDisplayName
1428
+ },
1429
+ ...r ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1430
+ type: l.manifestInstallType,
1431
+ packageName: l.manifestPackageName,
1432
+ registryUrl: l.manifestRegistryUrl
1433
+ } } },
1434
+ permissions: n,
1435
+ compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1436
+ }, o = { ...t.pricingDetails ?? {} };
1437
+ if (l.pricingType !== "FREE") {
1438
+ let e = parseFloat(l.price);
1439
+ isNaN(e) || (o.price = e), l.currency && (o.currency = l.currency);
1440
+ }
1441
+ await v({ variables: {
1442
+ id: t.id,
1443
+ input: {
1444
+ iconUrl: l.iconUrl || null,
1445
+ bannerUrl: l.bannerUrl || null,
1446
+ videoUrl: l.videoUrl || null,
1447
+ shortDescription: l.shortDescription || null,
1448
+ description: l.description || null,
1449
+ screenshots: e.length > 0 ? e : null,
1450
+ websiteUrl: l.websiteUrl || null,
1451
+ documentationUrl: l.documentationUrl || null,
1452
+ githubUrl: l.githubUrl || null,
1453
+ supportUrl: l.supportUrl || null,
1454
+ privacyPolicyUrl: l.privacyPolicyUrl || null,
1455
+ termsOfServiceUrl: l.termsOfServiceUrl || null,
1456
+ pricingType: l.pricingType || null,
1457
+ pricingDetails: Object.keys(o).length > 0 ? o : null,
1458
+ manifest: a
1459
+ }
1460
+ } }), d("success");
1461
+ } catch {
1462
+ d("error");
1463
+ } finally {
1464
+ p(!1);
1465
+ }
1466
+ }, x = P(null), S = P(null), { upload: C, uploading: w, progress: T, error: E } = A(n, r, i, o), ee = j(async (e) => {
1467
+ let t = e.target.files?.[0];
1468
+ if (t) {
1469
+ e.target.value = "";
1470
+ try {
1471
+ let e = await C(t);
1472
+ u((t) => ({
1473
+ ...t,
1474
+ manifestRegistryUrl: e.downloadUrl
1475
+ }));
1476
+ } catch {}
1477
+ }
1478
+ }, [C]), O = j((e) => {
1479
+ let t = e.target.files?.[0];
1480
+ if (!t) return;
1481
+ let n = new FileReader();
1482
+ n.onload = (e) => {
1483
+ try {
1484
+ let t = JSON.parse(e.target?.result), n = t.identity ?? {}, r = (t.digital ?? {}).install ?? {}, i = t.compatibility ?? {}, a = Array.isArray(t.permissions) ? t.permissions : [];
1485
+ u((e) => ({
1486
+ ...e,
1487
+ manifestItemType: typeof t.itemType == "string" ? t.itemType : e.manifestItemType,
1488
+ manifestDisplayName: typeof n.displayName == "string" ? n.displayName : e.manifestDisplayName,
1489
+ manifestVersion: typeof n.version == "string" ? n.version : e.manifestVersion,
1490
+ manifestInstallType: typeof r.type == "string" ? r.type : e.manifestInstallType,
1491
+ manifestPackageName: typeof r.packageName == "string" ? r.packageName : e.manifestPackageName,
1492
+ manifestRegistryUrl: typeof r.registryUrl == "string" ? r.registryUrl : typeof r.url == "string" ? r.url : e.manifestRegistryUrl,
1493
+ manifestPermissionsText: a.length > 0 ? a.join("\n") : e.manifestPermissionsText,
1494
+ manifestMinPlatformVersion: typeof i.minPlatformVersion == "string" ? i.minPlatformVersion : e.manifestMinPlatformVersion
1495
+ }));
1496
+ } catch {}
1497
+ }, n.readAsText(t), e.target.value = "";
1498
+ }, []), k = j(() => {
1499
+ let e = l.manifestPermissionsText.split("\n").map((e) => e.trim()).filter(Boolean), n = Me.has(l.manifestItemType), r = {
1500
+ manifestVersion: "1.0",
1501
+ itemType: l.manifestItemType || void 0,
1502
+ identity: {
1503
+ version: l.manifestVersion || "1.0.0",
1504
+ displayName: l.manifestDisplayName
1505
+ },
1506
+ ...n ? { jsonContent: l.manifestJsonContent || void 0 } : { digital: { install: {
1507
+ type: l.manifestInstallType,
1508
+ packageName: l.manifestPackageName,
1509
+ registryUrl: l.manifestRegistryUrl
1510
+ } } },
1511
+ permissions: e,
1512
+ compatibility: { minPlatformVersion: l.manifestMinPlatformVersion }
1513
+ }, i = new Blob([JSON.stringify(r, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
1514
+ o.href = a, o.download = `${t.slug}-manifest.json`, o.click(), URL.revokeObjectURL(a);
1515
+ }, [t.slug, l]), N = l.pricingType !== "FREE", L = Me.has(l.manifestItemType), te = !L && (l.manifestInstallType === "npm" || l.manifestInstallType === "git"), R = !L && (l.manifestInstallType === "git" || l.manifestInstallType === "zip"), z = l.manifestInstallType === "zip" ? c("devportal.zipDownloadUrl", "Zip Download URL") : c("devportal.repositoryUrl", "Repository URL"), ne = l.manifestInstallType === "zip" ? "https://cdn.example.com/my-app-1.0.0.zip" : "https://github.com/org/repo";
1516
+ return /* @__PURE__ */ X("div", {
1517
+ className: "space-y-8 max-w-3xl",
1518
+ children: [
1519
+ /* @__PURE__ */ Y(a, {
1520
+ title: c("devportal.storePresentation", "Store Presentation"),
1521
+ description: c("devportal.storePresentationDescription", "Visual assets and descriptions shown in the store listing"),
1522
+ children: /* @__PURE__ */ X("div", {
1523
+ className: "space-y-4",
1524
+ children: [
1525
+ /* @__PURE__ */ Y(h, {
1526
+ label: c("devportal.iconUrl", "Icon URL"),
1527
+ value: l.iconUrl,
1528
+ onChange: (e) => y("iconUrl", e.target.value),
1529
+ placeholder: "https://..."
1530
+ }),
1531
+ /* @__PURE__ */ Y(h, {
1532
+ label: c("devportal.bannerUrl", "Banner URL"),
1533
+ value: l.bannerUrl,
1534
+ onChange: (e) => y("bannerUrl", e.target.value),
1535
+ placeholder: "https://..."
1536
+ }),
1537
+ /* @__PURE__ */ Y(h, {
1538
+ label: c("devportal.videoUrl", "Video URL"),
1539
+ value: l.videoUrl,
1540
+ onChange: (e) => y("videoUrl", e.target.value),
1541
+ placeholder: "https://...",
1542
+ hint: c("devportal.videoUrlHint", "YouTube or Vimeo embed URL")
1543
+ }),
1544
+ /* @__PURE__ */ Y(_, {
1545
+ label: c("devportal.shortDescription", "Short Description"),
1546
+ value: l.shortDescription,
1547
+ onChange: (e) => y("shortDescription", e.target.value),
1548
+ maxLength: 200,
1549
+ rows: 2,
1550
+ hint: `${l.shortDescription.length}/200 ${c("devportal.characters", "characters")}`
1551
+ }),
1552
+ /* @__PURE__ */ Y(_, {
1553
+ label: c("devportal.longDescription", "Long Description"),
1554
+ value: l.description,
1555
+ onChange: (e) => y("description", e.target.value),
1556
+ rows: 4
1557
+ }),
1558
+ /* @__PURE__ */ Y(_, {
1559
+ label: c("devportal.screenshotUrls", "Screenshot URLs (one per line)"),
1560
+ value: l.screenshotsText,
1561
+ onChange: (e) => y("screenshotsText", e.target.value),
1562
+ rows: 4,
1563
+ placeholder: "https://...\nhttps://..."
1564
+ })
1565
+ ]
1566
+ })
1567
+ }),
1568
+ /* @__PURE__ */ Y(a, {
1569
+ title: c("devportal.linksPolicies", "Links & Policies"),
1570
+ description: c("devportal.linksPoliciesDescription", "External resources and legal documents for your application"),
1571
+ children: /* @__PURE__ */ X("div", {
1572
+ className: "grid gap-4 sm:grid-cols-2",
1573
+ children: [
1574
+ /* @__PURE__ */ Y(h, {
1575
+ label: c("devportal.websiteUrl", "Website URL"),
1576
+ value: l.websiteUrl,
1577
+ onChange: (e) => y("websiteUrl", e.target.value),
1578
+ placeholder: "https://..."
1579
+ }),
1580
+ /* @__PURE__ */ Y(h, {
1581
+ label: c("devportal.documentationUrl", "Documentation URL"),
1582
+ value: l.documentationUrl,
1583
+ onChange: (e) => y("documentationUrl", e.target.value),
1584
+ placeholder: "https://..."
1585
+ }),
1586
+ /* @__PURE__ */ Y(h, {
1587
+ label: c("devportal.githubUrl", "GitHub URL"),
1588
+ value: l.githubUrl,
1589
+ onChange: (e) => y("githubUrl", e.target.value),
1590
+ placeholder: "https://..."
1591
+ }),
1592
+ /* @__PURE__ */ Y(h, {
1593
+ label: c("devportal.supportUrl", "Support URL"),
1594
+ value: l.supportUrl,
1595
+ onChange: (e) => y("supportUrl", e.target.value),
1596
+ placeholder: "https://..."
1597
+ }),
1598
+ /* @__PURE__ */ Y(h, {
1599
+ label: `${c("devportal.privacyPolicyUrl", "Privacy Policy URL")} *`,
1600
+ value: l.privacyPolicyUrl,
1601
+ onChange: (e) => y("privacyPolicyUrl", e.target.value),
1602
+ placeholder: "https://...",
1603
+ hint: c("devportal.requiredForStore", "Required for store submission")
1604
+ }),
1605
+ /* @__PURE__ */ Y(h, {
1606
+ label: `${c("devportal.termsOfServiceUrl", "Terms of Service URL")} *`,
1607
+ value: l.termsOfServiceUrl,
1608
+ onChange: (e) => y("termsOfServiceUrl", e.target.value),
1609
+ placeholder: "https://...",
1610
+ hint: c("devportal.requiredForStore", "Required for store submission")
1611
+ })
1612
+ ]
1613
+ })
1614
+ }),
1615
+ /* @__PURE__ */ Y(a, {
1616
+ title: c("devportal.pricing", "Pricing"),
1617
+ description: c("devportal.pricingDescription", "Configure how your app is priced in the store"),
1618
+ children: /* @__PURE__ */ X("div", {
1619
+ className: "space-y-4",
1620
+ children: [/* @__PURE__ */ Y(g, {
1621
+ label: c("devportal.pricingType", "Pricing Type"),
1622
+ value: l.pricingType,
1623
+ onChange: (e) => y("pricingType", e.target.value),
1624
+ options: Ne
1625
+ }), N && /* @__PURE__ */ X("div", {
1626
+ className: "grid gap-4 sm:grid-cols-2",
1627
+ children: [/* @__PURE__ */ Y(h, {
1628
+ label: c("devportal.price", "Price"),
1629
+ type: "number",
1630
+ value: l.price,
1631
+ onChange: (e) => y("price", e.target.value),
1632
+ placeholder: "0.00"
1633
+ }), /* @__PURE__ */ Y(h, {
1634
+ label: c("devportal.currency", "Currency"),
1635
+ value: l.currency,
1636
+ onChange: (e) => y("currency", e.target.value),
1637
+ placeholder: "USD"
1638
+ })]
1639
+ })]
1640
+ })
1641
+ }),
1642
+ /* @__PURE__ */ Y(a, {
1643
+ title: c("devportal.manifestInstallConfig", "Manifest / Install Config"),
1644
+ description: c("devportal.manifestInstallConfigDescription", "Technical metadata the platform uses to install and run this item"),
1645
+ children: /* @__PURE__ */ X("div", {
1646
+ className: "space-y-4",
1647
+ children: [
1648
+ /* @__PURE__ */ X("div", {
1649
+ className: "flex gap-3 rounded-lg border border-border-subtle bg-bg-sunken p-4 text-sm",
1650
+ children: [/* @__PURE__ */ Y(oe, {
1651
+ size: 16,
1652
+ className: "mt-0.5 shrink-0 text-text-secondary"
1653
+ }), /* @__PURE__ */ X("div", {
1654
+ className: "space-y-1 text-text-secondary",
1655
+ children: [/* @__PURE__ */ Y("p", {
1656
+ className: "font-medium text-foreground",
1657
+ children: L ? c("devportal.howDeliveryWorksJsonOnly", "JSON-only delivery") : c("devportal.howDeliveryWorks", "How delivery works")
1658
+ }), L ? /* @__PURE__ */ Y("p", { children: c("devportal.howDeliveryWorksJsonOnlyDescription", "Workflows and templates are pure JSON — no binary code needed. Paste or import your JSON content below. When a user installs this item, the platform applies this JSON directly (no zip download required).") }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("p", { children: c("devportal.howDeliveryWorksDescription", "Package your code + manifest.json into a zip file (like a Chrome extension). Host it on S3, GitHub Releases, or any CDN, then paste the URL below. When a user installs this item, the platform downloads and extracts the zip.") }), /* @__PURE__ */ Y("p", { children: c("devportal.versioningNote", "Each published version captures a snapshot of this manifest. Use the Versions tab to manage per-version zip URLs, see changelogs, or roll back to a prior release.") })] })]
1659
+ })]
1660
+ }),
1661
+ /* @__PURE__ */ X("div", {
1662
+ className: "flex items-center gap-2",
1663
+ children: [
1664
+ /* @__PURE__ */ Y("input", {
1665
+ ref: x,
1666
+ type: "file",
1667
+ accept: ".json,application/json",
1668
+ className: "hidden",
1669
+ onChange: O
1670
+ }),
1671
+ /* @__PURE__ */ X("button", {
1672
+ type: "button",
1673
+ onClick: () => x.current?.click(),
1674
+ className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
1675
+ children: [/* @__PURE__ */ Y(K, { size: 14 }), c("devportal.importManifest", "Import manifest.json")]
1676
+ }),
1677
+ /* @__PURE__ */ X("button", {
1678
+ type: "button",
1679
+ onClick: k,
1680
+ className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors",
1681
+ children: [/* @__PURE__ */ Y(re, { size: 14 }), c("devportal.exportManifest", "Export manifest.json")]
1682
+ })
1683
+ ]
1684
+ }),
1685
+ /* @__PURE__ */ Y(g, {
1686
+ label: c("devportal.storeItemType", "Store Item Type"),
1687
+ value: l.manifestItemType,
1688
+ onChange: (e) => y("manifestItemType", e.target.value),
1689
+ options: Pe,
1690
+ placeholder: c("devportal.selectItemType", "Select item type…"),
1691
+ hint: c("devportal.storeItemTypeHint", "How this app is categorized in the Burdenoff marketplace (e.g. agent, node, widget)")
1692
+ }),
1693
+ /* @__PURE__ */ X("div", {
1694
+ className: "grid gap-4 sm:grid-cols-2",
1695
+ children: [/* @__PURE__ */ Y(h, {
1696
+ label: c("devportal.manifestDisplayName", "Display Name"),
1697
+ value: l.manifestDisplayName,
1698
+ onChange: (e) => y("manifestDisplayName", e.target.value)
1699
+ }), /* @__PURE__ */ Y(h, {
1700
+ label: c("devportal.manifestVersion", "Version"),
1701
+ value: l.manifestVersion,
1702
+ onChange: (e) => y("manifestVersion", e.target.value),
1703
+ placeholder: "1.0.0",
1704
+ hint: c("devportal.semverHint", "Semantic version (MAJOR.MINOR.PATCH)")
1705
+ })]
1706
+ }),
1707
+ L && /* @__PURE__ */ Y(_, {
1708
+ label: c("devportal.jsonContent", l.manifestItemType === "workflow" ? "Workflow Definition (JSON)" : "Template Definition (JSON)"),
1709
+ value: l.manifestJsonContent,
1710
+ onChange: (e) => y("manifestJsonContent", e.target.value),
1711
+ rows: 12,
1712
+ placeholder: "{\n \"nodes\": [],\n \"edges\": []\n}",
1713
+ hint: c("devportal.jsonContentHint", "Paste the full JSON definition. This is stored directly — no zip needed.")
1714
+ }),
1715
+ !L && /* @__PURE__ */ Y(g, {
1716
+ label: c("devportal.installType", "Install Type"),
1717
+ value: l.manifestInstallType,
1718
+ onChange: (e) => y("manifestInstallType", e.target.value),
1719
+ options: Fe,
1720
+ hint: l.manifestInstallType === "npm" ? c("devportal.installTypeNpmHint", "Published to an npm-compatible registry. Provide the package name below.") : l.manifestInstallType === "git" ? c("devportal.installTypeGitHint", "Cloned from a git repository URL.") : l.manifestInstallType === "zip" ? c("devportal.installTypeZipHint", "Package your code + manifest.json into a zip. Host it publicly (S3, CDN, GitHub Releases) and paste the URL below. Use the Versions tab to manage per-release zip URLs.") : l.manifestInstallType === "builtin" ? c("devportal.installTypeBuiltinHint", "Pre-installed in the platform. No download needed.") : void 0
1721
+ }),
1722
+ te && /* @__PURE__ */ Y(h, {
1723
+ label: c("devportal.packageName", "Package Name"),
1724
+ value: l.manifestPackageName,
1725
+ onChange: (e) => y("manifestPackageName", e.target.value),
1726
+ placeholder: "@yourscope/your-package"
1727
+ }),
1728
+ !L && l.manifestInstallType === "zip" && /* @__PURE__ */ X("div", {
1729
+ className: "space-y-2",
1730
+ children: [
1731
+ /* @__PURE__ */ Y("input", {
1732
+ ref: S,
1733
+ type: "file",
1734
+ accept: ".zip,application/zip,application/x-zip-compressed",
1735
+ className: "hidden",
1736
+ onChange: (e) => void ee(e)
1737
+ }),
1738
+ /* @__PURE__ */ X("div", {
1739
+ className: "flex items-center gap-2 flex-wrap",
1740
+ children: [/* @__PURE__ */ Y("button", {
1741
+ type: "button",
1742
+ disabled: w || !n,
1743
+ onClick: () => S.current?.click(),
1744
+ title: n ? void 0 : c("devportal.workspacesGatewayNotConfigured", "workspacesGatewayUrl not configured — contact your shell integration"),
1745
+ className: "inline-flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm font-medium hover:bg-muted transition-colors disabled:opacity-50",
1746
+ children: w ? /* @__PURE__ */ X(J, { children: [
1747
+ /* @__PURE__ */ Y(H, {
1748
+ size: 14,
1749
+ className: "animate-spin"
1750
+ }),
1751
+ c("devportal.uploading", "Uploading..."),
1752
+ " ",
1753
+ T,
1754
+ "%"
1755
+ ] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(K, { size: 14 }), c("devportal.uploadZipPackage", "Upload zip package")] })
1756
+ }), w && /* @__PURE__ */ Y("div", {
1757
+ className: "flex-1 h-1.5 min-w-[120px] rounded-full bg-muted overflow-hidden",
1758
+ children: /* @__PURE__ */ Y("div", {
1759
+ className: "h-full bg-primary transition-all",
1760
+ style: { width: `${T}%` }
1761
+ })
1762
+ })]
1763
+ }),
1764
+ E && /* @__PURE__ */ Y("p", {
1765
+ className: "text-xs text-status-error-text",
1766
+ children: E
1767
+ }),
1768
+ /* @__PURE__ */ Y("p", {
1769
+ className: "text-xs text-text-secondary",
1770
+ children: c("devportal.zipUploadHint", "Upload stores the zip in your workspace Files (/DevPortal/Packages) and fills the URL below automatically.")
1771
+ })
1772
+ ]
1773
+ }),
1774
+ R && /* @__PURE__ */ Y(h, {
1775
+ label: z,
1776
+ value: l.manifestRegistryUrl,
1777
+ onChange: (e) => y("manifestRegistryUrl", e.target.value),
1778
+ placeholder: ne,
1779
+ hint: l.manifestInstallType === "zip" ? c("devportal.zipUrlHint", "Filled automatically after upload, or paste a URL to an externally-hosted zip.") : void 0
1780
+ }),
1781
+ /* @__PURE__ */ Y(_, {
1782
+ label: c("devportal.requiredPermissions", "Required Permissions (one per line)"),
1783
+ value: l.manifestPermissionsText,
1784
+ onChange: (e) => y("manifestPermissionsText", e.target.value),
1785
+ rows: 3,
1786
+ placeholder: "read:users\nwrite:data",
1787
+ hint: c("devportal.permissionsHint", "Platform capabilities this item requires the user to grant on install")
1788
+ }),
1789
+ /* @__PURE__ */ Y(h, {
1790
+ label: c("devportal.minPlatformVersion", "Min Platform Version"),
1791
+ value: l.manifestMinPlatformVersion,
1792
+ onChange: (e) => y("manifestMinPlatformVersion", e.target.value),
1793
+ placeholder: "2024.1.0"
1794
+ })
1795
+ ]
1796
+ })
1797
+ }),
1798
+ /* @__PURE__ */ Y("div", {
1799
+ className: "border-t pt-6",
1800
+ children: /* @__PURE__ */ Y("button", {
1801
+ type: "button",
1802
+ onClick: b,
1803
+ disabled: f,
1804
+ 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",
1805
+ children: f ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(H, {
1806
+ size: 16,
1807
+ className: "animate-spin"
1808
+ }), c("devportal.saving", "Saving...")] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(G, { size: 16 }), c("devportal.saveStoreListing", "Save Store Listing")] })
1809
+ })
1810
+ })
1811
+ ]
1812
+ });
1232
1813
  }, Q = ({ label: e, value: n, trend: r }) => {
1233
- let { t: i } = O();
1234
- return /* @__PURE__ */ K("div", {
1814
+ let { t: i } = I();
1815
+ return /* @__PURE__ */ X("div", {
1235
1816
  className: "rounded-lg border bg-card p-4",
1236
1817
  children: [
1237
- /* @__PURE__ */ G("p", {
1818
+ /* @__PURE__ */ Y("p", {
1238
1819
  className: "text-sm text-muted-foreground",
1239
1820
  children: e
1240
1821
  }),
1241
- /* @__PURE__ */ G("p", {
1822
+ /* @__PURE__ */ Y("p", {
1242
1823
  className: "text-2xl font-bold",
1243
1824
  children: n
1244
1825
  }),
1245
- r !== void 0 && /* @__PURE__ */ K("p", {
1826
+ r !== void 0 && /* @__PURE__ */ X("p", {
1246
1827
  className: t("text-xs mt-1", r > 0 ? "text-status-success-text" : r < 0 ? "text-status-error-text" : "text-muted-foreground"),
1247
1828
  children: [
1248
1829
  r > 0 ? "+" : "",
@@ -1256,14 +1837,14 @@ var oe = [
1256
1837
  })
1257
1838
  ]
1258
1839
  });
1259
- }, $ = ({ label: e, url: t }) => /* @__PURE__ */ K("a", {
1840
+ }, $ = ({ label: e, url: t }) => /* @__PURE__ */ X("a", {
1260
1841
  href: t,
1261
1842
  target: "_blank",
1262
1843
  rel: "noopener noreferrer",
1263
1844
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
1264
- children: [/* @__PURE__ */ G(F, { size: 14 }), e]
1845
+ children: [/* @__PURE__ */ Y(B, { size: 14 }), e]
1265
1846
  });
1266
1847
  //#endregion
1267
- export { Z as ApplicationDetailPage };
1848
+ export { be as ApplicationDetailPage };
1268
1849
 
1269
1850
  //# sourceMappingURL=ApplicationDetailPage.js.map