@apextelemed/partner-core 0.17.0-dev.53 → 0.17.0-dev.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +28 -1
  2. package/dist/api/index.d.ts +1 -1
  3. package/dist/api/index.js +3 -3
  4. package/dist/api/index.jsx +5 -3
  5. package/dist/chunk/{PDK3JMIW.jsx → BI7NBPCA.jsx} +30 -1
  6. package/dist/chunk/{XZJASVNG.jsx → CAG35QKZ.jsx} +5 -5
  7. package/dist/chunk/{2PME7R6L.jsx → DC24EAWT.jsx} +4 -4
  8. package/dist/chunk/{JDCV4T6O.js → F5PDIE2J.js} +6 -6
  9. package/dist/chunk/{JDCV4T6O.js.map → F5PDIE2J.js.map} +1 -1
  10. package/dist/chunk/{PW7F2JMV.jsx → HXBRBHFR.jsx} +2 -2
  11. package/dist/chunk/{DETBZTGQ.js → MQRPGAH7.js} +5 -5
  12. package/dist/chunk/{DETBZTGQ.js.map → MQRPGAH7.js.map} +1 -1
  13. package/dist/chunk/{NQLBWDE3.js → MUNFWRXF.js} +31 -3
  14. package/dist/chunk/MUNFWRXF.js.map +1 -0
  15. package/dist/chunk/{XGCOWLXF.jsx → P3TJ6ALH.jsx} +2 -2
  16. package/dist/chunk/{OOCYQ4I6.jsx → Q2L3CZPR.jsx} +2 -2
  17. package/dist/chunk/{Z745N7NE.jsx → VUDLDIMS.jsx} +1284 -832
  18. package/dist/chunk/{COIUOQOE.js → WTQ63KR4.js} +3 -3
  19. package/dist/chunk/{COIUOQOE.js.map → WTQ63KR4.js.map} +1 -1
  20. package/dist/chunk/{3VUCQNOR.js → XDRP4X2N.js} +3 -3
  21. package/dist/chunk/{3VUCQNOR.js.map → XDRP4X2N.js.map} +1 -1
  22. package/dist/chunk/{3VBKKYOR.js → XI4OZ4SZ.js} +3 -3
  23. package/dist/chunk/{3VBKKYOR.js.map → XI4OZ4SZ.js.map} +1 -1
  24. package/dist/chunk/{FDCDDUB6.js → Z5QDFCLZ.js} +966 -535
  25. package/dist/chunk/Z5QDFCLZ.js.map +1 -0
  26. package/dist/{client-JZfa9Gbp.d.ts → client-BH1wq2Pp.d.ts} +65 -1
  27. package/dist/flows/index.d.ts +1 -1
  28. package/dist/flows/index.js +6 -6
  29. package/dist/flows/index.jsx +6 -6
  30. package/dist/index/index.d.ts +2 -2
  31. package/dist/index/index.js +7 -7
  32. package/dist/index/index.jsx +11 -7
  33. package/dist/pages/index.d.ts +29 -3
  34. package/dist/pages/index.js +5 -5
  35. package/dist/pages/index.jsx +7 -5
  36. package/dist/stores/index.d.ts +1 -1
  37. package/dist/stores/index.js +2 -2
  38. package/dist/stores/index.jsx +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk/FDCDDUB6.js.map +0 -1
  41. package/dist/chunk/NQLBWDE3.js.map +0 -1
@@ -84,10 +84,10 @@ import {
84
84
  useSurveyV2Flow,
85
85
  useUpdatePaymentMethodFlow,
86
86
  visibleWarnings
87
- } from "./2PME7R6L.jsx";
87
+ } from "./DC24EAWT.jsx";
88
88
  import {
89
89
  fetchFunnelConfig
90
- } from "./PW7F2JMV.jsx";
90
+ } from "./HXBRBHFR.jsx";
91
91
  import {
92
92
  usePrimitives
93
93
  } from "./J63XPQP4.jsx";
@@ -95,8 +95,9 @@ import {
95
95
  affiliateAuth_default,
96
96
  auth_default,
97
97
  cart_default
98
- } from "./OOCYQ4I6.jsx";
98
+ } from "./Q2L3CZPR.jsx";
99
99
  import {
100
+ ADMIN_ROLES,
100
101
  ApiError,
101
102
  SUPPORT_ATTACHMENT_MAX_BYTES,
102
103
  SUPPORT_ATTACHMENT_MIME_TYPES,
@@ -111,7 +112,7 @@ import {
111
112
  offersApi,
112
113
  subscriptionsApi,
113
114
  usersApi
114
- } from "./PDK3JMIW.jsx";
115
+ } from "./BI7NBPCA.jsx";
115
116
 
116
117
  // src/pages/Survey.tsx
117
118
  import { Show, For, createEffect, on } from "solid-js";
@@ -4107,7 +4108,7 @@ var US_STATES3 = [
4107
4108
  var US_STATE_OPTIONS3 = US_STATES3.map((s) => ({ value: s, label: s }));
4108
4109
 
4109
4110
  // src/pages/AdminDashboard.tsx
4110
- import { createEffect as createEffect16, createSignal as createSignal41, ErrorBoundary, Match as Match5, Show as Show60, Switch as Switch5, For as For47 } from "solid-js";
4111
+ import { createEffect as createEffect16, createSignal as createSignal44, ErrorBoundary, Match as Match5, Show as Show62, Switch as Switch5, For as For48 } from "solid-js";
4111
4112
 
4112
4113
  // src/pages/admin/Affiliates.tsx
4113
4114
  import { createSignal as createSignal10, For as For14, Match, Switch } from "solid-js";
@@ -9908,10 +9909,10 @@ function Categories() {
9908
9909
  }
9909
9910
 
9910
9911
  // src/pages/admin/Customers.tsx
9911
- import { createSignal as createSignal20, onCleanup, onMount, Show as Show35 } from "solid-js";
9912
+ import { createSignal as createSignal21, onCleanup, onMount, Show as Show35 } from "solid-js";
9912
9913
 
9913
9914
  // src/pages/admin/customers/CustomerDetail.tsx
9914
- import { createMemo as createMemo9, createResource as createResource10, createSignal as createSignal18, For as For22, Show as Show33 } from "solid-js";
9915
+ import { createMemo as createMemo9, createResource as createResource10, createSignal as createSignal19, For as For22, Show as Show33 } from "solid-js";
9915
9916
 
9916
9917
  // src/pages/admin/adminNav.ts
9917
9918
  import { createContext, useContext } from "solid-js";
@@ -10948,6 +10949,14 @@ function SupportSummary(props) {
10948
10949
  </Show32>;
10949
10950
  }
10950
10951
 
10952
+ // src/pages/admin/adminRoleState.ts
10953
+ import { createSignal as createSignal18 } from "solid-js";
10954
+ var [adminMe, setAdminMe] = createSignal18(void 0);
10955
+ function adminCan(permission) {
10956
+ const me = adminMe();
10957
+ return me ? me.permissions.includes(permission) : true;
10958
+ }
10959
+
10951
10960
  // src/pages/admin/customers/CustomerDetail.tsx
10952
10961
  var TIMELINE_PREVIEW = 30;
10953
10962
  function scrollTo(id) {
@@ -10956,7 +10965,7 @@ function scrollTo(id) {
10956
10965
  }
10957
10966
  function CustomerDetail(props) {
10958
10967
  const nav = useAdminNav();
10959
- const [loadError, setLoadError] = createSignal18(null);
10968
+ const [loadError, setLoadError] = createSignal19(null);
10960
10969
  const [overview, { refetch }] = createResource10(
10961
10970
  () => props.uid,
10962
10971
  async (uid) => {
@@ -10969,15 +10978,15 @@ function CustomerDetail(props) {
10969
10978
  }
10970
10979
  }
10971
10980
  );
10972
- const [busy, setBusy] = createSignal18(null);
10973
- const [editingEmail, setEditingEmail] = createSignal18(false);
10974
- const [emailDraft, setEmailDraft] = createSignal18("");
10975
- const [savingEmail, setSavingEmail] = createSignal18(false);
10976
- const [amountFor, setAmountFor] = createSignal18(null);
10977
- const [scheduleFor, setScheduleFor] = createSignal18(null);
10978
- const [refundFor, setRefundFor] = createSignal18(null);
10979
- const [resolveTarget, setResolveTarget] = createSignal18(null);
10980
- const [allTimeline, setAllTimeline] = createSignal18(false);
10981
+ const [busy, setBusy] = createSignal19(null);
10982
+ const [editingEmail, setEditingEmail] = createSignal19(false);
10983
+ const [emailDraft, setEmailDraft] = createSignal19("");
10984
+ const [savingEmail, setSavingEmail] = createSignal19(false);
10985
+ const [amountFor, setAmountFor] = createSignal19(null);
10986
+ const [scheduleFor, setScheduleFor] = createSignal19(null);
10987
+ const [refundFor, setRefundFor] = createSignal19(null);
10988
+ const [resolveTarget, setResolveTarget] = createSignal19(null);
10989
+ const [allTimeline, setAllTimeline] = createSignal19(false);
10981
10990
  const o = () => overview() ?? null;
10982
10991
  const customerName = (ov) => [ov.customer.firstName, ov.customer.lastName].filter(Boolean).join(" ").trim() || ov.customer.email;
10983
10992
  const liveSubs = () => (o()?.subscriptions ?? []).filter((s) => LIVE_SUBSCRIPTION_STATUSES.has(s.status));
@@ -11336,7 +11345,8 @@ function CustomerDetail(props) {
11336
11345
  <Section
11337
11346
  title="Prescriptions"
11338
11347
  count={ov().requests.items.length}
11339
- action={<button
11348
+ action={<Show33 when={adminCan("patient.support")}>
11349
+ <button
11340
11350
  type="button"
11341
11351
  onClick={handleCancelUnapprovedRequests}
11342
11352
  disabled={busy() === "cancel-requests"}
@@ -11344,9 +11354,10 @@ function CustomerDetail(props) {
11344
11354
  title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched."
11345
11355
  >
11346
11356
  {busy() === "cancel-requests" ? "Canceling\u2026" : pendingRequests().length > 0 ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests"}
11347
- </button>}
11357
+ </button>
11358
+ </Show33>}
11348
11359
  >
11349
- <Show33 when={ov().requests.items.length > 0} fallback={<p class="app-admin-text-muted" style={{ margin: 0, "font-size": "0.875rem" }}>No prescription requests.</p>}>
11360
+ <Show33 when={ov().requests.items.length > 0} fallback={<p class="app-admin-text-muted" style={{ margin: 0, "font-size": "0.875rem" }}>{ov().rxRedacted ? "Prescription details aren't shown for your admin role." : "No prescription requests."}</p>}>
11350
11361
  <div class="app-admin-section-stack">
11351
11362
  <For22 each={[...ov().requests.items].sort((a, b) => Date.parse(b.createdAt ?? "") - Date.parse(a.createdAt ?? ""))}>
11352
11363
  {(r) => <RequestCard request={r} fulfillmentMode={ov().tenant.fulfillmentMode} />}
@@ -11463,7 +11474,7 @@ function CustomerDetail(props) {
11463
11474
  }
11464
11475
 
11465
11476
  // src/pages/admin/customers/CustomerList.tsx
11466
- import { createMemo as createMemo10, createResource as createResource11, createSignal as createSignal19, For as For23, Show as Show34 } from "solid-js";
11477
+ import { createMemo as createMemo10, createResource as createResource11, createSignal as createSignal20, For as For23, Show as Show34 } from "solid-js";
11467
11478
  var PAGE = 50;
11468
11479
  function hint(row) {
11469
11480
  const f = row.facts;
@@ -11497,13 +11508,13 @@ function rxLabel(status) {
11497
11508
  return status.replace(/_/g, " ");
11498
11509
  }
11499
11510
  function CustomerList(props) {
11500
- const [search, setSearch] = createSignal19("");
11501
- const [searchParam, setSearchParam] = createSignal19("");
11502
- const [lifecycle, setLifecycle] = createSignal19(props.initialFilter ?? null);
11503
- const [savingsOnly, setSavingsOnly] = createSignal19(false);
11504
- const [noIntakeOnly, setNoIntakeOnly] = createSignal19(false);
11505
- const [extra, setExtra] = createSignal19([]);
11506
- const [loadingMore, setLoadingMore] = createSignal19(false);
11511
+ const [search, setSearch] = createSignal20("");
11512
+ const [searchParam, setSearchParam] = createSignal20("");
11513
+ const [lifecycle, setLifecycle] = createSignal20(props.initialFilter ?? null);
11514
+ const [savingsOnly, setSavingsOnly] = createSignal20(false);
11515
+ const [noIntakeOnly, setNoIntakeOnly] = createSignal20(false);
11516
+ const [extra, setExtra] = createSignal20([]);
11517
+ const [loadingMore, setLoadingMore] = createSignal20(false);
11507
11518
  let debounceTimer;
11508
11519
  const onSearch = (val) => {
11509
11520
  setSearch(val);
@@ -11534,7 +11545,7 @@ function CustomerList(props) {
11534
11545
  });
11535
11546
  const rows = () => [...page()?.customers ?? [], ...extra()];
11536
11547
  const hasMore = () => extra().length > 0 ? lastHasMore() : page()?.hasMore ?? false;
11537
- const [lastHasMore, setLastHasMore] = createSignal19(false);
11548
+ const [lastHasMore, setLastHasMore] = createSignal20(false);
11538
11549
  const loadMore = async () => {
11539
11550
  setLoadingMore(true);
11540
11551
  try {
@@ -11725,7 +11736,7 @@ function onCustomerUrlChange(handler) {
11725
11736
  // src/pages/admin/Customers.tsx
11726
11737
  function Customers(props = {}) {
11727
11738
  const controlled = () => props.activeUid !== void 0 || props.onSelectCustomer !== void 0;
11728
- const [internalUid, setInternalUid] = createSignal20(
11739
+ const [internalUid, setInternalUid] = createSignal21(
11729
11740
  controlled() ? null : props.initialUid ?? customerUidFromUrl()
11730
11741
  );
11731
11742
  const uid = () => props.activeUid !== void 0 ? props.activeUid : internalUid();
@@ -11913,13 +11924,13 @@ function RecurringRevenue(props) {
11913
11924
  }
11914
11925
 
11915
11926
  // src/pages/admin/Payments.tsx
11916
- import { createResource as createResource14, createSignal as createSignal22, For as For25, Show as Show38 } from "solid-js";
11927
+ import { createResource as createResource14, createSignal as createSignal23, For as For25, Show as Show38 } from "solid-js";
11917
11928
 
11918
11929
  // src/pages/admin/QuickBooksCard.tsx
11919
- import { createResource as createResource13, createSignal as createSignal21, Show as Show37, onMount as onMount2 } from "solid-js";
11930
+ import { createResource as createResource13, createSignal as createSignal22, Show as Show37, onMount as onMount2 } from "solid-js";
11920
11931
  function QuickBooksCard() {
11921
11932
  const [status, { refetch }] = createResource13(() => adminApi.quickbooksStatus().catch(() => null));
11922
- const [connecting, setConnecting] = createSignal21(false);
11933
+ const [connecting, setConnecting] = createSignal22(false);
11923
11934
  onMount2(() => {
11924
11935
  const params = new URLSearchParams(window.location.search);
11925
11936
  const result = params.get("quickbooks");
@@ -11980,7 +11991,7 @@ function QuickBooksCard() {
11980
11991
  // src/pages/admin/Payments.tsx
11981
11992
  function Payments() {
11982
11993
  const nav = useAdminNav();
11983
- const [refreshKey, setRefreshKey] = createSignal22(0);
11994
+ const [refreshKey, setRefreshKey] = createSignal23(0);
11984
11995
  const [payments] = createResource14(refreshKey, async () => {
11985
11996
  try {
11986
11997
  const res = await adminApi.getPayments({ limit: 50 });
@@ -11989,8 +12000,8 @@ function Payments() {
11989
12000
  return [];
11990
12001
  }
11991
12002
  });
11992
- const [refundFor, setRefundFor] = createSignal22(null);
11993
- const [loadingRefund, setLoadingRefund] = createSignal22(null);
12003
+ const [refundFor, setRefundFor] = createSignal23(null);
12004
+ const [loadingRefund, setLoadingRefund] = createSignal23(null);
11994
12005
  const openRefund = async (payment) => {
11995
12006
  setLoadingRefund(payment.id);
11996
12007
  let liveSubs = [];
@@ -12133,7 +12144,7 @@ function Payments() {
12133
12144
  }
12134
12145
 
12135
12146
  // src/pages/admin/Products.tsx
12136
- import { createEffect as createEffect12, createMemo as createMemo15, createResource as createResource15, createSignal as createSignal27, For as For31, on as on7, Show as Show44, untrack as untrack2 } from "solid-js";
12147
+ import { createEffect as createEffect12, createMemo as createMemo15, createResource as createResource15, createSignal as createSignal28, For as For31, on as on7, Show as Show44, untrack as untrack2 } from "solid-js";
12137
12148
 
12138
12149
  // src/pages/admin/_apexDrugs.ts
12139
12150
  var TTL_MS = 5 * 60 * 1e3;
@@ -12161,7 +12172,7 @@ function clearApexDrugCache() {
12161
12172
  }
12162
12173
 
12163
12174
  // src/pages/admin/ProductCellEditors.tsx
12164
- import { createEffect as createEffect8, createMemo as createMemo11, createSignal as createSignal23, For as For26, onCleanup as onCleanup2, Show as Show39 } from "solid-js";
12175
+ import { createEffect as createEffect8, createMemo as createMemo11, createSignal as createSignal24, For as For26, onCleanup as onCleanup2, Show as Show39 } from "solid-js";
12165
12176
  import { Portal } from "solid-js/web";
12166
12177
  var SLUG_RE2 = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
12167
12178
  function slugify2(value) {
@@ -12172,7 +12183,7 @@ function CellPopover(props) {
12172
12183
  const opener = props.anchor;
12173
12184
  const resolveAnchor = props.resolveAnchor;
12174
12185
  const anchor = () => opener.isConnected ? opener : resolveAnchor?.() ?? opener;
12175
- const [pos, setPos] = createSignal23({ top: 0, left: 0 });
12186
+ const [pos, setPos] = createSignal24({ top: 0, left: 0 });
12176
12187
  const place = () => {
12177
12188
  const r = anchor().getBoundingClientRect();
12178
12189
  const w = card?.offsetWidth ?? 300;
@@ -12234,7 +12245,7 @@ var parseMoney = (s) => {
12234
12245
  return Number.isFinite(n) && n >= 0 ? n : "invalid";
12235
12246
  };
12236
12247
  function PricePopover(props) {
12237
- const [base, setBase] = createSignal23(props.product.price != null ? String(props.product.price) : "");
12248
+ const [base, setBase] = createSignal24(props.product.price != null ? String(props.product.price) : "");
12238
12249
  const catalogRows = () => props.product.catalogOverlay ? buildStrengthRows(props.product, null).filter((r) => r.active) : null;
12239
12250
  const perDose = () => props.product.pricingMode !== "flat_fee" && (catalogRows() ? catalogRows().length > 0 : (props.drug?.dosages?.length ?? 0) !== 1);
12240
12251
  const initialRows = () => {
@@ -12244,9 +12255,9 @@ function PricePopover(props) {
12244
12255
  if (existing.length > 0) return existing.map((dp) => ({ dosage: dp.dosage, price: dp.price != null ? String(dp.price) : "" }));
12245
12256
  return (props.drug?.dosages ?? []).map((d) => ({ dosage: d, price: "" }));
12246
12257
  };
12247
- const [rows, setRows] = createSignal23(initialRows());
12248
- const [error, setError] = createSignal23("");
12249
- const [saving, setSaving] = createSignal23(false);
12258
+ const [rows, setRows] = createSignal24(initialRows());
12259
+ const [error, setError] = createSignal24("");
12260
+ const [saving, setSaving] = createSignal24(false);
12250
12261
  const save = async () => {
12251
12262
  const b = parseMoney(base());
12252
12263
  if (b === "invalid") return setError("Enter a price of 0 or more.");
@@ -12355,11 +12366,11 @@ function PricePopover(props) {
12355
12366
  </CellPopover>;
12356
12367
  }
12357
12368
  function CategoriesPopover(props) {
12358
- const [selected, setSelected] = createSignal23(props.product.categories ?? []);
12359
- const [pending, setPending] = createSignal23(null);
12360
- const [newName, setNewName] = createSignal23("");
12361
- const [error, setError] = createSignal23("");
12362
- const [creating, setCreating] = createSignal23(false);
12369
+ const [selected, setSelected] = createSignal24(props.product.categories ?? []);
12370
+ const [pending, setPending] = createSignal24(null);
12371
+ const [newName, setNewName] = createSignal24("");
12372
+ const [error, setError] = createSignal24("");
12373
+ const [creating, setCreating] = createSignal24(false);
12363
12374
  const known = createMemo11(() => new Set(props.categories.map((c) => c.id)));
12364
12375
  const toggle = async (id) => {
12365
12376
  const next = selected().includes(id) ? selected().filter((x) => x !== id) : [...selected(), id];
@@ -12456,10 +12467,10 @@ function CategoriesPopover(props) {
12456
12467
  }
12457
12468
 
12458
12469
  // src/pages/admin/ProductCatalogSections.tsx
12459
- import { createMemo as createMemo13, createSignal as createSignal25, For as For28, onMount as onMount3, Show as Show41 } from "solid-js";
12470
+ import { createMemo as createMemo13, createSignal as createSignal26, For as For28, onMount as onMount3, Show as Show41 } from "solid-js";
12460
12471
 
12461
12472
  // src/pages/admin/ProductPharmacies.tsx
12462
- import { createEffect as createEffect9, createMemo as createMemo12, createSignal as createSignal24, For as For27, Index, Match as Match2, onCleanup as onCleanup3, Show as Show40, Switch as Switch2 } from "solid-js";
12473
+ import { createEffect as createEffect9, createMemo as createMemo12, createSignal as createSignal25, For as For27, Index, Match as Match2, onCleanup as onCleanup3, Show as Show40, Switch as Switch2 } from "solid-js";
12463
12474
  var hint2 = { "font-size": "0.6875rem", color: "var(--app-admin-fg-muted)", margin: "0 0 0.625rem", "line-height": 1.4 };
12464
12475
  var UNSAVED_HINT = "Save or discard your changes first.";
12465
12476
  function AddPharmacyButton(props) {
@@ -12476,7 +12487,7 @@ function AddPharmacyButton(props) {
12476
12487
  }
12477
12488
  function AddPharmacyPicker(props) {
12478
12489
  const flow = props.flow;
12479
- const [filter, setFilter] = createSignal24("");
12490
+ const [filter, setFilter] = createSignal25("");
12480
12491
  const groups = createMemo12(() => {
12481
12492
  const q = filter().trim().toLowerCase();
12482
12493
  return groupDrugsByPharmacy(flow.drugs(), props.excludedPharmacyIds).map((g) => ({ ...g, drugs: q ? g.drugs.filter((d) => `${d.name} ${g.pharmacyName}`.toLowerCase().includes(q)) : g.drugs })).filter((g) => g.drugs.length > 0);
@@ -13011,10 +13022,10 @@ function StrengthsSection(props) {
13011
13022
  const resolved = createMemo13(() => resolveStrengthPrices(ed.rows(), ed.priceDrafts(), props.basePrice, props.flatFee));
13012
13023
  const invalid = createMemo13(() => new Set(invalidDraftKeys(ed.priceDrafts())));
13013
13024
  const clinical = () => ed.item()?.doseModel === "clinical";
13014
- const [label3, setLabel] = createSignal25("");
13015
- const [value, setValue] = createSignal25("");
13016
- const [unit, setUnit] = createSignal25("");
13017
- const [price, setPrice] = createSignal25("");
13025
+ const [label3, setLabel] = createSignal26("");
13026
+ const [value, setValue] = createSignal26("");
13027
+ const [unit, setUnit] = createSignal26("");
13028
+ const [price, setPrice] = createSignal26("");
13018
13029
  const submitAdd = async (e) => {
13019
13030
  e.preventDefault();
13020
13031
  const out = await ed.addStrength({
@@ -13030,7 +13041,7 @@ function StrengthsSection(props) {
13030
13041
  setPrice("");
13031
13042
  }
13032
13043
  };
13033
- const [picked, setPicked] = createSignal25(/* @__PURE__ */ new Set());
13044
+ const [picked, setPicked] = createSignal26(/* @__PURE__ */ new Set());
13034
13045
  const togglePicked = (i) => setPicked((prev) => {
13035
13046
  const next = new Set(prev);
13036
13047
  if (next.has(i)) next.delete(i);
@@ -13607,19 +13618,19 @@ function ReadinessSection(props) {
13607
13618
  </section>;
13608
13619
  }
13609
13620
  function NewCatalogProductDialog(props) {
13610
- const [mode, setMode] = createSignal25("from_drug");
13611
- const [drugs, setDrugs] = createSignal25(null);
13612
- const [drugsError, setDrugsError] = createSignal25("");
13613
- const [filter, setFilter] = createSignal25("");
13614
- const [drugId, setDrugId] = createSignal25("");
13615
- const [name, setName] = createSignal25("");
13616
- const [classification, setClassification] = createSignal25("non-controlled");
13617
- const [doseModel, setDoseModel] = createSignal25("clinical");
13618
- const [description, setDescription] = createSignal25("");
13619
- const [submitting, setSubmitting] = createSignal25(false);
13620
- const [error, setError] = createSignal25("");
13621
- const [pending, setPending] = createSignal25(null);
13622
- const [locked, setLocked] = createSignal25(false);
13621
+ const [mode, setMode] = createSignal26("from_drug");
13622
+ const [drugs, setDrugs] = createSignal26(null);
13623
+ const [drugsError, setDrugsError] = createSignal26("");
13624
+ const [filter, setFilter] = createSignal26("");
13625
+ const [drugId, setDrugId] = createSignal26("");
13626
+ const [name, setName] = createSignal26("");
13627
+ const [classification, setClassification] = createSignal26("non-controlled");
13628
+ const [doseModel, setDoseModel] = createSignal26("clinical");
13629
+ const [description, setDescription] = createSignal26("");
13630
+ const [submitting, setSubmitting] = createSignal26(false);
13631
+ const [error, setError] = createSignal26("");
13632
+ const [pending, setPending] = createSignal26(null);
13633
+ const [locked, setLocked] = createSignal26(false);
13623
13634
  onMount3(async () => {
13624
13635
  try {
13625
13636
  setDrugs((await adminCatalogApi.listDrugs()).drugs ?? []);
@@ -14028,7 +14039,7 @@ function StrengthMatchesSection(props) {
14028
14039
  }
14029
14040
 
14030
14041
  // src/pages/admin/CatalogConversion.tsx
14031
- import { createEffect as createEffect11, createMemo as createMemo14, createSignal as createSignal26, For as For30, Match as Match3, onCleanup as onCleanup4, Show as Show43, Switch as Switch3 } from "solid-js";
14042
+ import { createEffect as createEffect11, createMemo as createMemo14, createSignal as createSignal27, For as For30, Match as Match3, onCleanup as onCleanup4, Show as Show43, Switch as Switch3 } from "solid-js";
14032
14043
  var hint5 = { "font-size": "0.75rem", color: "var(--app-admin-fg-muted)", margin: "0", "line-height": 1.4 };
14033
14044
  var NONE = "__not_carried_over__";
14034
14045
  function Finding2(props) {
@@ -14372,8 +14383,8 @@ function Confirm(props) {
14372
14383
  </div>;
14373
14384
  }
14374
14385
  function UndoSection(props) {
14375
- const [alsoOff, setAlsoOff] = createSignal26(false);
14376
- const [asking, setAsking] = createSignal26(false);
14386
+ const [alsoOff, setAlsoOff] = createSignal27(false);
14387
+ const [asking, setAsking] = createSignal27(false);
14377
14388
  const refusedEdits = () => props.flow.notice()?.code === "edited_since";
14378
14389
  return <section class="app-admin-catalog-block" data-testid="conversion-undo" aria-labelledby="conversion-undo-title">
14379
14390
  <h4 class="app-admin-label" id="conversion-undo-title" style={{ margin: "0 0 0.5rem" }}>
@@ -14522,7 +14533,7 @@ function UndoneReport(props) {
14522
14533
  function CatalogConversionDialog(props) {
14523
14534
  const flow = props.flow;
14524
14535
  const kind = () => flow.state().kind;
14525
- const [introSeen, setIntroSeen] = createSignal26(false);
14536
+ const [introSeen, setIntroSeen] = createSignal27(false);
14526
14537
  createEffect11(() => {
14527
14538
  if (kind() !== "committing" && kind() !== "watching") return;
14528
14539
  const guard = (e) => {
@@ -14769,7 +14780,7 @@ function CatalogConversionDialog(props) {
14769
14780
  </Modal>;
14770
14781
  }
14771
14782
  function CatalogConversionStatusSection(props) {
14772
- const [open, setOpen] = createSignal26(false);
14783
+ const [open, setOpen] = createSignal27(false);
14773
14784
  const flow = useCatalogConversion({
14774
14785
  product: () => props.product,
14775
14786
  enabled: () => !!props.product.catalogOverlay
@@ -14859,9 +14870,9 @@ function isPriced(product, offeredDoses = []) {
14859
14870
  }
14860
14871
  var isHeading = (row) => "heading" in row;
14861
14872
  function ThumbnailUpload(props) {
14862
- const [uploading, setUploading] = createSignal27(false);
14863
- const [localUrl, setLocalUrl] = createSignal27(void 0);
14864
- const [error, setError] = createSignal27("");
14873
+ const [uploading, setUploading] = createSignal28(false);
14874
+ const [localUrl, setLocalUrl] = createSignal28(void 0);
14875
+ const [error, setError] = createSignal28("");
14865
14876
  let fileInput;
14866
14877
  createEffect12(() => {
14867
14878
  void props.product.id;
@@ -15016,19 +15027,19 @@ function SkuSelectOptions(props) {
15016
15027
  </>;
15017
15028
  }
15018
15029
  function ProductEditPanel(props) {
15019
- const [name, setName] = createSignal27("");
15020
- const [description, setDescription] = createSignal27("");
15021
- const [price, setPrice] = createSignal27("");
15022
- const [priceError, setPriceError] = createSignal27("");
15030
+ const [name, setName] = createSignal28("");
15031
+ const [description, setDescription] = createSignal28("");
15032
+ const [price, setPrice] = createSignal28("");
15033
+ const [priceError, setPriceError] = createSignal28("");
15023
15034
  let priceInput;
15024
- const [selectedCategoryIds, setSelectedCategoryIds] = createSignal27([]);
15025
- const [pricingMode, setPricingMode] = createSignal27("per_dose");
15026
- const [benefits, setBenefits] = createSignal27("");
15027
- const [dosageOverride, setDosageOverride] = createSignal27("");
15028
- const [dosagePrices, setDosagePrices] = createSignal27([]);
15029
- const [featured, setFeatured] = createSignal27(false);
15030
- const [prescriberPicks, setPrescriberPicks] = createSignal27(false);
15031
- const [productSkuId, setProductSkuId] = createSignal27("");
15035
+ const [selectedCategoryIds, setSelectedCategoryIds] = createSignal28([]);
15036
+ const [pricingMode, setPricingMode] = createSignal28("per_dose");
15037
+ const [benefits, setBenefits] = createSignal28("");
15038
+ const [dosageOverride, setDosageOverride] = createSignal28("");
15039
+ const [dosagePrices, setDosagePrices] = createSignal28([]);
15040
+ const [featured, setFeatured] = createSignal28(false);
15041
+ const [prescriberPicks, setPrescriberPicks] = createSignal28(false);
15042
+ const [productSkuId, setProductSkuId] = createSignal28("");
15032
15043
  const isCatalog = () => !!props.product.catalogOverlay;
15033
15044
  const isPrescribed = () => !!props.product.prescribed || !!props.product.apexDrugId;
15034
15045
  const handleAdded = (added) => props.onPharmacyAdded?.(added);
@@ -15116,7 +15127,7 @@ function ProductEditPanel(props) {
15116
15127
  }
15117
15128
  };
15118
15129
  props.onDirtyProbe?.(() => buildUpdates() !== null);
15119
- const [pristine, setPristine] = createSignal27("null");
15130
+ const [pristine, setPristine] = createSignal28("null");
15120
15131
  createEffect12(
15121
15132
  on7(
15122
15133
  [() => props.product, () => props.apexDrug, () => props.apexLoading],
@@ -15815,17 +15826,17 @@ function ProductEditPanel(props) {
15815
15826
  </div>;
15816
15827
  }
15817
15828
  function Products(props) {
15818
- const [refreshKey, setRefreshKey] = createSignal27(0);
15819
- const [editingProduct, setEditingProduct] = createSignal27(null);
15820
- const [saving, setSaving] = createSignal27(false);
15821
- const [pending, setPending] = createSignal27(/* @__PURE__ */ new Set());
15829
+ const [refreshKey, setRefreshKey] = createSignal28(0);
15830
+ const [editingProduct, setEditingProduct] = createSignal28(null);
15831
+ const [saving, setSaving] = createSignal28(false);
15832
+ const [pending, setPending] = createSignal28(/* @__PURE__ */ new Set());
15822
15833
  const setRowPending = (id, on10) => setPending((prev) => {
15823
15834
  const next = new Set(prev);
15824
15835
  if (on10) next.add(id);
15825
15836
  else next.delete(id);
15826
15837
  return next;
15827
15838
  });
15828
- const [opening, setOpening] = createSignal27(null);
15839
+ const [opening, setOpening] = createSignal28(null);
15829
15840
  const [drugs, { refetch: refetchDrugs }] = createResource15(loadApexDrugs);
15830
15841
  const [products] = createResource15(refreshKey, async () => {
15831
15842
  try {
@@ -15844,7 +15855,7 @@ function Products(props) {
15844
15855
  }
15845
15856
  });
15846
15857
  const refresh = () => setRefreshKey((k) => k + 1);
15847
- const [creating, setCreating] = createSignal27(false);
15858
+ const [creating, setCreating] = createSignal28(false);
15848
15859
  const reloadApexList = () => {
15849
15860
  clearApexDrugCache();
15850
15861
  void refetchDrugs();
@@ -15979,7 +15990,7 @@ function Products(props) {
15979
15990
  }
15980
15991
  void handleOpen(entry);
15981
15992
  };
15982
- const [checked, setChecked] = createSignal27(/* @__PURE__ */ new Set());
15993
+ const [checked, setChecked] = createSignal28(/* @__PURE__ */ new Set());
15983
15994
  const isChecked = (entry) => checked().has(entry.drugId);
15984
15995
  const setCheckedFor = (ids, on10) => setChecked((prev) => {
15985
15996
  const next = new Set(prev);
@@ -15993,7 +16004,7 @@ function Products(props) {
15993
16004
  });
15994
16005
  const availableChecked = () => grouped().available.filter(isChecked);
15995
16006
  const storeChecked = () => grouped().store.filter(isChecked);
15996
- const [bulkNotice, setBulkNotice] = createSignal27(null);
16007
+ const [bulkNotice, setBulkNotice] = createSignal28(null);
15997
16008
  const setActive = async (entry, active) => {
15998
16009
  if (!entry.product) return false;
15999
16010
  setRowPending(entry.drugId, true);
@@ -16059,7 +16070,7 @@ function Products(props) {
16059
16070
  void removeChecked();
16060
16071
  }
16061
16072
  };
16062
- const [cellEditor, setCellEditor] = createSignal27(null);
16073
+ const [cellEditor, setCellEditor] = createSignal28(null);
16063
16074
  const cellEditorState = createMemo15(() => {
16064
16075
  const ed = cellEditor();
16065
16076
  if (!ed) return null;
@@ -16101,7 +16112,7 @@ function Products(props) {
16101
16112
  const loading = () => products() === void 0;
16102
16113
  const categoryById = createMemo15(() => new Map((categories() ?? []).map((c) => [c.id, c])));
16103
16114
  const categoryLabel2 = (id) => categoryById().get(id)?.name ?? id;
16104
- const [query, setQuery] = createSignal27("");
16115
+ const [query, setQuery] = createSignal28("");
16105
16116
  const terms = createMemo15(
16106
16117
  () => query().trim().toLowerCase().split(/\s+/).filter(Boolean)
16107
16118
  );
@@ -16579,7 +16590,7 @@ function Products(props) {
16579
16590
  }
16580
16591
 
16581
16592
  // src/pages/admin/Offers.tsx
16582
- import { createMemo as createMemo16, createResource as createResource16, createSignal as createSignal28, For as For32, onMount as onMount5, Show as Show45 } from "solid-js";
16593
+ import { createMemo as createMemo16, createResource as createResource16, createSignal as createSignal29, For as For32, onMount as onMount5, Show as Show45 } from "solid-js";
16583
16594
 
16584
16595
  // src/pages/admin/funnelShared.ts
16585
16596
  var SEGMENT_KEYS = {
@@ -16667,17 +16678,17 @@ var linkAction = {
16667
16678
  function OfferEditPanel(props) {
16668
16679
  const editing = () => props.offer !== null;
16669
16680
  const initial = props.offer;
16670
- const [name, setName] = createSignal28(initial?.name ?? "");
16671
- const [discountType, setDiscountType] = createSignal28(initial?.discountType ?? "fixed");
16672
- const [discountValueCents, setDiscountValueCents] = createSignal28(initial?.discountValueCents ?? 1e3);
16673
- const [productIds, setProductIds] = createSignal28(initial?.productIds ?? []);
16674
- const [isActive, setIsActive] = createSignal28(initial?.isActive ?? true);
16675
- const [recurringMode, setRecurringMode] = createSignal28(
16681
+ const [name, setName] = createSignal29(initial?.name ?? "");
16682
+ const [discountType, setDiscountType] = createSignal29(initial?.discountType ?? "fixed");
16683
+ const [discountValueCents, setDiscountValueCents] = createSignal29(initial?.discountValueCents ?? 1e3);
16684
+ const [productIds, setProductIds] = createSignal29(initial?.productIds ?? []);
16685
+ const [isActive, setIsActive] = createSignal29(initial?.isActive ?? true);
16686
+ const [recurringMode, setRecurringMode] = createSignal29(
16676
16687
  !initial || initial.recurringIndefinite ? "indefinite" : initial.recurringCharges > 0 ? "finite" : "none"
16677
16688
  );
16678
- const [recurringCharges, setRecurringCharges] = createSignal28(initial?.recurringCharges || 1);
16679
- const [saving, setSaving] = createSignal28(false);
16680
- const [error, setError] = createSignal28(null);
16689
+ const [recurringCharges, setRecurringCharges] = createSignal29(initial?.recurringCharges || 1);
16690
+ const [saving, setSaving] = createSignal29(false);
16691
+ const [error, setError] = createSignal29(null);
16681
16692
  const displayValue = () => discountType() === "fixed" ? (discountValueCents() / 100).toFixed(2) : String(discountValueCents());
16682
16693
  const handleDiscountValueInput = (raw) => {
16683
16694
  const parsed = parseFloat(raw);
@@ -16923,12 +16934,12 @@ function OfferEditPanel(props) {
16923
16934
  }
16924
16935
  function OfferGrants(props) {
16925
16936
  const nav = useAdminNav();
16926
- const [grants, setGrants] = createSignal28(null);
16927
- const [hasMore, setHasMore] = createSignal28(false);
16928
- const [loadError, setLoadError] = createSignal28(null);
16929
- const [busy, setBusy] = createSignal28(null);
16930
- const [email, setEmail] = createSignal28("");
16931
- const [validDays, setValidDays] = createSignal28(DEFAULT_VALID_DAYS);
16937
+ const [grants, setGrants] = createSignal29(null);
16938
+ const [hasMore, setHasMore] = createSignal29(false);
16939
+ const [loadError, setLoadError] = createSignal29(null);
16940
+ const [busy, setBusy] = createSignal29(null);
16941
+ const [email, setEmail] = createSignal29("");
16942
+ const [validDays, setValidDays] = createSignal29(DEFAULT_VALID_DAYS);
16932
16943
  const load = async (reset) => {
16933
16944
  setLoadError(null);
16934
16945
  try {
@@ -17101,11 +17112,11 @@ function OfferGrants(props) {
17101
17112
  </div>;
17102
17113
  }
17103
17114
  function Offers() {
17104
- const [refreshKey, setRefreshKey] = createSignal28(0);
17105
- const [editing, setEditing] = createSignal28(null);
17106
- const [viewingId, setViewingId] = createSignal28(null);
17107
- const [loadError, setLoadError] = createSignal28(null);
17108
- const [archiveError, setArchiveError] = createSignal28(null);
17115
+ const [refreshKey, setRefreshKey] = createSignal29(0);
17116
+ const [editing, setEditing] = createSignal29(null);
17117
+ const [viewingId, setViewingId] = createSignal29(null);
17118
+ const [loadError, setLoadError] = createSignal29(null);
17119
+ const [archiveError, setArchiveError] = createSignal29(null);
17109
17120
  const refresh = () => {
17110
17121
  setArchiveError(null);
17111
17122
  setRefreshKey((k) => k + 1);
@@ -17280,24 +17291,24 @@ function Offers() {
17280
17291
  }
17281
17292
 
17282
17293
  // src/pages/admin/Sales.tsx
17283
- import { createMemo as createMemo17, createResource as createResource17, createSignal as createSignal29, For as For33, Show as Show46 } from "solid-js";
17294
+ import { createMemo as createMemo17, createResource as createResource17, createSignal as createSignal30, For as For33, Show as Show46 } from "solid-js";
17284
17295
  function SaleEditPanel(props) {
17285
17296
  const editing = () => props.sale !== null;
17286
17297
  const initial = props.sale;
17287
- const [name, setName] = createSignal29(initial?.name ?? "");
17288
- const [discountType, setDiscountType] = createSignal29(initial?.discountType ?? "percent");
17289
- const [discountValueCents, setDiscountValueCents] = createSignal29(initial?.discountValueCents ?? 10);
17290
- const [startDate, setStartDate] = createSignal29(isoToDatetimeLocal(initial?.startDate));
17291
- const [endDate, setEndDate] = createSignal29(isoToDatetimeLocal(initial?.endDate));
17292
- const [productIds, setProductIds] = createSignal29(initial?.productIds ?? []);
17293
- const [isExclusive, setIsExclusive] = createSignal29(initial?.isExclusive ?? false);
17294
- const [isActive, setIsActive] = createSignal29(initial?.isActive ?? true);
17295
- const [recurringMode, setRecurringMode] = createSignal29(
17298
+ const [name, setName] = createSignal30(initial?.name ?? "");
17299
+ const [discountType, setDiscountType] = createSignal30(initial?.discountType ?? "percent");
17300
+ const [discountValueCents, setDiscountValueCents] = createSignal30(initial?.discountValueCents ?? 10);
17301
+ const [startDate, setStartDate] = createSignal30(isoToDatetimeLocal(initial?.startDate));
17302
+ const [endDate, setEndDate] = createSignal30(isoToDatetimeLocal(initial?.endDate));
17303
+ const [productIds, setProductIds] = createSignal30(initial?.productIds ?? []);
17304
+ const [isExclusive, setIsExclusive] = createSignal30(initial?.isExclusive ?? false);
17305
+ const [isActive, setIsActive] = createSignal30(initial?.isActive ?? true);
17306
+ const [recurringMode, setRecurringMode] = createSignal30(
17296
17307
  initial?.recurringIndefinite ? "indefinite" : (initial?.recurringCharges ?? 0) > 0 ? "finite" : "none"
17297
17308
  );
17298
- const [recurringCharges, setRecurringCharges] = createSignal29(initial?.recurringCharges ?? 0);
17299
- const [saving, setSaving] = createSignal29(false);
17300
- const [error, setError] = createSignal29(null);
17309
+ const [recurringCharges, setRecurringCharges] = createSignal30(initial?.recurringCharges ?? 0);
17310
+ const [saving, setSaving] = createSignal30(false);
17311
+ const [error, setError] = createSignal30(null);
17301
17312
  const displayValue = () => discountType() === "fixed" ? (discountValueCents() / 100).toFixed(2) : String(discountValueCents());
17302
17313
  const handleDiscountValueInput = (raw) => {
17303
17314
  const parsed = parseFloat(raw);
@@ -17562,8 +17573,8 @@ function SaleEditPanel(props) {
17562
17573
  </div>;
17563
17574
  }
17564
17575
  function Sales() {
17565
- const [refreshKey, setRefreshKey] = createSignal29(0);
17566
- const [editing, setEditing] = createSignal29(null);
17576
+ const [refreshKey, setRefreshKey] = createSignal30(0);
17577
+ const [editing, setEditing] = createSignal30(null);
17567
17578
  const refresh = () => setRefreshKey((k) => k + 1);
17568
17579
  const [sales] = createResource17(refreshKey, async () => {
17569
17580
  try {
@@ -17714,7 +17725,7 @@ function Sales() {
17714
17725
  }
17715
17726
 
17716
17727
  // src/pages/admin/Support.tsx
17717
- import { createResource as createResource20, createSignal as createSignal31, For as For37, onCleanup as onCleanup5, onMount as onMount6, Show as Show50 } from "solid-js";
17728
+ import { createResource as createResource20, createSignal as createSignal32, For as For37, onCleanup as onCleanup5, onMount as onMount6, Show as Show50 } from "solid-js";
17718
17729
 
17719
17730
  // src/pages/admin/support/format.ts
17720
17731
  function customerLabel(thread) {
@@ -18076,7 +18087,7 @@ function SupportQueue(props) {
18076
18087
  }
18077
18088
 
18078
18089
  // src/pages/admin/support/SupportThreadPane.tsx
18079
- import { createEffect as createEffect13, createResource as createResource19, createSignal as createSignal30, For as For36, Show as Show49 } from "solid-js";
18090
+ import { createEffect as createEffect13, createResource as createResource19, createSignal as createSignal31, For as For36, Show as Show49 } from "solid-js";
18080
18091
  var STATUS_ACTIONS = [
18081
18092
  { value: "open", label: "Needs reply" },
18082
18093
  { value: "pending", label: "Awaiting customer" },
@@ -18101,15 +18112,15 @@ var CANNED_REPLIES = [
18101
18112
  }
18102
18113
  ];
18103
18114
  function SupportThreadPane(props) {
18104
- const [reply, setReply] = createSignal30("");
18105
- const [sending, setSending] = createSignal30(false);
18106
- const [error, setError] = createSignal30(null);
18107
- const [pendingFile, setPendingFile] = createSignal30(null);
18108
- const [transferModalOpen, setTransferModalOpen] = createSignal30(false);
18109
- const [transferring, setTransferring] = createSignal30(false);
18110
- const [transferError, setTransferError] = createSignal30(null);
18111
- const [transferBanners, setTransferBanners] = createSignal30([]);
18112
- const [blockedThreadIds, setBlockedThreadIds] = createSignal30(/* @__PURE__ */ new Set());
18115
+ const [reply, setReply] = createSignal31("");
18116
+ const [sending, setSending] = createSignal31(false);
18117
+ const [error, setError] = createSignal31(null);
18118
+ const [pendingFile, setPendingFile] = createSignal31(null);
18119
+ const [transferModalOpen, setTransferModalOpen] = createSignal31(false);
18120
+ const [transferring, setTransferring] = createSignal31(false);
18121
+ const [transferError, setTransferError] = createSignal31(null);
18122
+ const [transferBanners, setTransferBanners] = createSignal31([]);
18123
+ const [blockedThreadIds, setBlockedThreadIds] = createSignal31(/* @__PURE__ */ new Set());
18113
18124
  let replyBox;
18114
18125
  const [detail, { refetch: refetchDetail, mutate: mutateDetail }] = createResource19(
18115
18126
  () => props.threadId,
@@ -18300,8 +18311,8 @@ ${body}` : body);
18300
18311
  </svg>;
18301
18312
  const Attachment = (p) => {
18302
18313
  const isImage = () => p.attachment.mimeType.startsWith("image/");
18303
- const [url, setUrl] = createSignal30(null);
18304
- const [failed, setFailed] = createSignal30(false);
18314
+ const [url, setUrl] = createSignal31(null);
18315
+ const [failed, setFailed] = createSignal31(false);
18305
18316
  let retried = false;
18306
18317
  createEffect13(() => {
18307
18318
  if (!isImage() || url()) return;
@@ -18719,16 +18730,16 @@ function threadIdFromUrl() {
18719
18730
  }
18720
18731
  function Support(props = {}) {
18721
18732
  const nav = useAdminNav();
18722
- const [statusFilter, setStatusFilter] = createSignal31("all");
18723
- const [categoryFilter, setCategoryFilter] = createSignal31("all");
18724
- const [selectedId, setSelectedId] = createSignal31(
18733
+ const [statusFilter, setStatusFilter] = createSignal32("all");
18734
+ const [categoryFilter, setCategoryFilter] = createSignal32("all");
18735
+ const [selectedId, setSelectedId] = createSignal32(
18725
18736
  props.initialThreadId ?? threadIdFromUrl()
18726
18737
  );
18727
- const [selectedUserId, setSelectedUserId] = createSignal31(null);
18728
- const [olderPages, setOlderPages] = createSignal31([]);
18729
- const [nextCursor, setNextCursor] = createSignal31();
18730
- const [loadingMore, setLoadingMore] = createSignal31(false);
18731
- const [threadReloadKey, setThreadReloadKey] = createSignal31(0);
18738
+ const [selectedUserId, setSelectedUserId] = createSignal32(null);
18739
+ const [olderPages, setOlderPages] = createSignal32([]);
18740
+ const [nextCursor, setNextCursor] = createSignal32();
18741
+ const [loadingMore, setLoadingMore] = createSignal32(false);
18742
+ const [threadReloadKey, setThreadReloadKey] = createSignal32(0);
18732
18743
  const [stats, { refetch: refetchStats }] = createResource20(async () => {
18733
18744
  try {
18734
18745
  return await adminApi.getSupportStats();
@@ -18912,9 +18923,9 @@ function Support(props = {}) {
18912
18923
  }
18913
18924
 
18914
18925
  // src/pages/admin/Webhooks.tsx
18915
- import { createResource as createResource21, createSignal as createSignal32, For as For38, Show as Show51 } from "solid-js";
18926
+ import { createResource as createResource21, createSignal as createSignal33, For as For38, Show as Show51 } from "solid-js";
18916
18927
  function Webhooks() {
18917
- const [expanded, setExpanded] = createSignal32(null);
18928
+ const [expanded, setExpanded] = createSignal33(null);
18918
18929
  const [webhooks] = createResource21(async () => {
18919
18930
  try {
18920
18931
  const res = await adminApi.getWebhookEvents({ limit: 50 });
@@ -19007,13 +19018,13 @@ function Webhooks() {
19007
19018
  }
19008
19019
 
19009
19020
  // src/pages/admin/EmailTemplates.tsx
19010
- import { createEffect as createEffect15, createSignal as createSignal35, createResource as createResource22, For as For41, Show as Show54 } from "solid-js";
19021
+ import { createEffect as createEffect15, createSignal as createSignal36, createResource as createResource22, For as For41, Show as Show54 } from "solid-js";
19011
19022
 
19012
19023
  // src/pages/admin/EmailTextEditor.tsx
19013
- import { createSignal as createSignal34, For as For40, Show as Show53 } from "solid-js";
19024
+ import { createSignal as createSignal35, For as For40, Show as Show53 } from "solid-js";
19014
19025
 
19015
19026
  // src/pages/admin/EmailBodyEditor.tsx
19016
- import { createEffect as createEffect14, createSignal as createSignal33, For as For39, on as on8, onCleanup as onCleanup6, onMount as onMount7, Show as Show52 } from "solid-js";
19027
+ import { createEffect as createEffect14, createSignal as createSignal34, For as For39, on as on8, onCleanup as onCleanup6, onMount as onMount7, Show as Show52 } from "solid-js";
19017
19028
  import { Editor } from "@tiptap/core";
19018
19029
 
19019
19030
  // src/pages/admin/emailBodyExtensions.ts
@@ -19219,10 +19230,10 @@ var CUSTOM_TARGET = "__custom__";
19219
19230
  var placeholderKey = (list) => list.map((p) => p.token).join("|");
19220
19231
  function EmailBodyEditor(props) {
19221
19232
  let surface;
19222
- const [editor, setEditor] = createSignal33(null);
19223
- const [tick, setTick] = createSignal33(0);
19224
- const [dialog, setDialog] = createSignal33(null);
19225
- const [menuOpen, setMenuOpen] = createSignal33(false);
19233
+ const [editor, setEditor] = createSignal34(null);
19234
+ const [tick, setTick] = createSignal34(0);
19235
+ const [dialog, setDialog] = createSignal34(null);
19236
+ const [menuOpen, setMenuOpen] = createSignal34(false);
19226
19237
  let shown = null;
19227
19238
  let shownPlaceholders = "";
19228
19239
  const lookup = (token) => props.placeholders.find((p) => p.token === token);
@@ -19575,7 +19586,7 @@ function EmailBodyEditor(props) {
19575
19586
  // src/pages/admin/EmailTextEditor.tsx
19576
19587
  var TEMPLATE_LIMITS = { subject: 200, body: 2e4 };
19577
19588
  function TemplateTextEditor(props) {
19578
- const [target, setTarget] = createSignal34("body");
19589
+ const [target, setTarget] = createSignal35("body");
19579
19590
  let subjectEl;
19580
19591
  let body;
19581
19592
  const fitsSubject = (p) => (p.kind ?? "text") === "text";
@@ -19729,10 +19740,10 @@ function toInput(t) {
19729
19740
  };
19730
19741
  }
19731
19742
  function EmailTemplates(props = {}) {
19732
- const [refreshKey, setRefreshKey] = createSignal35(0);
19733
- const [placeholders, setPlaceholders] = createSignal35({});
19734
- const [customTemplates, setCustomTemplates] = createSignal35([]);
19735
- const [customPlaceholders, setCustomPlaceholders] = createSignal35([]);
19743
+ const [refreshKey, setRefreshKey] = createSignal36(0);
19744
+ const [placeholders, setPlaceholders] = createSignal36({});
19745
+ const [customTemplates, setCustomTemplates] = createSignal36([]);
19746
+ const [customPlaceholders, setCustomPlaceholders] = createSignal36([]);
19736
19747
  let adoptServerCopy = false;
19737
19748
  const [templates] = createResource22(refreshKey, async () => {
19738
19749
  try {
@@ -19765,16 +19776,16 @@ function EmailTemplates(props = {}) {
19765
19776
  if (other.length > 0) groups.push({ label: "Other", keys: other });
19766
19777
  return groups;
19767
19778
  };
19768
- const [selection, setSelection] = createSignal35(
19779
+ const [selection, setSelection] = createSignal36(
19769
19780
  props.initialCustomTemplateId ? { kind: "custom", id: props.initialCustomTemplateId } : { kind: "fixed", key: "" }
19770
19781
  );
19771
- const [draft, setDraft] = createSignal35(null);
19772
- const [customDraft, setCustomDraft] = createSignal35(null);
19773
- const [saving, setSaving] = createSignal35(false);
19774
- const [resetting, setResetting] = createSignal35(false);
19775
- const [deleting, setDeleting] = createSignal35(false);
19776
- const [sendingTest, setSendingTest] = createSignal35(false);
19777
- const [collapsed, setCollapsed] = createSignal35({});
19782
+ const [draft, setDraft] = createSignal36(null);
19783
+ const [customDraft, setCustomDraft] = createSignal36(null);
19784
+ const [saving, setSaving] = createSignal36(false);
19785
+ const [resetting, setResetting] = createSignal36(false);
19786
+ const [deleting, setDeleting] = createSignal36(false);
19787
+ const [sendingTest, setSendingTest] = createSignal36(false);
19788
+ const [collapsed, setCollapsed] = createSignal36({});
19778
19789
  const toggleCategory = (label3) => setCollapsed((c) => ({ ...c, [label3]: !c[label3] }));
19779
19790
  const activeKey = () => {
19780
19791
  const s = selection();
@@ -20212,10 +20223,10 @@ function EmailTemplates(props = {}) {
20212
20223
  }
20213
20224
 
20214
20225
  // src/pages/admin/Funnel.tsx
20215
- import { createResource as createResource24, createSignal as createSignal37, For as For43, Show as Show56 } from "solid-js";
20226
+ import { createResource as createResource24, createSignal as createSignal38, For as For43, Show as Show56 } from "solid-js";
20216
20227
 
20217
20228
  // src/pages/admin/Sequences.tsx
20218
- import { createResource as createResource23, createSignal as createSignal36, For as For42, Index as Index2, Match as Match4, Show as Show55, Switch as Switch4 } from "solid-js";
20229
+ import { createResource as createResource23, createSignal as createSignal37, For as For42, Index as Index2, Match as Match4, Show as Show55, Switch as Switch4 } from "solid-js";
20219
20230
  var FALLBACK_LINKS = ["members", "resume_survey", "home", "none"];
20220
20231
  var EMPTY_STEP = { waitHours: 24, templateId: "", link: "members" };
20221
20232
  function blankSequence() {
@@ -20239,7 +20250,7 @@ var label = { "font-size": "0.8125rem", color: "var(--app-admin-fg-muted)" };
20239
20250
  var field = { display: "grid", gap: "0.25rem" };
20240
20251
  function SequenceQueue(props) {
20241
20252
  const nav = useAdminNav();
20242
- const [busy, setBusy] = createSignal36(null);
20253
+ const [busy, setBusy] = createSignal37(null);
20243
20254
  const rows = () => props.rows ?? [];
20244
20255
  const refetch = () => props.refetch();
20245
20256
  const act = async (row, action) => {
@@ -20354,8 +20365,8 @@ function withOfferFields(s) {
20354
20365
  }
20355
20366
  function AddToSequence(props) {
20356
20367
  const [sequences] = createResource23(() => apiFetch("/admin/funnel/sequences"));
20357
- const [target, setTarget] = createSignal36("");
20358
- const [busy, setBusy] = createSignal36(false);
20368
+ const [target, setTarget] = createSignal37("");
20369
+ const [busy, setBusy] = createSignal37(false);
20359
20370
  const add = async () => {
20360
20371
  if (!target() || props.people.length === 0) return;
20361
20372
  setBusy(true);
@@ -20448,9 +20459,9 @@ var checkboxRow = { "font-size": "0.8125rem", display: "flex", gap: "0.5rem", "a
20448
20459
  function SequenceEditor(props) {
20449
20460
  const nav = useAdminNav();
20450
20461
  const baseline = () => withOfferFields(props.initial);
20451
- const [draft, setDraft] = createSignal36(JSON.parse(JSON.stringify(baseline())));
20452
- const [saving, setSaving] = createSignal36(false);
20453
- const [error, setError] = createSignal36(null);
20462
+ const [draft, setDraft] = createSignal37(JSON.parse(JSON.stringify(baseline())));
20463
+ const [saving, setSaving] = createSignal37(false);
20464
+ const [error, setError] = createSignal37(null);
20454
20465
  const isNew = () => !draft().id;
20455
20466
  const dirty = () => JSON.stringify(draft()) !== JSON.stringify(baseline());
20456
20467
  const [enrollments, { refetch: refetchEnrollments }] = createResource23(
@@ -20462,7 +20473,7 @@ function SequenceEditor(props) {
20462
20473
  () => apiFetch("/admin/funnel/queue")
20463
20474
  );
20464
20475
  const dueRows = () => queue() ? queue().due.filter((r) => r.sequenceId === props.initial.id) : void 0;
20465
- const [tab, setTab] = createSignal36(isNew() ? "settings" : "queue");
20476
+ const [tab, setTab] = createSignal37(isNew() ? "settings" : "queue");
20466
20477
  const tabKeys = () => isNew() ? ["steps", "settings"] : ["queue", "steps", "people", "settings"];
20467
20478
  const TAB_LABEL = { queue: "Queue", steps: "Steps", people: "People", settings: "Settings" };
20468
20479
  const tabCount = (key) => key === "queue" ? dueRows()?.length : key === "steps" ? draft().steps.length : key === "people" ? enrollments()?.enrollments.length : void 0;
@@ -20807,7 +20818,7 @@ function SequenceEditor(props) {
20807
20818
  </div>;
20808
20819
  }
20809
20820
  function Sequences() {
20810
- const [reload, setReload] = createSignal36(0);
20821
+ const [reload, setReload] = createSignal37(0);
20811
20822
  const [list, { refetch }] = createResource23(reload, () => apiFetch("/admin/funnel/sequences"));
20812
20823
  const [emailTemplates] = createResource23(() => adminApi.getEmailTemplates());
20813
20824
  const customTemplates = () => emailTemplates()?.customTemplates ?? [];
@@ -20818,7 +20829,7 @@ function Sequences() {
20818
20829
  return [];
20819
20830
  }
20820
20831
  });
20821
- const [editing, setEditing] = createSignal36(null);
20832
+ const [editing, setEditing] = createSignal37(null);
20822
20833
  const [queue, { refetch: refetchQueue }] = createResource23(reload, () => apiFetch("/admin/funnel/queue").catch(() => ({ due: [] })));
20823
20834
  const dueFor = (id) => (queue()?.due ?? []).filter((d) => d.sequenceId === id).length;
20824
20835
  const changed = () => {
@@ -20903,9 +20914,9 @@ function stoppedAt(p) {
20903
20914
  }
20904
20915
  function SegmentSection(props) {
20905
20916
  const nav = useAdminNav();
20906
- const [filter, setFilter] = createSignal37("all");
20907
- const [savingsOnly, setSavingsOnly] = createSignal37(false);
20908
- const [selected, setSelected] = createSignal37({});
20917
+ const [filter, setFilter] = createSignal38("all");
20918
+ const [savingsOnly, setSavingsOnly] = createSignal38(false);
20919
+ const [selected, setSelected] = createSignal38({});
20909
20920
  const [people, { refetch }] = createResource24(
20910
20921
  () => ({ days: props.days, filter: filter(), savings: savingsOnly() }),
20911
20922
  (q) => apiFetch(
@@ -21066,7 +21077,7 @@ function SegmentSection(props) {
21066
21077
  </div>;
21067
21078
  }
21068
21079
  function Funnel() {
21069
- const [days, setDays] = createSignal37(30);
21080
+ const [days, setDays] = createSignal38(30);
21070
21081
  const [summary] = createResource24(
21071
21082
  days,
21072
21083
  (d) => apiFetch(`/admin/funnel/summary?days=${d}`)
@@ -21333,11 +21344,11 @@ function SequenceResults() {
21333
21344
  }
21334
21345
 
21335
21346
  // src/pages/admin/EmailNotifications.tsx
21336
- import { createResource as createResource26, createSignal as createSignal39, For as For45, Show as Show58 } from "solid-js";
21347
+ import { createResource as createResource26, createSignal as createSignal40, For as For45, Show as Show58 } from "solid-js";
21337
21348
 
21338
21349
  // src/pages/admin/supportChannelState.ts
21339
- import { createSignal as createSignal38 } from "solid-js";
21340
- var [supportChannelMode, setSupportChannelMode] = createSignal38(null);
21350
+ import { createSignal as createSignal39 } from "solid-js";
21351
+ var [supportChannelMode, setSupportChannelMode] = createSignal39(null);
21341
21352
 
21342
21353
  // src/pages/admin/EmailNotifications.tsx
21343
21354
  function humanize2(key) {
@@ -21375,9 +21386,9 @@ function Toggle(props) {
21375
21386
  }
21376
21387
  function NotificationsCard() {
21377
21388
  const [saved, { mutate }] = createResource26(() => adminApi.getEmailNotifications());
21378
- const [draft, setDraft] = createSignal39(null);
21379
- const [newEmail, setNewEmail] = createSignal39("");
21380
- const [saving, setSaving] = createSignal39(false);
21389
+ const [draft, setDraft] = createSignal40(null);
21390
+ const [newEmail, setNewEmail] = createSignal40("");
21391
+ const [saving, setSaving] = createSignal40(false);
21381
21392
  const current2 = () => draft() ?? saved() ?? null;
21382
21393
  const update = (patch) => setDraft({ ...current2(), ...patch });
21383
21394
  const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
@@ -21460,9 +21471,9 @@ function NotificationsCard() {
21460
21471
  }
21461
21472
  function BillingRemindersCard() {
21462
21473
  const [saved, { mutate }] = createResource26(() => adminApi.getBillingReminders());
21463
- const [draft, setDraft] = createSignal39(null);
21464
- const [newDay, setNewDay] = createSignal39("");
21465
- const [saving, setSaving] = createSignal39(false);
21474
+ const [draft, setDraft] = createSignal40(null);
21475
+ const [newDay, setNewDay] = createSignal40("");
21476
+ const [saving, setSaving] = createSignal40(false);
21466
21477
  const current2 = () => draft() ?? saved() ?? null;
21467
21478
  const update = (patch) => setDraft({ ...current2(), ...patch });
21468
21479
  const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
@@ -21549,8 +21560,8 @@ function SupportChannelCard() {
21549
21560
  return null;
21550
21561
  }
21551
21562
  });
21552
- const [draft, setDraft] = createSignal39(null);
21553
- const [saving, setSaving] = createSignal39(false);
21563
+ const [draft, setDraft] = createSignal40(null);
21564
+ const [saving, setSaving] = createSignal40(false);
21554
21565
  const current2 = () => draft() ?? saved() ?? null;
21555
21566
  const update = (patch) => setDraft({ ...current2(), ...patch });
21556
21567
  const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
@@ -21642,7 +21653,7 @@ function EmailNotifications() {
21642
21653
  }
21643
21654
 
21644
21655
  // src/pages/admin/Features.tsx
21645
- import { createResource as createResource27, createSignal as createSignal40, For as For46, Show as Show59 } from "solid-js";
21656
+ import { createResource as createResource27, createSignal as createSignal41, For as For46, Show as Show59 } from "solid-js";
21646
21657
  var muted2 = { "font-size": "0.8125rem", color: "var(--app-admin-fg-muted)" };
21647
21658
  var MAX_NOTE_LENGTH = 1e3;
21648
21659
  function formatDate2(iso) {
@@ -21684,10 +21695,10 @@ function Row(props) {
21684
21695
  }
21685
21696
  function Features() {
21686
21697
  const [data, { mutate }] = createResource27(() => adminApi.getFeatures());
21687
- const [busyKey, setBusyKey] = createSignal40(null);
21688
- const [requesting, setRequesting] = createSignal40(null);
21689
- const [note, setNote] = createSignal40("");
21690
- const [sending, setSending] = createSignal40(false);
21698
+ const [busyKey, setBusyKey] = createSignal41(null);
21699
+ const [requesting, setRequesting] = createSignal41(null);
21700
+ const [note, setNote] = createSignal41("");
21701
+ const [sending, setSending] = createSignal41(false);
21691
21702
  const features = () => data.error ? [] : data()?.features ?? [];
21692
21703
  const selfServe = () => features().filter((f) => f.access === "self_serve");
21693
21704
  const onRequest = () => features().filter((f) => f.access === "request");
@@ -21852,216 +21863,629 @@ function Features() {
21852
21863
  </div>;
21853
21864
  }
21854
21865
 
21855
- // src/pages/AdminDashboard.tsx
21856
- var TAB_LABELS = {
21857
- dashboard: "Dashboard",
21858
- customers: "Customers",
21859
- payments: "Payments",
21860
- subscriptions: "Subscriptions",
21861
- products: "Products",
21862
- categories: "Categories",
21863
- sales: "Sales",
21864
- "promo-codes": "Promo Codes",
21865
- offers: "Offers",
21866
- affiliates: "Affiliates",
21867
- support: "Support",
21868
- webhooks: "Webhooks",
21869
- "email-templates": "Templates",
21870
- "email-notifications": "Notifications",
21871
- funnel: "Funnel",
21872
- sequences: "Sequences",
21873
- "sequence-results": "Results",
21874
- features: "Features"
21875
- };
21876
- var DEFAULT_TOP_TABS = ["dashboard"];
21877
- var DEFAULT_TAB_GROUPS = [
21878
- { label: "Customer Management", tabs: ["customers", "payments", "support"] },
21879
- { label: "Catalog", tabs: ["products", "categories"] },
21880
- // The drip sequences sit with the Funnel tab that feeds them, followed by
21881
- // what those sequences achieved.
21882
- { label: "Marketing", tabs: ["sales", "promo-codes", "offers", "affiliates", "funnel", "sequences", "sequence-results"] },
21883
- // Everything transactional that leaves as email: the copy of each email, and
21884
- // who gets admin copies and the reminder schedule.
21885
- { label: "Email", tabs: ["email-templates", "email-notifications"] },
21886
- { label: "Integrations", tabs: ["webhooks"] },
21887
- // What this site has switched on, and what it can ask for.
21888
- { label: "Settings", tabs: ["features"] }
21889
- ];
21890
- var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
21891
- function AdminDashboard(props) {
21892
- const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
21893
- const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
21894
- const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({ label: g.label, tabs: withoutHidden(filterEnabled(g.tabs, props.enabledTabs)) })).filter((g) => g.tabs.length > 0);
21895
- const orderedTabs = () => [
21896
- ...visibleTopTabs(),
21897
- ...visibleGroups().flatMap((g) => g.tabs)
21898
- ];
21899
- const isTabEnabled = (tab) => orderedTabs().includes(tab);
21900
- const affiliatesEnabled = () => props.enabledTabs ? props.enabledTabs.includes("affiliates") : true;
21901
- const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "dashboard";
21902
- const [internalTab, setInternalTab] = createSignal41(fallbackTab());
21903
- const currentTab = () => props.activeTab ?? internalTab();
21904
- const [drawerOpen, setDrawerOpen] = createSignal41(false);
21905
- createEffect16(() => {
21906
- setAdminToast(props.toast);
21907
- });
21908
- createEffect16(() => {
21909
- const auth = props.auth;
21910
- if (!auth) return;
21911
- if (!auth.isAuthenticated()) {
21912
- auth.onUnauthenticated?.();
21866
+ // src/pages/admin/Admins.tsx
21867
+ import { createResource as createResource28, createSignal as createSignal43, For as For47, Show as Show61 } from "solid-js";
21868
+
21869
+ // src/pages/AcceptAdminInvite.tsx
21870
+ import { createSignal as createSignal42, Show as Show60 } from "solid-js";
21871
+ function queryParam(name) {
21872
+ if (typeof window === "undefined") return "";
21873
+ return new URLSearchParams(window.location.search).get(name) ?? "";
21874
+ }
21875
+ var MIN_PASSWORD_LENGTH = 8;
21876
+ var ADMIN_INVITE_PARAM = "adminInvite";
21877
+ function isAdminInviteLink() {
21878
+ return typeof window !== "undefined" && new URLSearchParams(window.location.search).has(ADMIN_INVITE_PARAM);
21879
+ }
21880
+ function AcceptAdminInvitePage(props) {
21881
+ const token = () => props.token ?? queryParam("token");
21882
+ const email = () => props.email ?? queryParam("email");
21883
+ const [password, setPassword] = createSignal42("");
21884
+ const [confirm2, setConfirm] = createSignal42("");
21885
+ const [submitting, setSubmitting] = createSignal42(false);
21886
+ const [error, setError] = createSignal42(null);
21887
+ const [message, setMessage] = createSignal42(null);
21888
+ async function handleSubmit(e) {
21889
+ e.preventDefault();
21890
+ setError(null);
21891
+ if (!token() || !email()) {
21892
+ setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
21913
21893
  return;
21914
21894
  }
21915
- if (auth.isHydrated() && !auth.isAdmin()) {
21916
- auth.onForbidden?.();
21895
+ if (password().length < MIN_PASSWORD_LENGTH) {
21896
+ setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
21897
+ return;
21917
21898
  }
21918
- });
21919
- const adminAllowed = () => {
21920
- const auth = props.auth;
21921
- if (!auth) return true;
21922
- return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
21923
- };
21924
- createEffect16(() => {
21925
- if (!adminAllowed()) return;
21926
- void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
21927
- });
21928
- });
21929
- const [pendingCustomerUid, setPendingCustomerUid] = createSignal41(null);
21930
- const [pendingThreadId, setPendingThreadId] = createSignal41(null);
21931
- const [pendingTemplateId, setPendingTemplateId] = createSignal41(null);
21932
- const handleTabClick = (tab, opts) => {
21933
- if (!opts?.keepPending) {
21934
- setPendingCustomerUid(null);
21935
- setPendingThreadId(null);
21899
+ if (password() !== confirm2()) {
21900
+ setError("Passwords do not match.");
21901
+ return;
21936
21902
  }
21937
- setInternalTab(tab);
21938
- setDrawerOpen(false);
21939
- props.onTabChange?.(tab);
21940
- };
21941
- const adminNav = {
21942
- selectTab: (tab) => handleTabClick(tab),
21943
- isTabEnabled,
21944
- openCustomer: (uid) => {
21945
- if (props.customers?.onSelectCustomer) {
21946
- props.customers.onSelectCustomer(uid);
21947
- } else {
21948
- setPendingCustomerUid(uid);
21949
- }
21950
- handleTabClick("customers", { keepPending: true });
21951
- },
21952
- openSupportThread: (threadId) => {
21953
- setPendingThreadId(threadId);
21954
- handleTabClick("support", { keepPending: true });
21955
- },
21956
- openEmailTemplate: (templateId) => {
21957
- setPendingTemplateId(templateId);
21958
- handleTabClick("email-templates", { keepPending: true });
21903
+ setSubmitting(true);
21904
+ try {
21905
+ await authApi.acceptAdminInvite({
21906
+ email: email().trim().toLowerCase(),
21907
+ token: token(),
21908
+ password: password()
21909
+ });
21910
+ setMessage("You\u2019re all set. Sign in with this email and your new password.");
21911
+ props.onSuccess?.();
21912
+ } catch (err) {
21913
+ setError(err instanceof Error ? err.message : "Something went wrong");
21914
+ } finally {
21915
+ setSubmitting(false);
21959
21916
  }
21960
- };
21961
- const topOffset = () => props.topOffset ?? "0px";
21962
- const TabButton = (btnProps) => <button
21963
- type="button"
21964
- onClick={() => handleTabClick(btnProps.tab)}
21917
+ }
21918
+ return <div
21919
+ class="app-affiliate-root"
21965
21920
  style={{
21921
+ background: "var(--app-affiliate-bg)",
21922
+ color: "var(--app-affiliate-fg)",
21923
+ "min-height": "100vh",
21966
21924
  display: "flex",
21967
21925
  "align-items": "center",
21968
- gap: "0.75rem",
21969
- padding: "0.625rem 0.75rem",
21970
- "border-radius": "var(--app-admin-radius-sm)",
21971
- "font-size": "0.875rem",
21972
- "font-weight": "500",
21973
- "text-align": "left",
21974
- border: "none",
21975
- cursor: "pointer",
21976
- background: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft)" : "transparent",
21977
- color: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft-fg)" : "var(--app-admin-fg-muted)"
21978
- }}
21979
- >
21980
- <Show60 when={props.tabIcons?.[btnProps.tab]}>
21981
- <span
21982
- class={props.tabIcons[btnProps.tab]}
21983
- style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
21984
- />
21985
- </Show60>
21986
- {TAB_LABELS[btnProps.tab]}
21987
- </button>;
21988
- return <Show60 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
21989
- <AdminNavContext.Provider value={adminNav}>
21990
- {
21991
- /* data-scrollable opts the whole admin out of a host page's smooth-scroll
21992
- library (truemeds runs Lenis), which takes the wheel for the window. The
21993
- shell is a fixed-height box that scrolls inside .app-admin-content, so
21994
- without this the wheel does nothing anywhere in the admin. */
21995
- }
21996
- <div
21997
- class="app-admin-root app-admin-shell"
21998
- data-scrollable
21999
- classList={{ "is-drawer-open": drawerOpen() }}
22000
- style={{
22001
- position: "sticky",
22002
- top: topOffset(),
22003
- height: `calc(100vh - ${topOffset()})`,
22004
- "--app-admin-top-offset": topOffset()
21926
+ "justify-content": "center",
21927
+ padding: "2rem 1rem"
22005
21928
  }}
22006
21929
  >
22007
- <div class="app-admin-shell-header">
22008
- <button
22009
- type="button"
22010
- class="app-admin-shell-menu-trigger"
22011
- onClick={() => setDrawerOpen(true)}
22012
- aria-label="Open admin menu"
22013
- aria-expanded={drawerOpen()}
22014
- >
22015
- <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
22016
- <line x1="3" y1="6" x2="21" y2="6" />
22017
- <line x1="3" y1="12" x2="21" y2="12" />
22018
- <line x1="3" y1="18" x2="21" y2="18" />
22019
- </svg>
22020
- </button>
22021
- <span class="app-admin-shell-header-title">{TAB_LABELS[currentTab()]}</span>
22022
- </div>
22023
21930
  <div
22024
- class="app-admin-backdrop"
22025
- onClick={() => setDrawerOpen(false)}
22026
- aria-hidden="true"
22027
- />
22028
- <aside class="app-admin-sidebar">
22029
- <div style={{ padding: "1.25rem" }}>
22030
- <h2
22031
21931
  style={{
22032
- "font-size": "0.7rem",
22033
- "font-weight": "500",
22034
- color: "var(--app-admin-fg-muted)",
22035
- "text-transform": "uppercase",
22036
- "letter-spacing": "0.08em",
22037
- margin: "0 0 1rem"
21932
+ width: "100%",
21933
+ "max-width": "24rem",
21934
+ background: "var(--app-affiliate-surface)",
21935
+ border: "1px solid var(--app-affiliate-border)",
21936
+ "border-radius": "var(--app-affiliate-radius)",
21937
+ padding: "2rem",
21938
+ display: "flex",
21939
+ "flex-direction": "column",
21940
+ gap: "1.25rem"
22038
21941
  }}
22039
21942
  >
22040
- Admin Panel
22041
- </h2>
22042
- <nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
22043
- <For47 each={visibleTopTabs()}>{(tab) => <TabButton tab={tab} />}</For47>
22044
- <For47 each={visibleGroups()}>
22045
- {(group) => <>
22046
- <h3
21943
+ <h1
22047
21944
  style={{
22048
- "font-size": "0.625rem",
22049
- "font-weight": "600",
22050
- color: "var(--app-admin-fg-muted)",
22051
- "text-transform": "uppercase",
22052
- "letter-spacing": "0.08em",
22053
- margin: "1rem 0 0.375rem",
22054
- padding: "0 0.75rem"
21945
+ "font-family": "var(--app-affiliate-font-display)",
21946
+ margin: 0,
21947
+ "font-size": "1.5rem"
22055
21948
  }}
22056
21949
  >
22057
- {group.label}
22058
- </h3>
22059
- <For47 each={group.tabs}>{(tab) => <TabButton tab={tab} />}</For47>
22060
- </>}
22061
- </For47>
22062
- </nav>
22063
- </div>
22064
- </aside>
21950
+ Accept your admin invite
21951
+ </h1>
21952
+
21953
+ <Show60
21954
+ when={!message()}
21955
+ fallback={<div
21956
+ style={{
21957
+ padding: "0.625rem 0.875rem",
21958
+ background: "var(--app-affiliate-surface-light)",
21959
+ "border-radius": "var(--app-affiliate-radius-sm)",
21960
+ "font-size": "0.875rem"
21961
+ }}
21962
+ >
21963
+ {message()}
21964
+ </div>}
21965
+ >
21966
+ <form
21967
+ onSubmit={handleSubmit}
21968
+ style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
21969
+ >
21970
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
21971
+ <span style={labelStyle()}>Choose a password</span>
21972
+ <input
21973
+ type="password"
21974
+ required
21975
+ value={password()}
21976
+ onInput={(e) => setPassword(e.currentTarget.value)}
21977
+ autocomplete="new-password"
21978
+ style={inputStyle()}
21979
+ />
21980
+ </label>
21981
+
21982
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
21983
+ <span style={labelStyle()}>Confirm password</span>
21984
+ <input
21985
+ type="password"
21986
+ required
21987
+ value={confirm2()}
21988
+ onInput={(e) => setConfirm(e.currentTarget.value)}
21989
+ autocomplete="new-password"
21990
+ style={inputStyle()}
21991
+ />
21992
+ </label>
21993
+
21994
+ <Show60 when={error()}>
21995
+ <div
21996
+ style={{
21997
+ padding: "0.625rem 0.875rem",
21998
+ background: "var(--app-affiliate-danger-bg)",
21999
+ color: "var(--app-affiliate-danger-fg)",
22000
+ "border-radius": "var(--app-affiliate-radius-sm)",
22001
+ "font-size": "0.875rem"
22002
+ }}
22003
+ >
22004
+ {error()}
22005
+ </div>
22006
+ </Show60>
22007
+
22008
+ <button
22009
+ type="submit"
22010
+ disabled={submitting()}
22011
+ style={{
22012
+ padding: "0.75rem 1rem",
22013
+ background: "var(--app-affiliate-primary)",
22014
+ color: "var(--app-affiliate-primary-fg)",
22015
+ border: "none",
22016
+ "border-radius": "var(--app-affiliate-radius-sm)",
22017
+ "font-weight": "600",
22018
+ cursor: submitting() ? "not-allowed" : "pointer",
22019
+ opacity: submitting() ? 0.7 : 1
22020
+ }}
22021
+ >
22022
+ {submitting() ? "Saving\u2026" : "Accept invite"}
22023
+ </button>
22024
+ </form>
22025
+ </Show60>
22026
+ </div>
22027
+ </div>;
22028
+ }
22029
+ function labelStyle() {
22030
+ return {
22031
+ "font-size": "0.75rem",
22032
+ "text-transform": "uppercase",
22033
+ "letter-spacing": "0.05em",
22034
+ color: "var(--app-affiliate-fg-muted)"
22035
+ };
22036
+ }
22037
+ function inputStyle() {
22038
+ return {
22039
+ width: "100%",
22040
+ padding: "0.625rem 0.75rem",
22041
+ background: "var(--app-affiliate-surface-light)",
22042
+ color: "var(--app-affiliate-fg)",
22043
+ border: "1px solid var(--app-affiliate-border)",
22044
+ "border-radius": "var(--app-affiliate-radius-sm)",
22045
+ "font-size": "0.9rem",
22046
+ "font-family": "inherit",
22047
+ "box-sizing": "border-box"
22048
+ };
22049
+ }
22050
+
22051
+ // src/pages/admin/Admins.tsx
22052
+ var ADMIN_ROLE_SUMMARY = {
22053
+ owner: "Everything, including managing admins",
22054
+ support: "Customers, patient records, support, subscriptions and refunds",
22055
+ accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
22056
+ marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
22057
+ };
22058
+ var ROLE_LABEL = {
22059
+ owner: "Owner",
22060
+ support: "Support agent",
22061
+ accounting: "Accounting",
22062
+ marketing: "Marketing"
22063
+ };
22064
+ function defaultAcceptUrl() {
22065
+ if (typeof window === "undefined") return "";
22066
+ return `${window.location.origin}${window.location.pathname}?${ADMIN_INVITE_PARAM}=1`;
22067
+ }
22068
+ function RoleSelect(props) {
22069
+ return <select
22070
+ class="app-admin-input"
22071
+ value={props.value ?? ""}
22072
+ disabled={props.disabled}
22073
+ onChange={(e) => props.onChange(e.currentTarget.value)}
22074
+ >
22075
+ <Show61 when={props.value === null}>
22076
+ <option value="" disabled>
22077
+ Unknown role
22078
+ </option>
22079
+ </Show61>
22080
+ <For47 each={ADMIN_ROLES}>{(r) => <option value={r}>{ROLE_LABEL[r]}</option>}</For47>
22081
+ </select>;
22082
+ }
22083
+ function Admins(props) {
22084
+ const [team, { refetch }] = createResource28(() => adminApi.listAdminTeam());
22085
+ const [email, setEmail] = createSignal43("");
22086
+ const [role, setRole] = createSignal43("marketing");
22087
+ const [inviting, setInviting] = createSignal43(false);
22088
+ const [apexNote, setApexNote] = createSignal43(null);
22089
+ async function run(action, success) {
22090
+ try {
22091
+ await action();
22092
+ toastSuccess(success);
22093
+ } catch (err) {
22094
+ toastError(err instanceof Error ? err.message : "Something went wrong");
22095
+ }
22096
+ await refetch();
22097
+ }
22098
+ async function invite(e) {
22099
+ e.preventDefault();
22100
+ const address = email().trim().toLowerCase();
22101
+ if (!address) return;
22102
+ setInviting(true);
22103
+ setApexNote(null);
22104
+ try {
22105
+ const result = await adminApi.inviteAdmin({
22106
+ email: address,
22107
+ adminRole: role(),
22108
+ acceptUrl: props.acceptInviteUrl ?? defaultAcceptUrl()
22109
+ });
22110
+ if (result.apexInviteRequired) {
22111
+ setApexNote(
22112
+ `${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`
22113
+ );
22114
+ toastSuccess("Role saved for their first sign-in");
22115
+ } else {
22116
+ toastSuccess(`Invite sent to ${address}`);
22117
+ }
22118
+ setEmail("");
22119
+ setRole("marketing");
22120
+ } catch (err) {
22121
+ toastError(err instanceof Error ? err.message : "Failed to send invite");
22122
+ } finally {
22123
+ setInviting(false);
22124
+ await refetch();
22125
+ }
22126
+ }
22127
+ const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
22128
+ const remove = (a) => {
22129
+ if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
22130
+ void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
22131
+ };
22132
+ const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
22133
+ const cancelInvite = (i) => {
22134
+ if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
22135
+ void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
22136
+ };
22137
+ const isMe = (a) => adminMe()?.uid === a.id;
22138
+ return <div>
22139
+ <PageTitle subtitle="Who can use this admin, and what each person can see and do.">Admins</PageTitle>
22140
+
22141
+ <form onSubmit={invite} class="app-admin-card" style={{ padding: "1rem", "margin-bottom": "1.5rem" }}>
22142
+ <div class="app-admin-heading" style={{ "font-size": "1rem", "margin-bottom": "0.75rem" }}>
22143
+ Invite an admin
22144
+ </div>
22145
+ <div style={{ display: "flex", gap: "0.75rem", "flex-wrap": "wrap", "align-items": "flex-end" }}>
22146
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem", flex: "1 1 16rem" }}>
22147
+ <span class="app-admin-label">Email</span>
22148
+ <input
22149
+ class="app-admin-input"
22150
+ type="email"
22151
+ required
22152
+ value={email()}
22153
+ onInput={(e) => setEmail(e.currentTarget.value)}
22154
+ placeholder="name@example.com"
22155
+ />
22156
+ </label>
22157
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
22158
+ <span class="app-admin-label">Role</span>
22159
+ <RoleSelect value={role()} onChange={setRole} />
22160
+ </label>
22161
+ <button type="submit" class="app-admin-btn app-admin-btn-primary" disabled={inviting()}>
22162
+ {inviting() ? "Sending\u2026" : "Send invite"}
22163
+ </button>
22164
+ </div>
22165
+ <div class="app-admin-text-muted" style={{ "font-size": "0.8125rem", "margin-top": "0.5rem" }}>
22166
+ {ROLE_LABEL[role()]}: {ADMIN_ROLE_SUMMARY[role()]}
22167
+ </div>
22168
+ <Show61 when={apexNote()}>
22169
+ <div class="app-admin-card-soft" style={{ padding: "0.625rem 0.875rem", "margin-top": "0.75rem", "font-size": "0.875rem" }}>
22170
+ {apexNote()}
22171
+ </div>
22172
+ </Show61>
22173
+ </form>
22174
+
22175
+ <Show61 when={!team.loading} fallback={<LoadingSpinner />}>
22176
+ <Show61 when={!team.error} fallback={<EmptyState message="Couldn't load the admin team." />}>
22177
+ <table class="app-admin-table">
22178
+ <thead>
22179
+ <tr>
22180
+ <th>Admin</th>
22181
+ <th>Role</th>
22182
+ <th style={{ "text-align": "right" }} />
22183
+ </tr>
22184
+ </thead>
22185
+ <tbody>
22186
+ <For47 each={team()?.admins ?? []}>
22187
+ {(a) => <tr>
22188
+ <td>
22189
+ {a.email}
22190
+ <Show61 when={isMe(a)}>
22191
+ <span class="app-admin-text-muted"> (you)</span>
22192
+ </Show61>
22193
+ </td>
22194
+ <td>
22195
+ <RoleSelect value={a.adminRole} onChange={(r) => void changeRole(a, r)} />
22196
+ </td>
22197
+ <td style={{ "text-align": "right" }}>
22198
+ <button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => remove(a)}>
22199
+ Remove
22200
+ </button>
22201
+ </td>
22202
+ </tr>}
22203
+ </For47>
22204
+ </tbody>
22205
+ </table>
22206
+
22207
+ <Show61 when={(team()?.invites ?? []).length > 0}>
22208
+ <div class="app-admin-heading" style={{ "font-size": "1rem", margin: "1.5rem 0 0.5rem" }}>
22209
+ Pending invites
22210
+ </div>
22211
+ <table class="app-admin-table">
22212
+ <thead>
22213
+ <tr>
22214
+ <th>Email</th>
22215
+ <th>Role when they join</th>
22216
+ <th>Expires</th>
22217
+ <th style={{ "text-align": "right" }} />
22218
+ </tr>
22219
+ </thead>
22220
+ <tbody>
22221
+ <For47 each={team()?.invites ?? []}>
22222
+ {(i) => <tr>
22223
+ <td>{i.email}</td>
22224
+ <td>
22225
+ <RoleSelect value={i.adminRole} onChange={(r) => void changeInviteRole(i, r)} />
22226
+ </td>
22227
+ <td class="app-admin-text-muted">
22228
+ {i.expiresAt ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in"}
22229
+ </td>
22230
+ <td style={{ "text-align": "right" }}>
22231
+ <button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => cancelInvite(i)}>
22232
+ Withdraw
22233
+ </button>
22234
+ </td>
22235
+ </tr>}
22236
+ </For47>
22237
+ </tbody>
22238
+ </table>
22239
+ </Show61>
22240
+ </Show61>
22241
+ </Show61>
22242
+ </div>;
22243
+ }
22244
+
22245
+ // src/pages/AdminDashboard.tsx
22246
+ var TAB_LABELS = {
22247
+ dashboard: "Dashboard",
22248
+ customers: "Customers",
22249
+ payments: "Payments",
22250
+ subscriptions: "Subscriptions",
22251
+ products: "Products",
22252
+ categories: "Categories",
22253
+ sales: "Sales",
22254
+ "promo-codes": "Promo Codes",
22255
+ offers: "Offers",
22256
+ affiliates: "Affiliates",
22257
+ support: "Support",
22258
+ webhooks: "Webhooks",
22259
+ "email-templates": "Templates",
22260
+ "email-notifications": "Notifications",
22261
+ funnel: "Funnel",
22262
+ sequences: "Sequences",
22263
+ "sequence-results": "Results",
22264
+ features: "Features",
22265
+ admins: "Admins"
22266
+ };
22267
+ var TAB_PERMISSION = {
22268
+ dashboard: null,
22269
+ customers: "customers.read",
22270
+ payments: "billing.read",
22271
+ subscriptions: "customers.read",
22272
+ products: "catalog.read",
22273
+ categories: "catalog.read",
22274
+ sales: "promotions.read",
22275
+ "promo-codes": "promotions.read",
22276
+ offers: "promotions.read",
22277
+ affiliates: "affiliates.read",
22278
+ support: "patient.support",
22279
+ webhooks: "patient.support",
22280
+ "email-templates": "emailTemplates.write",
22281
+ funnel: "funnel.read",
22282
+ sequences: "funnel.read",
22283
+ "sequence-results": "funnel.read",
22284
+ "email-notifications": "settings.write",
22285
+ features: "settings.write",
22286
+ admins: "admins.manage"
22287
+ };
22288
+ var roleAllows = (tab) => {
22289
+ const permission = TAB_PERMISSION[tab];
22290
+ if (permission === null) return true;
22291
+ return adminMe() !== void 0 && adminCan(permission);
22292
+ };
22293
+ var DEFAULT_TOP_TABS = ["dashboard"];
22294
+ var DEFAULT_TAB_GROUPS = [
22295
+ { label: "Customer Management", tabs: ["customers", "payments", "support"] },
22296
+ { label: "Catalog", tabs: ["products", "categories"] },
22297
+ // The drip sequences sit with the Funnel tab that feeds them, followed by
22298
+ // what those sequences achieved.
22299
+ { label: "Marketing", tabs: ["sales", "promo-codes", "offers", "affiliates", "funnel", "sequences", "sequence-results"] },
22300
+ // Everything transactional that leaves as email: the copy of each email, and
22301
+ // who gets admin copies and the reminder schedule.
22302
+ { label: "Email", tabs: ["email-templates", "email-notifications"] },
22303
+ { label: "Integrations", tabs: ["webhooks"] },
22304
+ // What this site has switched on, and what it can ask for.
22305
+ { label: "Settings", tabs: ["features", "admins"] }
22306
+ ];
22307
+ var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
22308
+ function AdminDashboard(props) {
22309
+ const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
22310
+ const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
22311
+ const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({ label: g.label, tabs: withoutHidden(filterEnabled(g.tabs, props.enabledTabs)) })).filter((g) => g.tabs.length > 0);
22312
+ const orderedTabs = () => [
22313
+ ...visibleTopTabs(),
22314
+ ...visibleGroups().flatMap((g) => g.tabs)
22315
+ ];
22316
+ const isTabEnabled = (tab) => orderedTabs().includes(tab);
22317
+ const affiliatesEnabled = () => props.enabledTabs ? props.enabledTabs.includes("affiliates") : true;
22318
+ const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "dashboard";
22319
+ const [internalTab, setInternalTab] = createSignal44(fallbackTab());
22320
+ const currentTab = () => props.activeTab ?? internalTab();
22321
+ const [drawerOpen, setDrawerOpen] = createSignal44(false);
22322
+ createEffect16(() => {
22323
+ setAdminToast(props.toast);
22324
+ });
22325
+ const inviteLink = isAdminInviteLink();
22326
+ createEffect16(() => {
22327
+ const auth = props.auth;
22328
+ if (!auth || inviteLink) return;
22329
+ if (!auth.isAuthenticated()) {
22330
+ auth.onUnauthenticated?.();
22331
+ return;
22332
+ }
22333
+ if (auth.isHydrated() && !auth.isAdmin()) {
22334
+ auth.onForbidden?.();
22335
+ }
22336
+ });
22337
+ const adminAllowed = () => {
22338
+ if (inviteLink) return false;
22339
+ const auth = props.auth;
22340
+ if (!auth) return true;
22341
+ return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
22342
+ };
22343
+ createEffect16(() => {
22344
+ if (!adminAllowed()) return;
22345
+ void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
22346
+ });
22347
+ createEffect16(() => {
22348
+ if (!adminAllowed()) return;
22349
+ void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
22350
+ });
22351
+ });
22352
+ const [pendingCustomerUid, setPendingCustomerUid] = createSignal44(null);
22353
+ const [pendingThreadId, setPendingThreadId] = createSignal44(null);
22354
+ const [pendingTemplateId, setPendingTemplateId] = createSignal44(null);
22355
+ const handleTabClick = (tab, opts) => {
22356
+ if (!opts?.keepPending) {
22357
+ setPendingCustomerUid(null);
22358
+ setPendingThreadId(null);
22359
+ }
22360
+ setInternalTab(tab);
22361
+ setDrawerOpen(false);
22362
+ props.onTabChange?.(tab);
22363
+ };
22364
+ const adminNav = {
22365
+ selectTab: (tab) => handleTabClick(tab),
22366
+ isTabEnabled,
22367
+ openCustomer: (uid) => {
22368
+ if (props.customers?.onSelectCustomer) {
22369
+ props.customers.onSelectCustomer(uid);
22370
+ } else {
22371
+ setPendingCustomerUid(uid);
22372
+ }
22373
+ handleTabClick("customers", { keepPending: true });
22374
+ },
22375
+ openSupportThread: (threadId) => {
22376
+ setPendingThreadId(threadId);
22377
+ handleTabClick("support", { keepPending: true });
22378
+ },
22379
+ openEmailTemplate: (templateId) => {
22380
+ setPendingTemplateId(templateId);
22381
+ handleTabClick("email-templates", { keepPending: true });
22382
+ }
22383
+ };
22384
+ const topOffset = () => props.topOffset ?? "0px";
22385
+ const TabButton = (btnProps) => <button
22386
+ type="button"
22387
+ onClick={() => handleTabClick(btnProps.tab)}
22388
+ style={{
22389
+ display: "flex",
22390
+ "align-items": "center",
22391
+ gap: "0.75rem",
22392
+ padding: "0.625rem 0.75rem",
22393
+ "border-radius": "var(--app-admin-radius-sm)",
22394
+ "font-size": "0.875rem",
22395
+ "font-weight": "500",
22396
+ "text-align": "left",
22397
+ border: "none",
22398
+ cursor: "pointer",
22399
+ background: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft)" : "transparent",
22400
+ color: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft-fg)" : "var(--app-admin-fg-muted)"
22401
+ }}
22402
+ >
22403
+ <Show62 when={props.tabIcons?.[btnProps.tab]}>
22404
+ <span
22405
+ class={props.tabIcons[btnProps.tab]}
22406
+ style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
22407
+ />
22408
+ </Show62>
22409
+ {TAB_LABELS[btnProps.tab]}
22410
+ </button>;
22411
+ if (inviteLink) return <AcceptAdminInvitePage />;
22412
+ return <Show62 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
22413
+ <AdminNavContext.Provider value={adminNav}>
22414
+ {
22415
+ /* data-scrollable opts the whole admin out of a host page's smooth-scroll
22416
+ library (truemeds runs Lenis), which takes the wheel for the window. The
22417
+ shell is a fixed-height box that scrolls inside .app-admin-content, so
22418
+ without this the wheel does nothing anywhere in the admin. */
22419
+ }
22420
+ <div
22421
+ class="app-admin-root app-admin-shell"
22422
+ data-scrollable
22423
+ classList={{ "is-drawer-open": drawerOpen() }}
22424
+ style={{
22425
+ position: "sticky",
22426
+ top: topOffset(),
22427
+ height: `calc(100vh - ${topOffset()})`,
22428
+ "--app-admin-top-offset": topOffset()
22429
+ }}
22430
+ >
22431
+ <div class="app-admin-shell-header">
22432
+ <button
22433
+ type="button"
22434
+ class="app-admin-shell-menu-trigger"
22435
+ onClick={() => setDrawerOpen(true)}
22436
+ aria-label="Open admin menu"
22437
+ aria-expanded={drawerOpen()}
22438
+ >
22439
+ <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
22440
+ <line x1="3" y1="6" x2="21" y2="6" />
22441
+ <line x1="3" y1="12" x2="21" y2="12" />
22442
+ <line x1="3" y1="18" x2="21" y2="18" />
22443
+ </svg>
22444
+ </button>
22445
+ <span class="app-admin-shell-header-title">{TAB_LABELS[currentTab()]}</span>
22446
+ </div>
22447
+ <div
22448
+ class="app-admin-backdrop"
22449
+ onClick={() => setDrawerOpen(false)}
22450
+ aria-hidden="true"
22451
+ />
22452
+ <aside class="app-admin-sidebar">
22453
+ <div style={{ padding: "1.25rem" }}>
22454
+ <h2
22455
+ style={{
22456
+ "font-size": "0.7rem",
22457
+ "font-weight": "500",
22458
+ color: "var(--app-admin-fg-muted)",
22459
+ "text-transform": "uppercase",
22460
+ "letter-spacing": "0.08em",
22461
+ margin: "0 0 1rem"
22462
+ }}
22463
+ >
22464
+ Admin Panel
22465
+ </h2>
22466
+ <nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
22467
+ <For48 each={visibleTopTabs()}>{(tab) => <TabButton tab={tab} />}</For48>
22468
+ <For48 each={visibleGroups()}>
22469
+ {(group) => <>
22470
+ <h3
22471
+ style={{
22472
+ "font-size": "0.625rem",
22473
+ "font-weight": "600",
22474
+ color: "var(--app-admin-fg-muted)",
22475
+ "text-transform": "uppercase",
22476
+ "letter-spacing": "0.08em",
22477
+ margin: "1rem 0 0.375rem",
22478
+ padding: "0 0.75rem"
22479
+ }}
22480
+ >
22481
+ {group.label}
22482
+ </h3>
22483
+ <For48 each={group.tabs}>{(tab) => <TabButton tab={tab} />}</For48>
22484
+ </>}
22485
+ </For48>
22486
+ </nav>
22487
+ </div>
22488
+ </aside>
22065
22489
 
22066
22490
  <div class="app-admin-content">
22067
22491
  {
@@ -22070,8 +22494,12 @@ function AdminDashboard(props) {
22070
22494
  (which would wedge the sidebar nav), and switching tabs mounts a fresh
22071
22495
  boundary that clears a prior tab's error. */
22072
22496
  }
22073
- <Show60 when={currentTab()} keyed>
22497
+ <Show62 when={currentTab()} keyed>
22074
22498
  <ErrorBoundary fallback={(err, reset) => <AdminTabError error={err} reset={reset} />}>
22499
+ <Show62
22500
+ when={adminMe() === void 0 || roleAllows(currentTab())}
22501
+ fallback={<RoleForbidden />}
22502
+ >
22075
22503
  <Switch5 fallback={<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />}>
22076
22504
  <Match5 when={currentTab() === "dashboard"}>
22077
22505
  <Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />
@@ -22140,13 +22568,35 @@ function AdminDashboard(props) {
22140
22568
  <Match5 when={currentTab() === "features"}>
22141
22569
  <Features />
22142
22570
  </Match5>
22571
+ <Match5 when={currentTab() === "admins"}>
22572
+ <Admins acceptInviteUrl={props.adminInviteAcceptUrl} />
22573
+ </Match5>
22143
22574
  </Switch5>
22575
+ </Show62>
22144
22576
  </ErrorBoundary>
22145
- </Show60>
22577
+ </Show62>
22578
+ </div>
22579
+ </div>
22580
+ </AdminNavContext.Provider>
22581
+ </Show62>;
22582
+ }
22583
+ function RoleForbidden() {
22584
+ return <div
22585
+ role="alert"
22586
+ style={{
22587
+ margin: "1rem 0",
22588
+ padding: "1.25rem 1.5rem",
22589
+ border: "1px solid var(--app-admin-border)",
22590
+ "border-radius": "var(--app-admin-radius-sm)",
22591
+ background: "var(--app-admin-surface)",
22592
+ color: "var(--app-admin-fg)"
22593
+ }}
22594
+ >
22595
+ <div style={{ "font-weight": "600", "margin-bottom": "0.375rem" }}>Not available for your role</div>
22596
+ <div style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
22597
+ Ask an owner of this site if you need access to this section.
22146
22598
  </div>
22147
- </div>
22148
- </AdminNavContext.Provider>
22149
- </Show60>;
22599
+ </div>;
22150
22600
  }
22151
22601
  function AdminTabError(props) {
22152
22602
  console.error("[AdminDashboard] tab failed to render:", props.error);
@@ -22241,7 +22691,8 @@ var ADMIN_TAB_SEGMENTS = {
22241
22691
  sequences: "sequences",
22242
22692
  "sequence-results": "sequence-results",
22243
22693
  "email-notifications": "email-notifications",
22244
- features: "features"
22694
+ features: "features",
22695
+ admins: "admins"
22245
22696
  };
22246
22697
  var AFFILIATE_SUB_TAB_SEGMENTS = {
22247
22698
  overview: "",
@@ -22289,7 +22740,7 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
22289
22740
  }
22290
22741
 
22291
22742
  // src/pages/admin/PatientDashboardPreview.tsx
22292
- import { Show as Show61, For as For48 } from "solid-js";
22743
+ import { Show as Show63, For as For49 } from "solid-js";
22293
22744
  function PatientDashboardPreview(props) {
22294
22745
  const data = useDashboardData({ authToken: () => props.token });
22295
22746
  return <div
@@ -22331,7 +22782,7 @@ function PatientDashboardPreview(props) {
22331
22782
  /* A failed read is an error with a retry — never presented as an
22332
22783
  empty dashboard (the customer may have plenty of data). */
22333
22784
  }
22334
- <Show61 when={data.error()} keyed>
22785
+ <Show63 when={data.error()} keyed>
22335
22786
  {(msg) => <div
22336
22787
  style={{
22337
22788
  display: "flex",
@@ -22356,10 +22807,10 @@ function PatientDashboardPreview(props) {
22356
22807
  Retry
22357
22808
  </button>
22358
22809
  </div>}
22359
- </Show61>
22810
+ </Show63>
22360
22811
 
22361
- <Show61 when={!data.profile.loading} fallback={<LoadingSpinner />}>
22362
- <Show61
22812
+ <Show63 when={!data.profile.loading} fallback={<LoadingSpinner />}>
22813
+ <Show63
22363
22814
  when={data.profile()}
22364
22815
  fallback={<p style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
22365
22816
  Could not load this customer's dashboard.
@@ -22392,7 +22843,7 @@ function PatientDashboardPreview(props) {
22392
22843
  }
22393
22844
  <div>
22394
22845
  <h3 style={panelSectionHeader}>Subscription</h3>
22395
- <Show61
22846
+ <Show63
22396
22847
  when={data.subscription()}
22397
22848
  fallback={<p
22398
22849
  style={{
@@ -22412,13 +22863,13 @@ function PatientDashboardPreview(props) {
22412
22863
  }}
22413
22864
  >
22414
22865
  <span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
22415
- <Show61 when={sub().amount != null} fallback="Subscription">
22866
+ <Show63 when={sub().amount != null} fallback="Subscription">
22416
22867
  {centsToUsd(sub().amount)}/mo
22417
- </Show61>
22868
+ </Show63>
22418
22869
  </span>
22419
22870
  <StatusBadge status={sub().status} />
22420
22871
  </div>
22421
- <Show61 when={sub().nextBillingDate}>
22872
+ <Show63 when={sub().nextBillingDate}>
22422
22873
  <p
22423
22874
  style={{
22424
22875
  "font-size": "0.75rem",
@@ -22428,15 +22879,15 @@ function PatientDashboardPreview(props) {
22428
22879
  >
22429
22880
  Next charge {fmtDate(sub().nextBillingDate)}
22430
22881
  </p>
22431
- </Show61>
22882
+ </Show63>
22432
22883
  </div>}
22433
- </Show61>
22884
+ </Show63>
22434
22885
  </div>
22435
22886
 
22436
22887
  {
22437
22888
  /* Prescription status */
22438
22889
  }
22439
- <Show61 when={data.rxStatus()}>
22890
+ <Show63 when={data.rxStatus()}>
22440
22891
  {(rx) => <div>
22441
22892
  <h3 style={panelSectionHeader}>Prescription status</h3>
22442
22893
  <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
@@ -22452,7 +22903,7 @@ function PatientDashboardPreview(props) {
22452
22903
  </span>
22453
22904
  <StatusBadge status={rx().status} />
22454
22905
  </div>
22455
- <Show61 when={rx().reason}>
22906
+ <Show63 when={rx().reason}>
22456
22907
  <p
22457
22908
  style={{
22458
22909
  "font-size": "0.75rem",
@@ -22462,17 +22913,17 @@ function PatientDashboardPreview(props) {
22462
22913
  >
22463
22914
  {rx().reason}
22464
22915
  </p>
22465
- </Show61>
22916
+ </Show63>
22466
22917
  </div>
22467
22918
  </div>}
22468
- </Show61>
22919
+ </Show63>
22469
22920
 
22470
22921
  {
22471
22922
  /* Prescription requests */
22472
22923
  }
22473
22924
  <div>
22474
22925
  <h3 style={panelSectionHeader}>Prescription requests</h3>
22475
- <Show61
22926
+ <Show63
22476
22927
  when={(data.rxList() ?? []).length > 0}
22477
22928
  fallback={<p
22478
22929
  style={{
@@ -22484,7 +22935,7 @@ function PatientDashboardPreview(props) {
22484
22935
  </p>}
22485
22936
  >
22486
22937
  <div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
22487
- <For48 each={data.rxList()}>
22938
+ <For49 each={data.rxList()}>
22488
22939
  {(req) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
22489
22940
  <div
22490
22941
  style={{
@@ -22499,7 +22950,7 @@ function PatientDashboardPreview(props) {
22499
22950
  >
22500
22951
  {req.drugName || req.drugId || "Prescription"}
22501
22952
  </span>
22502
- <Show61 when={req.dosage}>
22953
+ <Show63 when={req.dosage}>
22503
22954
  <span
22504
22955
  style={{
22505
22956
  "font-size": "0.75rem",
@@ -22509,7 +22960,7 @@ function PatientDashboardPreview(props) {
22509
22960
  >
22510
22961
  {req.dosage}
22511
22962
  </span>
22512
- </Show61>
22963
+ </Show63>
22513
22964
  </div>
22514
22965
  <StatusBadge status={req.status} />
22515
22966
  </div>
@@ -22520,15 +22971,15 @@ function PatientDashboardPreview(props) {
22520
22971
  "margin-top": "0.25rem"
22521
22972
  }}
22522
22973
  >
22523
- <Show61 when={req.priceCents != null}>
22974
+ <Show63 when={req.priceCents != null}>
22524
22975
  <span>{centsToUsd(req.priceCents)} · </span>
22525
- </Show61>
22976
+ </Show63>
22526
22977
  {fmtDate(req.createdAt)}
22527
22978
  </div>
22528
22979
  </div>}
22529
- </For48>
22980
+ </For49>
22530
22981
  </div>
22531
- </Show61>
22982
+ </Show63>
22532
22983
  </div>
22533
22984
 
22534
22985
  {
@@ -22536,7 +22987,7 @@ function PatientDashboardPreview(props) {
22536
22987
  }
22537
22988
  <div>
22538
22989
  <h3 style={panelSectionHeader}>Pending surveys</h3>
22539
- <Show61
22990
+ <Show63
22540
22991
  when={(data.pendingSurveys() ?? []).length > 0}
22541
22992
  fallback={<p
22542
22993
  style={{
@@ -22548,7 +22999,7 @@ function PatientDashboardPreview(props) {
22548
22999
  </p>}
22549
23000
  >
22550
23001
  <div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
22551
- <For48 each={data.pendingSurveys()}>
23002
+ <For49 each={data.pendingSurveys()}>
22552
23003
  {(survey) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
22553
23004
  <span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
22554
23005
  {survey.drugName || survey.drugId || "Renewal survey"}
@@ -22563,24 +23014,24 @@ function PatientDashboardPreview(props) {
22563
23014
  Cycle {survey.cycleNumber}
22564
23015
  </span>
22565
23016
  </div>}
22566
- </For48>
23017
+ </For49>
22567
23018
  </div>
22568
- </Show61>
23019
+ </Show63>
22569
23020
  </div>
22570
23021
  </>}
22571
- </Show61>
22572
- </Show61>
23022
+ </Show63>
23023
+ </Show63>
22573
23024
  </div>
22574
23025
  </div>
22575
23026
  </div>;
22576
23027
  }
22577
23028
 
22578
23029
  // src/pages/UpdatePaymentMethod.tsx
22579
- import { Show as Show62, createResource as createResource28 } from "solid-js";
23030
+ import { Show as Show64, createResource as createResource29 } from "solid-js";
22580
23031
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
22581
23032
  function UpdatePaymentMethod(props) {
22582
23033
  const { Heading, TextField, Button, Banner, Spinner } = usePrimitives();
22583
- const [resolved] = createResource28(
23034
+ const [resolved] = createResource29(
22584
23035
  () => props.subscriptionId ? null : "fetch",
22585
23036
  async () => {
22586
23037
  try {
@@ -22608,21 +23059,21 @@ function UpdatePaymentMethod(props) {
22608
23059
  Enter a new card for your subscription. Your current card stays active until this succeeds.
22609
23060
  </p>
22610
23061
 
22611
- <Show62 when={resolving()}>
23062
+ <Show64 when={resolving()}>
22612
23063
  <Spinner />
22613
- </Show62>
23064
+ </Show64>
22614
23065
 
22615
- <Show62 when={noSubscription()}>
23066
+ <Show64 when={noSubscription()}>
22616
23067
  <Banner variant="error">We couldn’t find an active subscription to update.</Banner>
22617
- </Show62>
23068
+ </Show64>
22618
23069
 
22619
- <Show62 when={!resolving() && !noSubscription()}>
23070
+ <Show64 when={!resolving() && !noSubscription()}>
22620
23071
  <form onSubmit={handleSubmit}>
22621
- <Show62 when={flow.error()}>
23072
+ <Show64 when={flow.error()}>
22622
23073
  <div style={{ "margin-bottom": "1rem" }}>
22623
23074
  <Banner variant="error">{flow.error()}</Banner>
22624
23075
  </div>
22625
- </Show62>
23076
+ </Show64>
22626
23077
 
22627
23078
  <div style={{ display: "grid", gap: "1rem", "margin-bottom": "1.5rem" }}>
22628
23079
  <TextField
@@ -22678,18 +23129,18 @@ function UpdatePaymentMethod(props) {
22678
23129
  </Button>
22679
23130
  </div>
22680
23131
  </form>
22681
- </Show62>
23132
+ </Show64>
22682
23133
  </div>;
22683
23134
  }
22684
23135
 
22685
23136
  // src/pages/MemberPortal.tsx
22686
- import { Show as Show70, Switch as Switch7, Match as Match7, For as For54, createSignal as createSignal48, onMount as onMount8 } from "solid-js";
23137
+ import { Show as Show72, Switch as Switch7, Match as Match7, For as For55, createSignal as createSignal51, onMount as onMount8 } from "solid-js";
22687
23138
 
22688
23139
  // src/pages/member/OrderTracker.tsx
22689
- import { Show as Show63, For as For49, createSignal as createSignal42 } from "solid-js";
23140
+ import { Show as Show65, For as For50, createSignal as createSignal45 } from "solid-js";
22690
23141
  function TrackingChip(props) {
22691
23142
  let copied;
22692
- const [announce, setAnnounce] = createSignal42("");
23143
+ const [announce, setAnnounce] = createSignal45("");
22693
23144
  const copy = async () => {
22694
23145
  try {
22695
23146
  await navigator.clipboard.writeText(props.number);
@@ -22715,18 +23166,18 @@ function TrackingChip(props) {
22715
23166
  <i class="ph ph-copy ship__copy-icon" aria-hidden="true" />
22716
23167
  <span class="ship__copied" ref={copied}>Copied ✓</span>
22717
23168
  </button>
22718
- <Show63 when={props.url}>
23169
+ <Show65 when={props.url}>
22719
23170
  <a class="ship__track" href={props.url} target="_blank" rel="noopener noreferrer">
22720
23171
  Track{props.carrier ? ` with ${props.carrier}` : ""} ↗
22721
23172
  </a>
22722
- </Show63>
23173
+ </Show65>
22723
23174
  </div>
22724
23175
  <span class="portal-sr-only" role="status" aria-live="polite">{announce()}</span>
22725
23176
  </div>;
22726
23177
  }
22727
23178
  function OrderTracker(props) {
22728
23179
  const refill = () => buildRefillView(props.subscription);
22729
- const RefillStrip = () => <Show63 when={refill()}>
23180
+ const RefillStrip = () => <Show65 when={refill()}>
22730
23181
  {(r) => <div class="refill" data-testid="refill-strip">
22731
23182
  <div class="refill__head">
22732
23183
  <span class="lab-label">Your plan</span>
@@ -22735,15 +23186,15 @@ function OrderTracker(props) {
22735
23186
  awaiting the pharmacy there isn't one, so say what we're waiting
22736
23187
  on instead of counting days against a date we don't have. */
22737
23188
  }
22738
- <Show63
23189
+ <Show65
22739
23190
  when={!r().pendingFill}
22740
23191
  fallback={<span class="refill__cycle">Preparing your next fill</span>}
22741
23192
  >
22742
23193
  <span class="refill__cycle">Day {r().cycleDay} of {r().cycleLength}</span>
22743
- </Show63>
23194
+ </Show65>
22744
23195
  </div>
22745
23196
  <div class="refill__rail" style={{ "--p": String(r().progress) }}>
22746
- <For49 each={r().events}>
23197
+ <For50 each={r().events}>
22747
23198
  {(e) => <div class={`refill__stone${e.nearest ? " is-near" : ""}`}>
22748
23199
  <span class="refill__dot" aria-hidden="true" />
22749
23200
  <span class="lab-label refill__label">{e.label}</span>
@@ -22755,16 +23206,16 @@ function OrderTracker(props) {
22755
23206
  <span class="refill__rel">
22756
23207
  {!r().precise && e.date ? `around ${e.relative}` : e.relative}
22757
23208
  </span>
22758
- <Show63 when={e.key === "survey" ? props.pendingRenewalId : null} keyed>
23209
+ <Show65 when={e.key === "survey" ? props.pendingRenewalId : null} keyed>
22759
23210
  {(rid) => <a href={props.renewHref(rid)} class="refill__action">
22760
23211
  Complete check-in →
22761
23212
  </a>}
22762
- </Show63>
23213
+ </Show65>
22763
23214
  </div>}
22764
- </For49>
23215
+ </For50>
22765
23216
  </div>
22766
23217
  </div>}
22767
- </Show63>;
23218
+ </Show65>;
22768
23219
  const EmptyState2 = () => <div class="tracker">
22769
23220
  <span class="lab-label">Your order</span>
22770
23221
  <RefillStrip />
@@ -22773,17 +23224,17 @@ function OrderTracker(props) {
22773
23224
  <span class="tracker__empty-bead" />
22774
23225
  </div>
22775
23226
  <h2 class="tracker__empty-title">Your journey starts here</h2>
22776
- <Show63 when={props.savingsMember}>
23227
+ <Show65 when={props.savingsMember}>
22777
23228
  <p class="tracker__empty-text" data-testid="tracker-savings-note">
22778
23229
  <strong>Member pricing is active on your account.</strong> It applies automatically when you check out.
22779
23230
  </p>
22780
- </Show63>
22781
- <Show63 when={props.offers?.[0]}>
23231
+ </Show65>
23232
+ <Show65 when={props.offers?.[0]}>
22782
23233
  {(offer) => <p class="tracker__empty-text" data-testid="tracker-offer-note">
22783
23234
  <strong>You have {offerSummaryText(offer())} waiting.</strong> It applies automatically at checkout —
22784
23235
  finish your intake by {offer().deadlineText} to keep it.
22785
23236
  </p>}
22786
- </Show63>
23237
+ </Show65>
22787
23238
  <p class="tracker__empty-text">
22788
23239
  {props.savingsMember ? "Complete a short intake \u2014 about ten minutes \u2014 and a clinician reviews it from there. You\u2019ll watch every step come together right here, from review to delivery." : "Once you complete your intake, you\u2019ll watch every step of your prescription come together right here \u2014 from review to delivery."}
22789
23240
  </p>
@@ -22801,30 +23252,30 @@ function OrderTracker(props) {
22801
23252
  >
22802
23253
  <div class="thread__rail">
22803
23254
  <span class="thread__bead">
22804
- <Show63 when={isActive}><span class="thread__halo" aria-hidden="true" /></Show63>
23255
+ <Show65 when={isActive}><span class="thread__halo" aria-hidden="true" /></Show65>
22805
23256
  </span>
22806
23257
  </div>
22807
23258
  <div class={`thread__content${isActive ? " thread__content--active" : ""}`}>
22808
23259
  <div class="thread__top">
22809
23260
  <span class="lab-label thread__label">{s.label}</span>
22810
- <Show63 when={s.timestamp}>
23261
+ <Show65 when={s.timestamp}>
22811
23262
  <time class="thread__time">{formatStageDate(s.timestamp)}</time>
22812
- </Show63>
23263
+ </Show65>
22813
23264
  </div>
22814
- <Show63 when={s.heroWord}>
23265
+ <Show65 when={s.heroWord}>
22815
23266
  <h2 class="thread__hero">{s.heroWord}</h2>
22816
- </Show63>
22817
- <Show63 when={s.subCaption}>
23267
+ </Show65>
23268
+ <Show65 when={s.subCaption}>
22818
23269
  <p class="thread__caption">{s.subCaption}</p>
22819
- </Show63>
22820
- <Show63 when={s.state === "active" && s.key === "shipped" && sp.view.shipment}>
23270
+ </Show65>
23271
+ <Show65 when={s.state === "active" && s.key === "shipped" && sp.view.shipment}>
22821
23272
  <TrackingChip
22822
23273
  number={sp.view.shipment.trackingNumber}
22823
23274
  carrier={sp.view.shipment.carrier}
22824
23275
  url={sp.view.shipment.trackingUrl}
22825
23276
  eta={sp.view.shipment.etaLabel}
22826
23277
  />
22827
- <Show63 when={props.messagingEnabled}>
23278
+ <Show65 when={props.messagingEnabled}>
22828
23279
  <button
22829
23280
  type="button"
22830
23281
  class="portal-btn portal-btn--ghost thread__action"
@@ -22832,10 +23283,10 @@ function OrderTracker(props) {
22832
23283
  >
22833
23284
  Where's my order?
22834
23285
  </button>
22835
- </Show63>
22836
- </Show63>
22837
- <Show63 when={s.state === "consult"}>
22838
- <Show63
23286
+ </Show65>
23287
+ </Show65>
23288
+ <Show65 when={s.state === "consult"}>
23289
+ <Show65
22839
23290
  when={props.messagingEnabled}
22840
23291
  fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
22841
23292
  Your care team is reviewing your request. You’ll be able to message them here once your consult begins.
@@ -22848,10 +23299,10 @@ function OrderTracker(props) {
22848
23299
  >
22849
23300
  Message your care team
22850
23301
  </button>
22851
- </Show63>
22852
- </Show63>
22853
- <Show63 when={s.state === "denied"}>
22854
- <Show63
23302
+ </Show65>
23303
+ </Show65>
23304
+ <Show65 when={s.state === "denied"}>
23305
+ <Show65
22855
23306
  when={props.messagingEnabled}
22856
23307
  fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
22857
23308
  Your provider will follow up with you about next steps.
@@ -22864,12 +23315,12 @@ function OrderTracker(props) {
22864
23315
  >
22865
23316
  Talk to your provider
22866
23317
  </button>
22867
- </Show63>
22868
- </Show63>
23318
+ </Show65>
23319
+ </Show65>
22869
23320
  </div>
22870
23321
  </li>;
22871
23322
  };
22872
- return <Show63 when={props.request} fallback={<EmptyState2 />}>
23323
+ return <Show65 when={props.request} fallback={<EmptyState2 />}>
22873
23324
  {(rx) => {
22874
23325
  const view = buildTrackerView(rx());
22875
23326
  return <div class="tracker" data-testid="order-tracker">
@@ -22877,7 +23328,7 @@ function OrderTracker(props) {
22877
23328
  <span class="lab-label">Your order</span>
22878
23329
  <p class="tracker__med">
22879
23330
  {props.medicationName}
22880
- <Show63 when={rx().dosage}><span class="tracker__dose"> · {rx().dosage}</span></Show63>
23331
+ <Show65 when={rx().dosage}><span class="tracker__dose"> · {rx().dosage}</span></Show65>
22881
23332
  </p>
22882
23333
  </div>
22883
23334
 
@@ -22887,17 +23338,17 @@ function OrderTracker(props) {
22887
23338
  class={`thread${view.branch ? ` thread--${view.branch}` : ""}`}
22888
23339
  style={{ "--active": String(view.activeIndex), "--count": String(view.stages.length) }}
22889
23340
  >
22890
- <For49 each={view.stages}>
23341
+ <For50 each={view.stages}>
22891
23342
  {(stage, i) => <Stage stage={stage} index={i()} view={view} />}
22892
- </For49>
23343
+ </For50>
22893
23344
  </ol>
22894
23345
  </div>;
22895
23346
  }}
22896
- </Show63>;
23347
+ </Show65>;
22897
23348
  }
22898
23349
 
22899
23350
  // src/pages/member/RxRow.tsx
22900
- import { Show as Show64, createSignal as createSignal43 } from "solid-js";
23351
+ import { Show as Show66, createSignal as createSignal46 } from "solid-js";
22901
23352
  var STATUS_LABEL = {
22902
23353
  pending: "Under review",
22903
23354
  approved: "Approved",
@@ -22908,7 +23359,7 @@ var STATUS_LABEL = {
22908
23359
  denied: "Not approved"
22909
23360
  };
22910
23361
  function RxRow(props) {
22911
- const [open, setOpen] = createSignal43(false);
23362
+ const [open, setOpen] = createSignal46(false);
22912
23363
  const label3 = () => {
22913
23364
  if (props.rx.status === "approved" && props.rx.delivery?.trackingNumber) return "On its way";
22914
23365
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
@@ -22922,14 +23373,14 @@ function RxRow(props) {
22922
23373
  >
22923
23374
  <span class="rx-row__med">
22924
23375
  {props.rx.drugName ?? "Medication"}
22925
- <Show64 when={props.rx.dosage}>
23376
+ <Show66 when={props.rx.dosage}>
22926
23377
  <span class="rx-row__dose"> · {props.rx.dosage}</span>
22927
- </Show64>
23378
+ </Show66>
22928
23379
  </span>
22929
23380
  <span class="rx-row__status">{label3()}</span>
22930
23381
  <i class={`ph ph-caret-${open() ? "up" : "down"} rx-row__chevron`} aria-hidden="true" />
22931
23382
  </button>
22932
- <Show64 when={open()}>
23383
+ <Show66 when={open()}>
22933
23384
  <div class="rx-row__body">
22934
23385
  <OrderTracker
22935
23386
  request={props.request}
@@ -22942,12 +23393,12 @@ function RxRow(props) {
22942
23393
  renewHref={props.renewHref}
22943
23394
  />
22944
23395
  </div>
22945
- </Show64>
23396
+ </Show66>
22946
23397
  </div>;
22947
23398
  }
22948
23399
 
22949
23400
  // src/pages/member/PlanBilling.tsx
22950
- import { Show as Show65, createSignal as createSignal44 } from "solid-js";
23401
+ import { Show as Show67, createSignal as createSignal47 } from "solid-js";
22951
23402
  function formatCents(cents) {
22952
23403
  if (cents == null || Number.isNaN(cents)) return "\u2014";
22953
23404
  return `$${(cents / 100).toFixed(2)}`;
@@ -22968,9 +23419,9 @@ var STATUS_COPY = {
22968
23419
  };
22969
23420
  var LIVE_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
22970
23421
  function PlanBilling(props) {
22971
- const [action, setAction] = createSignal44(null);
22972
- const [confirmCancel, setConfirmCancel] = createSignal44(false);
22973
- const [error, setError] = createSignal44(null);
23422
+ const [action, setAction] = createSignal47(null);
23423
+ const [confirmCancel, setConfirmCancel] = createSignal47(false);
23424
+ const [error, setError] = createSignal47(null);
22974
23425
  const primary = () => {
22975
23426
  const subs = props.subscriptions;
22976
23427
  return subs.find((s) => LIVE_STATUSES.has(s.status)) ?? subs[0] ?? null;
@@ -22990,7 +23441,7 @@ function PlanBilling(props) {
22990
23441
  return <div class="plan" data-testid="plan-billing">
22991
23442
  <span class="lab-label">Plan &amp; billing</span>
22992
23443
 
22993
- <Show65
23444
+ <Show67
22994
23445
  when={primary()}
22995
23446
  fallback={<div class="plan__empty">
22996
23447
  <h2 class="plan__empty-title">No active plan</h2>
@@ -23006,7 +23457,7 @@ function PlanBilling(props) {
23006
23457
  <span class="membership__brand">{props.brandName}</span>
23007
23458
  </div>
23008
23459
  <h2 class="membership__med">{sub().medicationName ?? sub().medication}</h2>
23009
- <Show65 when={sub().dosage}><p class="membership__dose">{sub().dosage}</p></Show65>
23460
+ <Show67 when={sub().dosage}><p class="membership__dose">{sub().dosage}</p></Show67>
23010
23461
  <div class="membership__bottom">
23011
23462
  <span class="membership__price">
23012
23463
  {formatCents(sub().amountCents)}<span class="membership__per">/mo</span>
@@ -23032,7 +23483,7 @@ function PlanBilling(props) {
23032
23483
  </div>
23033
23484
  </dl>
23034
23485
 
23035
- <Show65 when={props.messagingEnabled}>
23486
+ <Show67 when={props.messagingEnabled}>
23036
23487
  <p class="plan__note">
23037
23488
  Question about billing?{" "}
23038
23489
  <button
@@ -23043,14 +23494,14 @@ function PlanBilling(props) {
23043
23494
  Message support
23044
23495
  </button>
23045
23496
  </p>
23046
- </Show65>
23497
+ </Show67>
23047
23498
 
23048
- <Show65 when={error()}>
23499
+ <Show67 when={error()}>
23049
23500
  <p class="plan__error" role="alert">{error()}</p>
23050
- </Show65>
23501
+ </Show67>
23051
23502
 
23052
23503
  <div class="plan__actions">
23053
- <Show65 when={sub().status === "active"}>
23504
+ <Show67 when={sub().status === "active"}>
23054
23505
  <button
23055
23506
  type="button"
23056
23507
  class="plan__link-btn"
@@ -23059,8 +23510,8 @@ function PlanBilling(props) {
23059
23510
  >
23060
23511
  {action() === "pause" ? "Pausing\u2026" : "Pause subscription"}
23061
23512
  </button>
23062
- </Show65>
23063
- <Show65 when={sub().status === "paused"}>
23513
+ </Show67>
23514
+ <Show67 when={sub().status === "paused"}>
23064
23515
  <button
23065
23516
  type="button"
23066
23517
  class="plan__link-btn"
@@ -23069,11 +23520,11 @@ function PlanBilling(props) {
23069
23520
  >
23070
23521
  {action() === "resume" ? "Resuming\u2026" : "Resume subscription"}
23071
23522
  </button>
23072
- </Show65>
23523
+ </Show67>
23073
23524
 
23074
23525
  <a href={props.paymentMethodHref} class="plan__link-btn">Update payment method</a>
23075
23526
 
23076
- <Show65 when={sub().status !== "cancelled" && sub().status !== "expired"}>
23527
+ <Show67 when={sub().status !== "cancelled" && sub().status !== "expired"}>
23077
23528
  <button
23078
23529
  type="button"
23079
23530
  class="plan__link-btn plan__link-btn--quiet"
@@ -23082,10 +23533,10 @@ function PlanBilling(props) {
23082
23533
  >
23083
23534
  Cancel subscription
23084
23535
  </button>
23085
- </Show65>
23536
+ </Show67>
23086
23537
  </div>
23087
23538
 
23088
- <Show65 when={confirmCancel()}>
23539
+ <Show67 when={confirmCancel()}>
23089
23540
  <div class="confirm" data-testid="cancel-confirm">
23090
23541
  <p class="confirm__text">
23091
23542
  Cancel your subscription? You’ll keep access until the end of your current billing period
@@ -23110,14 +23561,14 @@ function PlanBilling(props) {
23110
23561
  </button>
23111
23562
  </div>
23112
23563
  </div>
23113
- </Show65>
23564
+ </Show67>
23114
23565
  </>}
23115
- </Show65>
23566
+ </Show67>
23116
23567
  </div>;
23117
23568
  }
23118
23569
 
23119
23570
  // src/pages/member/AccountPanel.tsx
23120
- import { Show as Show66, For as For50 } from "solid-js";
23571
+ import { Show as Show68, For as For51 } from "solid-js";
23121
23572
  function pick(member, ...keys) {
23122
23573
  if (!member) return "";
23123
23574
  for (const k of keys) {
@@ -23153,19 +23604,19 @@ function AccountPanel(props) {
23153
23604
  <h1 class="account__title">Your details</h1>
23154
23605
 
23155
23606
  <dl class="account__fields">
23156
- <For50 each={fields()}>
23607
+ <For51 each={fields()}>
23157
23608
  {(f) => <div class="account__field">
23158
23609
  <dt class="lab-label">{f.label}</dt>
23159
23610
  <dd>{f.value}</dd>
23160
23611
  </div>}
23161
- </For50>
23612
+ </For51>
23162
23613
  </dl>
23163
23614
 
23164
- <Show66 when={fields().length === 0}>
23615
+ <Show68 when={fields().length === 0}>
23165
23616
  <p class="account__empty">We don’t have your details on file yet.</p>
23166
- </Show66>
23617
+ </Show68>
23167
23618
 
23168
- <Show66 when={props.messagingEnabled}>
23619
+ <Show68 when={props.messagingEnabled}>
23169
23620
  <p class="account__note">
23170
23621
  Need to update something?{" "}
23171
23622
  <button
@@ -23177,17 +23628,17 @@ function AccountPanel(props) {
23177
23628
  </button>{" "}
23178
23629
  and we’ll take care of it.
23179
23630
  </p>
23180
- </Show66>
23631
+ </Show68>
23181
23632
 
23182
23633
  <div class="account__support">
23183
- <Show66 when={props.messagingEnabled}>
23634
+ <Show68 when={props.messagingEnabled}>
23184
23635
  <button type="button" class="account__support-link account__support-btn" onClick={() => props.onOpenMessages()}>
23185
23636
  Messages
23186
23637
  </button>
23187
- </Show66>
23188
- <For50 each={props.legalLinks ?? []}>
23638
+ </Show68>
23639
+ <For51 each={props.legalLinks ?? []}>
23189
23640
  {(link) => <a href={link.href} class="account__support-link">{link.label}</a>}
23190
- </For50>
23641
+ </For51>
23191
23642
  </div>
23192
23643
 
23193
23644
  <button type="button" class="portal-btn portal-btn--ghost account__signout" onClick={props.onSignOut}>
@@ -23197,13 +23648,13 @@ function AccountPanel(props) {
23197
23648
  }
23198
23649
 
23199
23650
  // src/pages/member/MedicationGuide.tsx
23200
- import { Show as Show67, For as For51, createSignal as createSignal45 } from "solid-js";
23651
+ import { Show as Show69, For as For52, createSignal as createSignal48 } from "solid-js";
23201
23652
  function firstNumber(s) {
23202
23653
  const m = (s || "").match(/\d+(\.\d+)?/);
23203
23654
  return m ? m[0] : null;
23204
23655
  }
23205
23656
  function MedicationGuide(props) {
23206
- const [showDisclaimers, setShowDisclaimers] = createSignal45(false);
23657
+ const [showDisclaimers, setShowDisclaimers] = createSignal48(false);
23207
23658
  const activeTitrationIndex = () => {
23208
23659
  const dose = firstNumber(props.currentDose);
23209
23660
  if (!dose) return -1;
@@ -23240,7 +23691,7 @@ function MedicationGuide(props) {
23240
23691
  <section class="leaflet__section leaflet__section--caution">
23241
23692
  <h2 class="leaflet__h2">Do not use this medicine if…</h2>
23242
23693
  <ul class="leaflet__list leaflet__list--caution">
23243
- <For51 each={props.guide.doNotUseIf}>{(item) => <li>{item}</li>}</For51>
23694
+ <For52 each={props.guide.doNotUseIf}>{(item) => <li>{item}</li>}</For52>
23244
23695
  </ul>
23245
23696
  </section>
23246
23697
 
@@ -23251,7 +23702,7 @@ function MedicationGuide(props) {
23251
23702
  <h2 class="leaflet__h2">Your dose over time</h2>
23252
23703
  <p class="leaflet__note">A typical step-up. Your prescriber sets your exact doses and timing.</p>
23253
23704
  <ol class="titration">
23254
- <For51 each={props.guide.titration}>
23705
+ <For52 each={props.guide.titration}>
23255
23706
  {(step, i) => <li class={`titration__step titration__step--${titrationState(i())}`}>
23256
23707
  <span class="titration__bead" aria-hidden="true" />
23257
23708
  <div class="titration__body">
@@ -23263,14 +23714,14 @@ function MedicationGuide(props) {
23263
23714
  <p class="titration__note">{step.note}</p>
23264
23715
  </div>
23265
23716
  </li>}
23266
- </For51>
23717
+ </For52>
23267
23718
  </ol>
23268
23719
  </section>
23269
23720
 
23270
23721
  <section class="leaflet__section">
23271
23722
  <h2 class="leaflet__h2">Giving your injection</h2>
23272
23723
  <ol class="steps">
23273
- <For51 each={props.guide.injectionSteps}>
23724
+ <For52 each={props.guide.injectionSteps}>
23274
23725
  {(step) => <li class="steps__item">
23275
23726
  <span class="steps__num">{step.n}</span>
23276
23727
  <div class="steps__body">
@@ -23278,7 +23729,7 @@ function MedicationGuide(props) {
23278
23729
  <p class="steps__detail">{step.detail}</p>
23279
23730
  </div>
23280
23731
  </li>}
23281
- </For51>
23732
+ </For52>
23282
23733
  </ol>
23283
23734
  </section>
23284
23735
 
@@ -23286,7 +23737,7 @@ function MedicationGuide(props) {
23286
23737
  <section class="leaflet__section">
23287
23738
  <h2 class="leaflet__h2">Storing your medicine</h2>
23288
23739
  <ul class="leaflet__list">
23289
- <For51 each={props.guide.storage}>{(item) => <li>{item}</li>}</For51>
23740
+ <For52 each={props.guide.storage}>{(item) => <li>{item}</li>}</For52>
23290
23741
  </ul>
23291
23742
  </section>
23292
23743
 
@@ -23296,25 +23747,25 @@ function MedicationGuide(props) {
23296
23747
  </section>
23297
23748
  </div>
23298
23749
 
23299
- <Show67 when={props.guide.contraception}>
23750
+ <Show69 when={props.guide.contraception}>
23300
23751
  <section class="leaflet__section leaflet__section--caution">
23301
23752
  <h2 class="leaflet__h2">Birth control</h2>
23302
23753
  <p class="leaflet__body">{props.guide.contraception}</p>
23303
23754
  </section>
23304
- </Show67>
23755
+ </Show69>
23305
23756
 
23306
23757
  <div class="leaflet__grid">
23307
23758
  <section class="leaflet__section">
23308
23759
  <h2 class="leaflet__h2">Common side effects</h2>
23309
23760
  <ul class="leaflet__list leaflet__list--check">
23310
- <For51 each={props.guide.sideEffectsCommon}>{(item) => <li>{item}</li>}</For51>
23761
+ <For52 each={props.guide.sideEffectsCommon}>{(item) => <li>{item}</li>}</For52>
23311
23762
  </ul>
23312
23763
  </section>
23313
23764
 
23314
23765
  <section class="leaflet__section leaflet__section--alert">
23315
23766
  <h2 class="leaflet__h2">Call right away if you notice…</h2>
23316
23767
  <ul class="leaflet__list leaflet__list--alert">
23317
- <For51 each={props.guide.sideEffectsSerious}>{(item) => <li>{item}</li>}</For51>
23768
+ <For52 each={props.guide.sideEffectsSerious}>{(item) => <li>{item}</li>}</For52>
23318
23769
  </ul>
23319
23770
  </section>
23320
23771
  </div>
@@ -23322,14 +23773,14 @@ function MedicationGuide(props) {
23322
23773
  <section class="leaflet__section">
23323
23774
  <h2 class="leaflet__h2">When to contact your care team</h2>
23324
23775
  <ul class="leaflet__list">
23325
- <For51 each={props.guide.whenToCall}>{(item) => <li>{item}</li>}</For51>
23776
+ <For52 each={props.guide.whenToCall}>{(item) => <li>{item}</li>}</For52>
23326
23777
  </ul>
23327
23778
  </section>
23328
23779
 
23329
23780
  <section class="leaflet__section">
23330
23781
  <h2 class="leaflet__h2">Tips for feeling your best</h2>
23331
23782
  <ul class="leaflet__list leaflet__list--check">
23332
- <For51 each={props.guide.tips}>{(item) => <li>{item}</li>}</For51>
23783
+ <For52 each={props.guide.tips}>{(item) => <li>{item}</li>}</For52>
23333
23784
  </ul>
23334
23785
  </section>
23335
23786
 
@@ -23344,17 +23795,17 @@ function MedicationGuide(props) {
23344
23795
  {showDisclaimers() ? "Hide" : "Read"} the important details
23345
23796
  <i class={`ph ph-caret-${showDisclaimers() ? "up" : "down"}`} aria-hidden="true" />
23346
23797
  </button>
23347
- <Show67 when={showDisclaimers()}>
23798
+ <Show69 when={showDisclaimers()}>
23348
23799
  <ul class="leaflet__disclaimers" id="leaflet-disclaimers">
23349
- <For51 each={props.guide.disclaimers}>{(item) => <li>{item}</li>}</For51>
23800
+ <For52 each={props.guide.disclaimers}>{(item) => <li>{item}</li>}</For52>
23350
23801
  </ul>
23351
- </Show67>
23802
+ </Show69>
23352
23803
  </section>
23353
23804
  </div>;
23354
23805
  }
23355
23806
 
23356
23807
  // src/pages/member/MessagesPanel.tsx
23357
- import { Show as Show68, For as For52, Switch as Switch6, Match as Match6, createEffect as createEffect17, createSignal as createSignal46, on as on9 } from "solid-js";
23808
+ import { Show as Show70, For as For53, Switch as Switch6, Match as Match6, createEffect as createEffect17, createSignal as createSignal49, on as on9 } from "solid-js";
23358
23809
  import DOMPurify from "dompurify";
23359
23810
  function sanitizeMessageHtml(html) {
23360
23811
  return DOMPurify.sanitize(html, {
@@ -23409,11 +23860,11 @@ function rejectionReason(file) {
23409
23860
  }
23410
23861
  function MessagesPanel(props) {
23411
23862
  const thread = () => props.thread;
23412
- const [channel, setChannel] = createSignal46("gate");
23413
- const [threadNotFound, setThreadNotFound] = createSignal46(false);
23414
- const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal46(null);
23863
+ const [channel, setChannel] = createSignal49("gate");
23864
+ const [threadNotFound, setThreadNotFound] = createSignal49(false);
23865
+ const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal49(null);
23415
23866
  const emailSupport = () => thread().supportChannel() === "email";
23416
- const [emailSent, setEmailSent] = createSignal46(false);
23867
+ const [emailSent, setEmailSent] = createSignal49(false);
23417
23868
  function switchChannel(next) {
23418
23869
  thread().clearSelection();
23419
23870
  setEmailSent(false);
@@ -23425,17 +23876,17 @@ function MessagesPanel(props) {
23425
23876
  setThreadNotFound(false);
23426
23877
  setPendingThreadIntentId(null);
23427
23878
  }
23428
- const [composing, setComposing] = createSignal46(false);
23429
- const [composeStep, setComposeStep] = createSignal46(
23879
+ const [composing, setComposing] = createSignal49(false);
23880
+ const [composeStep, setComposeStep] = createSignal49(
23430
23881
  "support"
23431
23882
  );
23432
- const [newSubject, setNewSubject] = createSignal46("");
23433
- const [newBody, setNewBody] = createSignal46("");
23434
- const [newCategory, setNewCategory] = createSignal46(null);
23435
- const [composeError, setComposeError] = createSignal46(null);
23436
- const [pendingFile, setPendingFile] = createSignal46(null);
23437
- const [newFile, setNewFile] = createSignal46(null);
23438
- const [attachError, setAttachError] = createSignal46(null);
23883
+ const [newSubject, setNewSubject] = createSignal49("");
23884
+ const [newBody, setNewBody] = createSignal49("");
23885
+ const [newCategory, setNewCategory] = createSignal49(null);
23886
+ const [composeError, setComposeError] = createSignal49(null);
23887
+ const [pendingFile, setPendingFile] = createSignal49(null);
23888
+ const [newFile, setNewFile] = createSignal49(null);
23889
+ const [attachError, setAttachError] = createSignal49(null);
23439
23890
  function stageFile(input, set) {
23440
23891
  const file = input.files?.[0];
23441
23892
  input.value = "";
@@ -23608,9 +24059,9 @@ function MessagesPanel(props) {
23608
24059
  data-channel={p.source}
23609
24060
  >
23610
24061
  {p.source === "clinical" ? "Care team" : "Support"}
23611
- <Show68 when={p.source === "support" && categoryLabel(p.category)}>
24062
+ <Show70 when={p.source === "support" && categoryLabel(p.category)}>
23612
24063
  {(label3) => <span class="channel-chip__category">{label3()}</span>}
23613
- </Show68>
24064
+ </Show70>
23614
24065
  </span>;
23615
24066
  const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
23616
24067
  const ConversationList = () => <>
@@ -23639,29 +24090,29 @@ function MessagesPanel(props) {
23639
24090
  </div>
23640
24091
 
23641
24092
  <div class="msg-list__scroll" data-scrollable>
23642
- <Show68 when={thread().loadingConversations()}>
24093
+ <Show70 when={thread().loadingConversations()}>
23643
24094
  <div class="msg-list__state">
23644
24095
  <div class="request-status__spinner" />
23645
24096
  </div>
23646
- </Show68>
24097
+ </Show70>
23647
24098
 
23648
- <Show68 when={!thread().loadingConversations() && channelConversations().length === 0}>
24099
+ <Show70 when={!thread().loadingConversations() && channelConversations().length === 0}>
23649
24100
  <div class="msg-list__state msg-list__state--empty" data-testid="messages-empty">
23650
24101
  <i class="ph-thin ph-chat-circle msg-list__empty-icon" aria-hidden="true" />
23651
24102
  <p class="msg-list__empty-title">No conversations yet.</p>
23652
24103
  <p class="msg-list__empty-hint">
23653
- <Show68
24104
+ <Show70
23654
24105
  when={channel() === "care"}
23655
24106
  fallback="Message support about your account, an order, billing or the site."
23656
24107
  >
23657
24108
  Your care team reviews and responds to anything about your treatment, medication
23658
24109
  or side effects.
23659
- </Show68>
24110
+ </Show70>
23660
24111
  </p>
23661
24112
  </div>
23662
- </Show68>
24113
+ </Show70>
23663
24114
 
23664
- <For52 each={channelConversations()}>
24115
+ <For53 each={channelConversations()}>
23665
24116
  {(convo) => <button
23666
24117
  type="button"
23667
24118
  class={`msg-list__item${thread().selectedId() === convo.id ? " is-active" : ""}`}
@@ -23677,17 +24128,17 @@ function MessagesPanel(props) {
23677
24128
  </div>
23678
24129
  <div class="msg-list__row">
23679
24130
  <span class="msg-list__preview">{convo.lastMessage ?? "No messages yet"}</span>
23680
- <Show68 when={(convo.unreadCount ?? 0) > 0}>
24131
+ <Show70 when={(convo.unreadCount ?? 0) > 0}>
23681
24132
  <span class="msg-list__pip">{convo.unreadCount}</span>
23682
- </Show68>
24133
+ </Show70>
23683
24134
  </div>
23684
24135
  </button>}
23685
- </For52>
24136
+ </For53>
23686
24137
  </div>
23687
24138
  </>;
23688
24139
  const Attachment = (p) => {
23689
- const [url, setUrl] = createSignal46(p.attachment.url ?? null);
23690
- const [failed, setFailed] = createSignal46(false);
24140
+ const [url, setUrl] = createSignal49(p.attachment.url ?? null);
24141
+ const [failed, setFailed] = createSignal49(false);
23691
24142
  let retried = false;
23692
24143
  const resolve = async (force = false) => {
23693
24144
  const next = await thread().resolveAttachmentUrl(p.attachment.id, force);
@@ -23702,7 +24153,7 @@ function MessagesPanel(props) {
23702
24153
  const href = url() ?? await resolve();
23703
24154
  if (href) window.open(href, "_blank", "noopener");
23704
24155
  };
23705
- return <Show68
24156
+ return <Show70
23706
24157
  when={isImageAttachment(p.attachment)}
23707
24158
  fallback={<button
23708
24159
  type="button"
@@ -23721,7 +24172,7 @@ function MessagesPanel(props) {
23721
24172
  </span>
23722
24173
  </button>}
23723
24174
  >
23724
- <Show68
24175
+ <Show70
23725
24176
  when={url() && !failed()}
23726
24177
  fallback={<span class="msg-attachment__fallback">
23727
24178
  {failed() ? "Attachment unavailable" : "Loading\u2026"}
@@ -23743,13 +24194,13 @@ function MessagesPanel(props) {
23743
24194
  }}
23744
24195
  />
23745
24196
  </button>
23746
- </Show68>
23747
- </Show68>;
24197
+ </Show70>
24198
+ </Show70>;
23748
24199
  };
23749
24200
  const Bubble = (p) => {
23750
24201
  const isOwn = () => p.msg.senderRole === "patient";
23751
24202
  const body = () => p.msg.text || p.msg.content || "";
23752
- return <Show68
24203
+ return <Show70
23753
24204
  when={p.msg.type !== "system"}
23754
24205
  fallback={<p class="msg-thread__system" data-testid="system-message">
23755
24206
  {body()}
@@ -23757,15 +24208,15 @@ function MessagesPanel(props) {
23757
24208
  >
23758
24209
  <div class={`msg-thread__line${isOwn() ? " msg-thread__line--own" : ""}`}>
23759
24210
  <div class={`msg-thread__bubble${isOwn() ? " msg-thread__bubble--own" : ""}`}>
23760
- <Show68 when={!isOwn() && p.msg.senderName}>
24211
+ <Show70 when={!isOwn() && p.msg.senderName}>
23761
24212
  <p class="msg-thread__sender">{p.msg.senderName}</p>
23762
- </Show68>
24213
+ </Show70>
23763
24214
  {
23764
24215
  /* An attachment may arrive with no caption, so don't render an
23765
24216
  empty paragraph in that case. */
23766
24217
  }
23767
- <Show68 when={body()}>
23768
- <Show68
24218
+ <Show70 when={body()}>
24219
+ <Show70
23769
24220
  when={p.msg.type === "html"}
23770
24221
  fallback={<p class="msg-thread__text">{body()}</p>}
23771
24222
  >
@@ -23776,17 +24227,17 @@ function MessagesPanel(props) {
23776
24227
  stored XSS in every one of them. */
23777
24228
  }
23778
24229
  <div class="msg-thread__text" innerHTML={sanitizeMessageHtml(body())} />
23779
- </Show68>
23780
- </Show68>
23781
- <Show68 when={p.msg.attachments?.length}>
24230
+ </Show70>
24231
+ </Show70>
24232
+ <Show70 when={p.msg.attachments?.length}>
23782
24233
  <div class="msg-attachment">
23783
- <For52 each={p.msg.attachments}>{(a) => <Attachment attachment={a} />}</For52>
24234
+ <For53 each={p.msg.attachments}>{(a) => <Attachment attachment={a} />}</For53>
23784
24235
  </div>
23785
- </Show68>
24236
+ </Show70>
23786
24237
  <p class="msg-thread__meta">{formatMessageTime(p.msg.createdAt)}</p>
23787
24238
  </div>
23788
24239
  </div>
23789
- </Show68>;
24240
+ </Show70>;
23790
24241
  };
23791
24242
  const NewSupportThread = () => <form class="msg-thread msg-thread--compose" onSubmit={submitCompose} data-testid="support-compose">
23792
24243
  <div class="msg-thread__header">
@@ -23812,7 +24263,7 @@ function MessagesPanel(props) {
23812
24263
  What's this about? <span class="msg-compose__label-optional">(optional)</span>
23813
24264
  </label>
23814
24265
  <div class="msg-compose__categories" role="group" aria-labelledby="support-category-label">
23815
- <For52 each={SUPPORT_CATEGORIES}>
24266
+ <For53 each={SUPPORT_CATEGORIES}>
23816
24267
  {(c) => <button
23817
24268
  type="button"
23818
24269
  class={`msg-compose__category-chip${newCategory() === c.key ? " is-selected" : ""}`}
@@ -23822,7 +24273,7 @@ function MessagesPanel(props) {
23822
24273
  >
23823
24274
  {c.label}
23824
24275
  </button>}
23825
- </For52>
24276
+ </For53>
23826
24277
  </div>
23827
24278
 
23828
24279
  <label class="msg-compose__label" for="support-subject">
@@ -23866,7 +24317,7 @@ function MessagesPanel(props) {
23866
24317
  onChange={(e) => stageFile(e.currentTarget, setNewFile)}
23867
24318
  />
23868
24319
  </label>
23869
- <Show68 when={newFile()}>
24320
+ <Show70 when={newFile()}>
23870
24321
  <button
23871
24322
  type="button"
23872
24323
  class="msg-compose__staged-remove msg-compose__staged-remove--inline"
@@ -23874,13 +24325,13 @@ function MessagesPanel(props) {
23874
24325
  >
23875
24326
  Remove file
23876
24327
  </button>
23877
- </Show68>
24328
+ </Show70>
23878
24329
 
23879
- <Show68 when={attachError() || composeError()}>
24330
+ <Show70 when={attachError() || composeError()}>
23880
24331
  <p class="msg-compose__error" role="alert">
23881
24332
  {attachError() ?? composeError()}
23882
24333
  </p>
23883
- </Show68>
24334
+ </Show70>
23884
24335
 
23885
24336
  <button
23886
24337
  type="submit"
@@ -23937,7 +24388,7 @@ function MessagesPanel(props) {
23937
24388
  onChange={(e) => stageFile(e.currentTarget, setNewFile)}
23938
24389
  />
23939
24390
  </label>
23940
- <Show68 when={newFile()}>
24391
+ <Show70 when={newFile()}>
23941
24392
  <button
23942
24393
  type="button"
23943
24394
  class="msg-compose__staged-remove msg-compose__staged-remove--inline"
@@ -23945,13 +24396,13 @@ function MessagesPanel(props) {
23945
24396
  >
23946
24397
  Remove file
23947
24398
  </button>
23948
- </Show68>
24399
+ </Show70>
23949
24400
 
23950
- <Show68 when={attachError() || composeError()}>
24401
+ <Show70 when={attachError() || composeError()}>
23951
24402
  <p class="msg-compose__error" role="alert">
23952
24403
  {attachError() ?? composeError()}
23953
24404
  </p>
23954
- </Show68>
24405
+ </Show70>
23955
24406
 
23956
24407
  <button
23957
24408
  type="submit"
@@ -23983,19 +24434,19 @@ function MessagesPanel(props) {
23983
24434
  <i class="ph-thin ph-heartbeat msg-choice__option-icon" aria-hidden="true" />
23984
24435
  <span class="msg-choice__option-title">My care team</span>
23985
24436
  <span class="msg-choice__option-sub">Treatment, medication or side effects</span>
23986
- <Show68
24437
+ <Show70
23987
24438
  when={!thread().loadingConversations()}
23988
24439
  fallback={<span
23989
24440
  class="msg-choice__option-spinner request-status__spinner"
23990
24441
  data-testid="gate-care-loading"
23991
24442
  />}
23992
24443
  >
23993
- <Show68 when={careUnreadCount() > 0}>
24444
+ <Show70 when={careUnreadCount() > 0}>
23994
24445
  <span class="msg-choice__option-badge" data-testid="gate-care-badge">
23995
24446
  {careUnreadCount()}
23996
24447
  </span>
23997
- </Show68>
23998
- </Show68>
24448
+ </Show70>
24449
+ </Show70>
23999
24450
  </button>
24000
24451
  <button
24001
24452
  type="button"
@@ -24006,27 +24457,27 @@ function MessagesPanel(props) {
24006
24457
  <i class="ph-thin ph-lifebuoy msg-choice__option-icon" aria-hidden="true" />
24007
24458
  <span class="msg-choice__option-title">Support</span>
24008
24459
  <span class="msg-choice__option-sub">Account, orders, billing or the website</span>
24009
- <Show68
24460
+ <Show70
24010
24461
  when={!thread().loadingConversations()}
24011
24462
  fallback={<span
24012
24463
  class="msg-choice__option-spinner request-status__spinner"
24013
24464
  data-testid="gate-support-loading"
24014
24465
  />}
24015
24466
  >
24016
- <Show68 when={supportUnreadCount() > 0 && !emailSupport()}>
24467
+ <Show70 when={supportUnreadCount() > 0 && !emailSupport()}>
24017
24468
  <span class="msg-choice__option-badge" data-testid="gate-support-badge">
24018
24469
  {supportUnreadCount()}
24019
24470
  </span>
24020
- </Show68>
24021
- </Show68>
24471
+ </Show70>
24472
+ </Show70>
24022
24473
  </button>
24023
24474
  </div>
24024
24475
 
24025
- <Show68 when={threadNotFound()}>
24476
+ <Show70 when={threadNotFound()}>
24026
24477
  <p class="msg-choice__notice-text" data-testid="messages-gate-note">
24027
24478
  That conversation isn't available.
24028
24479
  </p>
24029
- </Show68>
24480
+ </Show70>
24030
24481
  </div>;
24031
24482
  const CareTeamNotice = () => <div class="msg-thread msg-choice" data-testid="care-team-notice">
24032
24483
  <div class="msg-thread__header">
@@ -24102,9 +24553,9 @@ function MessagesPanel(props) {
24102
24553
  <div>
24103
24554
  <div class="msg-thread__title-row">
24104
24555
  <h3 class="msg-thread__name">{selectedConvo()?.participantName ?? "Provider"}</h3>
24105
- <Show68 when={selectedConvo()}>
24556
+ <Show70 when={selectedConvo()}>
24106
24557
  {(convo) => <ChannelChip source={convo().source} category={convo().category} />}
24107
- </Show68>
24558
+ </Show70>
24108
24559
  </div>
24109
24560
  <p class="msg-thread__role">{selectedConvo()?.participantRole ?? "Prescriber"}</p>
24110
24561
  </div>
@@ -24113,23 +24564,23 @@ function MessagesPanel(props) {
24113
24564
  it — so this is a status cue, not a lock. A transferred one is
24114
24565
  different: its content now lives with the care team, so it's read-only. */
24115
24566
  }
24116
- <Show68 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "closed"}>
24567
+ <Show70 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "closed"}>
24117
24568
  <span class="msg-thread__status" data-testid="thread-status-closed">
24118
24569
  Resolved
24119
24570
  </span>
24120
- </Show68>
24121
- <Show68 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred"}>
24571
+ </Show70>
24572
+ <Show70 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred"}>
24122
24573
  <span class="msg-thread__status" data-testid="thread-status-transferred">
24123
24574
  Moved to care team
24124
24575
  </span>
24125
- </Show68>
24576
+ </Show70>
24126
24577
  </div>
24127
24578
 
24128
24579
  {
24129
24580
  /* A closed (often transferred-back) support thread offers a jump straight
24130
24581
  to the care team, rather than making the customer find the gate. */
24131
24582
  }
24132
- <Show68
24583
+ <Show70
24133
24584
  when={selectedConvo()?.source === "support" && (selectedConvo()?.status === "closed" || selectedConvo()?.status === "transferred")}
24134
24585
  >
24135
24586
  <div class="msg-thread__banner">
@@ -24142,21 +24593,21 @@ function MessagesPanel(props) {
24142
24593
  Continue with your care team
24143
24594
  </button>
24144
24595
  </div>
24145
- </Show68>
24596
+ </Show70>
24146
24597
 
24147
24598
  <div class="msg-thread__messages" data-scrollable>
24148
- <Show68 when={thread().loadingMessages()}>
24599
+ <Show70 when={thread().loadingMessages()}>
24149
24600
  <div class="msg-list__state">
24150
24601
  <div class="request-status__spinner" />
24151
24602
  </div>
24152
- </Show68>
24153
- <For52 each={thread().messages()}>{(msg) => <Bubble msg={msg} />}</For52>
24603
+ </Show70>
24604
+ <For53 each={thread().messages()}>{(msg) => <Bubble msg={msg} />}</For53>
24154
24605
  <div ref={endRef} />
24155
24606
  </div>
24156
24607
 
24157
- <Show68 when={pendingFile() || attachError()}>
24608
+ <Show70 when={pendingFile() || attachError()}>
24158
24609
  <div class="msg-compose__staged">
24159
- <Show68 when={pendingFile()}>
24610
+ <Show70 when={pendingFile()}>
24160
24611
  {(file) => <span class="msg-compose__staged-file" data-testid="staged-file">
24161
24612
  <i class="ph-thin ph-paperclip" aria-hidden="true" />
24162
24613
  {file().name}
@@ -24170,27 +24621,27 @@ function MessagesPanel(props) {
24170
24621
  ×
24171
24622
  </button>
24172
24623
  </span>}
24173
- </Show68>
24174
- <Show68 when={attachError()}>
24624
+ </Show70>
24625
+ <Show70 when={attachError()}>
24175
24626
  <span class="msg-compose__error" role="alert">
24176
24627
  {attachError()}
24177
24628
  </span>
24178
- </Show68>
24629
+ </Show70>
24179
24630
  </div>
24180
- </Show68>
24631
+ </Show70>
24181
24632
 
24182
24633
  {
24183
24634
  /* A transferred support thread is read-only: the customer's messages were
24184
24635
  moved to their care team, so the place to continue is that conversation
24185
24636
  (the banner above), not a reply that would reopen this one. */
24186
24637
  }
24187
- <Show68 when={!(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred")}>
24638
+ <Show70 when={!(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred")}>
24188
24639
  <div class="msg-compose">
24189
24640
  {
24190
24641
  /* Support threads only: clinical conversations are an Apex proxy and
24191
24642
  their attachment path isn't wired up here yet. */
24192
24643
  }
24193
- <Show68 when={thread().selectedSource() === "support"}>
24644
+ <Show70 when={thread().selectedSource() === "support"}>
24194
24645
  <label class="msg-compose__attach" title="Attach a file">
24195
24646
  <i class="ph-thin ph-paperclip" aria-hidden="true" />
24196
24647
  <span class="msg-compose__attach-label">Attach a file</span>
@@ -24202,7 +24653,7 @@ function MessagesPanel(props) {
24202
24653
  onChange={(e) => stageFile(e.currentTarget, setPendingFile)}
24203
24654
  />
24204
24655
  </label>
24205
- </Show68>
24656
+ </Show70>
24206
24657
  <textarea
24207
24658
  ref={composerRef}
24208
24659
  class="msg-compose__input"
@@ -24223,25 +24674,25 @@ function MessagesPanel(props) {
24223
24674
  {thread().sending() ? "Sending\u2026" : "Send"}
24224
24675
  </button>
24225
24676
  </div>
24226
- </Show68>
24677
+ </Show70>
24227
24678
  </>;
24228
24679
  return <div class="msg-panel" data-testid="messages-panel">
24229
- <Show68
24680
+ <Show70
24230
24681
  when={channel() !== "gate"}
24231
24682
  fallback={<div class="msg-panel__layout msg-panel__layout--gate">
24232
24683
  <ChannelGate />
24233
24684
  </div>}
24234
24685
  >
24235
- <Show68
24686
+ <Show70
24236
24687
  when={!(channel() === "support" && emailSupport() && thread().selectedId() == null)}
24237
24688
  fallback={
24238
24689
  // Email-channel support: the form (or its confirmation) and nothing
24239
24690
  // else. A deep-linked thread that predates the switch still opens
24240
24691
  // in the normal layout below, since it has a selection.
24241
24692
  <div class="msg-panel__layout msg-panel__layout--gate">
24242
- <Show68 when={!emailSent()} fallback={<SupportEmailSent />}>
24693
+ <Show70 when={!emailSent()} fallback={<SupportEmailSent />}>
24243
24694
  <NewSupportThread />
24244
- </Show68>
24695
+ </Show70>
24245
24696
  </div>
24246
24697
  }
24247
24698
  >
@@ -24250,7 +24701,7 @@ function MessagesPanel(props) {
24250
24701
  <ConversationList />
24251
24702
  </div>
24252
24703
  <div class={`msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`}>
24253
- <Show68 when={composing()}>
24704
+ <Show70 when={composing()}>
24254
24705
  <Switch6>
24255
24706
  <Match6 when={composeStep() === "care"}>
24256
24707
  <NewCareTeamThread />
@@ -24262,26 +24713,26 @@ function MessagesPanel(props) {
24262
24713
  <NewSupportThread />
24263
24714
  </Match6>
24264
24715
  </Switch6>
24265
- </Show68>
24266
- <Show68 when={!composing()}>
24267
- <Show68
24716
+ </Show70>
24717
+ <Show70 when={!composing()}>
24718
+ <Show70
24268
24719
  when={thread().selectedId() != null}
24269
24720
  fallback={<div class="msg-panel__placeholder" data-testid="messages-placeholder">
24270
24721
  <p>Select a conversation to read and reply.</p>
24271
24722
  </div>}
24272
24723
  >
24273
24724
  <Thread />
24274
- </Show68>
24275
- </Show68>
24725
+ </Show70>
24726
+ </Show70>
24276
24727
  </div>
24277
24728
  </div>
24278
- </Show68>
24279
- </Show68>
24729
+ </Show70>
24730
+ </Show70>
24280
24731
  </div>;
24281
24732
  }
24282
24733
 
24283
24734
  // src/pages/member/SurveyHistory.tsx
24284
- import { createSignal as createSignal47, createResource as createResource29, For as For53, Show as Show69 } from "solid-js";
24735
+ import { createSignal as createSignal50, createResource as createResource30, For as For54, Show as Show71 } from "solid-js";
24285
24736
  var MODE_LABELS = {
24286
24737
  initial: "Intake questionnaire",
24287
24738
  refill: "Refill check-in"
@@ -24297,21 +24748,21 @@ var asEmptyOn404 = (value) => (err) => {
24297
24748
  throw err;
24298
24749
  };
24299
24750
  function SurveyHistory() {
24300
- const [list] = createResource29(
24751
+ const [list] = createResource30(
24301
24752
  () => membersApi.getSurveyResponses().then((r) => r.responses).catch(asEmptyOn404([]))
24302
24753
  );
24303
- const [selectedId, setSelectedId] = createSignal47(null);
24304
- const [detail] = createResource29(
24754
+ const [selectedId, setSelectedId] = createSignal50(null);
24755
+ const [detail] = createResource30(
24305
24756
  selectedId,
24306
24757
  (id) => membersApi.getSurveyResponse(id).catch(asEmptyOn404(null))
24307
24758
  );
24308
- const ListView = () => <Show69
24759
+ const ListView = () => <Show71
24309
24760
  when={!list.error}
24310
24761
  fallback={<div class="portal-state" data-testid="history-error">
24311
24762
  <p>We couldn't load your submitted surveys. Please try again in a moment.</p>
24312
24763
  </div>}
24313
24764
  >
24314
- <Show69
24765
+ <Show71
24315
24766
  when={(list() ?? []).length > 0}
24316
24767
  fallback={<div class="portal-state" data-testid="history-empty">
24317
24768
  <p>No submitted questionnaires yet.</p>
@@ -24321,7 +24772,7 @@ function SurveyHistory() {
24321
24772
  </div>}
24322
24773
  >
24323
24774
  <ul class="history-list" data-testid="history-list">
24324
- <For53 each={list()}>
24775
+ <For54 each={list()}>
24325
24776
  {(item) => <li>
24326
24777
  <button type="button" class="history-row" onClick={() => setSelectedId(item.id)}>
24327
24778
  <span class="history-row__mode">{MODE_LABELS[item.mode] ?? "Questionnaire"}</span>
@@ -24331,10 +24782,10 @@ function SurveyHistory() {
24331
24782
  <i class="ph-thin ph-caret-right portal-icon" aria-hidden="true" />
24332
24783
  </button>
24333
24784
  </li>}
24334
- </For53>
24785
+ </For54>
24335
24786
  </ul>
24336
- </Show69>
24337
- </Show69>;
24787
+ </Show71>
24788
+ </Show71>;
24338
24789
  const DetailView = () => <div data-testid="history-detail">
24339
24790
  <button
24340
24791
  type="button"
@@ -24343,14 +24794,14 @@ function SurveyHistory() {
24343
24794
  >
24344
24795
  <i class="ph-thin ph-caret-left portal-icon" aria-hidden="true" /> All questionnaires
24345
24796
  </button>
24346
- <Show69
24797
+ <Show71
24347
24798
  when={!detail.loading}
24348
24799
  fallback={<div class="portal-state">
24349
24800
  <div class="request-status__spinner" />
24350
24801
  <p>Loading your answers…</p>
24351
24802
  </div>}
24352
24803
  >
24353
- <Show69
24804
+ <Show71
24354
24805
  when={!detail.error && detail()}
24355
24806
  fallback={<div class="portal-state" data-testid="history-detail-error">
24356
24807
  <p>We couldn't load this questionnaire. Please try again in a moment.</p>
@@ -24364,33 +24815,33 @@ function SurveyHistory() {
24364
24815
  shown exactly as they were at the time — they aren't updated afterwards.
24365
24816
  </p>
24366
24817
  </header>
24367
- <For53 each={t().sections}>
24818
+ <For54 each={t().sections}>
24368
24819
  {(section) => <section class="history-section">
24369
24820
  <h3 class="lab-label">{section.title}</h3>
24370
- <For53 each={section.items}>
24821
+ <For54 each={section.items}>
24371
24822
  {(item) => <div class="history-qa">
24372
24823
  <p class="history-qa__q">{item.question}</p>
24373
24824
  <p class="history-qa__a">{item.answer}</p>
24374
24825
  </div>}
24375
- </For53>
24826
+ </For54>
24376
24827
  </section>}
24377
- </For53>
24828
+ </For54>
24378
24829
  </article>}
24379
- </Show69>
24380
- </Show69>
24830
+ </Show71>
24831
+ </Show71>
24381
24832
  </div>;
24382
24833
  return <div class="survey-history" data-testid="survey-history">
24383
- <Show69
24834
+ <Show71
24384
24835
  when={!list.loading || selectedId()}
24385
24836
  fallback={<div class="portal-state">
24386
24837
  <div class="request-status__spinner" />
24387
24838
  <p>Loading your submitted surveys…</p>
24388
24839
  </div>}
24389
24840
  >
24390
- <Show69 when={selectedId()} fallback={<ListView />}>
24841
+ <Show71 when={selectedId()} fallback={<ListView />}>
24391
24842
  <DetailView />
24392
- </Show69>
24393
- </Show69>
24843
+ </Show71>
24844
+ </Show71>
24394
24845
  </div>;
24395
24846
  }
24396
24847
 
@@ -24453,15 +24904,15 @@ function MemberPortal(props) {
24453
24904
  }
24454
24905
  return null;
24455
24906
  };
24456
- const [tab, setTab] = createSignal48(resolveTabFromUrl() ?? "tracker");
24457
- const [intent, setIntent] = createSignal48(resolveIntentFromUrl());
24907
+ const [tab, setTab] = createSignal51(resolveTabFromUrl() ?? "tracker");
24908
+ const [intent, setIntent] = createSignal51(resolveIntentFromUrl());
24458
24909
  onMount8(() => {
24459
24910
  const resolved = resolveTabFromUrl();
24460
24911
  if (resolved && resolved !== tab()) setTab(resolved);
24461
24912
  const resolvedIntent = resolveIntentFromUrl();
24462
24913
  if (resolvedIntent) setIntent(resolvedIntent);
24463
24914
  });
24464
- const [offers, setOffers] = createSignal48([]);
24915
+ const [offers, setOffers] = createSignal51([]);
24465
24916
  onMount8(() => {
24466
24917
  if (!props.auth.isAuthenticated()) return;
24467
24918
  offersApi.mine().then((r) => setOffers(r.offers ?? [])).catch(() => setOffers([]));
@@ -24491,7 +24942,7 @@ function MemberPortal(props) {
24491
24942
  } catch {
24492
24943
  }
24493
24944
  };
24494
- const RailNav = (p) => <For54 each={tabs()}>
24945
+ const RailNav = (p) => <For55 each={tabs()}>
24495
24946
  {(item) => <button
24496
24947
  type="button"
24497
24948
  class={`portal-${p.variant}__item${tab() === item.key ? " is-active" : ""}`}
@@ -24501,17 +24952,17 @@ function MemberPortal(props) {
24501
24952
  >
24502
24953
  <i class={`${item.icon} portal-icon`} aria-hidden="true" />
24503
24954
  <span class="portal-item__label">{item.label}</span>
24504
- <Show70 when={item.key === "tracker" && inMotion()}>
24955
+ <Show72 when={item.key === "tracker" && inMotion()}>
24505
24956
  <span class="portal-item__live" aria-label="In progress" />
24506
- </Show70>
24507
- <Show70 when={item.key === "messages" && unreadTotal() > 0}>
24957
+ </Show72>
24958
+ <Show72 when={item.key === "messages" && unreadTotal() > 0}>
24508
24959
  <span class={`portal-item__badge${p.variant === "tabs" ? " portal-item__badge--tab" : ""}`}>
24509
24960
  {unreadTotal() > 99 ? "99+" : unreadTotal()}
24510
24961
  </span>
24511
- </Show70>
24962
+ </Show72>
24512
24963
  </button>}
24513
- </For54>;
24514
- const TrackerTab = () => <Show70
24964
+ </For55>;
24965
+ const TrackerTab = () => <Show72
24515
24966
  when={data.primaryRx()}
24516
24967
  fallback={<OrderTracker
24517
24968
  request={null}
@@ -24537,10 +24988,10 @@ function MemberPortal(props) {
24537
24988
  intakeHref={props.routes.intake}
24538
24989
  renewHref={props.routes.renew}
24539
24990
  />
24540
- <Show70 when={data.otherRx().length > 0}>
24991
+ <Show72 when={data.otherRx().length > 0}>
24541
24992
  <div class="rx-others" data-testid="rx-others">
24542
24993
  <span class="lab-label">Other orders</span>
24543
- <For54 each={data.otherRx()}>
24994
+ <For55 each={data.otherRx()}>
24544
24995
  {(rx) => <RxRow
24545
24996
  rx={rx}
24546
24997
  request={data.toTrackerRequest(rx)}
@@ -24550,19 +25001,19 @@ function MemberPortal(props) {
24550
25001
  intakeHref={props.routes.intake}
24551
25002
  renewHref={props.routes.renew}
24552
25003
  />}
24553
- </For54>
25004
+ </For55>
24554
25005
  </div>
24555
- </Show70>
25006
+ </Show72>
24556
25007
  </div>}
24557
- </Show70>;
24558
- const Content = () => <Show70
25008
+ </Show72>;
25009
+ const Content = () => <Show72
24559
25010
  when={!data.loading()}
24560
25011
  fallback={<div class="portal-state">
24561
25012
  <div class="request-status__spinner" />
24562
25013
  <p>Loading your portal…</p>
24563
25014
  </div>}
24564
25015
  >
24565
- <Show70
25016
+ <Show72
24566
25017
  when={!data.error()}
24567
25018
  fallback={<div class="request-status__error portal-state">
24568
25019
  <p class="request-status__error-text">{data.error()}</p>
@@ -24602,8 +25053,8 @@ function MemberPortal(props) {
24602
25053
  <MessagesPanel thread={messages} intent={intent()} />
24603
25054
  </Match7>
24604
25055
  </Switch7>
24605
- </Show70>
24606
- </Show70>;
25056
+ </Show72>
25057
+ </Show72>;
24607
25058
  return <main
24608
25059
  class="portal"
24609
25060
  data-testid="member-portal"
@@ -24615,30 +25066,30 @@ function MemberPortal(props) {
24615
25066
  <aside class="portal-rail">
24616
25067
  <div class="portal-rail__brand">
24617
25068
  <a href={props.brand.homeHref} class="portal-rail__logo">
24618
- <Show70
25069
+ <Show72
24619
25070
  when={props.brand.logoSrc}
24620
25071
  fallback={<span class="portal-rail__wordmark">{props.brand.name}</span>}
24621
25072
  >
24622
25073
  {(src) => <img src={src()} alt={props.brand.name} />}
24623
- </Show70>
25074
+ </Show72>
24624
25075
  </a>
24625
25076
  <span class="portal-rail__dot" aria-hidden="true" />
24626
25077
  </div>
24627
25078
 
24628
- <Show70 when={data.firstName() !== "Member"}>
25079
+ <Show72 when={data.firstName() !== "Member"}>
24629
25080
  <p class="portal-rail__hi">Hi, {data.firstName()}</p>
24630
- </Show70>
25081
+ </Show72>
24631
25082
 
24632
25083
  <nav class="portal-rail__nav" aria-label="Portal sections">
24633
25084
  <RailNav variant="rail" />
24634
25085
  </nav>
24635
25086
 
24636
25087
  <div class="portal-rail__foot">
24637
- <Show70 when={showBackLink()}>
25088
+ <Show72 when={showBackLink()}>
24638
25089
  <a href={catalogHref()} class="portal-rail__back" data-testid="rail-back">
24639
25090
  ← Back to shop
24640
25091
  </a>
24641
- </Show70>
25092
+ </Show72>
24642
25093
  <button type="button" class="portal-rail__signout" onClick={props.auth.onSignOut}>
24643
25094
  — Sign out
24644
25095
  </button>
@@ -24648,11 +25099,11 @@ function MemberPortal(props) {
24648
25099
  {
24649
25100
  /* ── Mobile back bar (the rail is hidden ≤900px, so nothing else links home) ── */
24650
25101
  }
24651
- <Show70 when={showBackLink()}>
25102
+ <Show72 when={showBackLink()}>
24652
25103
  <a href={catalogHref()} class="portal-topbar-back" data-testid="mobile-back">
24653
25104
  <span aria-hidden="true">←</span> Back to shop
24654
25105
  </a>
24655
- </Show70>
25106
+ </Show72>
24656
25107
 
24657
25108
  {
24658
25109
  /* ── Content ── */
@@ -24673,10 +25124,10 @@ function MemberPortal(props) {
24673
25124
  }
24674
25125
 
24675
25126
  // src/pages/AffiliatePortal.tsx
24676
- import { createEffect as createEffect18, createSignal as createSignal50, Match as Match8, Show as Show76, Switch as Switch8, For as For59 } from "solid-js";
25127
+ import { createEffect as createEffect18, createSignal as createSignal53, Match as Match8, Show as Show78, Switch as Switch8, For as For60 } from "solid-js";
24677
25128
 
24678
25129
  // src/pages/affiliate/Overview.tsx
24679
- import { Show as Show71, For as For55 } from "solid-js";
25130
+ import { Show as Show73, For as For56 } from "solid-js";
24680
25131
  function formatMoney(cents) {
24681
25132
  return `$${(cents / 100).toFixed(2)}`;
24682
25133
  }
@@ -24710,7 +25161,7 @@ function AffiliateOverview() {
24710
25161
  Overview
24711
25162
  </h1>
24712
25163
 
24713
- <Show71 when={isPending()}>
25164
+ <Show73 when={isPending()}>
24714
25165
  <div
24715
25166
  style={{
24716
25167
  padding: "1rem 1.25rem",
@@ -24723,9 +25174,9 @@ function AffiliateOverview() {
24723
25174
  Your affiliate account is awaiting approval. Once an admin
24724
25175
  activates it, your referral link will start earning commissions.
24725
25176
  </div>
24726
- </Show71>
25177
+ </Show73>
24727
25178
 
24728
- <Show71
25179
+ <Show73
24729
25180
  when={stats()}
24730
25181
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading stats…</div>}
24731
25182
  >
@@ -24736,7 +25187,7 @@ function AffiliateOverview() {
24736
25187
  gap: "1rem"
24737
25188
  }}
24738
25189
  >
24739
- <For55 each={cards(s())}>
25190
+ <For56 each={cards(s())}>
24740
25191
  {(card) => <div
24741
25192
  style={{
24742
25193
  padding: "1.25rem",
@@ -24766,14 +25217,14 @@ function AffiliateOverview() {
24766
25217
  {card.value}
24767
25218
  </div>
24768
25219
  </div>}
24769
- </For55>
25220
+ </For56>
24770
25221
  </div>}
24771
- </Show71>
25222
+ </Show73>
24772
25223
  </div>;
24773
25224
  }
24774
25225
 
24775
25226
  // src/pages/affiliate/Conversions.tsx
24776
- import { Show as Show72, For as For56 } from "solid-js";
25227
+ import { Show as Show74, For as For57 } from "solid-js";
24777
25228
  function formatMoney2(cents) {
24778
25229
  return `$${(cents / 100).toFixed(2)}`;
24779
25230
  }
@@ -24802,7 +25253,7 @@ function AffiliateConversions() {
24802
25253
  Conversions
24803
25254
  </h1>
24804
25255
 
24805
- <Show72
25256
+ <Show74
24806
25257
  when={(conversions() ?? []).length > 0}
24807
25258
  fallback={<div
24808
25259
  style={{
@@ -24836,12 +25287,12 @@ function AffiliateConversions() {
24836
25287
  </tr>
24837
25288
  </thead>
24838
25289
  <tbody>
24839
- <For56 each={conversions()}>
25290
+ <For57 each={conversions()}>
24840
25291
  {(c) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
24841
25292
  <td data-label="Date" style={td()}>{formatDate4(c.createdAt)}</td>
24842
25293
  <td data-label="Type" style={td()}>
24843
25294
  {c.paymentType}
24844
- <Show72 when={c.tier === 2}>
25295
+ <Show74 when={c.tier === 2}>
24845
25296
  <span
24846
25297
  style={{
24847
25298
  "margin-left": "0.4rem",
@@ -24856,7 +25307,7 @@ function AffiliateConversions() {
24856
25307
  >
24857
25308
  Override
24858
25309
  </span>
24859
- </Show72>
25310
+ </Show74>
24860
25311
  </td>
24861
25312
  <td data-label="Order total" style={td()}>{formatMoney2(c.orderTotalCents)}</td>
24862
25313
  <td data-label="Commission" style={{ ...td(), color: "var(--app-affiliate-fg)", "font-weight": "600" }}>
@@ -24877,11 +25328,11 @@ function AffiliateConversions() {
24877
25328
  </span>
24878
25329
  </td>
24879
25330
  </tr>}
24880
- </For56>
25331
+ </For57>
24881
25332
  </tbody>
24882
25333
  </table>
24883
25334
  </div>
24884
- </Show72>
25335
+ </Show74>
24885
25336
  </div>;
24886
25337
  }
24887
25338
  function th() {
@@ -24903,7 +25354,7 @@ function td() {
24903
25354
  }
24904
25355
 
24905
25356
  // src/pages/affiliate/Downline.tsx
24906
- import { Show as Show73, For as For57 } from "solid-js";
25357
+ import { Show as Show75, For as For58 } from "solid-js";
24907
25358
  function formatDate5(iso) {
24908
25359
  const d = new Date(iso);
24909
25360
  if (Number.isNaN(d.getTime())) return iso;
@@ -24934,7 +25385,7 @@ function AffiliateDownline() {
24934
25385
  make — those show up as “Override” rows on your Conversions.
24935
25386
  </p>
24936
25387
 
24937
- <Show73
25388
+ <Show75
24938
25389
  when={(downline() ?? []).length > 0}
24939
25390
  fallback={<div
24940
25391
  style={{
@@ -24970,7 +25421,7 @@ function AffiliateDownline() {
24970
25421
  </tr>
24971
25422
  </thead>
24972
25423
  <tbody>
24973
- <For57 each={downline()}>
25424
+ <For58 each={downline()}>
24974
25425
  {(d) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
24975
25426
  <td
24976
25427
  data-label="Code"
@@ -24999,11 +25450,11 @@ function AffiliateDownline() {
24999
25450
  {formatDate5(d.createdAt)}
25000
25451
  </td>
25001
25452
  </tr>}
25002
- </For57>
25453
+ </For58>
25003
25454
  </tbody>
25004
25455
  </table>
25005
25456
  </div>
25006
- </Show73>
25457
+ </Show75>
25007
25458
  </div>;
25008
25459
  }
25009
25460
  function th2() {
@@ -25025,10 +25476,10 @@ function td2() {
25025
25476
  }
25026
25477
 
25027
25478
  // src/pages/affiliate/ReferralLink.tsx
25028
- import { Show as Show74, createSignal as createSignal49, createMemo as createMemo18 } from "solid-js";
25479
+ import { Show as Show76, createSignal as createSignal52, createMemo as createMemo18 } from "solid-js";
25029
25480
  function AffiliateReferralLink() {
25030
25481
  const { links } = useAffiliateLinks();
25031
- const [copied, setCopied] = createSignal49(false);
25482
+ const [copied, setCopied] = createSignal52(false);
25032
25483
  const homepageLink = createMemo18(() => {
25033
25484
  const l = links();
25034
25485
  const affiliate = affiliateAuth_default.affiliate();
@@ -25059,7 +25510,7 @@ function AffiliateReferralLink() {
25059
25510
  Referral link
25060
25511
  </h1>
25061
25512
 
25062
- <Show74
25513
+ <Show76
25063
25514
  when={homepageLink()}
25064
25515
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>
25065
25516
  Your referral link will appear here once your account is approved.
@@ -25135,12 +25586,12 @@ function AffiliateReferralLink() {
25135
25586
  the cookie window, you earn commission on the conversion.
25136
25587
  </div>
25137
25588
  </div>
25138
- </Show74>
25589
+ </Show76>
25139
25590
  </div>;
25140
25591
  }
25141
25592
 
25142
25593
  // src/pages/affiliate/Settings.tsx
25143
- import { Show as Show75, For as For58 } from "solid-js";
25594
+ import { Show as Show77, For as For59 } from "solid-js";
25144
25595
  var STATUS_LABEL2 = {
25145
25596
  pending: "Pending approval",
25146
25597
  active: "Active",
@@ -25170,7 +25621,7 @@ function AffiliateSettings() {
25170
25621
  Account
25171
25622
  </h1>
25172
25623
 
25173
- <Show75
25624
+ <Show77
25174
25625
  when={affiliate()}
25175
25626
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading…</div>}
25176
25627
  >
@@ -25182,7 +25633,7 @@ function AffiliateSettings() {
25182
25633
  overflow: "hidden"
25183
25634
  }}
25184
25635
  >
25185
- <For58 each={rows(a())}>
25636
+ <For59 each={rows(a())}>
25186
25637
  {(row) => <div
25187
25638
  style={{
25188
25639
  display: "flex",
@@ -25204,9 +25655,9 @@ function AffiliateSettings() {
25204
25655
  </div>
25205
25656
  <div style={{ color: "var(--app-affiliate-fg)" }}>{row.value}</div>
25206
25657
  </div>}
25207
- </For58>
25658
+ </For59>
25208
25659
  </div>}
25209
- </Show75>
25660
+ </Show77>
25210
25661
 
25211
25662
  <div>
25212
25663
  <button
@@ -25256,9 +25707,9 @@ var TAB_ORDER = [
25256
25707
  function AffiliatePortal(props) {
25257
25708
  const orderedTabs = () => props.enabledTabs ? TAB_ORDER.filter((t) => props.enabledTabs.includes(t)) : TAB_ORDER;
25258
25709
  const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "overview";
25259
- const [internalTab, setInternalTab] = createSignal50(fallbackTab());
25710
+ const [internalTab, setInternalTab] = createSignal53(fallbackTab());
25260
25711
  const currentTab = () => props.activeTab ?? internalTab();
25261
- const [drawerOpen, setDrawerOpen] = createSignal50(false);
25712
+ const [drawerOpen, setDrawerOpen] = createSignal53(false);
25262
25713
  createEffect18(() => {
25263
25714
  const auth = props.auth;
25264
25715
  if (!auth) return;
@@ -25277,7 +25728,7 @@ function AffiliatePortal(props) {
25277
25728
  props.onTabChange?.(tab);
25278
25729
  };
25279
25730
  const topOffset = () => props.topOffset ?? "0px";
25280
- return <Show76 when={allowed()} fallback={<AffiliateGateSpinner topOffset={topOffset()} />}>
25731
+ return <Show78 when={allowed()} fallback={<AffiliateGateSpinner topOffset={topOffset()} />}>
25281
25732
  <div
25282
25733
  class="app-affiliate-root app-affiliate-shell"
25283
25734
  classList={{ "is-drawer-open": drawerOpen() }}
@@ -25326,7 +25777,7 @@ function AffiliatePortal(props) {
25326
25777
  Affiliate Portal
25327
25778
  </h2>
25328
25779
  <nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
25329
- <For59 each={orderedTabs()}>
25780
+ <For60 each={orderedTabs()}>
25330
25781
  {(tab) => <button
25331
25782
  type="button"
25332
25783
  onClick={() => handleTabClick(tab)}
@@ -25345,15 +25796,15 @@ function AffiliatePortal(props) {
25345
25796
  color: currentTab() === tab ? "var(--app-affiliate-primary-soft-fg)" : "var(--app-affiliate-fg-muted)"
25346
25797
  }}
25347
25798
  >
25348
- <Show76 when={props.tabIcons?.[tab]}>
25799
+ <Show78 when={props.tabIcons?.[tab]}>
25349
25800
  <span
25350
25801
  class={props.tabIcons[tab]}
25351
25802
  style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
25352
25803
  />
25353
- </Show76>
25804
+ </Show78>
25354
25805
  {TAB_LABELS2[tab]}
25355
25806
  </button>}
25356
- </For59>
25807
+ </For60>
25357
25808
  </nav>
25358
25809
  </div>
25359
25810
  </aside>
@@ -25378,7 +25829,7 @@ function AffiliatePortal(props) {
25378
25829
  </Switch8>
25379
25830
  </div>
25380
25831
  </div>
25381
- </Show76>;
25832
+ </Show78>;
25382
25833
  }
25383
25834
  function AffiliateGateSpinner(props) {
25384
25835
  return <div
@@ -25410,12 +25861,12 @@ function AffiliateGateSpinner(props) {
25410
25861
  }
25411
25862
 
25412
25863
  // src/pages/AffiliateRegister.tsx
25413
- import { createSignal as createSignal52, Show as Show77 } from "solid-js";
25864
+ import { createSignal as createSignal55, Show as Show79 } from "solid-js";
25414
25865
 
25415
25866
  // src/pages/AffiliatePasswordInput.tsx
25416
- import { createSignal as createSignal51 } from "solid-js";
25867
+ import { createSignal as createSignal54 } from "solid-js";
25417
25868
  function AffiliatePasswordInput(props) {
25418
- const [visible, setVisible] = createSignal51(false);
25869
+ const [visible, setVisible] = createSignal54(false);
25419
25870
  return <div style={{ position: "relative" }}>
25420
25871
  <input
25421
25872
  type={visible() ? "text" : "password"}
@@ -25424,7 +25875,7 @@ function AffiliatePasswordInput(props) {
25424
25875
  value={props.value}
25425
25876
  onInput={(e) => props.onInput(e.currentTarget.value)}
25426
25877
  autocomplete={props.autocomplete}
25427
- style={inputStyle()}
25878
+ style={inputStyle2()}
25428
25879
  />
25429
25880
  <button
25430
25881
  type="button"
@@ -25452,7 +25903,7 @@ function AffiliatePasswordInput(props) {
25452
25903
  </button>
25453
25904
  </div>;
25454
25905
  }
25455
- function inputStyle() {
25906
+ function inputStyle2() {
25456
25907
  return {
25457
25908
  width: "100%",
25458
25909
  padding: "0.625rem 2.9rem 0.625rem 0.75rem",
@@ -25468,14 +25919,14 @@ function inputStyle() {
25468
25919
 
25469
25920
  // src/pages/AffiliateRegister.tsx
25470
25921
  function AffiliateRegister(props) {
25471
- const [firstName, setFirstName] = createSignal52("");
25472
- const [lastName, setLastName] = createSignal52("");
25473
- const [email, setEmail] = createSignal52("");
25474
- const [password, setPassword] = createSignal52("");
25475
- const [affiliateCode, setAffiliateCode] = createSignal52("");
25476
- const [submitting, setSubmitting] = createSignal52(false);
25477
- const [submitted, setSubmitted] = createSignal52(false);
25478
- const [error, setError] = createSignal52(null);
25922
+ const [firstName, setFirstName] = createSignal55("");
25923
+ const [lastName, setLastName] = createSignal55("");
25924
+ const [email, setEmail] = createSignal55("");
25925
+ const [password, setPassword] = createSignal55("");
25926
+ const [affiliateCode, setAffiliateCode] = createSignal55("");
25927
+ const [submitting, setSubmitting] = createSignal55(false);
25928
+ const [submitted, setSubmitted] = createSignal55(false);
25929
+ const [error, setError] = createSignal55(null);
25479
25930
  async function handleSubmit(e) {
25480
25931
  e.preventDefault();
25481
25932
  setError(null);
@@ -25542,7 +25993,7 @@ function AffiliateRegister(props) {
25542
25993
  </p>
25543
25994
  </div>
25544
25995
 
25545
- <Show77
25996
+ <Show79
25546
25997
  when={!submitted()}
25547
25998
  fallback={<div
25548
25999
  style={{
@@ -25568,7 +26019,7 @@ function AffiliateRegister(props) {
25568
26019
  value={firstName()}
25569
26020
  onInput={(e) => setFirstName(e.currentTarget.value)}
25570
26021
  autocomplete="given-name"
25571
- style={inputStyle2()}
26022
+ style={inputStyle3()}
25572
26023
  />
25573
26024
  </Row2>
25574
26025
  <Row2 label="Last name">
@@ -25578,7 +26029,7 @@ function AffiliateRegister(props) {
25578
26029
  value={lastName()}
25579
26030
  onInput={(e) => setLastName(e.currentTarget.value)}
25580
26031
  autocomplete="family-name"
25581
- style={inputStyle2()}
26032
+ style={inputStyle3()}
25582
26033
  />
25583
26034
  </Row2>
25584
26035
  <Row2 label="Email">
@@ -25588,7 +26039,7 @@ function AffiliateRegister(props) {
25588
26039
  value={email()}
25589
26040
  onInput={(e) => setEmail(e.currentTarget.value)}
25590
26041
  autocomplete="email"
25591
- style={inputStyle2()}
26042
+ style={inputStyle3()}
25592
26043
  />
25593
26044
  </Row2>
25594
26045
  <Row2 label="Password" hint="At least 8 characters">
@@ -25607,7 +26058,7 @@ function AffiliateRegister(props) {
25607
26058
  minLength={4}
25608
26059
  value={affiliateCode()}
25609
26060
  onInput={(e) => setAffiliateCode(e.currentTarget.value)}
25610
- style={inputStyle2()}
26061
+ style={inputStyle3()}
25611
26062
  />
25612
26063
  </Row2>
25613
26064
  <div
@@ -25638,7 +26089,7 @@ function AffiliateRegister(props) {
25638
26089
  the website address itself.
25639
26090
  </div>
25640
26091
 
25641
- <Show77 when={error()}>
26092
+ <Show79 when={error()}>
25642
26093
  <div
25643
26094
  style={{
25644
26095
  padding: "0.625rem 0.875rem",
@@ -25650,7 +26101,7 @@ function AffiliateRegister(props) {
25650
26101
  >
25651
26102
  {error()}
25652
26103
  </div>
25653
- </Show77>
26104
+ </Show79>
25654
26105
 
25655
26106
  <button
25656
26107
  type="submit"
@@ -25669,7 +26120,7 @@ function AffiliateRegister(props) {
25669
26120
  {submitting() ? "Submitting\u2026" : "Apply"}
25670
26121
  </button>
25671
26122
 
25672
- <Show77 when={props.onNavigateLogin}>
26123
+ <Show79 when={props.onNavigateLogin}>
25673
26124
  <button
25674
26125
  type="button"
25675
26126
  onClick={() => props.onNavigateLogin?.()}
@@ -25677,9 +26128,9 @@ function AffiliateRegister(props) {
25677
26128
  >
25678
26129
  Already have an account? Log in
25679
26130
  </button>
25680
- </Show77>
26131
+ </Show79>
25681
26132
  </form>
25682
- </Show77>
26133
+ </Show79>
25683
26134
  </div>
25684
26135
  </div>;
25685
26136
  }
@@ -25696,14 +26147,14 @@ function Row2(props) {
25696
26147
  {props.label}
25697
26148
  </span>
25698
26149
  {props.children}
25699
- <Show77 when={props.hint}>
26150
+ <Show79 when={props.hint}>
25700
26151
  <span style={{ "font-size": "0.75rem", color: "var(--app-affiliate-fg-subtle)" }}>
25701
26152
  {props.hint}
25702
26153
  </span>
25703
- </Show77>
26154
+ </Show79>
25704
26155
  </label>;
25705
26156
  }
25706
- function inputStyle2() {
26157
+ function inputStyle3() {
25707
26158
  return {
25708
26159
  width: "100%",
25709
26160
  padding: "0.625rem 0.75rem",
@@ -25730,12 +26181,12 @@ function linkStyle() {
25730
26181
  }
25731
26182
 
25732
26183
  // src/pages/AffiliateLogin.tsx
25733
- import { createSignal as createSignal53, Show as Show78 } from "solid-js";
26184
+ import { createSignal as createSignal56, Show as Show80 } from "solid-js";
25734
26185
  function AffiliateLogin(props) {
25735
- const [email, setEmail] = createSignal53("");
25736
- const [password, setPassword] = createSignal53("");
25737
- const [submitting, setSubmitting] = createSignal53(false);
25738
- const [error, setError] = createSignal53(null);
26186
+ const [email, setEmail] = createSignal56("");
26187
+ const [password, setPassword] = createSignal56("");
26188
+ const [submitting, setSubmitting] = createSignal56(false);
26189
+ const [error, setError] = createSignal56(null);
25739
26190
  async function handleSubmit(e) {
25740
26191
  e.preventDefault();
25741
26192
  setError(null);
@@ -25789,19 +26240,19 @@ function AffiliateLogin(props) {
25789
26240
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
25790
26241
  >
25791
26242
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
25792
- <span style={labelStyle()}>Email</span>
26243
+ <span style={labelStyle2()}>Email</span>
25793
26244
  <input
25794
26245
  type="email"
25795
26246
  required
25796
26247
  value={email()}
25797
26248
  onInput={(e) => setEmail(e.currentTarget.value)}
25798
26249
  autocomplete="email"
25799
- style={inputStyle3()}
26250
+ style={inputStyle4()}
25800
26251
  />
25801
26252
  </label>
25802
26253
 
25803
26254
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
25804
- <span style={labelStyle()}>Password</span>
26255
+ <span style={labelStyle2()}>Password</span>
25805
26256
  <AffiliatePasswordInput
25806
26257
  required
25807
26258
  value={password()}
@@ -25810,7 +26261,7 @@ function AffiliateLogin(props) {
25810
26261
  />
25811
26262
  </label>
25812
26263
 
25813
- <Show78 when={error()}>
26264
+ <Show80 when={error()}>
25814
26265
  <div
25815
26266
  style={{
25816
26267
  padding: "0.625rem 0.875rem",
@@ -25822,7 +26273,7 @@ function AffiliateLogin(props) {
25822
26273
  >
25823
26274
  {error()}
25824
26275
  </div>
25825
- </Show78>
26276
+ </Show80>
25826
26277
 
25827
26278
  <button
25828
26279
  type="submit"
@@ -25841,7 +26292,7 @@ function AffiliateLogin(props) {
25841
26292
  {submitting() ? "Logging in\u2026" : "Log in"}
25842
26293
  </button>
25843
26294
 
25844
- <Show78 when={props.onNavigateForgotPassword}>
26295
+ <Show80 when={props.onNavigateForgotPassword}>
25845
26296
  <button
25846
26297
  type="button"
25847
26298
  onClick={() => props.onNavigateForgotPassword?.()}
@@ -25858,9 +26309,9 @@ function AffiliateLogin(props) {
25858
26309
  >
25859
26310
  Forgot your password?
25860
26311
  </button>
25861
- </Show78>
26312
+ </Show80>
25862
26313
 
25863
- <Show78 when={props.onNavigateRegister}>
26314
+ <Show80 when={props.onNavigateRegister}>
25864
26315
  <button
25865
26316
  type="button"
25866
26317
  onClick={() => props.onNavigateRegister?.()}
@@ -25877,12 +26328,12 @@ function AffiliateLogin(props) {
25877
26328
  >
25878
26329
  New affiliate? Apply
25879
26330
  </button>
25880
- </Show78>
26331
+ </Show80>
25881
26332
  </form>
25882
26333
  </div>
25883
26334
  </div>;
25884
26335
  }
25885
- function labelStyle() {
26336
+ function labelStyle2() {
25886
26337
  return {
25887
26338
  "font-size": "0.75rem",
25888
26339
  "text-transform": "uppercase",
@@ -25890,7 +26341,7 @@ function labelStyle() {
25890
26341
  color: "var(--app-affiliate-fg-muted)"
25891
26342
  };
25892
26343
  }
25893
- function inputStyle3() {
26344
+ function inputStyle4() {
25894
26345
  return {
25895
26346
  width: "100%",
25896
26347
  padding: "0.625rem 0.75rem",
@@ -25905,12 +26356,12 @@ function inputStyle3() {
25905
26356
  }
25906
26357
 
25907
26358
  // src/pages/ForgotPassword.tsx
25908
- import { createSignal as createSignal54, Show as Show79 } from "solid-js";
26359
+ import { createSignal as createSignal57, Show as Show81 } from "solid-js";
25909
26360
  function ForgotPasswordPage(props) {
25910
- const [email, setEmail] = createSignal54("");
25911
- const [submitting, setSubmitting] = createSignal54(false);
25912
- const [error, setError] = createSignal54(null);
25913
- const [message, setMessage] = createSignal54(null);
26361
+ const [email, setEmail] = createSignal57("");
26362
+ const [submitting, setSubmitting] = createSignal57(false);
26363
+ const [error, setError] = createSignal57(null);
26364
+ const [message, setMessage] = createSignal57(null);
25914
26365
  async function handleSubmit(e) {
25915
26366
  e.preventDefault();
25916
26367
  setError(null);
@@ -25962,7 +26413,7 @@ function ForgotPasswordPage(props) {
25962
26413
  Reset your password
25963
26414
  </h1>
25964
26415
 
25965
- <Show79
26416
+ <Show81
25966
26417
  when={!message()}
25967
26418
  fallback={<>
25968
26419
  <div
@@ -25979,7 +26430,7 @@ function ForgotPasswordPage(props) {
25979
26430
  The link is good for one hour. If nothing arrives, check your spam folder — and make sure this is the
25980
26431
  address you signed up with.
25981
26432
  </p>
25982
- <Show79 when={props.onDone}>
26433
+ <Show81 when={props.onDone}>
25983
26434
  <button
25984
26435
  type="button"
25985
26436
  onClick={() => props.onDone?.()}
@@ -25995,7 +26446,7 @@ function ForgotPasswordPage(props) {
25995
26446
  >
25996
26447
  Back to sign in
25997
26448
  </button>
25998
- </Show79>
26449
+ </Show81>
25999
26450
  </>}
26000
26451
  >
26001
26452
  <form
@@ -26003,17 +26454,17 @@ function ForgotPasswordPage(props) {
26003
26454
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26004
26455
  >
26005
26456
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26006
- <span style={labelStyle2()}>Email</span>
26457
+ <span style={labelStyle3()}>Email</span>
26007
26458
  <input
26008
26459
  type="email"
26009
26460
  required
26010
26461
  value={email()}
26011
26462
  onInput={(e) => setEmail(e.currentTarget.value)}
26012
- style={inputStyle4()}
26463
+ style={inputStyle5()}
26013
26464
  />
26014
26465
  </label>
26015
26466
 
26016
- <Show79 when={error()}>
26467
+ <Show81 when={error()}>
26017
26468
  <div
26018
26469
  style={{
26019
26470
  padding: "0.625rem 0.875rem",
@@ -26025,7 +26476,7 @@ function ForgotPasswordPage(props) {
26025
26476
  >
26026
26477
  {error()}
26027
26478
  </div>
26028
- </Show79>
26479
+ </Show81>
26029
26480
 
26030
26481
  <button
26031
26482
  type="submit"
@@ -26044,11 +26495,11 @@ function ForgotPasswordPage(props) {
26044
26495
  {submitting() ? "Sending\u2026" : "Send reset link"}
26045
26496
  </button>
26046
26497
  </form>
26047
- </Show79>
26498
+ </Show81>
26048
26499
  </div>
26049
26500
  </div>;
26050
26501
  }
26051
- function labelStyle2() {
26502
+ function labelStyle3() {
26052
26503
  return {
26053
26504
  "font-size": "0.75rem",
26054
26505
  "text-transform": "uppercase",
@@ -26056,7 +26507,7 @@ function labelStyle2() {
26056
26507
  color: "var(--app-affiliate-fg-muted)"
26057
26508
  };
26058
26509
  }
26059
- function inputStyle4() {
26510
+ function inputStyle5() {
26060
26511
  return {
26061
26512
  width: "100%",
26062
26513
  padding: "0.625rem 0.75rem",
@@ -26071,19 +26522,19 @@ function inputStyle4() {
26071
26522
  }
26072
26523
 
26073
26524
  // src/pages/ResetPassword.tsx
26074
- import { createSignal as createSignal55, Show as Show80 } from "solid-js";
26075
- function queryParam(name) {
26525
+ import { createSignal as createSignal58, Show as Show82 } from "solid-js";
26526
+ function queryParam2(name) {
26076
26527
  if (typeof window === "undefined") return "";
26077
26528
  return new URLSearchParams(window.location.search).get(name) ?? "";
26078
26529
  }
26079
26530
  function ResetPasswordPage(props) {
26080
- const token = () => props.token ?? queryParam("token");
26081
- const email = () => props.email ?? queryParam("email");
26082
- const [password, setPassword] = createSignal55("");
26083
- const [confirm2, setConfirm] = createSignal55("");
26084
- const [submitting, setSubmitting] = createSignal55(false);
26085
- const [error, setError] = createSignal55(null);
26086
- const [message, setMessage] = createSignal55(null);
26531
+ const token = () => props.token ?? queryParam2("token");
26532
+ const email = () => props.email ?? queryParam2("email");
26533
+ const [password, setPassword] = createSignal58("");
26534
+ const [confirm2, setConfirm] = createSignal58("");
26535
+ const [submitting, setSubmitting] = createSignal58(false);
26536
+ const [error, setError] = createSignal58(null);
26537
+ const [message, setMessage] = createSignal58(null);
26087
26538
  async function handleSubmit(e) {
26088
26539
  e.preventDefault();
26089
26540
  setError(null);
@@ -26145,7 +26596,7 @@ function ResetPasswordPage(props) {
26145
26596
  Choose a new password
26146
26597
  </h1>
26147
26598
 
26148
- <Show80
26599
+ <Show82
26149
26600
  when={!message()}
26150
26601
  fallback={<div
26151
26602
  style={{
@@ -26163,30 +26614,30 @@ function ResetPasswordPage(props) {
26163
26614
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26164
26615
  >
26165
26616
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26166
- <span style={labelStyle3()}>New password</span>
26617
+ <span style={labelStyle4()}>New password</span>
26167
26618
  <input
26168
26619
  type="password"
26169
26620
  required
26170
26621
  value={password()}
26171
26622
  onInput={(e) => setPassword(e.currentTarget.value)}
26172
26623
  autocomplete="new-password"
26173
- style={inputStyle5()}
26624
+ style={inputStyle6()}
26174
26625
  />
26175
26626
  </label>
26176
26627
 
26177
26628
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26178
- <span style={labelStyle3()}>Confirm password</span>
26629
+ <span style={labelStyle4()}>Confirm password</span>
26179
26630
  <input
26180
26631
  type="password"
26181
26632
  required
26182
26633
  value={confirm2()}
26183
26634
  onInput={(e) => setConfirm(e.currentTarget.value)}
26184
26635
  autocomplete="new-password"
26185
- style={inputStyle5()}
26636
+ style={inputStyle6()}
26186
26637
  />
26187
26638
  </label>
26188
26639
 
26189
- <Show80 when={error()}>
26640
+ <Show82 when={error()}>
26190
26641
  <div
26191
26642
  style={{
26192
26643
  padding: "0.625rem 0.875rem",
@@ -26198,7 +26649,7 @@ function ResetPasswordPage(props) {
26198
26649
  >
26199
26650
  {error()}
26200
26651
  </div>
26201
- </Show80>
26652
+ </Show82>
26202
26653
 
26203
26654
  <button
26204
26655
  type="submit"
@@ -26217,11 +26668,11 @@ function ResetPasswordPage(props) {
26217
26668
  {submitting() ? "Resetting\u2026" : "Reset password"}
26218
26669
  </button>
26219
26670
  </form>
26220
- </Show80>
26671
+ </Show82>
26221
26672
  </div>
26222
26673
  </div>;
26223
26674
  }
26224
- function labelStyle3() {
26675
+ function labelStyle4() {
26225
26676
  return {
26226
26677
  "font-size": "0.75rem",
26227
26678
  "text-transform": "uppercase",
@@ -26229,7 +26680,7 @@ function labelStyle3() {
26229
26680
  color: "var(--app-affiliate-fg-muted)"
26230
26681
  };
26231
26682
  }
26232
- function inputStyle5() {
26683
+ function inputStyle6() {
26233
26684
  return {
26234
26685
  width: "100%",
26235
26686
  padding: "0.625rem 0.75rem",
@@ -26244,12 +26695,12 @@ function inputStyle5() {
26244
26695
  }
26245
26696
 
26246
26697
  // src/pages/AffiliateForgotPassword.tsx
26247
- import { createSignal as createSignal56, Show as Show81 } from "solid-js";
26698
+ import { createSignal as createSignal59, Show as Show83 } from "solid-js";
26248
26699
  function AffiliateForgotPassword(props) {
26249
- const [email, setEmail] = createSignal56("");
26250
- const [submitting, setSubmitting] = createSignal56(false);
26251
- const [error, setError] = createSignal56(null);
26252
- const [message, setMessage] = createSignal56(null);
26700
+ const [email, setEmail] = createSignal59("");
26701
+ const [submitting, setSubmitting] = createSignal59(false);
26702
+ const [error, setError] = createSignal59(null);
26703
+ const [message, setMessage] = createSignal59(null);
26253
26704
  async function handleSubmit(e) {
26254
26705
  e.preventDefault();
26255
26706
  setError(null);
@@ -26270,7 +26721,7 @@ function AffiliateForgotPassword(props) {
26270
26721
  <div style={cardStyle()}>
26271
26722
  <h1 style={headingStyle()}>Reset your password</h1>
26272
26723
 
26273
- <Show81
26724
+ <Show83
26274
26725
  when={!message()}
26275
26726
  fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>{message()}</p>}
26276
26727
  >
@@ -26279,32 +26730,32 @@ function AffiliateForgotPassword(props) {
26279
26730
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26280
26731
  >
26281
26732
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26282
- <span style={labelStyle4()}>Email</span>
26733
+ <span style={labelStyle5()}>Email</span>
26283
26734
  <input
26284
26735
  type="email"
26285
26736
  required
26286
26737
  value={email()}
26287
26738
  onInput={(e) => setEmail(e.currentTarget.value)}
26288
26739
  autocomplete="email"
26289
- style={inputStyle6()}
26740
+ style={inputStyle7()}
26290
26741
  />
26291
26742
  </label>
26292
26743
 
26293
- <Show81 when={error()}>
26744
+ <Show83 when={error()}>
26294
26745
  <div style={errorStyle()}>{error()}</div>
26295
- </Show81>
26746
+ </Show83>
26296
26747
 
26297
26748
  <button type="submit" disabled={submitting()} style={primaryButtonStyle(submitting())}>
26298
26749
  {submitting() ? "Sending\u2026" : "Send reset link"}
26299
26750
  </button>
26300
26751
  </form>
26301
- </Show81>
26752
+ </Show83>
26302
26753
 
26303
- <Show81 when={props.onNavigateLogin}>
26754
+ <Show83 when={props.onNavigateLogin}>
26304
26755
  <button type="button" onClick={() => props.onNavigateLogin?.()} style={linkStyle2()}>
26305
26756
  Back to login
26306
26757
  </button>
26307
- </Show81>
26758
+ </Show83>
26308
26759
  </div>
26309
26760
  </div>;
26310
26761
  }
@@ -26339,7 +26790,7 @@ function headingStyle() {
26339
26790
  "font-size": "1.5rem"
26340
26791
  };
26341
26792
  }
26342
- function labelStyle4() {
26793
+ function labelStyle5() {
26343
26794
  return {
26344
26795
  "font-size": "0.75rem",
26345
26796
  "text-transform": "uppercase",
@@ -26347,7 +26798,7 @@ function labelStyle4() {
26347
26798
  color: "var(--app-affiliate-fg-muted)"
26348
26799
  };
26349
26800
  }
26350
- function inputStyle6() {
26801
+ function inputStyle7() {
26351
26802
  return {
26352
26803
  width: "100%",
26353
26804
  padding: "0.625rem 0.75rem",
@@ -26395,19 +26846,19 @@ function linkStyle2() {
26395
26846
  }
26396
26847
 
26397
26848
  // src/pages/AffiliateResetPassword.tsx
26398
- import { createSignal as createSignal57, Show as Show82 } from "solid-js";
26399
- function queryParam2(name) {
26849
+ import { createSignal as createSignal60, Show as Show84 } from "solid-js";
26850
+ function queryParam3(name) {
26400
26851
  if (typeof window === "undefined") return "";
26401
26852
  return new URLSearchParams(window.location.search).get(name) ?? "";
26402
26853
  }
26403
26854
  function AffiliateResetPassword(props) {
26404
- const token = () => props.token ?? queryParam2("token");
26405
- const email = () => props.email ?? queryParam2("email");
26406
- const [password, setPassword] = createSignal57("");
26407
- const [confirm2, setConfirm] = createSignal57("");
26408
- const [submitting, setSubmitting] = createSignal57(false);
26409
- const [error, setError] = createSignal57(null);
26410
- const [done, setDone] = createSignal57(false);
26855
+ const token = () => props.token ?? queryParam3("token");
26856
+ const email = () => props.email ?? queryParam3("email");
26857
+ const [password, setPassword] = createSignal60("");
26858
+ const [confirm2, setConfirm] = createSignal60("");
26859
+ const [submitting, setSubmitting] = createSignal60(false);
26860
+ const [error, setError] = createSignal60(null);
26861
+ const [done, setDone] = createSignal60(false);
26411
26862
  async function handleSubmit(e) {
26412
26863
  e.preventDefault();
26413
26864
  setError(null);
@@ -26442,7 +26893,7 @@ function AffiliateResetPassword(props) {
26442
26893
  <div style={cardStyle2()}>
26443
26894
  <h1 style={headingStyle2()}>Choose a new password</h1>
26444
26895
 
26445
- <Show82
26896
+ <Show84
26446
26897
  when={!done()}
26447
26898
  fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>
26448
26899
  Your password has been reset. You can now log in with your new password.
@@ -26453,7 +26904,7 @@ function AffiliateResetPassword(props) {
26453
26904
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26454
26905
  >
26455
26906
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26456
- <span style={labelStyle5()}>New password</span>
26907
+ <span style={labelStyle6()}>New password</span>
26457
26908
  <AffiliatePasswordInput
26458
26909
  required
26459
26910
  minLength={8}
@@ -26464,7 +26915,7 @@ function AffiliateResetPassword(props) {
26464
26915
  </label>
26465
26916
 
26466
26917
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26467
- <span style={labelStyle5()}>Confirm new password</span>
26918
+ <span style={labelStyle6()}>Confirm new password</span>
26468
26919
  <AffiliatePasswordInput
26469
26920
  required
26470
26921
  minLength={8}
@@ -26474,15 +26925,15 @@ function AffiliateResetPassword(props) {
26474
26925
  />
26475
26926
  </label>
26476
26927
 
26477
- <Show82 when={error()}>
26928
+ <Show84 when={error()}>
26478
26929
  <div style={errorStyle2()}>{error()}</div>
26479
- </Show82>
26930
+ </Show84>
26480
26931
 
26481
26932
  <button type="submit" disabled={submitting()} style={primaryButtonStyle2(submitting())}>
26482
26933
  {submitting() ? "Saving\u2026" : "Set new password"}
26483
26934
  </button>
26484
26935
  </form>
26485
- </Show82>
26936
+ </Show84>
26486
26937
  </div>
26487
26938
  </div>;
26488
26939
  }
@@ -26517,7 +26968,7 @@ function headingStyle2() {
26517
26968
  "font-size": "1.5rem"
26518
26969
  };
26519
26970
  }
26520
- function labelStyle5() {
26971
+ function labelStyle6() {
26521
26972
  return {
26522
26973
  "font-size": "0.75rem",
26523
26974
  "text-transform": "uppercase",
@@ -26557,6 +27008,7 @@ export {
26557
27008
  RegisterPage,
26558
27009
  SubscribePage,
26559
27010
  EmailTemplates,
27011
+ AcceptAdminInvitePage,
26560
27012
  AdminDashboard,
26561
27013
  ADMIN_TAB_SEGMENTS,
26562
27014
  AFFILIATE_SUB_TAB_SEGMENTS,
@@ -26575,4 +27027,4 @@ export {
26575
27027
  AffiliateForgotPassword,
26576
27028
  AffiliateResetPassword
26577
27029
  };
26578
- //# sourceMappingURL=Z745N7NE.jsx.map
27030
+ //# sourceMappingURL=VUDLDIMS.jsx.map