@apextelemed/partner-core 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/api/index.d.ts +2 -2
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +5 -3
  4. package/dist/{cart-CBH8Em8f.d.ts → cart-BwUwSzWh.d.ts} +25 -2
  5. package/dist/chunk/{I46Y2J5W.jsx → 2UWULNSX.jsx} +15 -2
  6. package/dist/chunk/{2XJBOTK5.js → 5D7SGF46.js} +2 -2
  7. package/dist/chunk/{2XJBOTK5.js.map → 5D7SGF46.js.map} +1 -1
  8. package/dist/chunk/{DS4E7FAI.js → 7ZESUC4Q.js} +14 -4
  9. package/dist/chunk/7ZESUC4Q.js.map +1 -0
  10. package/dist/chunk/{LPERM6T7.jsx → AH3PJBED.jsx} +191 -30
  11. package/dist/chunk/{YHWX4NMV.js → C7TELVJF.js} +3 -3
  12. package/dist/chunk/{YHWX4NMV.js.map → C7TELVJF.js.map} +1 -1
  13. package/dist/chunk/{MEF3FUQB.jsx → DQE4K55D.jsx} +1 -1
  14. package/dist/chunk/{NP4CMOLW.jsx → FUOUTRAO.jsx} +5 -3
  15. package/dist/chunk/{STEVQZ6U.jsx → GNG53L37.jsx} +2 -2
  16. package/dist/chunk/{OJSQZEB3.js → GPVYUP3H.js} +7 -6
  17. package/dist/chunk/GPVYUP3H.js.map +1 -0
  18. package/dist/chunk/{NYLIUR7O.jsx → JTG4H4I5.jsx} +6 -5
  19. package/dist/chunk/{MN4GWQC4.js → JXPPJF2V.js} +408 -228
  20. package/dist/chunk/JXPPJF2V.js.map +1 -0
  21. package/dist/chunk/{XMYPS7PT.js → XHOD3HUQ.js} +5 -4
  22. package/dist/chunk/XHOD3HUQ.js.map +1 -0
  23. package/dist/chunk/{EIXZJX6R.js → ZD2MMEXL.js} +34 -17
  24. package/dist/chunk/ZD2MMEXL.js.map +1 -0
  25. package/dist/chunk/{T6IKS76T.jsx → ZJENZPAM.jsx} +33 -15
  26. package/dist/{client-DUrhrzOG.d.ts → client-BD9_HCZY.d.ts} +16 -0
  27. package/dist/flows/index.d.ts +49 -3
  28. package/dist/flows/index.js +6 -6
  29. package/dist/flows/index.jsx +10 -8
  30. package/dist/index/index.d.ts +3 -3
  31. package/dist/index/index.js +7 -7
  32. package/dist/index/index.jsx +13 -9
  33. package/dist/pages/index.d.ts +1 -1
  34. package/dist/pages/index.js +5 -5
  35. package/dist/pages/index.jsx +5 -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/DS4E7FAI.js.map +0 -1
  41. package/dist/chunk/EIXZJX6R.js.map +0 -1
  42. package/dist/chunk/MN4GWQC4.js.map +0 -1
  43. package/dist/chunk/OJSQZEB3.js.map +0 -1
  44. package/dist/chunk/XMYPS7PT.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, LIFECYCLE_TONE, buildTrackingUrl, isImageAttachment, buildRefillView, toTrackerRequest } from './OJSQZEB3.js';
3
- import { fetchFunnelConfig } from './DS4E7FAI.js';
2
+ import { useSurveyFlow, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, LIFECYCLE_TONE, buildTrackingUrl, isImageAttachment, buildRefillView, toTrackerRequest } from './GPVYUP3H.js';
3
+ import { fetchFunnelConfig } from './7ZESUC4Q.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { auth_default, cart_default, affiliateAuth_default } from './YHWX4NMV.js';
6
- import { usersApi, adminApi, membersApi, affiliatePortalApi, authApi, adminAffiliatesApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, apiFetch, apexApi, subscriptionsApi, ApiError } from './2XJBOTK5.js';
5
+ import { auth_default, cart_default, affiliateAuth_default } from './C7TELVJF.js';
6
+ import { usersApi, adminApi, membersApi, affiliatePortalApi, authApi, adminAffiliatesApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, apiFetch, apexApi, subscriptionsApi, ApiError } from './5D7SGF46.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, template } from 'solid-js/web';
8
8
  import { createContext, createEffect, on, Show, For, createResource, createSignal, createMemo, Index, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext } from 'solid-js';
9
9
  import { isQuestionVisible } from '@apextelemed/survey-core';
@@ -5095,6 +5095,9 @@ function datetimeLocalToIso(value) {
5095
5095
  return new Date(value).toISOString();
5096
5096
  }
5097
5097
  var LIVE_SUBSCRIPTION_STATUSES = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
5098
+ function subscriptionLabel(s, fallback = "Subscription") {
5099
+ return s.medicationName || s.medication || fallback;
5100
+ }
5098
5101
 
5099
5102
  // src/pages/admin/shared.tsx
5100
5103
  var _tmpl$51 = /* @__PURE__ */ template(`<span>`);
@@ -10204,7 +10207,7 @@ function EditAmountModal(props) {
10204
10207
  get children() {
10205
10208
  var _el$ = _tmpl$520(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$7 = _el$3.nextSibling, _el$4 = _el$7.nextSibling, _el$8 = _el$4.nextSibling; _el$8.nextSibling;
10206
10209
  _el$.addEventListener("submit", submit);
10207
- insert(_el$2, () => props.subscription.medication || "Subscription", _el$3);
10210
+ insert(_el$2, () => subscriptionLabel(props.subscription), _el$3);
10208
10211
  insert(_el$2, () => centsToUsd(current2()), _el$7);
10209
10212
  insert(_el$2, () => props.subscription.intervalDays ?? 30, _el$8);
10210
10213
  insert(_el$, createComponent(FormRow, {
@@ -10513,7 +10516,7 @@ function RefundModal(props) {
10513
10516
  },
10514
10517
  children: (s) => (() => {
10515
10518
  var _el$19 = _tmpl$720(), _el$20 = _el$19.firstChild;
10516
- insert(_el$19, () => s.medication || "Subscription", _el$20);
10519
+ insert(_el$19, () => subscriptionLabel(s), _el$20);
10517
10520
  insert(_el$19, () => centsToUsd(s.amountCents), null);
10518
10521
  insert(_el$19, (() => {
10519
10522
  var _c$5 = memo(() => !!s.intervalDays);
@@ -11163,6 +11166,41 @@ function RequestCard(props) {
11163
11166
  return _el$;
11164
11167
  })();
11165
11168
  }
11169
+
11170
+ // src/pages/admin/customers/subscriptionTerms.ts
11171
+ function nextChargeCents(s) {
11172
+ return s.nextChargeCents ?? s.amountCents;
11173
+ }
11174
+ function charges(n) {
11175
+ return `${n} more ${n === 1 ? "charge" : "charges"}`;
11176
+ }
11177
+ function priceChange(s) {
11178
+ const next = nextChargeCents(s);
11179
+ const base = s.baseAmountCents;
11180
+ if (next == null || base == null || base <= next) return null;
11181
+ if (s.discountRecurringIndefinite) return `${centsToUsd(base - next)} off ongoing`;
11182
+ const remaining = s.discountRecurringRemaining ?? 0;
11183
+ if (s.billingMode !== "gateway" && remaining > 0) return `then ${centsToUsd(base)} after ${charges(remaining)}`;
11184
+ return `then ${centsToUsd(base)}`;
11185
+ }
11186
+ function priceLine(s) {
11187
+ const every = `${centsToUsd(nextChargeCents(s))} every ${s.intervalDays ?? 30} days`;
11188
+ const change = priceChange(s);
11189
+ return change ? `${every}, ${change}` : every;
11190
+ }
11191
+ function discountTerms(s) {
11192
+ const amount = s.amountCents;
11193
+ const base = s.baseAmountCents;
11194
+ const off = amount != null && base != null && base > amount ? `${centsToUsd(base - amount)} off` : null;
11195
+ const remaining = s.discountRecurringRemaining ?? 0;
11196
+ if (s.discountRecurringIndefinite) return off ? `${off}, ongoing` : "Recurring, ongoing";
11197
+ if (remaining > 0) return off ? `${off}, ${charges(remaining)}` : `Recurring, ${charges(remaining)}`;
11198
+ if (!off || base == null) return null;
11199
+ const next = nextChargeCents(s);
11200
+ return next != null && next >= base ? `${off}, ended` : `${off}, first charge only`;
11201
+ }
11202
+
11203
+ // src/pages/admin/customers/sections/SubscriptionCard.tsx
11166
11204
  var _tmpl$161 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11167
11205
  var _tmpl$257 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11168
11206
  var _tmpl$340 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
@@ -11171,7 +11209,7 @@ var _tmpl$527 = /* @__PURE__ */ template(`<button type=button class="app-admin-b
11171
11209
  var _tmpl$626 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
11172
11210
  var _tmpl$724 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap style=margin-top:0.5rem><table class=app-admin-table style=font-size:0.8125rem><thead><tr><th>When</th><th>Period</th><th>Amount</th><th>Outcome</th><th>Reason</th><th></th></tr></thead><tbody>`);
11173
11211
  var _tmpl$821 = /* @__PURE__ */ template(`<div style=margin-top:0.875rem><button type=button class=app-admin-link-btn> billing attempts (<!>)`);
11174
- var _tmpl$918 = /* @__PURE__ */ template(`<article class=app-admin-card-soft style="padding:1rem 1.25rem"><div style=display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:0.75rem><div style=min-width:0><div style=display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap><span style=font-weight:600></span></div><div class=app-admin-text-muted style=font-size:0.875rem;margin-top:0.25rem> every <!> days<!> \xB7 </div></div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div></div><div style=margin-top:0.875rem>`);
11212
+ var _tmpl$918 = /* @__PURE__ */ template(`<article class=app-admin-card-soft style="padding:1rem 1.25rem"><div style=display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:0.75rem><div style=min-width:0><div style=display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap><span style=font-weight:600></span></div><div class=app-admin-text-muted style=font-size:0.875rem;margin-top:0.25rem> \xB7 </div></div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div></div><div style=margin-top:0.875rem>`);
11175
11213
  var _tmpl$015 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
11176
11214
  var _tmpl$169 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11177
11215
  var _tmpl$1010 = /* @__PURE__ */ template(`<tr><td data-label=When class=app-admin-text-muted></td><td data-label=Period class=app-admin-text-muted></td><td data-label=Amount></td><td data-label=Outcome><span></span></td><td data-label=Reason class=app-admin-text-muted></td><td data-label class=app-admin-table-cell--no-label>`);
@@ -11188,14 +11226,9 @@ function SubscriptionCard(props) {
11188
11226
  const [showAttempts, setShowAttempts] = createSignal(s().status === "past_due" || s().status === "incomplete" || (s().billingAttempts ?? []).some((a) => a.status === "indeterminate"));
11189
11227
  const attempts = () => [...s().billingAttempts ?? []].sort((a, b) => Date.parse(b.createdAt ?? "") - Date.parse(a.createdAt ?? ""));
11190
11228
  const busy = (key) => props.busy === `${key}-${s().id}`;
11191
- const discount = () => {
11192
- if (s().discountRecurringIndefinite) return "Recurring discount, indefinite";
11193
- if ((s().discountRecurringRemaining ?? 0) > 0) return `Recurring discount, ${s().discountRecurringRemaining} charge${s().discountRecurringRemaining === 1 ? "" : "s"} left`;
11194
- return null;
11195
- };
11196
11229
  return (() => {
11197
- var _el$ = _tmpl$918(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$1 = _el$8.nextSibling, _el$9 = _el$1.nextSibling, _el$10 = _el$9.nextSibling; _el$10.nextSibling; var _el$11 = _el$3.nextSibling, _el$17 = _el$2.nextSibling;
11198
- insert(_el$5, () => s().medication || "Subscription");
11230
+ var _el$ = _tmpl$918(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$7 = _el$4.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$3.nextSibling, _el$13 = _el$2.nextSibling;
11231
+ insert(_el$5, () => subscriptionLabel(s()));
11199
11232
  insert(_el$4, createComponent(Show, {
11200
11233
  get when() {
11201
11234
  return s().dosage;
@@ -11211,79 +11244,70 @@ function SubscriptionCard(props) {
11211
11244
  return s().status;
11212
11245
  }
11213
11246
  }), null);
11214
- insert(_el$7, () => centsToUsd(s().amountCents), _el$8);
11215
- insert(_el$7, () => s().intervalDays ?? 30, _el$1);
11216
- insert(_el$7, createComponent(Show, {
11217
- get when() {
11218
- return memo(() => s().baseAmountCents != null)() && s().baseAmountCents !== s().amountCents;
11219
- },
11220
- get children() {
11221
- return ` (then ${centsToUsd(s().baseAmountCents)})`;
11222
- }
11223
- }), _el$10);
11247
+ insert(_el$7, () => priceLine(s()), _el$8);
11224
11248
  insert(_el$7, () => gateway() ? "billed by the gateway" : "billed by the platform", null);
11225
- insert(_el$11, createComponent(Show, {
11249
+ insert(_el$9, createComponent(Show, {
11226
11250
  get when() {
11227
11251
  return live();
11228
11252
  },
11229
11253
  get children() {
11230
11254
  return [(() => {
11231
- var _el$12 = _tmpl$257();
11232
- _el$12.$$click = () => props.onEditAmount(s());
11255
+ var _el$0 = _tmpl$257();
11256
+ _el$0.$$click = () => props.onEditAmount(s());
11233
11257
  effect((_p$) => {
11234
11258
  var _v$ = gateway(), _v$2 = gateway() ? "The gateway holds this price; move the subscription to platform billing first." : void 0;
11235
- _v$ !== _p$.e && (_el$12.disabled = _p$.e = _v$);
11236
- _v$2 !== _p$.t && setAttribute(_el$12, "title", _p$.t = _v$2);
11259
+ _v$ !== _p$.e && (_el$0.disabled = _p$.e = _v$);
11260
+ _v$2 !== _p$.t && setAttribute(_el$0, "title", _p$.t = _v$2);
11237
11261
  return _p$;
11238
11262
  }, {
11239
11263
  e: void 0,
11240
11264
  t: void 0
11241
11265
  });
11242
- return _el$12;
11266
+ return _el$0;
11243
11267
  })(), (() => {
11244
- var _el$13 = _tmpl$340();
11245
- _el$13.$$click = () => props.onEditSchedule(s());
11246
- return _el$13;
11268
+ var _el$1 = _tmpl$340();
11269
+ _el$1.$$click = () => props.onEditSchedule(s());
11270
+ return _el$1;
11247
11271
  })()];
11248
11272
  }
11249
11273
  }), null);
11250
- insert(_el$11, createComponent(Show, {
11274
+ insert(_el$9, createComponent(Show, {
11251
11275
  get when() {
11252
11276
  return s().status === "active";
11253
11277
  },
11254
11278
  get children() {
11255
- var _el$14 = _tmpl$430();
11256
- _el$14.$$click = () => props.onPause(s());
11257
- insert(_el$14, () => busy("pause") ? "Pausing\u2026" : "Pause");
11258
- effect(() => _el$14.disabled = busy("pause"));
11259
- return _el$14;
11279
+ var _el$10 = _tmpl$430();
11280
+ _el$10.$$click = () => props.onPause(s());
11281
+ insert(_el$10, () => busy("pause") ? "Pausing\u2026" : "Pause");
11282
+ effect(() => _el$10.disabled = busy("pause"));
11283
+ return _el$10;
11260
11284
  }
11261
11285
  }), null);
11262
- insert(_el$11, createComponent(Show, {
11286
+ insert(_el$9, createComponent(Show, {
11263
11287
  get when() {
11264
11288
  return s().status === "paused";
11265
11289
  },
11266
11290
  get children() {
11267
- var _el$15 = _tmpl$527();
11268
- _el$15.$$click = () => props.onResume(s());
11269
- insert(_el$15, () => busy("resume") ? "Resuming\u2026" : "Resume");
11270
- effect(() => _el$15.disabled = busy("resume"));
11271
- return _el$15;
11291
+ var _el$11 = _tmpl$527();
11292
+ _el$11.$$click = () => props.onResume(s());
11293
+ insert(_el$11, () => busy("resume") ? "Resuming\u2026" : "Resume");
11294
+ effect(() => _el$11.disabled = busy("resume"));
11295
+ return _el$11;
11272
11296
  }
11273
11297
  }), null);
11274
- insert(_el$11, createComponent(Show, {
11298
+ insert(_el$9, createComponent(Show, {
11275
11299
  get when() {
11276
11300
  return live();
11277
11301
  },
11278
11302
  get children() {
11279
- var _el$16 = _tmpl$626();
11280
- _el$16.$$click = () => props.onCancel(s());
11281
- insert(_el$16, () => busy("cancel") ? "\u2026" : "Cancel");
11282
- effect(() => _el$16.disabled = busy("cancel"));
11283
- return _el$16;
11303
+ var _el$12 = _tmpl$626();
11304
+ _el$12.$$click = () => props.onCancel(s());
11305
+ insert(_el$12, () => busy("cancel") ? "\u2026" : "Cancel");
11306
+ effect(() => _el$12.disabled = busy("cancel"));
11307
+ return _el$12;
11284
11308
  }
11285
11309
  }), null);
11286
- insert(_el$17, createComponent(KeyValueList, {
11310
+ insert(_el$13, createComponent(KeyValueList, {
11287
11311
  get items() {
11288
11312
  return [{
11289
11313
  label: "Next charge",
@@ -11303,15 +11327,21 @@ function SubscriptionCard(props) {
11303
11327
  }, {
11304
11328
  label: "Retries",
11305
11329
  value: s().retryCount ? `${s().retryCount}${s().lastAttemptAt ? `, last ${fmtDate(s().lastAttemptAt)}` : ""}` : null
11330
+ }, {
11331
+ label: "Promo code",
11332
+ value: s().promoCode ?? null
11333
+ }, {
11334
+ label: "Sale",
11335
+ value: s().saleName ?? null
11306
11336
  }, {
11307
11337
  label: "Discount",
11308
- value: discount()
11338
+ value: discountTerms(s())
11309
11339
  }, {
11310
11340
  label: "Gateway id",
11311
11341
  value: s().gatewaySubscriptionId ? (() => {
11312
- var _el$27 = _tmpl$015();
11313
- insert(_el$27, () => s().gatewaySubscriptionId);
11314
- return _el$27;
11342
+ var _el$23 = _tmpl$015();
11343
+ insert(_el$23, () => s().gatewaySubscriptionId);
11344
+ return _el$23;
11315
11345
  })() : null
11316
11346
  }].filter((i) => i.value !== null && i.value !== void 0);
11317
11347
  }
@@ -11321,25 +11351,25 @@ function SubscriptionCard(props) {
11321
11351
  return attempts().length > 0;
11322
11352
  },
11323
11353
  get children() {
11324
- var _el$18 = _tmpl$821(), _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$22 = _el$20.nextSibling; _el$22.nextSibling;
11325
- _el$19.$$click = () => setShowAttempts((v) => !v);
11326
- insert(_el$19, () => showAttempts() ? "Hide" : "Show", _el$20);
11327
- insert(_el$19, () => attempts().length, _el$22);
11328
- insert(_el$18, createComponent(Show, {
11354
+ var _el$14 = _tmpl$821(), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$18 = _el$16.nextSibling; _el$18.nextSibling;
11355
+ _el$15.$$click = () => setShowAttempts((v) => !v);
11356
+ insert(_el$15, () => showAttempts() ? "Hide" : "Show", _el$16);
11357
+ insert(_el$15, () => attempts().length, _el$18);
11358
+ insert(_el$14, createComponent(Show, {
11329
11359
  get when() {
11330
11360
  return showAttempts();
11331
11361
  },
11332
11362
  get children() {
11333
- var _el$23 = _tmpl$724(), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
11334
- insert(_el$26, createComponent(For, {
11363
+ var _el$19 = _tmpl$724(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling;
11364
+ insert(_el$22, createComponent(For, {
11335
11365
  get each() {
11336
11366
  return attempts();
11337
11367
  },
11338
11368
  children: (a) => (() => {
11339
- var _el$28 = _tmpl$1010(), _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.nextSibling;
11340
- insert(_el$29, () => fmtDate(a.createdAt));
11341
- insert(_el$30, () => (a.billingPeriod ?? 0) + 1, null);
11342
- insert(_el$30, createComponent(Show, {
11369
+ var _el$24 = _tmpl$1010(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$28.nextSibling, _el$31 = _el$30.nextSibling;
11370
+ insert(_el$25, () => fmtDate(a.createdAt));
11371
+ insert(_el$26, () => (a.billingPeriod ?? 0) + 1, null);
11372
+ insert(_el$26, createComponent(Show, {
11343
11373
  get when() {
11344
11374
  return (a.attemptNo ?? 1) > 1;
11345
11375
  },
@@ -11347,29 +11377,29 @@ function SubscriptionCard(props) {
11347
11377
  return ` (try ${a.attemptNo})`;
11348
11378
  }
11349
11379
  }), null);
11350
- insert(_el$31, () => centsToUsd(a.amountCents));
11351
- insert(_el$33, () => a.status);
11352
- insert(_el$34, () => a.errorMessage ?? a.errorCode ?? "\u2014");
11353
- insert(_el$35, createComponent(Show, {
11380
+ insert(_el$27, () => centsToUsd(a.amountCents));
11381
+ insert(_el$29, () => a.status);
11382
+ insert(_el$30, () => a.errorMessage ?? a.errorCode ?? "\u2014");
11383
+ insert(_el$31, createComponent(Show, {
11354
11384
  get when() {
11355
11385
  return a.status === "pending" || a.status === "indeterminate";
11356
11386
  },
11357
11387
  get children() {
11358
- var _el$36 = _tmpl$169();
11359
- _el$36.$$click = () => props.onResolveAttempt(s(), a);
11360
- effect(() => _el$36.disabled = props.busy === `resolve-${a.id}`);
11361
- return _el$36;
11388
+ var _el$32 = _tmpl$169();
11389
+ _el$32.$$click = () => props.onResolveAttempt(s(), a);
11390
+ effect(() => _el$32.disabled = props.busy === `resolve-${a.id}`);
11391
+ return _el$32;
11362
11392
  }
11363
11393
  }));
11364
- effect(() => className(_el$33, `app-admin-badge app-admin-badge--${attemptTone(a.status)}`));
11365
- return _el$28;
11394
+ effect(() => className(_el$29, `app-admin-badge app-admin-badge--${attemptTone(a.status)}`));
11395
+ return _el$24;
11366
11396
  })()
11367
11397
  }));
11368
- return _el$23;
11398
+ return _el$19;
11369
11399
  }
11370
11400
  }), null);
11371
- effect(() => setAttribute(_el$19, "aria-expanded", showAttempts()));
11372
- return _el$18;
11401
+ effect(() => setAttribute(_el$15, "aria-expanded", showAttempts()));
11402
+ return _el$14;
11373
11403
  }
11374
11404
  }), null);
11375
11405
  effect(() => setAttribute(_el$, "id", `sub-${s().id}`));
@@ -11573,7 +11603,7 @@ function CustomerDetail(props) {
11573
11603
  }
11574
11604
  };
11575
11605
  const handleCancel = (sub) => {
11576
- if (!confirm(`Cancel the ${sub.medication || ""} subscription? Billing stops now and any unapproved prescription requests are withdrawn.`)) return;
11606
+ if (!confirm(`Cancel the ${subscriptionLabel(sub, "")} subscription? Billing stops now and any unapproved prescription requests are withdrawn.`)) return;
11577
11607
  void withBusy(`cancel-${sub.id}`, async () => {
11578
11608
  try {
11579
11609
  const res = await adminApi.cancelSubscription(sub.id);
@@ -11691,7 +11721,7 @@ function CustomerDetail(props) {
11691
11721
  try {
11692
11722
  await adminApi.cancelSubscription(sub.id);
11693
11723
  } catch (err) {
11694
- failed.push(`${sub.medication || sub.id}: ${err instanceof Error ? err.message : "cancel failed"}`);
11724
+ failed.push(`${subscriptionLabel(sub, sub.id)}: ${err instanceof Error ? err.message : "cancel failed"}`);
11695
11725
  }
11696
11726
  }
11697
11727
  if (failed.length > 0) {
@@ -12198,6 +12228,7 @@ function CustomerDetail(props) {
12198
12228
  return liveSubs().map((s) => ({
12199
12229
  id: s.id,
12200
12230
  medication: s.medication,
12231
+ medicationName: s.medicationName,
12201
12232
  amountCents: s.amountCents ?? 0,
12202
12233
  intervalDays: s.intervalDays ?? void 0,
12203
12234
  nextChargeAt: s.nextChargeAt,
@@ -12870,7 +12901,7 @@ function Payments() {
12870
12901
  try {
12871
12902
  await adminApi.cancelSubscription(sub.id);
12872
12903
  } catch (err) {
12873
- failed.push(`${sub.medication || sub.id}: ${err instanceof Error ? err.message : "cancel failed"}`);
12904
+ failed.push(`${subscriptionLabel(sub, sub.id)}: ${err instanceof Error ? err.message : "cancel failed"}`);
12874
12905
  }
12875
12906
  }
12876
12907
  if (failed.length > 0) {
@@ -13001,6 +13032,7 @@ function Payments() {
13001
13032
  return target().liveSubs.map((s) => ({
13002
13033
  id: s.id,
13003
13034
  medication: s.medication,
13035
+ medicationName: s.medicationName,
13004
13036
  amountCents: s.amountCents,
13005
13037
  intervalDays: s.intervalDays,
13006
13038
  currentPeriodEnd: s.currentPeriodEnd
@@ -15037,20 +15069,31 @@ var _tmpl$354 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;borde
15037
15069
  var _tmpl$441 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem>`);
15038
15070
  var _tmpl$536 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-danger-fg);font-size:0.8125rem;margin:0>`);
15039
15071
  var _tmpl$634 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-success-fg);font-size:0.8125rem;margin:0>`);
15040
- var _tmpl$732 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:grid;gap:0.875rem;max-width:34rem"><label style=display:flex;align-items:center;gap:0.625rem;cursor:pointer><input type=checkbox><span>Send recovery emails</span></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Completed-survey reminders \u2014 hours after the survey was submitted (comma-separated)</span><input class=app-admin-input type=text placeholder="24, 72"></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Mid-survey reminders \u2014 hours after last activity (comma-separated)</span><input class=app-admin-input type=text placeholder="4, 48"></label><div><button type=button class="app-admin-btn app-admin-btn--primary">`);
15041
- var _tmpl$828 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days</option></select></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Last seen</th><th>Progress</th><th>Email</th><th>Reminders</th></tr></thead><tbody></tbody></table></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Captured</th><th>Name</th><th>Email</th><th>Qualified</th><th>Reminders</th></tr></thead><tbody>`);
15042
- var _tmpl$925 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));gap:0.75rem">`);
15043
- var _tmpl$021 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;display:grid;gap:0.625rem">`);
15044
- var _tmpl$1102 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
15045
- var _tmpl$1014 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Track</th><th>Sent</th><th>Recovered</th></tr></thead><tbody><tr><td data-label=Track>Finish signup (completed surveys)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track>Finish questionnaire (mid-survey)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track class=app-admin-text-muted>Unsubscribes</td><td data-label=Count colspan=2>`);
15046
- var _tmpl$1116 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:10rem 1fr 7rem;align-items:center;gap:0.75rem"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><div style=background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><div style=height:100%;background:var(--app-admin-primary);border-radius:4px></div></div><span style=font-size:0.8125rem;text-align:right><span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem>`);
15047
- var _tmpl$1213 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
15048
- var _tmpl$1312 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
15049
- var _tmpl$1412 = /* @__PURE__ */ template(`<tr><td colspan=4>`);
15050
- var _tmpl$1512 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
15051
- var _tmpl$1612 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>not captured`);
15052
- var _tmpl$1712 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
15053
- var _tmpl$1811 = /* @__PURE__ */ template(`<tr><td data-label=Captured class=app-admin-text-muted></td><td data-label=Name></td><td data-label=Email></td><td data-label=Qualified></td><td data-label=Reminders>`);
15072
+ var _tmpl$732 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:grid;gap:0.875rem;max-width:34rem"><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>How reminders go out</span><select class=app-admin-input><option value=off>Off \u2014 send nothing</option><option value=review>Review \u2014 hold for approval, I send them</option><option value=auto>Automatic \u2014 send on the schedule below</option></select><span style=font-size:0.75rem;color:var(--app-admin-fg-muted)></span></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Completed-survey reminders \u2014 hours after the survey was submitted (comma-separated)</span><input class=app-admin-input type=text placeholder="24, 72"></label><label style=display:grid;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)>Mid-survey reminders \u2014 hours after last activity (comma-separated)</span><input class=app-admin-input type=text placeholder="4, 48"></label><div><button type=button class="app-admin-btn app-admin-btn--primary">`);
15073
+ var _tmpl$828 = /* @__PURE__ */ template(`<p style="color:var(--app-admin-danger-fg);font-size:0.8125rem;padding:0 1.25rem">`);
15074
+ var _tmpl$925 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Where they stopped</th><th>Waiting</th><th>Reminder</th><th></th></tr></thead><tbody>`);
15075
+ var _tmpl$021 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
15076
+ var _tmpl$1102 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.375rem;flex-wrap:wrap><button type=button class="app-admin-btn app-admin-btn--primary"></button><button type=button class=app-admin-btn title="Move past this reminder without emailing. They stay in the funnel for the next one.">Skip</button><button type=button class=app-admin-btn title="Never contact this person about their visit again.">Don't contact`);
15077
+ var _tmpl$1014 = /* @__PURE__ */ template(`<tr><td data-label=Person><div></div></td><td data-label="Where they stopped"></td><td data-label=Waiting></td><td data-label=Reminder> of </td><td>`);
15078
+ var _tmpl$1116 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>`);
15079
+ var _tmpl$1213 = /* @__PURE__ */ template(`<div><div style=margin-bottom:1rem><select class=app-admin-input style=width:auto><option value=7>Last 7 days</option><option value=30>Last 30 days</option><option value=90>Last 90 days</option></select></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Last seen</th><th>Progress</th><th>Email</th><th>Reminders</th></tr></thead><tbody></tbody></table></div><div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Captured</th><th>Name</th><th>Email</th><th>Qualified</th><th>Reminders</th></tr></thead><tbody>`);
15080
+ var _tmpl$1312 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));gap:0.75rem">`);
15081
+ var _tmpl$1412 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;display:grid;gap:0.625rem">`);
15082
+ var _tmpl$1512 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style=padding:1.25rem;display:flex;align-items:flex-end;gap:0.375rem;height:9rem>`);
15083
+ var _tmpl$1612 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><table class=app-admin-table><thead><tr><th>Track</th><th>Sent</th><th>Recovered</th></tr></thead><tbody><tr><td data-label=Track>Finish signup (completed surveys)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track>Finish questionnaire (mid-survey)</td><td data-label=Sent></td><td data-label=Recovered></td></tr><tr><td data-label=Track class=app-admin-text-muted>Unsubscribes</td><td data-label=Count colspan=2>`);
15084
+ var _tmpl$1712 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:10rem 1fr 7rem;align-items:center;gap:0.75rem"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><div style=background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><div style=height:100%;background:var(--app-admin-primary);border-radius:4px></div></div><span style=font-size:0.8125rem;text-align:right><span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem>`);
15085
+ var _tmpl$1811 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color:var(--app-admin-fg-muted)>`);
15086
+ var _tmpl$1911 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
15087
+ var _tmpl$2010 = /* @__PURE__ */ template(`<tr><td colspan=4>`);
15088
+ var _tmpl$2115 = /* @__PURE__ */ template(`<tr><td data-label="Last seen"class=app-admin-text-muted></td><td data-label=Progress></td><td data-label=Email></td><td data-label=Reminders>`);
15089
+ var _tmpl$2212 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>not captured`);
15090
+ var _tmpl$2311 = /* @__PURE__ */ template(`<tr><td colspan=5>`);
15091
+ var _tmpl$2411 = /* @__PURE__ */ template(`<tr><td data-label=Captured class=app-admin-text-muted></td><td data-label=Name></td><td data-label=Email></td><td data-label=Qualified></td><td data-label=Reminders>`);
15092
+ var MODE_HELP = {
15093
+ off: "Nothing is sent and nothing is queued.",
15094
+ review: 'The schedule decides who is due; nothing leaves until you send it. Due reminders appear under "Waiting for approval" below.',
15095
+ auto: "Reminders send by themselves, hourly, with no further review."
15096
+ };
15054
15097
  function pct(n, d) {
15055
15098
  if (!d) return "\u2014";
15056
15099
  return `${Math.round(n / d * 100)}%`;
@@ -15127,7 +15170,7 @@ function RecoverySettingsCard() {
15127
15170
  await apiFetch("/admin/settings/funnel-recovery", {
15128
15171
  method: "PUT",
15129
15172
  body: JSON.stringify({
15130
- enabled: s.enabled,
15173
+ mode: s.mode,
15131
15174
  stagesHours,
15132
15175
  incompleteStagesHours
15133
15176
  })
@@ -15170,39 +15213,40 @@ function RecoverySettingsCard() {
15170
15213
  return createComponent(LoadingSpinner, {});
15171
15214
  },
15172
15215
  children: (s) => (() => {
15173
- var _el$8 = _tmpl$732(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$9.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$17 = _el$12.nextSibling, _el$18 = _el$17.firstChild;
15174
- _el$0.addEventListener("change", (e) => setSettings({
15216
+ var _el$8 = _tmpl$732(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$11.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$19 = _el$14.nextSibling, _el$20 = _el$19.firstChild;
15217
+ _el$1.addEventListener("change", (e) => setSettings({
15175
15218
  ...s(),
15176
- enabled: e.currentTarget.checked
15219
+ mode: e.currentTarget.value
15177
15220
  }));
15178
- _el$11.$$input = (e) => setStagesText(e.currentTarget.value);
15179
- _el$14.$$input = (e) => setIncompleteText(e.currentTarget.value);
15221
+ insert(_el$10, () => MODE_HELP[s().mode]);
15222
+ _el$13.$$input = (e) => setStagesText(e.currentTarget.value);
15223
+ _el$16.$$input = (e) => setIncompleteText(e.currentTarget.value);
15180
15224
  insert(_el$8, createComponent(Show, {
15181
15225
  get when() {
15182
15226
  return error();
15183
15227
  },
15184
15228
  get children() {
15185
- var _el$15 = _tmpl$536();
15186
- insert(_el$15, error);
15187
- return _el$15;
15229
+ var _el$17 = _tmpl$536();
15230
+ insert(_el$17, error);
15231
+ return _el$17;
15188
15232
  }
15189
- }), _el$17);
15233
+ }), _el$19);
15190
15234
  insert(_el$8, createComponent(Show, {
15191
15235
  get when() {
15192
15236
  return status();
15193
15237
  },
15194
15238
  get children() {
15195
- var _el$16 = _tmpl$634();
15196
- insert(_el$16, status);
15197
- return _el$16;
15239
+ var _el$18 = _tmpl$634();
15240
+ insert(_el$18, status);
15241
+ return _el$18;
15198
15242
  }
15199
- }), _el$17);
15200
- _el$18.$$click = () => void save();
15201
- insert(_el$18, () => saving() ? "Saving\u2026" : "Save settings");
15202
- effect(() => _el$18.disabled = saving());
15203
- effect(() => _el$0.checked = s().enabled);
15204
- effect(() => _el$11.value = stagesText());
15205
- effect(() => _el$14.value = incompleteText());
15243
+ }), _el$19);
15244
+ _el$20.$$click = () => void save();
15245
+ insert(_el$20, () => saving() ? "Saving\u2026" : "Save settings");
15246
+ effect(() => _el$20.disabled = saving());
15247
+ effect(() => _el$1.value = s().mode);
15248
+ effect(() => _el$13.value = stagesText());
15249
+ effect(() => _el$16.value = incompleteText());
15206
15250
  return _el$8;
15207
15251
  })()
15208
15252
  });
@@ -15211,6 +15255,141 @@ function RecoverySettingsCard() {
15211
15255
  return _el$7;
15212
15256
  })();
15213
15257
  }
15258
+ function RecoveryQueue() {
15259
+ const [reload, setReload] = createSignal(0);
15260
+ const [busy, setBusy] = createSignal(null);
15261
+ const [error, setError] = createSignal(null);
15262
+ const [done, setDone] = createSignal({});
15263
+ const [queue, {
15264
+ refetch
15265
+ }] = createResource(reload, () => apiFetch("/admin/funnel/recovery-queue").catch(() => null));
15266
+ const key = (c) => `${c.kind}:${c.id}`;
15267
+ const act = async (c, action) => {
15268
+ setBusy(key(c));
15269
+ setError(null);
15270
+ try {
15271
+ await apiFetch(`/admin/funnel/recovery-queue/${action}`, {
15272
+ method: "POST",
15273
+ body: JSON.stringify({
15274
+ kind: c.kind,
15275
+ id: c.id
15276
+ })
15277
+ });
15278
+ setDone({
15279
+ ...done(),
15280
+ [key(c)]: action
15281
+ });
15282
+ void refetch();
15283
+ } catch (e) {
15284
+ setError(e.message);
15285
+ } finally {
15286
+ setBusy(null);
15287
+ }
15288
+ };
15289
+ const label = (c) => c.kind === "capture" ? "Finished the questionnaire, never signed up" : c.lastStep != null && c.stepCount ? `Stopped at step ${c.lastStep + 1} of ${c.stepCount}` : "Started the questionnaire, never finished";
15290
+ return createComponent(Show, {
15291
+ get when() {
15292
+ return queue()?.mode === "review";
15293
+ },
15294
+ get children() {
15295
+ var _el$21 = _tmpl$441();
15296
+ insert(_el$21, createComponent(CardHeader, {
15297
+ title: "Waiting for approval",
15298
+ note: "Due by the schedule below. Nothing here has been emailed, and nothing will be until you send it."
15299
+ }), null);
15300
+ insert(_el$21, createComponent(Show, {
15301
+ get when() {
15302
+ return error();
15303
+ },
15304
+ get children() {
15305
+ var _el$22 = _tmpl$828();
15306
+ insert(_el$22, error);
15307
+ return _el$22;
15308
+ }
15309
+ }), null);
15310
+ insert(_el$21, createComponent(Show, {
15311
+ get when() {
15312
+ return (queue()?.candidates.length ?? 0) > 0;
15313
+ },
15314
+ get fallback() {
15315
+ return createComponent(EmptyState, {
15316
+ message: "Nobody is due a reminder right now."
15317
+ });
15318
+ },
15319
+ get children() {
15320
+ var _el$23 = _tmpl$925(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
15321
+ insert(_el$25, createComponent(For, {
15322
+ get each() {
15323
+ return queue().candidates;
15324
+ },
15325
+ children: (c) => (() => {
15326
+ var _el$26 = _tmpl$1014(), _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$30 = _el$27.nextSibling, _el$31 = _el$30.nextSibling, _el$32 = _el$31.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$32.nextSibling;
15327
+ insert(_el$28, () => c.name || c.email);
15328
+ insert(_el$27, createComponent(Show, {
15329
+ get when() {
15330
+ return c.name;
15331
+ },
15332
+ get children() {
15333
+ var _el$29 = _tmpl$021();
15334
+ insert(_el$29, () => c.email);
15335
+ return _el$29;
15336
+ }
15337
+ }), null);
15338
+ insert(_el$30, () => label(c));
15339
+ insert(_el$31, () => daysAgo(c.lastActivityAt));
15340
+ insert(_el$32, () => c.stage + 1, _el$33);
15341
+ insert(_el$32, () => c.totalStages, null);
15342
+ insert(_el$34, createComponent(Show, {
15343
+ get when() {
15344
+ return !done()[key(c)];
15345
+ },
15346
+ get fallback() {
15347
+ return (() => {
15348
+ var _el$39 = _tmpl$1116();
15349
+ insert(_el$39, () => DONE_LABEL[done()[key(c)]]);
15350
+ return _el$39;
15351
+ })();
15352
+ },
15353
+ get children() {
15354
+ var _el$35 = _tmpl$1102(), _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling, _el$38 = _el$37.nextSibling;
15355
+ _el$36.$$click = () => void act(c, "send");
15356
+ insert(_el$36, () => busy() === key(c) ? "Sending\u2026" : "Send");
15357
+ _el$37.$$click = () => void act(c, "skip");
15358
+ _el$38.$$click = () => void act(c, "suppress");
15359
+ effect((_p$) => {
15360
+ var _v$ = busy() === key(c), _v$2 = busy() === key(c), _v$3 = busy() === key(c);
15361
+ _v$ !== _p$.e && (_el$36.disabled = _p$.e = _v$);
15362
+ _v$2 !== _p$.t && (_el$37.disabled = _p$.t = _v$2);
15363
+ _v$3 !== _p$.a && (_el$38.disabled = _p$.a = _v$3);
15364
+ return _p$;
15365
+ }, {
15366
+ e: void 0,
15367
+ t: void 0,
15368
+ a: void 0
15369
+ });
15370
+ return _el$35;
15371
+ }
15372
+ }));
15373
+ return _el$26;
15374
+ })()
15375
+ }));
15376
+ return _el$23;
15377
+ }
15378
+ }), null);
15379
+ return _el$21;
15380
+ }
15381
+ });
15382
+ }
15383
+ var DONE_LABEL = {
15384
+ send: "Sent",
15385
+ skip: "Skipped",
15386
+ suppress: "Suppressed"
15387
+ };
15388
+ function daysAgo(iso) {
15389
+ const days = Math.floor((Date.now() - new Date(iso).getTime()) / 864e5);
15390
+ if (days < 1) return "today";
15391
+ return days === 1 ? "1 day" : `${days} days`;
15392
+ }
15214
15393
  function Funnel() {
15215
15394
  const [days, setDays] = createSignal(30);
15216
15395
  const [summary] = createResource(days, (d) => apiFetch(`/admin/funnel/summary?days=${d}`));
@@ -15237,13 +15416,13 @@ function Funnel() {
15237
15416
  const dropoffMax = () => Math.max(1, ...(summary()?.stepDropoff ?? []).map((b) => b.count));
15238
15417
  const totalRecovered = () => (summary()?.recovery.captureRecovered ?? 0) + (summary()?.recovery.sessionRecovered ?? 0);
15239
15418
  return (() => {
15240
- var _el$19 = _tmpl$828(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$20.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$22.nextSibling, _el$27 = _el$26.firstChild, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling;
15241
- insert(_el$19, createComponent(PageTitle, {
15419
+ var _el$40 = _tmpl$1213(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$41.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling, _el$47 = _el$43.nextSibling, _el$48 = _el$47.firstChild, _el$49 = _el$48.firstChild, _el$50 = _el$49.nextSibling;
15420
+ insert(_el$40, createComponent(PageTitle, {
15242
15421
  subtitle: "Survey drop-off and abandoned-checkout recovery",
15243
15422
  children: "Funnel"
15244
- }), _el$20);
15245
- _el$21.addEventListener("change", (e) => setDays(parseInt(e.currentTarget.value)));
15246
- insert(_el$19, createComponent(Show, {
15423
+ }), _el$41);
15424
+ _el$42.addEventListener("change", (e) => setDays(parseInt(e.currentTarget.value)));
15425
+ insert(_el$40, createComponent(Show, {
15247
15426
  get when() {
15248
15427
  return summary();
15249
15428
  },
@@ -15251,141 +15430,142 @@ function Funnel() {
15251
15430
  return createComponent(LoadingSpinner, {});
15252
15431
  },
15253
15432
  children: (s) => [(() => {
15254
- var _el$30 = _tmpl$925();
15255
- insert(_el$30, createComponent(StatCard, {
15433
+ var _el$51 = _tmpl$1312();
15434
+ insert(_el$51, createComponent(StatCard, {
15256
15435
  label: "Surveys Started",
15257
15436
  get value() {
15258
15437
  return s().sessions.started;
15259
15438
  }
15260
15439
  }), null);
15261
- insert(_el$30, createComponent(StatCard, {
15440
+ insert(_el$51, createComponent(StatCard, {
15262
15441
  label: "Completion Rate",
15263
15442
  get value() {
15264
15443
  return pct(s().captures.total, s().sessions.started);
15265
15444
  }
15266
15445
  }), null);
15267
- insert(_el$30, createComponent(StatCard, {
15446
+ insert(_el$51, createComponent(StatCard, {
15268
15447
  label: "Qualified Rate",
15269
15448
  get value() {
15270
15449
  return pct(s().captures.qualified, s().captures.total);
15271
15450
  }
15272
15451
  }), null);
15273
- insert(_el$30, createComponent(StatCard, {
15452
+ insert(_el$51, createComponent(StatCard, {
15274
15453
  label: "Signup Conversion",
15275
15454
  get value() {
15276
15455
  return pct(s().captures.converted, s().captures.leads);
15277
15456
  }
15278
15457
  }), null);
15279
- insert(_el$30, createComponent(StatCard, {
15458
+ insert(_el$51, createComponent(StatCard, {
15280
15459
  label: "Recovered by Email",
15281
15460
  get value() {
15282
15461
  return totalRecovered();
15283
15462
  }
15284
15463
  }), null);
15285
- return _el$30;
15464
+ return _el$51;
15286
15465
  })(), (() => {
15287
- var _el$31 = _tmpl$021(), _el$32 = _el$31.firstChild;
15288
- insert(_el$31, createComponent(CardHeader, {
15466
+ var _el$52 = _tmpl$1412(), _el$53 = _el$52.firstChild;
15467
+ insert(_el$52, createComponent(CardHeader, {
15289
15468
  title: "Funnel stages"
15290
- }), _el$32);
15291
- insert(_el$32, createComponent(For, {
15469
+ }), _el$53);
15470
+ insert(_el$53, createComponent(For, {
15292
15471
  get each() {
15293
15472
  return stages();
15294
15473
  },
15295
15474
  children: (stage, i) => (() => {
15296
- var _el$50 = _tmpl$1116(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$52.nextSibling, _el$55 = _el$54.firstChild;
15297
- insert(_el$51, () => stage.label);
15298
- insert(_el$54, () => stage.value, _el$55);
15299
- insert(_el$55, (() => {
15475
+ var _el$71 = _tmpl$1712(), _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild, _el$75 = _el$73.nextSibling, _el$76 = _el$75.firstChild;
15476
+ insert(_el$72, () => stage.label);
15477
+ insert(_el$75, () => stage.value, _el$76);
15478
+ insert(_el$76, (() => {
15300
15479
  var _c$ = memo(() => i() > 0);
15301
15480
  return () => _c$() ? pct(stage.value, stages()[i() - 1].value) : "";
15302
15481
  })());
15303
15482
  effect((_p$) => {
15304
- var _v$ = `${stage.label}: ${stage.value}`, _v$2 = `${stage.value / stageMax() * 100}%`, _v$3 = stage.value > 0 ? "4px" : "0";
15305
- _v$ !== _p$.e && setAttribute(_el$50, "title", _p$.e = _v$);
15306
- _v$2 !== _p$.t && setStyleProperty(_el$53, "width", _p$.t = _v$2);
15307
- _v$3 !== _p$.a && setStyleProperty(_el$53, "min-width", _p$.a = _v$3);
15483
+ var _v$4 = `${stage.label}: ${stage.value}`, _v$5 = `${stage.value / stageMax() * 100}%`, _v$6 = stage.value > 0 ? "4px" : "0";
15484
+ _v$4 !== _p$.e && setAttribute(_el$71, "title", _p$.e = _v$4);
15485
+ _v$5 !== _p$.t && setStyleProperty(_el$74, "width", _p$.t = _v$5);
15486
+ _v$6 !== _p$.a && setStyleProperty(_el$74, "min-width", _p$.a = _v$6);
15308
15487
  return _p$;
15309
15488
  }, {
15310
15489
  e: void 0,
15311
15490
  t: void 0,
15312
15491
  a: void 0
15313
15492
  });
15314
- return _el$50;
15493
+ return _el$71;
15315
15494
  })()
15316
15495
  }));
15317
- return _el$31;
15496
+ return _el$52;
15318
15497
  })(), (() => {
15319
- var _el$33 = _tmpl$1102(), _el$34 = _el$33.firstChild;
15320
- insert(_el$33, createComponent(CardHeader, {
15498
+ var _el$54 = _tmpl$1512(), _el$55 = _el$54.firstChild;
15499
+ insert(_el$54, createComponent(CardHeader, {
15321
15500
  title: "Where abandons quit",
15322
15501
  get note() {
15323
15502
  return "Survey progress at last activity \u2014 the final bucket is the contact-info step. Leaving the page counts immediately; a silently-dropped session counts after 4 quiet hours." + (s().sessions.active > 0 ? ` ${s().sessions.active} session${s().sessions.active === 1 ? "" : "s"} still in progress \u2014 not counted yet.` : "");
15324
15503
  }
15325
- }), _el$34);
15326
- insert(_el$34, createComponent(For, {
15504
+ }), _el$55);
15505
+ insert(_el$55, createComponent(For, {
15327
15506
  get each() {
15328
15507
  return s().stepDropoff;
15329
15508
  },
15330
15509
  children: (b) => (() => {
15331
- var _el$56 = _tmpl$1312(), _el$58 = _el$56.firstChild, _el$59 = _el$58.nextSibling;
15332
- insert(_el$56, createComponent(Show, {
15510
+ var _el$77 = _tmpl$1911(), _el$79 = _el$77.firstChild, _el$80 = _el$79.nextSibling;
15511
+ insert(_el$77, createComponent(Show, {
15333
15512
  get when() {
15334
15513
  return b.count > 0;
15335
15514
  },
15336
15515
  get children() {
15337
- var _el$57 = _tmpl$1213();
15338
- insert(_el$57, () => b.count);
15339
- return _el$57;
15516
+ var _el$78 = _tmpl$1811();
15517
+ insert(_el$78, () => b.count);
15518
+ return _el$78;
15340
15519
  }
15341
- }), _el$58);
15342
- insert(_el$59, (() => {
15520
+ }), _el$79);
15521
+ insert(_el$80, (() => {
15343
15522
  var _c$2 = memo(() => b.bucket === 0);
15344
15523
  return () => _c$2() ? "Start" : memo(() => b.bucket === 10)() ? "Info" : b.bucket === 5 ? "50%" : "";
15345
15524
  })());
15346
15525
  effect((_p$) => {
15347
- var _v$4 = `${b.bucket * 10}% through: ${b.count} abandon${b.count === 1 ? "" : "s"}`, _v$5 = `${Math.max(b.count > 0 ? 6 : 2, b.count / dropoffMax() * 100)}px`, _v$6 = b.count > 0 ? "var(--app-admin-primary)" : "var(--app-admin-border-soft)";
15348
- _v$4 !== _p$.e && setAttribute(_el$56, "title", _p$.e = _v$4);
15349
- _v$5 !== _p$.t && setStyleProperty(_el$58, "height", _p$.t = _v$5);
15350
- _v$6 !== _p$.a && setStyleProperty(_el$58, "background", _p$.a = _v$6);
15526
+ var _v$7 = `${b.bucket * 10}% through: ${b.count} abandon${b.count === 1 ? "" : "s"}`, _v$8 = `${Math.max(b.count > 0 ? 6 : 2, b.count / dropoffMax() * 100)}px`, _v$9 = b.count > 0 ? "var(--app-admin-primary)" : "var(--app-admin-border-soft)";
15527
+ _v$7 !== _p$.e && setAttribute(_el$77, "title", _p$.e = _v$7);
15528
+ _v$8 !== _p$.t && setStyleProperty(_el$79, "height", _p$.t = _v$8);
15529
+ _v$9 !== _p$.a && setStyleProperty(_el$79, "background", _p$.a = _v$9);
15351
15530
  return _p$;
15352
15531
  }, {
15353
15532
  e: void 0,
15354
15533
  t: void 0,
15355
15534
  a: void 0
15356
15535
  });
15357
- return _el$56;
15536
+ return _el$77;
15358
15537
  })()
15359
15538
  }));
15360
- return _el$33;
15539
+ return _el$54;
15361
15540
  })(), (() => {
15362
- var _el$35 = _tmpl$1014(), _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling, _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$41.nextSibling, _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling, _el$46 = _el$45.nextSibling, _el$47 = _el$43.nextSibling, _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
15363
- insert(_el$35, createComponent(CardHeader, {
15541
+ var _el$56 = _tmpl$1612(), _el$57 = _el$56.firstChild, _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$60 = _el$59.firstChild, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling, _el$63 = _el$62.nextSibling, _el$64 = _el$60.nextSibling, _el$65 = _el$64.firstChild, _el$66 = _el$65.nextSibling, _el$67 = _el$66.nextSibling, _el$68 = _el$64.nextSibling, _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
15542
+ insert(_el$56, createComponent(CardHeader, {
15364
15543
  title: "Recovery emails"
15365
- }), _el$36);
15366
- insert(_el$41, () => s().recovery.captureRemindersSent);
15367
- insert(_el$42, () => s().recovery.captureRecovered);
15368
- insert(_el$45, () => s().recovery.sessionRemindersSent);
15369
- insert(_el$46, () => s().recovery.sessionRecovered);
15370
- insert(_el$49, () => s().recovery.optOuts);
15371
- return _el$35;
15544
+ }), _el$57);
15545
+ insert(_el$62, () => s().recovery.captureRemindersSent);
15546
+ insert(_el$63, () => s().recovery.captureRecovered);
15547
+ insert(_el$66, () => s().recovery.sessionRemindersSent);
15548
+ insert(_el$67, () => s().recovery.sessionRecovered);
15549
+ insert(_el$70, () => s().recovery.optOuts);
15550
+ return _el$56;
15372
15551
  })()]
15373
- }), _el$22);
15374
- insert(_el$19, createComponent(RecoverySettingsCard, {}), _el$22);
15375
- insert(_el$22, createComponent(CardHeader, {
15552
+ }), _el$43);
15553
+ insert(_el$40, createComponent(RecoveryQueue, {}), _el$43);
15554
+ insert(_el$40, createComponent(RecoverySettingsCard, {}), _el$43);
15555
+ insert(_el$43, createComponent(CardHeader, {
15376
15556
  title: "Recent abandons"
15377
- }), _el$23);
15378
- insert(_el$25, createComponent(Show, {
15557
+ }), _el$44);
15558
+ insert(_el$46, createComponent(Show, {
15379
15559
  get when() {
15380
15560
  return (abandons()?.sessions ?? []).length > 0;
15381
15561
  },
15382
15562
  get fallback() {
15383
15563
  return (() => {
15384
- var _el$60 = _tmpl$1412(), _el$61 = _el$60.firstChild;
15385
- insert(_el$61, createComponent(EmptyState, {
15564
+ var _el$81 = _tmpl$2010(), _el$82 = _el$81.firstChild;
15565
+ insert(_el$82, createComponent(EmptyState, {
15386
15566
  message: "No abandoned sessions"
15387
15567
  }));
15388
- return _el$60;
15568
+ return _el$81;
15389
15569
  })();
15390
15570
  },
15391
15571
  get children() {
@@ -15394,33 +15574,33 @@ function Funnel() {
15394
15574
  return abandons()?.sessions;
15395
15575
  },
15396
15576
  children: (sess) => (() => {
15397
- var _el$62 = _tmpl$1512(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling;
15398
- insert(_el$63, () => formatDate(sess.last_seen_at));
15399
- insert(_el$64, (() => {
15577
+ var _el$83 = _tmpl$2115(), _el$84 = _el$83.firstChild, _el$85 = _el$84.nextSibling, _el$86 = _el$85.nextSibling, _el$87 = _el$86.nextSibling;
15578
+ insert(_el$84, () => formatDate(sess.last_seen_at));
15579
+ insert(_el$85, (() => {
15400
15580
  var _c$3 = memo(() => !!(sess.last_step != null && sess.step_count));
15401
15581
  return () => _c$3() ? `Step ${Math.min(sess.last_step + 1, sess.step_count)} of ${sess.step_count}` : "\u2014";
15402
15582
  })());
15403
- insert(_el$65, () => sess.email ?? _tmpl$1612());
15404
- insert(_el$66, () => sess.reminders_sent);
15405
- return _el$62;
15583
+ insert(_el$86, () => sess.email ?? _tmpl$2212());
15584
+ insert(_el$87, () => sess.reminders_sent);
15585
+ return _el$83;
15406
15586
  })()
15407
15587
  });
15408
15588
  }
15409
15589
  }));
15410
- insert(_el$26, createComponent(CardHeader, {
15590
+ insert(_el$47, createComponent(CardHeader, {
15411
15591
  title: "Completed surveys, not signed up"
15412
- }), _el$27);
15413
- insert(_el$29, createComponent(Show, {
15592
+ }), _el$48);
15593
+ insert(_el$50, createComponent(Show, {
15414
15594
  get when() {
15415
15595
  return (leads()?.captures ?? []).length > 0;
15416
15596
  },
15417
15597
  get fallback() {
15418
15598
  return (() => {
15419
- var _el$68 = _tmpl$1712(), _el$69 = _el$68.firstChild;
15420
- insert(_el$69, createComponent(EmptyState, {
15599
+ var _el$89 = _tmpl$2311(), _el$90 = _el$89.firstChild;
15600
+ insert(_el$90, createComponent(EmptyState, {
15421
15601
  message: "No unconverted captures"
15422
15602
  }));
15423
- return _el$68;
15603
+ return _el$89;
15424
15604
  })();
15425
15605
  },
15426
15606
  get children() {
@@ -15429,19 +15609,19 @@ function Funnel() {
15429
15609
  return leads()?.captures;
15430
15610
  },
15431
15611
  children: (c) => (() => {
15432
- var _el$70 = _tmpl$1811(), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling, _el$73 = _el$72.nextSibling, _el$74 = _el$73.nextSibling, _el$75 = _el$74.nextSibling;
15433
- insert(_el$71, () => formatDate(c.captured_at));
15434
- insert(_el$72, () => c.patient_name ?? "\u2014");
15435
- insert(_el$73, () => c.email ?? "\u2014");
15436
- insert(_el$74, () => c.qualified ? "Yes" : "No");
15437
- insert(_el$75, () => c.reminders_sent);
15438
- return _el$70;
15612
+ var _el$91 = _tmpl$2411(), _el$92 = _el$91.firstChild, _el$93 = _el$92.nextSibling, _el$94 = _el$93.nextSibling, _el$95 = _el$94.nextSibling, _el$96 = _el$95.nextSibling;
15613
+ insert(_el$92, () => formatDate(c.captured_at));
15614
+ insert(_el$93, () => c.patient_name ?? "\u2014");
15615
+ insert(_el$94, () => c.email ?? "\u2014");
15616
+ insert(_el$95, () => c.qualified ? "Yes" : "No");
15617
+ insert(_el$96, () => c.reminders_sent);
15618
+ return _el$91;
15439
15619
  })()
15440
15620
  });
15441
15621
  }
15442
15622
  }));
15443
- effect(() => _el$21.value = days());
15444
- return _el$19;
15623
+ effect(() => _el$42.value = days());
15624
+ return _el$40;
15445
15625
  })();
15446
15626
  }
15447
15627
  delegateEvents(["input", "click"]);
@@ -17005,12 +17185,12 @@ var _tmpl$1515 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
17005
17185
  var _tmpl$1615 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role>We usually reply within one business day</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=support-subject>What's this about?</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
17006
17186
  var _tmpl$1715 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
17007
17187
  var _tmpl$1812 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name></h3><p class=msg-thread__role>`);
17008
- var _tmpl$1911 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
17009
- var _tmpl$2010 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
17010
- var _tmpl$2115 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
17011
- var _tmpl$2212 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
17012
- var _tmpl$2311 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
17013
- var _tmpl$2411 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
17188
+ var _tmpl$1912 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
17189
+ var _tmpl$2011 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
17190
+ var _tmpl$2116 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
17191
+ var _tmpl$2213 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
17192
+ var _tmpl$2312 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
17193
+ var _tmpl$2412 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
17014
17194
  var _tmpl$2511 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel><div class=msg-panel__layout><div></div><div>`);
17015
17195
  var _tmpl$2610 = /* @__PURE__ */ template(`<div class=msg-panel__placeholder data-testid=messages-placeholder><p>Select a conversation to read and reply.`);
17016
17196
  function sanitizeMessageHtml(html) {
@@ -17371,7 +17551,7 @@ function MessagesPanel(props) {
17371
17551
  }), null);
17372
17552
  return _el$43;
17373
17553
  })(), (() => {
17374
- var _el$49 = _tmpl$1911(), _el$51 = _el$49.firstChild;
17554
+ var _el$49 = _tmpl$1912(), _el$51 = _el$49.firstChild;
17375
17555
  insert(_el$49, createComponent(Show, {
17376
17556
  get when() {
17377
17557
  return thread().loadingMessages();
@@ -17396,13 +17576,13 @@ function MessagesPanel(props) {
17396
17576
  return pendingFile() || attachError();
17397
17577
  },
17398
17578
  get children() {
17399
- var _el$52 = _tmpl$2115();
17579
+ var _el$52 = _tmpl$2116();
17400
17580
  insert(_el$52, createComponent(Show, {
17401
17581
  get when() {
17402
17582
  return pendingFile();
17403
17583
  },
17404
17584
  children: (file) => (() => {
17405
- var _el$61 = _tmpl$2411(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.nextSibling;
17585
+ var _el$61 = _tmpl$2412(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.nextSibling;
17406
17586
  insert(_el$61, () => file().name, _el$63);
17407
17587
  insert(_el$63, () => formatFileSize(file().size));
17408
17588
  _el$64.$$click = () => setPendingFile(null);
@@ -17414,7 +17594,7 @@ function MessagesPanel(props) {
17414
17594
  return attachError();
17415
17595
  },
17416
17596
  get children() {
17417
- var _el$53 = _tmpl$2010();
17597
+ var _el$53 = _tmpl$2011();
17418
17598
  insert(_el$53, attachError);
17419
17599
  return _el$53;
17420
17600
  }
@@ -17422,13 +17602,13 @@ function MessagesPanel(props) {
17422
17602
  return _el$52;
17423
17603
  }
17424
17604
  }), (() => {
17425
- var _el$54 = _tmpl$2311(), _el$59 = _el$54.firstChild, _el$60 = _el$59.nextSibling;
17605
+ var _el$54 = _tmpl$2312(), _el$59 = _el$54.firstChild, _el$60 = _el$59.nextSibling;
17426
17606
  insert(_el$54, createComponent(Show, {
17427
17607
  get when() {
17428
17608
  return thread().selectedSource() === "support";
17429
17609
  },
17430
17610
  get children() {
17431
- var _el$55 = _tmpl$2212(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling, _el$58 = _el$57.nextSibling;
17611
+ var _el$55 = _tmpl$2213(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling, _el$58 = _el$57.nextSibling;
17432
17612
  _el$58.addEventListener("change", (e) => stageFile(e.currentTarget, setPendingFile));
17433
17613
  effect(() => setAttribute(_el$58, "accept", SUPPORT_ATTACHMENT_MIME_TYPES.join(",")));
17434
17614
  return _el$55;
@@ -18406,7 +18586,7 @@ function AffiliateReferralLink() {
18406
18586
  }
18407
18587
  delegateEvents(["click"]);
18408
18588
  var _tmpl$373 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
18409
- var _tmpl$2116 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
18589
+ var _tmpl$2117 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
18410
18590
  var _tmpl$374 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
18411
18591
  var _tmpl$454 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
18412
18592
  var STATUS_LABEL2 = {
@@ -18449,7 +18629,7 @@ function AffiliateSettings() {
18449
18629
  return affiliate();
18450
18630
  },
18451
18631
  get fallback() {
18452
- return _tmpl$2116();
18632
+ return _tmpl$2117();
18453
18633
  },
18454
18634
  children: (a) => (() => {
18455
18635
  var _el$7 = _tmpl$374();
@@ -18475,7 +18655,7 @@ delegateEvents(["click"]);
18475
18655
 
18476
18656
  // src/pages/AffiliatePortal.tsx
18477
18657
  var _tmpl$375 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
18478
- var _tmpl$2117 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
18658
+ var _tmpl$2118 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
18479
18659
  var _tmpl$376 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
18480
18660
  var _tmpl$455 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
18481
18661
  var TAB_LABELS2 = {
@@ -18538,7 +18718,7 @@ function AffiliatePortal(props) {
18538
18718
  return props.tabIcons?.[tab];
18539
18719
  },
18540
18720
  get children() {
18541
- var _el$10 = _tmpl$2117();
18721
+ var _el$10 = _tmpl$2118();
18542
18722
  effect(() => className(_el$10, props.tabIcons[tab]));
18543
18723
  return _el$10;
18544
18724
  }
@@ -18680,7 +18860,7 @@ delegateEvents(["input", "click"]);
18680
18860
 
18681
18861
  // src/pages/AffiliateRegister.tsx
18682
18862
  var _tmpl$378 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
18683
- var _tmpl$2118 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
18863
+ var _tmpl$2119 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
18684
18864
  var _tmpl$379 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
18685
18865
  var _tmpl$456 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
18686
18866
  var _tmpl$548 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
@@ -18744,7 +18924,7 @@ function AffiliateRegister(props) {
18744
18924
  insert(_el$6, createComponent(Row, {
18745
18925
  label: "Last name",
18746
18926
  get children() {
18747
- var _el$8 = _tmpl$2118();
18927
+ var _el$8 = _tmpl$2119();
18748
18928
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
18749
18929
  effect((_$p) => style(_el$8, inputStyle2(), _$p));
18750
18930
  effect(() => _el$8.value = lastName());
@@ -18874,7 +19054,7 @@ function linkStyle() {
18874
19054
  }
18875
19055
  delegateEvents(["input", "click"]);
18876
19056
  var _tmpl$380 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18877
- var _tmpl$2119 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
19057
+ var _tmpl$2120 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
18878
19058
  var _tmpl$381 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-primary-soft-fg);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>New affiliate? Apply`);
18879
19059
  var _tmpl$457 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
18880
19060
  function AffiliateLogin(props) {
@@ -18923,7 +19103,7 @@ function AffiliateLogin(props) {
18923
19103
  return props.onNavigateForgotPassword;
18924
19104
  },
18925
19105
  get children() {
18926
- var _el$10 = _tmpl$2119();
19106
+ var _el$10 = _tmpl$2120();
18927
19107
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
18928
19108
  return _el$10;
18929
19109
  }
@@ -18982,7 +19162,7 @@ function inputStyle3() {
18982
19162
  }
18983
19163
  delegateEvents(["input", "click"]);
18984
19164
  var _tmpl$382 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18985
- var _tmpl$2120 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19165
+ var _tmpl$2121 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
18986
19166
  var _tmpl$383 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Reset your password`);
18987
19167
  var _tmpl$458 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
18988
19168
  function ForgotPasswordPage(props) {
@@ -19021,7 +19201,7 @@ function ForgotPasswordPage(props) {
19021
19201
  })();
19022
19202
  },
19023
19203
  get children() {
19024
- var _el$4 = _tmpl$2120(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19204
+ var _el$4 = _tmpl$2121(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19025
19205
  _el$4.addEventListener("submit", handleSubmit);
19026
19206
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
19027
19207
  insert(_el$4, createComponent(Show, {
@@ -19080,7 +19260,7 @@ function inputStyle4() {
19080
19260
  }
19081
19261
  delegateEvents(["input"]);
19082
19262
  var _tmpl$384 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
19083
- var _tmpl$2121 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19263
+ var _tmpl$2122 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
19084
19264
  var _tmpl$385 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Choose a new password`);
19085
19265
  var _tmpl$459 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
19086
19266
  function queryParam(name) {
@@ -19135,7 +19315,7 @@ function ResetPasswordPage(props) {
19135
19315
  })();
19136
19316
  },
19137
19317
  get children() {
19138
- var _el$4 = _tmpl$2121(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
19318
+ var _el$4 = _tmpl$2122(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
19139
19319
  _el$4.addEventListener("submit", handleSubmit);
19140
19320
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
19141
19321
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -19200,7 +19380,7 @@ function inputStyle5() {
19200
19380
  }
19201
19381
  delegateEvents(["input"]);
19202
19382
  var _tmpl$386 = /* @__PURE__ */ template(`<div>`);
19203
- var _tmpl$2122 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
19383
+ var _tmpl$2123 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
19204
19384
  var _tmpl$387 = /* @__PURE__ */ template(`<button type=button>Back to login`);
19205
19385
  var _tmpl$460 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
19206
19386
  var _tmpl$549 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
@@ -19239,7 +19419,7 @@ function AffiliateForgotPassword(props) {
19239
19419
  })();
19240
19420
  },
19241
19421
  get children() {
19242
- var _el$4 = _tmpl$2122(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19422
+ var _el$4 = _tmpl$2123(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
19243
19423
  _el$4.addEventListener("submit", handleSubmit);
19244
19424
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
19245
19425
  insert(_el$4, createComponent(Show, {
@@ -19383,7 +19563,7 @@ function linkStyle2() {
19383
19563
  }
19384
19564
  delegateEvents(["input", "click"]);
19385
19565
  var _tmpl$388 = /* @__PURE__ */ template(`<div>`);
19386
- var _tmpl$2123 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
19566
+ var _tmpl$2124 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
19387
19567
  var _tmpl$389 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
19388
19568
  var _tmpl$461 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
19389
19569
  function queryParam2(name) {
@@ -19438,7 +19618,7 @@ function AffiliateResetPassword(props) {
19438
19618
  return _tmpl$461();
19439
19619
  },
19440
19620
  get children() {
19441
- var _el$4 = _tmpl$2123(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
19621
+ var _el$4 = _tmpl$2124(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
19442
19622
  _el$4.addEventListener("submit", handleSubmit);
19443
19623
  insert(_el$5, createComponent(AffiliatePasswordInput, {
19444
19624
  required: true,
@@ -19562,5 +19742,5 @@ function primaryButtonStyle2(submitting) {
19562
19742
  }
19563
19743
 
19564
19744
  export { AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod };
19565
- //# sourceMappingURL=MN4GWQC4.js.map
19566
- //# sourceMappingURL=MN4GWQC4.js.map
19745
+ //# sourceMappingURL=JXPPJF2V.js.map
19746
+ //# sourceMappingURL=JXPPJF2V.js.map