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

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 +27 -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/{Z745N7NE.jsx → 2LZ4RMMO.jsx} +1066 -627
  6. package/dist/chunk/{NQLBWDE3.js → 54ICTHZX.js} +34 -3
  7. package/dist/chunk/54ICTHZX.js.map +1 -0
  8. package/dist/chunk/{COIUOQOE.js → 5DNJWMSW.js} +3 -3
  9. package/dist/chunk/{COIUOQOE.js.map → 5DNJWMSW.js.map} +1 -1
  10. package/dist/chunk/{FDCDDUB6.js → ERW2WNI6.js} +933 -515
  11. package/dist/chunk/ERW2WNI6.js.map +1 -0
  12. package/dist/chunk/{PDK3JMIW.jsx → FAKJL3AD.jsx} +33 -1
  13. package/dist/chunk/{XGCOWLXF.jsx → KI3RUQTI.jsx} +2 -2
  14. package/dist/chunk/{XZJASVNG.jsx → KSWWT576.jsx} +5 -5
  15. package/dist/chunk/{3VUCQNOR.js → L6ZE7Q7C.js} +3 -3
  16. package/dist/chunk/{3VUCQNOR.js.map → L6ZE7Q7C.js.map} +1 -1
  17. package/dist/chunk/{OOCYQ4I6.jsx → LON6ZV4S.jsx} +2 -2
  18. package/dist/chunk/{DETBZTGQ.js → Q7VYJUQC.js} +5 -5
  19. package/dist/chunk/{DETBZTGQ.js.map → Q7VYJUQC.js.map} +1 -1
  20. package/dist/chunk/{3VBKKYOR.js → QJAMR6MG.js} +3 -3
  21. package/dist/chunk/{3VBKKYOR.js.map → QJAMR6MG.js.map} +1 -1
  22. package/dist/chunk/{PW7F2JMV.jsx → TFELHUFX.jsx} +2 -2
  23. package/dist/chunk/{JDCV4T6O.js → TKN2GOKS.js} +6 -6
  24. package/dist/chunk/{JDCV4T6O.js.map → TKN2GOKS.js.map} +1 -1
  25. package/dist/chunk/{2PME7R6L.jsx → YGKENMTV.jsx} +4 -4
  26. package/dist/{client-JZfa9Gbp.d.ts → client-CEt_6guF.d.ts} +68 -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 +31 -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 "./YGKENMTV.jsx";
88
88
  import {
89
89
  fetchFunnelConfig
90
- } from "./PW7F2JMV.jsx";
90
+ } from "./TFELHUFX.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 "./LON6ZV4S.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 "./FAKJL3AD.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 createSignal43, ErrorBoundary, Match as Match5, Show as Show61, 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,6 +21863,197 @@ function Features() {
21852
21863
  </div>;
21853
21864
  }
21854
21865
 
21866
+ // src/pages/admin/Admins.tsx
21867
+ import { createResource as createResource28, createSignal as createSignal42, For as For47, Show as Show60 } from "solid-js";
21868
+ var ADMIN_ROLE_SUMMARY = {
21869
+ owner: "Everything, including managing admins",
21870
+ support: "Customers, patient records, support, subscriptions and refunds",
21871
+ accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
21872
+ marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
21873
+ };
21874
+ var ROLE_LABEL = {
21875
+ owner: "Owner",
21876
+ support: "Support agent",
21877
+ accounting: "Accounting",
21878
+ marketing: "Marketing"
21879
+ };
21880
+ function RoleSelect(props) {
21881
+ return <select
21882
+ class="app-admin-input"
21883
+ value={props.value ?? ""}
21884
+ disabled={props.disabled}
21885
+ onChange={(e) => props.onChange(e.currentTarget.value)}
21886
+ >
21887
+ <Show60 when={props.value === null}>
21888
+ <option value="" disabled>
21889
+ Unknown role
21890
+ </option>
21891
+ </Show60>
21892
+ <For47 each={ADMIN_ROLES}>{(r) => <option value={r}>{ROLE_LABEL[r]}</option>}</For47>
21893
+ </select>;
21894
+ }
21895
+ function Admins(props) {
21896
+ const [team, { refetch }] = createResource28(() => adminApi.listAdminTeam());
21897
+ const [email, setEmail] = createSignal42("");
21898
+ const [role, setRole] = createSignal42("marketing");
21899
+ const [inviting, setInviting] = createSignal42(false);
21900
+ const [apexNote, setApexNote] = createSignal42(null);
21901
+ async function run(action, success) {
21902
+ try {
21903
+ await action();
21904
+ toastSuccess(success);
21905
+ } catch (err) {
21906
+ toastError(err instanceof Error ? err.message : "Something went wrong");
21907
+ }
21908
+ await refetch();
21909
+ }
21910
+ async function invite(e) {
21911
+ e.preventDefault();
21912
+ const address = email().trim().toLowerCase();
21913
+ if (!address) return;
21914
+ setInviting(true);
21915
+ setApexNote(null);
21916
+ try {
21917
+ const result = await adminApi.inviteAdmin({
21918
+ email: address,
21919
+ adminRole: role(),
21920
+ acceptUrl: props.acceptInviteUrl
21921
+ });
21922
+ if (result.apexInviteRequired) {
21923
+ setApexNote(
21924
+ `${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.`
21925
+ );
21926
+ toastSuccess("Role saved for their first sign-in");
21927
+ } else {
21928
+ toastSuccess(`Invite sent to ${address}`);
21929
+ }
21930
+ setEmail("");
21931
+ setRole("marketing");
21932
+ } catch (err) {
21933
+ toastError(err instanceof Error ? err.message : "Failed to send invite");
21934
+ } finally {
21935
+ setInviting(false);
21936
+ await refetch();
21937
+ }
21938
+ }
21939
+ const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
21940
+ const remove = (a) => {
21941
+ if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
21942
+ void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
21943
+ };
21944
+ const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
21945
+ const cancelInvite = (i) => {
21946
+ if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
21947
+ void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
21948
+ };
21949
+ const isMe = (a) => adminMe()?.uid === a.id;
21950
+ return <div>
21951
+ <PageTitle subtitle="Who can use this admin, and what each person can see and do.">Admins</PageTitle>
21952
+
21953
+ <form onSubmit={invite} class="app-admin-card" style={{ padding: "1rem", "margin-bottom": "1.5rem" }}>
21954
+ <div class="app-admin-heading" style={{ "font-size": "1rem", "margin-bottom": "0.75rem" }}>
21955
+ Invite an admin
21956
+ </div>
21957
+ <div style={{ display: "flex", gap: "0.75rem", "flex-wrap": "wrap", "align-items": "flex-end" }}>
21958
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem", flex: "1 1 16rem" }}>
21959
+ <span class="app-admin-label">Email</span>
21960
+ <input
21961
+ class="app-admin-input"
21962
+ type="email"
21963
+ required
21964
+ value={email()}
21965
+ onInput={(e) => setEmail(e.currentTarget.value)}
21966
+ placeholder="name@example.com"
21967
+ />
21968
+ </label>
21969
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
21970
+ <span class="app-admin-label">Role</span>
21971
+ <RoleSelect value={role()} onChange={setRole} />
21972
+ </label>
21973
+ <button type="submit" class="app-admin-btn app-admin-btn-primary" disabled={inviting()}>
21974
+ {inviting() ? "Sending\u2026" : "Send invite"}
21975
+ </button>
21976
+ </div>
21977
+ <div class="app-admin-text-muted" style={{ "font-size": "0.8125rem", "margin-top": "0.5rem" }}>
21978
+ {ROLE_LABEL[role()]}: {ADMIN_ROLE_SUMMARY[role()]}
21979
+ </div>
21980
+ <Show60 when={apexNote()}>
21981
+ <div class="app-admin-card-soft" style={{ padding: "0.625rem 0.875rem", "margin-top": "0.75rem", "font-size": "0.875rem" }}>
21982
+ {apexNote()}
21983
+ </div>
21984
+ </Show60>
21985
+ </form>
21986
+
21987
+ <Show60 when={!team.loading} fallback={<LoadingSpinner />}>
21988
+ <Show60 when={!team.error} fallback={<EmptyState message="Couldn't load the admin team." />}>
21989
+ <table class="app-admin-table">
21990
+ <thead>
21991
+ <tr>
21992
+ <th>Admin</th>
21993
+ <th>Role</th>
21994
+ <th style={{ "text-align": "right" }} />
21995
+ </tr>
21996
+ </thead>
21997
+ <tbody>
21998
+ <For47 each={team()?.admins ?? []}>
21999
+ {(a) => <tr>
22000
+ <td>
22001
+ {a.email}
22002
+ <Show60 when={isMe(a)}>
22003
+ <span class="app-admin-text-muted"> (you)</span>
22004
+ </Show60>
22005
+ </td>
22006
+ <td>
22007
+ <RoleSelect value={a.adminRole} onChange={(r) => void changeRole(a, r)} />
22008
+ </td>
22009
+ <td style={{ "text-align": "right" }}>
22010
+ <button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => remove(a)}>
22011
+ Remove
22012
+ </button>
22013
+ </td>
22014
+ </tr>}
22015
+ </For47>
22016
+ </tbody>
22017
+ </table>
22018
+
22019
+ <Show60 when={(team()?.invites ?? []).length > 0}>
22020
+ <div class="app-admin-heading" style={{ "font-size": "1rem", margin: "1.5rem 0 0.5rem" }}>
22021
+ Pending invites
22022
+ </div>
22023
+ <table class="app-admin-table">
22024
+ <thead>
22025
+ <tr>
22026
+ <th>Email</th>
22027
+ <th>Role when they join</th>
22028
+ <th>Expires</th>
22029
+ <th style={{ "text-align": "right" }} />
22030
+ </tr>
22031
+ </thead>
22032
+ <tbody>
22033
+ <For47 each={team()?.invites ?? []}>
22034
+ {(i) => <tr>
22035
+ <td>{i.email}</td>
22036
+ <td>
22037
+ <RoleSelect value={i.adminRole} onChange={(r) => void changeInviteRole(i, r)} />
22038
+ </td>
22039
+ <td class="app-admin-text-muted">
22040
+ {i.expiresAt ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in"}
22041
+ </td>
22042
+ <td style={{ "text-align": "right" }}>
22043
+ <button type="button" class="app-admin-btn app-admin-btn-ghost" onClick={() => cancelInvite(i)}>
22044
+ Withdraw
22045
+ </button>
22046
+ </td>
22047
+ </tr>}
22048
+ </For47>
22049
+ </tbody>
22050
+ </table>
22051
+ </Show60>
22052
+ </Show60>
22053
+ </Show60>
22054
+ </div>;
22055
+ }
22056
+
21855
22057
  // src/pages/AdminDashboard.tsx
21856
22058
  var TAB_LABELS = {
21857
22059
  dashboard: "Dashboard",
@@ -21871,7 +22073,34 @@ var TAB_LABELS = {
21871
22073
  funnel: "Funnel",
21872
22074
  sequences: "Sequences",
21873
22075
  "sequence-results": "Results",
21874
- features: "Features"
22076
+ features: "Features",
22077
+ admins: "Admins"
22078
+ };
22079
+ var TAB_PERMISSION = {
22080
+ dashboard: null,
22081
+ customers: "customers.read",
22082
+ payments: "billing.read",
22083
+ subscriptions: "customers.read",
22084
+ products: "catalog.read",
22085
+ categories: "catalog.read",
22086
+ sales: "promotions.read",
22087
+ "promo-codes": "promotions.read",
22088
+ offers: "promotions.read",
22089
+ affiliates: "affiliates.read",
22090
+ support: "patient.support",
22091
+ webhooks: "patient.support",
22092
+ "email-templates": "emailTemplates.write",
22093
+ funnel: "funnel.read",
22094
+ sequences: "funnel.read",
22095
+ "sequence-results": "funnel.read",
22096
+ "email-notifications": "settings.write",
22097
+ features: "settings.write",
22098
+ admins: "admins.manage"
22099
+ };
22100
+ var roleAllows = (tab) => {
22101
+ const permission = TAB_PERMISSION[tab];
22102
+ if (permission === null) return true;
22103
+ return adminMe() !== void 0 && adminCan(permission);
21875
22104
  };
21876
22105
  var DEFAULT_TOP_TABS = ["dashboard"];
21877
22106
  var DEFAULT_TAB_GROUPS = [
@@ -21885,11 +22114,11 @@ var DEFAULT_TAB_GROUPS = [
21885
22114
  { label: "Email", tabs: ["email-templates", "email-notifications"] },
21886
22115
  { label: "Integrations", tabs: ["webhooks"] },
21887
22116
  // What this site has switched on, and what it can ask for.
21888
- { label: "Settings", tabs: ["features"] }
22117
+ { label: "Settings", tabs: ["features", "admins"] }
21889
22118
  ];
21890
22119
  var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
21891
22120
  function AdminDashboard(props) {
21892
- const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
22121
+ const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
21893
22122
  const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
21894
22123
  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
22124
  const orderedTabs = () => [
@@ -21899,9 +22128,9 @@ function AdminDashboard(props) {
21899
22128
  const isTabEnabled = (tab) => orderedTabs().includes(tab);
21900
22129
  const affiliatesEnabled = () => props.enabledTabs ? props.enabledTabs.includes("affiliates") : true;
21901
22130
  const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "dashboard";
21902
- const [internalTab, setInternalTab] = createSignal41(fallbackTab());
22131
+ const [internalTab, setInternalTab] = createSignal43(fallbackTab());
21903
22132
  const currentTab = () => props.activeTab ?? internalTab();
21904
- const [drawerOpen, setDrawerOpen] = createSignal41(false);
22133
+ const [drawerOpen, setDrawerOpen] = createSignal43(false);
21905
22134
  createEffect16(() => {
21906
22135
  setAdminToast(props.toast);
21907
22136
  });
@@ -21921,14 +22150,18 @@ function AdminDashboard(props) {
21921
22150
  if (!auth) return true;
21922
22151
  return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
21923
22152
  };
22153
+ createEffect16(() => {
22154
+ if (!adminAllowed()) return;
22155
+ void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
22156
+ });
21924
22157
  createEffect16(() => {
21925
22158
  if (!adminAllowed()) return;
21926
22159
  void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
21927
22160
  });
21928
22161
  });
21929
- const [pendingCustomerUid, setPendingCustomerUid] = createSignal41(null);
21930
- const [pendingThreadId, setPendingThreadId] = createSignal41(null);
21931
- const [pendingTemplateId, setPendingTemplateId] = createSignal41(null);
22162
+ const [pendingCustomerUid, setPendingCustomerUid] = createSignal43(null);
22163
+ const [pendingThreadId, setPendingThreadId] = createSignal43(null);
22164
+ const [pendingTemplateId, setPendingTemplateId] = createSignal43(null);
21932
22165
  const handleTabClick = (tab, opts) => {
21933
22166
  if (!opts?.keepPending) {
21934
22167
  setPendingCustomerUid(null);
@@ -21977,15 +22210,15 @@ function AdminDashboard(props) {
21977
22210
  color: currentTab() === btnProps.tab ? "var(--app-admin-primary-soft-fg)" : "var(--app-admin-fg-muted)"
21978
22211
  }}
21979
22212
  >
21980
- <Show60 when={props.tabIcons?.[btnProps.tab]}>
22213
+ <Show61 when={props.tabIcons?.[btnProps.tab]}>
21981
22214
  <span
21982
22215
  class={props.tabIcons[btnProps.tab]}
21983
22216
  style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
21984
22217
  />
21985
- </Show60>
22218
+ </Show61>
21986
22219
  {TAB_LABELS[btnProps.tab]}
21987
22220
  </button>;
21988
- return <Show60 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
22221
+ return <Show61 when={adminAllowed()} fallback={<AdminGateSpinner topOffset={props.topOffset ?? "0px"} />}>
21989
22222
  <AdminNavContext.Provider value={adminNav}>
21990
22223
  {
21991
22224
  /* data-scrollable opts the whole admin out of a host page's smooth-scroll
@@ -22040,8 +22273,8 @@ function AdminDashboard(props) {
22040
22273
  Admin Panel
22041
22274
  </h2>
22042
22275
  <nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
22043
- <For47 each={visibleTopTabs()}>{(tab) => <TabButton tab={tab} />}</For47>
22044
- <For47 each={visibleGroups()}>
22276
+ <For48 each={visibleTopTabs()}>{(tab) => <TabButton tab={tab} />}</For48>
22277
+ <For48 each={visibleGroups()}>
22045
22278
  {(group) => <>
22046
22279
  <h3
22047
22280
  style={{
@@ -22056,9 +22289,9 @@ function AdminDashboard(props) {
22056
22289
  >
22057
22290
  {group.label}
22058
22291
  </h3>
22059
- <For47 each={group.tabs}>{(tab) => <TabButton tab={tab} />}</For47>
22292
+ <For48 each={group.tabs}>{(tab) => <TabButton tab={tab} />}</For48>
22060
22293
  </>}
22061
- </For47>
22294
+ </For48>
22062
22295
  </nav>
22063
22296
  </div>
22064
22297
  </aside>
@@ -22070,8 +22303,12 @@ function AdminDashboard(props) {
22070
22303
  (which would wedge the sidebar nav), and switching tabs mounts a fresh
22071
22304
  boundary that clears a prior tab's error. */
22072
22305
  }
22073
- <Show60 when={currentTab()} keyed>
22306
+ <Show61 when={currentTab()} keyed>
22074
22307
  <ErrorBoundary fallback={(err, reset) => <AdminTabError error={err} reset={reset} />}>
22308
+ <Show61
22309
+ when={adminMe() === void 0 || roleAllows(currentTab())}
22310
+ fallback={<RoleForbidden />}
22311
+ >
22075
22312
  <Switch5 fallback={<Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />}>
22076
22313
  <Match5 when={currentTab() === "dashboard"}>
22077
22314
  <Dashboard onSelectTab={handleTabClick} isTabEnabled={isTabEnabled} />
@@ -22140,13 +22377,35 @@ function AdminDashboard(props) {
22140
22377
  <Match5 when={currentTab() === "features"}>
22141
22378
  <Features />
22142
22379
  </Match5>
22380
+ <Match5 when={currentTab() === "admins"}>
22381
+ <Admins acceptInviteUrl={props.adminInviteAcceptUrl} />
22382
+ </Match5>
22143
22383
  </Switch5>
22384
+ </Show61>
22144
22385
  </ErrorBoundary>
22145
- </Show60>
22386
+ </Show61>
22146
22387
  </div>
22147
22388
  </div>
22148
22389
  </AdminNavContext.Provider>
22149
- </Show60>;
22390
+ </Show61>;
22391
+ }
22392
+ function RoleForbidden() {
22393
+ return <div
22394
+ role="alert"
22395
+ style={{
22396
+ margin: "1rem 0",
22397
+ padding: "1.25rem 1.5rem",
22398
+ border: "1px solid var(--app-admin-border)",
22399
+ "border-radius": "var(--app-admin-radius-sm)",
22400
+ background: "var(--app-admin-surface)",
22401
+ color: "var(--app-admin-fg)"
22402
+ }}
22403
+ >
22404
+ <div style={{ "font-weight": "600", "margin-bottom": "0.375rem" }}>Not available for your role</div>
22405
+ <div style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
22406
+ Ask an owner of this site if you need access to this section.
22407
+ </div>
22408
+ </div>;
22150
22409
  }
22151
22410
  function AdminTabError(props) {
22152
22411
  console.error("[AdminDashboard] tab failed to render:", props.error);
@@ -22241,7 +22500,8 @@ var ADMIN_TAB_SEGMENTS = {
22241
22500
  sequences: "sequences",
22242
22501
  "sequence-results": "sequence-results",
22243
22502
  "email-notifications": "email-notifications",
22244
- features: "features"
22503
+ features: "features",
22504
+ admins: "admins"
22245
22505
  };
22246
22506
  var AFFILIATE_SUB_TAB_SEGMENTS = {
22247
22507
  overview: "",
@@ -22289,7 +22549,7 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
22289
22549
  }
22290
22550
 
22291
22551
  // src/pages/admin/PatientDashboardPreview.tsx
22292
- import { Show as Show61, For as For48 } from "solid-js";
22552
+ import { Show as Show62, For as For49 } from "solid-js";
22293
22553
  function PatientDashboardPreview(props) {
22294
22554
  const data = useDashboardData({ authToken: () => props.token });
22295
22555
  return <div
@@ -22331,7 +22591,7 @@ function PatientDashboardPreview(props) {
22331
22591
  /* A failed read is an error with a retry — never presented as an
22332
22592
  empty dashboard (the customer may have plenty of data). */
22333
22593
  }
22334
- <Show61 when={data.error()} keyed>
22594
+ <Show62 when={data.error()} keyed>
22335
22595
  {(msg) => <div
22336
22596
  style={{
22337
22597
  display: "flex",
@@ -22356,10 +22616,10 @@ function PatientDashboardPreview(props) {
22356
22616
  Retry
22357
22617
  </button>
22358
22618
  </div>}
22359
- </Show61>
22619
+ </Show62>
22360
22620
 
22361
- <Show61 when={!data.profile.loading} fallback={<LoadingSpinner />}>
22362
- <Show61
22621
+ <Show62 when={!data.profile.loading} fallback={<LoadingSpinner />}>
22622
+ <Show62
22363
22623
  when={data.profile()}
22364
22624
  fallback={<p style={{ color: "var(--app-admin-fg-muted)", "font-size": "0.875rem" }}>
22365
22625
  Could not load this customer's dashboard.
@@ -22392,7 +22652,7 @@ function PatientDashboardPreview(props) {
22392
22652
  }
22393
22653
  <div>
22394
22654
  <h3 style={panelSectionHeader}>Subscription</h3>
22395
- <Show61
22655
+ <Show62
22396
22656
  when={data.subscription()}
22397
22657
  fallback={<p
22398
22658
  style={{
@@ -22412,13 +22672,13 @@ function PatientDashboardPreview(props) {
22412
22672
  }}
22413
22673
  >
22414
22674
  <span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
22415
- <Show61 when={sub().amount != null} fallback="Subscription">
22675
+ <Show62 when={sub().amount != null} fallback="Subscription">
22416
22676
  {centsToUsd(sub().amount)}/mo
22417
- </Show61>
22677
+ </Show62>
22418
22678
  </span>
22419
22679
  <StatusBadge status={sub().status} />
22420
22680
  </div>
22421
- <Show61 when={sub().nextBillingDate}>
22681
+ <Show62 when={sub().nextBillingDate}>
22422
22682
  <p
22423
22683
  style={{
22424
22684
  "font-size": "0.75rem",
@@ -22428,15 +22688,15 @@ function PatientDashboardPreview(props) {
22428
22688
  >
22429
22689
  Next charge {fmtDate(sub().nextBillingDate)}
22430
22690
  </p>
22431
- </Show61>
22691
+ </Show62>
22432
22692
  </div>}
22433
- </Show61>
22693
+ </Show62>
22434
22694
  </div>
22435
22695
 
22436
22696
  {
22437
22697
  /* Prescription status */
22438
22698
  }
22439
- <Show61 when={data.rxStatus()}>
22699
+ <Show62 when={data.rxStatus()}>
22440
22700
  {(rx) => <div>
22441
22701
  <h3 style={panelSectionHeader}>Prescription status</h3>
22442
22702
  <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
@@ -22452,7 +22712,7 @@ function PatientDashboardPreview(props) {
22452
22712
  </span>
22453
22713
  <StatusBadge status={rx().status} />
22454
22714
  </div>
22455
- <Show61 when={rx().reason}>
22715
+ <Show62 when={rx().reason}>
22456
22716
  <p
22457
22717
  style={{
22458
22718
  "font-size": "0.75rem",
@@ -22462,17 +22722,17 @@ function PatientDashboardPreview(props) {
22462
22722
  >
22463
22723
  {rx().reason}
22464
22724
  </p>
22465
- </Show61>
22725
+ </Show62>
22466
22726
  </div>
22467
22727
  </div>}
22468
- </Show61>
22728
+ </Show62>
22469
22729
 
22470
22730
  {
22471
22731
  /* Prescription requests */
22472
22732
  }
22473
22733
  <div>
22474
22734
  <h3 style={panelSectionHeader}>Prescription requests</h3>
22475
- <Show61
22735
+ <Show62
22476
22736
  when={(data.rxList() ?? []).length > 0}
22477
22737
  fallback={<p
22478
22738
  style={{
@@ -22484,7 +22744,7 @@ function PatientDashboardPreview(props) {
22484
22744
  </p>}
22485
22745
  >
22486
22746
  <div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
22487
- <For48 each={data.rxList()}>
22747
+ <For49 each={data.rxList()}>
22488
22748
  {(req) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
22489
22749
  <div
22490
22750
  style={{
@@ -22499,7 +22759,7 @@ function PatientDashboardPreview(props) {
22499
22759
  >
22500
22760
  {req.drugName || req.drugId || "Prescription"}
22501
22761
  </span>
22502
- <Show61 when={req.dosage}>
22762
+ <Show62 when={req.dosage}>
22503
22763
  <span
22504
22764
  style={{
22505
22765
  "font-size": "0.75rem",
@@ -22509,7 +22769,7 @@ function PatientDashboardPreview(props) {
22509
22769
  >
22510
22770
  {req.dosage}
22511
22771
  </span>
22512
- </Show61>
22772
+ </Show62>
22513
22773
  </div>
22514
22774
  <StatusBadge status={req.status} />
22515
22775
  </div>
@@ -22520,15 +22780,15 @@ function PatientDashboardPreview(props) {
22520
22780
  "margin-top": "0.25rem"
22521
22781
  }}
22522
22782
  >
22523
- <Show61 when={req.priceCents != null}>
22783
+ <Show62 when={req.priceCents != null}>
22524
22784
  <span>{centsToUsd(req.priceCents)} · </span>
22525
- </Show61>
22785
+ </Show62>
22526
22786
  {fmtDate(req.createdAt)}
22527
22787
  </div>
22528
22788
  </div>}
22529
- </For48>
22789
+ </For49>
22530
22790
  </div>
22531
- </Show61>
22791
+ </Show62>
22532
22792
  </div>
22533
22793
 
22534
22794
  {
@@ -22536,7 +22796,7 @@ function PatientDashboardPreview(props) {
22536
22796
  }
22537
22797
  <div>
22538
22798
  <h3 style={panelSectionHeader}>Pending surveys</h3>
22539
- <Show61
22799
+ <Show62
22540
22800
  when={(data.pendingSurveys() ?? []).length > 0}
22541
22801
  fallback={<p
22542
22802
  style={{
@@ -22548,7 +22808,7 @@ function PatientDashboardPreview(props) {
22548
22808
  </p>}
22549
22809
  >
22550
22810
  <div style={{ display: "flex", "flex-direction": "column", gap: "0.5rem" }}>
22551
- <For48 each={data.pendingSurveys()}>
22811
+ <For49 each={data.pendingSurveys()}>
22552
22812
  {(survey) => <div class="app-admin-card-soft" style={{ padding: "0.75rem" }}>
22553
22813
  <span style={{ "font-size": "0.875rem", "font-weight": "500" }}>
22554
22814
  {survey.drugName || survey.drugId || "Renewal survey"}
@@ -22563,24 +22823,24 @@ function PatientDashboardPreview(props) {
22563
22823
  Cycle {survey.cycleNumber}
22564
22824
  </span>
22565
22825
  </div>}
22566
- </For48>
22826
+ </For49>
22567
22827
  </div>
22568
- </Show61>
22828
+ </Show62>
22569
22829
  </div>
22570
22830
  </>}
22571
- </Show61>
22572
- </Show61>
22831
+ </Show62>
22832
+ </Show62>
22573
22833
  </div>
22574
22834
  </div>
22575
22835
  </div>;
22576
22836
  }
22577
22837
 
22578
22838
  // src/pages/UpdatePaymentMethod.tsx
22579
- import { Show as Show62, createResource as createResource28 } from "solid-js";
22839
+ import { Show as Show63, createResource as createResource29 } from "solid-js";
22580
22840
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
22581
22841
  function UpdatePaymentMethod(props) {
22582
22842
  const { Heading, TextField, Button, Banner, Spinner } = usePrimitives();
22583
- const [resolved] = createResource28(
22843
+ const [resolved] = createResource29(
22584
22844
  () => props.subscriptionId ? null : "fetch",
22585
22845
  async () => {
22586
22846
  try {
@@ -22608,21 +22868,21 @@ function UpdatePaymentMethod(props) {
22608
22868
  Enter a new card for your subscription. Your current card stays active until this succeeds.
22609
22869
  </p>
22610
22870
 
22611
- <Show62 when={resolving()}>
22871
+ <Show63 when={resolving()}>
22612
22872
  <Spinner />
22613
- </Show62>
22873
+ </Show63>
22614
22874
 
22615
- <Show62 when={noSubscription()}>
22875
+ <Show63 when={noSubscription()}>
22616
22876
  <Banner variant="error">We couldn’t find an active subscription to update.</Banner>
22617
- </Show62>
22877
+ </Show63>
22618
22878
 
22619
- <Show62 when={!resolving() && !noSubscription()}>
22879
+ <Show63 when={!resolving() && !noSubscription()}>
22620
22880
  <form onSubmit={handleSubmit}>
22621
- <Show62 when={flow.error()}>
22881
+ <Show63 when={flow.error()}>
22622
22882
  <div style={{ "margin-bottom": "1rem" }}>
22623
22883
  <Banner variant="error">{flow.error()}</Banner>
22624
22884
  </div>
22625
- </Show62>
22885
+ </Show63>
22626
22886
 
22627
22887
  <div style={{ display: "grid", gap: "1rem", "margin-bottom": "1.5rem" }}>
22628
22888
  <TextField
@@ -22678,18 +22938,18 @@ function UpdatePaymentMethod(props) {
22678
22938
  </Button>
22679
22939
  </div>
22680
22940
  </form>
22681
- </Show62>
22941
+ </Show63>
22682
22942
  </div>;
22683
22943
  }
22684
22944
 
22685
22945
  // 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";
22946
+ import { Show as Show71, Switch as Switch7, Match as Match7, For as For55, createSignal as createSignal50, onMount as onMount8 } from "solid-js";
22687
22947
 
22688
22948
  // src/pages/member/OrderTracker.tsx
22689
- import { Show as Show63, For as For49, createSignal as createSignal42 } from "solid-js";
22949
+ import { Show as Show64, For as For50, createSignal as createSignal44 } from "solid-js";
22690
22950
  function TrackingChip(props) {
22691
22951
  let copied;
22692
- const [announce, setAnnounce] = createSignal42("");
22952
+ const [announce, setAnnounce] = createSignal44("");
22693
22953
  const copy = async () => {
22694
22954
  try {
22695
22955
  await navigator.clipboard.writeText(props.number);
@@ -22715,18 +22975,18 @@ function TrackingChip(props) {
22715
22975
  <i class="ph ph-copy ship__copy-icon" aria-hidden="true" />
22716
22976
  <span class="ship__copied" ref={copied}>Copied ✓</span>
22717
22977
  </button>
22718
- <Show63 when={props.url}>
22978
+ <Show64 when={props.url}>
22719
22979
  <a class="ship__track" href={props.url} target="_blank" rel="noopener noreferrer">
22720
22980
  Track{props.carrier ? ` with ${props.carrier}` : ""} ↗
22721
22981
  </a>
22722
- </Show63>
22982
+ </Show64>
22723
22983
  </div>
22724
22984
  <span class="portal-sr-only" role="status" aria-live="polite">{announce()}</span>
22725
22985
  </div>;
22726
22986
  }
22727
22987
  function OrderTracker(props) {
22728
22988
  const refill = () => buildRefillView(props.subscription);
22729
- const RefillStrip = () => <Show63 when={refill()}>
22989
+ const RefillStrip = () => <Show64 when={refill()}>
22730
22990
  {(r) => <div class="refill" data-testid="refill-strip">
22731
22991
  <div class="refill__head">
22732
22992
  <span class="lab-label">Your plan</span>
@@ -22735,15 +22995,15 @@ function OrderTracker(props) {
22735
22995
  awaiting the pharmacy there isn't one, so say what we're waiting
22736
22996
  on instead of counting days against a date we don't have. */
22737
22997
  }
22738
- <Show63
22998
+ <Show64
22739
22999
  when={!r().pendingFill}
22740
23000
  fallback={<span class="refill__cycle">Preparing your next fill</span>}
22741
23001
  >
22742
23002
  <span class="refill__cycle">Day {r().cycleDay} of {r().cycleLength}</span>
22743
- </Show63>
23003
+ </Show64>
22744
23004
  </div>
22745
23005
  <div class="refill__rail" style={{ "--p": String(r().progress) }}>
22746
- <For49 each={r().events}>
23006
+ <For50 each={r().events}>
22747
23007
  {(e) => <div class={`refill__stone${e.nearest ? " is-near" : ""}`}>
22748
23008
  <span class="refill__dot" aria-hidden="true" />
22749
23009
  <span class="lab-label refill__label">{e.label}</span>
@@ -22755,16 +23015,16 @@ function OrderTracker(props) {
22755
23015
  <span class="refill__rel">
22756
23016
  {!r().precise && e.date ? `around ${e.relative}` : e.relative}
22757
23017
  </span>
22758
- <Show63 when={e.key === "survey" ? props.pendingRenewalId : null} keyed>
23018
+ <Show64 when={e.key === "survey" ? props.pendingRenewalId : null} keyed>
22759
23019
  {(rid) => <a href={props.renewHref(rid)} class="refill__action">
22760
23020
  Complete check-in →
22761
23021
  </a>}
22762
- </Show63>
23022
+ </Show64>
22763
23023
  </div>}
22764
- </For49>
23024
+ </For50>
22765
23025
  </div>
22766
23026
  </div>}
22767
- </Show63>;
23027
+ </Show64>;
22768
23028
  const EmptyState2 = () => <div class="tracker">
22769
23029
  <span class="lab-label">Your order</span>
22770
23030
  <RefillStrip />
@@ -22773,17 +23033,17 @@ function OrderTracker(props) {
22773
23033
  <span class="tracker__empty-bead" />
22774
23034
  </div>
22775
23035
  <h2 class="tracker__empty-title">Your journey starts here</h2>
22776
- <Show63 when={props.savingsMember}>
23036
+ <Show64 when={props.savingsMember}>
22777
23037
  <p class="tracker__empty-text" data-testid="tracker-savings-note">
22778
23038
  <strong>Member pricing is active on your account.</strong> It applies automatically when you check out.
22779
23039
  </p>
22780
- </Show63>
22781
- <Show63 when={props.offers?.[0]}>
23040
+ </Show64>
23041
+ <Show64 when={props.offers?.[0]}>
22782
23042
  {(offer) => <p class="tracker__empty-text" data-testid="tracker-offer-note">
22783
23043
  <strong>You have {offerSummaryText(offer())} waiting.</strong> It applies automatically at checkout —
22784
23044
  finish your intake by {offer().deadlineText} to keep it.
22785
23045
  </p>}
22786
- </Show63>
23046
+ </Show64>
22787
23047
  <p class="tracker__empty-text">
22788
23048
  {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
23049
  </p>
@@ -22801,30 +23061,30 @@ function OrderTracker(props) {
22801
23061
  >
22802
23062
  <div class="thread__rail">
22803
23063
  <span class="thread__bead">
22804
- <Show63 when={isActive}><span class="thread__halo" aria-hidden="true" /></Show63>
23064
+ <Show64 when={isActive}><span class="thread__halo" aria-hidden="true" /></Show64>
22805
23065
  </span>
22806
23066
  </div>
22807
23067
  <div class={`thread__content${isActive ? " thread__content--active" : ""}`}>
22808
23068
  <div class="thread__top">
22809
23069
  <span class="lab-label thread__label">{s.label}</span>
22810
- <Show63 when={s.timestamp}>
23070
+ <Show64 when={s.timestamp}>
22811
23071
  <time class="thread__time">{formatStageDate(s.timestamp)}</time>
22812
- </Show63>
23072
+ </Show64>
22813
23073
  </div>
22814
- <Show63 when={s.heroWord}>
23074
+ <Show64 when={s.heroWord}>
22815
23075
  <h2 class="thread__hero">{s.heroWord}</h2>
22816
- </Show63>
22817
- <Show63 when={s.subCaption}>
23076
+ </Show64>
23077
+ <Show64 when={s.subCaption}>
22818
23078
  <p class="thread__caption">{s.subCaption}</p>
22819
- </Show63>
22820
- <Show63 when={s.state === "active" && s.key === "shipped" && sp.view.shipment}>
23079
+ </Show64>
23080
+ <Show64 when={s.state === "active" && s.key === "shipped" && sp.view.shipment}>
22821
23081
  <TrackingChip
22822
23082
  number={sp.view.shipment.trackingNumber}
22823
23083
  carrier={sp.view.shipment.carrier}
22824
23084
  url={sp.view.shipment.trackingUrl}
22825
23085
  eta={sp.view.shipment.etaLabel}
22826
23086
  />
22827
- <Show63 when={props.messagingEnabled}>
23087
+ <Show64 when={props.messagingEnabled}>
22828
23088
  <button
22829
23089
  type="button"
22830
23090
  class="portal-btn portal-btn--ghost thread__action"
@@ -22832,10 +23092,10 @@ function OrderTracker(props) {
22832
23092
  >
22833
23093
  Where's my order?
22834
23094
  </button>
22835
- </Show63>
22836
- </Show63>
22837
- <Show63 when={s.state === "consult"}>
22838
- <Show63
23095
+ </Show64>
23096
+ </Show64>
23097
+ <Show64 when={s.state === "consult"}>
23098
+ <Show64
22839
23099
  when={props.messagingEnabled}
22840
23100
  fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
22841
23101
  Your care team is reviewing your request. You’ll be able to message them here once your consult begins.
@@ -22848,10 +23108,10 @@ function OrderTracker(props) {
22848
23108
  >
22849
23109
  Message your care team
22850
23110
  </button>
22851
- </Show63>
22852
- </Show63>
22853
- <Show63 when={s.state === "denied"}>
22854
- <Show63
23111
+ </Show64>
23112
+ </Show64>
23113
+ <Show64 when={s.state === "denied"}>
23114
+ <Show64
22855
23115
  when={props.messagingEnabled}
22856
23116
  fallback={<p class="thread__caption thread__await" data-testid="await-messaging">
22857
23117
  Your provider will follow up with you about next steps.
@@ -22864,12 +23124,12 @@ function OrderTracker(props) {
22864
23124
  >
22865
23125
  Talk to your provider
22866
23126
  </button>
22867
- </Show63>
22868
- </Show63>
23127
+ </Show64>
23128
+ </Show64>
22869
23129
  </div>
22870
23130
  </li>;
22871
23131
  };
22872
- return <Show63 when={props.request} fallback={<EmptyState2 />}>
23132
+ return <Show64 when={props.request} fallback={<EmptyState2 />}>
22873
23133
  {(rx) => {
22874
23134
  const view = buildTrackerView(rx());
22875
23135
  return <div class="tracker" data-testid="order-tracker">
@@ -22877,7 +23137,7 @@ function OrderTracker(props) {
22877
23137
  <span class="lab-label">Your order</span>
22878
23138
  <p class="tracker__med">
22879
23139
  {props.medicationName}
22880
- <Show63 when={rx().dosage}><span class="tracker__dose"> · {rx().dosage}</span></Show63>
23140
+ <Show64 when={rx().dosage}><span class="tracker__dose"> · {rx().dosage}</span></Show64>
22881
23141
  </p>
22882
23142
  </div>
22883
23143
 
@@ -22887,17 +23147,17 @@ function OrderTracker(props) {
22887
23147
  class={`thread${view.branch ? ` thread--${view.branch}` : ""}`}
22888
23148
  style={{ "--active": String(view.activeIndex), "--count": String(view.stages.length) }}
22889
23149
  >
22890
- <For49 each={view.stages}>
23150
+ <For50 each={view.stages}>
22891
23151
  {(stage, i) => <Stage stage={stage} index={i()} view={view} />}
22892
- </For49>
23152
+ </For50>
22893
23153
  </ol>
22894
23154
  </div>;
22895
23155
  }}
22896
- </Show63>;
23156
+ </Show64>;
22897
23157
  }
22898
23158
 
22899
23159
  // src/pages/member/RxRow.tsx
22900
- import { Show as Show64, createSignal as createSignal43 } from "solid-js";
23160
+ import { Show as Show65, createSignal as createSignal45 } from "solid-js";
22901
23161
  var STATUS_LABEL = {
22902
23162
  pending: "Under review",
22903
23163
  approved: "Approved",
@@ -22908,7 +23168,7 @@ var STATUS_LABEL = {
22908
23168
  denied: "Not approved"
22909
23169
  };
22910
23170
  function RxRow(props) {
22911
- const [open, setOpen] = createSignal43(false);
23171
+ const [open, setOpen] = createSignal45(false);
22912
23172
  const label3 = () => {
22913
23173
  if (props.rx.status === "approved" && props.rx.delivery?.trackingNumber) return "On its way";
22914
23174
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
@@ -22922,14 +23182,14 @@ function RxRow(props) {
22922
23182
  >
22923
23183
  <span class="rx-row__med">
22924
23184
  {props.rx.drugName ?? "Medication"}
22925
- <Show64 when={props.rx.dosage}>
23185
+ <Show65 when={props.rx.dosage}>
22926
23186
  <span class="rx-row__dose"> · {props.rx.dosage}</span>
22927
- </Show64>
23187
+ </Show65>
22928
23188
  </span>
22929
23189
  <span class="rx-row__status">{label3()}</span>
22930
23190
  <i class={`ph ph-caret-${open() ? "up" : "down"} rx-row__chevron`} aria-hidden="true" />
22931
23191
  </button>
22932
- <Show64 when={open()}>
23192
+ <Show65 when={open()}>
22933
23193
  <div class="rx-row__body">
22934
23194
  <OrderTracker
22935
23195
  request={props.request}
@@ -22942,12 +23202,12 @@ function RxRow(props) {
22942
23202
  renewHref={props.renewHref}
22943
23203
  />
22944
23204
  </div>
22945
- </Show64>
23205
+ </Show65>
22946
23206
  </div>;
22947
23207
  }
22948
23208
 
22949
23209
  // src/pages/member/PlanBilling.tsx
22950
- import { Show as Show65, createSignal as createSignal44 } from "solid-js";
23210
+ import { Show as Show66, createSignal as createSignal46 } from "solid-js";
22951
23211
  function formatCents(cents) {
22952
23212
  if (cents == null || Number.isNaN(cents)) return "\u2014";
22953
23213
  return `$${(cents / 100).toFixed(2)}`;
@@ -22968,9 +23228,9 @@ var STATUS_COPY = {
22968
23228
  };
22969
23229
  var LIVE_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
22970
23230
  function PlanBilling(props) {
22971
- const [action, setAction] = createSignal44(null);
22972
- const [confirmCancel, setConfirmCancel] = createSignal44(false);
22973
- const [error, setError] = createSignal44(null);
23231
+ const [action, setAction] = createSignal46(null);
23232
+ const [confirmCancel, setConfirmCancel] = createSignal46(false);
23233
+ const [error, setError] = createSignal46(null);
22974
23234
  const primary = () => {
22975
23235
  const subs = props.subscriptions;
22976
23236
  return subs.find((s) => LIVE_STATUSES.has(s.status)) ?? subs[0] ?? null;
@@ -22990,7 +23250,7 @@ function PlanBilling(props) {
22990
23250
  return <div class="plan" data-testid="plan-billing">
22991
23251
  <span class="lab-label">Plan &amp; billing</span>
22992
23252
 
22993
- <Show65
23253
+ <Show66
22994
23254
  when={primary()}
22995
23255
  fallback={<div class="plan__empty">
22996
23256
  <h2 class="plan__empty-title">No active plan</h2>
@@ -23006,7 +23266,7 @@ function PlanBilling(props) {
23006
23266
  <span class="membership__brand">{props.brandName}</span>
23007
23267
  </div>
23008
23268
  <h2 class="membership__med">{sub().medicationName ?? sub().medication}</h2>
23009
- <Show65 when={sub().dosage}><p class="membership__dose">{sub().dosage}</p></Show65>
23269
+ <Show66 when={sub().dosage}><p class="membership__dose">{sub().dosage}</p></Show66>
23010
23270
  <div class="membership__bottom">
23011
23271
  <span class="membership__price">
23012
23272
  {formatCents(sub().amountCents)}<span class="membership__per">/mo</span>
@@ -23032,7 +23292,7 @@ function PlanBilling(props) {
23032
23292
  </div>
23033
23293
  </dl>
23034
23294
 
23035
- <Show65 when={props.messagingEnabled}>
23295
+ <Show66 when={props.messagingEnabled}>
23036
23296
  <p class="plan__note">
23037
23297
  Question about billing?{" "}
23038
23298
  <button
@@ -23043,14 +23303,14 @@ function PlanBilling(props) {
23043
23303
  Message support
23044
23304
  </button>
23045
23305
  </p>
23046
- </Show65>
23306
+ </Show66>
23047
23307
 
23048
- <Show65 when={error()}>
23308
+ <Show66 when={error()}>
23049
23309
  <p class="plan__error" role="alert">{error()}</p>
23050
- </Show65>
23310
+ </Show66>
23051
23311
 
23052
23312
  <div class="plan__actions">
23053
- <Show65 when={sub().status === "active"}>
23313
+ <Show66 when={sub().status === "active"}>
23054
23314
  <button
23055
23315
  type="button"
23056
23316
  class="plan__link-btn"
@@ -23059,8 +23319,8 @@ function PlanBilling(props) {
23059
23319
  >
23060
23320
  {action() === "pause" ? "Pausing\u2026" : "Pause subscription"}
23061
23321
  </button>
23062
- </Show65>
23063
- <Show65 when={sub().status === "paused"}>
23322
+ </Show66>
23323
+ <Show66 when={sub().status === "paused"}>
23064
23324
  <button
23065
23325
  type="button"
23066
23326
  class="plan__link-btn"
@@ -23069,11 +23329,11 @@ function PlanBilling(props) {
23069
23329
  >
23070
23330
  {action() === "resume" ? "Resuming\u2026" : "Resume subscription"}
23071
23331
  </button>
23072
- </Show65>
23332
+ </Show66>
23073
23333
 
23074
23334
  <a href={props.paymentMethodHref} class="plan__link-btn">Update payment method</a>
23075
23335
 
23076
- <Show65 when={sub().status !== "cancelled" && sub().status !== "expired"}>
23336
+ <Show66 when={sub().status !== "cancelled" && sub().status !== "expired"}>
23077
23337
  <button
23078
23338
  type="button"
23079
23339
  class="plan__link-btn plan__link-btn--quiet"
@@ -23082,10 +23342,10 @@ function PlanBilling(props) {
23082
23342
  >
23083
23343
  Cancel subscription
23084
23344
  </button>
23085
- </Show65>
23345
+ </Show66>
23086
23346
  </div>
23087
23347
 
23088
- <Show65 when={confirmCancel()}>
23348
+ <Show66 when={confirmCancel()}>
23089
23349
  <div class="confirm" data-testid="cancel-confirm">
23090
23350
  <p class="confirm__text">
23091
23351
  Cancel your subscription? You’ll keep access until the end of your current billing period
@@ -23110,14 +23370,14 @@ function PlanBilling(props) {
23110
23370
  </button>
23111
23371
  </div>
23112
23372
  </div>
23113
- </Show65>
23373
+ </Show66>
23114
23374
  </>}
23115
- </Show65>
23375
+ </Show66>
23116
23376
  </div>;
23117
23377
  }
23118
23378
 
23119
23379
  // src/pages/member/AccountPanel.tsx
23120
- import { Show as Show66, For as For50 } from "solid-js";
23380
+ import { Show as Show67, For as For51 } from "solid-js";
23121
23381
  function pick(member, ...keys) {
23122
23382
  if (!member) return "";
23123
23383
  for (const k of keys) {
@@ -23153,19 +23413,19 @@ function AccountPanel(props) {
23153
23413
  <h1 class="account__title">Your details</h1>
23154
23414
 
23155
23415
  <dl class="account__fields">
23156
- <For50 each={fields()}>
23416
+ <For51 each={fields()}>
23157
23417
  {(f) => <div class="account__field">
23158
23418
  <dt class="lab-label">{f.label}</dt>
23159
23419
  <dd>{f.value}</dd>
23160
23420
  </div>}
23161
- </For50>
23421
+ </For51>
23162
23422
  </dl>
23163
23423
 
23164
- <Show66 when={fields().length === 0}>
23424
+ <Show67 when={fields().length === 0}>
23165
23425
  <p class="account__empty">We don’t have your details on file yet.</p>
23166
- </Show66>
23426
+ </Show67>
23167
23427
 
23168
- <Show66 when={props.messagingEnabled}>
23428
+ <Show67 when={props.messagingEnabled}>
23169
23429
  <p class="account__note">
23170
23430
  Need to update something?{" "}
23171
23431
  <button
@@ -23177,17 +23437,17 @@ function AccountPanel(props) {
23177
23437
  </button>{" "}
23178
23438
  and we’ll take care of it.
23179
23439
  </p>
23180
- </Show66>
23440
+ </Show67>
23181
23441
 
23182
23442
  <div class="account__support">
23183
- <Show66 when={props.messagingEnabled}>
23443
+ <Show67 when={props.messagingEnabled}>
23184
23444
  <button type="button" class="account__support-link account__support-btn" onClick={() => props.onOpenMessages()}>
23185
23445
  Messages
23186
23446
  </button>
23187
- </Show66>
23188
- <For50 each={props.legalLinks ?? []}>
23447
+ </Show67>
23448
+ <For51 each={props.legalLinks ?? []}>
23189
23449
  {(link) => <a href={link.href} class="account__support-link">{link.label}</a>}
23190
- </For50>
23450
+ </For51>
23191
23451
  </div>
23192
23452
 
23193
23453
  <button type="button" class="portal-btn portal-btn--ghost account__signout" onClick={props.onSignOut}>
@@ -23197,13 +23457,13 @@ function AccountPanel(props) {
23197
23457
  }
23198
23458
 
23199
23459
  // src/pages/member/MedicationGuide.tsx
23200
- import { Show as Show67, For as For51, createSignal as createSignal45 } from "solid-js";
23460
+ import { Show as Show68, For as For52, createSignal as createSignal47 } from "solid-js";
23201
23461
  function firstNumber(s) {
23202
23462
  const m = (s || "").match(/\d+(\.\d+)?/);
23203
23463
  return m ? m[0] : null;
23204
23464
  }
23205
23465
  function MedicationGuide(props) {
23206
- const [showDisclaimers, setShowDisclaimers] = createSignal45(false);
23466
+ const [showDisclaimers, setShowDisclaimers] = createSignal47(false);
23207
23467
  const activeTitrationIndex = () => {
23208
23468
  const dose = firstNumber(props.currentDose);
23209
23469
  if (!dose) return -1;
@@ -23240,7 +23500,7 @@ function MedicationGuide(props) {
23240
23500
  <section class="leaflet__section leaflet__section--caution">
23241
23501
  <h2 class="leaflet__h2">Do not use this medicine if…</h2>
23242
23502
  <ul class="leaflet__list leaflet__list--caution">
23243
- <For51 each={props.guide.doNotUseIf}>{(item) => <li>{item}</li>}</For51>
23503
+ <For52 each={props.guide.doNotUseIf}>{(item) => <li>{item}</li>}</For52>
23244
23504
  </ul>
23245
23505
  </section>
23246
23506
 
@@ -23251,7 +23511,7 @@ function MedicationGuide(props) {
23251
23511
  <h2 class="leaflet__h2">Your dose over time</h2>
23252
23512
  <p class="leaflet__note">A typical step-up. Your prescriber sets your exact doses and timing.</p>
23253
23513
  <ol class="titration">
23254
- <For51 each={props.guide.titration}>
23514
+ <For52 each={props.guide.titration}>
23255
23515
  {(step, i) => <li class={`titration__step titration__step--${titrationState(i())}`}>
23256
23516
  <span class="titration__bead" aria-hidden="true" />
23257
23517
  <div class="titration__body">
@@ -23263,14 +23523,14 @@ function MedicationGuide(props) {
23263
23523
  <p class="titration__note">{step.note}</p>
23264
23524
  </div>
23265
23525
  </li>}
23266
- </For51>
23526
+ </For52>
23267
23527
  </ol>
23268
23528
  </section>
23269
23529
 
23270
23530
  <section class="leaflet__section">
23271
23531
  <h2 class="leaflet__h2">Giving your injection</h2>
23272
23532
  <ol class="steps">
23273
- <For51 each={props.guide.injectionSteps}>
23533
+ <For52 each={props.guide.injectionSteps}>
23274
23534
  {(step) => <li class="steps__item">
23275
23535
  <span class="steps__num">{step.n}</span>
23276
23536
  <div class="steps__body">
@@ -23278,7 +23538,7 @@ function MedicationGuide(props) {
23278
23538
  <p class="steps__detail">{step.detail}</p>
23279
23539
  </div>
23280
23540
  </li>}
23281
- </For51>
23541
+ </For52>
23282
23542
  </ol>
23283
23543
  </section>
23284
23544
 
@@ -23286,7 +23546,7 @@ function MedicationGuide(props) {
23286
23546
  <section class="leaflet__section">
23287
23547
  <h2 class="leaflet__h2">Storing your medicine</h2>
23288
23548
  <ul class="leaflet__list">
23289
- <For51 each={props.guide.storage}>{(item) => <li>{item}</li>}</For51>
23549
+ <For52 each={props.guide.storage}>{(item) => <li>{item}</li>}</For52>
23290
23550
  </ul>
23291
23551
  </section>
23292
23552
 
@@ -23296,25 +23556,25 @@ function MedicationGuide(props) {
23296
23556
  </section>
23297
23557
  </div>
23298
23558
 
23299
- <Show67 when={props.guide.contraception}>
23559
+ <Show68 when={props.guide.contraception}>
23300
23560
  <section class="leaflet__section leaflet__section--caution">
23301
23561
  <h2 class="leaflet__h2">Birth control</h2>
23302
23562
  <p class="leaflet__body">{props.guide.contraception}</p>
23303
23563
  </section>
23304
- </Show67>
23564
+ </Show68>
23305
23565
 
23306
23566
  <div class="leaflet__grid">
23307
23567
  <section class="leaflet__section">
23308
23568
  <h2 class="leaflet__h2">Common side effects</h2>
23309
23569
  <ul class="leaflet__list leaflet__list--check">
23310
- <For51 each={props.guide.sideEffectsCommon}>{(item) => <li>{item}</li>}</For51>
23570
+ <For52 each={props.guide.sideEffectsCommon}>{(item) => <li>{item}</li>}</For52>
23311
23571
  </ul>
23312
23572
  </section>
23313
23573
 
23314
23574
  <section class="leaflet__section leaflet__section--alert">
23315
23575
  <h2 class="leaflet__h2">Call right away if you notice…</h2>
23316
23576
  <ul class="leaflet__list leaflet__list--alert">
23317
- <For51 each={props.guide.sideEffectsSerious}>{(item) => <li>{item}</li>}</For51>
23577
+ <For52 each={props.guide.sideEffectsSerious}>{(item) => <li>{item}</li>}</For52>
23318
23578
  </ul>
23319
23579
  </section>
23320
23580
  </div>
@@ -23322,14 +23582,14 @@ function MedicationGuide(props) {
23322
23582
  <section class="leaflet__section">
23323
23583
  <h2 class="leaflet__h2">When to contact your care team</h2>
23324
23584
  <ul class="leaflet__list">
23325
- <For51 each={props.guide.whenToCall}>{(item) => <li>{item}</li>}</For51>
23585
+ <For52 each={props.guide.whenToCall}>{(item) => <li>{item}</li>}</For52>
23326
23586
  </ul>
23327
23587
  </section>
23328
23588
 
23329
23589
  <section class="leaflet__section">
23330
23590
  <h2 class="leaflet__h2">Tips for feeling your best</h2>
23331
23591
  <ul class="leaflet__list leaflet__list--check">
23332
- <For51 each={props.guide.tips}>{(item) => <li>{item}</li>}</For51>
23592
+ <For52 each={props.guide.tips}>{(item) => <li>{item}</li>}</For52>
23333
23593
  </ul>
23334
23594
  </section>
23335
23595
 
@@ -23344,17 +23604,17 @@ function MedicationGuide(props) {
23344
23604
  {showDisclaimers() ? "Hide" : "Read"} the important details
23345
23605
  <i class={`ph ph-caret-${showDisclaimers() ? "up" : "down"}`} aria-hidden="true" />
23346
23606
  </button>
23347
- <Show67 when={showDisclaimers()}>
23607
+ <Show68 when={showDisclaimers()}>
23348
23608
  <ul class="leaflet__disclaimers" id="leaflet-disclaimers">
23349
- <For51 each={props.guide.disclaimers}>{(item) => <li>{item}</li>}</For51>
23609
+ <For52 each={props.guide.disclaimers}>{(item) => <li>{item}</li>}</For52>
23350
23610
  </ul>
23351
- </Show67>
23611
+ </Show68>
23352
23612
  </section>
23353
23613
  </div>;
23354
23614
  }
23355
23615
 
23356
23616
  // 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";
23617
+ import { Show as Show69, For as For53, Switch as Switch6, Match as Match6, createEffect as createEffect17, createSignal as createSignal48, on as on9 } from "solid-js";
23358
23618
  import DOMPurify from "dompurify";
23359
23619
  function sanitizeMessageHtml(html) {
23360
23620
  return DOMPurify.sanitize(html, {
@@ -23409,11 +23669,11 @@ function rejectionReason(file) {
23409
23669
  }
23410
23670
  function MessagesPanel(props) {
23411
23671
  const thread = () => props.thread;
23412
- const [channel, setChannel] = createSignal46("gate");
23413
- const [threadNotFound, setThreadNotFound] = createSignal46(false);
23414
- const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal46(null);
23672
+ const [channel, setChannel] = createSignal48("gate");
23673
+ const [threadNotFound, setThreadNotFound] = createSignal48(false);
23674
+ const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal48(null);
23415
23675
  const emailSupport = () => thread().supportChannel() === "email";
23416
- const [emailSent, setEmailSent] = createSignal46(false);
23676
+ const [emailSent, setEmailSent] = createSignal48(false);
23417
23677
  function switchChannel(next) {
23418
23678
  thread().clearSelection();
23419
23679
  setEmailSent(false);
@@ -23425,17 +23685,17 @@ function MessagesPanel(props) {
23425
23685
  setThreadNotFound(false);
23426
23686
  setPendingThreadIntentId(null);
23427
23687
  }
23428
- const [composing, setComposing] = createSignal46(false);
23429
- const [composeStep, setComposeStep] = createSignal46(
23688
+ const [composing, setComposing] = createSignal48(false);
23689
+ const [composeStep, setComposeStep] = createSignal48(
23430
23690
  "support"
23431
23691
  );
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);
23692
+ const [newSubject, setNewSubject] = createSignal48("");
23693
+ const [newBody, setNewBody] = createSignal48("");
23694
+ const [newCategory, setNewCategory] = createSignal48(null);
23695
+ const [composeError, setComposeError] = createSignal48(null);
23696
+ const [pendingFile, setPendingFile] = createSignal48(null);
23697
+ const [newFile, setNewFile] = createSignal48(null);
23698
+ const [attachError, setAttachError] = createSignal48(null);
23439
23699
  function stageFile(input, set) {
23440
23700
  const file = input.files?.[0];
23441
23701
  input.value = "";
@@ -23608,9 +23868,9 @@ function MessagesPanel(props) {
23608
23868
  data-channel={p.source}
23609
23869
  >
23610
23870
  {p.source === "clinical" ? "Care team" : "Support"}
23611
- <Show68 when={p.source === "support" && categoryLabel(p.category)}>
23871
+ <Show69 when={p.source === "support" && categoryLabel(p.category)}>
23612
23872
  {(label3) => <span class="channel-chip__category">{label3()}</span>}
23613
- </Show68>
23873
+ </Show69>
23614
23874
  </span>;
23615
23875
  const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
23616
23876
  const ConversationList = () => <>
@@ -23639,29 +23899,29 @@ function MessagesPanel(props) {
23639
23899
  </div>
23640
23900
 
23641
23901
  <div class="msg-list__scroll" data-scrollable>
23642
- <Show68 when={thread().loadingConversations()}>
23902
+ <Show69 when={thread().loadingConversations()}>
23643
23903
  <div class="msg-list__state">
23644
23904
  <div class="request-status__spinner" />
23645
23905
  </div>
23646
- </Show68>
23906
+ </Show69>
23647
23907
 
23648
- <Show68 when={!thread().loadingConversations() && channelConversations().length === 0}>
23908
+ <Show69 when={!thread().loadingConversations() && channelConversations().length === 0}>
23649
23909
  <div class="msg-list__state msg-list__state--empty" data-testid="messages-empty">
23650
23910
  <i class="ph-thin ph-chat-circle msg-list__empty-icon" aria-hidden="true" />
23651
23911
  <p class="msg-list__empty-title">No conversations yet.</p>
23652
23912
  <p class="msg-list__empty-hint">
23653
- <Show68
23913
+ <Show69
23654
23914
  when={channel() === "care"}
23655
23915
  fallback="Message support about your account, an order, billing or the site."
23656
23916
  >
23657
23917
  Your care team reviews and responds to anything about your treatment, medication
23658
23918
  or side effects.
23659
- </Show68>
23919
+ </Show69>
23660
23920
  </p>
23661
23921
  </div>
23662
- </Show68>
23922
+ </Show69>
23663
23923
 
23664
- <For52 each={channelConversations()}>
23924
+ <For53 each={channelConversations()}>
23665
23925
  {(convo) => <button
23666
23926
  type="button"
23667
23927
  class={`msg-list__item${thread().selectedId() === convo.id ? " is-active" : ""}`}
@@ -23677,17 +23937,17 @@ function MessagesPanel(props) {
23677
23937
  </div>
23678
23938
  <div class="msg-list__row">
23679
23939
  <span class="msg-list__preview">{convo.lastMessage ?? "No messages yet"}</span>
23680
- <Show68 when={(convo.unreadCount ?? 0) > 0}>
23940
+ <Show69 when={(convo.unreadCount ?? 0) > 0}>
23681
23941
  <span class="msg-list__pip">{convo.unreadCount}</span>
23682
- </Show68>
23942
+ </Show69>
23683
23943
  </div>
23684
23944
  </button>}
23685
- </For52>
23945
+ </For53>
23686
23946
  </div>
23687
23947
  </>;
23688
23948
  const Attachment = (p) => {
23689
- const [url, setUrl] = createSignal46(p.attachment.url ?? null);
23690
- const [failed, setFailed] = createSignal46(false);
23949
+ const [url, setUrl] = createSignal48(p.attachment.url ?? null);
23950
+ const [failed, setFailed] = createSignal48(false);
23691
23951
  let retried = false;
23692
23952
  const resolve = async (force = false) => {
23693
23953
  const next = await thread().resolveAttachmentUrl(p.attachment.id, force);
@@ -23702,7 +23962,7 @@ function MessagesPanel(props) {
23702
23962
  const href = url() ?? await resolve();
23703
23963
  if (href) window.open(href, "_blank", "noopener");
23704
23964
  };
23705
- return <Show68
23965
+ return <Show69
23706
23966
  when={isImageAttachment(p.attachment)}
23707
23967
  fallback={<button
23708
23968
  type="button"
@@ -23721,7 +23981,7 @@ function MessagesPanel(props) {
23721
23981
  </span>
23722
23982
  </button>}
23723
23983
  >
23724
- <Show68
23984
+ <Show69
23725
23985
  when={url() && !failed()}
23726
23986
  fallback={<span class="msg-attachment__fallback">
23727
23987
  {failed() ? "Attachment unavailable" : "Loading\u2026"}
@@ -23743,13 +24003,13 @@ function MessagesPanel(props) {
23743
24003
  }}
23744
24004
  />
23745
24005
  </button>
23746
- </Show68>
23747
- </Show68>;
24006
+ </Show69>
24007
+ </Show69>;
23748
24008
  };
23749
24009
  const Bubble = (p) => {
23750
24010
  const isOwn = () => p.msg.senderRole === "patient";
23751
24011
  const body = () => p.msg.text || p.msg.content || "";
23752
- return <Show68
24012
+ return <Show69
23753
24013
  when={p.msg.type !== "system"}
23754
24014
  fallback={<p class="msg-thread__system" data-testid="system-message">
23755
24015
  {body()}
@@ -23757,15 +24017,15 @@ function MessagesPanel(props) {
23757
24017
  >
23758
24018
  <div class={`msg-thread__line${isOwn() ? " msg-thread__line--own" : ""}`}>
23759
24019
  <div class={`msg-thread__bubble${isOwn() ? " msg-thread__bubble--own" : ""}`}>
23760
- <Show68 when={!isOwn() && p.msg.senderName}>
24020
+ <Show69 when={!isOwn() && p.msg.senderName}>
23761
24021
  <p class="msg-thread__sender">{p.msg.senderName}</p>
23762
- </Show68>
24022
+ </Show69>
23763
24023
  {
23764
24024
  /* An attachment may arrive with no caption, so don't render an
23765
24025
  empty paragraph in that case. */
23766
24026
  }
23767
- <Show68 when={body()}>
23768
- <Show68
24027
+ <Show69 when={body()}>
24028
+ <Show69
23769
24029
  when={p.msg.type === "html"}
23770
24030
  fallback={<p class="msg-thread__text">{body()}</p>}
23771
24031
  >
@@ -23776,17 +24036,17 @@ function MessagesPanel(props) {
23776
24036
  stored XSS in every one of them. */
23777
24037
  }
23778
24038
  <div class="msg-thread__text" innerHTML={sanitizeMessageHtml(body())} />
23779
- </Show68>
23780
- </Show68>
23781
- <Show68 when={p.msg.attachments?.length}>
24039
+ </Show69>
24040
+ </Show69>
24041
+ <Show69 when={p.msg.attachments?.length}>
23782
24042
  <div class="msg-attachment">
23783
- <For52 each={p.msg.attachments}>{(a) => <Attachment attachment={a} />}</For52>
24043
+ <For53 each={p.msg.attachments}>{(a) => <Attachment attachment={a} />}</For53>
23784
24044
  </div>
23785
- </Show68>
24045
+ </Show69>
23786
24046
  <p class="msg-thread__meta">{formatMessageTime(p.msg.createdAt)}</p>
23787
24047
  </div>
23788
24048
  </div>
23789
- </Show68>;
24049
+ </Show69>;
23790
24050
  };
23791
24051
  const NewSupportThread = () => <form class="msg-thread msg-thread--compose" onSubmit={submitCompose} data-testid="support-compose">
23792
24052
  <div class="msg-thread__header">
@@ -23812,7 +24072,7 @@ function MessagesPanel(props) {
23812
24072
  What's this about? <span class="msg-compose__label-optional">(optional)</span>
23813
24073
  </label>
23814
24074
  <div class="msg-compose__categories" role="group" aria-labelledby="support-category-label">
23815
- <For52 each={SUPPORT_CATEGORIES}>
24075
+ <For53 each={SUPPORT_CATEGORIES}>
23816
24076
  {(c) => <button
23817
24077
  type="button"
23818
24078
  class={`msg-compose__category-chip${newCategory() === c.key ? " is-selected" : ""}`}
@@ -23822,7 +24082,7 @@ function MessagesPanel(props) {
23822
24082
  >
23823
24083
  {c.label}
23824
24084
  </button>}
23825
- </For52>
24085
+ </For53>
23826
24086
  </div>
23827
24087
 
23828
24088
  <label class="msg-compose__label" for="support-subject">
@@ -23866,7 +24126,7 @@ function MessagesPanel(props) {
23866
24126
  onChange={(e) => stageFile(e.currentTarget, setNewFile)}
23867
24127
  />
23868
24128
  </label>
23869
- <Show68 when={newFile()}>
24129
+ <Show69 when={newFile()}>
23870
24130
  <button
23871
24131
  type="button"
23872
24132
  class="msg-compose__staged-remove msg-compose__staged-remove--inline"
@@ -23874,13 +24134,13 @@ function MessagesPanel(props) {
23874
24134
  >
23875
24135
  Remove file
23876
24136
  </button>
23877
- </Show68>
24137
+ </Show69>
23878
24138
 
23879
- <Show68 when={attachError() || composeError()}>
24139
+ <Show69 when={attachError() || composeError()}>
23880
24140
  <p class="msg-compose__error" role="alert">
23881
24141
  {attachError() ?? composeError()}
23882
24142
  </p>
23883
- </Show68>
24143
+ </Show69>
23884
24144
 
23885
24145
  <button
23886
24146
  type="submit"
@@ -23937,7 +24197,7 @@ function MessagesPanel(props) {
23937
24197
  onChange={(e) => stageFile(e.currentTarget, setNewFile)}
23938
24198
  />
23939
24199
  </label>
23940
- <Show68 when={newFile()}>
24200
+ <Show69 when={newFile()}>
23941
24201
  <button
23942
24202
  type="button"
23943
24203
  class="msg-compose__staged-remove msg-compose__staged-remove--inline"
@@ -23945,13 +24205,13 @@ function MessagesPanel(props) {
23945
24205
  >
23946
24206
  Remove file
23947
24207
  </button>
23948
- </Show68>
24208
+ </Show69>
23949
24209
 
23950
- <Show68 when={attachError() || composeError()}>
24210
+ <Show69 when={attachError() || composeError()}>
23951
24211
  <p class="msg-compose__error" role="alert">
23952
24212
  {attachError() ?? composeError()}
23953
24213
  </p>
23954
- </Show68>
24214
+ </Show69>
23955
24215
 
23956
24216
  <button
23957
24217
  type="submit"
@@ -23983,19 +24243,19 @@ function MessagesPanel(props) {
23983
24243
  <i class="ph-thin ph-heartbeat msg-choice__option-icon" aria-hidden="true" />
23984
24244
  <span class="msg-choice__option-title">My care team</span>
23985
24245
  <span class="msg-choice__option-sub">Treatment, medication or side effects</span>
23986
- <Show68
24246
+ <Show69
23987
24247
  when={!thread().loadingConversations()}
23988
24248
  fallback={<span
23989
24249
  class="msg-choice__option-spinner request-status__spinner"
23990
24250
  data-testid="gate-care-loading"
23991
24251
  />}
23992
24252
  >
23993
- <Show68 when={careUnreadCount() > 0}>
24253
+ <Show69 when={careUnreadCount() > 0}>
23994
24254
  <span class="msg-choice__option-badge" data-testid="gate-care-badge">
23995
24255
  {careUnreadCount()}
23996
24256
  </span>
23997
- </Show68>
23998
- </Show68>
24257
+ </Show69>
24258
+ </Show69>
23999
24259
  </button>
24000
24260
  <button
24001
24261
  type="button"
@@ -24006,27 +24266,27 @@ function MessagesPanel(props) {
24006
24266
  <i class="ph-thin ph-lifebuoy msg-choice__option-icon" aria-hidden="true" />
24007
24267
  <span class="msg-choice__option-title">Support</span>
24008
24268
  <span class="msg-choice__option-sub">Account, orders, billing or the website</span>
24009
- <Show68
24269
+ <Show69
24010
24270
  when={!thread().loadingConversations()}
24011
24271
  fallback={<span
24012
24272
  class="msg-choice__option-spinner request-status__spinner"
24013
24273
  data-testid="gate-support-loading"
24014
24274
  />}
24015
24275
  >
24016
- <Show68 when={supportUnreadCount() > 0 && !emailSupport()}>
24276
+ <Show69 when={supportUnreadCount() > 0 && !emailSupport()}>
24017
24277
  <span class="msg-choice__option-badge" data-testid="gate-support-badge">
24018
24278
  {supportUnreadCount()}
24019
24279
  </span>
24020
- </Show68>
24021
- </Show68>
24280
+ </Show69>
24281
+ </Show69>
24022
24282
  </button>
24023
24283
  </div>
24024
24284
 
24025
- <Show68 when={threadNotFound()}>
24285
+ <Show69 when={threadNotFound()}>
24026
24286
  <p class="msg-choice__notice-text" data-testid="messages-gate-note">
24027
24287
  That conversation isn't available.
24028
24288
  </p>
24029
- </Show68>
24289
+ </Show69>
24030
24290
  </div>;
24031
24291
  const CareTeamNotice = () => <div class="msg-thread msg-choice" data-testid="care-team-notice">
24032
24292
  <div class="msg-thread__header">
@@ -24102,9 +24362,9 @@ function MessagesPanel(props) {
24102
24362
  <div>
24103
24363
  <div class="msg-thread__title-row">
24104
24364
  <h3 class="msg-thread__name">{selectedConvo()?.participantName ?? "Provider"}</h3>
24105
- <Show68 when={selectedConvo()}>
24365
+ <Show69 when={selectedConvo()}>
24106
24366
  {(convo) => <ChannelChip source={convo().source} category={convo().category} />}
24107
- </Show68>
24367
+ </Show69>
24108
24368
  </div>
24109
24369
  <p class="msg-thread__role">{selectedConvo()?.participantRole ?? "Prescriber"}</p>
24110
24370
  </div>
@@ -24113,23 +24373,23 @@ function MessagesPanel(props) {
24113
24373
  it — so this is a status cue, not a lock. A transferred one is
24114
24374
  different: its content now lives with the care team, so it's read-only. */
24115
24375
  }
24116
- <Show68 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "closed"}>
24376
+ <Show69 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "closed"}>
24117
24377
  <span class="msg-thread__status" data-testid="thread-status-closed">
24118
24378
  Resolved
24119
24379
  </span>
24120
- </Show68>
24121
- <Show68 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred"}>
24380
+ </Show69>
24381
+ <Show69 when={selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred"}>
24122
24382
  <span class="msg-thread__status" data-testid="thread-status-transferred">
24123
24383
  Moved to care team
24124
24384
  </span>
24125
- </Show68>
24385
+ </Show69>
24126
24386
  </div>
24127
24387
 
24128
24388
  {
24129
24389
  /* A closed (often transferred-back) support thread offers a jump straight
24130
24390
  to the care team, rather than making the customer find the gate. */
24131
24391
  }
24132
- <Show68
24392
+ <Show69
24133
24393
  when={selectedConvo()?.source === "support" && (selectedConvo()?.status === "closed" || selectedConvo()?.status === "transferred")}
24134
24394
  >
24135
24395
  <div class="msg-thread__banner">
@@ -24142,21 +24402,21 @@ function MessagesPanel(props) {
24142
24402
  Continue with your care team
24143
24403
  </button>
24144
24404
  </div>
24145
- </Show68>
24405
+ </Show69>
24146
24406
 
24147
24407
  <div class="msg-thread__messages" data-scrollable>
24148
- <Show68 when={thread().loadingMessages()}>
24408
+ <Show69 when={thread().loadingMessages()}>
24149
24409
  <div class="msg-list__state">
24150
24410
  <div class="request-status__spinner" />
24151
24411
  </div>
24152
- </Show68>
24153
- <For52 each={thread().messages()}>{(msg) => <Bubble msg={msg} />}</For52>
24412
+ </Show69>
24413
+ <For53 each={thread().messages()}>{(msg) => <Bubble msg={msg} />}</For53>
24154
24414
  <div ref={endRef} />
24155
24415
  </div>
24156
24416
 
24157
- <Show68 when={pendingFile() || attachError()}>
24417
+ <Show69 when={pendingFile() || attachError()}>
24158
24418
  <div class="msg-compose__staged">
24159
- <Show68 when={pendingFile()}>
24419
+ <Show69 when={pendingFile()}>
24160
24420
  {(file) => <span class="msg-compose__staged-file" data-testid="staged-file">
24161
24421
  <i class="ph-thin ph-paperclip" aria-hidden="true" />
24162
24422
  {file().name}
@@ -24170,27 +24430,27 @@ function MessagesPanel(props) {
24170
24430
  ×
24171
24431
  </button>
24172
24432
  </span>}
24173
- </Show68>
24174
- <Show68 when={attachError()}>
24433
+ </Show69>
24434
+ <Show69 when={attachError()}>
24175
24435
  <span class="msg-compose__error" role="alert">
24176
24436
  {attachError()}
24177
24437
  </span>
24178
- </Show68>
24438
+ </Show69>
24179
24439
  </div>
24180
- </Show68>
24440
+ </Show69>
24181
24441
 
24182
24442
  {
24183
24443
  /* A transferred support thread is read-only: the customer's messages were
24184
24444
  moved to their care team, so the place to continue is that conversation
24185
24445
  (the banner above), not a reply that would reopen this one. */
24186
24446
  }
24187
- <Show68 when={!(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred")}>
24447
+ <Show69 when={!(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred")}>
24188
24448
  <div class="msg-compose">
24189
24449
  {
24190
24450
  /* Support threads only: clinical conversations are an Apex proxy and
24191
24451
  their attachment path isn't wired up here yet. */
24192
24452
  }
24193
- <Show68 when={thread().selectedSource() === "support"}>
24453
+ <Show69 when={thread().selectedSource() === "support"}>
24194
24454
  <label class="msg-compose__attach" title="Attach a file">
24195
24455
  <i class="ph-thin ph-paperclip" aria-hidden="true" />
24196
24456
  <span class="msg-compose__attach-label">Attach a file</span>
@@ -24202,7 +24462,7 @@ function MessagesPanel(props) {
24202
24462
  onChange={(e) => stageFile(e.currentTarget, setPendingFile)}
24203
24463
  />
24204
24464
  </label>
24205
- </Show68>
24465
+ </Show69>
24206
24466
  <textarea
24207
24467
  ref={composerRef}
24208
24468
  class="msg-compose__input"
@@ -24223,25 +24483,25 @@ function MessagesPanel(props) {
24223
24483
  {thread().sending() ? "Sending\u2026" : "Send"}
24224
24484
  </button>
24225
24485
  </div>
24226
- </Show68>
24486
+ </Show69>
24227
24487
  </>;
24228
24488
  return <div class="msg-panel" data-testid="messages-panel">
24229
- <Show68
24489
+ <Show69
24230
24490
  when={channel() !== "gate"}
24231
24491
  fallback={<div class="msg-panel__layout msg-panel__layout--gate">
24232
24492
  <ChannelGate />
24233
24493
  </div>}
24234
24494
  >
24235
- <Show68
24495
+ <Show69
24236
24496
  when={!(channel() === "support" && emailSupport() && thread().selectedId() == null)}
24237
24497
  fallback={
24238
24498
  // Email-channel support: the form (or its confirmation) and nothing
24239
24499
  // else. A deep-linked thread that predates the switch still opens
24240
24500
  // in the normal layout below, since it has a selection.
24241
24501
  <div class="msg-panel__layout msg-panel__layout--gate">
24242
- <Show68 when={!emailSent()} fallback={<SupportEmailSent />}>
24502
+ <Show69 when={!emailSent()} fallback={<SupportEmailSent />}>
24243
24503
  <NewSupportThread />
24244
- </Show68>
24504
+ </Show69>
24245
24505
  </div>
24246
24506
  }
24247
24507
  >
@@ -24250,7 +24510,7 @@ function MessagesPanel(props) {
24250
24510
  <ConversationList />
24251
24511
  </div>
24252
24512
  <div class={`msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`}>
24253
- <Show68 when={composing()}>
24513
+ <Show69 when={composing()}>
24254
24514
  <Switch6>
24255
24515
  <Match6 when={composeStep() === "care"}>
24256
24516
  <NewCareTeamThread />
@@ -24262,26 +24522,26 @@ function MessagesPanel(props) {
24262
24522
  <NewSupportThread />
24263
24523
  </Match6>
24264
24524
  </Switch6>
24265
- </Show68>
24266
- <Show68 when={!composing()}>
24267
- <Show68
24525
+ </Show69>
24526
+ <Show69 when={!composing()}>
24527
+ <Show69
24268
24528
  when={thread().selectedId() != null}
24269
24529
  fallback={<div class="msg-panel__placeholder" data-testid="messages-placeholder">
24270
24530
  <p>Select a conversation to read and reply.</p>
24271
24531
  </div>}
24272
24532
  >
24273
24533
  <Thread />
24274
- </Show68>
24275
- </Show68>
24534
+ </Show69>
24535
+ </Show69>
24276
24536
  </div>
24277
24537
  </div>
24278
- </Show68>
24279
- </Show68>
24538
+ </Show69>
24539
+ </Show69>
24280
24540
  </div>;
24281
24541
  }
24282
24542
 
24283
24543
  // src/pages/member/SurveyHistory.tsx
24284
- import { createSignal as createSignal47, createResource as createResource29, For as For53, Show as Show69 } from "solid-js";
24544
+ import { createSignal as createSignal49, createResource as createResource30, For as For54, Show as Show70 } from "solid-js";
24285
24545
  var MODE_LABELS = {
24286
24546
  initial: "Intake questionnaire",
24287
24547
  refill: "Refill check-in"
@@ -24297,21 +24557,21 @@ var asEmptyOn404 = (value) => (err) => {
24297
24557
  throw err;
24298
24558
  };
24299
24559
  function SurveyHistory() {
24300
- const [list] = createResource29(
24560
+ const [list] = createResource30(
24301
24561
  () => membersApi.getSurveyResponses().then((r) => r.responses).catch(asEmptyOn404([]))
24302
24562
  );
24303
- const [selectedId, setSelectedId] = createSignal47(null);
24304
- const [detail] = createResource29(
24563
+ const [selectedId, setSelectedId] = createSignal49(null);
24564
+ const [detail] = createResource30(
24305
24565
  selectedId,
24306
24566
  (id) => membersApi.getSurveyResponse(id).catch(asEmptyOn404(null))
24307
24567
  );
24308
- const ListView = () => <Show69
24568
+ const ListView = () => <Show70
24309
24569
  when={!list.error}
24310
24570
  fallback={<div class="portal-state" data-testid="history-error">
24311
24571
  <p>We couldn't load your submitted surveys. Please try again in a moment.</p>
24312
24572
  </div>}
24313
24573
  >
24314
- <Show69
24574
+ <Show70
24315
24575
  when={(list() ?? []).length > 0}
24316
24576
  fallback={<div class="portal-state" data-testid="history-empty">
24317
24577
  <p>No submitted questionnaires yet.</p>
@@ -24321,7 +24581,7 @@ function SurveyHistory() {
24321
24581
  </div>}
24322
24582
  >
24323
24583
  <ul class="history-list" data-testid="history-list">
24324
- <For53 each={list()}>
24584
+ <For54 each={list()}>
24325
24585
  {(item) => <li>
24326
24586
  <button type="button" class="history-row" onClick={() => setSelectedId(item.id)}>
24327
24587
  <span class="history-row__mode">{MODE_LABELS[item.mode] ?? "Questionnaire"}</span>
@@ -24331,10 +24591,10 @@ function SurveyHistory() {
24331
24591
  <i class="ph-thin ph-caret-right portal-icon" aria-hidden="true" />
24332
24592
  </button>
24333
24593
  </li>}
24334
- </For53>
24594
+ </For54>
24335
24595
  </ul>
24336
- </Show69>
24337
- </Show69>;
24596
+ </Show70>
24597
+ </Show70>;
24338
24598
  const DetailView = () => <div data-testid="history-detail">
24339
24599
  <button
24340
24600
  type="button"
@@ -24343,14 +24603,14 @@ function SurveyHistory() {
24343
24603
  >
24344
24604
  <i class="ph-thin ph-caret-left portal-icon" aria-hidden="true" /> All questionnaires
24345
24605
  </button>
24346
- <Show69
24606
+ <Show70
24347
24607
  when={!detail.loading}
24348
24608
  fallback={<div class="portal-state">
24349
24609
  <div class="request-status__spinner" />
24350
24610
  <p>Loading your answers…</p>
24351
24611
  </div>}
24352
24612
  >
24353
- <Show69
24613
+ <Show70
24354
24614
  when={!detail.error && detail()}
24355
24615
  fallback={<div class="portal-state" data-testid="history-detail-error">
24356
24616
  <p>We couldn't load this questionnaire. Please try again in a moment.</p>
@@ -24364,33 +24624,33 @@ function SurveyHistory() {
24364
24624
  shown exactly as they were at the time — they aren't updated afterwards.
24365
24625
  </p>
24366
24626
  </header>
24367
- <For53 each={t().sections}>
24627
+ <For54 each={t().sections}>
24368
24628
  {(section) => <section class="history-section">
24369
24629
  <h3 class="lab-label">{section.title}</h3>
24370
- <For53 each={section.items}>
24630
+ <For54 each={section.items}>
24371
24631
  {(item) => <div class="history-qa">
24372
24632
  <p class="history-qa__q">{item.question}</p>
24373
24633
  <p class="history-qa__a">{item.answer}</p>
24374
24634
  </div>}
24375
- </For53>
24635
+ </For54>
24376
24636
  </section>}
24377
- </For53>
24637
+ </For54>
24378
24638
  </article>}
24379
- </Show69>
24380
- </Show69>
24639
+ </Show70>
24640
+ </Show70>
24381
24641
  </div>;
24382
24642
  return <div class="survey-history" data-testid="survey-history">
24383
- <Show69
24643
+ <Show70
24384
24644
  when={!list.loading || selectedId()}
24385
24645
  fallback={<div class="portal-state">
24386
24646
  <div class="request-status__spinner" />
24387
24647
  <p>Loading your submitted surveys…</p>
24388
24648
  </div>}
24389
24649
  >
24390
- <Show69 when={selectedId()} fallback={<ListView />}>
24650
+ <Show70 when={selectedId()} fallback={<ListView />}>
24391
24651
  <DetailView />
24392
- </Show69>
24393
- </Show69>
24652
+ </Show70>
24653
+ </Show70>
24394
24654
  </div>;
24395
24655
  }
24396
24656
 
@@ -24453,15 +24713,15 @@ function MemberPortal(props) {
24453
24713
  }
24454
24714
  return null;
24455
24715
  };
24456
- const [tab, setTab] = createSignal48(resolveTabFromUrl() ?? "tracker");
24457
- const [intent, setIntent] = createSignal48(resolveIntentFromUrl());
24716
+ const [tab, setTab] = createSignal50(resolveTabFromUrl() ?? "tracker");
24717
+ const [intent, setIntent] = createSignal50(resolveIntentFromUrl());
24458
24718
  onMount8(() => {
24459
24719
  const resolved = resolveTabFromUrl();
24460
24720
  if (resolved && resolved !== tab()) setTab(resolved);
24461
24721
  const resolvedIntent = resolveIntentFromUrl();
24462
24722
  if (resolvedIntent) setIntent(resolvedIntent);
24463
24723
  });
24464
- const [offers, setOffers] = createSignal48([]);
24724
+ const [offers, setOffers] = createSignal50([]);
24465
24725
  onMount8(() => {
24466
24726
  if (!props.auth.isAuthenticated()) return;
24467
24727
  offersApi.mine().then((r) => setOffers(r.offers ?? [])).catch(() => setOffers([]));
@@ -24491,7 +24751,7 @@ function MemberPortal(props) {
24491
24751
  } catch {
24492
24752
  }
24493
24753
  };
24494
- const RailNav = (p) => <For54 each={tabs()}>
24754
+ const RailNav = (p) => <For55 each={tabs()}>
24495
24755
  {(item) => <button
24496
24756
  type="button"
24497
24757
  class={`portal-${p.variant}__item${tab() === item.key ? " is-active" : ""}`}
@@ -24501,17 +24761,17 @@ function MemberPortal(props) {
24501
24761
  >
24502
24762
  <i class={`${item.icon} portal-icon`} aria-hidden="true" />
24503
24763
  <span class="portal-item__label">{item.label}</span>
24504
- <Show70 when={item.key === "tracker" && inMotion()}>
24764
+ <Show71 when={item.key === "tracker" && inMotion()}>
24505
24765
  <span class="portal-item__live" aria-label="In progress" />
24506
- </Show70>
24507
- <Show70 when={item.key === "messages" && unreadTotal() > 0}>
24766
+ </Show71>
24767
+ <Show71 when={item.key === "messages" && unreadTotal() > 0}>
24508
24768
  <span class={`portal-item__badge${p.variant === "tabs" ? " portal-item__badge--tab" : ""}`}>
24509
24769
  {unreadTotal() > 99 ? "99+" : unreadTotal()}
24510
24770
  </span>
24511
- </Show70>
24771
+ </Show71>
24512
24772
  </button>}
24513
- </For54>;
24514
- const TrackerTab = () => <Show70
24773
+ </For55>;
24774
+ const TrackerTab = () => <Show71
24515
24775
  when={data.primaryRx()}
24516
24776
  fallback={<OrderTracker
24517
24777
  request={null}
@@ -24537,10 +24797,10 @@ function MemberPortal(props) {
24537
24797
  intakeHref={props.routes.intake}
24538
24798
  renewHref={props.routes.renew}
24539
24799
  />
24540
- <Show70 when={data.otherRx().length > 0}>
24800
+ <Show71 when={data.otherRx().length > 0}>
24541
24801
  <div class="rx-others" data-testid="rx-others">
24542
24802
  <span class="lab-label">Other orders</span>
24543
- <For54 each={data.otherRx()}>
24803
+ <For55 each={data.otherRx()}>
24544
24804
  {(rx) => <RxRow
24545
24805
  rx={rx}
24546
24806
  request={data.toTrackerRequest(rx)}
@@ -24550,19 +24810,19 @@ function MemberPortal(props) {
24550
24810
  intakeHref={props.routes.intake}
24551
24811
  renewHref={props.routes.renew}
24552
24812
  />}
24553
- </For54>
24813
+ </For55>
24554
24814
  </div>
24555
- </Show70>
24815
+ </Show71>
24556
24816
  </div>}
24557
- </Show70>;
24558
- const Content = () => <Show70
24817
+ </Show71>;
24818
+ const Content = () => <Show71
24559
24819
  when={!data.loading()}
24560
24820
  fallback={<div class="portal-state">
24561
24821
  <div class="request-status__spinner" />
24562
24822
  <p>Loading your portal…</p>
24563
24823
  </div>}
24564
24824
  >
24565
- <Show70
24825
+ <Show71
24566
24826
  when={!data.error()}
24567
24827
  fallback={<div class="request-status__error portal-state">
24568
24828
  <p class="request-status__error-text">{data.error()}</p>
@@ -24602,8 +24862,8 @@ function MemberPortal(props) {
24602
24862
  <MessagesPanel thread={messages} intent={intent()} />
24603
24863
  </Match7>
24604
24864
  </Switch7>
24605
- </Show70>
24606
- </Show70>;
24865
+ </Show71>
24866
+ </Show71>;
24607
24867
  return <main
24608
24868
  class="portal"
24609
24869
  data-testid="member-portal"
@@ -24615,30 +24875,30 @@ function MemberPortal(props) {
24615
24875
  <aside class="portal-rail">
24616
24876
  <div class="portal-rail__brand">
24617
24877
  <a href={props.brand.homeHref} class="portal-rail__logo">
24618
- <Show70
24878
+ <Show71
24619
24879
  when={props.brand.logoSrc}
24620
24880
  fallback={<span class="portal-rail__wordmark">{props.brand.name}</span>}
24621
24881
  >
24622
24882
  {(src) => <img src={src()} alt={props.brand.name} />}
24623
- </Show70>
24883
+ </Show71>
24624
24884
  </a>
24625
24885
  <span class="portal-rail__dot" aria-hidden="true" />
24626
24886
  </div>
24627
24887
 
24628
- <Show70 when={data.firstName() !== "Member"}>
24888
+ <Show71 when={data.firstName() !== "Member"}>
24629
24889
  <p class="portal-rail__hi">Hi, {data.firstName()}</p>
24630
- </Show70>
24890
+ </Show71>
24631
24891
 
24632
24892
  <nav class="portal-rail__nav" aria-label="Portal sections">
24633
24893
  <RailNav variant="rail" />
24634
24894
  </nav>
24635
24895
 
24636
24896
  <div class="portal-rail__foot">
24637
- <Show70 when={showBackLink()}>
24897
+ <Show71 when={showBackLink()}>
24638
24898
  <a href={catalogHref()} class="portal-rail__back" data-testid="rail-back">
24639
24899
  ← Back to shop
24640
24900
  </a>
24641
- </Show70>
24901
+ </Show71>
24642
24902
  <button type="button" class="portal-rail__signout" onClick={props.auth.onSignOut}>
24643
24903
  — Sign out
24644
24904
  </button>
@@ -24648,11 +24908,11 @@ function MemberPortal(props) {
24648
24908
  {
24649
24909
  /* ── Mobile back bar (the rail is hidden ≤900px, so nothing else links home) ── */
24650
24910
  }
24651
- <Show70 when={showBackLink()}>
24911
+ <Show71 when={showBackLink()}>
24652
24912
  <a href={catalogHref()} class="portal-topbar-back" data-testid="mobile-back">
24653
24913
  <span aria-hidden="true">←</span> Back to shop
24654
24914
  </a>
24655
- </Show70>
24915
+ </Show71>
24656
24916
 
24657
24917
  {
24658
24918
  /* ── Content ── */
@@ -24673,10 +24933,10 @@ function MemberPortal(props) {
24673
24933
  }
24674
24934
 
24675
24935
  // 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";
24936
+ import { createEffect as createEffect18, createSignal as createSignal52, Match as Match8, Show as Show77, Switch as Switch8, For as For60 } from "solid-js";
24677
24937
 
24678
24938
  // src/pages/affiliate/Overview.tsx
24679
- import { Show as Show71, For as For55 } from "solid-js";
24939
+ import { Show as Show72, For as For56 } from "solid-js";
24680
24940
  function formatMoney(cents) {
24681
24941
  return `$${(cents / 100).toFixed(2)}`;
24682
24942
  }
@@ -24710,7 +24970,7 @@ function AffiliateOverview() {
24710
24970
  Overview
24711
24971
  </h1>
24712
24972
 
24713
- <Show71 when={isPending()}>
24973
+ <Show72 when={isPending()}>
24714
24974
  <div
24715
24975
  style={{
24716
24976
  padding: "1rem 1.25rem",
@@ -24723,9 +24983,9 @@ function AffiliateOverview() {
24723
24983
  Your affiliate account is awaiting approval. Once an admin
24724
24984
  activates it, your referral link will start earning commissions.
24725
24985
  </div>
24726
- </Show71>
24986
+ </Show72>
24727
24987
 
24728
- <Show71
24988
+ <Show72
24729
24989
  when={stats()}
24730
24990
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading stats…</div>}
24731
24991
  >
@@ -24736,7 +24996,7 @@ function AffiliateOverview() {
24736
24996
  gap: "1rem"
24737
24997
  }}
24738
24998
  >
24739
- <For55 each={cards(s())}>
24999
+ <For56 each={cards(s())}>
24740
25000
  {(card) => <div
24741
25001
  style={{
24742
25002
  padding: "1.25rem",
@@ -24766,14 +25026,14 @@ function AffiliateOverview() {
24766
25026
  {card.value}
24767
25027
  </div>
24768
25028
  </div>}
24769
- </For55>
25029
+ </For56>
24770
25030
  </div>}
24771
- </Show71>
25031
+ </Show72>
24772
25032
  </div>;
24773
25033
  }
24774
25034
 
24775
25035
  // src/pages/affiliate/Conversions.tsx
24776
- import { Show as Show72, For as For56 } from "solid-js";
25036
+ import { Show as Show73, For as For57 } from "solid-js";
24777
25037
  function formatMoney2(cents) {
24778
25038
  return `$${(cents / 100).toFixed(2)}`;
24779
25039
  }
@@ -24802,7 +25062,7 @@ function AffiliateConversions() {
24802
25062
  Conversions
24803
25063
  </h1>
24804
25064
 
24805
- <Show72
25065
+ <Show73
24806
25066
  when={(conversions() ?? []).length > 0}
24807
25067
  fallback={<div
24808
25068
  style={{
@@ -24836,12 +25096,12 @@ function AffiliateConversions() {
24836
25096
  </tr>
24837
25097
  </thead>
24838
25098
  <tbody>
24839
- <For56 each={conversions()}>
25099
+ <For57 each={conversions()}>
24840
25100
  {(c) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
24841
25101
  <td data-label="Date" style={td()}>{formatDate4(c.createdAt)}</td>
24842
25102
  <td data-label="Type" style={td()}>
24843
25103
  {c.paymentType}
24844
- <Show72 when={c.tier === 2}>
25104
+ <Show73 when={c.tier === 2}>
24845
25105
  <span
24846
25106
  style={{
24847
25107
  "margin-left": "0.4rem",
@@ -24856,7 +25116,7 @@ function AffiliateConversions() {
24856
25116
  >
24857
25117
  Override
24858
25118
  </span>
24859
- </Show72>
25119
+ </Show73>
24860
25120
  </td>
24861
25121
  <td data-label="Order total" style={td()}>{formatMoney2(c.orderTotalCents)}</td>
24862
25122
  <td data-label="Commission" style={{ ...td(), color: "var(--app-affiliate-fg)", "font-weight": "600" }}>
@@ -24877,11 +25137,11 @@ function AffiliateConversions() {
24877
25137
  </span>
24878
25138
  </td>
24879
25139
  </tr>}
24880
- </For56>
25140
+ </For57>
24881
25141
  </tbody>
24882
25142
  </table>
24883
25143
  </div>
24884
- </Show72>
25144
+ </Show73>
24885
25145
  </div>;
24886
25146
  }
24887
25147
  function th() {
@@ -24903,7 +25163,7 @@ function td() {
24903
25163
  }
24904
25164
 
24905
25165
  // src/pages/affiliate/Downline.tsx
24906
- import { Show as Show73, For as For57 } from "solid-js";
25166
+ import { Show as Show74, For as For58 } from "solid-js";
24907
25167
  function formatDate5(iso) {
24908
25168
  const d = new Date(iso);
24909
25169
  if (Number.isNaN(d.getTime())) return iso;
@@ -24934,7 +25194,7 @@ function AffiliateDownline() {
24934
25194
  make — those show up as “Override” rows on your Conversions.
24935
25195
  </p>
24936
25196
 
24937
- <Show73
25197
+ <Show74
24938
25198
  when={(downline() ?? []).length > 0}
24939
25199
  fallback={<div
24940
25200
  style={{
@@ -24970,7 +25230,7 @@ function AffiliateDownline() {
24970
25230
  </tr>
24971
25231
  </thead>
24972
25232
  <tbody>
24973
- <For57 each={downline()}>
25233
+ <For58 each={downline()}>
24974
25234
  {(d) => <tr style={{ "border-top": "1px solid var(--app-affiliate-border)" }}>
24975
25235
  <td
24976
25236
  data-label="Code"
@@ -24999,11 +25259,11 @@ function AffiliateDownline() {
24999
25259
  {formatDate5(d.createdAt)}
25000
25260
  </td>
25001
25261
  </tr>}
25002
- </For57>
25262
+ </For58>
25003
25263
  </tbody>
25004
25264
  </table>
25005
25265
  </div>
25006
- </Show73>
25266
+ </Show74>
25007
25267
  </div>;
25008
25268
  }
25009
25269
  function th2() {
@@ -25025,10 +25285,10 @@ function td2() {
25025
25285
  }
25026
25286
 
25027
25287
  // src/pages/affiliate/ReferralLink.tsx
25028
- import { Show as Show74, createSignal as createSignal49, createMemo as createMemo18 } from "solid-js";
25288
+ import { Show as Show75, createSignal as createSignal51, createMemo as createMemo18 } from "solid-js";
25029
25289
  function AffiliateReferralLink() {
25030
25290
  const { links } = useAffiliateLinks();
25031
- const [copied, setCopied] = createSignal49(false);
25291
+ const [copied, setCopied] = createSignal51(false);
25032
25292
  const homepageLink = createMemo18(() => {
25033
25293
  const l = links();
25034
25294
  const affiliate = affiliateAuth_default.affiliate();
@@ -25059,7 +25319,7 @@ function AffiliateReferralLink() {
25059
25319
  Referral link
25060
25320
  </h1>
25061
25321
 
25062
- <Show74
25322
+ <Show75
25063
25323
  when={homepageLink()}
25064
25324
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>
25065
25325
  Your referral link will appear here once your account is approved.
@@ -25135,12 +25395,12 @@ function AffiliateReferralLink() {
25135
25395
  the cookie window, you earn commission on the conversion.
25136
25396
  </div>
25137
25397
  </div>
25138
- </Show74>
25398
+ </Show75>
25139
25399
  </div>;
25140
25400
  }
25141
25401
 
25142
25402
  // src/pages/affiliate/Settings.tsx
25143
- import { Show as Show75, For as For58 } from "solid-js";
25403
+ import { Show as Show76, For as For59 } from "solid-js";
25144
25404
  var STATUS_LABEL2 = {
25145
25405
  pending: "Pending approval",
25146
25406
  active: "Active",
@@ -25170,7 +25430,7 @@ function AffiliateSettings() {
25170
25430
  Account
25171
25431
  </h1>
25172
25432
 
25173
- <Show75
25433
+ <Show76
25174
25434
  when={affiliate()}
25175
25435
  fallback={<div style={{ color: "var(--app-affiliate-fg-muted)" }}>Loading…</div>}
25176
25436
  >
@@ -25182,7 +25442,7 @@ function AffiliateSettings() {
25182
25442
  overflow: "hidden"
25183
25443
  }}
25184
25444
  >
25185
- <For58 each={rows(a())}>
25445
+ <For59 each={rows(a())}>
25186
25446
  {(row) => <div
25187
25447
  style={{
25188
25448
  display: "flex",
@@ -25204,9 +25464,9 @@ function AffiliateSettings() {
25204
25464
  </div>
25205
25465
  <div style={{ color: "var(--app-affiliate-fg)" }}>{row.value}</div>
25206
25466
  </div>}
25207
- </For58>
25467
+ </For59>
25208
25468
  </div>}
25209
- </Show75>
25469
+ </Show76>
25210
25470
 
25211
25471
  <div>
25212
25472
  <button
@@ -25256,9 +25516,9 @@ var TAB_ORDER = [
25256
25516
  function AffiliatePortal(props) {
25257
25517
  const orderedTabs = () => props.enabledTabs ? TAB_ORDER.filter((t) => props.enabledTabs.includes(t)) : TAB_ORDER;
25258
25518
  const fallbackTab = () => props.defaultTab ?? orderedTabs()[0] ?? "overview";
25259
- const [internalTab, setInternalTab] = createSignal50(fallbackTab());
25519
+ const [internalTab, setInternalTab] = createSignal52(fallbackTab());
25260
25520
  const currentTab = () => props.activeTab ?? internalTab();
25261
- const [drawerOpen, setDrawerOpen] = createSignal50(false);
25521
+ const [drawerOpen, setDrawerOpen] = createSignal52(false);
25262
25522
  createEffect18(() => {
25263
25523
  const auth = props.auth;
25264
25524
  if (!auth) return;
@@ -25277,7 +25537,7 @@ function AffiliatePortal(props) {
25277
25537
  props.onTabChange?.(tab);
25278
25538
  };
25279
25539
  const topOffset = () => props.topOffset ?? "0px";
25280
- return <Show76 when={allowed()} fallback={<AffiliateGateSpinner topOffset={topOffset()} />}>
25540
+ return <Show77 when={allowed()} fallback={<AffiliateGateSpinner topOffset={topOffset()} />}>
25281
25541
  <div
25282
25542
  class="app-affiliate-root app-affiliate-shell"
25283
25543
  classList={{ "is-drawer-open": drawerOpen() }}
@@ -25326,7 +25586,7 @@ function AffiliatePortal(props) {
25326
25586
  Affiliate Portal
25327
25587
  </h2>
25328
25588
  <nav style={{ display: "flex", "flex-direction": "column", gap: "0.25rem" }}>
25329
- <For59 each={orderedTabs()}>
25589
+ <For60 each={orderedTabs()}>
25330
25590
  {(tab) => <button
25331
25591
  type="button"
25332
25592
  onClick={() => handleTabClick(tab)}
@@ -25345,15 +25605,15 @@ function AffiliatePortal(props) {
25345
25605
  color: currentTab() === tab ? "var(--app-affiliate-primary-soft-fg)" : "var(--app-affiliate-fg-muted)"
25346
25606
  }}
25347
25607
  >
25348
- <Show76 when={props.tabIcons?.[tab]}>
25608
+ <Show77 when={props.tabIcons?.[tab]}>
25349
25609
  <span
25350
25610
  class={props.tabIcons[tab]}
25351
25611
  style={{ "font-size": "1rem", opacity: 0.7, "flex-shrink": 0 }}
25352
25612
  />
25353
- </Show76>
25613
+ </Show77>
25354
25614
  {TAB_LABELS2[tab]}
25355
25615
  </button>}
25356
- </For59>
25616
+ </For60>
25357
25617
  </nav>
25358
25618
  </div>
25359
25619
  </aside>
@@ -25378,7 +25638,7 @@ function AffiliatePortal(props) {
25378
25638
  </Switch8>
25379
25639
  </div>
25380
25640
  </div>
25381
- </Show76>;
25641
+ </Show77>;
25382
25642
  }
25383
25643
  function AffiliateGateSpinner(props) {
25384
25644
  return <div
@@ -25410,12 +25670,12 @@ function AffiliateGateSpinner(props) {
25410
25670
  }
25411
25671
 
25412
25672
  // src/pages/AffiliateRegister.tsx
25413
- import { createSignal as createSignal52, Show as Show77 } from "solid-js";
25673
+ import { createSignal as createSignal54, Show as Show78 } from "solid-js";
25414
25674
 
25415
25675
  // src/pages/AffiliatePasswordInput.tsx
25416
- import { createSignal as createSignal51 } from "solid-js";
25676
+ import { createSignal as createSignal53 } from "solid-js";
25417
25677
  function AffiliatePasswordInput(props) {
25418
- const [visible, setVisible] = createSignal51(false);
25678
+ const [visible, setVisible] = createSignal53(false);
25419
25679
  return <div style={{ position: "relative" }}>
25420
25680
  <input
25421
25681
  type={visible() ? "text" : "password"}
@@ -25468,14 +25728,14 @@ function inputStyle() {
25468
25728
 
25469
25729
  // src/pages/AffiliateRegister.tsx
25470
25730
  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);
25731
+ const [firstName, setFirstName] = createSignal54("");
25732
+ const [lastName, setLastName] = createSignal54("");
25733
+ const [email, setEmail] = createSignal54("");
25734
+ const [password, setPassword] = createSignal54("");
25735
+ const [affiliateCode, setAffiliateCode] = createSignal54("");
25736
+ const [submitting, setSubmitting] = createSignal54(false);
25737
+ const [submitted, setSubmitted] = createSignal54(false);
25738
+ const [error, setError] = createSignal54(null);
25479
25739
  async function handleSubmit(e) {
25480
25740
  e.preventDefault();
25481
25741
  setError(null);
@@ -25542,7 +25802,7 @@ function AffiliateRegister(props) {
25542
25802
  </p>
25543
25803
  </div>
25544
25804
 
25545
- <Show77
25805
+ <Show78
25546
25806
  when={!submitted()}
25547
25807
  fallback={<div
25548
25808
  style={{
@@ -25638,7 +25898,7 @@ function AffiliateRegister(props) {
25638
25898
  the website address itself.
25639
25899
  </div>
25640
25900
 
25641
- <Show77 when={error()}>
25901
+ <Show78 when={error()}>
25642
25902
  <div
25643
25903
  style={{
25644
25904
  padding: "0.625rem 0.875rem",
@@ -25650,7 +25910,7 @@ function AffiliateRegister(props) {
25650
25910
  >
25651
25911
  {error()}
25652
25912
  </div>
25653
- </Show77>
25913
+ </Show78>
25654
25914
 
25655
25915
  <button
25656
25916
  type="submit"
@@ -25669,7 +25929,7 @@ function AffiliateRegister(props) {
25669
25929
  {submitting() ? "Submitting\u2026" : "Apply"}
25670
25930
  </button>
25671
25931
 
25672
- <Show77 when={props.onNavigateLogin}>
25932
+ <Show78 when={props.onNavigateLogin}>
25673
25933
  <button
25674
25934
  type="button"
25675
25935
  onClick={() => props.onNavigateLogin?.()}
@@ -25677,9 +25937,9 @@ function AffiliateRegister(props) {
25677
25937
  >
25678
25938
  Already have an account? Log in
25679
25939
  </button>
25680
- </Show77>
25940
+ </Show78>
25681
25941
  </form>
25682
- </Show77>
25942
+ </Show78>
25683
25943
  </div>
25684
25944
  </div>;
25685
25945
  }
@@ -25696,11 +25956,11 @@ function Row2(props) {
25696
25956
  {props.label}
25697
25957
  </span>
25698
25958
  {props.children}
25699
- <Show77 when={props.hint}>
25959
+ <Show78 when={props.hint}>
25700
25960
  <span style={{ "font-size": "0.75rem", color: "var(--app-affiliate-fg-subtle)" }}>
25701
25961
  {props.hint}
25702
25962
  </span>
25703
- </Show77>
25963
+ </Show78>
25704
25964
  </label>;
25705
25965
  }
25706
25966
  function inputStyle2() {
@@ -25730,12 +25990,12 @@ function linkStyle() {
25730
25990
  }
25731
25991
 
25732
25992
  // src/pages/AffiliateLogin.tsx
25733
- import { createSignal as createSignal53, Show as Show78 } from "solid-js";
25993
+ import { createSignal as createSignal55, Show as Show79 } from "solid-js";
25734
25994
  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);
25995
+ const [email, setEmail] = createSignal55("");
25996
+ const [password, setPassword] = createSignal55("");
25997
+ const [submitting, setSubmitting] = createSignal55(false);
25998
+ const [error, setError] = createSignal55(null);
25739
25999
  async function handleSubmit(e) {
25740
26000
  e.preventDefault();
25741
26001
  setError(null);
@@ -25810,7 +26070,7 @@ function AffiliateLogin(props) {
25810
26070
  />
25811
26071
  </label>
25812
26072
 
25813
- <Show78 when={error()}>
26073
+ <Show79 when={error()}>
25814
26074
  <div
25815
26075
  style={{
25816
26076
  padding: "0.625rem 0.875rem",
@@ -25822,7 +26082,7 @@ function AffiliateLogin(props) {
25822
26082
  >
25823
26083
  {error()}
25824
26084
  </div>
25825
- </Show78>
26085
+ </Show79>
25826
26086
 
25827
26087
  <button
25828
26088
  type="submit"
@@ -25841,7 +26101,7 @@ function AffiliateLogin(props) {
25841
26101
  {submitting() ? "Logging in\u2026" : "Log in"}
25842
26102
  </button>
25843
26103
 
25844
- <Show78 when={props.onNavigateForgotPassword}>
26104
+ <Show79 when={props.onNavigateForgotPassword}>
25845
26105
  <button
25846
26106
  type="button"
25847
26107
  onClick={() => props.onNavigateForgotPassword?.()}
@@ -25858,9 +26118,9 @@ function AffiliateLogin(props) {
25858
26118
  >
25859
26119
  Forgot your password?
25860
26120
  </button>
25861
- </Show78>
26121
+ </Show79>
25862
26122
 
25863
- <Show78 when={props.onNavigateRegister}>
26123
+ <Show79 when={props.onNavigateRegister}>
25864
26124
  <button
25865
26125
  type="button"
25866
26126
  onClick={() => props.onNavigateRegister?.()}
@@ -25877,7 +26137,7 @@ function AffiliateLogin(props) {
25877
26137
  >
25878
26138
  New affiliate? Apply
25879
26139
  </button>
25880
- </Show78>
26140
+ </Show79>
25881
26141
  </form>
25882
26142
  </div>
25883
26143
  </div>;
@@ -25905,12 +26165,12 @@ function inputStyle3() {
25905
26165
  }
25906
26166
 
25907
26167
  // src/pages/ForgotPassword.tsx
25908
- import { createSignal as createSignal54, Show as Show79 } from "solid-js";
26168
+ import { createSignal as createSignal56, Show as Show80 } from "solid-js";
25909
26169
  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);
26170
+ const [email, setEmail] = createSignal56("");
26171
+ const [submitting, setSubmitting] = createSignal56(false);
26172
+ const [error, setError] = createSignal56(null);
26173
+ const [message, setMessage] = createSignal56(null);
25914
26174
  async function handleSubmit(e) {
25915
26175
  e.preventDefault();
25916
26176
  setError(null);
@@ -25962,7 +26222,7 @@ function ForgotPasswordPage(props) {
25962
26222
  Reset your password
25963
26223
  </h1>
25964
26224
 
25965
- <Show79
26225
+ <Show80
25966
26226
  when={!message()}
25967
26227
  fallback={<>
25968
26228
  <div
@@ -25979,7 +26239,7 @@ function ForgotPasswordPage(props) {
25979
26239
  The link is good for one hour. If nothing arrives, check your spam folder — and make sure this is the
25980
26240
  address you signed up with.
25981
26241
  </p>
25982
- <Show79 when={props.onDone}>
26242
+ <Show80 when={props.onDone}>
25983
26243
  <button
25984
26244
  type="button"
25985
26245
  onClick={() => props.onDone?.()}
@@ -25995,7 +26255,7 @@ function ForgotPasswordPage(props) {
25995
26255
  >
25996
26256
  Back to sign in
25997
26257
  </button>
25998
- </Show79>
26258
+ </Show80>
25999
26259
  </>}
26000
26260
  >
26001
26261
  <form
@@ -26013,7 +26273,7 @@ function ForgotPasswordPage(props) {
26013
26273
  />
26014
26274
  </label>
26015
26275
 
26016
- <Show79 when={error()}>
26276
+ <Show80 when={error()}>
26017
26277
  <div
26018
26278
  style={{
26019
26279
  padding: "0.625rem 0.875rem",
@@ -26025,7 +26285,7 @@ function ForgotPasswordPage(props) {
26025
26285
  >
26026
26286
  {error()}
26027
26287
  </div>
26028
- </Show79>
26288
+ </Show80>
26029
26289
 
26030
26290
  <button
26031
26291
  type="submit"
@@ -26044,7 +26304,7 @@ function ForgotPasswordPage(props) {
26044
26304
  {submitting() ? "Sending\u2026" : "Send reset link"}
26045
26305
  </button>
26046
26306
  </form>
26047
- </Show79>
26307
+ </Show80>
26048
26308
  </div>
26049
26309
  </div>;
26050
26310
  }
@@ -26071,7 +26331,7 @@ function inputStyle4() {
26071
26331
  }
26072
26332
 
26073
26333
  // src/pages/ResetPassword.tsx
26074
- import { createSignal as createSignal55, Show as Show80 } from "solid-js";
26334
+ import { createSignal as createSignal57, Show as Show81 } from "solid-js";
26075
26335
  function queryParam(name) {
26076
26336
  if (typeof window === "undefined") return "";
26077
26337
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -26079,11 +26339,11 @@ function queryParam(name) {
26079
26339
  function ResetPasswordPage(props) {
26080
26340
  const token = () => props.token ?? queryParam("token");
26081
26341
  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);
26342
+ const [password, setPassword] = createSignal57("");
26343
+ const [confirm2, setConfirm] = createSignal57("");
26344
+ const [submitting, setSubmitting] = createSignal57(false);
26345
+ const [error, setError] = createSignal57(null);
26346
+ const [message, setMessage] = createSignal57(null);
26087
26347
  async function handleSubmit(e) {
26088
26348
  e.preventDefault();
26089
26349
  setError(null);
@@ -26145,7 +26405,7 @@ function ResetPasswordPage(props) {
26145
26405
  Choose a new password
26146
26406
  </h1>
26147
26407
 
26148
- <Show80
26408
+ <Show81
26149
26409
  when={!message()}
26150
26410
  fallback={<div
26151
26411
  style={{
@@ -26186,7 +26446,7 @@ function ResetPasswordPage(props) {
26186
26446
  />
26187
26447
  </label>
26188
26448
 
26189
- <Show80 when={error()}>
26449
+ <Show81 when={error()}>
26190
26450
  <div
26191
26451
  style={{
26192
26452
  padding: "0.625rem 0.875rem",
@@ -26198,7 +26458,7 @@ function ResetPasswordPage(props) {
26198
26458
  >
26199
26459
  {error()}
26200
26460
  </div>
26201
- </Show80>
26461
+ </Show81>
26202
26462
 
26203
26463
  <button
26204
26464
  type="submit"
@@ -26217,7 +26477,7 @@ function ResetPasswordPage(props) {
26217
26477
  {submitting() ? "Resetting\u2026" : "Reset password"}
26218
26478
  </button>
26219
26479
  </form>
26220
- </Show80>
26480
+ </Show81>
26221
26481
  </div>
26222
26482
  </div>;
26223
26483
  }
@@ -26243,13 +26503,191 @@ function inputStyle5() {
26243
26503
  };
26244
26504
  }
26245
26505
 
26506
+ // src/pages/AcceptAdminInvite.tsx
26507
+ import { createSignal as createSignal58, Show as Show82 } from "solid-js";
26508
+ function queryParam2(name) {
26509
+ if (typeof window === "undefined") return "";
26510
+ return new URLSearchParams(window.location.search).get(name) ?? "";
26511
+ }
26512
+ var MIN_PASSWORD_LENGTH = 8;
26513
+ function AcceptAdminInvitePage(props) {
26514
+ const token = () => props.token ?? queryParam2("token");
26515
+ const email = () => props.email ?? queryParam2("email");
26516
+ const [password, setPassword] = createSignal58("");
26517
+ const [confirm2, setConfirm] = createSignal58("");
26518
+ const [submitting, setSubmitting] = createSignal58(false);
26519
+ const [error, setError] = createSignal58(null);
26520
+ const [message, setMessage] = createSignal58(null);
26521
+ async function handleSubmit(e) {
26522
+ e.preventDefault();
26523
+ setError(null);
26524
+ if (!token() || !email()) {
26525
+ setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
26526
+ return;
26527
+ }
26528
+ if (password().length < MIN_PASSWORD_LENGTH) {
26529
+ setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
26530
+ return;
26531
+ }
26532
+ if (password() !== confirm2()) {
26533
+ setError("Passwords do not match.");
26534
+ return;
26535
+ }
26536
+ setSubmitting(true);
26537
+ try {
26538
+ await authApi.acceptAdminInvite({
26539
+ email: email().trim().toLowerCase(),
26540
+ token: token(),
26541
+ password: password()
26542
+ });
26543
+ setMessage("You\u2019re all set. Sign in with this email and your new password.");
26544
+ props.onSuccess?.();
26545
+ } catch (err) {
26546
+ setError(err instanceof Error ? err.message : "Something went wrong");
26547
+ } finally {
26548
+ setSubmitting(false);
26549
+ }
26550
+ }
26551
+ return <div
26552
+ class="app-affiliate-root"
26553
+ style={{
26554
+ background: "var(--app-affiliate-bg)",
26555
+ color: "var(--app-affiliate-fg)",
26556
+ "min-height": "100vh",
26557
+ display: "flex",
26558
+ "align-items": "center",
26559
+ "justify-content": "center",
26560
+ padding: "2rem 1rem"
26561
+ }}
26562
+ >
26563
+ <div
26564
+ style={{
26565
+ width: "100%",
26566
+ "max-width": "24rem",
26567
+ background: "var(--app-affiliate-surface)",
26568
+ border: "1px solid var(--app-affiliate-border)",
26569
+ "border-radius": "var(--app-affiliate-radius)",
26570
+ padding: "2rem",
26571
+ display: "flex",
26572
+ "flex-direction": "column",
26573
+ gap: "1.25rem"
26574
+ }}
26575
+ >
26576
+ <h1
26577
+ style={{
26578
+ "font-family": "var(--app-affiliate-font-display)",
26579
+ margin: 0,
26580
+ "font-size": "1.5rem"
26581
+ }}
26582
+ >
26583
+ Accept your admin invite
26584
+ </h1>
26585
+
26586
+ <Show82
26587
+ when={!message()}
26588
+ fallback={<div
26589
+ style={{
26590
+ padding: "0.625rem 0.875rem",
26591
+ background: "var(--app-affiliate-surface-light)",
26592
+ "border-radius": "var(--app-affiliate-radius-sm)",
26593
+ "font-size": "0.875rem"
26594
+ }}
26595
+ >
26596
+ {message()}
26597
+ </div>}
26598
+ >
26599
+ <form
26600
+ onSubmit={handleSubmit}
26601
+ style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26602
+ >
26603
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26604
+ <span style={labelStyle4()}>Choose a password</span>
26605
+ <input
26606
+ type="password"
26607
+ required
26608
+ value={password()}
26609
+ onInput={(e) => setPassword(e.currentTarget.value)}
26610
+ autocomplete="new-password"
26611
+ style={inputStyle6()}
26612
+ />
26613
+ </label>
26614
+
26615
+ <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26616
+ <span style={labelStyle4()}>Confirm password</span>
26617
+ <input
26618
+ type="password"
26619
+ required
26620
+ value={confirm2()}
26621
+ onInput={(e) => setConfirm(e.currentTarget.value)}
26622
+ autocomplete="new-password"
26623
+ style={inputStyle6()}
26624
+ />
26625
+ </label>
26626
+
26627
+ <Show82 when={error()}>
26628
+ <div
26629
+ style={{
26630
+ padding: "0.625rem 0.875rem",
26631
+ background: "var(--app-affiliate-danger-bg)",
26632
+ color: "var(--app-affiliate-danger-fg)",
26633
+ "border-radius": "var(--app-affiliate-radius-sm)",
26634
+ "font-size": "0.875rem"
26635
+ }}
26636
+ >
26637
+ {error()}
26638
+ </div>
26639
+ </Show82>
26640
+
26641
+ <button
26642
+ type="submit"
26643
+ disabled={submitting()}
26644
+ style={{
26645
+ padding: "0.75rem 1rem",
26646
+ background: "var(--app-affiliate-primary)",
26647
+ color: "var(--app-affiliate-primary-fg)",
26648
+ border: "none",
26649
+ "border-radius": "var(--app-affiliate-radius-sm)",
26650
+ "font-weight": "600",
26651
+ cursor: submitting() ? "not-allowed" : "pointer",
26652
+ opacity: submitting() ? 0.7 : 1
26653
+ }}
26654
+ >
26655
+ {submitting() ? "Saving\u2026" : "Accept invite"}
26656
+ </button>
26657
+ </form>
26658
+ </Show82>
26659
+ </div>
26660
+ </div>;
26661
+ }
26662
+ function labelStyle4() {
26663
+ return {
26664
+ "font-size": "0.75rem",
26665
+ "text-transform": "uppercase",
26666
+ "letter-spacing": "0.05em",
26667
+ color: "var(--app-affiliate-fg-muted)"
26668
+ };
26669
+ }
26670
+ function inputStyle6() {
26671
+ return {
26672
+ width: "100%",
26673
+ padding: "0.625rem 0.75rem",
26674
+ background: "var(--app-affiliate-surface-light)",
26675
+ color: "var(--app-affiliate-fg)",
26676
+ border: "1px solid var(--app-affiliate-border)",
26677
+ "border-radius": "var(--app-affiliate-radius-sm)",
26678
+ "font-size": "0.9rem",
26679
+ "font-family": "inherit",
26680
+ "box-sizing": "border-box"
26681
+ };
26682
+ }
26683
+
26246
26684
  // src/pages/AffiliateForgotPassword.tsx
26247
- import { createSignal as createSignal56, Show as Show81 } from "solid-js";
26685
+ import { createSignal as createSignal59, Show as Show83 } from "solid-js";
26248
26686
  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);
26687
+ const [email, setEmail] = createSignal59("");
26688
+ const [submitting, setSubmitting] = createSignal59(false);
26689
+ const [error, setError] = createSignal59(null);
26690
+ const [message, setMessage] = createSignal59(null);
26253
26691
  async function handleSubmit(e) {
26254
26692
  e.preventDefault();
26255
26693
  setError(null);
@@ -26270,7 +26708,7 @@ function AffiliateForgotPassword(props) {
26270
26708
  <div style={cardStyle()}>
26271
26709
  <h1 style={headingStyle()}>Reset your password</h1>
26272
26710
 
26273
- <Show81
26711
+ <Show83
26274
26712
  when={!message()}
26275
26713
  fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>{message()}</p>}
26276
26714
  >
@@ -26279,32 +26717,32 @@ function AffiliateForgotPassword(props) {
26279
26717
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26280
26718
  >
26281
26719
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26282
- <span style={labelStyle4()}>Email</span>
26720
+ <span style={labelStyle5()}>Email</span>
26283
26721
  <input
26284
26722
  type="email"
26285
26723
  required
26286
26724
  value={email()}
26287
26725
  onInput={(e) => setEmail(e.currentTarget.value)}
26288
26726
  autocomplete="email"
26289
- style={inputStyle6()}
26727
+ style={inputStyle7()}
26290
26728
  />
26291
26729
  </label>
26292
26730
 
26293
- <Show81 when={error()}>
26731
+ <Show83 when={error()}>
26294
26732
  <div style={errorStyle()}>{error()}</div>
26295
- </Show81>
26733
+ </Show83>
26296
26734
 
26297
26735
  <button type="submit" disabled={submitting()} style={primaryButtonStyle(submitting())}>
26298
26736
  {submitting() ? "Sending\u2026" : "Send reset link"}
26299
26737
  </button>
26300
26738
  </form>
26301
- </Show81>
26739
+ </Show83>
26302
26740
 
26303
- <Show81 when={props.onNavigateLogin}>
26741
+ <Show83 when={props.onNavigateLogin}>
26304
26742
  <button type="button" onClick={() => props.onNavigateLogin?.()} style={linkStyle2()}>
26305
26743
  Back to login
26306
26744
  </button>
26307
- </Show81>
26745
+ </Show83>
26308
26746
  </div>
26309
26747
  </div>;
26310
26748
  }
@@ -26339,7 +26777,7 @@ function headingStyle() {
26339
26777
  "font-size": "1.5rem"
26340
26778
  };
26341
26779
  }
26342
- function labelStyle4() {
26780
+ function labelStyle5() {
26343
26781
  return {
26344
26782
  "font-size": "0.75rem",
26345
26783
  "text-transform": "uppercase",
@@ -26347,7 +26785,7 @@ function labelStyle4() {
26347
26785
  color: "var(--app-affiliate-fg-muted)"
26348
26786
  };
26349
26787
  }
26350
- function inputStyle6() {
26788
+ function inputStyle7() {
26351
26789
  return {
26352
26790
  width: "100%",
26353
26791
  padding: "0.625rem 0.75rem",
@@ -26395,19 +26833,19 @@ function linkStyle2() {
26395
26833
  }
26396
26834
 
26397
26835
  // src/pages/AffiliateResetPassword.tsx
26398
- import { createSignal as createSignal57, Show as Show82 } from "solid-js";
26399
- function queryParam2(name) {
26836
+ import { createSignal as createSignal60, Show as Show84 } from "solid-js";
26837
+ function queryParam3(name) {
26400
26838
  if (typeof window === "undefined") return "";
26401
26839
  return new URLSearchParams(window.location.search).get(name) ?? "";
26402
26840
  }
26403
26841
  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);
26842
+ const token = () => props.token ?? queryParam3("token");
26843
+ const email = () => props.email ?? queryParam3("email");
26844
+ const [password, setPassword] = createSignal60("");
26845
+ const [confirm2, setConfirm] = createSignal60("");
26846
+ const [submitting, setSubmitting] = createSignal60(false);
26847
+ const [error, setError] = createSignal60(null);
26848
+ const [done, setDone] = createSignal60(false);
26411
26849
  async function handleSubmit(e) {
26412
26850
  e.preventDefault();
26413
26851
  setError(null);
@@ -26442,7 +26880,7 @@ function AffiliateResetPassword(props) {
26442
26880
  <div style={cardStyle2()}>
26443
26881
  <h1 style={headingStyle2()}>Choose a new password</h1>
26444
26882
 
26445
- <Show82
26883
+ <Show84
26446
26884
  when={!done()}
26447
26885
  fallback={<p style={{ margin: 0, "font-size": "0.9rem" }}>
26448
26886
  Your password has been reset. You can now log in with your new password.
@@ -26453,7 +26891,7 @@ function AffiliateResetPassword(props) {
26453
26891
  style={{ display: "flex", "flex-direction": "column", gap: "0.875rem" }}
26454
26892
  >
26455
26893
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26456
- <span style={labelStyle5()}>New password</span>
26894
+ <span style={labelStyle6()}>New password</span>
26457
26895
  <AffiliatePasswordInput
26458
26896
  required
26459
26897
  minLength={8}
@@ -26464,7 +26902,7 @@ function AffiliateResetPassword(props) {
26464
26902
  </label>
26465
26903
 
26466
26904
  <label style={{ display: "flex", "flex-direction": "column", gap: "0.35rem" }}>
26467
- <span style={labelStyle5()}>Confirm new password</span>
26905
+ <span style={labelStyle6()}>Confirm new password</span>
26468
26906
  <AffiliatePasswordInput
26469
26907
  required
26470
26908
  minLength={8}
@@ -26474,15 +26912,15 @@ function AffiliateResetPassword(props) {
26474
26912
  />
26475
26913
  </label>
26476
26914
 
26477
- <Show82 when={error()}>
26915
+ <Show84 when={error()}>
26478
26916
  <div style={errorStyle2()}>{error()}</div>
26479
- </Show82>
26917
+ </Show84>
26480
26918
 
26481
26919
  <button type="submit" disabled={submitting()} style={primaryButtonStyle2(submitting())}>
26482
26920
  {submitting() ? "Saving\u2026" : "Set new password"}
26483
26921
  </button>
26484
26922
  </form>
26485
- </Show82>
26923
+ </Show84>
26486
26924
  </div>
26487
26925
  </div>;
26488
26926
  }
@@ -26517,7 +26955,7 @@ function headingStyle2() {
26517
26955
  "font-size": "1.5rem"
26518
26956
  };
26519
26957
  }
26520
- function labelStyle5() {
26958
+ function labelStyle6() {
26521
26959
  return {
26522
26960
  "font-size": "0.75rem",
26523
26961
  "text-transform": "uppercase",
@@ -26572,7 +27010,8 @@ export {
26572
27010
  AffiliateLogin,
26573
27011
  ForgotPasswordPage,
26574
27012
  ResetPasswordPage,
27013
+ AcceptAdminInvitePage,
26575
27014
  AffiliateForgotPassword,
26576
27015
  AffiliateResetPassword
26577
27016
  };
26578
- //# sourceMappingURL=Z745N7NE.jsx.map
27017
+ //# sourceMappingURL=2LZ4RMMO.jsx.map