@streamoid/settings 0.17.0 → 0.19.0

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.
package/dist/index.mjs CHANGED
@@ -332,7 +332,7 @@ var TAB_DESCRIPTIONS = {
332
332
  organization: "Everyone in the organization and their role",
333
333
  organizationWorkspaces: "Every workspace in this organization, and workspaces asking to join it",
334
334
  organizationDomains: "Every workspace in this organization, and workspaces asking to join it",
335
- referral: "Invite friends to Streamoid and track the rewards you have earned",
335
+ referral: "Your link for bringing new people to Streamoid",
336
336
  billing: "Workspace plan, credits, invoices and usage history",
337
337
  apikey: "Create and revoke keys for calling the Streamoid APIs",
338
338
  connectedApps: "Apps like ChatGPT and Codex that you've allowed to use CXO for you",
@@ -374,6 +374,7 @@ function AdministrationOverview({
374
374
  isWorkspaceAdmin,
375
375
  showConnectedApps,
376
376
  showIntegrations,
377
+ showReferral = false,
377
378
  canInvite,
378
379
  onNavigate,
379
380
  onInvitePeople
@@ -381,7 +382,7 @@ function AdministrationOverview({
381
382
  const groups = [
382
383
  {
383
384
  title: "Account",
384
- tabs: ["profile", "workspaceList", ...showConnectedApps ? ["connectedApps"] : []]
385
+ tabs: ["profile", "workspaceList", ...showConnectedApps ? ["connectedApps"] : [], ...showReferral ? ["referral"] : []]
385
386
  },
386
387
  ...hasWorkspace ? [{
387
388
  title: "Workspace",
@@ -615,8 +616,10 @@ import {
615
616
  SiconTeam,
616
617
  SiconWorkspace as SiconWorkspace2,
617
618
  SiconPlus as SiconPlus3,
619
+ SiconReferral,
618
620
  SiconBolt,
619
- SiconSend,
621
+ SiconCopy as SiconCopy2,
622
+ SiconCheck as SiconCheck2,
620
623
  SiconUpload as SiconUpload2,
621
624
  SiconDelete,
622
625
  SiconUser,
@@ -9690,7 +9693,11 @@ function Spinner() {
9690
9693
  }
9691
9694
  );
9692
9695
  }
9693
- function LoadError({ message, onRetry }) {
9696
+ function LoadError({
9697
+ message,
9698
+ onRetry,
9699
+ retryLabel = "Try again"
9700
+ }) {
9694
9701
  return /* @__PURE__ */ jsxs22(
9695
9702
  "div",
9696
9703
  {
@@ -9705,7 +9712,7 @@ function LoadError({ message, onRetry }) {
9705
9712
  },
9706
9713
  children: [
9707
9714
  /* @__PURE__ */ jsx25("p", { style: { margin: 0, fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: message }),
9708
- /* @__PURE__ */ jsx25(ScButton10, { text: "Try again", variant: "outline", size: "sm", onClick: onRetry })
9715
+ /* @__PURE__ */ jsx25(ScButton10, { text: retryLabel, variant: "outline", size: "sm", onClick: onRetry })
9709
9716
  ]
9710
9717
  }
9711
9718
  );
@@ -14390,13 +14397,171 @@ function ConnectedAppsContent() {
14390
14397
  );
14391
14398
  }
14392
14399
 
14400
+ // src/referral.ts
14401
+ function referralCodeOf(user) {
14402
+ if (!user || typeof user !== "object") return "";
14403
+ const u = user;
14404
+ for (const key of ["referralCode", "referral_code", "referalCode", "referal_code"]) {
14405
+ const value = u[key];
14406
+ if (typeof value === "string" && value.trim()) return value.trim();
14407
+ }
14408
+ return "";
14409
+ }
14410
+ function referralLink(code, origin) {
14411
+ return code && origin ? `${origin}?referral_code=${encodeURIComponent(code)}` : "";
14412
+ }
14413
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
14414
+ function referralSignupDate(iso) {
14415
+ const date = iso ? new Date(iso) : null;
14416
+ if (!date || Number.isNaN(date.valueOf())) return "\u2013";
14417
+ return `${date.getDate()} ${MONTHS[date.getMonth()]} ${date.getFullYear()}`;
14418
+ }
14419
+ function sortReferredUsers(users) {
14420
+ const time = (u) => {
14421
+ const t = new Date(u.createdAt).valueOf();
14422
+ return Number.isNaN(t) ? -Infinity : t;
14423
+ };
14424
+ return [...users].sort((a, b) => time(b) - time(a));
14425
+ }
14426
+ function referralCountLabel(count) {
14427
+ return `${count} ${count === 1 ? "person" : "people"} signed up with your link`;
14428
+ }
14429
+ var MOCK_REFERRED_USERS = [
14430
+ { id: "r1", email: "chris@kepler.com", createdAt: "2025-11-09T10:30:00.000Z" },
14431
+ { id: "r2", email: "maya@northwind.studio", createdAt: "2026-11-24T06:15:00.000Z" },
14432
+ { id: "r3", email: "arjun@lumen.co", createdAt: "2026-03-02T12:00:00.000Z" }
14433
+ ];
14434
+
14435
+ // src/referral-history.tsx
14436
+ import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
14437
+ var TITLE_ID = "settings-referral-history-title";
14438
+ var SKELETON_ROWS = 3;
14439
+ var REFERRAL_HISTORY_EMPTY = "No one has signed up with your link yet. Share it to get started.";
14440
+ var LOAD_FAILED = "Couldn't load your referral history.";
14441
+ function ReferralHistory({
14442
+ load
14443
+ }) {
14444
+ const { value, error, retry } = useLoad(
14445
+ "referred-users",
14446
+ (signal) => load(signal),
14447
+ LOAD_FAILED
14448
+ );
14449
+ return /* @__PURE__ */ jsx32(ReferralHistoryView, { users: value, error, onRetry: retry });
14450
+ }
14451
+ function ReferralHistoryView({ users, error, onRetry }) {
14452
+ let body;
14453
+ if (error) {
14454
+ body = /* @__PURE__ */ jsx32(LoadError, { message: error, onRetry, retryLabel: "Retry" });
14455
+ } else if (!users) {
14456
+ body = /* @__PURE__ */ jsx32(HistorySkeleton, {});
14457
+ } else if (users.length === 0) {
14458
+ body = /* @__PURE__ */ jsx32(Card2, { children: /* @__PURE__ */ jsx32("div", { style: { padding: T15.sp6xl }, children: /* @__PURE__ */ jsx32(Muted, { children: REFERRAL_HISTORY_EMPTY }) }) });
14459
+ } else {
14460
+ body = /* @__PURE__ */ jsx32(HistoryTable, { users: sortReferredUsers(users) });
14461
+ }
14462
+ return /* @__PURE__ */ jsxs29("section", { "aria-labelledby": TITLE_ID, className: "flex flex-col w-full", style: { gap: T15.spXl }, children: [
14463
+ /* @__PURE__ */ jsxs29("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
14464
+ /* @__PURE__ */ jsx32(
14465
+ "h2",
14466
+ {
14467
+ id: TITLE_ID,
14468
+ style: {
14469
+ margin: 0,
14470
+ fontFamily: T15.font,
14471
+ fontSize: T15.fsSm,
14472
+ fontWeight: 400,
14473
+ lineHeight: T15.lhSm,
14474
+ color: "var(--alias-text---icons-tertiary)"
14475
+ },
14476
+ children: "Referral History"
14477
+ }
14478
+ ),
14479
+ !error && users && users.length > 0 && /* @__PURE__ */ jsx32(Muted, { children: referralCountLabel(users.length) })
14480
+ ] }),
14481
+ body
14482
+ ] });
14483
+ }
14484
+ function Card2({ children }) {
14485
+ return /* @__PURE__ */ jsx32(
14486
+ "div",
14487
+ {
14488
+ className: "w-full overflow-clip",
14489
+ style: {
14490
+ backgroundColor: T15.surfaceBase,
14491
+ border: `1px solid ${T15.borderSubtle}`,
14492
+ borderRadius: T15.r3xl
14493
+ },
14494
+ children
14495
+ }
14496
+ );
14497
+ }
14498
+ var CELL = { padding: `${T15.spXl} ${T15.sp6xl}`, textAlign: "left" };
14499
+ var HEAD_CELL = {
14500
+ ...CELL,
14501
+ fontFamily: T15.font,
14502
+ fontSize: T15.fsXs,
14503
+ lineHeight: T15.lhXs,
14504
+ fontWeight: 500,
14505
+ color: T15.muted
14506
+ };
14507
+ var BODY_CELL = {
14508
+ ...CELL,
14509
+ fontFamily: T15.font,
14510
+ fontSize: T15.fsSm,
14511
+ lineHeight: T15.lhSm,
14512
+ borderTop: `1px solid ${T15.borderDivider}`
14513
+ };
14514
+ function HistoryTable({ users }) {
14515
+ return /* @__PURE__ */ jsx32(Card2, { children: /* @__PURE__ */ jsxs29("table", { className: "w-full", style: { borderCollapse: "collapse" }, children: [
14516
+ /* @__PURE__ */ jsx32("thead", { children: /* @__PURE__ */ jsxs29("tr", { children: [
14517
+ /* @__PURE__ */ jsx32("th", { scope: "col", style: HEAD_CELL, children: "Email" }),
14518
+ /* @__PURE__ */ jsx32("th", { scope: "col", style: { ...HEAD_CELL, textAlign: "right" }, children: "Signed up" })
14519
+ ] }) }),
14520
+ /* @__PURE__ */ jsx32("tbody", { children: users.map((user) => /* @__PURE__ */ jsxs29("tr", { children: [
14521
+ /* @__PURE__ */ jsx32("td", { style: { ...BODY_CELL, color: T15.primary, wordBreak: "break-all" }, children: user.email }),
14522
+ /* @__PURE__ */ jsx32("td", { style: { ...BODY_CELL, color: T15.muted, textAlign: "right", whiteSpace: "nowrap" }, children: /* @__PURE__ */ jsx32("time", { dateTime: user.createdAt, children: referralSignupDate(user.createdAt) }) })
14523
+ ] }, user.id)) })
14524
+ ] }) });
14525
+ }
14526
+ function Bar({ width }) {
14527
+ return /* @__PURE__ */ jsx32(
14528
+ "div",
14529
+ {
14530
+ className: "animate-pulse",
14531
+ style: {
14532
+ width,
14533
+ height: 12,
14534
+ borderRadius: "var(--radius-full)",
14535
+ backgroundColor: "var(--alias-fill-neutral-neutral)"
14536
+ }
14537
+ }
14538
+ );
14539
+ }
14540
+ function HistorySkeleton() {
14541
+ return /* @__PURE__ */ jsx32("div", { role: "status", "aria-label": "Loading referral history", className: "w-full", children: /* @__PURE__ */ jsx32(Card2, { children: Array.from({ length: SKELETON_ROWS }, (_, i) => /* @__PURE__ */ jsxs29(
14542
+ "div",
14543
+ {
14544
+ className: "flex items-center justify-between",
14545
+ style: {
14546
+ padding: `${T15.spXl} ${T15.sp6xl}`,
14547
+ borderTop: i === 0 ? void 0 : `1px solid ${T15.borderDivider}`
14548
+ },
14549
+ children: [
14550
+ /* @__PURE__ */ jsx32(Bar, { width: 180 }),
14551
+ /* @__PURE__ */ jsx32(Bar, { width: 72 })
14552
+ ]
14553
+ },
14554
+ i
14555
+ )) }) });
14556
+ }
14557
+
14393
14558
  // src/organization-integrations-content.tsx
14394
14559
  import { useState as useState24 } from "react";
14395
14560
  import { ScButton as ScButton17, ScToggleSwitch } from "@streamoid/ui";
14396
- import { Fragment as Fragment14, jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
14561
+ import { Fragment as Fragment14, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
14397
14562
  var COLUMN = { app: "6.5rem", workspace: "9rem", date: "6.5rem", action: "4.75rem" };
14398
14563
  function HeaderRow() {
14399
- const cell = (label, width) => /* @__PURE__ */ jsx32(
14564
+ const cell = (label, width) => /* @__PURE__ */ jsx33(
14400
14565
  "span",
14401
14566
  {
14402
14567
  className: width ? "shrink-0" : "flex-1 min-w-0",
@@ -14414,7 +14579,7 @@ function HeaderRow() {
14414
14579
  children: label
14415
14580
  }
14416
14581
  );
14417
- return /* @__PURE__ */ jsxs29(
14582
+ return /* @__PURE__ */ jsxs30(
14418
14583
  "div",
14419
14584
  {
14420
14585
  className: "flex items-center",
@@ -14425,7 +14590,7 @@ function HeaderRow() {
14425
14590
  cell("Workspace", COLUMN.workspace),
14426
14591
  cell("Connected", COLUMN.date),
14427
14592
  cell("Last used", COLUMN.date),
14428
- /* @__PURE__ */ jsx32("span", { className: "shrink-0", style: { width: COLUMN.action } })
14593
+ /* @__PURE__ */ jsx33("span", { className: "shrink-0", style: { width: COLUMN.action } })
14429
14594
  ]
14430
14595
  }
14431
14596
  );
@@ -14434,7 +14599,7 @@ function ConnectionRow({ app, onRevoke }) {
14434
14599
  const name = app.user?.name?.trim();
14435
14600
  const email = app.user?.email ?? "";
14436
14601
  const active = app.status === "active";
14437
- const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ jsx32(
14602
+ const text2 = (value, width, color = T15.primary) => /* @__PURE__ */ jsx33(
14438
14603
  "span",
14439
14604
  {
14440
14605
  className: "truncate shrink-0",
@@ -14443,7 +14608,7 @@ function ConnectionRow({ app, onRevoke }) {
14443
14608
  children: value
14444
14609
  }
14445
14610
  );
14446
- return /* @__PURE__ */ jsxs29(
14611
+ return /* @__PURE__ */ jsxs30(
14447
14612
  "div",
14448
14613
  {
14449
14614
  className: "flex items-center",
@@ -14454,10 +14619,10 @@ function ConnectionRow({ app, onRevoke }) {
14454
14619
  opacity: active ? 1 : 0.6
14455
14620
  },
14456
14621
  children: [
14457
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center flex-1 min-w-0", style: { minWidth: 200, gap: T15.spMd }, children: [
14458
- /* @__PURE__ */ jsx32(ProfileAvatar, { name: name || email || "Member", size: 32 }),
14459
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-col min-w-0", children: [
14460
- /* @__PURE__ */ jsx32(
14622
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center flex-1 min-w-0", style: { minWidth: 200, gap: T15.spMd }, children: [
14623
+ /* @__PURE__ */ jsx33(ProfileAvatar, { name: name || email || "Member", size: 32 }),
14624
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col min-w-0", children: [
14625
+ /* @__PURE__ */ jsx33(
14461
14626
  "span",
14462
14627
  {
14463
14628
  className: "truncate",
@@ -14465,17 +14630,17 @@ function ConnectionRow({ app, onRevoke }) {
14465
14630
  children: name || email || "A member"
14466
14631
  }
14467
14632
  ),
14468
- name && email && /* @__PURE__ */ jsx32("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: email })
14633
+ name && email && /* @__PURE__ */ jsx33("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: email })
14469
14634
  ] })
14470
14635
  ] }),
14471
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center shrink-0", style: { width: COLUMN.app, gap: T15.spMd }, children: [
14472
- /* @__PURE__ */ jsx32(AppMark, { name: app.clientName, size: 24 }),
14473
- /* @__PURE__ */ jsx32("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: app.clientName })
14636
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { width: COLUMN.app, gap: T15.spMd }, children: [
14637
+ /* @__PURE__ */ jsx33(AppMark, { name: app.clientName, size: 24 }),
14638
+ /* @__PURE__ */ jsx33("span", { className: "truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: app.clientName })
14474
14639
  ] }),
14475
14640
  text2(workspaceLabel(app), COLUMN.workspace),
14476
14641
  text2(formatDate2(app.createdAt), COLUMN.date),
14477
14642
  text2(active ? lastUsedLabel(app.lastUsedAt) : "Revoked", COLUMN.date, T15.muted),
14478
- /* @__PURE__ */ jsx32("div", { className: "flex justify-end shrink-0", style: { width: COLUMN.action }, children: active && /* @__PURE__ */ jsx32(
14643
+ /* @__PURE__ */ jsx33("div", { className: "flex justify-end shrink-0", style: { width: COLUMN.action }, children: active && /* @__PURE__ */ jsx33(
14479
14644
  ScButton17,
14480
14645
  {
14481
14646
  text: "Revoke",
@@ -14495,7 +14660,7 @@ function AccessCard({
14495
14660
  activeCount,
14496
14661
  onToggle
14497
14662
  }) {
14498
- return /* @__PURE__ */ jsxs29(
14663
+ return /* @__PURE__ */ jsxs30(
14499
14664
  "section",
14500
14665
  {
14501
14666
  "aria-label": "ChatGPT and Codex access",
@@ -14508,19 +14673,19 @@ function AccessCard({
14508
14673
  borderRadius: T15.r3xl
14509
14674
  },
14510
14675
  children: [
14511
- /* @__PURE__ */ jsx32(AppMark, { name: "ChatGPT and Codex" }),
14512
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
14513
- /* @__PURE__ */ jsx32("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: "ChatGPT & Codex" }),
14514
- /* @__PURE__ */ jsx32(Muted, { children: "Let members use CXO from ChatGPT and Codex. Each member still chooses which workspace an app can reach, and the app gets only that member's permissions there." }),
14515
- enabled === false && activeCount > 0 && /* @__PURE__ */ jsxs29("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: [
14676
+ /* @__PURE__ */ jsx33(AppMark, { name: "ChatGPT and Codex" }),
14677
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
14678
+ /* @__PURE__ */ jsx33("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: "ChatGPT & Codex" }),
14679
+ /* @__PURE__ */ jsx33(Muted, { children: "Let members use CXO from ChatGPT and Codex. Each member still chooses which workspace an app can reach, and the app gets only that member's permissions there." }),
14680
+ enabled === false && activeCount > 0 && /* @__PURE__ */ jsxs30("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: [
14516
14681
  "Off: the ",
14517
14682
  countLabel(activeCount, "connection"),
14518
14683
  " below can't start new work until you turn this back on."
14519
14684
  ] })
14520
14685
  ] }),
14521
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
14522
- /* @__PURE__ */ jsx32("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
14523
- /* @__PURE__ */ jsx32("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx32(
14686
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
14687
+ /* @__PURE__ */ jsx33("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
14688
+ /* @__PURE__ */ jsx33("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx33(
14524
14689
  ScToggleSwitch,
14525
14690
  {
14526
14691
  checked: !!enabled,
@@ -14566,7 +14731,7 @@ function OrganizationIntegrationsContent() {
14566
14731
  const [confirmOff, setConfirmOff] = useState24(false);
14567
14732
  const [revoking, setRevoking] = useState24(null);
14568
14733
  if (!canLoad) {
14569
- return /* @__PURE__ */ jsx32("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx32(Muted, { children: !supported ? "Integrations aren't available here yet." : "Integrations are managed by organization admins." }) });
14734
+ return /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx33(Muted, { children: !supported ? "Integrations aren't available here yet." : "Integrations are managed by organization admins." }) });
14570
14735
  }
14571
14736
  const value = data.value;
14572
14737
  const rows = value ? sortConnections(value.rows) : [];
@@ -14604,8 +14769,8 @@ function OrganizationIntegrationsContent() {
14604
14769
  toast.error(errorMessage(cause, { method: "DELETE" }));
14605
14770
  }
14606
14771
  }
14607
- return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", style: { gap: T15.sp3xl }, children: [
14608
- /* @__PURE__ */ jsx32(
14772
+ return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", style: { gap: T15.sp3xl }, children: [
14773
+ /* @__PURE__ */ jsx33(
14609
14774
  ScopeHeader,
14610
14775
  {
14611
14776
  kind: "organization",
@@ -14615,10 +14780,10 @@ function OrganizationIntegrationsContent() {
14615
14780
  facts: [value && countLabel(activeRows.length, "active connection")]
14616
14781
  }
14617
14782
  ),
14618
- data.error && /* @__PURE__ */ jsx32(LoadError, { message: data.error, onRetry: data.retry }),
14619
- !value && !data.error && /* @__PURE__ */ jsx32(Spinner, {}),
14620
- value && /* @__PURE__ */ jsxs29(Fragment14, { children: [
14621
- /* @__PURE__ */ jsx32(
14783
+ data.error && /* @__PURE__ */ jsx33(LoadError, { message: data.error, onRetry: data.retry }),
14784
+ !value && !data.error && /* @__PURE__ */ jsx33(Spinner, {}),
14785
+ value && /* @__PURE__ */ jsxs30(Fragment14, { children: [
14786
+ /* @__PURE__ */ jsx33(
14622
14787
  AccessCard,
14623
14788
  {
14624
14789
  enabled: value.enabled,
@@ -14627,7 +14792,7 @@ function OrganizationIntegrationsContent() {
14627
14792
  onToggle: (next) => next ? void setAccess(true) : setConfirmOff(true)
14628
14793
  }
14629
14794
  ),
14630
- /* @__PURE__ */ jsx32(
14795
+ /* @__PURE__ */ jsx33(
14631
14796
  MemberListToolbar,
14632
14797
  {
14633
14798
  activeTab: "active",
@@ -14637,7 +14802,7 @@ function OrganizationIntegrationsContent() {
14637
14802
  activeCount: visible.length,
14638
14803
  searchQuery: search,
14639
14804
  onSearchChange: setSearch,
14640
- action: revokedCount > 0 ? /* @__PURE__ */ jsx32(
14805
+ action: revokedCount > 0 ? /* @__PURE__ */ jsx33(
14641
14806
  ScButton17,
14642
14807
  {
14643
14808
  text: showRevoked ? "Hide revoked" : `Show revoked (${revokedCount})`,
@@ -14648,30 +14813,30 @@ function OrganizationIntegrationsContent() {
14648
14813
  ) : void 0
14649
14814
  }
14650
14815
  ),
14651
- /* @__PURE__ */ jsx32(
14816
+ /* @__PURE__ */ jsx33(
14652
14817
  MemberListFrame,
14653
14818
  {
14654
- header: /* @__PURE__ */ jsx32(HeaderRow, {}),
14819
+ header: /* @__PURE__ */ jsx33(HeaderRow, {}),
14655
14820
  isEmpty: visible.length === 0,
14656
14821
  emptyText: q ? "No connections match your search" : value.enabled ? "No one has connected ChatGPT or Codex yet" : "Turn on ChatGPT & Codex to let members connect",
14657
14822
  grow: "fill",
14658
- children: visible.map((app) => /* @__PURE__ */ jsx32(ConnectionRow, { app, onRevoke: () => setRevoking(app) }, app.id))
14823
+ children: visible.map((app) => /* @__PURE__ */ jsx33(ConnectionRow, { app, onRevoke: () => setRevoking(app) }, app.id))
14659
14824
  }
14660
14825
  )
14661
14826
  ] }),
14662
- confirmOff && /* @__PURE__ */ jsx32(
14827
+ confirmOff && /* @__PURE__ */ jsx33(
14663
14828
  ConfirmActionModal,
14664
14829
  {
14665
14830
  title: "Turn off ChatGPT & Codex?",
14666
- body: /* @__PURE__ */ jsxs29(Fragment14, { children: [
14667
- /* @__PURE__ */ jsxs29("span", { children: [
14831
+ body: /* @__PURE__ */ jsxs30(Fragment14, { children: [
14832
+ /* @__PURE__ */ jsxs30("span", { children: [
14668
14833
  "Members of ",
14669
14834
  current?.name || "this organization",
14670
14835
  " won't be able to connect ChatGPT or Codex",
14671
14836
  activeRows.length > 0 ? `, and the ${countLabel(activeRows.length, "existing connection")} will stop working` : "",
14672
14837
  "."
14673
14838
  ] }),
14674
- /* @__PURE__ */ jsxs29("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14839
+ /* @__PURE__ */ jsxs30("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14675
14840
  REVOKE_TIMING,
14676
14841
  " Connections come back when you turn this on again."
14677
14842
  ] })
@@ -14682,20 +14847,20 @@ function OrganizationIntegrationsContent() {
14682
14847
  onConfirm: () => setAccess(false)
14683
14848
  }
14684
14849
  ),
14685
- revoking && /* @__PURE__ */ jsx32(
14850
+ revoking && /* @__PURE__ */ jsx33(
14686
14851
  ConfirmActionModal,
14687
14852
  {
14688
14853
  title: `Revoke ${revoking.clientName}?`,
14689
- body: /* @__PURE__ */ jsxs29(Fragment14, { children: [
14690
- /* @__PURE__ */ jsxs29("span", { children: [
14854
+ body: /* @__PURE__ */ jsxs30(Fragment14, { children: [
14855
+ /* @__PURE__ */ jsxs30("span", { children: [
14691
14856
  revoking.user?.name || revoking.user?.email || "This member",
14692
14857
  "'s ",
14693
14858
  revoking.clientName,
14694
14859
  " will no longer be able to use CXO in ",
14695
- /* @__PURE__ */ jsx32("span", { style: { fontWeight: 600 }, children: workspaceLabel(revoking) }),
14860
+ /* @__PURE__ */ jsx33("span", { style: { fontWeight: 600 }, children: workspaceLabel(revoking) }),
14696
14861
  "."
14697
14862
  ] }),
14698
- /* @__PURE__ */ jsxs29("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14863
+ /* @__PURE__ */ jsxs30("span", { style: { color: T15.muted, fontSize: T15.fsSm, lineHeight: T15.lhSm }, children: [
14699
14864
  REVOKE_TIMING,
14700
14865
  " They can connect again unless you turn access off."
14701
14866
  ] })
@@ -14710,7 +14875,7 @@ function OrganizationIntegrationsContent() {
14710
14875
  }
14711
14876
 
14712
14877
  // src/settings-content.tsx
14713
- import { Fragment as Fragment16, jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
14878
+ import { Fragment as Fragment16, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
14714
14879
  function deriveInitials(name) {
14715
14880
  return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
14716
14881
  }
@@ -14746,7 +14911,7 @@ function SettingsNavItem({
14746
14911
  onTabChange
14747
14912
  }) {
14748
14913
  const isActive = activeTab === tab;
14749
- return /* @__PURE__ */ jsx33(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx33("div", { children: /* @__PURE__ */ jsx33(
14914
+ return /* @__PURE__ */ jsx34(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(
14750
14915
  ScSidebarMenu,
14751
14916
  {
14752
14917
  icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
@@ -14775,9 +14940,10 @@ function SettingsNav({
14775
14940
  hasOrganization,
14776
14941
  isWorkspaceAdmin,
14777
14942
  showConnectedApps = false,
14778
- showIntegrations = false
14943
+ showIntegrations = false,
14944
+ showReferral = false
14779
14945
  }) {
14780
- const item = (tab, icon) => /* @__PURE__ */ jsx33(
14946
+ const item = (tab, icon) => /* @__PURE__ */ jsx34(
14781
14947
  SettingsNavItem,
14782
14948
  {
14783
14949
  tab,
@@ -14787,7 +14953,7 @@ function SettingsNav({
14787
14953
  onTabChange
14788
14954
  }
14789
14955
  );
14790
- return /* @__PURE__ */ jsxs30(
14956
+ return /* @__PURE__ */ jsxs31(
14791
14957
  "div",
14792
14958
  {
14793
14959
  className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
@@ -14810,42 +14976,43 @@ function SettingsNav({
14810
14976
  gap: "var(--spacing-5xl)"
14811
14977
  },
14812
14978
  children: [
14813
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14814
- /* @__PURE__ */ jsx33("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
14815
- item("profile", (color) => /* @__PURE__ */ jsx33(SiconUser, { className: "w-5 h-5", color })),
14816
- item("workspaceList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color })),
14817
- showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx33(SiconPlug_default, { className: "w-5 h-5", color }))
14979
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14980
+ /* @__PURE__ */ jsx34("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
14981
+ item("profile", (color) => /* @__PURE__ */ jsx34(SiconUser, { className: "w-5 h-5", color })),
14982
+ item("workspaceList", (color) => /* @__PURE__ */ jsx34(SiconSwitch, { className: "w-5 h-5", color })),
14983
+ showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx34(SiconPlug_default, { className: "w-5 h-5", color })),
14984
+ showReferral && item("referral", (color) => /* @__PURE__ */ jsx34(SiconReferral, { className: "w-5 h-5", color }))
14818
14985
  ] }),
14819
- /* @__PURE__ */ jsx33(ScHDivider, {}),
14820
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14821
- /* @__PURE__ */ jsx33("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
14822
- item("workspace", (color) => /* @__PURE__ */ jsx33(SiconSettings2, { className: "w-5 h-5", color })),
14823
- item("workspaceMembers", (color) => /* @__PURE__ */ jsx33(SiconTeam, { className: "w-5 h-5", color })),
14824
- isWorkspaceAdmin && /* @__PURE__ */ jsxs30(Fragment16, { children: [
14825
- item("billing", (color) => /* @__PURE__ */ jsx33(SiconBilling, { className: "w-5 h-5", color })),
14826
- item("apikey", (color) => /* @__PURE__ */ jsx33(SiconKey_default, { className: "w-5 h-5", color }))
14986
+ /* @__PURE__ */ jsx34(ScHDivider, {}),
14987
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
14988
+ /* @__PURE__ */ jsx34("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
14989
+ item("workspace", (color) => /* @__PURE__ */ jsx34(SiconSettings2, { className: "w-5 h-5", color })),
14990
+ item("workspaceMembers", (color) => /* @__PURE__ */ jsx34(SiconTeam, { className: "w-5 h-5", color })),
14991
+ isWorkspaceAdmin && /* @__PURE__ */ jsxs31(Fragment16, { children: [
14992
+ item("billing", (color) => /* @__PURE__ */ jsx34(SiconBilling, { className: "w-5 h-5", color })),
14993
+ item("apikey", (color) => /* @__PURE__ */ jsx34(SiconKey_default, { className: "w-5 h-5", color }))
14827
14994
  ] }),
14828
- !isWorkspaceAdmin && /* @__PURE__ */ jsx33("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
14995
+ !isWorkspaceAdmin && /* @__PURE__ */ jsx34("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
14829
14996
  ] }),
14830
- /* @__PURE__ */ jsx33(ScHDivider, {}),
14831
- /* @__PURE__ */ jsx33("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs30(Fragment16, { children: [
14832
- /* @__PURE__ */ jsx33("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
14833
- item("organizationList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color })),
14834
- item("organization", (color) => /* @__PURE__ */ jsx33(SiconTeam, { className: "w-5 h-5", color })),
14835
- item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx33(SiconWorkspace2, { className: "w-5 h-5", color })),
14836
- showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx33(SiconPlug_default, { className: "w-5 h-5", color }))
14837
- ] }) : /* @__PURE__ */ jsxs30(Fragment16, { children: [
14838
- /* @__PURE__ */ jsx33(
14997
+ /* @__PURE__ */ jsx34(ScHDivider, {}),
14998
+ /* @__PURE__ */ jsx34("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs31(Fragment16, { children: [
14999
+ /* @__PURE__ */ jsx34("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
15000
+ item("organizationList", (color) => /* @__PURE__ */ jsx34(SiconSwitch, { className: "w-5 h-5", color })),
15001
+ item("organization", (color) => /* @__PURE__ */ jsx34(SiconTeam, { className: "w-5 h-5", color })),
15002
+ item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx34(SiconWorkspace2, { className: "w-5 h-5", color })),
15003
+ showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx34(SiconPlug_default, { className: "w-5 h-5", color }))
15004
+ ] }) : /* @__PURE__ */ jsxs31(Fragment16, { children: [
15005
+ /* @__PURE__ */ jsx34(
14839
15006
  SettingsNavItem,
14840
15007
  {
14841
15008
  tab: "organization",
14842
15009
  label: "Organization",
14843
- icon: (color) => /* @__PURE__ */ jsx33(SiconGlobe3, { className: "w-5 h-5", color }),
15010
+ icon: (color) => /* @__PURE__ */ jsx34(SiconGlobe3, { className: "w-5 h-5", color }),
14844
15011
  activeTab,
14845
15012
  onTabChange
14846
15013
  }
14847
15014
  ),
14848
- item("organizationList", (color) => /* @__PURE__ */ jsx33(SiconSwitch, { className: "w-5 h-5", color }))
15015
+ item("organizationList", (color) => /* @__PURE__ */ jsx34(SiconSwitch, { className: "w-5 h-5", color }))
14849
15016
  ] }) })
14850
15017
  ]
14851
15018
  }
@@ -14854,7 +15021,7 @@ function SettingsNav({
14854
15021
  var SPECIALIZATION_ICON_SIZE = 24;
14855
15022
  function SpecializationIcon({ iconUrl }) {
14856
15023
  if (iconUrl) {
14857
- return /* @__PURE__ */ jsx33(
15024
+ return /* @__PURE__ */ jsx34(
14858
15025
  "img",
14859
15026
  {
14860
15027
  src: iconUrl,
@@ -14867,7 +15034,7 @@ function SpecializationIcon({ iconUrl }) {
14867
15034
  }
14868
15035
  );
14869
15036
  }
14870
- return /* @__PURE__ */ jsx33(
15037
+ return /* @__PURE__ */ jsx34(
14871
15038
  SiconBolt,
14872
15039
  {
14873
15040
  style: {
@@ -14940,15 +15107,15 @@ function SpecializationDropdown({
14940
15107
  };
14941
15108
  }, [open]);
14942
15109
  const selected = options.find((o) => o.id === value);
14943
- return /* @__PURE__ */ jsxs30(
15110
+ return /* @__PURE__ */ jsxs31(
14944
15111
  "div",
14945
15112
  {
14946
15113
  ref: containerRef,
14947
15114
  className: "w-full",
14948
15115
  style: { position: "relative" },
14949
15116
  children: [
14950
- /* @__PURE__ */ jsx33("style", { children: DROPDOWN_TRIGGER_STYLES }),
14951
- /* @__PURE__ */ jsx33(
15117
+ /* @__PURE__ */ jsx34("style", { children: DROPDOWN_TRIGGER_STYLES }),
15118
+ /* @__PURE__ */ jsx34(
14952
15119
  "div",
14953
15120
  {
14954
15121
  className: "spec-dropdown-trigger",
@@ -14956,7 +15123,7 @@ function SpecializationDropdown({
14956
15123
  onClick: () => !disabled && setOpen((v) => !v),
14957
15124
  "aria-haspopup": "listbox",
14958
15125
  "aria-expanded": open,
14959
- children: /* @__PURE__ */ jsx33(
15126
+ children: /* @__PURE__ */ jsx34(
14960
15127
  ScTextField,
14961
15128
  {
14962
15129
  label: "Specialization",
@@ -14964,8 +15131,8 @@ function SpecializationDropdown({
14964
15131
  value: selected?.label ?? "",
14965
15132
  placeholderFilled: "Select specialization",
14966
15133
  tfGroup: "icon-left-right",
14967
- tfLeftIcon: /* @__PURE__ */ jsx33(SpecializationIcon, { iconUrl: selected?.iconUrl }),
14968
- tfRightIcon: /* @__PURE__ */ jsx33(
15134
+ tfLeftIcon: /* @__PURE__ */ jsx34(SpecializationIcon, { iconUrl: selected?.iconUrl }),
15135
+ tfRightIcon: /* @__PURE__ */ jsx34(
14969
15136
  "span",
14970
15137
  {
14971
15138
  style: {
@@ -14975,7 +15142,7 @@ function SpecializationDropdown({
14975
15142
  transform: open ? "rotate(180deg)" : "none",
14976
15143
  transition: "transform 120ms ease-out"
14977
15144
  },
14978
- children: /* @__PURE__ */ jsx33(SiconDown2, {})
15145
+ children: /* @__PURE__ */ jsx34(SiconDown2, {})
14979
15146
  }
14980
15147
  ),
14981
15148
  className: "sc-text-field-full-width",
@@ -14986,7 +15153,7 @@ function SpecializationDropdown({
14986
15153
  )
14987
15154
  }
14988
15155
  ),
14989
- open && /* @__PURE__ */ jsx33(
15156
+ open && /* @__PURE__ */ jsx34(
14990
15157
  "div",
14991
15158
  {
14992
15159
  role: "listbox",
@@ -15008,11 +15175,11 @@ function SpecializationDropdown({
15008
15175
  },
15009
15176
  children: options.map((opt) => {
15010
15177
  const isActive = opt.id === value;
15011
- return /* @__PURE__ */ jsx33(
15178
+ return /* @__PURE__ */ jsx34(
15012
15179
  ScMenuOptions,
15013
15180
  {
15014
15181
  text: opt.label,
15015
- icon: /* @__PURE__ */ jsx33(SpecializationIcon, { iconUrl: opt.iconUrl }),
15182
+ icon: /* @__PURE__ */ jsx34(SpecializationIcon, { iconUrl: opt.iconUrl }),
15016
15183
  hover: isActive ? "true" : "false",
15017
15184
  variant: "default",
15018
15185
  role: "option",
@@ -15056,15 +15223,15 @@ function LanguageDropdown({
15056
15223
  document.removeEventListener("keydown", handleKeyDown);
15057
15224
  };
15058
15225
  }, [open]);
15059
- return /* @__PURE__ */ jsxs30(
15226
+ return /* @__PURE__ */ jsxs31(
15060
15227
  "div",
15061
15228
  {
15062
15229
  ref: containerRef,
15063
15230
  className: "w-full",
15064
15231
  style: { position: "relative" },
15065
15232
  children: [
15066
- /* @__PURE__ */ jsx33("style", { children: DROPDOWN_TRIGGER_STYLES }),
15067
- /* @__PURE__ */ jsx33(
15233
+ /* @__PURE__ */ jsx34("style", { children: DROPDOWN_TRIGGER_STYLES }),
15234
+ /* @__PURE__ */ jsx34(
15068
15235
  "div",
15069
15236
  {
15070
15237
  className: "spec-dropdown-trigger",
@@ -15072,7 +15239,7 @@ function LanguageDropdown({
15072
15239
  onClick: () => !disabled && setOpen((v) => !v),
15073
15240
  "aria-haspopup": "listbox",
15074
15241
  "aria-expanded": open,
15075
- children: /* @__PURE__ */ jsx33(
15242
+ children: /* @__PURE__ */ jsx34(
15076
15243
  ScTextField,
15077
15244
  {
15078
15245
  label: "Language",
@@ -15080,7 +15247,7 @@ function LanguageDropdown({
15080
15247
  value: userLanguageLabel(value),
15081
15248
  placeholderFilled: "Select language",
15082
15249
  tfGroup: "icon-right",
15083
- tfRightIcon: /* @__PURE__ */ jsx33(
15250
+ tfRightIcon: /* @__PURE__ */ jsx34(
15084
15251
  "span",
15085
15252
  {
15086
15253
  style: {
@@ -15090,7 +15257,7 @@ function LanguageDropdown({
15090
15257
  transform: open ? "rotate(180deg)" : "none",
15091
15258
  transition: "transform 120ms ease-out"
15092
15259
  },
15093
- children: /* @__PURE__ */ jsx33(SiconDown2, {})
15260
+ children: /* @__PURE__ */ jsx34(SiconDown2, {})
15094
15261
  }
15095
15262
  ),
15096
15263
  className: "sc-text-field-full-width",
@@ -15101,7 +15268,7 @@ function LanguageDropdown({
15101
15268
  )
15102
15269
  }
15103
15270
  ),
15104
- open && /* @__PURE__ */ jsx33(
15271
+ open && /* @__PURE__ */ jsx34(
15105
15272
  "div",
15106
15273
  {
15107
15274
  role: "listbox",
@@ -15127,11 +15294,11 @@ function LanguageDropdown({
15127
15294
  },
15128
15295
  children: USER_LANGUAGES.map((lang) => {
15129
15296
  const isActive = lang.code === value;
15130
- return /* @__PURE__ */ jsx33(
15297
+ return /* @__PURE__ */ jsx34(
15131
15298
  ScMenuOptions,
15132
15299
  {
15133
15300
  text: lang.label,
15134
- icon: /* @__PURE__ */ jsx33(Fragment16, {}),
15301
+ icon: /* @__PURE__ */ jsx34(Fragment16, {}),
15135
15302
  hover: isActive ? "true" : "false",
15136
15303
  variant: "default",
15137
15304
  role: "option",
@@ -15260,13 +15427,13 @@ function ProfileTab() {
15260
15427
  }
15261
15428
  auth.clearAuth();
15262
15429
  };
15263
- return /* @__PURE__ */ jsxs30(
15430
+ return /* @__PURE__ */ jsxs31(
15264
15431
  "div",
15265
15432
  {
15266
15433
  className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
15267
15434
  style: { gap: "var(--spacing-3xl)" },
15268
15435
  children: [
15269
- /* @__PURE__ */ jsxs30(
15436
+ /* @__PURE__ */ jsxs31(
15270
15437
  "div",
15271
15438
  {
15272
15439
  className: "sc-profile-card flex flex-col items-start w-full",
@@ -15279,13 +15446,13 @@ function ProfileTab() {
15279
15446
  gap: "var(--spacing-6xl)"
15280
15447
  },
15281
15448
  children: [
15282
- /* @__PURE__ */ jsxs30(
15449
+ /* @__PURE__ */ jsxs31(
15283
15450
  "div",
15284
15451
  {
15285
15452
  className: "flex items-center shrink-0 w-full",
15286
15453
  style: { gap: 24, flexWrap: "wrap" },
15287
15454
  children: [
15288
- profileImage ? /* @__PURE__ */ jsx33(
15455
+ profileImage ? /* @__PURE__ */ jsx34(
15289
15456
  "img",
15290
15457
  {
15291
15458
  src: profileImage,
@@ -15298,7 +15465,7 @@ function ProfileTab() {
15298
15465
  flexShrink: 0
15299
15466
  }
15300
15467
  }
15301
- ) : /* @__PURE__ */ jsx33(
15468
+ ) : /* @__PURE__ */ jsx34(
15302
15469
  "div",
15303
15470
  {
15304
15471
  "aria-label": "Profile",
@@ -15311,7 +15478,7 @@ function ProfileTab() {
15311
15478
  border: "1px solid var(--alias-border-subtle)",
15312
15479
  flexShrink: 0
15313
15480
  },
15314
- children: /* @__PURE__ */ jsx33(
15481
+ children: /* @__PURE__ */ jsx34(
15315
15482
  "span",
15316
15483
  {
15317
15484
  style: {
@@ -15326,7 +15493,7 @@ function ProfileTab() {
15326
15493
  )
15327
15494
  }
15328
15495
  ),
15329
- /* @__PURE__ */ jsx33(
15496
+ /* @__PURE__ */ jsx34(
15330
15497
  "input",
15331
15498
  {
15332
15499
  ref: fileInputRef,
@@ -15336,17 +15503,17 @@ function ProfileTab() {
15336
15503
  onChange: handleImageChange
15337
15504
  }
15338
15505
  ),
15339
- /* @__PURE__ */ jsxs30(
15506
+ /* @__PURE__ */ jsxs31(
15340
15507
  "div",
15341
15508
  {
15342
15509
  className: "flex items-center",
15343
15510
  style: { gap: 12, flexWrap: "wrap" },
15344
15511
  children: [
15345
- /* @__PURE__ */ jsx33(
15512
+ /* @__PURE__ */ jsx34(
15346
15513
  ScButton18,
15347
15514
  {
15348
15515
  text: "Upload photo",
15349
- icon: /* @__PURE__ */ jsx33(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
15516
+ icon: /* @__PURE__ */ jsx34(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
15350
15517
  styleVariant: "icon-left",
15351
15518
  variant: "outline",
15352
15519
  size: "md",
@@ -15354,11 +15521,11 @@ function ProfileTab() {
15354
15521
  onClick: handleUploadClick
15355
15522
  }
15356
15523
  ),
15357
- /* @__PURE__ */ jsx33(
15524
+ /* @__PURE__ */ jsx34(
15358
15525
  ScButton18,
15359
15526
  {
15360
15527
  text: "Remove photo",
15361
- icon: /* @__PURE__ */ jsx33(
15528
+ icon: /* @__PURE__ */ jsx34(
15362
15529
  SiconDelete,
15363
15530
  {
15364
15531
  className: "w-5 h-5",
@@ -15378,15 +15545,15 @@ function ProfileTab() {
15378
15545
  ]
15379
15546
  }
15380
15547
  ),
15381
- /* @__PURE__ */ jsx33(ScHDivider, {}),
15382
- /* @__PURE__ */ jsxs30(
15548
+ /* @__PURE__ */ jsx34(ScHDivider, {}),
15549
+ /* @__PURE__ */ jsxs31(
15383
15550
  "div",
15384
15551
  {
15385
15552
  className: "sc-profile-fields flex flex-col min-w-0 w-full",
15386
15553
  style: { gap: 24 },
15387
15554
  children: [
15388
- /* @__PURE__ */ jsxs30("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
15389
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx33(
15555
+ /* @__PURE__ */ jsxs31("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
15556
+ /* @__PURE__ */ jsx34("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx34(
15390
15557
  ScTextField,
15391
15558
  {
15392
15559
  label: "Full Name",
@@ -15400,7 +15567,7 @@ function ProfileTab() {
15400
15567
  onChange: (e) => setFullName(e.target.value)
15401
15568
  }
15402
15569
  ) }),
15403
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx33(
15570
+ /* @__PURE__ */ jsx34("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx34(
15404
15571
  SpecializationDropdown,
15405
15572
  {
15406
15573
  value: selectedSpec,
@@ -15409,8 +15576,8 @@ function ProfileTab() {
15409
15576
  }
15410
15577
  ) })
15411
15578
  ] }),
15412
- /* @__PURE__ */ jsxs30("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
15413
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx33(
15579
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
15580
+ /* @__PURE__ */ jsx34("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx34(
15414
15581
  LanguageDropdown,
15415
15582
  {
15416
15583
  value: selectedLanguage,
@@ -15418,9 +15585,9 @@ function ProfileTab() {
15418
15585
  disabled: disableAllActions
15419
15586
  }
15420
15587
  ) }),
15421
- /* @__PURE__ */ jsx33("div", { className: "flex-1 min-w-0" })
15588
+ /* @__PURE__ */ jsx34("div", { className: "flex-1 min-w-0" })
15422
15589
  ] }),
15423
- /* @__PURE__ */ jsx33("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx33(
15590
+ /* @__PURE__ */ jsx34("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx34(
15424
15591
  ScTextField,
15425
15592
  {
15426
15593
  label: "Email ID",
@@ -15429,7 +15596,7 @@ function ProfileTab() {
15429
15596
  value: user?.email ?? "",
15430
15597
  placeholderFilled: user?.email ?? "chris@kepler.com",
15431
15598
  tfGroup: "icon-right",
15432
- tfRightIcon: /* @__PURE__ */ jsx33(
15599
+ tfRightIcon: /* @__PURE__ */ jsx34(
15433
15600
  SiconLock,
15434
15601
  {
15435
15602
  className: "w-6 h-6",
@@ -15441,12 +15608,12 @@ function ProfileTab() {
15441
15608
  readOnly: true
15442
15609
  }
15443
15610
  ) }),
15444
- /* @__PURE__ */ jsx33(
15611
+ /* @__PURE__ */ jsx34(
15445
15612
  "div",
15446
15613
  {
15447
15614
  className: "flex items-center w-full",
15448
15615
  style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
15449
- children: /* @__PURE__ */ jsx33(
15616
+ children: /* @__PURE__ */ jsx34(
15450
15617
  ScButton18,
15451
15618
  {
15452
15619
  text: saving ? "Saving..." : "Save changes",
@@ -15464,7 +15631,7 @@ function ProfileTab() {
15464
15631
  ]
15465
15632
  }
15466
15633
  ),
15467
- /* @__PURE__ */ jsxs30(
15634
+ /* @__PURE__ */ jsxs31(
15468
15635
  "div",
15469
15636
  {
15470
15637
  className: "flex items-center w-full",
@@ -15476,8 +15643,8 @@ function ProfileTab() {
15476
15643
  gap: "var(--spacing-3xl)"
15477
15644
  },
15478
15645
  children: [
15479
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
15480
- /* @__PURE__ */ jsx33(
15646
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
15647
+ /* @__PURE__ */ jsx34(
15481
15648
  "span",
15482
15649
  {
15483
15650
  style: {
@@ -15490,7 +15657,7 @@ function ProfileTab() {
15490
15657
  children: "Session"
15491
15658
  }
15492
15659
  ),
15493
- /* @__PURE__ */ jsx33(
15660
+ /* @__PURE__ */ jsx34(
15494
15661
  "span",
15495
15662
  {
15496
15663
  className: "truncate",
@@ -15505,7 +15672,7 @@ function ProfileTab() {
15505
15672
  }
15506
15673
  )
15507
15674
  ] }),
15508
- /* @__PURE__ */ jsx33(
15675
+ /* @__PURE__ */ jsx34(
15509
15676
  ScButton18,
15510
15677
  {
15511
15678
  text: "Log out",
@@ -15639,13 +15806,13 @@ function WorkspaceListTab({
15639
15806
  });
15640
15807
  }, [fetchPlans, listLoading, visibleKey]);
15641
15808
  const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
15642
- return /* @__PURE__ */ jsxs30(
15809
+ return /* @__PURE__ */ jsxs31(
15643
15810
  "div",
15644
15811
  {
15645
15812
  className: "flex flex-col items-start flex-1 min-w-0",
15646
15813
  style: { gap: "var(--spacing-3xl)", height: "100%" },
15647
15814
  children: [
15648
- /* @__PURE__ */ jsx33(
15815
+ /* @__PURE__ */ jsx34(
15649
15816
  "p",
15650
15817
  {
15651
15818
  className: "shrink-0 w-full",
@@ -15658,7 +15825,7 @@ function WorkspaceListTab({
15658
15825
  children: "Switching changes which workspace the rest of Settings acts on."
15659
15826
  }
15660
15827
  ),
15661
- listLoading && /* @__PURE__ */ jsx33(
15828
+ listLoading && /* @__PURE__ */ jsx34(
15662
15829
  "p",
15663
15830
  {
15664
15831
  style: {
@@ -15669,13 +15836,13 @@ function WorkspaceListTab({
15669
15836
  children: "Loading workspaces\u2026"
15670
15837
  }
15671
15838
  ),
15672
- !listLoading && currentWorkspace && /* @__PURE__ */ jsxs30(
15839
+ !listLoading && currentWorkspace && /* @__PURE__ */ jsxs31(
15673
15840
  "div",
15674
15841
  {
15675
15842
  className: "flex flex-col items-start shrink-0 w-full",
15676
15843
  style: { gap: 16, padding: "var(--spacing-md) 0" },
15677
15844
  children: [
15678
- /* @__PURE__ */ jsxs30(
15845
+ /* @__PURE__ */ jsxs31(
15679
15846
  "p",
15680
15847
  {
15681
15848
  className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
@@ -15692,7 +15859,7 @@ function WorkspaceListTab({
15692
15859
  ]
15693
15860
  }
15694
15861
  ),
15695
- /* @__PURE__ */ jsx33(
15862
+ /* @__PURE__ */ jsx34(
15696
15863
  ScWorkspaceSwitchCard,
15697
15864
  {
15698
15865
  wsName: currentWorkspace.name,
@@ -15709,7 +15876,7 @@ function WorkspaceListTab({
15709
15876
  ]
15710
15877
  }
15711
15878
  ),
15712
- !listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx33(
15879
+ !listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx34(
15713
15880
  "div",
15714
15881
  {
15715
15882
  className: "shrink-0 w-full",
@@ -15719,19 +15886,19 @@ function WorkspaceListTab({
15719
15886
  }
15720
15887
  }
15721
15888
  ),
15722
- !listLoading && listTotal > 0 && /* @__PURE__ */ jsxs30(
15889
+ !listLoading && listTotal > 0 && /* @__PURE__ */ jsxs31(
15723
15890
  "div",
15724
15891
  {
15725
15892
  className: "flex flex-col items-start flex-1 min-h-0 w-full",
15726
15893
  style: { gap: 16, overflowY: "auto" },
15727
15894
  children: [
15728
- /* @__PURE__ */ jsx33(
15895
+ /* @__PURE__ */ jsx34(
15729
15896
  "div",
15730
15897
  {
15731
15898
  className: "flex flex-col items-start w-full",
15732
15899
  style: { gap: 16 },
15733
- children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs30(Fragment15, { children: [
15734
- (index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx33(
15900
+ children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs31(Fragment15, { children: [
15901
+ (index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx34(
15735
15902
  "p",
15736
15903
  {
15737
15904
  className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
@@ -15746,7 +15913,7 @@ function WorkspaceListTab({
15746
15913
  children: group.label
15747
15914
  }
15748
15915
  ),
15749
- /* @__PURE__ */ jsx33(
15916
+ /* @__PURE__ */ jsx34(
15750
15917
  ScWorkspaceSwitchCard,
15751
15918
  {
15752
15919
  wsName: ws.name,
@@ -15764,13 +15931,13 @@ function WorkspaceListTab({
15764
15931
  ] }, ws._id))
15765
15932
  }
15766
15933
  ),
15767
- pageCount > 1 && /* @__PURE__ */ jsxs30(
15934
+ pageCount > 1 && /* @__PURE__ */ jsxs31(
15768
15935
  "div",
15769
15936
  {
15770
15937
  className: "flex items-center justify-between shrink-0 w-full",
15771
15938
  style: { gap: "var(--spacing-md)" },
15772
15939
  children: [
15773
- /* @__PURE__ */ jsxs30(
15940
+ /* @__PURE__ */ jsxs31(
15774
15941
  "span",
15775
15942
  {
15776
15943
  style: {
@@ -15789,8 +15956,8 @@ function WorkspaceListTab({
15789
15956
  ]
15790
15957
  }
15791
15958
  ),
15792
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
15793
- /* @__PURE__ */ jsx33(
15959
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
15960
+ /* @__PURE__ */ jsx34(
15794
15961
  ScButton18,
15795
15962
  {
15796
15963
  text: "Previous",
@@ -15800,7 +15967,7 @@ function WorkspaceListTab({
15800
15967
  onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
15801
15968
  }
15802
15969
  ),
15803
- /* @__PURE__ */ jsx33(
15970
+ /* @__PURE__ */ jsx34(
15804
15971
  ScButton18,
15805
15972
  {
15806
15973
  text: "Next",
@@ -15823,75 +15990,91 @@ function WorkspaceListTab({
15823
15990
  }
15824
15991
  var WorkspaceTab = WorkspaceListTab;
15825
15992
  function ReferralTab() {
15826
- const { auth } = useSettingsAdapters();
15827
- const user = auth.user;
15828
- const referralCode = (user?.referralCode ?? user?.referral_code ?? user?.referalCode ?? user?.referal_code ?? "").trim();
15993
+ const { auth, toast, api } = useSettingsAdapters();
15829
15994
  const domain = typeof window !== "undefined" ? window.location.origin : "";
15830
- const referralLink = referralCode && domain ? `${domain}?referral_code=${encodeURIComponent(referralCode)}` : "";
15831
- return /* @__PURE__ */ jsx33(
15995
+ const link = referralLink(referralCodeOf(auth.user), domain);
15996
+ const [copied, setCopied] = useState25(false);
15997
+ const copiedTimer = useRef12(null);
15998
+ useEffect20(() => () => {
15999
+ if (copiedTimer.current) clearTimeout(copiedTimer.current);
16000
+ }, []);
16001
+ const copyLink = async () => {
16002
+ if (!link) return;
16003
+ try {
16004
+ await navigator.clipboard.writeText(link);
16005
+ toast.success("Referral link copied");
16006
+ setCopied(true);
16007
+ if (copiedTimer.current) clearTimeout(copiedTimer.current);
16008
+ copiedTimer.current = setTimeout(() => setCopied(false), 2e3);
16009
+ } catch {
16010
+ toast.error("Couldn't copy the referral link");
16011
+ }
16012
+ };
16013
+ return /* @__PURE__ */ jsxs31(
15832
16014
  "div",
15833
16015
  {
15834
16016
  className: "flex flex-col items-start flex-1 min-w-0",
15835
16017
  style: { gap: "var(--spacing-3xl)" },
15836
- children: /* @__PURE__ */ jsx33(
15837
- "div",
15838
- {
15839
- className: "w-full relative",
15840
- style: {
15841
- backgroundColor: "var(--alias-surface-base)",
15842
- borderRadius: "var(--radius-3xl)",
15843
- padding: "var(--spacing-6xl)"
15844
- },
15845
- children: /* @__PURE__ */ jsxs30(
15846
- "div",
15847
- {
15848
- className: "flex items-start w-full",
15849
- style: { gap: "var(--spacing-3xl)" },
15850
- children: [
15851
- /* @__PURE__ */ jsx33(
15852
- ScTextField,
16018
+ children: [
16019
+ /* @__PURE__ */ jsx34(
16020
+ "div",
16021
+ {
16022
+ className: "w-full relative",
16023
+ style: {
16024
+ backgroundColor: "var(--alias-surface-base)",
16025
+ borderRadius: "var(--radius-3xl)",
16026
+ padding: "var(--spacing-6xl)"
16027
+ },
16028
+ children: /* @__PURE__ */ jsx34(
16029
+ ScTextField,
16030
+ {
16031
+ label: "Your Referral Link",
16032
+ labelGroup: "label",
16033
+ state: "filled",
16034
+ value: link,
16035
+ placeholderFilled: "https://your-domain.com?referral_code=ABC123",
16036
+ tfGroup: "none",
16037
+ rightSlot: /* @__PURE__ */ jsxs31(
16038
+ "button",
15853
16039
  {
15854
- label: "Your Referral Link",
15855
- labelGroup: "label",
15856
- state: "filled",
15857
- value: referralLink,
15858
- placeholderFilled: "https://your-domain.com?referral_code=ABC123",
15859
- tfGroup: "icon-right",
15860
- tfRightIcon: /* @__PURE__ */ jsx33(
15861
- SiconBolt,
15862
- {
15863
- className: "w-6 h-6",
15864
- color: "var(--alias-text---icons-primary)"
15865
- }
15866
- ),
15867
- className: "sc-text-field-full-width flex-1 min-w-0",
15868
- readOnly: true
16040
+ type: "button",
16041
+ "aria-label": copied ? "Copied" : "Copy referral link",
16042
+ title: copied ? "Copied" : "Copy referral link",
16043
+ disabled: !link,
16044
+ onClick: () => void copyLink(),
16045
+ className: "flex items-center justify-center shrink-0 cursor-pointer border-none",
16046
+ style: {
16047
+ gap: "var(--spacing-xs)",
16048
+ padding: "0 var(--spacing-md)",
16049
+ height: 32,
16050
+ borderRadius: "var(--radius-lg)",
16051
+ background: "transparent",
16052
+ color: "var(--alias-text---icons-primary)",
16053
+ fontSize: "var(--font-size-font-size-sm)",
16054
+ fontWeight: 500
16055
+ },
16056
+ onMouseEnter: (e) => {
16057
+ e.currentTarget.style.background = "var(--alias-fill-neutral-neutralplus)";
16058
+ },
16059
+ onMouseLeave: (e) => {
16060
+ e.currentTarget.style.background = "transparent";
16061
+ },
16062
+ children: [
16063
+ copied ? /* @__PURE__ */ jsx34(SiconCheck2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ jsx34(SiconCopy2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
16064
+ copied ? "Copied" : "Copy"
16065
+ ]
15869
16066
  }
15870
16067
  ),
15871
- /* @__PURE__ */ jsx33(
15872
- ScTextField,
15873
- {
15874
- label: "Invite through email",
15875
- labelGroup: "label",
15876
- state: "filled",
15877
- value: user?.email ?? "",
15878
- placeholderFilled: "chris@kepler.com",
15879
- tfGroup: "icon-right",
15880
- tfRightIcon: /* @__PURE__ */ jsx33(
15881
- SiconSend,
15882
- {
15883
- className: "w-6 h-6",
15884
- color: "var(--alias-text---icons-primary)"
15885
- }
15886
- ),
15887
- className: "sc-text-field-full-width flex-1 min-w-0"
15888
- }
15889
- )
15890
- ]
15891
- }
15892
- )
15893
- }
15894
- )
16068
+ desc: "Share this link. When someone opens it and creates a new Streamoid account, it's recorded as your referral.",
16069
+ className: "sc-text-field-full-width w-full min-w-0",
16070
+ readOnly: true,
16071
+ onFocus: (e) => e.currentTarget.select()
16072
+ }
16073
+ )
16074
+ }
16075
+ ),
16076
+ api.getReferredUsers && /* @__PURE__ */ jsx34(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
16077
+ ]
15895
16078
  }
15896
16079
  );
15897
16080
  }
@@ -15908,7 +16091,7 @@ function SettingsContent({
15908
16091
  inviteRequested,
15909
16092
  onInviteRequestHandled
15910
16093
  }) {
15911
- return /* @__PURE__ */ jsx33(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx33(
16094
+ return /* @__PURE__ */ jsx34(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx34(
15912
16095
  SettingsContentInner,
15913
16096
  {
15914
16097
  activeTab,
@@ -15952,6 +16135,7 @@ function SettingsContentInner({
15952
16135
  const isOverview = overviewDetail && showOverview;
15953
16136
  const overviewInvite = useWorkspaceInvitePermission(adapters, { enabled: isOverview && !!onInvitePeople });
15954
16137
  const showConnectedApps = !!integrations;
16138
+ const showReferral = !!referralCodeOf(adapters.auth.user);
15955
16139
  const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
15956
16140
  const workspaceId = workspace.current?.id ?? null;
15957
16141
  const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
@@ -16360,7 +16544,7 @@ function SettingsContentInner({
16360
16544
  setConfirmLeaveOpen(true);
16361
16545
  return false;
16362
16546
  }
16363
- return /* @__PURE__ */ jsxs30(
16547
+ return /* @__PURE__ */ jsxs31(
16364
16548
  "div",
16365
16549
  {
16366
16550
  "data-streamoid-settings": "",
@@ -16371,8 +16555,8 @@ function SettingsContentInner({
16371
16555
  ...isOverview ? { display: "block", overflowY: "auto" } : {}
16372
16556
  },
16373
16557
  children: [
16374
- !isOverview && /* @__PURE__ */ jsx33(SettingsAppearance, {}),
16375
- /* @__PURE__ */ jsx33(
16558
+ !isOverview && /* @__PURE__ */ jsx34(SettingsAppearance, {}),
16559
+ /* @__PURE__ */ jsx34(
16376
16560
  "div",
16377
16561
  {
16378
16562
  className: "flex flex-col items-start relative h-full overflow-hidden",
@@ -16383,8 +16567,8 @@ function SettingsContentInner({
16383
16567
  width: "100%",
16384
16568
  ...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
16385
16569
  },
16386
- children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
16387
- !overviewDetail && onBack !== null && /* @__PURE__ */ jsx33("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs30(
16570
+ children: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
16571
+ !overviewDetail && onBack !== null && /* @__PURE__ */ jsx34("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs31(
16388
16572
  "button",
16389
16573
  {
16390
16574
  type: "button",
@@ -16416,19 +16600,19 @@ function SettingsContentInner({
16416
16600
  else window.history.back();
16417
16601
  },
16418
16602
  children: [
16419
- /* @__PURE__ */ jsx33(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
16603
+ /* @__PURE__ */ jsx34(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
16420
16604
  "Back"
16421
16605
  ]
16422
16606
  }
16423
16607
  ) }),
16424
- overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx33("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx33(
16608
+ overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx34("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx34(
16425
16609
  ScButton18,
16426
16610
  {
16427
16611
  text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
16428
16612
  variant: "tertiary",
16429
16613
  size: "sm",
16430
16614
  styleVariant: "icon-left",
16431
- icon: /* @__PURE__ */ jsx33(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
16615
+ icon: /* @__PURE__ */ jsx34(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
16432
16616
  onClick: () => {
16433
16617
  if (isBillingSubView) {
16434
16618
  setBillingShowPlans(false);
@@ -16440,7 +16624,7 @@ function SettingsContentInner({
16440
16624
  }
16441
16625
  }
16442
16626
  ) }),
16443
- /* @__PURE__ */ jsxs30(
16627
+ /* @__PURE__ */ jsxs31(
16444
16628
  "div",
16445
16629
  {
16446
16630
  className: "flex items-center shrink-0 w-full",
@@ -16451,9 +16635,9 @@ function SettingsContentInner({
16451
16635
  paddingRight: 20
16452
16636
  },
16453
16637
  children: [
16454
- /* @__PURE__ */ jsxs30("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
16455
- /* @__PURE__ */ jsx33(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16456
- /* @__PURE__ */ jsx33(
16638
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
16639
+ /* @__PURE__ */ jsx34(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16640
+ /* @__PURE__ */ jsx34(
16457
16641
  "h1",
16458
16642
  {
16459
16643
  style: {
@@ -16467,10 +16651,10 @@ function SettingsContentInner({
16467
16651
  children: overviewDetail ? "Account and workspace settings" : "Settings"
16468
16652
  }
16469
16653
  ),
16470
- !isOverview && /* @__PURE__ */ jsxs30("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
16471
- scopeCrumb && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16472
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16473
- /* @__PURE__ */ jsx33(
16654
+ !isOverview && /* @__PURE__ */ jsxs31("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
16655
+ scopeCrumb && /* @__PURE__ */ jsxs31(Fragment16, { children: [
16656
+ /* @__PURE__ */ jsx34(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16657
+ /* @__PURE__ */ jsx34(
16474
16658
  "span",
16475
16659
  {
16476
16660
  className: "truncate",
@@ -16487,8 +16671,8 @@ function SettingsContentInner({
16487
16671
  }
16488
16672
  )
16489
16673
  ] }),
16490
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16491
- /* @__PURE__ */ jsx33(
16674
+ /* @__PURE__ */ jsx34(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16675
+ /* @__PURE__ */ jsx34(
16492
16676
  "span",
16493
16677
  {
16494
16678
  style: {
@@ -16501,9 +16685,9 @@ function SettingsContentInner({
16501
16685
  children: leafLabel
16502
16686
  }
16503
16687
  ),
16504
- isBillingPlans && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16505
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16506
- /* @__PURE__ */ jsx33(
16688
+ isBillingPlans && /* @__PURE__ */ jsxs31(Fragment16, { children: [
16689
+ /* @__PURE__ */ jsx34(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16690
+ /* @__PURE__ */ jsx34(
16507
16691
  "span",
16508
16692
  {
16509
16693
  style: {
@@ -16517,9 +16701,9 @@ function SettingsContentInner({
16517
16701
  }
16518
16702
  )
16519
16703
  ] }),
16520
- isBillingPerUserLimits && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16521
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16522
- /* @__PURE__ */ jsx33(
16704
+ isBillingPerUserLimits && /* @__PURE__ */ jsxs31(Fragment16, { children: [
16705
+ /* @__PURE__ */ jsx34(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16706
+ /* @__PURE__ */ jsx34(
16523
16707
  "span",
16524
16708
  {
16525
16709
  style: {
@@ -16533,9 +16717,9 @@ function SettingsContentInner({
16533
16717
  }
16534
16718
  )
16535
16719
  ] }),
16536
- isBillingSharedCredits && /* @__PURE__ */ jsxs30(Fragment16, { children: [
16537
- /* @__PURE__ */ jsx33(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16538
- /* @__PURE__ */ jsx33(
16720
+ isBillingSharedCredits && /* @__PURE__ */ jsxs31(Fragment16, { children: [
16721
+ /* @__PURE__ */ jsx34(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
16722
+ /* @__PURE__ */ jsx34(
16539
16723
  "span",
16540
16724
  {
16541
16725
  style: {
@@ -16551,20 +16735,20 @@ function SettingsContentInner({
16551
16735
  ] })
16552
16736
  ] })
16553
16737
  ] }),
16554
- !isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx33(
16738
+ !isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx34(
16555
16739
  SettingsTooltip,
16556
16740
  {
16557
16741
  content: "Start a new workspace with its own team, members and billing",
16558
16742
  placement: "bottom",
16559
16743
  inline: true,
16560
- children: /* @__PURE__ */ jsx33(
16744
+ children: /* @__PURE__ */ jsx34(
16561
16745
  ScButton18,
16562
16746
  {
16563
16747
  text: "Create Workspace",
16564
16748
  variant: "secondary",
16565
16749
  size: "md",
16566
16750
  styleVariant: "icon-left",
16567
- icon: /* @__PURE__ */ jsx33(
16751
+ icon: /* @__PURE__ */ jsx34(
16568
16752
  SiconWorkspace2,
16569
16753
  {
16570
16754
  className: "w-5 h-5",
@@ -16576,13 +16760,13 @@ function SettingsContentInner({
16576
16760
  )
16577
16761
  }
16578
16762
  ),
16579
- !isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx33(
16763
+ !isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx34(
16580
16764
  SettingsTooltip,
16581
16765
  {
16582
16766
  content: "Send someone an invite to join this workspace",
16583
16767
  placement: "bottom",
16584
16768
  inline: true,
16585
- children: /* @__PURE__ */ jsx33(
16769
+ children: /* @__PURE__ */ jsx34(
16586
16770
  ScButton18,
16587
16771
  {
16588
16772
  text: overviewDetail ? "Invite people" : "Invite user",
@@ -16590,7 +16774,7 @@ function SettingsContentInner({
16590
16774
  size: "md",
16591
16775
  styleVariant: "icon-left",
16592
16776
  state: canUseHeaderInvite ? "default" : "disabled",
16593
- icon: /* @__PURE__ */ jsx33(
16777
+ icon: /* @__PURE__ */ jsx34(
16594
16778
  SiconUserAdd3,
16595
16779
  {
16596
16780
  className: "w-5 h-5",
@@ -16604,14 +16788,14 @@ function SettingsContentInner({
16604
16788
  )
16605
16789
  }
16606
16790
  ),
16607
- !isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs30("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
16608
- /* @__PURE__ */ jsx33(
16791
+ !isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs31("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
16792
+ /* @__PURE__ */ jsx34(
16609
16793
  SettingsTooltip,
16610
16794
  {
16611
16795
  content: "Include keys you have already revoked in the list below",
16612
16796
  placement: "bottom",
16613
16797
  inline: true,
16614
- children: /* @__PURE__ */ jsx33(
16798
+ children: /* @__PURE__ */ jsx34(
16615
16799
  ScButton18,
16616
16800
  {
16617
16801
  text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
@@ -16622,20 +16806,20 @@ function SettingsContentInner({
16622
16806
  )
16623
16807
  }
16624
16808
  ),
16625
- /* @__PURE__ */ jsx33(
16809
+ /* @__PURE__ */ jsx34(
16626
16810
  SettingsTooltip,
16627
16811
  {
16628
16812
  content: "Generate a key for calling the Streamoid APIs from your own code",
16629
16813
  placement: "bottom",
16630
16814
  inline: true,
16631
- children: /* @__PURE__ */ jsx33(
16815
+ children: /* @__PURE__ */ jsx34(
16632
16816
  ScButton18,
16633
16817
  {
16634
16818
  text: "New API Key",
16635
16819
  variant: "secondary",
16636
16820
  size: "md",
16637
16821
  styleVariant: "icon-left",
16638
- icon: /* @__PURE__ */ jsx33(
16822
+ icon: /* @__PURE__ */ jsx34(
16639
16823
  SiconPlus3,
16640
16824
  {
16641
16825
  className: "w-5 h-5",
@@ -16648,13 +16832,13 @@ function SettingsContentInner({
16648
16832
  }
16649
16833
  )
16650
16834
  ] }),
16651
- overviewDetail && onClose && /* @__PURE__ */ jsx33(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx33(
16835
+ overviewDetail && onClose && /* @__PURE__ */ jsx34(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx34(
16652
16836
  ScButton18,
16653
16837
  {
16654
16838
  styleVariant: "icon-only",
16655
16839
  variant: "outline",
16656
16840
  size: "md",
16657
- icon: /* @__PURE__ */ jsx33(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
16841
+ icon: /* @__PURE__ */ jsx34(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
16658
16842
  "aria-label": "Close settings",
16659
16843
  style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
16660
16844
  onClick: onClose
@@ -16663,7 +16847,7 @@ function SettingsContentInner({
16663
16847
  ]
16664
16848
  }
16665
16849
  ),
16666
- isOverview ? /* @__PURE__ */ jsx33(
16850
+ isOverview ? /* @__PURE__ */ jsx34(
16667
16851
  AdministrationOverview,
16668
16852
  {
16669
16853
  workspaceName: workspaceScopeName,
@@ -16673,17 +16857,18 @@ function SettingsContentInner({
16673
16857
  isWorkspaceAdmin,
16674
16858
  showConnectedApps,
16675
16859
  showIntegrations,
16860
+ showReferral,
16676
16861
  canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
16677
16862
  onNavigate: setActiveTab,
16678
16863
  onInvitePeople
16679
16864
  }
16680
- ) : /* @__PURE__ */ jsxs30(
16865
+ ) : /* @__PURE__ */ jsxs31(
16681
16866
  "div",
16682
16867
  {
16683
16868
  className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
16684
16869
  style: { gap: 20 },
16685
16870
  children: [
16686
- !overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx33(
16871
+ !overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx34(
16687
16872
  SettingsNav,
16688
16873
  {
16689
16874
  isWorkspaceAdmin,
@@ -16693,11 +16878,12 @@ function SettingsContentInner({
16693
16878
  organizationName: organizationScopeName,
16694
16879
  hasOrganization,
16695
16880
  showConnectedApps,
16696
- showIntegrations
16881
+ showIntegrations,
16882
+ showReferral
16697
16883
  }
16698
16884
  ),
16699
- activeTab === "profile" && /* @__PURE__ */ jsx33(ProfileTab, {}),
16700
- activeTab === "workspace" && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
16885
+ activeTab === "profile" && /* @__PURE__ */ jsx34(ProfileTab, {}),
16886
+ activeTab === "workspace" && /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx34(
16701
16887
  WorkspaceGeneralTab,
16702
16888
  {
16703
16889
  workspace: currentWorkspaceData,
@@ -16719,7 +16905,7 @@ function SettingsContentInner({
16719
16905
  }
16720
16906
  }
16721
16907
  ) }),
16722
- activeTab === "workspaceMembers" && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
16908
+ activeTab === "workspaceMembers" && /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx34(
16723
16909
  TeamsContent,
16724
16910
  {
16725
16911
  embedded: true,
@@ -16734,7 +16920,7 @@ function SettingsContentInner({
16734
16920
  hiddenApps
16735
16921
  }
16736
16922
  ) }),
16737
- activeTab === "workspaceList" && /* @__PURE__ */ jsx33(
16923
+ activeTab === "workspaceList" && /* @__PURE__ */ jsx34(
16738
16924
  WorkspaceListTab,
16739
16925
  {
16740
16926
  workspaces: displayWorkspaces,
@@ -16759,11 +16945,11 @@ function SettingsContentInner({
16759
16945
  }
16760
16946
  }
16761
16947
  ),
16762
- activeTab === "referral" && /* @__PURE__ */ jsx33(ReferralTab, {}),
16763
- activeTab === "connectedApps" && /* @__PURE__ */ jsx33(ConnectedAppsContent, {}),
16764
- activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx33(OrganizationIntegrationsContent, {}),
16765
- activeTab === "organizationList" && /* @__PURE__ */ jsx33(OrganizationListContent, {}),
16766
- (activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ jsx33(
16948
+ activeTab === "referral" && showReferral && /* @__PURE__ */ jsx34(ReferralTab, {}),
16949
+ activeTab === "connectedApps" && /* @__PURE__ */ jsx34(ConnectedAppsContent, {}),
16950
+ activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx34(OrganizationIntegrationsContent, {}),
16951
+ activeTab === "organizationList" && /* @__PURE__ */ jsx34(OrganizationListContent, {}),
16952
+ (activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ jsx34(
16767
16953
  ManagedOrganizationSummary,
16768
16954
  {
16769
16955
  name: workspaceOwner.organizationName,
@@ -16771,14 +16957,14 @@ function SettingsContentInner({
16771
16957
  status: workspaceOwner.organizationStatus,
16772
16958
  managementUrl: organization.managementUrl
16773
16959
  }
16774
- ) : /* @__PURE__ */ jsx33(
16960
+ ) : /* @__PURE__ */ jsx34(
16775
16961
  OrganizationContent,
16776
16962
  {
16777
16963
  embedded: true,
16778
16964
  view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
16779
16965
  }
16780
16966
  ) }),
16781
- activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx33("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx33(
16967
+ activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx34(
16782
16968
  BillingContent,
16783
16969
  {
16784
16970
  embedded: true,
@@ -16808,14 +16994,14 @@ function SettingsContentInner({
16808
16994
  }
16809
16995
  }
16810
16996
  ) }),
16811
- (activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ jsxs30("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
16812
- /* @__PURE__ */ jsx33(SiconLock, { size: 24, color: MUTED_COLOR2 }),
16813
- /* @__PURE__ */ jsx33("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
16814
- /* @__PURE__ */ jsx33("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
16815
- /* @__PURE__ */ jsx33("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
16997
+ (activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ jsxs31("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
16998
+ /* @__PURE__ */ jsx34(SiconLock, { size: 24, color: MUTED_COLOR2 }),
16999
+ /* @__PURE__ */ jsx34("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
17000
+ /* @__PURE__ */ jsx34("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
17001
+ /* @__PURE__ */ jsx34("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
16816
17002
  ] }),
16817
- activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs30("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
16818
- /* @__PURE__ */ jsxs30(
17003
+ activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs31("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
17004
+ /* @__PURE__ */ jsxs31(
16819
17005
  "a",
16820
17006
  {
16821
17007
  href: "https://docs.streamoid.com",
@@ -16825,19 +17011,19 @@ function SettingsContentInner({
16825
17011
  className: "flex items-center shrink-0",
16826
17012
  style: { gap: 14, padding: "16px 20px", marginBottom: 16, border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)", background: "var(--alias-surface-base)", color: PRIMARY_COLOR3, textDecoration: "none" },
16827
17013
  children: [
16828
- /* @__PURE__ */ jsx33(SiconBookOpen, { size: 24 }),
16829
- /* @__PURE__ */ jsxs30("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
16830
- /* @__PURE__ */ jsx33("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
16831
- /* @__PURE__ */ jsx33("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
17014
+ /* @__PURE__ */ jsx34(SiconBookOpen, { size: 24 }),
17015
+ /* @__PURE__ */ jsxs31("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
17016
+ /* @__PURE__ */ jsx34("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
17017
+ /* @__PURE__ */ jsx34("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
16832
17018
  ] }),
16833
- /* @__PURE__ */ jsxs30("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
17019
+ /* @__PURE__ */ jsxs31("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
16834
17020
  "View docs ",
16835
- /* @__PURE__ */ jsx33(SiconExternalLink2, { size: 16 })
17021
+ /* @__PURE__ */ jsx34(SiconExternalLink2, { size: 16 })
16836
17022
  ] })
16837
17023
  ]
16838
17024
  }
16839
17025
  ),
16840
- /* @__PURE__ */ jsx33(
17026
+ /* @__PURE__ */ jsx34(
16841
17027
  TokensContent,
16842
17028
  {
16843
17029
  embedded: true,
@@ -16854,7 +17040,7 @@ function SettingsContentInner({
16854
17040
  ] })
16855
17041
  }
16856
17042
  ),
16857
- /* @__PURE__ */ jsx33(
17043
+ /* @__PURE__ */ jsx34(
16858
17044
  WorkspaceModal,
16859
17045
  {
16860
17046
  open: wsModalOpen,
@@ -16873,7 +17059,7 @@ function SettingsContentInner({
16873
17059
  }
16874
17060
  }
16875
17061
  ),
16876
- /* @__PURE__ */ jsx33(
17062
+ /* @__PURE__ */ jsx34(
16877
17063
  ConfirmLeaveModal,
16878
17064
  {
16879
17065
  open: confirmLeaveOpen,
@@ -16906,7 +17092,7 @@ function SettingsContentInner({
16906
17092
  }
16907
17093
  }
16908
17094
  ),
16909
- /* @__PURE__ */ jsx33(
17095
+ /* @__PURE__ */ jsx34(
16910
17096
  ConfirmDeleteModal,
16911
17097
  {
16912
17098
  open: confirmDeleteOpen,
@@ -16939,7 +17125,7 @@ function SettingsContentInner({
16939
17125
  import { useState as useState26 } from "react";
16940
17126
  import { ScButton as ScButton19, ScCheckbox } from "@streamoid/ui";
16941
17127
  import { SiconChevronDown, SiconChevronRight } from "@streamoid/icons";
16942
- import { Fragment as Fragment17, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
17128
+ import { Fragment as Fragment17, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
16943
17129
  var T19 = {
16944
17130
  primary: "var(--alias-text---icons-primary)",
16945
17131
  muted: "var(--alias-text---icons-muted)",
@@ -17022,7 +17208,7 @@ function WorkspacePicker({
17022
17208
  );
17023
17209
  const workspaceRow = (workspace, first) => {
17024
17210
  const checked = selected.has(workspace._id);
17025
- return /* @__PURE__ */ jsxs31(
17211
+ return /* @__PURE__ */ jsxs32(
17026
17212
  "div",
17027
17213
  {
17028
17214
  role: "checkbox",
@@ -17043,8 +17229,8 @@ function WorkspacePicker({
17043
17229
  }
17044
17230
  },
17045
17231
  children: [
17046
- /* @__PURE__ */ jsx34(ScCheckbox, { checked }),
17047
- /* @__PURE__ */ jsx34(
17232
+ /* @__PURE__ */ jsx35(ScCheckbox, { checked }),
17233
+ /* @__PURE__ */ jsx35(
17048
17234
  ProfileAvatar,
17049
17235
  {
17050
17236
  name: workspace.name,
@@ -17053,8 +17239,8 @@ function WorkspacePicker({
17053
17239
  borderRadius: T19.rLg
17054
17240
  }
17055
17241
  ),
17056
- /* @__PURE__ */ jsxs31("div", { className: "flex flex-col min-w-0", children: [
17057
- /* @__PURE__ */ jsx34(
17242
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0", children: [
17243
+ /* @__PURE__ */ jsx35(
17058
17244
  "span",
17059
17245
  {
17060
17246
  className: "truncate",
@@ -17062,7 +17248,7 @@ function WorkspacePicker({
17062
17248
  children: workspace.name
17063
17249
  }
17064
17250
  ),
17065
- workspace.ownerName && /* @__PURE__ */ jsxs31(
17251
+ workspace.ownerName && /* @__PURE__ */ jsxs32(
17066
17252
  "span",
17067
17253
  {
17068
17254
  className: "truncate",
@@ -17083,8 +17269,8 @@ function WorkspacePicker({
17083
17269
  const isCollapsed = collapsed.has(section.organizationId);
17084
17270
  const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
17085
17271
  const Chevron = isCollapsed ? SiconChevronRight : SiconChevronDown;
17086
- return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", children: [
17087
- /* @__PURE__ */ jsxs31(
17272
+ return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", children: [
17273
+ /* @__PURE__ */ jsxs32(
17088
17274
  "div",
17089
17275
  {
17090
17276
  role: "button",
@@ -17108,8 +17294,8 @@ function WorkspacePicker({
17108
17294
  }
17109
17295
  },
17110
17296
  children: [
17111
- /* @__PURE__ */ jsx34(Chevron, { className: "w-4 h-4", color: T19.muted }),
17112
- /* @__PURE__ */ jsx34(
17297
+ /* @__PURE__ */ jsx35(Chevron, { className: "w-4 h-4", color: T19.muted }),
17298
+ /* @__PURE__ */ jsx35(
17113
17299
  ProfileAvatar,
17114
17300
  {
17115
17301
  name: section.organizationName,
@@ -17118,7 +17304,7 @@ function WorkspacePicker({
17118
17304
  borderRadius: T19.rLg
17119
17305
  }
17120
17306
  ),
17121
- /* @__PURE__ */ jsx34(
17307
+ /* @__PURE__ */ jsx35(
17122
17308
  "span",
17123
17309
  {
17124
17310
  className: "truncate flex-1 min-w-0",
@@ -17126,11 +17312,11 @@ function WorkspacePicker({
17126
17312
  children: section.organizationName
17127
17313
  }
17128
17314
  ),
17129
- /* @__PURE__ */ jsx34("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
17315
+ /* @__PURE__ */ jsx35("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
17130
17316
  ]
17131
17317
  }
17132
17318
  ),
17133
- !isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx34(
17319
+ !isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx35(
17134
17320
  "div",
17135
17321
  {
17136
17322
  style: {
@@ -17145,14 +17331,14 @@ function WorkspacePicker({
17145
17331
  ))
17146
17332
  ] }, section.organizationId);
17147
17333
  };
17148
- return /* @__PURE__ */ jsxs31(
17334
+ return /* @__PURE__ */ jsxs32(
17149
17335
  "div",
17150
17336
  {
17151
17337
  className: "flex flex-col w-full",
17152
17338
  style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
17153
17339
  children: [
17154
- /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
17155
- /* @__PURE__ */ jsx34(
17340
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
17341
+ /* @__PURE__ */ jsx35(
17156
17342
  "p",
17157
17343
  {
17158
17344
  style: {
@@ -17165,9 +17351,9 @@ function WorkspacePicker({
17165
17351
  children: "Choose your workspaces"
17166
17352
  }
17167
17353
  ),
17168
- /* @__PURE__ */ jsx34("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
17354
+ /* @__PURE__ */ jsx35("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
17169
17355
  ] }),
17170
- (loading || hasWorkspaces) && /* @__PURE__ */ jsx34(
17356
+ (loading || hasWorkspaces) && /* @__PURE__ */ jsx35(
17171
17357
  "div",
17172
17358
  {
17173
17359
  className: "flex flex-col w-full overflow-y-auto",
@@ -17177,7 +17363,7 @@ function WorkspacePicker({
17177
17363
  border: `1px solid ${T19.borderSubtle}`,
17178
17364
  borderRadius: T19.r3xl
17179
17365
  },
17180
- children: loading ? /* @__PURE__ */ jsx34(
17366
+ children: loading ? /* @__PURE__ */ jsx35(
17181
17367
  "div",
17182
17368
  {
17183
17369
  className: "flex items-center justify-center",
@@ -17187,9 +17373,9 @@ function WorkspacePicker({
17187
17373
  ) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
17188
17374
  }
17189
17375
  ),
17190
- showCreate ? /* @__PURE__ */ jsxs31("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
17191
- creatable.length > 1 && /* @__PURE__ */ jsxs31(Fragment17, { children: [
17192
- /* @__PURE__ */ jsx34(
17376
+ showCreate ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
17377
+ creatable.length > 1 && /* @__PURE__ */ jsxs32(Fragment17, { children: [
17378
+ /* @__PURE__ */ jsx35(
17193
17379
  "label",
17194
17380
  {
17195
17381
  htmlFor: "workspace-picker-organization",
@@ -17197,7 +17383,7 @@ function WorkspacePicker({
17197
17383
  children: "Organization"
17198
17384
  }
17199
17385
  ),
17200
- /* @__PURE__ */ jsx34(
17386
+ /* @__PURE__ */ jsx35(
17201
17387
  "select",
17202
17388
  {
17203
17389
  id: "workspace-picker-organization",
@@ -17214,11 +17400,11 @@ function WorkspacePicker({
17214
17400
  fontFamily: T19.font,
17215
17401
  fontSize: T19.fsSm
17216
17402
  },
17217
- children: creatable.map((s) => /* @__PURE__ */ jsx34("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
17403
+ children: creatable.map((s) => /* @__PURE__ */ jsx35("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
17218
17404
  }
17219
17405
  )
17220
17406
  ] }),
17221
- /* @__PURE__ */ jsx34(
17407
+ /* @__PURE__ */ jsx35(
17222
17408
  "label",
17223
17409
  {
17224
17410
  htmlFor: "workspace-picker-name",
@@ -17226,7 +17412,7 @@ function WorkspacePicker({
17226
17412
  children: "New workspace name"
17227
17413
  }
17228
17414
  ),
17229
- /* @__PURE__ */ jsx34(
17415
+ /* @__PURE__ */ jsx35(
17230
17416
  "input",
17231
17417
  {
17232
17418
  id: "workspace-picker-name",
@@ -17250,12 +17436,12 @@ function WorkspacePicker({
17250
17436
  }
17251
17437
  }
17252
17438
  ),
17253
- /* @__PURE__ */ jsx34("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
17439
+ /* @__PURE__ */ jsx35("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
17254
17440
  ["shared", "Shared", `Anyone in ${createLabel} can join`],
17255
17441
  ["private", "Private", "Invite only"]
17256
17442
  ].map(([value, label, hint]) => {
17257
17443
  const active = visibility === value;
17258
- return /* @__PURE__ */ jsxs31(
17444
+ return /* @__PURE__ */ jsxs32(
17259
17445
  "div",
17260
17446
  {
17261
17447
  role: "radio",
@@ -17276,7 +17462,7 @@ function WorkspacePicker({
17276
17462
  border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
17277
17463
  },
17278
17464
  children: [
17279
- /* @__PURE__ */ jsx34(
17465
+ /* @__PURE__ */ jsx35(
17280
17466
  "span",
17281
17467
  {
17282
17468
  style: {
@@ -17288,14 +17474,14 @@ function WorkspacePicker({
17288
17474
  children: label
17289
17475
  }
17290
17476
  ),
17291
- /* @__PURE__ */ jsx34("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
17477
+ /* @__PURE__ */ jsx35("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
17292
17478
  ]
17293
17479
  },
17294
17480
  value
17295
17481
  );
17296
17482
  }) }),
17297
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
17298
- hasWorkspaces && /* @__PURE__ */ jsx34(
17483
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
17484
+ hasWorkspaces && /* @__PURE__ */ jsx35(
17299
17485
  ScButton19,
17300
17486
  {
17301
17487
  text: "Back",
@@ -17304,7 +17490,7 @@ function WorkspacePicker({
17304
17490
  onClick: () => setCreating(false)
17305
17491
  }
17306
17492
  ),
17307
- /* @__PURE__ */ jsx34(
17493
+ /* @__PURE__ */ jsx35(
17308
17494
  ScButton19,
17309
17495
  {
17310
17496
  text: busy ? "Creating\u2026" : "Create workspace",
@@ -17315,8 +17501,8 @@ function WorkspacePicker({
17315
17501
  }
17316
17502
  )
17317
17503
  ] })
17318
- ] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs31("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
17319
- canCreate ? /* @__PURE__ */ jsx34(
17504
+ ] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs32("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
17505
+ canCreate ? /* @__PURE__ */ jsx35(
17320
17506
  ScButton19,
17321
17507
  {
17322
17508
  text: "Create a workspace",
@@ -17325,8 +17511,8 @@ function WorkspacePicker({
17325
17511
  state: loading || busy ? "disabled" : "default",
17326
17512
  onClick: loading || busy ? void 0 : () => setCreating(true)
17327
17513
  }
17328
- ) : /* @__PURE__ */ jsx34("span", {}),
17329
- /* @__PURE__ */ jsx34(
17514
+ ) : /* @__PURE__ */ jsx35("span", {}),
17515
+ /* @__PURE__ */ jsx35(
17330
17516
  ScButton19,
17331
17517
  {
17332
17518
  text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
@@ -17345,7 +17531,7 @@ function WorkspacePicker({
17345
17531
  // src/organization-picker.tsx
17346
17532
  import { useEffect as useEffect21, useState as useState27 } from "react";
17347
17533
  import { ScButton as ScButton20, ScCheckbox as ScCheckbox2 } from "@streamoid/ui";
17348
- import { Fragment as Fragment18, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
17534
+ import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
17349
17535
  var T20 = {
17350
17536
  primary: "var(--alias-text---icons-primary)",
17351
17537
  muted: "var(--alias-text---icons-muted)",
@@ -17405,18 +17591,18 @@ function OrganizationPicker({
17405
17591
  const heading = choosing ? "Choose your organization" : "Create your organization";
17406
17592
  const subheading = choosing ? `${companyDomain ?? "Your company"} has more than one organization. Pick the ones to join as a member.` : publicDomain ? "Create an organization for your team. Or, if your team already uses Streamoid, ask them to invite you." : `Nobody from ${companyDomain ?? "your company"} has set up an organization you can join yet. Create one; you'll be its admin.`;
17407
17593
  const textStyle = { margin: 0, fontFamily: T20.font };
17408
- return /* @__PURE__ */ jsxs32(
17594
+ return /* @__PURE__ */ jsxs33(
17409
17595
  "div",
17410
17596
  {
17411
17597
  className: "flex flex-col w-full",
17412
17598
  style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
17413
17599
  children: [
17414
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
17415
- /* @__PURE__ */ jsx35("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
17416
- /* @__PURE__ */ jsx35("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
17600
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
17601
+ /* @__PURE__ */ jsx36("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
17602
+ /* @__PURE__ */ jsx36("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
17417
17603
  ] }),
17418
- !loading && choosing && /* @__PURE__ */ jsxs32(Fragment18, { children: [
17419
- /* @__PURE__ */ jsx35(
17604
+ !loading && choosing && /* @__PURE__ */ jsxs33(Fragment18, { children: [
17605
+ /* @__PURE__ */ jsx36(
17420
17606
  "div",
17421
17607
  {
17422
17608
  role: "group",
@@ -17429,7 +17615,7 @@ function OrganizationPicker({
17429
17615
  },
17430
17616
  children: organizations.map((org, index) => {
17431
17617
  const checked = selected.has(org._id);
17432
- return /* @__PURE__ */ jsxs32(
17618
+ return /* @__PURE__ */ jsxs33(
17433
17619
  "div",
17434
17620
  {
17435
17621
  role: "checkbox",
@@ -17450,11 +17636,11 @@ function OrganizationPicker({
17450
17636
  }
17451
17637
  },
17452
17638
  children: [
17453
- /* @__PURE__ */ jsx35(ScCheckbox2, { checked }),
17454
- /* @__PURE__ */ jsx35(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
17455
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0", children: [
17456
- /* @__PURE__ */ jsx35("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
17457
- org.domain && /* @__PURE__ */ jsx35("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
17639
+ /* @__PURE__ */ jsx36(ScCheckbox2, { checked }),
17640
+ /* @__PURE__ */ jsx36(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
17641
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col min-w-0", children: [
17642
+ /* @__PURE__ */ jsx36("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
17643
+ org.domain && /* @__PURE__ */ jsx36("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
17458
17644
  ] })
17459
17645
  ]
17460
17646
  },
@@ -17463,7 +17649,7 @@ function OrganizationPicker({
17463
17649
  })
17464
17650
  }
17465
17651
  ),
17466
- /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx35(
17652
+ /* @__PURE__ */ jsx36("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx36(
17467
17653
  ScButton20,
17468
17654
  {
17469
17655
  text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
@@ -17474,10 +17660,10 @@ function OrganizationPicker({
17474
17660
  }
17475
17661
  ) })
17476
17662
  ] }),
17477
- !loading && !choosing && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
17478
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17479
- /* @__PURE__ */ jsx35("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
17480
- /* @__PURE__ */ jsx35(
17663
+ !loading && !choosing && /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
17664
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17665
+ /* @__PURE__ */ jsx36("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
17666
+ /* @__PURE__ */ jsx36(
17481
17667
  "input",
17482
17668
  {
17483
17669
  id: "organization-picker-name",
@@ -17499,14 +17685,14 @@ function OrganizationPicker({
17499
17685
  }
17500
17686
  )
17501
17687
  ] }),
17502
- !publicDomain && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17503
- /* @__PURE__ */ jsx35("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
17504
- /* @__PURE__ */ jsx35("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
17688
+ !publicDomain && /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
17689
+ /* @__PURE__ */ jsx36("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
17690
+ /* @__PURE__ */ jsx36("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
17505
17691
  ["shared", "Shared"],
17506
17692
  ["private", "Private"]
17507
17693
  ].map(([value, label]) => {
17508
17694
  const active = type === value;
17509
- return /* @__PURE__ */ jsx35(
17695
+ return /* @__PURE__ */ jsx36(
17510
17696
  "div",
17511
17697
  {
17512
17698
  role: "radio",
@@ -17525,12 +17711,12 @@ function OrganizationPicker({
17525
17711
  borderRadius: T20.r3xl,
17526
17712
  border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
17527
17713
  },
17528
- children: /* @__PURE__ */ jsx35("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
17714
+ children: /* @__PURE__ */ jsx36("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
17529
17715
  },
17530
17716
  value
17531
17717
  );
17532
17718
  }) }),
17533
- /* @__PURE__ */ jsx35(
17719
+ /* @__PURE__ */ jsx36(
17534
17720
  "span",
17535
17721
  {
17536
17722
  "data-testid": "organization-visibility-message",
@@ -17540,7 +17726,7 @@ function OrganizationPicker({
17540
17726
  }
17541
17727
  )
17542
17728
  ] }),
17543
- /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx35(
17729
+ /* @__PURE__ */ jsx36("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx36(
17544
17730
  ScButton20,
17545
17731
  {
17546
17732
  text: busy ? "Creating\u2026" : "Create organization",
@@ -17648,18 +17834,18 @@ var app_settings_page_default = {
17648
17834
  };
17649
17835
 
17650
17836
  // src/app-settings-page.tsx
17651
- import { Fragment as Fragment19, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
17837
+ import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
17652
17838
  function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
17653
- return /* @__PURE__ */ jsxs33("header", { className: app_settings_page_default.header, children: [
17654
- /* @__PURE__ */ jsx36("h1", { children: "App settings" }),
17655
- /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.actions, children: [
17656
- /* @__PURE__ */ jsx36("a", { href: administrationHref, onClick: (event) => {
17839
+ return /* @__PURE__ */ jsxs34("header", { className: app_settings_page_default.header, children: [
17840
+ /* @__PURE__ */ jsx37("h1", { children: "App settings" }),
17841
+ /* @__PURE__ */ jsxs34("div", { className: app_settings_page_default.actions, children: [
17842
+ /* @__PURE__ */ jsx37("a", { href: administrationHref, onClick: (event) => {
17657
17843
  if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
17658
17844
  event.preventDefault();
17659
17845
  onOpenAdministration();
17660
17846
  }
17661
17847
  }, children: "Account and workspace settings" }),
17662
- onClose ? /* @__PURE__ */ jsx36("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ jsx36(SiconX, { size: 20, "aria-hidden": "true" }) }) : null
17848
+ onClose ? /* @__PURE__ */ jsx37("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ jsx37(SiconX, { size: 20, "aria-hidden": "true" }) }) : null
17663
17849
  ] })
17664
17850
  ] });
17665
17851
  }
@@ -17671,45 +17857,45 @@ function AppSettingsPage({
17671
17857
  emptyDescription = "Account, workspace and organization settings are available above.",
17672
17858
  children
17673
17859
  }) {
17674
- return /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.page, children: [
17675
- /* @__PURE__ */ jsx36(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
17676
- children ?? /* @__PURE__ */ jsxs33("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
17677
- /* @__PURE__ */ jsx36("h2", { children: emptyTitle }),
17678
- /* @__PURE__ */ jsx36("p", { children: emptyDescription })
17860
+ return /* @__PURE__ */ jsxs34("div", { className: app_settings_page_default.page, children: [
17861
+ /* @__PURE__ */ jsx37(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
17862
+ children ?? /* @__PURE__ */ jsxs34("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
17863
+ /* @__PURE__ */ jsx37("h2", { children: emptyTitle }),
17864
+ /* @__PURE__ */ jsx37("p", { children: emptyDescription })
17679
17865
  ] })
17680
17866
  ] });
17681
17867
  }
17682
17868
  function AppSettingsSection({ title, action, children }) {
17683
- return /* @__PURE__ */ jsxs33("section", { className: app_settings_page_default.section, "aria-label": title, children: [
17684
- /* @__PURE__ */ jsxs33("div", { className: app_settings_page_default.sectionHeader, children: [
17685
- /* @__PURE__ */ jsx36("h2", { children: title }),
17686
- action ? /* @__PURE__ */ jsx36("div", { className: app_settings_page_default.sectionAction, children: action }) : null
17869
+ return /* @__PURE__ */ jsxs34("section", { className: app_settings_page_default.section, "aria-label": title, children: [
17870
+ /* @__PURE__ */ jsxs34("div", { className: app_settings_page_default.sectionHeader, children: [
17871
+ /* @__PURE__ */ jsx37("h2", { children: title }),
17872
+ action ? /* @__PURE__ */ jsx37("div", { className: app_settings_page_default.sectionAction, children: action }) : null
17687
17873
  ] }),
17688
- /* @__PURE__ */ jsx36("div", { children })
17874
+ /* @__PURE__ */ jsx37("div", { children })
17689
17875
  ] });
17690
17876
  }
17691
17877
  function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
17692
17878
  const reasonId = useId2();
17693
- const content = /* @__PURE__ */ jsxs33(Fragment19, { children: [
17694
- /* @__PURE__ */ jsxs33("span", { className: app_settings_page_default.rowCopy, children: [
17695
- /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.rowTitle, children: title }),
17696
- description ? /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.rowDescription, children: description }) : null
17879
+ const content = /* @__PURE__ */ jsxs34(Fragment19, { children: [
17880
+ /* @__PURE__ */ jsxs34("span", { className: app_settings_page_default.rowCopy, children: [
17881
+ /* @__PURE__ */ jsx37("span", { className: app_settings_page_default.rowTitle, children: title }),
17882
+ description ? /* @__PURE__ */ jsx37("span", { className: app_settings_page_default.rowDescription, children: description }) : null
17697
17883
  ] }),
17698
- summary || trailing || href || onClick ? /* @__PURE__ */ jsxs33("span", { className: app_settings_page_default.rowEnd, children: [
17884
+ summary || trailing || href || onClick ? /* @__PURE__ */ jsxs34("span", { className: app_settings_page_default.rowEnd, children: [
17699
17885
  summary,
17700
- trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx36(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
17886
+ trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx37(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
17701
17887
  ] }) : null,
17702
- disabledReason ? /* @__PURE__ */ jsx36("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
17888
+ disabledReason ? /* @__PURE__ */ jsx37("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
17703
17889
  ] });
17704
17890
  const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
17705
- if (href && !disabled) return /* @__PURE__ */ jsx36("a", { ...props, href, onClick: (event) => {
17891
+ if (href && !disabled) return /* @__PURE__ */ jsx37("a", { ...props, href, onClick: (event) => {
17706
17892
  if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
17707
17893
  event.preventDefault();
17708
17894
  onClick();
17709
17895
  }
17710
17896
  }, children: content });
17711
- if (onClick || disabled) return /* @__PURE__ */ jsx36("button", { ...props, type: "button", disabled, onClick, children: content });
17712
- return /* @__PURE__ */ jsx36("div", { ...props, children: content });
17897
+ if (onClick || disabled) return /* @__PURE__ */ jsx37("button", { ...props, type: "button", disabled, onClick, children: content });
17898
+ return /* @__PURE__ */ jsx37("div", { ...props, children: content });
17713
17899
  }
17714
17900
  export {
17715
17901
  APP_KEYS,
@@ -17733,6 +17919,7 @@ export {
17733
17919
  ExportDateModal,
17734
17920
  INITIAL_USAGE_LOGS_STATE,
17735
17921
  InviteUpdateModal,
17922
+ MOCK_REFERRED_USERS,
17736
17923
  MemberCreditLimitModal,
17737
17924
  MemberListFrame,
17738
17925
  MemberListToolbar,
@@ -17748,6 +17935,7 @@ export {
17748
17935
  ProfileAvatar,
17749
17936
  ProfileTab,
17750
17937
  REMOVE_REASON_MAX_LENGTH,
17938
+ ReferralHistoryView,
17751
17939
  ReferralTab,
17752
17940
  RemovePoolMemberModal,
17753
17941
  SCOPE_LABELS,
@@ -17823,6 +18011,10 @@ export {
17823
18011
  poolWorkspaceName,
17824
18012
  productsForCountry,
17825
18013
  readSettingsCaller,
18014
+ referralCodeOf,
18015
+ referralCountLabel,
18016
+ referralLink,
18017
+ referralSignupDate,
17826
18018
  rememberSettingsCaller,
17827
18019
  resolveSettingsTabFromPath,
17828
18020
  roundCredits,
@@ -17830,6 +18022,7 @@ export {
17830
18022
  sharedPoolBannerText,
17831
18023
  sharedPoolEndsText,
17832
18024
  sliceUsageLogsPage,
18025
+ sortReferredUsers,
17833
18026
  sponsoredCreditsText,
17834
18027
  toCsv,
17835
18028
  toLocalDateInput,