@burdenoff/microfe-devportal 2026.915.9 → 2026.915.11

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.
@@ -3,28 +3,28 @@ import { cn as t } from "../utils/cn.js";
3
3
  import { EmptyState as n } from "../components/EmptyState.js";
4
4
  import { orgSectionPath as r, useIsSellerSection as i } from "../hooks/useIsSellerSection.js";
5
5
  import { useGetApplicationsQuery as a, useGetOrganizationQuery as o, useUpdateOrgLegalInfoMutation as s, useUpdateOrgTaxInfoMutation as c, useUpdateOrganizationMutation as l } from "../../generated/global-operations.js";
6
- import { PageLayout as u, PageSection as d } from "../components/PageLayout.js";
7
- import { ORG_ROLE_LABELS as f } from "../utils/constants.js";
8
- import { AppListItem as p } from "../components/AppCard.js";
9
- import { StatCard as m, StatCardGrid as h } from "../components/StatCard.js";
10
- import { DataTable as g, DetailList as _ } from "../components/DataTable.js";
11
- import { InputField as v, TextareaField as y } from "../components/FormField.js";
12
- import { ConfirmDialog as ee } from "../components/ConfirmDialog.js";
6
+ import { PageLayout as ee, PageSection as u } from "../components/PageLayout.js";
7
+ import { ORG_ROLE_LABELS as d } from "../utils/constants.js";
8
+ import { AppListItem as f } from "../components/AppCard.js";
9
+ import { StatCard as p, StatCardGrid as m } from "../components/StatCard.js";
10
+ import { DataTable as h, DetailList as g } from "../components/DataTable.js";
11
+ import { InputField as _, TextareaField as v } from "../components/FormField.js";
12
+ import { Alert as y, ConfirmDialog as b } from "../components/ConfirmDialog.js";
13
13
  import { RegisterPickupLocationModal as te } from "../components/RegisterPickupLocationModal.js";
14
14
  import { useDevportalPermission as ne } from "../hooks/usePermission.js";
15
- import { capitalizeCarrierName as b, useCarrierPickupLocations as re } from "../hooks/useCarrierPickupLocations.js";
16
- import { DEVPORTAL_PERMISSIONS as x } from "../constants/permissions.js";
17
- import { useOrganizationPickupAddresses as S } from "../hooks/useOrganizationPickupAddresses.js";
18
- import { useEffect as C, useState as w } from "react";
19
- import { AlertCircle as ie, AppWindow as T, ArrowRight as E, BarChart3 as D, Building2 as O, CheckCircle as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as ae, Shield as oe, Trash2 as P, TrendingUp as F, Users as I } from "lucide-react";
20
- import { useParams as L } from "react-router";
21
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
22
- import { useI18n as V } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { EmphasisPanel as H, NextSteps as se } from "@burdenoff/fe-libs/ui";
24
- import { clearGraphqlFetchResponseCache as ce, graphqlFetch as U } from "@burdenoff/fe-libs/shared/graphql";
15
+ import { capitalizeCarrierName as re, useCarrierPickupLocations as ie } from "../hooks/useCarrierPickupLocations.js";
16
+ import { DEVPORTAL_PERMISSIONS as ae } from "../constants/permissions.js";
17
+ import { useOrganizationPickupAddresses as x } from "../hooks/useOrganizationPickupAddresses.js";
18
+ import { useEffect as S, useState as C } from "react";
19
+ import { AlertCircle as w, AppWindow as T, ArrowRight as E, BarChart3 as oe, Building2 as se, CheckCircle as D, CreditCard as ce, DollarSign as O, ExternalLink as k, Loader2 as A, Plus as j, Settings as le, Shield as M, Trash2 as N, TrendingUp as P, Users as ue } from "lucide-react";
20
+ import { useParams as F } from "react-router";
21
+ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
22
+ import { useI18n as z } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { EmphasisPanel as B, NextSteps as V } from "@burdenoff/fe-libs/ui";
24
+ import { clearGraphqlFetchResponseCache as H, graphqlFetch as U } from "@burdenoff/fe-libs/shared/graphql";
25
25
  //#region src/devportal/pages/OrganizationDetailPage.tsx
26
- var le = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", ue = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
27
- function W(e) {
26
+ var W = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", G = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
27
+ function de(e) {
28
28
  let t = e;
29
29
  return {
30
30
  id: e.id,
@@ -76,12 +76,13 @@ function W(e) {
76
76
  taxFormVerified: e.taxFormVerified ?? !1,
77
77
  legalEntityName: e.legalEntityName ?? void 0,
78
78
  legalEntityType: e.legalEntityType ?? void 0,
79
+ billingAccountId: e.billingAccountId ?? void 0,
79
80
  pickupPostalCode: e.pickupPostalCode ?? void 0,
80
81
  createdAt: e.createdAt,
81
82
  updatedAt: e.updatedAt
82
83
  };
83
84
  }
84
- function G(e) {
85
+ function K(e) {
85
86
  return {
86
87
  id: e.id,
87
88
  organizationId: e.organizationId,
@@ -100,11 +101,11 @@ function G(e) {
100
101
  updatedAt: e.updatedAt
101
102
  };
102
103
  }
103
- function de(e) {
104
+ function fe(e) {
104
105
  let t = e.trim().toLowerCase();
105
106
  return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(t) && !t.includes("@");
106
107
  }
107
- function K(e) {
108
+ function q(e) {
108
109
  try {
109
110
  let t = new URL(e.trim());
110
111
  return t.protocol === "http:" || t.protocol === "https:";
@@ -112,272 +113,300 @@ function K(e) {
112
113
  return !1;
113
114
  }
114
115
  }
115
- function fe(e) {
116
+ function pe(e) {
116
117
  let t = e.trim();
117
118
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
118
119
  }
119
- var q = {
120
+ var J = {
120
121
  VIEWER: 0,
121
122
  DEVELOPER: 1,
122
123
  ADMIN: 2,
123
124
  OWNER: 3
124
- }, J = () => {
125
- let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } = L(), { t: m } = V(), h = (e, t) => {
126
- let n = m(e);
125
+ }, Y = () => {
126
+ let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: u } = e(), d = i(), { orgId: f } = F(), { addresses: p, loading: m, refetch: h } = x(f), { t: g } = z(), _ = (e, t) => {
127
+ let n = g(e);
127
128
  return n === e ? t : n;
128
- }, [g, _] = w("overview"), v = [
129
+ }, [v, b] = C("overview"), [te, ne] = C(!1), re = [
129
130
  {
130
131
  id: "overview",
131
- label: h("devportal.overview", "Overview"),
132
- icon: O
132
+ label: _("devportal.overview", "Overview"),
133
+ icon: se
133
134
  },
134
135
  {
135
136
  id: "apps",
136
- label: h("devportal.applications", "Applications"),
137
+ label: _("devportal.applications", "Applications"),
137
138
  icon: T
138
139
  },
139
140
  {
140
141
  id: "members",
141
- label: h("devportal.members", "Members"),
142
- icon: I
142
+ label: _("devportal.members", "Members"),
143
+ icon: ue
143
144
  },
144
145
  {
145
146
  id: "settings",
146
- label: h("devportal.settings", "Settings"),
147
- icon: ae
147
+ label: _("devportal.settings", "Settings"),
148
+ icon: le
148
149
  }
149
- ], { data: y, previousData: ee, loading: te, error: ne } = o({
150
- variables: { id: p },
151
- skip: !p
152
- }), b = y ?? ee, { data: re } = a({
150
+ ], { data: ie, previousData: ae, loading: E, error: oe } = o({
151
+ variables: { id: f },
152
+ skip: !f
153
+ }), D = ie ?? ae, { data: k } = a({
153
154
  variables: {
154
155
  limit: 50,
155
- organizationId: p
156
+ organizationId: f
156
157
  },
157
- skip: !p,
158
+ skip: !f,
158
159
  fetchPolicy: "cache-and-network"
159
- }), x = (b?.developerOrganization?.members ?? []).map(G), S = (d ? x.find((e) => e.userId === d.id) : void 0)?.role, E = S !== void 0 && q[S] >= q.DEVELOPER, D = S !== void 0 && q[S] >= q.ADMIN, k = D, j = D, oe = v.filter((e) => e.id !== "settings" || D), P = (e) => {
160
+ }), M = (D?.developerOrganization?.members ?? []).map(K), N = (u ? M.find((e) => e.userId === u.id) : void 0)?.role, P = N !== void 0 && J[N] >= J.DEVELOPER, I = N !== void 0 && J[N] >= J.ADMIN, B = I, H = I, U = re.filter((e) => e.id !== "settings" || I), W = (e) => {
160
161
  n?.(`${s}${e}`);
161
162
  };
162
- if (C(() => {
163
- p && (f ? l(p) : c(p));
163
+ if (S(() => {
164
+ f && (d ? l(f) : c(f));
164
165
  }, [
165
- p,
166
166
  f,
167
+ d,
167
168
  c,
168
169
  l
169
- ]), C(() => {
170
- g === "settings" && !D && _("overview");
171
- }, [g, D]), C(() => {
172
- let e = b?.developerOrganization?.name;
173
- if (!p || !e) return;
170
+ ]), S(() => {
171
+ v === "settings" && !I && b("overview");
172
+ }, [v, I]), S(() => {
173
+ let e = D?.developerOrganization?.name;
174
+ if (!f || !e) return;
174
175
  let t = window.__breadcrumbRegistry;
175
- return t?.register(p, e), () => t?.unregister(p);
176
- }, [p, y?.developerOrganization?.name]), te && !b) return /* @__PURE__ */ z(u, {
177
- title: h("devportal.loadingDots", "Loading..."),
178
- backLink: `${s}${r(f)}`,
179
- backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
180
- children: /* @__PURE__ */ z("div", {
176
+ return t?.register(f, e), () => t?.unregister(f);
177
+ }, [f, ie?.developerOrganization?.name]), E && !D) return /* @__PURE__ */ L(ee, {
178
+ title: _("devportal.loadingDots", "Loading..."),
179
+ backLink: `${s}${r(d)}`,
180
+ backLabel: _("devportal.backToOrganizations", "Back to Organizations"),
181
+ children: /* @__PURE__ */ L("div", {
181
182
  className: "flex items-center justify-center py-12",
182
- children: /* @__PURE__ */ z(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
183
+ children: /* @__PURE__ */ L(A, { className: "h-8 w-8 animate-spin text-text-secondary" })
183
184
  })
184
185
  });
185
- if (ne || !b?.developerOrganization) return /* @__PURE__ */ z(u, {
186
- title: h("devportal.organizationNotFound", "Organization Not Found"),
187
- backLink: `${s}${r(f)}`,
188
- backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
189
- children: /* @__PURE__ */ B("div", {
186
+ if (oe || !D?.developerOrganization) return /* @__PURE__ */ L(ee, {
187
+ title: _("devportal.organizationNotFound", "Organization Not Found"),
188
+ backLink: `${s}${r(d)}`,
189
+ backLabel: _("devportal.backToOrganizations", "Back to Organizations"),
190
+ children: /* @__PURE__ */ R("div", {
190
191
  className: "flex flex-col items-center justify-center py-12 gap-4",
191
192
  children: [
192
- /* @__PURE__ */ z(ie, { className: "h-12 w-12 text-status-error-text" }),
193
- /* @__PURE__ */ z("h2", {
193
+ /* @__PURE__ */ L(w, { className: "h-12 w-12 text-status-error-text" }),
194
+ /* @__PURE__ */ L("h2", {
194
195
  className: "text-lg font-semibold",
195
- children: h("devportal.organizationNotFoundLower", "Organization not found")
196
+ children: _("devportal.organizationNotFoundLower", "Organization not found")
196
197
  }),
197
- /* @__PURE__ */ z("p", {
198
+ /* @__PURE__ */ L("p", {
198
199
  className: "text-text-secondary",
199
- children: ne?.message || h("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
200
+ children: oe?.message || _("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
200
201
  }),
201
- /* @__PURE__ */ z("button", {
202
- onClick: () => P(r(f)),
202
+ /* @__PURE__ */ L("button", {
203
+ onClick: () => W(r(d)),
203
204
  className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
204
- children: h("devportal.backToOrganizations", "Back to Organizations")
205
+ children: _("devportal.backToOrganizations", "Back to Organizations")
205
206
  })
206
207
  ]
207
208
  })
208
209
  });
209
- let F = W(b.developerOrganization), R = x, H = re?.applications?.edges?.map((e) => e.node) ?? [];
210
- return /* @__PURE__ */ B(u, {
211
- title: F.name,
212
- description: F.description,
213
- purpose: h("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
214
- backLink: `${s}${r(f)}`,
215
- backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
216
- actions: /* @__PURE__ */ z("div", {
210
+ let G = de(D.developerOrganization), fe = M, q = k?.applications?.edges?.map((e) => e.node) ?? [];
211
+ return /* @__PURE__ */ R(ee, {
212
+ title: G.name,
213
+ description: G.description,
214
+ purpose: _("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
215
+ backLink: `${s}${r(d)}`,
216
+ backLabel: _("devportal.backToOrganizations", "Back to Organizations"),
217
+ actions: /* @__PURE__ */ L("div", {
217
218
  className: "flex items-center gap-2",
218
- children: k ? /* @__PURE__ */ B("button", {
219
- onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(F.id)}&developerOrgName=${encodeURIComponent(F.name)}`),
219
+ children: B ? /* @__PURE__ */ R("button", {
220
+ onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(G.id)}&developerOrgName=${encodeURIComponent(G.name)}`),
220
221
  className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
221
- children: [/* @__PURE__ */ z(A, { size: 16 }), h("devportal.revenue", "Revenue")]
222
+ children: [/* @__PURE__ */ L(O, { size: 16 }), _("devportal.revenue", "Revenue")]
222
223
  }) : null
223
224
  }),
224
225
  children: [
225
- /* @__PURE__ */ z("div", {
226
+ /* @__PURE__ */ L("div", {
226
227
  className: "border-b",
227
- children: /* @__PURE__ */ z("nav", {
228
+ children: /* @__PURE__ */ L("nav", {
228
229
  className: "-mb-px flex gap-4 overflow-x-auto",
229
230
  role: "tablist",
230
- "aria-label": h("devportal.organizationSections", "Organization sections"),
231
- children: oe.map((e) => {
231
+ "aria-label": _("devportal.organizationSections", "Organization sections"),
232
+ children: U.map((e) => {
232
233
  let n = e.icon;
233
- return /* @__PURE__ */ B("button", {
234
+ return /* @__PURE__ */ R("button", {
234
235
  id: `organization-tab-${e.id}`,
235
236
  role: "tab",
236
- "aria-selected": g === e.id,
237
+ "aria-selected": v === e.id,
237
238
  "aria-controls": `organization-panel-${e.id}`,
238
- onClick: () => _(e.id),
239
- className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", g === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
240
- children: [/* @__PURE__ */ z(n, { size: 16 }), e.label]
239
+ onClick: () => b(e.id),
240
+ className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", v === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
241
+ children: [/* @__PURE__ */ L(n, { size: 16 }), e.label]
241
242
  }, e.id);
242
243
  })
243
244
  })
244
245
  }),
245
- /* @__PURE__ */ z(se, {
246
+ I && d && !m && p.length === 0 && /* @__PURE__ */ R(y, {
247
+ variant: "warning",
248
+ title: _("devportal.pickupAddressRequiredTitle", "Pickup address required"),
246
249
  className: "mt-6",
247
- storageKey: `devportal-org-${F.id}`,
250
+ children: [/* @__PURE__ */ L("p", { children: _("devportal.pickupAddressRequiredDesc", "This organization sells physical items, so it needs a real pickup address before it's fully set up — buyers need to know where orders actually ship from.") }), /* @__PURE__ */ L("button", {
251
+ type: "button",
252
+ onClick: () => {
253
+ b("settings"), ne(!0);
254
+ },
255
+ className: "mt-2 text-sm font-semibold underline",
256
+ children: _("devportal.pickupAddressRequiredCta", "Configure it now")
257
+ })]
258
+ }),
259
+ /* @__PURE__ */ L(V, {
260
+ className: "mt-6",
261
+ storageKey: `devportal-org-${G.id}`,
248
262
  steps: [
249
- ...j ? [{
263
+ ...H ? [{
250
264
  id: "invite-members",
251
- label: h("devportal.inviteMembers", "Invite members"),
252
- description: h("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
253
- icon: /* @__PURE__ */ z(I, { size: 16 }),
254
- onClick: () => _("members")
265
+ label: _("devportal.inviteMembers", "Invite members"),
266
+ description: _("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
267
+ icon: /* @__PURE__ */ L(ue, { size: 16 }),
268
+ onClick: () => b("members")
269
+ }] : [],
270
+ ...I ? [{
271
+ id: "settings",
272
+ label: _("devportal.orgStepVerify", "Complete organization profile"),
273
+ description: _("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
274
+ icon: /* @__PURE__ */ L(le, { size: 16 }),
275
+ onClick: () => b("settings"),
276
+ done: !!G.isVerified
277
+ }] : [],
278
+ ...I ? [{
279
+ id: "link-billing",
280
+ label: _("devportal.orgStepLinkBilling", "Link billing account"),
281
+ description: _("devportal.orgStepLinkBillingDesc", "Connect a billing account so sale and payout revenue has somewhere to go"),
282
+ icon: /* @__PURE__ */ L(ce, { size: 16 }),
283
+ onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(G.id)}&developerOrgName=${encodeURIComponent(G.name)}`),
284
+ done: !!G.billingAccountId
255
285
  }] : [],
256
- ...E && !f ? [{
286
+ ...P && !d ? [{
257
287
  id: "create-app",
258
- label: h("devportal.createApp", "Create App"),
259
- description: h("devportal.orgStepCreateApp", "Build a new application under this organization"),
260
- icon: /* @__PURE__ */ z(T, { size: 16 }),
261
- onClick: () => P("/apps/new")
288
+ label: _("devportal.createApp", "Create App"),
289
+ description: _("devportal.orgStepCreateApp", "Build a new application under this organization"),
290
+ icon: /* @__PURE__ */ L(T, { size: 16 }),
291
+ onClick: () => W("/apps/new")
262
292
  }] : [],
263
- ...E && f ? [{
293
+ ...P && d ? [{
264
294
  id: "list-item",
265
- label: h("devportal.listAnItem", "List an Item"),
266
- description: h("devportal.orgStepListItem", "List a physical product for sale under this organization"),
267
- icon: /* @__PURE__ */ z(N, { size: 16 }),
268
- onClick: () => P("/seller/items/new")
269
- }] : [],
270
- ...D ? [{
271
- id: "settings",
272
- label: h("devportal.orgStepVerify", "Complete organization profile"),
273
- description: h("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
274
- icon: /* @__PURE__ */ z(ae, { size: 16 }),
275
- onClick: () => _("settings"),
276
- done: !!F.isVerified
295
+ label: _("devportal.listAnItem", "List an Item"),
296
+ description: _("devportal.orgStepListItem", "List a physical product for sale under this organization"),
297
+ icon: /* @__PURE__ */ L(j, { size: 16 }),
298
+ onClick: () => W("/seller/items/new")
277
299
  }] : []
278
300
  ]
279
301
  }),
280
- /* @__PURE__ */ B("div", {
302
+ /* @__PURE__ */ R("div", {
281
303
  className: "mt-6",
282
- id: `organization-panel-${g}`,
304
+ id: `organization-panel-${v}`,
283
305
  role: "tabpanel",
284
- "aria-labelledby": `organization-tab-${g}`,
306
+ "aria-labelledby": `organization-tab-${v}`,
285
307
  tabIndex: 0,
286
308
  children: [
287
- g === "overview" && /* @__PURE__ */ z(pe, {
288
- org: F,
289
- apps: H,
290
- members: R,
291
- canCreateApps: E,
292
- canViewRevenue: k,
293
- onNavigate: P,
294
- onShowApps: () => _("apps")
309
+ v === "overview" && /* @__PURE__ */ L(me, {
310
+ org: G,
311
+ apps: q,
312
+ members: fe,
313
+ canCreateApps: P,
314
+ canViewRevenue: B,
315
+ onNavigate: W,
316
+ onShowApps: () => b("apps")
295
317
  }),
296
- g === "apps" && /* @__PURE__ */ z(Y, {
297
- org: F,
298
- apps: H,
299
- onNavigate: P,
300
- canCreateApps: E
318
+ v === "apps" && /* @__PURE__ */ L(X, {
319
+ org: G,
320
+ apps: q,
321
+ onNavigate: W,
322
+ canCreateApps: P
301
323
  }),
302
- g === "members" && /* @__PURE__ */ z(me, {
303
- members: R,
304
- onNavigate: P,
305
- orgId: F.id,
306
- canInviteMembers: j
324
+ v === "members" && /* @__PURE__ */ L(Z, {
325
+ members: fe,
326
+ onNavigate: W,
327
+ orgId: G.id,
328
+ canInviteMembers: H
307
329
  }),
308
- g === "settings" && D && /* @__PURE__ */ z(X, { org: F })
330
+ v === "settings" && I && /* @__PURE__ */ L(he, {
331
+ org: G,
332
+ pickupAddresses: p,
333
+ pickupAddressesLoading: m,
334
+ refetchPickupAddresses: h,
335
+ focusFulfillment: te,
336
+ onFocusFulfillmentHandled: () => ne(!1)
337
+ })
309
338
  ]
310
339
  })
311
340
  ]
312
341
  });
313
- }, pe = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
314
- let { t: c } = V(), l = (e, t) => {
342
+ }, me = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
343
+ let { t: c } = z(), l = (e, t) => {
315
344
  let n = c(e);
316
345
  return n === e ? t : n;
317
346
  };
318
- return /* @__PURE__ */ B("div", {
347
+ return /* @__PURE__ */ R("div", {
319
348
  className: "grid gap-6 lg:grid-cols-3",
320
- children: [/* @__PURE__ */ B("div", {
349
+ children: [/* @__PURE__ */ R("div", {
321
350
  className: "lg:col-span-2 space-y-6",
322
- children: [/* @__PURE__ */ z(H, { children: /* @__PURE__ */ B(h, {
351
+ children: [/* @__PURE__ */ L(B, { children: /* @__PURE__ */ R(m, {
323
352
  columns: a ? 4 : 3,
324
353
  children: [
325
- /* @__PURE__ */ z(m, {
354
+ /* @__PURE__ */ L(p, {
326
355
  title: l("devportal.publishedApps", "Published Apps"),
327
356
  value: `${e.publishedApps}/${e.totalApps}`,
328
- icon: /* @__PURE__ */ z(T, { size: 20 })
357
+ icon: /* @__PURE__ */ L(T, { size: 20 })
329
358
  }),
330
- /* @__PURE__ */ z(m, {
359
+ /* @__PURE__ */ L(p, {
331
360
  title: l("devportal.totalInstalls", "Total Installs"),
332
361
  value: e.totalInstalls.toLocaleString(),
333
- icon: /* @__PURE__ */ z(F, { size: 20 })
362
+ icon: /* @__PURE__ */ L(P, { size: 20 })
334
363
  }),
335
- a ? /* @__PURE__ */ z(m, {
364
+ a ? /* @__PURE__ */ L(p, {
336
365
  title: l("devportal.totalRevenue", "Total Revenue"),
337
366
  value: `$${e.totalRevenue.toLocaleString()}`,
338
- icon: /* @__PURE__ */ z(A, { size: 20 })
367
+ icon: /* @__PURE__ */ L(O, { size: 20 })
339
368
  }) : null,
340
- /* @__PURE__ */ z(m, {
369
+ /* @__PURE__ */ L(p, {
341
370
  title: l("devportal.avgRating", "Avg Rating"),
342
371
  value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : l("devportal.notAvailable", "N/A"),
343
- icon: /* @__PURE__ */ z(D, { size: 20 })
372
+ icon: /* @__PURE__ */ L(oe, { size: 20 })
344
373
  })
345
374
  ]
346
- }) }), /* @__PURE__ */ z(d, {
375
+ }) }), /* @__PURE__ */ L(u, {
347
376
  title: l("devportal.recentApplications", "Recent Applications"),
348
- actions: /* @__PURE__ */ B("button", {
377
+ actions: /* @__PURE__ */ R("button", {
349
378
  onClick: s,
350
379
  className: "text-sm text-primary hover:underline flex items-center gap-1",
351
380
  children: [
352
381
  l("devportal.viewAll", "View all"),
353
382
  " ",
354
- /* @__PURE__ */ z(E, { size: 14 })
383
+ /* @__PURE__ */ L(E, { size: 14 })
355
384
  ]
356
385
  }),
357
- children: t.length > 0 ? /* @__PURE__ */ z("div", {
386
+ children: t.length > 0 ? /* @__PURE__ */ L("div", {
358
387
  className: "space-y-2",
359
- children: t.slice(0, 3).map((e) => /* @__PURE__ */ z(p, {
388
+ children: t.slice(0, 3).map((e) => /* @__PURE__ */ L(f, {
360
389
  app: e,
361
390
  onClick: () => o(`/apps/${e.id}`)
362
391
  }, e.id))
363
- }) : /* @__PURE__ */ z(n, {
392
+ }) : /* @__PURE__ */ L(n, {
364
393
  illustration: "empty-data",
365
- icon: /* @__PURE__ */ z(T, { size: 24 }),
394
+ icon: /* @__PURE__ */ L(T, { size: 24 }),
366
395
  title: l("devportal.noApplications", "No applications"),
367
396
  description: e.kind === "PHYSICAL" ? l("devportal.createYourFirstItem", "List your first physical item") : l("devportal.createYourFirstApplication", "Create your first application"),
368
- action: i ? /* @__PURE__ */ B("button", {
397
+ action: i ? /* @__PURE__ */ R("button", {
369
398
  onClick: () => o(e.kind === "PHYSICAL" ? "/seller/items/new" : "/apps/new"),
370
399
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
371
- children: [/* @__PURE__ */ z(N, { size: 16 }), e.kind === "PHYSICAL" ? l("devportal.createItem", "Create Item") : l("devportal.createApp", "Create App")]
400
+ children: [/* @__PURE__ */ L(j, { size: 16 }), e.kind === "PHYSICAL" ? l("devportal.createItem", "Create Item") : l("devportal.createApp", "Create App")]
372
401
  }) : void 0
373
402
  })
374
403
  })]
375
- }), /* @__PURE__ */ B("div", {
404
+ }), /* @__PURE__ */ R("div", {
376
405
  className: "space-y-6",
377
406
  children: [
378
- a ? /* @__PURE__ */ z(d, {
407
+ a ? /* @__PURE__ */ L(u, {
379
408
  title: l("devportal.revenueSummary", "Revenue Summary"),
380
- children: /* @__PURE__ */ z(_, { items: [
409
+ children: /* @__PURE__ */ L(g, { items: [
381
410
  {
382
411
  label: l("devportal.totalRevenue", "Total Revenue"),
383
412
  value: `$${e.totalRevenue.toLocaleString()}`
@@ -400,31 +429,31 @@ var q = {
400
429
  }
401
430
  ] })
402
431
  }) : null,
403
- /* @__PURE__ */ z(d, {
432
+ /* @__PURE__ */ L(u, {
404
433
  title: l("devportal.teamMembers", "Team Members"),
405
- actions: /* @__PURE__ */ z("button", {
434
+ actions: /* @__PURE__ */ L("button", {
406
435
  onClick: () => o(`/organizations/${e.id}/members`),
407
436
  className: "text-sm text-primary hover:underline",
408
437
  children: l("devportal.manage", "Manage")
409
438
  }),
410
- children: /* @__PURE__ */ B("div", {
439
+ children: /* @__PURE__ */ R("div", {
411
440
  className: "space-y-2",
412
- children: [r.slice(0, 3).map((e) => /* @__PURE__ */ z("div", {
441
+ children: [r.slice(0, 3).map((e) => /* @__PURE__ */ L("div", {
413
442
  className: "flex items-center justify-between py-2",
414
- children: /* @__PURE__ */ B("div", {
443
+ children: /* @__PURE__ */ R("div", {
415
444
  className: "flex items-center gap-3",
416
- children: [/* @__PURE__ */ z("div", {
445
+ children: [/* @__PURE__ */ L("div", {
417
446
  className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
418
447
  children: e.email?.charAt(0).toUpperCase() || "U"
419
- }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("p", {
448
+ }), /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("p", {
420
449
  className: "text-sm font-medium",
421
450
  children: e.email
422
- }), /* @__PURE__ */ z("p", {
451
+ }), /* @__PURE__ */ L("p", {
423
452
  className: "text-xs text-text-secondary",
424
- children: f[e.role]
453
+ children: d[e.role]
425
454
  })] })]
426
455
  })
427
- }, e.id)), r.length > 3 && /* @__PURE__ */ B("p", {
456
+ }, e.id)), r.length > 3 && /* @__PURE__ */ R("p", {
428
457
  className: "text-xs text-text-secondary",
429
458
  children: [
430
459
  "+",
@@ -435,99 +464,99 @@ var q = {
435
464
  })]
436
465
  })
437
466
  }),
438
- /* @__PURE__ */ z(d, {
467
+ /* @__PURE__ */ L(u, {
439
468
  title: l("devportal.links", "Links"),
440
- children: /* @__PURE__ */ B("div", {
469
+ children: /* @__PURE__ */ R("div", {
441
470
  className: "space-y-2",
442
- children: [e.websiteUrl && /* @__PURE__ */ B("a", {
471
+ children: [e.websiteUrl && /* @__PURE__ */ R("a", {
443
472
  href: e.websiteUrl,
444
473
  target: "_blank",
445
474
  rel: "noopener noreferrer",
446
475
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
447
- children: [/* @__PURE__ */ z(j, { size: 14 }), l("devportal.website", "Website")]
448
- }), e.contactEmail && /* @__PURE__ */ B("a", {
476
+ children: [/* @__PURE__ */ L(k, { size: 14 }), l("devportal.website", "Website")]
477
+ }), e.contactEmail && /* @__PURE__ */ R("a", {
449
478
  href: `mailto:${e.contactEmail}`,
450
479
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
451
- children: [/* @__PURE__ */ z(j, { size: 14 }), e.contactEmail]
480
+ children: [/* @__PURE__ */ L(k, { size: 14 }), e.contactEmail]
452
481
  })]
453
482
  })
454
483
  })
455
484
  ]
456
485
  })]
457
486
  });
458
- }, Y = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
459
- let { t: a } = V(), o = (e, t) => {
487
+ }, X = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
488
+ let { t: a } = z(), o = (e, t) => {
460
489
  let n = a(e);
461
490
  return n === e ? t : n;
462
491
  }, s = e.kind === "PHYSICAL", c = s ? "/seller/items/new" : "/apps/new", l = s ? o("devportal.createItem", "Create Item") : o("devportal.createApp", "Create App");
463
- return /* @__PURE__ */ B("div", {
492
+ return /* @__PURE__ */ R("div", {
464
493
  className: "space-y-6",
465
- children: [/* @__PURE__ */ B("div", {
494
+ children: [/* @__PURE__ */ R("div", {
466
495
  className: "flex items-center justify-between",
467
- children: [/* @__PURE__ */ B("p", {
496
+ children: [/* @__PURE__ */ R("p", {
468
497
  className: "text-sm text-text-secondary",
469
498
  children: [
470
499
  t.length,
471
500
  " ",
472
501
  t.length === 1 ? o("devportal.application", "application") : o("devportal.applications", "applications")
473
502
  ]
474
- }), i ? /* @__PURE__ */ B("button", {
503
+ }), i ? /* @__PURE__ */ R("button", {
475
504
  onClick: () => r(c),
476
505
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
477
- children: [/* @__PURE__ */ z(N, { size: 16 }), l]
506
+ children: [/* @__PURE__ */ L(j, { size: 16 }), l]
478
507
  }) : null]
479
- }), t.length > 0 ? /* @__PURE__ */ z("div", {
508
+ }), t.length > 0 ? /* @__PURE__ */ L("div", {
480
509
  className: "space-y-2",
481
- children: t.map((e) => /* @__PURE__ */ z(p, {
510
+ children: t.map((e) => /* @__PURE__ */ L(f, {
482
511
  app: e,
483
512
  onClick: () => r(`/apps/${e.id}`)
484
513
  }, e.id))
485
- }) : /* @__PURE__ */ z(n, {
514
+ }) : /* @__PURE__ */ L(n, {
486
515
  illustration: "empty-data",
487
- icon: /* @__PURE__ */ z(T, { size: 32 }),
516
+ icon: /* @__PURE__ */ L(T, { size: 32 }),
488
517
  title: o("devportal.noApplications", "No applications"),
489
518
  description: s ? o("devportal.createFirstItemForOrg", "List your first physical item for this organization") : o("devportal.createFirstAppForOrg", "Create your first application for this organization"),
490
- action: i ? /* @__PURE__ */ B("button", {
519
+ action: i ? /* @__PURE__ */ R("button", {
491
520
  onClick: () => r(c),
492
521
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
493
- children: [/* @__PURE__ */ z(N, { size: 16 }), l]
522
+ children: [/* @__PURE__ */ L(j, { size: 16 }), l]
494
523
  }) : void 0
495
524
  })]
496
525
  });
497
- }, me = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
498
- let { t: a } = V(), o = (e, t) => {
526
+ }, Z = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
527
+ let { t: a } = z(), o = (e, t) => {
499
528
  let n = a(e);
500
529
  return n === e ? t : n;
501
530
  };
502
- return /* @__PURE__ */ B("div", {
531
+ return /* @__PURE__ */ R("div", {
503
532
  className: "space-y-6",
504
- children: [/* @__PURE__ */ B("div", {
533
+ children: [/* @__PURE__ */ R("div", {
505
534
  className: "flex items-center justify-between",
506
- children: [/* @__PURE__ */ B("p", {
535
+ children: [/* @__PURE__ */ R("p", {
507
536
  className: "text-sm text-text-secondary",
508
537
  children: [
509
538
  e.length,
510
539
  " ",
511
540
  e.length === 1 ? o("devportal.memberLower", "member") : o("devportal.membersLower", "members")
512
541
  ]
513
- }), i ? /* @__PURE__ */ B("button", {
542
+ }), i ? /* @__PURE__ */ R("button", {
514
543
  onClick: () => n(`/organizations/${r}/members`),
515
544
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
516
- children: [/* @__PURE__ */ z(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
545
+ children: [/* @__PURE__ */ L(j, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
517
546
  }) : null]
518
- }), /* @__PURE__ */ z(g, {
547
+ }), /* @__PURE__ */ L(h, {
519
548
  data: e,
520
549
  keyField: "id",
521
550
  columns: [
522
551
  {
523
552
  key: "email",
524
553
  header: o("devportal.memberColumn", "Member"),
525
- render: (e) => /* @__PURE__ */ B("div", {
554
+ render: (e) => /* @__PURE__ */ R("div", {
526
555
  className: "flex items-center gap-3",
527
- children: [/* @__PURE__ */ z("div", {
556
+ children: [/* @__PURE__ */ L("div", {
528
557
  className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
529
558
  children: e.email?.charAt(0).toUpperCase() || "U"
530
- }), /* @__PURE__ */ z("span", {
559
+ }), /* @__PURE__ */ L("span", {
531
560
  className: "font-medium",
532
561
  children: e.email
533
562
  })]
@@ -536,9 +565,9 @@ var q = {
536
565
  {
537
566
  key: "role",
538
567
  header: o("devportal.roleColumn", "Role"),
539
- render: (e) => /* @__PURE__ */ z("span", {
568
+ render: (e) => /* @__PURE__ */ L("span", {
540
569
  className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.role === "OWNER" ? "bg-accent-purple-subtle text-accent-purple" : e.role === "ADMIN" ? "bg-status-info-bg-subtle text-status-info-text" : e.role === "DEVELOPER" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-primary"),
541
- children: f[e.role]
570
+ children: d[e.role]
542
571
  })
543
572
  },
544
573
  {
@@ -549,11 +578,21 @@ var q = {
549
578
  ]
550
579
  })]
551
580
  });
552
- }, X = ({ org: e }) => {
553
- let { t: n } = V(), { allowed: r } = ne(x.ORG_UPDATE), i = (e, t) => {
554
- let r = n(e);
555
- return r === e ? t : r;
556
- }, [a, o] = w({
581
+ }, he = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
582
+ let [ee, d] = C(!1);
583
+ S(() => {
584
+ if (!a) return;
585
+ document.getElementById("fulfillment-section")?.scrollIntoView({
586
+ behavior: "smooth",
587
+ block: "start"
588
+ }), d(!0);
589
+ let e = setTimeout(() => d(!1), 2500);
590
+ return o?.(), () => clearTimeout(e);
591
+ }, [a]);
592
+ let { t: f } = z(), { allowed: p } = ne(ae.ORG_UPDATE), m = (e, t) => {
593
+ let n = f(e);
594
+ return n === e ? t : n;
595
+ }, [h, y] = C({
557
596
  name: e.name,
558
597
  description: e.description ?? "",
559
598
  websiteUrl: e.websiteUrl ?? "",
@@ -561,25 +600,25 @@ var q = {
561
600
  supportEmail: e.supportEmail ?? "",
562
601
  logoUrl: e.logoUrl ?? "",
563
602
  bannerUrl: e.bannerUrl ?? ""
564
- }), [u, f] = w({
603
+ }), [x, w] = C({
565
604
  legalEntityName: e.legalEntityName ?? "",
566
605
  legalEntityType: e.legalEntityType ?? ""
567
- }), [p, m] = w({
606
+ }), [T, E] = C({
568
607
  taxId: e.taxId ?? "",
569
608
  taxCountry: e.taxCountry ?? ""
570
- }), { locations: h } = re(), { addresses: g, loading: ie, refetch: T } = S(e.id), [E, D] = w(!1), [O, A] = w(null), [j, N] = w(null), [F, I] = w(null), [L, H] = w(null), [se, W] = w(null), [G, q] = w(null), [J, pe] = w("manual"), [Y, me] = w(!1), [X, he] = w(""), [ge, _e] = w(""), [ve, ye] = w(""), [be, xe] = w(null), [Se, Ce] = w(!1), Z = be ?? {
609
+ }), { locations: oe, refetch: se } = ie(), [ce, O] = C(!1), [k, P] = C(null), [ue, F] = C(null), [B, V] = C(null), [de, K] = C(null), [J, Y] = C(null), [me, X] = C(null), [Z, he] = C("manual"), [ge, _e] = C(!1), [ve, ye] = C(""), [be, xe] = C(""), [Se, Ce] = C(""), [we, Te] = C(null), [Ee, De] = C(!1), Q = we ?? {
571
610
  verificationMethod: e.verificationMethod,
572
611
  verificationRequestedAt: e.verificationRequestedAt,
573
612
  verificationStatus: e.verificationStatus,
574
613
  verificationRequestNotes: e.verificationRequestNotes,
575
614
  verificationRejectedReason: e.verificationRejectedReason
576
- }, Q = [];
577
- a.contactEmail.trim() ? fe(a.contactEmail) || Q.push(i("devportal.contactEmailInvalid", "Contact email must be valid")) : Q.push(i("devportal.contactEmailRequired", "Contact email is required")), a.supportEmail.trim() && !fe(a.supportEmail) && Q.push(i("devportal.supportEmailInvalid", "Support email must be valid")), a.websiteUrl.trim() ? K(a.websiteUrl) || Q.push(i("devportal.websiteInvalid", "Website URL must be valid")) : Q.push(i("devportal.websiteRequired", "Website URL is required")), u.legalEntityName.trim() || Q.push(i("devportal.legalEntityNameRequired", "Legal entity name is required")), u.legalEntityType.trim() || Q.push(i("devportal.legalEntityTypeRequired", "Entity type is required")), p.taxId.trim() || Q.push(i("devportal.taxIdRequired", "Tax ID is required")), p.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(p.taxCountry.trim()) || Q.push(i("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : Q.push(i("devportal.taxCountryRequired", "Tax country is required"));
578
- let $ = [];
579
- J === "domain" && !de(ve.trim()) && $.push(i("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), J === "document" && !K(ge.trim()) && $.push(i("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), J === "manual" && !X.trim() && $.push(i("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
580
- let we = Q.length === 0 && $.length === 0 && !Se && r, [Te, { loading: Ee }] = l({ refetchQueries: ["GetOrganization"] }), [De, { loading: Oe }] = s({ refetchQueries: ["GetOrganization"] }), [ke, { loading: Ae }] = c({ refetchQueries: ["GetOrganization"] });
581
- C(() => {
582
- o({
615
+ }, $ = [];
616
+ h.contactEmail.trim() ? pe(h.contactEmail) || $.push(m("devportal.contactEmailInvalid", "Contact email must be valid")) : $.push(m("devportal.contactEmailRequired", "Contact email is required")), h.supportEmail.trim() && !pe(h.supportEmail) && $.push(m("devportal.supportEmailInvalid", "Support email must be valid")), h.websiteUrl.trim() ? q(h.websiteUrl) || $.push(m("devportal.websiteInvalid", "Website URL must be valid")) : $.push(m("devportal.websiteRequired", "Website URL is required")), x.legalEntityName.trim() || $.push(m("devportal.legalEntityNameRequired", "Legal entity name is required")), x.legalEntityType.trim() || $.push(m("devportal.legalEntityTypeRequired", "Entity type is required")), T.taxId.trim() || $.push(m("devportal.taxIdRequired", "Tax ID is required")), T.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(T.taxCountry.trim()) || $.push(m("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : $.push(m("devportal.taxCountryRequired", "Tax country is required"));
617
+ let Oe = [];
618
+ Z === "domain" && !fe(Se.trim()) && Oe.push(m("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), Z === "document" && !q(be.trim()) && Oe.push(m("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), Z === "manual" && !ve.trim() && Oe.push(m("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
619
+ let ke = $.length === 0 && Oe.length === 0 && !Ee && p, [Ae, { loading: je }] = l({ refetchQueries: ["GetOrganization"] }), [Me, { loading: Ne }] = s({ refetchQueries: ["GetOrganization"] }), [Pe, { loading: Fe }] = c({ refetchQueries: ["GetOrganization"] });
620
+ S(() => {
621
+ y({
583
622
  name: e.name,
584
623
  description: e.description ?? "",
585
624
  websiteUrl: e.websiteUrl ?? "",
@@ -587,66 +626,66 @@ var q = {
587
626
  supportEmail: e.supportEmail ?? "",
588
627
  logoUrl: e.logoUrl ?? "",
589
628
  bannerUrl: e.bannerUrl ?? ""
590
- }), f({
629
+ }), w({
591
630
  legalEntityName: e.legalEntityName ?? "",
592
631
  legalEntityType: e.legalEntityType ?? ""
593
- }), m({
632
+ }), E({
594
633
  taxId: e.taxId ?? "",
595
634
  taxCountry: e.taxCountry ?? ""
596
635
  });
597
- }, [e.id]), C(() => {
636
+ }, [e.id]), S(() => {
598
637
  e.id && U({
599
638
  gateway: "global",
600
- query: le,
639
+ query: W,
601
640
  variables: { id: e.id }
602
- }).then((e) => xe(e.data?.developerOrganization ?? null)).catch(() => xe(null));
603
- }, [e.id, Y]);
604
- let je = async () => {
605
- q(null), W(null);
641
+ }).then((e) => Te(e.data?.developerOrganization ?? null)).catch(() => Te(null));
642
+ }, [e.id, ge]);
643
+ let Ie = async () => {
644
+ X(null), Y(null);
606
645
  try {
607
- await Te({ variables: {
646
+ await Ae({ variables: {
608
647
  id: e.id,
609
648
  input: {
610
- name: a.name.trim() || void 0,
611
- description: a.description.trim() || null,
612
- websiteUrl: a.websiteUrl.trim() || null,
613
- contactEmail: a.contactEmail.trim() || null,
614
- supportEmail: a.supportEmail.trim() || null,
615
- logoUrl: a.logoUrl.trim() || null,
616
- bannerUrl: a.bannerUrl.trim() || null
649
+ name: h.name.trim() || void 0,
650
+ description: h.description.trim() || null,
651
+ websiteUrl: h.websiteUrl.trim() || null,
652
+ contactEmail: h.contactEmail.trim() || null,
653
+ supportEmail: h.supportEmail.trim() || null,
654
+ logoUrl: h.logoUrl.trim() || null,
655
+ bannerUrl: h.bannerUrl.trim() || null
617
656
  }
618
- } }), W(i("devportal.organizationUpdated", "Organization details updated"));
657
+ } }), Y(m("devportal.organizationUpdated", "Organization details updated"));
619
658
  } catch (e) {
620
- q(e instanceof Error ? e.message : i("devportal.failedToUpdateOrganization", "Failed to update organization"));
659
+ X(e instanceof Error ? e.message : m("devportal.failedToUpdateOrganization", "Failed to update organization"));
621
660
  }
622
- }, Me = async () => {
623
- q(null), W(null);
661
+ }, Le = async () => {
662
+ X(null), Y(null);
624
663
  try {
625
- await De({ variables: {
664
+ await Me({ variables: {
626
665
  id: e.id,
627
666
  input: {
628
- legalEntityName: u.legalEntityName.trim() || null,
629
- legalEntityType: u.legalEntityType.trim() || null
667
+ legalEntityName: x.legalEntityName.trim() || null,
668
+ legalEntityType: x.legalEntityType.trim() || null
630
669
  }
631
- } }), W(i("devportal.legalInfoUpdated", "Legal information updated"));
670
+ } }), Y(m("devportal.legalInfoUpdated", "Legal information updated"));
632
671
  } catch (e) {
633
- q(e instanceof Error ? e.message : i("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
672
+ X(e instanceof Error ? e.message : m("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
634
673
  }
635
- }, Ne = async () => {
636
- q(null), W(null);
674
+ }, Re = async () => {
675
+ X(null), Y(null);
637
676
  try {
638
- await ke({ variables: {
677
+ await Pe({ variables: {
639
678
  id: e.id,
640
679
  input: {
641
- taxId: p.taxId.trim() || null,
642
- taxCountry: p.taxCountry.trim() || null
680
+ taxId: T.taxId.trim() || null,
681
+ taxCountry: T.taxCountry.trim() || null
643
682
  }
644
- } }), W(i("devportal.taxInfoUpdated", "Tax information updated"));
683
+ } }), Y(m("devportal.taxInfoUpdated", "Tax information updated"));
645
684
  } catch (e) {
646
- q(e instanceof Error ? e.message : i("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
685
+ X(e instanceof Error ? e.message : m("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
647
686
  }
648
- }, Pe = async (e) => {
649
- H(null), I(null), N(e);
687
+ }, ze = async (e) => {
688
+ K(null), V(null), F(e);
650
689
  try {
651
690
  let t = await U({
652
691
  gateway: "global",
@@ -654,14 +693,14 @@ var q = {
654
693
  variables: { id: e }
655
694
  });
656
695
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to switch pickup address");
657
- ce(), T(), I(i("devportal.pickupAddressSetActive", "Pickup address updated"));
696
+ H(), i(), V(m("devportal.pickupAddressSetActive", "Pickup address updated"));
658
697
  } catch (e) {
659
- H(e instanceof Error ? e.message : i("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
698
+ K(e instanceof Error ? e.message : m("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
660
699
  } finally {
661
- N(null);
700
+ F(null);
662
701
  }
663
- }, Fe = async (e) => {
664
- H(null), I(null), N(e);
702
+ }, Be = async (e) => {
703
+ K(null), V(null), F(e);
665
704
  try {
666
705
  let t = await U({
667
706
  gateway: "global",
@@ -669,279 +708,281 @@ var q = {
669
708
  variables: { id: e }
670
709
  });
671
710
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove pickup address");
672
- ce(), T(), I(i("devportal.pickupAddressRemoved", "Pickup address removed"));
711
+ H(), i(), V(m("devportal.pickupAddressRemoved", "Pickup address removed"));
673
712
  } catch (e) {
674
- H(e instanceof Error ? e.message : i("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
713
+ K(e instanceof Error ? e.message : m("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
675
714
  } finally {
676
- N(null), A(null);
715
+ F(null), P(null);
677
716
  }
678
717
  };
679
- return /* @__PURE__ */ B("div", {
718
+ return /* @__PURE__ */ R("div", {
680
719
  className: "space-y-6 max-w-2xl",
681
720
  children: [
682
- G && /* @__PURE__ */ z("div", {
721
+ me && /* @__PURE__ */ L("div", {
683
722
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
684
- children: G
723
+ children: me
685
724
  }),
686
- se && /* @__PURE__ */ z("div", {
725
+ J && /* @__PURE__ */ L("div", {
687
726
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
688
- children: se
727
+ children: J
689
728
  }),
690
- /* @__PURE__ */ z(d, {
691
- title: i("devportal.organizationDetails", "Organization Details"),
692
- children: /* @__PURE__ */ B("div", {
729
+ /* @__PURE__ */ L(u, {
730
+ title: m("devportal.organizationDetails", "Organization Details"),
731
+ children: /* @__PURE__ */ R("div", {
693
732
  className: "space-y-4",
694
733
  children: [
695
- /* @__PURE__ */ B("div", {
734
+ /* @__PURE__ */ R("div", {
696
735
  className: "grid gap-4 sm:grid-cols-2",
697
- children: [/* @__PURE__ */ z(v, {
698
- label: i("devportal.organizationName", "Organization Name"),
699
- value: a.name,
700
- onChange: (e) => o((t) => ({
736
+ children: [/* @__PURE__ */ L(_, {
737
+ label: m("devportal.organizationName", "Organization Name"),
738
+ value: h.name,
739
+ onChange: (e) => y((t) => ({
701
740
  ...t,
702
741
  name: e.target.value
703
742
  })),
704
- disabled: !r,
743
+ disabled: !p,
705
744
  required: !0
706
- }), /* @__PURE__ */ z(v, {
707
- label: i("devportal.slug", "Slug"),
745
+ }), /* @__PURE__ */ L(_, {
746
+ label: m("devportal.slug", "Slug"),
708
747
  value: e.slug,
709
748
  disabled: !0,
710
- hint: i("devportal.slugReadOnly", "Slug cannot be changed here")
749
+ hint: m("devportal.slugReadOnly", "Slug cannot be changed here")
711
750
  })]
712
751
  }),
713
- /* @__PURE__ */ z(y, {
714
- label: i("devportal.description", "Description"),
715
- value: a.description,
716
- onChange: (e) => o((t) => ({
752
+ /* @__PURE__ */ L(v, {
753
+ label: m("devportal.description", "Description"),
754
+ value: h.description,
755
+ onChange: (e) => y((t) => ({
717
756
  ...t,
718
757
  description: e.target.value
719
758
  })),
720
- disabled: !r,
759
+ disabled: !p,
721
760
  rows: 4
722
761
  }),
723
- /* @__PURE__ */ B("div", {
762
+ /* @__PURE__ */ R("div", {
724
763
  className: "grid gap-4 sm:grid-cols-2",
725
764
  children: [
726
- /* @__PURE__ */ z(v, {
727
- label: i("devportal.website", "Website"),
765
+ /* @__PURE__ */ L(_, {
766
+ label: m("devportal.website", "Website"),
728
767
  type: "url",
729
- value: a.websiteUrl,
730
- onChange: (e) => o((t) => ({
768
+ value: h.websiteUrl,
769
+ onChange: (e) => y((t) => ({
731
770
  ...t,
732
771
  websiteUrl: e.target.value
733
772
  })),
734
- disabled: !r
773
+ disabled: !p
735
774
  }),
736
- /* @__PURE__ */ z(v, {
737
- label: i("devportal.contactEmail", "Contact Email"),
775
+ /* @__PURE__ */ L(_, {
776
+ label: m("devportal.contactEmail", "Contact Email"),
738
777
  type: "email",
739
- value: a.contactEmail,
740
- onChange: (e) => o((t) => ({
778
+ value: h.contactEmail,
779
+ onChange: (e) => y((t) => ({
741
780
  ...t,
742
781
  contactEmail: e.target.value
743
782
  })),
744
- disabled: !r
783
+ disabled: !p
745
784
  }),
746
- /* @__PURE__ */ z(v, {
747
- label: i("devportal.supportEmail", "Support Email"),
785
+ /* @__PURE__ */ L(_, {
786
+ label: m("devportal.supportEmail", "Support Email"),
748
787
  type: "email",
749
- value: a.supportEmail,
750
- onChange: (e) => o((t) => ({
788
+ value: h.supportEmail,
789
+ onChange: (e) => y((t) => ({
751
790
  ...t,
752
791
  supportEmail: e.target.value
753
792
  })),
754
- disabled: !r
793
+ disabled: !p
755
794
  }),
756
- /* @__PURE__ */ z(v, {
757
- label: i("devportal.logoUrl", "Logo URL"),
795
+ /* @__PURE__ */ L(_, {
796
+ label: m("devportal.logoUrl", "Logo URL"),
758
797
  type: "url",
759
- value: a.logoUrl,
760
- onChange: (e) => o((t) => ({
798
+ value: h.logoUrl,
799
+ onChange: (e) => y((t) => ({
761
800
  ...t,
762
801
  logoUrl: e.target.value
763
802
  })),
764
- disabled: !r
803
+ disabled: !p
765
804
  })
766
805
  ]
767
806
  }),
768
- /* @__PURE__ */ z(v, {
769
- label: i("devportal.bannerUrl", "Banner URL"),
807
+ /* @__PURE__ */ L(_, {
808
+ label: m("devportal.bannerUrl", "Banner URL"),
770
809
  type: "url",
771
- value: a.bannerUrl,
772
- onChange: (e) => o((t) => ({
810
+ value: h.bannerUrl,
811
+ onChange: (e) => y((t) => ({
773
812
  ...t,
774
813
  bannerUrl: e.target.value
775
814
  })),
776
- disabled: !r
815
+ disabled: !p
777
816
  }),
778
- /* @__PURE__ */ z(_, { items: [
817
+ /* @__PURE__ */ L(g, { items: [
779
818
  {
780
- label: i("devportal.organizationId", "Organization ID"),
781
- value: /* @__PURE__ */ z("code", {
819
+ label: m("devportal.organizationId", "Organization ID"),
820
+ value: /* @__PURE__ */ L("code", {
782
821
  className: "text-xs",
783
822
  children: e.id
784
823
  })
785
824
  },
786
825
  {
787
- label: i("devportal.tier", "Tier"),
826
+ label: m("devportal.tier", "Tier"),
788
827
  value: e.tier
789
828
  },
790
829
  {
791
- label: i("devportal.partnerTier", "Partner Tier"),
792
- value: e.partnerTier || i("devportal.none", "None")
830
+ label: m("devportal.partnerTier", "Partner Tier"),
831
+ value: e.partnerTier || m("devportal.none", "None")
793
832
  },
794
833
  {
795
- label: i("devportal.created", "Created"),
834
+ label: m("devportal.created", "Created"),
796
835
  value: new Date(e.createdAt).toLocaleDateString()
797
836
  },
798
837
  {
799
- label: i("devportal.platformFeeRate", "Platform Fee Rate"),
838
+ label: m("devportal.platformFeeRate", "Platform Fee Rate"),
800
839
  value: `${(e.platformFeeRate * 100).toFixed(0)}%`
801
840
  }
802
841
  ] }),
803
- /* @__PURE__ */ z("div", {
842
+ /* @__PURE__ */ L("div", {
804
843
  className: "flex justify-end",
805
- children: /* @__PURE__ */ B("button", {
844
+ children: /* @__PURE__ */ R("button", {
806
845
  type: "button",
807
- disabled: !r || Ee,
808
- onClick: () => void je(),
846
+ disabled: !p || je,
847
+ onClick: () => void Ie(),
809
848
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
810
- children: [Ee ? /* @__PURE__ */ z(M, {
849
+ children: [je ? /* @__PURE__ */ L(A, {
811
850
  size: 14,
812
851
  className: "animate-spin"
813
- }) : /* @__PURE__ */ z(ae, { size: 14 }), i("devportal.saveChanges", "Save Changes")]
852
+ }) : /* @__PURE__ */ L(le, { size: 14 }), m("devportal.saveChanges", "Save Changes")]
814
853
  })
815
854
  })
816
855
  ]
817
856
  })
818
857
  }),
819
- /* @__PURE__ */ z(d, {
820
- title: i("devportal.legalInformation", "Legal Information"),
821
- children: /* @__PURE__ */ B("div", {
858
+ /* @__PURE__ */ L(u, {
859
+ title: m("devportal.legalInformation", "Legal Information"),
860
+ children: /* @__PURE__ */ R("div", {
822
861
  className: "space-y-4",
823
862
  children: [
824
- /* @__PURE__ */ B("div", {
863
+ /* @__PURE__ */ R("div", {
825
864
  className: "grid gap-4 sm:grid-cols-2",
826
865
  children: [
827
- /* @__PURE__ */ z(v, {
828
- label: i("devportal.legalEntityName", "Legal Entity Name"),
829
- value: u.legalEntityName,
830
- onChange: (e) => f((t) => ({
866
+ /* @__PURE__ */ L(_, {
867
+ label: m("devportal.legalEntityName", "Legal Entity Name"),
868
+ value: x.legalEntityName,
869
+ onChange: (e) => w((t) => ({
831
870
  ...t,
832
871
  legalEntityName: e.target.value
833
872
  })),
834
- disabled: !r
873
+ disabled: !p
835
874
  }),
836
- /* @__PURE__ */ z(v, {
837
- label: i("devportal.entityType", "Entity Type"),
838
- value: u.legalEntityType,
839
- onChange: (e) => f((t) => ({
875
+ /* @__PURE__ */ L(_, {
876
+ label: m("devportal.entityType", "Entity Type"),
877
+ value: x.legalEntityType,
878
+ onChange: (e) => w((t) => ({
840
879
  ...t,
841
880
  legalEntityType: e.target.value
842
881
  })),
843
- disabled: !r
882
+ disabled: !p
844
883
  }),
845
- /* @__PURE__ */ z(v, {
846
- label: i("devportal.taxId", "Tax ID"),
847
- value: p.taxId,
848
- onChange: (e) => m((t) => ({
884
+ /* @__PURE__ */ L(_, {
885
+ label: m("devportal.taxId", "Tax ID"),
886
+ value: T.taxId,
887
+ onChange: (e) => E((t) => ({
849
888
  ...t,
850
889
  taxId: e.target.value
851
890
  })),
852
- disabled: !r
891
+ disabled: !p
853
892
  }),
854
- /* @__PURE__ */ z(v, {
855
- label: i("devportal.taxCountry", "Tax Country"),
856
- value: p.taxCountry,
857
- onChange: (e) => m((t) => ({
893
+ /* @__PURE__ */ L(_, {
894
+ label: m("devportal.taxCountry", "Tax Country"),
895
+ value: T.taxCountry,
896
+ onChange: (e) => E((t) => ({
858
897
  ...t,
859
898
  taxCountry: e.target.value.toUpperCase()
860
899
  })),
861
- disabled: !r
900
+ disabled: !p
862
901
  })
863
902
  ]
864
903
  }),
865
- /* @__PURE__ */ z(_, { items: [{
866
- label: i("devportal.taxForm", "Tax Form"),
867
- value: e.taxFormType || i("devportal.notSubmitted", "Not submitted")
904
+ /* @__PURE__ */ L(g, { items: [{
905
+ label: m("devportal.taxForm", "Tax Form"),
906
+ value: e.taxFormType || m("devportal.notSubmitted", "Not submitted")
868
907
  }, {
869
- label: i("devportal.taxFormStatus", "Tax Form Status"),
870
- value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ B("span", {
908
+ label: m("devportal.taxFormStatus", "Tax Form Status"),
909
+ value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ R("span", {
871
910
  className: "text-status-success-text flex items-center gap-1",
872
911
  children: [
873
- /* @__PURE__ */ z(k, { size: 14 }),
912
+ /* @__PURE__ */ L(D, { size: 14 }),
874
913
  " ",
875
- i("devportal.verified", "Verified")
914
+ m("devportal.verified", "Verified")
876
915
  ]
877
- }) : i("devportal.pendingVerification", "Pending verification") : i("devportal.notSubmitted", "Not submitted")
916
+ }) : m("devportal.pendingVerification", "Pending verification") : m("devportal.notSubmitted", "Not submitted")
878
917
  }] }),
879
- /* @__PURE__ */ B("div", {
918
+ /* @__PURE__ */ R("div", {
880
919
  className: "flex justify-end gap-2",
881
- children: [/* @__PURE__ */ B("button", {
920
+ children: [/* @__PURE__ */ R("button", {
882
921
  type: "button",
883
- disabled: !r || Oe,
884
- onClick: () => void Me(),
922
+ disabled: !p || Ne,
923
+ onClick: () => void Le(),
885
924
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
886
- children: [Oe ? /* @__PURE__ */ z(M, {
925
+ children: [Ne ? /* @__PURE__ */ L(A, {
887
926
  size: 14,
888
927
  className: "animate-spin"
889
- }) : null, i("devportal.saveLegalInfo", "Save Legal Info")]
890
- }), /* @__PURE__ */ B("button", {
928
+ }) : null, m("devportal.saveLegalInfo", "Save Legal Info")]
929
+ }), /* @__PURE__ */ R("button", {
891
930
  type: "button",
892
- disabled: !r || Ae,
893
- onClick: () => void Ne(),
931
+ disabled: !p || Fe,
932
+ onClick: () => void Re(),
894
933
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
895
- children: [Ae ? /* @__PURE__ */ z(M, {
934
+ children: [Fe ? /* @__PURE__ */ L(A, {
896
935
  size: 14,
897
936
  className: "animate-spin"
898
- }) : null, i("devportal.saveTaxInfo", "Save Tax Info")]
937
+ }) : null, m("devportal.saveTaxInfo", "Save Tax Info")]
899
938
  })]
900
939
  })
901
940
  ]
902
941
  })
903
942
  }),
904
- e.kind === "PHYSICAL" && /* @__PURE__ */ z(d, {
905
- title: i("devportal.fulfillment", "Fulfillment"),
906
- children: /* @__PURE__ */ B("div", {
943
+ e.kind === "PHYSICAL" && /* @__PURE__ */ L(u, {
944
+ id: "fulfillment-section",
945
+ title: m("devportal.fulfillment", "Fulfillment"),
946
+ className: t("scroll-mt-6 rounded-lg transition-shadow duration-500", ee && "ring-2 ring-action-primary-bg ring-offset-4"),
947
+ children: /* @__PURE__ */ R("div", {
907
948
  className: "space-y-3",
908
949
  children: [
909
- L && /* @__PURE__ */ z("div", {
950
+ de && /* @__PURE__ */ L("div", {
910
951
  className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
911
- children: L
952
+ children: de
912
953
  }),
913
- F && /* @__PURE__ */ z("div", {
954
+ B && /* @__PURE__ */ L("div", {
914
955
  className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
915
- children: F
956
+ children: B
916
957
  }),
917
- !ie && g.length === 0 && /* @__PURE__ */ B("div", {
958
+ !r && n.length === 0 && /* @__PURE__ */ R("div", {
918
959
  className: "rounded-md border border-border-seam bg-bg-sunken p-4",
919
- children: [/* @__PURE__ */ z("p", {
960
+ children: [/* @__PURE__ */ L("p", {
920
961
  className: "text-sm font-medium",
921
- children: i("devportal.noPickupAddress", "No pickup address set up yet")
922
- }), /* @__PURE__ */ z("p", {
962
+ children: m("devportal.noPickupAddress", "No pickup address set up yet")
963
+ }), /* @__PURE__ */ L("p", {
923
964
  className: "mt-1 text-sm text-text-secondary",
924
- children: i("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Add your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
965
+ children: m("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Add your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
925
966
  })]
926
967
  }),
927
- g.length > 0 && /* @__PURE__ */ z("div", {
968
+ n.length > 0 && /* @__PURE__ */ L("div", {
928
969
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
929
- children: g.map((e) => {
930
- let n = h.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), a = j === e.id;
931
- return /* @__PURE__ */ B("div", {
970
+ children: n.map((e) => {
971
+ let n = oe.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = ue === e.id;
972
+ return /* @__PURE__ */ R("div", {
932
973
  className: t("rounded-md border p-4", e.isDefault ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-seam bg-bg-sunken"),
933
974
  children: [
934
- /* @__PURE__ */ B("div", {
975
+ /* @__PURE__ */ R("div", {
935
976
  className: "flex items-start justify-between gap-2",
936
- children: [/* @__PURE__ */ z("p", {
977
+ children: [/* @__PURE__ */ L("p", {
937
978
  className: "text-sm font-medium",
938
979
  children: e.carrierLocationLabel
939
- }), e.isDefault && /* @__PURE__ */ z("span", {
980
+ }), e.isDefault && /* @__PURE__ */ L("span", {
940
981
  className: "rounded-full bg-status-success-bg px-2 py-0.5 text-xs font-medium text-white",
941
- children: i("devportal.active", "Active")
982
+ children: m("devportal.active", "Active")
942
983
  })]
943
984
  }),
944
- /* @__PURE__ */ B("p", {
985
+ /* @__PURE__ */ R("p", {
945
986
  className: "mt-1 text-sm text-text-secondary",
946
987
  children: [
947
988
  e.address,
@@ -956,227 +997,230 @@ var q = {
956
997
  e.country
957
998
  ]
958
999
  }),
959
- /* @__PURE__ */ z("p", {
1000
+ /* @__PURE__ */ L("p", {
960
1001
  className: "mt-1 text-xs text-text-secondary",
961
- children: b(e.carrier)
1002
+ children: re(e.carrier)
962
1003
  }),
963
- !n && /* @__PURE__ */ z("p", {
1004
+ !n && /* @__PURE__ */ L("p", {
964
1005
  className: "mt-2 text-xs text-status-error-text",
965
- children: i("devportal.pickupAddressNotRegisteredHint", "Not currently registered with the carrier — physical orders can't auto-ship from this address right now.")
1006
+ children: m("devportal.pickupAddressNotRegisteredHint", "Not currently registered with the carrier — physical orders can't auto-ship from this address right now.")
966
1007
  }),
967
- r && /* @__PURE__ */ B("div", {
1008
+ p && /* @__PURE__ */ R("div", {
968
1009
  className: "mt-3 flex items-center gap-4",
969
- children: [!e.isDefault && /* @__PURE__ */ z("button", {
1010
+ children: [!e.isDefault && /* @__PURE__ */ L("button", {
970
1011
  type: "button",
971
- disabled: a,
972
- onClick: () => void Pe(e.id),
1012
+ disabled: r,
1013
+ onClick: () => void ze(e.id),
973
1014
  className: "text-sm font-medium text-action-primary-text hover:underline disabled:opacity-50",
974
- children: i("devportal.setPickupAddressActiveCta", "Set as active")
975
- }), /* @__PURE__ */ B("button", {
1015
+ children: m("devportal.setPickupAddressActiveCta", "Set as active")
1016
+ }), /* @__PURE__ */ R("button", {
976
1017
  type: "button",
977
- disabled: a,
978
- onClick: () => A(e.id),
1018
+ disabled: r,
1019
+ onClick: () => P(e.id),
979
1020
  className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
980
- children: [/* @__PURE__ */ z(P, { className: "h-3.5 w-3.5" }), i("devportal.removePickupAddressCta", "Remove")]
1021
+ children: [/* @__PURE__ */ L(N, { className: "h-3.5 w-3.5" }), m("devportal.removePickupAddressCta", "Remove")]
981
1022
  })]
982
1023
  })
983
1024
  ]
984
1025
  }, e.id);
985
1026
  })
986
1027
  }),
987
- r && /* @__PURE__ */ z("button", {
988
- type: "button",
989
- onClick: () => D(!0),
990
- className: "text-sm font-medium text-action-primary-text hover:underline",
991
- children: i("devportal.addPickupAddressCta", "Add pickup address")
1028
+ p && /* @__PURE__ */ L("div", {
1029
+ className: "flex justify-end",
1030
+ children: /* @__PURE__ */ R("button", {
1031
+ type: "button",
1032
+ onClick: () => O(!0),
1033
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
1034
+ children: [/* @__PURE__ */ L(j, { size: 14 }), m("devportal.addPickupAddressCta", "Add pickup address")]
1035
+ })
992
1036
  }),
993
- E && /* @__PURE__ */ z(te, {
994
- open: E,
995
- onOpenChange: D,
1037
+ ce && /* @__PURE__ */ L(te, {
1038
+ open: ce,
1039
+ onOpenChange: O,
996
1040
  organizationId: e.id,
997
1041
  carrier: "shiprocket",
998
1042
  onRegistered: () => {
999
- T(), I(i("devportal.pickupAddressAdded", "Pickup address added"));
1043
+ i(), se(), V(m("devportal.pickupAddressAdded", "Pickup address added"));
1000
1044
  }
1001
1045
  }),
1002
- /* @__PURE__ */ z(ee, {
1003
- open: O !== null,
1046
+ /* @__PURE__ */ L(b, {
1047
+ open: k !== null,
1004
1048
  onOpenChange: (e) => {
1005
- e || A(null);
1049
+ e || P(null);
1006
1050
  },
1007
1051
  variant: "danger",
1008
- loading: j === O,
1009
- title: i("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1010
- description: i("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
1011
- confirmLabel: i("devportal.remove", "Remove"),
1012
- cancelLabel: i("devportal.cancel", "Cancel"),
1052
+ loading: ue === k,
1053
+ title: m("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
1054
+ description: m("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
1055
+ confirmLabel: m("devportal.remove", "Remove"),
1056
+ cancelLabel: m("devportal.cancel", "Cancel"),
1013
1057
  onConfirm: async () => {
1014
- O && await Fe(O);
1058
+ k && await Be(k);
1015
1059
  }
1016
1060
  })
1017
1061
  ]
1018
1062
  })
1019
1063
  }),
1020
- /* @__PURE__ */ B(d, {
1021
- title: i("devportal.verificationStatus", "Verification Status"),
1022
- children: [/* @__PURE__ */ z(_, { items: [{
1023
- label: i("devportal.verifiedLabel", "Verified"),
1024
- value: Z.verificationStatus === "VERIFIED" ? /* @__PURE__ */ B("span", {
1064
+ /* @__PURE__ */ R(u, {
1065
+ title: m("devportal.verificationStatus", "Verification Status"),
1066
+ children: [/* @__PURE__ */ L(g, { items: [{
1067
+ label: m("devportal.verifiedLabel", "Verified"),
1068
+ value: Q.verificationStatus === "VERIFIED" ? /* @__PURE__ */ R("span", {
1025
1069
  className: "text-status-success-text flex items-center gap-1",
1026
1070
  children: [
1027
- /* @__PURE__ */ z(k, { size: 14 }),
1071
+ /* @__PURE__ */ L(D, { size: 14 }),
1028
1072
  " ",
1029
- i("devportal.verifiedVia", "Verified via"),
1073
+ m("devportal.verifiedVia", "Verified via"),
1030
1074
  " ",
1031
- Z.verificationMethod
1075
+ Q.verificationMethod
1032
1076
  ]
1033
- }) : Z.verificationStatus === "PENDING" ? i("devportal.pendingVerification", "Pending verification") : Z.verificationStatus === "REJECTED" ? i("devportal.verificationRejected", "Rejected") : i("devportal.notVerified", "Not verified")
1077
+ }) : Q.verificationStatus === "PENDING" ? m("devportal.pendingVerification", "Pending verification") : Q.verificationStatus === "REJECTED" ? m("devportal.verificationRejected", "Rejected") : m("devportal.notVerified", "Not verified")
1034
1078
  }, {
1035
- label: i("devportal.certifiedLabel", "Certified"),
1036
- value: e.isCertified ? /* @__PURE__ */ B("span", {
1079
+ label: m("devportal.certifiedLabel", "Certified"),
1080
+ value: e.isCertified ? /* @__PURE__ */ R("span", {
1037
1081
  className: "text-accent-blue flex items-center gap-1",
1038
1082
  children: [
1039
- /* @__PURE__ */ z(oe, { size: 14 }),
1083
+ /* @__PURE__ */ L(M, { size: 14 }),
1040
1084
  " ",
1041
- i("devportal.certifiedUntil", "Certified until"),
1085
+ m("devportal.certifiedUntil", "Certified until"),
1042
1086
  " ",
1043
1087
  e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
1044
1088
  ]
1045
- }) : i("devportal.notCertified", "Not certified")
1046
- }] }), Z.verificationStatus !== "VERIFIED" && /* @__PURE__ */ z("div", {
1089
+ }) : m("devportal.notCertified", "Not certified")
1090
+ }] }), Q.verificationStatus !== "VERIFIED" && /* @__PURE__ */ L("div", {
1047
1091
  className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
1048
- children: Y ? /* @__PURE__ */ B("p", {
1092
+ children: ge ? /* @__PURE__ */ R("p", {
1049
1093
  className: "text-sm text-status-success-text flex items-center gap-2",
1050
- children: [/* @__PURE__ */ z(k, { size: 14 }), i("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1051
- }) : /* @__PURE__ */ B(R, { children: [
1052
- /* @__PURE__ */ z("p", {
1094
+ children: [/* @__PURE__ */ L(D, { size: 14 }), m("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
1095
+ }) : /* @__PURE__ */ R(I, { children: [
1096
+ /* @__PURE__ */ L("p", {
1053
1097
  className: "text-sm text-text-secondary",
1054
- children: i("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1098
+ children: m("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
1055
1099
  }),
1056
- Z.verificationStatus === "PENDING" && /* @__PURE__ */ B("div", {
1100
+ Q.verificationStatus === "PENDING" && /* @__PURE__ */ R("div", {
1057
1101
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1058
1102
  children: [
1059
- i("devportal.pendingVerification", "Pending verification"),
1060
- Z.verificationMethod ? ` · ${Z.verificationMethod}` : "",
1061
- Z.verificationRequestNotes ? ` · ${Z.verificationRequestNotes}` : ""
1103
+ m("devportal.pendingVerification", "Pending verification"),
1104
+ Q.verificationMethod ? ` · ${Q.verificationMethod}` : "",
1105
+ Q.verificationRequestNotes ? ` · ${Q.verificationRequestNotes}` : ""
1062
1106
  ]
1063
1107
  }),
1064
- Z.verificationStatus === "REJECTED" && Z.verificationRejectedReason && /* @__PURE__ */ z("div", {
1108
+ Q.verificationStatus === "REJECTED" && Q.verificationRejectedReason && /* @__PURE__ */ L("div", {
1065
1109
  className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
1066
- children: Z.verificationRejectedReason
1110
+ children: Q.verificationRejectedReason
1067
1111
  }),
1068
- Q.length > 0 && /* @__PURE__ */ B("div", {
1112
+ $.length > 0 && /* @__PURE__ */ R("div", {
1069
1113
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
1070
- children: [/* @__PURE__ */ z("div", {
1114
+ children: [/* @__PURE__ */ L("div", {
1071
1115
  className: "font-medium text-text-primary",
1072
- children: i("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1073
- }), /* @__PURE__ */ z("ul", {
1116
+ children: m("devportal.completeBeforeVerification", "Complete these details before submitting for review")
1117
+ }), /* @__PURE__ */ L("ul", {
1074
1118
  className: "mt-2 list-disc pl-5 space-y-1",
1075
- children: Q.map((e) => /* @__PURE__ */ z("li", { children: e }, e))
1119
+ children: $.map((e) => /* @__PURE__ */ L("li", { children: e }, e))
1076
1120
  })]
1077
1121
  }),
1078
- Z.verificationStatus !== "PENDING" && /* @__PURE__ */ B(R, { children: [
1079
- /* @__PURE__ */ z("div", {
1122
+ Q.verificationStatus !== "PENDING" && /* @__PURE__ */ R(I, { children: [
1123
+ /* @__PURE__ */ L("div", {
1080
1124
  className: "flex gap-2 flex-wrap",
1081
1125
  children: [
1082
1126
  "domain",
1083
1127
  "document",
1084
1128
  "manual"
1085
- ].map((e) => /* @__PURE__ */ z("button", {
1129
+ ].map((e) => /* @__PURE__ */ L("button", {
1086
1130
  type: "button",
1087
- onClick: () => pe(e),
1088
- className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${J === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1089
- children: e === "domain" ? i("devportal.domainVerification", "Domain") : e === "document" ? i("devportal.documentVerification", "Document") : i("devportal.manualVerification", "Manual review")
1131
+ onClick: () => he(e),
1132
+ className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${Z === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
1133
+ children: e === "domain" ? m("devportal.domainVerification", "Domain") : e === "document" ? m("devportal.documentVerification", "Document") : m("devportal.manualVerification", "Manual review")
1090
1134
  }, e))
1091
1135
  }),
1092
- J === "domain" ? /* @__PURE__ */ z(v, {
1093
- label: i("devportal.domainVerification", "Domain"),
1094
- value: ve,
1095
- onChange: (e) => ye(e.target.value),
1136
+ Z === "domain" ? /* @__PURE__ */ L(_, {
1137
+ label: m("devportal.domainVerification", "Domain"),
1138
+ value: Se,
1139
+ onChange: (e) => Ce(e.target.value),
1096
1140
  placeholder: "example.com"
1097
- }) : J === "document" ? /* @__PURE__ */ z(v, {
1098
- label: i("devportal.evidenceUrl", "Evidence URL"),
1099
- value: ge,
1100
- onChange: (e) => _e(e.target.value),
1141
+ }) : Z === "document" ? /* @__PURE__ */ L(_, {
1142
+ label: m("devportal.evidenceUrl", "Evidence URL"),
1143
+ value: be,
1144
+ onChange: (e) => xe(e.target.value),
1101
1145
  placeholder: "https://..."
1102
1146
  }) : null,
1103
- /* @__PURE__ */ z(y, {
1104
- label: i("devportal.notes", "Notes"),
1105
- value: X,
1106
- onChange: (e) => he(e.target.value),
1147
+ /* @__PURE__ */ L(v, {
1148
+ label: m("devportal.notes", "Notes"),
1149
+ value: ve,
1150
+ onChange: (e) => ye(e.target.value),
1107
1151
  placeholder: "What should reviewers validate?"
1108
1152
  }),
1109
- /* @__PURE__ */ B("button", {
1153
+ /* @__PURE__ */ R("button", {
1110
1154
  type: "button",
1111
- disabled: !we,
1155
+ disabled: !ke,
1112
1156
  onClick: () => void (async () => {
1113
- let t = ve.trim(), n = ge.trim(), r = X.trim();
1114
- if (J === "domain" && !de(t)) {
1115
- q(i("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1157
+ let t = Se.trim(), n = be.trim(), r = ve.trim();
1158
+ if (Z === "domain" && !fe(t)) {
1159
+ X(m("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
1116
1160
  return;
1117
1161
  }
1118
- if (J === "document" && !K(n)) {
1119
- q(i("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1162
+ if (Z === "document" && !q(n)) {
1163
+ X(m("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
1120
1164
  return;
1121
1165
  }
1122
- if (J === "manual" && !r) {
1123
- q(i("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1166
+ if (Z === "manual" && !r) {
1167
+ X(m("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
1124
1168
  return;
1125
1169
  }
1126
- q(null), W(null), Ce(!0);
1170
+ X(null), Y(null), De(!0);
1127
1171
  try {
1128
- await Te({ variables: {
1172
+ await Ae({ variables: {
1129
1173
  id: e.id,
1130
1174
  input: {
1131
- name: a.name.trim() || void 0,
1132
- description: a.description.trim() || null,
1133
- websiteUrl: a.websiteUrl.trim() || null,
1134
- contactEmail: a.contactEmail.trim() || null,
1135
- supportEmail: a.supportEmail.trim() || null,
1136
- logoUrl: a.logoUrl.trim() || null,
1137
- bannerUrl: a.bannerUrl.trim() || null
1175
+ name: h.name.trim() || void 0,
1176
+ description: h.description.trim() || null,
1177
+ websiteUrl: h.websiteUrl.trim() || null,
1178
+ contactEmail: h.contactEmail.trim() || null,
1179
+ supportEmail: h.supportEmail.trim() || null,
1180
+ logoUrl: h.logoUrl.trim() || null,
1181
+ bannerUrl: h.bannerUrl.trim() || null
1138
1182
  }
1139
- } }), await De({ variables: {
1183
+ } }), await Me({ variables: {
1140
1184
  id: e.id,
1141
1185
  input: {
1142
- legalEntityName: u.legalEntityName.trim() || null,
1143
- legalEntityType: u.legalEntityType.trim() || null
1186
+ legalEntityName: x.legalEntityName.trim() || null,
1187
+ legalEntityType: x.legalEntityType.trim() || null
1144
1188
  }
1145
- } }), await ke({ variables: {
1189
+ } }), await Pe({ variables: {
1146
1190
  id: e.id,
1147
1191
  input: {
1148
- taxId: p.taxId.trim() || null,
1149
- taxCountry: p.taxCountry.trim() || null
1192
+ taxId: T.taxId.trim() || null,
1193
+ taxCountry: T.taxCountry.trim() || null
1150
1194
  }
1151
1195
  } });
1152
- let o = await U({
1196
+ let i = await U({
1153
1197
  gateway: "global",
1154
- query: ue,
1198
+ query: G,
1155
1199
  variables: {
1156
1200
  id: e.id,
1157
- method: J,
1201
+ method: Z,
1158
1202
  notes: r || null,
1159
- evidenceUrl: J === "domain" ? null : n || null,
1160
- domain: J === "domain" && t || null
1203
+ evidenceUrl: Z === "domain" ? null : n || null,
1204
+ domain: Z === "domain" && t || null
1161
1205
  }
1162
1206
  });
1163
- if (o.errors?.length) throw Error(o.errors[0]?.message || "Verification request failed");
1164
- me(!0), W(i("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), xe((await U({
1207
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "Verification request failed");
1208
+ _e(!0), Y(m("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Te((await U({
1165
1209
  gateway: "global",
1166
- query: le,
1210
+ query: W,
1167
1211
  variables: { id: e.id }
1168
1212
  })).data?.developerOrganization ?? null);
1169
1213
  } catch (e) {
1170
- q(e instanceof Error ? e.message : i("devportal.verificationRequestFailed", "Verification request failed"));
1214
+ X(e instanceof Error ? e.message : m("devportal.verificationRequestFailed", "Verification request failed"));
1171
1215
  } finally {
1172
- Ce(!1);
1216
+ De(!1);
1173
1217
  }
1174
1218
  })(),
1175
1219
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
1176
- children: [Se ? /* @__PURE__ */ z(M, {
1220
+ children: [Ee ? /* @__PURE__ */ L(A, {
1177
1221
  size: 14,
1178
1222
  className: "animate-spin"
1179
- }) : /* @__PURE__ */ z(oe, { size: 14 }), i("devportal.requestVerification", "Request Verification")]
1223
+ }) : /* @__PURE__ */ L(M, { size: 14 }), m("devportal.requestVerification", "Request Verification")]
1180
1224
  })
1181
1225
  ] })
1182
1226
  ] })
@@ -1186,6 +1230,6 @@ var q = {
1186
1230
  });
1187
1231
  };
1188
1232
  //#endregion
1189
- export { J as OrganizationDetailPage };
1233
+ export { Y as OrganizationDetailPage };
1190
1234
 
1191
1235
  //# sourceMappingURL=OrganizationDetailPage.js.map