@apextelemed/partner-core 0.18.0-dev.57 → 0.18.0-dev.59

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 (39) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +3 -3
  4. package/dist/chunk/{TPJ4JT6V.jsx → 23TRH45I.jsx} +4 -4
  5. package/dist/chunk/{B7FB66P6.js → 6D2HEGRD.js} +3 -3
  6. package/dist/chunk/{B7FB66P6.js.map → 6D2HEGRD.js.map} +1 -1
  7. package/dist/chunk/{KKMLCFNX.js → AXCXMZKP.js} +6 -6
  8. package/dist/chunk/{KKMLCFNX.js.map → AXCXMZKP.js.map} +1 -1
  9. package/dist/chunk/{AY7MYFVF.js → B3IHYFCS.js} +666 -462
  10. package/dist/chunk/B3IHYFCS.js.map +1 -0
  11. package/dist/chunk/{5MVIKOPC.js → C4V7G2WO.js} +3 -3
  12. package/dist/chunk/{5MVIKOPC.js.map → C4V7G2WO.js.map} +1 -1
  13. package/dist/chunk/{NUFR6YQG.jsx → HECRSRX5.jsx} +2 -2
  14. package/dist/chunk/{ECVD6HBS.js → HWUNDWNY.js} +3 -3
  15. package/dist/chunk/{ECVD6HBS.js.map → HWUNDWNY.js.map} +1 -1
  16. package/dist/chunk/{JCJ5TTMD.js → IJR3CERD.js} +2 -2
  17. package/dist/chunk/{JCJ5TTMD.js.map → IJR3CERD.js.map} +1 -1
  18. package/dist/chunk/{RP36N7AT.jsx → OMHZD4JU.jsx} +1457 -1307
  19. package/dist/chunk/{PNOFZKYS.jsx → P6RRDH3K.jsx} +2 -2
  20. package/dist/chunk/{O5ZPLKOG.js → PJVEDHQN.js} +5 -5
  21. package/dist/chunk/{O5ZPLKOG.js.map → PJVEDHQN.js.map} +1 -1
  22. package/dist/chunk/{42YVSZT3.jsx → QMMIJ5T5.jsx} +5 -5
  23. package/dist/chunk/{A5AJZOGG.jsx → QN3GGUYU.jsx} +2 -2
  24. package/dist/chunk/{IC2BEVUQ.jsx → WSP34CNN.jsx} +1 -1
  25. package/dist/{client-B9tYDdob.d.ts → client-DUg3WI5F.d.ts} +40 -1
  26. package/dist/flows/index.d.ts +1 -1
  27. package/dist/flows/index.js +6 -6
  28. package/dist/flows/index.jsx +6 -6
  29. package/dist/index/index.d.ts +1 -1
  30. package/dist/index/index.js +7 -7
  31. package/dist/index/index.jsx +7 -7
  32. package/dist/pages/index.d.ts +1 -1
  33. package/dist/pages/index.js +5 -5
  34. package/dist/pages/index.jsx +5 -5
  35. package/dist/stores/index.d.ts +1 -1
  36. package/dist/stores/index.js +2 -2
  37. package/dist/stores/index.jsx +2 -2
  38. package/package.json +1 -1
  39. package/dist/chunk/AY7MYFVF.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './O5ZPLKOG.js';
3
- import { fetchFunnelConfig } from './ECVD6HBS.js';
2
+ import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './PJVEDHQN.js';
3
+ import { fetchFunnelConfig } from './HWUNDWNY.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './5MVIKOPC.js';
6
- import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './JCJ5TTMD.js';
5
+ import { cart_default, auth_default, affiliateAuth_default } from './C4V7G2WO.js';
6
+ import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './IJR3CERD.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
8
8
  import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
9
9
  import { isQuestionVisible } from '@apextelemed/survey-core';
@@ -11859,19 +11859,218 @@ function discountTerms(s) {
11859
11859
  const next = nextChargeCents(s);
11860
11860
  return next != null && next >= base ? `${off}, ended` : `${off}, first charge only`;
11861
11861
  }
11862
+ var _tmpl$188 = /* @__PURE__ */ template(`<ol class=app-admin-timeline>`);
11863
+ var _tmpl$259 = /* @__PURE__ */ template(`<section aria-label="Refill schedule"style=margin-top:0.875rem><div style=display:flex;align-items:baseline;gap:0.5rem;flex-wrap:wrap;margin-bottom:0.25rem><span style=font-weight:600;font-size:0.875rem>Refill schedule</span><span class=app-admin-text-muted style=font-size:0.8125rem>`);
11864
+ var _tmpl$341 = /* @__PURE__ */ template(`<div class=app-admin-timeline__meta>`);
11865
+ var _tmpl$434 = /* @__PURE__ */ template(`<li><span aria-hidden=true></span><div><div class=app-admin-timeline__title>: <strong>`);
11866
+ var _tmpl$529 = /* @__PURE__ */ template(`<p class=app-admin-notice style="margin:0.375rem 0 0">`);
11867
+ var PROBLEM_NOTICES = /* @__PURE__ */ new Set(["pharmacy_send_passed", "fill_date_passed", "needs_review"]);
11868
+ var SHOWN_AS_STEP = /* @__PURE__ */ new Set(["awaiting_shipment", "pharmacy_send_passed", "based_on_send", "anchor_not_recorded", "fill_date_passed"]);
11869
+ function extraNotices(s) {
11870
+ return s.notices.filter((n) => !SHOWN_AS_STEP.has(n.code));
11871
+ }
11872
+ var BASED_ON = {
11873
+ transmitted: "from the send date; moves when the order ships",
11874
+ shipped: "from the ship date",
11875
+ manual: "set by an admin"
11876
+ };
11877
+ var DATE_OPTS = {
11878
+ month: "short",
11879
+ day: "numeric",
11880
+ year: "numeric"
11881
+ };
11882
+ function fmtCalendarDate(ymd) {
11883
+ if (!ymd) return "\u2014";
11884
+ const [y, m, d] = ymd.slice(0, 10).split("-").map(Number);
11885
+ if (!y || !m || !d) return ymd;
11886
+ return new Date(y, m - 1, d).toLocaleDateString("en-US", DATE_OPTS);
11887
+ }
11888
+ function fmtDay2(iso) {
11889
+ if (!iso) return "\u2014";
11890
+ const t = new Date(iso);
11891
+ return Number.isNaN(t.getTime()) ? iso : t.toLocaleDateString("en-US", DATE_OPTS);
11892
+ }
11893
+ function localYmd(d) {
11894
+ const p = (n) => String(n).padStart(2, "0");
11895
+ return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`;
11896
+ }
11897
+ function humanize(s) {
11898
+ return s.replace(/_/g, " ");
11899
+ }
11900
+ function offsetText(days) {
11901
+ if (days === 0) return "same day as the fill";
11902
+ const n = Math.abs(days);
11903
+ return `${n} day${n === 1 ? "" : "s"} ${days > 0 ? "after" : "before"} the fill`;
11904
+ }
11905
+ function scheduleSteps(s, now = /* @__PURE__ */ new Date()) {
11906
+ const today = localYmd(now);
11907
+ const codes = new Set(s.notices.map((n) => n.code));
11908
+ const steps = [];
11909
+ const order = s.lastOrder;
11910
+ if (order.sentToPharmacyAt) {
11911
+ steps.push({
11912
+ key: "sent",
11913
+ label: "Sent to pharmacy",
11914
+ when: fmtDay2(order.sentToPharmacyAt),
11915
+ detail: null,
11916
+ tone: "success"
11917
+ });
11918
+ } else if (order.pharmacySendDate) {
11919
+ const late = codes.has("pharmacy_send_passed");
11920
+ steps.push({
11921
+ key: "sent",
11922
+ label: late ? "Was due at the pharmacy" : "Goes to the pharmacy",
11923
+ when: fmtCalendarDate(order.pharmacySendDate),
11924
+ detail: late ? "not sent yet" : null,
11925
+ tone: late ? "danger" : "info"
11926
+ });
11927
+ }
11928
+ if (order.shippedAt) {
11929
+ steps.push({
11930
+ key: "shipped",
11931
+ label: "Shipped",
11932
+ when: fmtDay2(order.shippedAt),
11933
+ detail: order.deliveryStatus ? humanize(order.deliveryStatus) : null,
11934
+ tone: "success"
11935
+ });
11936
+ } else if (order.requestId && s.status !== "request_created") {
11937
+ steps.push({
11938
+ key: "shipped",
11939
+ label: "Shipped",
11940
+ when: "Not yet",
11941
+ detail: null,
11942
+ tone: "neutral"
11943
+ });
11944
+ }
11945
+ if (s.nextFillDate) {
11946
+ steps.push({
11947
+ key: "fill",
11948
+ label: "Next fill due",
11949
+ when: fmtCalendarDate(s.nextFillDate),
11950
+ detail: [s.basedOn ? BASED_ON[s.basedOn] : "source not recorded", codes.has("fill_date_passed") ? "passed, refill not ordered yet" : null].filter(Boolean).join(" \xB7 "),
11951
+ tone: codes.has("fill_date_passed") ? "danger" : "info"
11952
+ });
11953
+ } else if (s.status === "awaiting_fill") {
11954
+ steps.push({
11955
+ key: "fill",
11956
+ label: "Next fill due",
11957
+ when: "Set when the order goes out",
11958
+ detail: null,
11959
+ tone: "neutral"
11960
+ });
11961
+ }
11962
+ if (s.checkInAt) {
11963
+ const opened = localYmd(new Date(s.checkInAt)) <= today;
11964
+ steps.push({
11965
+ key: "checkIn",
11966
+ label: opened ? "Check-in opened" : "Check-in opens",
11967
+ when: fmtDay2(s.checkInAt),
11968
+ detail: null,
11969
+ tone: opened ? "success" : "neutral"
11970
+ });
11971
+ }
11972
+ if (s.nextChargeAt) {
11973
+ steps.push({
11974
+ key: "charge",
11975
+ label: "Next charge",
11976
+ when: fmtDay2(s.nextChargeAt),
11977
+ detail: s.chargeOffsetDays === null ? null : offsetText(s.chargeOffsetDays),
11978
+ tone: "neutral"
11979
+ });
11980
+ }
11981
+ return steps;
11982
+ }
11983
+ function ScheduleStrip(props) {
11984
+ return createComponent(Show, {
11985
+ get when() {
11986
+ return props.schedule;
11987
+ },
11988
+ children: (s) => (() => {
11989
+ var _el$ = _tmpl$259(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
11990
+ insert(_el$4, (() => {
11991
+ var _c$ = memo(() => s().cycleNumber !== null);
11992
+ return () => _c$() ? `cycle ${s().cycleNumber + 1} \xB7 ` : "";
11993
+ })(), null);
11994
+ insert(_el$4, () => humanize(s().status), null);
11995
+ insert(_el$, createComponent(Show, {
11996
+ get when() {
11997
+ return scheduleSteps(s(), props.now).length > 0;
11998
+ },
11999
+ get children() {
12000
+ var _el$5 = _tmpl$188();
12001
+ insert(_el$5, createComponent(For, {
12002
+ get each() {
12003
+ return scheduleSteps(s(), props.now);
12004
+ },
12005
+ children: (step) => (() => {
12006
+ var _el$6 = _tmpl$434(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
12007
+ insert(_el$9, () => step.label, _el$0);
12008
+ insert(_el$1, () => step.when);
12009
+ insert(_el$8, createComponent(Show, {
12010
+ get when() {
12011
+ return step.detail;
12012
+ },
12013
+ get children() {
12014
+ var _el$10 = _tmpl$341();
12015
+ insert(_el$10, () => step.detail);
12016
+ return _el$10;
12017
+ }
12018
+ }), null);
12019
+ effect((_p$) => {
12020
+ var _v$ = step.key, _v$2 = `app-admin-timeline__dot app-admin-timeline__dot--${step.tone}`;
12021
+ _v$ !== _p$.e && setAttribute(_el$6, "data-step", _p$.e = _v$);
12022
+ _v$2 !== _p$.t && className(_el$7, _p$.t = _v$2);
12023
+ return _p$;
12024
+ }, {
12025
+ e: void 0,
12026
+ t: void 0
12027
+ });
12028
+ return _el$6;
12029
+ })()
12030
+ }));
12031
+ return _el$5;
12032
+ }
12033
+ }), null);
12034
+ insert(_el$, createComponent(For, {
12035
+ get each() {
12036
+ return extraNotices(s());
12037
+ },
12038
+ children: (n) => (() => {
12039
+ var _el$11 = _tmpl$529();
12040
+ insert(_el$11, () => n.message);
12041
+ effect((_p$) => {
12042
+ var _v$3 = PROBLEM_NOTICES.has(n.code) ? "alert" : void 0, _v$4 = {
12043
+ ...PROBLEM_NOTICES.has(n.code) ? {
12044
+ color: "var(--app-admin-danger-fg)"
12045
+ } : {}
12046
+ };
12047
+ _v$3 !== _p$.e && setAttribute(_el$11, "role", _p$.e = _v$3);
12048
+ _p$.t = style(_el$11, _v$4, _p$.t);
12049
+ return _p$;
12050
+ }, {
12051
+ e: void 0,
12052
+ t: void 0
12053
+ });
12054
+ return _el$11;
12055
+ })()
12056
+ }), null);
12057
+ return _el$;
12058
+ })()
12059
+ });
12060
+ }
11862
12061
 
11863
12062
  // src/pages/admin/customers/sections/SubscriptionCard.tsx
11864
- var _tmpl$188 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11865
- var _tmpl$259 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11866
- var _tmpl$341 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
11867
- var _tmpl$434 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">`);
11868
- var _tmpl$529 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
12063
+ var _tmpl$189 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
12064
+ var _tmpl$260 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
12065
+ var _tmpl$343 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
12066
+ var _tmpl$435 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">`);
12067
+ var _tmpl$530 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
11869
12068
  var _tmpl$626 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">`);
11870
12069
  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>`);
11871
12070
  var _tmpl$821 = /* @__PURE__ */ template(`<div style=margin-top:0.875rem><button type=button class=app-admin-link-btn> billing attempts (<!>)`);
11872
12071
  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>`);
11873
12072
  var _tmpl$015 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
11874
- var _tmpl$189 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
12073
+ var _tmpl$190 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11875
12074
  var _tmpl$1012 = /* @__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>`);
11876
12075
  function attemptTone(status) {
11877
12076
  if (status === "succeeded") return "success";
@@ -11894,7 +12093,7 @@ function SubscriptionCard(props) {
11894
12093
  return s().dosage;
11895
12094
  },
11896
12095
  get children() {
11897
- var _el$6 = _tmpl$188();
12096
+ var _el$6 = _tmpl$189();
11898
12097
  insert(_el$6, () => s().dosage);
11899
12098
  return _el$6;
11900
12099
  }
@@ -11912,7 +12111,7 @@ function SubscriptionCard(props) {
11912
12111
  },
11913
12112
  get children() {
11914
12113
  return [(() => {
11915
- var _el$0 = _tmpl$259();
12114
+ var _el$0 = _tmpl$260();
11916
12115
  _el$0.$$click = () => props.onEditAmount(s());
11917
12116
  effect((_p$) => {
11918
12117
  var _v$ = gateway(), _v$2 = gateway() ? "The gateway holds this price; move the subscription to platform billing first." : void 0;
@@ -11925,7 +12124,7 @@ function SubscriptionCard(props) {
11925
12124
  });
11926
12125
  return _el$0;
11927
12126
  })(), (() => {
11928
- var _el$1 = _tmpl$341();
12127
+ var _el$1 = _tmpl$343();
11929
12128
  _el$1.$$click = () => props.onEditSchedule(s());
11930
12129
  return _el$1;
11931
12130
  })()];
@@ -11936,7 +12135,7 @@ function SubscriptionCard(props) {
11936
12135
  return s().status === "active";
11937
12136
  },
11938
12137
  get children() {
11939
- var _el$10 = _tmpl$434();
12138
+ var _el$10 = _tmpl$435();
11940
12139
  _el$10.$$click = () => props.onPause(s());
11941
12140
  insert(_el$10, () => busy("pause") ? "Pausing\u2026" : "Pause");
11942
12141
  effect(() => _el$10.disabled = busy("pause"));
@@ -11948,7 +12147,7 @@ function SubscriptionCard(props) {
11948
12147
  return s().status === "paused";
11949
12148
  },
11950
12149
  get children() {
11951
- var _el$11 = _tmpl$529();
12150
+ var _el$11 = _tmpl$530();
11952
12151
  _el$11.$$click = () => props.onResume(s());
11953
12152
  insert(_el$11, () => busy("resume") ? "Resuming\u2026" : "Resume");
11954
12153
  effect(() => _el$11.disabled = busy("resume"));
@@ -12006,6 +12205,11 @@ function SubscriptionCard(props) {
12006
12205
  }].filter((i) => i.value !== null && i.value !== void 0);
12007
12206
  }
12008
12207
  }));
12208
+ insert(_el$, createComponent(ScheduleStrip, {
12209
+ get schedule() {
12210
+ return s().fillSchedule;
12211
+ }
12212
+ }), null);
12009
12213
  insert(_el$, createComponent(Show, {
12010
12214
  get when() {
12011
12215
  return attempts().length > 0;
@@ -12045,7 +12249,7 @@ function SubscriptionCard(props) {
12045
12249
  return a.status === "pending" || a.status === "indeterminate";
12046
12250
  },
12047
12251
  get children() {
12048
- var _el$32 = _tmpl$189();
12252
+ var _el$32 = _tmpl$190();
12049
12253
  _el$32.$$click = () => props.onResolveAttempt(s(), a);
12050
12254
  effect(() => _el$32.disabled = props.busy === `resolve-${a.id}`);
12051
12255
  return _el$32;
@@ -12067,11 +12271,11 @@ function SubscriptionCard(props) {
12067
12271
  })();
12068
12272
  }
12069
12273
  delegateEvents(["click"]);
12070
- var _tmpl$190 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
12071
- var _tmpl$260 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
12072
- var _tmpl$343 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No support conversations.`);
12073
- var _tmpl$435 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Open`);
12074
- var _tmpl$530 = /* @__PURE__ */ template(`<li style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><div style=min-width:0><div style=font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div class=app-admin-text-muted style=font-size:0.75rem></div></div><div style=display:flex;align-items:center;gap:0.375rem;flex-shrink:0>`);
12274
+ var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
12275
+ var _tmpl$261 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
12276
+ var _tmpl$344 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No support conversations.`);
12277
+ var _tmpl$436 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Open`);
12278
+ var _tmpl$531 = /* @__PURE__ */ template(`<li style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><div style=min-width:0><div style=font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div class=app-admin-text-muted style=font-size:0.75rem></div></div><div style=display:flex;align-items:center;gap:0.375rem;flex-shrink:0>`);
12075
12279
  var STATUS_WORD2 = {
12076
12280
  open: "needs reply",
12077
12281
  pending: "awaiting customer",
@@ -12085,10 +12289,10 @@ function SupportSummary(props) {
12085
12289
  return s().threadCount > 0;
12086
12290
  },
12087
12291
  get fallback() {
12088
- return _tmpl$343();
12292
+ return _tmpl$344();
12089
12293
  },
12090
12294
  get children() {
12091
- var _el$ = _tmpl$260(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
12295
+ var _el$ = _tmpl$261(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
12092
12296
  insert(_el$2, () => s().threadCount, _el$3);
12093
12297
  insert(_el$2, () => s().threadCount === 1 ? "" : "s", null);
12094
12298
  insert(_el$2, createComponent(Show, {
@@ -12104,7 +12308,7 @@ function SupportSummary(props) {
12104
12308
  return s().threads;
12105
12309
  },
12106
12310
  children: (t) => (() => {
12107
- var _el$0 = _tmpl$530(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
12311
+ var _el$0 = _tmpl$531(), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$1.nextSibling;
12108
12312
  insert(_el$10, () => t.subject || "No subject");
12109
12313
  insert(_el$11, () => STATUS_WORD2[t.status] ?? t.status, null);
12110
12314
  insert(_el$11, createComponent(Show, {
@@ -12154,7 +12358,7 @@ function SupportSummary(props) {
12154
12358
  });
12155
12359
  },
12156
12360
  get children() {
12157
- var _el$13 = _tmpl$435();
12361
+ var _el$13 = _tmpl$436();
12158
12362
  _el$13.$$click = () => props.onOpenThread(t.id);
12159
12363
  return _el$13;
12160
12364
  }
@@ -12168,7 +12372,7 @@ function SupportSummary(props) {
12168
12372
  return s().threadCount > s().threads.length;
12169
12373
  },
12170
12374
  get children() {
12171
- var _el$5 = _tmpl$190(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
12375
+ var _el$5 = _tmpl$191(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
12172
12376
  insert(_el$5, () => s().threads.length, _el$8);
12173
12377
  return _el$5;
12174
12378
  }
@@ -12185,17 +12389,17 @@ function adminCan(permission) {
12185
12389
  }
12186
12390
 
12187
12391
  // src/pages/admin/customers/CustomerDetail.tsx
12188
- var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
12189
- var _tmpl$261 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
12190
- var _tmpl$344 = /* @__PURE__ */ template(`<div style=text-align:center><button type=button class=app-admin-link-btn>Try again`);
12191
- var _tmpl$436 = /* @__PURE__ */ template(`<p class=app-admin-notice style=margin:0>Some sections did not load (<!>). <button type=button class=app-admin-link-btn>Reload`);
12192
- var _tmpl$531 = /* @__PURE__ */ template(`<div class=app-admin-alerts data-testid=customer-attention>`);
12392
+ var _tmpl$198 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
12393
+ var _tmpl$266 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
12394
+ var _tmpl$345 = /* @__PURE__ */ template(`<div style=text-align:center><button type=button class=app-admin-link-btn>Try again`);
12395
+ var _tmpl$437 = /* @__PURE__ */ template(`<p class=app-admin-notice style=margin:0>Some sections did not load (<!>). <button type=button class=app-admin-link-btn>Reload`);
12396
+ var _tmpl$532 = /* @__PURE__ */ template(`<div class=app-admin-alerts data-testid=customer-attention>`);
12193
12397
  var _tmpl$627 = /* @__PURE__ */ template(`<span style=display:inline-flex;align-items:center;gap:0.5rem><input type=email aria-label="Customer email"class=app-admin-input style="width:16rem;padding:0.25rem 0.625rem"><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
12194
12398
  var _tmpl$725 = /* @__PURE__ */ template(`<span>`);
12195
12399
  var _tmpl$822 = /* @__PURE__ */ template(`<span>Joined `);
12196
12400
  var _tmpl$919 = /* @__PURE__ */ template(`<span style=display:inline-flex;align-items:center;gap:0.5rem><span></span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"style="padding:0.1rem 0.5rem">Edit`);
12197
12401
  var _tmpl$016 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Savings member`);
12198
- var _tmpl$198 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
12402
+ var _tmpl$199 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
12199
12403
  var _tmpl$1013 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">`);
12200
12404
  var _tmpl$1115 = /* @__PURE__ */ template(`<div class=app-admin-section-stack>`);
12201
12405
  var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>Older requests are shown from stored status only.`);
@@ -12205,7 +12409,7 @@ var _tmpl$1510 = /* @__PURE__ */ template(`<button type=button class="app-admin-
12205
12409
  var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>`);
12206
12410
  var _tmpl$1710 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Items></td><td data-label=Total></td><td data-label=Status>`);
12207
12411
  var _tmpl$1810 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>`);
12208
- var _tmpl$199 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
12412
+ var _tmpl$1910 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
12209
12413
  var _tmpl$207 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.875rem>The <!> charge for period <!> is <strong></strong>. Check the gateway for this transaction before choosing.`);
12210
12414
  var _tmpl$2113 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost">The gateway did not capture it: mark failed so billing retries</button><button type=button class="app-admin-btn app-admin-btn-ghost">The gateway captured it: mark succeeded`);
12211
12415
  var TIMELINE_PREVIEW = 30;
@@ -12481,7 +12685,7 @@ function CustomerDetail(props) {
12481
12685
  };
12482
12686
  const pendingRequests = () => (o()?.requests.items ?? []).filter((r) => r.status === "pending");
12483
12687
  return (() => {
12484
- var _el$ = _tmpl$191();
12688
+ var _el$ = _tmpl$198();
12485
12689
  insert(_el$, createComponent(Show, {
12486
12690
  get when() {
12487
12691
  return !overview.loading;
@@ -12496,7 +12700,7 @@ function CustomerDetail(props) {
12496
12700
  },
12497
12701
  get fallback() {
12498
12702
  return [(() => {
12499
- var _el$2 = _tmpl$261();
12703
+ var _el$2 = _tmpl$266();
12500
12704
  addEventListener(_el$2, "click", props.onBack, true);
12501
12705
  return _el$2;
12502
12706
  })(), createComponent(EmptyState, {
@@ -12504,7 +12708,7 @@ function CustomerDetail(props) {
12504
12708
  return loadError() ?? "This customer could not be loaded.";
12505
12709
  }
12506
12710
  }), (() => {
12507
- var _el$3 = _tmpl$344(), _el$4 = _el$3.firstChild;
12711
+ var _el$3 = _tmpl$345(), _el$4 = _el$3.firstChild;
12508
12712
  _el$4.$$click = () => refetch();
12509
12713
  return _el$3;
12510
12714
  })()];
@@ -12592,7 +12796,7 @@ function CustomerDetail(props) {
12592
12796
  });
12593
12797
  }
12594
12798
  }), (() => {
12595
- var _el$21 = _tmpl$198();
12799
+ var _el$21 = _tmpl$199();
12596
12800
  insert(_el$21, reason);
12597
12801
  return _el$21;
12598
12802
  })()];
@@ -12616,7 +12820,7 @@ function CustomerDetail(props) {
12616
12820
  return ov().partial.length > 0;
12617
12821
  },
12618
12822
  get children() {
12619
- var _el$5 = _tmpl$436(), _el$6 = _el$5.firstChild, _el$0 = _el$6.nextSibling, _el$7 = _el$0.nextSibling, _el$9 = _el$7.nextSibling;
12823
+ var _el$5 = _tmpl$437(), _el$6 = _el$5.firstChild, _el$0 = _el$6.nextSibling, _el$7 = _el$0.nextSibling, _el$9 = _el$7.nextSibling;
12620
12824
  insert(_el$5, () => ov().partial.join(", "), _el$0);
12621
12825
  _el$9.$$click = () => refetch();
12622
12826
  return _el$5;
@@ -12626,7 +12830,7 @@ function CustomerDetail(props) {
12626
12830
  return attention().length > 0;
12627
12831
  },
12628
12832
  get children() {
12629
- var _el$1 = _tmpl$531();
12833
+ var _el$1 = _tmpl$532();
12630
12834
  insert(_el$1, createComponent(For, {
12631
12835
  get each() {
12632
12836
  return attention();
@@ -12894,7 +13098,7 @@ function CustomerDetail(props) {
12894
13098
  return timeline().length > 0;
12895
13099
  },
12896
13100
  get fallback() {
12897
- return _tmpl$199();
13101
+ return _tmpl$1910();
12898
13102
  },
12899
13103
  get children() {
12900
13104
  return createComponent(Timeline, {
@@ -13007,10 +13211,10 @@ function CustomerDetail(props) {
13007
13211
  }
13008
13212
  delegateEvents(["click", "input"]);
13009
13213
  var _tmpl$200 = /* @__PURE__ */ template(`<label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Savings members only`);
13010
- var _tmpl$266 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
13011
- var _tmpl$345 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Customer</th><th>Status</th><th>Plan</th><th>Prescription</th><th>Last activity</th><th>Joined</th></tr></thead><tbody>`);
13012
- var _tmpl$437 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class=app-admin-link-btn>Retry`);
13013
- var _tmpl$532 = /* @__PURE__ */ template(`<div><div style=display:flex;flex-direction:column;gap:0.875rem;margin-bottom:1.25rem><div style=max-width:28rem><input type=search placeholder="Search by name or email"aria-label="Search customers"class=app-admin-input></div><div class=app-admin-chips role=group aria-label="Filter by status"></div><div style=display:flex;flex-wrap:wrap;gap:1rem;font-size:0.8125rem;color:var(--app-admin-fg-muted)><label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Never completed intake`);
13214
+ var _tmpl$267 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
13215
+ var _tmpl$346 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Customer</th><th>Status</th><th>Plan</th><th>Prescription</th><th>Last activity</th><th>Joined</th></tr></thead><tbody>`);
13216
+ var _tmpl$438 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class=app-admin-link-btn>Retry`);
13217
+ var _tmpl$533 = /* @__PURE__ */ template(`<div><div style=display:flex;flex-direction:column;gap:0.875rem;margin-bottom:1.25rem><div style=max-width:28rem><input type=search placeholder="Search by name or email"aria-label="Search customers"class=app-admin-input></div><div class=app-admin-chips role=group aria-label="Filter by status"></div><div style=display:flex;flex-wrap:wrap;gap:1rem;font-size:0.8125rem;color:var(--app-admin-fg-muted)><label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Never completed intake`);
13014
13218
  var _tmpl$628 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.8125rem>`);
13015
13219
  var _tmpl$726 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>`);
13016
13220
  var _tmpl$823 = /* @__PURE__ */ template(`<span style=text-transform:capitalize>`);
@@ -13125,7 +13329,7 @@ function CustomerList(props) {
13125
13329
  };
13126
13330
  const showSavingsToggle = () => savingsOnly() || rows().some((r) => r.facts?.isSavingsMember);
13127
13331
  return (() => {
13128
- var _el$ = _tmpl$532(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.nextSibling, _el$9 = _el$6.firstChild, _el$0 = _el$9.firstChild;
13332
+ var _el$ = _tmpl$533(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$3.nextSibling, _el$6 = _el$5.nextSibling, _el$9 = _el$6.firstChild, _el$0 = _el$9.firstChild;
13129
13333
  insert(_el$, createComponent(PageTitle, {
13130
13334
  subtitle: "Every account on this site, with where each one is in the journey.",
13131
13335
  children: "Customers"
@@ -13176,7 +13380,7 @@ function CustomerList(props) {
13176
13380
  return createComponent(LoadingSpinner, {});
13177
13381
  },
13178
13382
  get children() {
13179
- var _el$1 = _tmpl$345(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
13383
+ var _el$1 = _tmpl$346(), _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
13180
13384
  insert(_el$13, createComponent(For, {
13181
13385
  get each() {
13182
13386
  return rows();
@@ -13265,7 +13469,7 @@ function CustomerList(props) {
13265
13469
  return hasMore();
13266
13470
  },
13267
13471
  get children() {
13268
- var _el$14 = _tmpl$266(), _el$15 = _el$14.firstChild;
13472
+ var _el$14 = _tmpl$267(), _el$15 = _el$14.firstChild;
13269
13473
  _el$15.$$click = loadMore;
13270
13474
  insert(_el$15, () => loadingMore() ? "Loading\u2026" : "Load more");
13271
13475
  effect(() => _el$15.disabled = loadingMore());
@@ -13280,7 +13484,7 @@ function CustomerList(props) {
13280
13484
  return page.error;
13281
13485
  },
13282
13486
  get children() {
13283
- var _el$16 = _tmpl$437(), _el$17 = _el$16.firstChild;
13487
+ var _el$16 = _tmpl$438(), _el$17 = _el$16.firstChild;
13284
13488
  _el$17.$$click = () => refetch();
13285
13489
  return _el$16;
13286
13490
  }
@@ -13378,10 +13582,10 @@ function Customers(props = {}) {
13378
13582
  });
13379
13583
  }
13380
13584
  var _tmpl$201 = /* @__PURE__ */ template(`<div data-testid=admin-stats style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
13381
- var _tmpl$267 = /* @__PURE__ */ template(`<div>`);
13382
- var _tmpl$346 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
13383
- var _tmpl$438 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
13384
- var _tmpl$533 = /* @__PURE__ */ template(`<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));padding:1rem 1.25rem">`);
13585
+ var _tmpl$268 = /* @__PURE__ */ template(`<div>`);
13586
+ var _tmpl$347 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
13587
+ var _tmpl$439 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
13588
+ var _tmpl$534 = /* @__PURE__ */ template(`<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));padding:1rem 1.25rem">`);
13385
13589
  var _tmpl$629 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Paying</th><th>Subscribers</th><th style=text-align:right>Monthly equiv.</th><th style=width:40%>Share of MRR</th></tr></thead><tbody>`);
13386
13590
  var _tmpl$727 = /* @__PURE__ */ template(`<p style="margin:0;padding:0.75rem 1.25rem;font-size:0.75rem;color:var(--app-admin-fg-subtle)">Active, non-test subscriptions at what they're charged now, after discounts. Other billing cycles are converted to a 30-day month.`);
13387
13591
  var _tmpl$824 = /* @__PURE__ */ template(`<div data-testid=admin-recurring-revenue style=margin-top:1.5rem>`);
@@ -13436,7 +13640,7 @@ function Dashboard(props) {
13436
13640
  ];
13437
13641
  };
13438
13642
  return (() => {
13439
- var _el$ = _tmpl$267();
13643
+ var _el$ = _tmpl$268();
13440
13644
  insert(_el$, createComponent(PageTitle, {
13441
13645
  children: "Dashboard"
13442
13646
  }), null);
@@ -13489,11 +13693,11 @@ function Dashboard(props) {
13489
13693
  },
13490
13694
  get children() {
13491
13695
  return [(() => {
13492
- var _el$3 = _tmpl$346();
13696
+ var _el$3 = _tmpl$347();
13493
13697
  insert(_el$3, () => card.label);
13494
13698
  return _el$3;
13495
13699
  })(), (() => {
13496
- var _el$4 = _tmpl$438();
13700
+ var _el$4 = _tmpl$439();
13497
13701
  insert(_el$4, () => card.value);
13498
13702
  effect((_$p) => setStyleProperty(_el$4, "color", card.tint));
13499
13703
  return _el$4;
@@ -13540,7 +13744,7 @@ function RecurringRevenue(props) {
13540
13744
  flush: true,
13541
13745
  get children() {
13542
13746
  return [(() => {
13543
- var _el$6 = _tmpl$533();
13747
+ var _el$6 = _tmpl$534();
13544
13748
  insert(_el$6, createComponent(For, {
13545
13749
  get each() {
13546
13750
  return totals();
@@ -13588,8 +13792,8 @@ function RecurringRevenue(props) {
13588
13792
  })();
13589
13793
  }
13590
13794
  var _tmpl$208 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
13591
- var _tmpl$268 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13592
- var _tmpl$347 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
13795
+ var _tmpl$269 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13796
+ var _tmpl$348 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
13593
13797
  function QuickBooksCard() {
13594
13798
  const [status, {
13595
13799
  refetch
@@ -13627,13 +13831,13 @@ function QuickBooksCard() {
13627
13831
  return status()?.provider === "quickbooks";
13628
13832
  },
13629
13833
  get children() {
13630
- var _el$ = _tmpl$268(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13834
+ var _el$ = _tmpl$269(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13631
13835
  insert(_el$2, createComponent(Show, {
13632
13836
  get when() {
13633
13837
  return status()?.connected;
13634
13838
  },
13635
13839
  get fallback() {
13636
- return _tmpl$347();
13840
+ return _tmpl$348();
13637
13841
  },
13638
13842
  get children() {
13639
13843
  var _el$4 = _tmpl$208(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
@@ -13659,10 +13863,10 @@ delegateEvents(["click"]);
13659
13863
 
13660
13864
  // src/pages/admin/Payments.tsx
13661
13865
  var _tmpl$209 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
13662
- var _tmpl$269 = /* @__PURE__ */ template(`<div>`);
13663
- var _tmpl$348 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
13664
- var _tmpl$439 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
13665
- var _tmpl$534 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
13866
+ var _tmpl$270 = /* @__PURE__ */ template(`<div>`);
13867
+ var _tmpl$349 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
13868
+ var _tmpl$440 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
13869
+ var _tmpl$535 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
13666
13870
  var _tmpl$630 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">`);
13667
13871
  var _tmpl$728 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Customer style=font-weight:500></td><td data-label=Amount></td><td data-label=Status></td><td data-label="Transaction ID"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Actions>`);
13668
13872
  function Payments() {
@@ -13741,7 +13945,7 @@ function Payments() {
13741
13945
  };
13742
13946
  const refundable = (p) => p.status === "succeeded" && refundableCents(p) > 0;
13743
13947
  return (() => {
13744
- var _el$ = _tmpl$269();
13948
+ var _el$ = _tmpl$270();
13745
13949
  insert(_el$, createComponent(PageTitle, {
13746
13950
  children: "Payments"
13747
13951
  }), null);
@@ -13770,7 +13974,7 @@ function Payments() {
13770
13974
  return payment.customerEmail;
13771
13975
  },
13772
13976
  get children() {
13773
- var _el$15 = _tmpl$348();
13977
+ var _el$15 = _tmpl$349();
13774
13978
  _el$15.$$click = () => nav.openCustomer(payment.customerUid);
13775
13979
  insert(_el$15, () => payment.customerEmail);
13776
13980
  return _el$15;
@@ -13782,7 +13986,7 @@ function Payments() {
13782
13986
  return memo(() => (payment.refundedAmountCents ?? 0) > 0)() && payment.status !== "refunded";
13783
13987
  },
13784
13988
  get children() {
13785
- var _el$17 = _tmpl$439(), _el$18 = _el$17.firstChild;
13989
+ var _el$17 = _tmpl$440(), _el$18 = _el$17.firstChild;
13786
13990
  insert(_el$17, () => centsToUsd(payment.refundedAmountCents), _el$18);
13787
13991
  return _el$17;
13788
13992
  }
@@ -13809,7 +14013,7 @@ function Payments() {
13809
14013
  return payment.failureReason;
13810
14014
  },
13811
14015
  get children() {
13812
- var _el$20 = _tmpl$534();
14016
+ var _el$20 = _tmpl$535();
13813
14017
  insert(_el$20, () => payment.failureReason);
13814
14018
  return _el$20;
13815
14019
  }
@@ -13901,11 +14105,11 @@ function clearApexDrugCache() {
13901
14105
  cache = null;
13902
14106
  inflight = null;
13903
14107
  }
13904
- var _tmpl$270 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
13905
- var _tmpl$271 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
13906
- var _tmpl$349 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows>`);
13907
- var _tmpl$440 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
13908
- var _tmpl$535 = /* @__PURE__ */ template(`<form><div class=app-admin-popover-title>Price</div><label class=app-admin-label for=admin-cell-price-base></label><input id=admin-cell-price-base type=number step=0.01 min=0 inputmode=decimal class=app-admin-input><div class=app-admin-popover-actions><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
14108
+ var _tmpl$271 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
14109
+ var _tmpl$276 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
14110
+ var _tmpl$350 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows>`);
14111
+ var _tmpl$441 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
14112
+ var _tmpl$536 = /* @__PURE__ */ template(`<form><div class=app-admin-popover-title>Price</div><label class=app-admin-label for=admin-cell-price-base></label><input id=admin-cell-price-base type=number step=0.01 min=0 inputmode=decimal class=app-admin-input><div class=app-admin-popover-actions><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
13909
14113
  var _tmpl$631 = /* @__PURE__ */ template(`<label class=app-admin-popover-row><span></span><input type=number step=0.01 min=0 inputmode=decimal class=app-admin-input>`);
13910
14114
  var _tmpl$729 = /* @__PURE__ */ template(`<div class=app-admin-popover-title>Categories`);
13911
14115
  var _tmpl$825 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows role=group aria-label="Assigned categories">`);
@@ -13976,7 +14180,7 @@ function CellPopover(props) {
13976
14180
  return createComponent(Portal, {
13977
14181
  mount,
13978
14182
  get children() {
13979
- var _el$ = _tmpl$270();
14183
+ var _el$ = _tmpl$271();
13980
14184
  _el$.$$click = (e) => e.stopPropagation();
13981
14185
  var _ref$ = card;
13982
14186
  typeof _ref$ === "function" ? use(_ref$, _el$) : card = _el$;
@@ -14097,7 +14301,7 @@ function PricePopover(props) {
14097
14301
  return props.onClose;
14098
14302
  },
14099
14303
  get children() {
14100
- var _el$2 = _tmpl$535(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$9 = _el$5.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
14304
+ var _el$2 = _tmpl$536(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$9 = _el$5.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
14101
14305
  _el$2.addEventListener("submit", (e) => {
14102
14306
  e.preventDefault();
14103
14307
  void save();
@@ -14109,8 +14313,8 @@ function PricePopover(props) {
14109
14313
  return memo(() => !!perDose())() && rows().length > 0;
14110
14314
  },
14111
14315
  get children() {
14112
- return [_tmpl$271(), (() => {
14113
- var _el$7 = _tmpl$349();
14316
+ return [_tmpl$276(), (() => {
14317
+ var _el$7 = _tmpl$350();
14114
14318
  insert(_el$7, createComponent(For, {
14115
14319
  get each() {
14116
14320
  return rows();
@@ -14136,7 +14340,7 @@ function PricePopover(props) {
14136
14340
  return error();
14137
14341
  },
14138
14342
  get children() {
14139
- var _el$8 = _tmpl$440();
14343
+ var _el$8 = _tmpl$441();
14140
14344
  insert(_el$8, error);
14141
14345
  return _el$8;
14142
14346
  }
@@ -14250,7 +14454,7 @@ function CategoriesPopover(props) {
14250
14454
  return error();
14251
14455
  },
14252
14456
  get children() {
14253
- var _el$20 = _tmpl$440();
14457
+ var _el$20 = _tmpl$441();
14254
14458
  insert(_el$20, error);
14255
14459
  return _el$20;
14256
14460
  }
@@ -14267,11 +14471,11 @@ function CategoriesPopover(props) {
14267
14471
  });
14268
14472
  }
14269
14473
  delegateEvents(["click", "input"]);
14270
- var _tmpl$276 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Add pharmacy`);
14271
- var _tmpl$277 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>We couldn't load the list of pharmacy drugs. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
14272
- var _tmpl$350 = /* @__PURE__ */ template(`<form class=app-admin-catalog-row aria-label="Add a pharmacy"style=margin-top:0.75rem><div><label class=app-admin-label for=add-pharmacy-filter>Find a drug</label><input id=add-pharmacy-filter type=search class=app-admin-input placeholder="Search by drug or pharmacy"></div><div><label class=app-admin-label for=add-pharmacy-drug>Pharmacy drug</label><select id=add-pharmacy-drug class=app-admin-input><option value></option></select><p style="margin:0.375rem 0 0">A drug can only be used at its own pharmacy, and a pharmacy this product already has isn't offered again.</p></div><div class=app-admin-catalog-row__controls><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Continue</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
14273
- var _tmpl$441 = /* @__PURE__ */ template(`<optgroup>`);
14274
- var _tmpl$536 = /* @__PURE__ */ template(`<option>`);
14474
+ var _tmpl$277 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Add pharmacy`);
14475
+ var _tmpl$278 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>We couldn't load the list of pharmacy drugs. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
14476
+ var _tmpl$351 = /* @__PURE__ */ template(`<form class=app-admin-catalog-row aria-label="Add a pharmacy"style=margin-top:0.75rem><div><label class=app-admin-label for=add-pharmacy-filter>Find a drug</label><input id=add-pharmacy-filter type=search class=app-admin-input placeholder="Search by drug or pharmacy"></div><div><label class=app-admin-label for=add-pharmacy-drug>Pharmacy drug</label><select id=add-pharmacy-drug class=app-admin-input><option value></option></select><p style="margin:0.375rem 0 0">A drug can only be used at its own pharmacy, and a pharmacy this product already has isn't offered again.</p></div><div class=app-admin-catalog-row__controls><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Continue</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
14477
+ var _tmpl$442 = /* @__PURE__ */ template(`<optgroup>`);
14478
+ var _tmpl$537 = /* @__PURE__ */ template(`<option>`);
14275
14479
  var _tmpl$632 = /* @__PURE__ */ template(`<strong>`);
14276
14480
  var _tmpl$730 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
14277
14481
  var _tmpl$826 = /* @__PURE__ */ template(`<div><span>`);
@@ -14287,7 +14491,7 @@ var _tmpl$1511 = /* @__PURE__ */ template(`<div class=app-admin-convert data-tes
14287
14491
  var _tmpl$1611 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
14288
14492
  var _tmpl$1711 = /* @__PURE__ */ template(`<div data-testid=add-pharmacy-notice><span>`);
14289
14493
  var _tmpl$1811 = /* @__PURE__ */ template(`<tr><td data-label=Strength></td><td data-label=Now class=app-admin-table-cell--num></td><td data-label="After saving"class=app-admin-table-cell--num><strong>`);
14290
- var _tmpl$1910 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=add-pharmacy-match-row>`);
14494
+ var _tmpl$1911 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=add-pharmacy-match-row>`);
14291
14495
  var _tmpl$2010 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>Enter a price for <!>.`);
14292
14496
  var _tmpl$2114 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>Enter the member price as an amount, or leave it blank.`);
14293
14497
  var _tmpl$2211 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=add-pharmacy-price-row><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__title><strong></strong></span><div class=app-admin-catalog-row__controls><input type=number step=0.01 min=0 inputmode=decimal class=app-admin-input placeholder=Price style=width:7rem;min-width:0><input type=number step=0.01 min=0 inputmode=decimal class=app-admin-input placeholder="Member price"style=width:9rem;min-width:0>`);
@@ -14295,7 +14499,7 @@ var _tmpl$2310 = /* @__PURE__ */ template(`<button type=button class="app-admin-
14295
14499
  var _tmpl$2410 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">Add pharmacy`);
14296
14500
  var _tmpl$2510 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Close`);
14297
14501
  var _tmpl$2610 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Choose a different pharmacy`);
14298
- var _tmpl$278 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Start over`);
14502
+ var _tmpl$279 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Start over`);
14299
14503
  var _tmpl$285 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">Check again`);
14300
14504
  var _tmpl$295 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">Try again`);
14301
14505
  var _tmpl$304 = /* @__PURE__ */ template(`<div data-testid=add-pharmacy-confirm><p style=margin:0>Add <strong></strong> to <!>?</p><p style="margin:0.5rem 0 0">Its strengths and prices stay as they are. New prescriptions go to the first pharmacy in the list that can fill them.`);
@@ -14318,7 +14522,7 @@ var hint2 = {
14318
14522
  var UNSAVED_HINT = "Save or discard your changes first.";
14319
14523
  function AddPharmacyButton(props) {
14320
14524
  return (() => {
14321
- var _el$ = _tmpl$276();
14525
+ var _el$ = _tmpl$277();
14322
14526
  _el$.$$click = () => props.flow.state().kind === "picking" ? props.flow.cancel() : props.flow.open();
14323
14527
  effect((_p$) => {
14324
14528
  var _v$ = props.disabled || props.unsaved || props.flow.busy(), _v$2 = props.flow.state().kind === "picking", _v$3 = props.describedBy;
@@ -14347,7 +14551,7 @@ function AddPharmacyPicker(props) {
14347
14551
  const optionLabel = (d) => props.classification && d.classification !== props.classification ? `${d.name} (${d.classification} \u2014 mismatched)` : d.name;
14348
14552
  const none = () => flow.drugsStatus() === "ready" && groups().length === 0 && filter().trim() === "";
14349
14553
  return (() => {
14350
- var _el$2 = _tmpl$350(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$8.nextSibling, _el$13 = _el$6.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
14554
+ var _el$2 = _tmpl$351(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$8.nextSibling, _el$13 = _el$6.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
14351
14555
  _el$2.addEventListener("submit", (e) => {
14352
14556
  e.preventDefault();
14353
14557
  void flow.plan();
@@ -14363,13 +14567,13 @@ function AddPharmacyPicker(props) {
14363
14567
  return groups();
14364
14568
  },
14365
14569
  children: (g) => (() => {
14366
- var _el$16 = _tmpl$441();
14570
+ var _el$16 = _tmpl$442();
14367
14571
  insert(_el$16, createComponent(For, {
14368
14572
  get each() {
14369
14573
  return g.drugs;
14370
14574
  },
14371
14575
  children: (d) => (() => {
14372
- var _el$17 = _tmpl$536();
14576
+ var _el$17 = _tmpl$537();
14373
14577
  insert(_el$17, () => optionLabel(d));
14374
14578
  effect(() => _el$17.value = d.id);
14375
14579
  return _el$17;
@@ -14384,7 +14588,7 @@ function AddPharmacyPicker(props) {
14384
14588
  return flow.drugsStatus() === "failed";
14385
14589
  },
14386
14590
  get children() {
14387
- var _el$1 = _tmpl$277(), _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling;
14591
+ var _el$1 = _tmpl$278(), _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling;
14388
14592
  _el$12.$$click = () => flow.backToPicking();
14389
14593
  return _el$1;
14390
14594
  }
@@ -14482,7 +14686,7 @@ function MatchQuestion(props) {
14482
14686
  return props.options;
14483
14687
  },
14484
14688
  children: (o) => (() => {
14485
- var _el$37 = _tmpl$536();
14689
+ var _el$37 = _tmpl$537();
14486
14690
  insert(_el$37, () => o.label);
14487
14691
  effect(() => _el$37.selected = answer() === o.doseId);
14488
14692
  effect(() => _el$37.value = o.doseId);
@@ -14639,7 +14843,7 @@ function Review(props) {
14639
14843
  return p().matchQuestions;
14640
14844
  },
14641
14845
  children: (q) => (() => {
14642
- var _el$74 = _tmpl$1910();
14846
+ var _el$74 = _tmpl$1911();
14643
14847
  insert(_el$74, createComponent(MatchQuestion, {
14644
14848
  flow,
14645
14849
  get question() {
@@ -14826,7 +15030,7 @@ function AddPharmacyDialog(props) {
14826
15030
  },
14827
15031
  get children() {
14828
15032
  return [(() => {
14829
- var _el$92 = _tmpl$278();
15033
+ var _el$92 = _tmpl$279();
14830
15034
  _el$92.$$click = () => void flow.startOver();
14831
15035
  return _el$92;
14832
15036
  })(), (() => {
@@ -15059,11 +15263,11 @@ function SinglePharmacySection(props) {
15059
15263
  delegateEvents(["click", "input"]);
15060
15264
 
15061
15265
  // src/pages/admin/ProductCatalogSections.tsx
15062
- var _tmpl$279 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
15063
- var _tmpl$280 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
15064
- var _tmpl$351 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=catalog-read-only><span><strong>Strengths and pharmacies are read-only right now.</strong> <!> Prices and product details can still be edited.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
15065
- var _tmpl$442 = /* @__PURE__ */ template(`<p data-testid=catalog-stored-prices>Showing the prices on file. Which strengths are currently offered can't be checked until the prescribing platform answers.`);
15066
- var _tmpl$537 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
15266
+ var _tmpl$280 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
15267
+ var _tmpl$281 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
15268
+ var _tmpl$354 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=catalog-read-only><span><strong>Strengths and pharmacies are read-only right now.</strong> <!> Prices and product details can still be edited.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
15269
+ var _tmpl$443 = /* @__PURE__ */ template(`<p data-testid=catalog-stored-prices>Showing the prices on file. Which strengths are currently offered can't be checked until the prescribing platform answers.`);
15270
+ var _tmpl$538 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
15067
15271
  var _tmpl$633 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-value>Value</label><input id=catalog-add-value type=number step=any min=0 class=app-admin-input placeholder=2.5>`);
15068
15272
  var _tmpl$731 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-unit>Unit</label><input id=catalog-add-unit type=text class=app-admin-input placeholder=mg>`);
15069
15273
  var _tmpl$827 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-add-price>Price ($)</label><input id=catalog-add-price type=number step=0.01 min=0 inputmode=decimal class=app-admin-input placeholder=optional>`);
@@ -15079,7 +15283,7 @@ var _tmpl$1512 = /* @__PURE__ */ template(`<span class=app-admin-text-muted styl
15079
15283
  var _tmpl$1612 = /* @__PURE__ */ template(`<input type=number step=0.01 min=0 inputmode=decimal>`);
15080
15284
  var _tmpl$1712 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger app-admin-btn-sm">Remove`);
15081
15285
  var _tmpl$1812 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>Enter a price of 0 or more.`);
15082
- var _tmpl$1911 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__title><span></span></span><div class=app-admin-catalog-row__controls>`);
15286
+ var _tmpl$1912 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__title><span></span></span><div class=app-admin-catalog-row__controls>`);
15083
15287
  var _tmpl$2011 = /* @__PURE__ */ template(`<p style=margin:0>Strengths the mapped pharmacies already carry that aren't offered yet. They're added unpriced.`);
15084
15288
  var _tmpl$2115 = /* @__PURE__ */ template(`<div><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Add selected`);
15085
15289
  var _tmpl$2212 = /* @__PURE__ */ template(`<div class=app-admin-catalog-row aria-label="Suggested strengths"style=margin-top:0.75rem>`);
@@ -15095,7 +15299,7 @@ var _tmpl$3112 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-problems
15095
15299
  var _tmpl$3211 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__rank aria-hidden=true></span><span class=app-admin-catalog-row__title><strong></strong><span class=app-admin-text-muted></span><span class=app-admin-sr-only>Preference </span></span><div class=app-admin-catalog-row__controls><label class=app-admin-catalog-toggle><input type=checkbox role=switch>Active</label><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"><span aria-hidden=true>\u2191</span></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"><span aria-hidden=true>\u2193</span></button><button type=button class="app-admin-btn app-admin-btn-danger app-admin-btn-sm">Remove</button></div></div><div class=app-admin-catalog-chips><span class=app-admin-text-muted style=font-size:0.75rem>Excluded states:</span><select class=app-admin-input value style="width:auto;padding:0.125rem 0.375rem;font-size:0.75rem"><option value>Exclude a state\u2026`);
15096
15300
  var _tmpl$3311 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>none`);
15097
15301
  var _tmpl$3411 = /* @__PURE__ */ template(`<span class=app-admin-catalog-chip><button type=button>\xD7`);
15098
- var _tmpl$354 = /* @__PURE__ */ template(`<option>`);
15302
+ var _tmpl$355 = /* @__PURE__ */ template(`<option>`);
15099
15303
  var _tmpl$364 = /* @__PURE__ */ template(`<li>`);
15100
15304
  var _tmpl$373 = /* @__PURE__ */ template(`<div class=app-admin-catalog-chips>`);
15101
15305
  var _tmpl$383 = /* @__PURE__ */ template(`<p style=margin:0>Suggestion only \u2014 pick one to start adding it; nothing is added until you confirm. `);
@@ -15104,7 +15308,7 @@ var _tmpl$403 = /* @__PURE__ */ template(`<p style=margin:0>No name-based matche
15104
15308
  var _tmpl$4110 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"> (<!>)`);
15105
15309
  var _tmpl$4210 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status style=margin-bottom:0.75rem><ul class=app-admin-catalog-problems>`);
15106
15310
  var _tmpl$4310 = /* @__PURE__ */ template(`<div class=app-admin-catalog-matrix-wrap><table class=app-admin-catalog-matrix aria-label="Which pharmacy can make which strength"><thead><tr><th scope=col>Strength</th></tr></thead><tbody>`);
15107
- var _tmpl$443 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-problems style=margin-top:0.625rem;color:var(--app-admin-danger-fg)>`);
15311
+ var _tmpl$444 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-problems style=margin-top:0.625rem;color:var(--app-admin-danger-fg)>`);
15108
15312
  var _tmpl$452 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block aria-labelledby=catalog-readiness-title><div class=app-admin-catalog-block__head><h3 class=app-admin-label id=catalog-readiness-title style=margin:0>Readiness</h3></div><p>Whether each pharmacy can actually make each strength \u2014 checked before a patient orders.`);
15109
15313
  var _tmpl$462 = /* @__PURE__ */ template(`<span>`);
15110
15314
  var _tmpl$472 = /* @__PURE__ */ template(`<p>`);
@@ -15113,7 +15317,7 @@ var _tmpl$492 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (wit
15113
15317
  var _tmpl$502 = /* @__PURE__ */ template(`<tr><th scope=row>`);
15114
15318
  var _tmpl$5110 = /* @__PURE__ */ template(`<span class=is-ok><span aria-hidden=true>\u2713</span><span class=app-admin-sr-only> can make `);
15115
15319
  var _tmpl$5210 = /* @__PURE__ */ template(`<td>`);
15116
- var _tmpl$538 = /* @__PURE__ */ template(`<span class=is-miss><span aria-hidden=true>\u2715</span><span class=app-admin-sr-only> can't make `);
15320
+ var _tmpl$539 = /* @__PURE__ */ template(`<span class=is-miss><span aria-hidden=true>\u2715</span><span class=app-admin-sr-only> can't make `);
15117
15321
  var _tmpl$542 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> \u2014 `);
15118
15322
  var _tmpl$552 = /* @__PURE__ */ template(`<p style=margin:0>Creates the product with its strengths and first pharmacy taken from this drug. You can add more pharmacies and strengths afterwards.`);
15119
15323
  var _tmpl$562 = /* @__PURE__ */ template(`<div><label class=app-admin-label for=catalog-new-filter>Find a drug</label><input id=catalog-new-filter type=search class=app-admin-input placeholder="Search by drug or pharmacy">`);
@@ -15139,7 +15343,7 @@ function FieldError(props) {
15139
15343
  return props.message;
15140
15344
  },
15141
15345
  get children() {
15142
- var _el$ = _tmpl$279();
15346
+ var _el$ = _tmpl$280();
15143
15347
  insert(_el$, () => props.message);
15144
15348
  effect(() => setAttribute(_el$, "id", props.id));
15145
15349
  return _el$;
@@ -15154,7 +15358,7 @@ function CatalogStatusBanner(props) {
15154
15358
  },
15155
15359
  keyed: true,
15156
15360
  children: (message) => (() => {
15157
- var _el$7 = _tmpl$351(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$0.nextSibling; _el$10.nextSibling; var _el$11 = _el$8.nextSibling;
15361
+ var _el$7 = _tmpl$354(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$0.nextSibling; _el$10.nextSibling; var _el$11 = _el$8.nextSibling;
15158
15362
  insert(_el$8, message, _el$10);
15159
15363
  _el$11.$$click = () => void props.editor.reload();
15160
15364
  return _el$7;
@@ -15164,7 +15368,7 @@ function CatalogStatusBanner(props) {
15164
15368
  return state().kind === "missing";
15165
15369
  },
15166
15370
  get children() {
15167
- var _el$2 = _tmpl$280(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
15371
+ var _el$2 = _tmpl$281(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
15168
15372
  _el$6.$$click = () => void props.editor.reload();
15169
15373
  return _el$2;
15170
15374
  }
@@ -15222,7 +15426,7 @@ function StrengthsSection(props) {
15222
15426
  return ed.structure().kind === "read_only";
15223
15427
  },
15224
15428
  get children() {
15225
- var _el$17 = _tmpl$442();
15429
+ var _el$17 = _tmpl$443();
15226
15430
  effect((_$p) => style(_el$17, hint3, _$p));
15227
15431
  return _el$17;
15228
15432
  }
@@ -15251,7 +15455,7 @@ function StrengthsSection(props) {
15251
15455
  })();
15252
15456
  },
15253
15457
  get children() {
15254
- var _el$18 = _tmpl$537();
15458
+ var _el$18 = _tmpl$538();
15255
15459
  insert(_el$18, createComponent(For, {
15256
15460
  get each() {
15257
15461
  return resolved();
@@ -15263,7 +15467,7 @@ function StrengthsSection(props) {
15263
15467
  const shown = () => draft() ?? (r.row.ownPrice != null ? String(r.row.ownPrice) : "");
15264
15468
  const isInvalid = () => invalid().has(key);
15265
15469
  return (() => {
15266
- var _el$40 = _tmpl$1911(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$49 = _el$42.nextSibling;
15470
+ var _el$40 = _tmpl$1912(), _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.firstChild, _el$49 = _el$42.nextSibling;
15267
15471
  insert(_el$43, () => r.row.label);
15268
15472
  insert(_el$42, createComponent(Show, {
15269
15473
  get when() {
@@ -15670,7 +15874,7 @@ function FulfillmentSection(props) {
15670
15874
  return remaining();
15671
15875
  },
15672
15876
  children: (s) => (() => {
15673
- var _el$105 = _tmpl$354();
15877
+ var _el$105 = _tmpl$355();
15674
15878
  insert(_el$105, () => s.label);
15675
15879
  effect(() => _el$105.value = s.value);
15676
15880
  return _el$105;
@@ -15938,7 +16142,7 @@ function ReadinessSection(props) {
15938
16142
  },
15939
16143
  get fallback() {
15940
16144
  return (() => {
15941
- var _el$142 = _tmpl$538(), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.firstChild;
16145
+ var _el$142 = _tmpl$539(), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.firstChild;
15942
16146
  insert(_el$144, () => c.pharmacyName, _el$145);
15943
16147
  insert(_el$144, () => d.label, null);
15944
16148
  return _el$142;
@@ -15965,7 +16169,7 @@ function ReadinessSection(props) {
15965
16169
  return view().problems.length > 0;
15966
16170
  },
15967
16171
  get children() {
15968
- var _el$128 = _tmpl$443();
16172
+ var _el$128 = _tmpl$444();
15969
16173
  insert(_el$128, createComponent(For, {
15970
16174
  get each() {
15971
16175
  return view().problems;
@@ -16146,7 +16350,7 @@ function NewCatalogProductDialog(props) {
16146
16350
  return g.drugs;
16147
16351
  },
16148
16352
  children: (d) => (() => {
16149
- var _el$185 = _tmpl$354();
16353
+ var _el$185 = _tmpl$355();
16150
16354
  insert(_el$185, () => d.name, null);
16151
16355
  insert(_el$185, () => d.classification === "controlled" ? " (controlled)" : "", null);
16152
16356
  effect(() => _el$185.value = d.id);
@@ -16231,11 +16435,11 @@ function NewCatalogProductDialog(props) {
16231
16435
  });
16232
16436
  }
16233
16437
  delegateEvents(["click", "input"]);
16234
- var _tmpl$281 = /* @__PURE__ */ template(`<strong>`);
16235
- var _tmpl$287 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
16236
- var _tmpl$355 = /* @__PURE__ */ template(`<div><span>`);
16237
- var _tmpl$444 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
16238
- var _tmpl$539 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16438
+ var _tmpl$287 = /* @__PURE__ */ template(`<strong>`);
16439
+ var _tmpl$288 = /* @__PURE__ */ template(`<span class=app-admin-convert-detail>`);
16440
+ var _tmpl$356 = /* @__PURE__ */ template(`<div><span>`);
16441
+ var _tmpl$445 = /* @__PURE__ */ template(`<div class=app-admin-convert-findings>`);
16442
+ var _tmpl$540 = /* @__PURE__ */ template(`<button type=button class=app-admin-banner__dismiss aria-label=Dismiss>\xD7`);
16239
16443
  var _tmpl$635 = /* @__PURE__ */ template(`<div data-testid=conversion-notice><span>`);
16240
16444
  var _tmpl$732 = /* @__PURE__ */ template(`<ol class=app-admin-convert-steps aria-label=Steps>`);
16241
16445
  var _tmpl$828 = /* @__PURE__ */ template(`<span class=app-admin-sr-only> (not needed)`);
@@ -16251,7 +16455,7 @@ var _tmpl$1513 = /* @__PURE__ */ template(`<div class=app-admin-convert data-tes
16251
16455
  var _tmpl$1613 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning">Subscribers flagged`);
16252
16456
  var _tmpl$1713 = /* @__PURE__ */ template(`<option value=__not_carried_over__>Not carried over`);
16253
16457
  var _tmpl$1813 = /* @__PURE__ */ template(`<span data-testid=conversion-how>`);
16254
- var _tmpl$1912 = /* @__PURE__ */ template(`<div class=app-admin-convert-flag role=status data-testid=conversion-flagged> on this strength will be flagged for review at their next renewal.`);
16458
+ var _tmpl$1913 = /* @__PURE__ */ template(`<div class=app-admin-convert-flag role=status data-testid=conversion-flagged> on this strength will be flagged for review at their next renewal.`);
16255
16459
  var _tmpl$2012 = /* @__PURE__ */ template(`<div class=app-admin-convert-meta>The price stays on file but is never sold.`);
16256
16460
  var _tmpl$2116 = /* @__PURE__ */ template(`<li class=app-admin-catalog-row data-testid=conversion-row><div class=app-admin-catalog-row__main><span class=app-admin-catalog-row__title><span></span></span><div class=app-admin-catalog-row__controls><label class=app-admin-sr-only>New strength for </label><select data-testid=conversion-select><option value disabled>Choose a strength\u2026</option></select></div></div><div class=app-admin-convert-meta> \xB7 `);
16257
16461
  var _tmpl$2213 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral">`);
@@ -16260,14 +16464,14 @@ var _tmpl$2412 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
16260
16464
  var _tmpl$2512 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;gap:0.75rem;flex-wrap:wrap><span data-testid=conversion-undecided> still to decide.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Leave the rest as not carried over`);
16261
16465
  var _tmpl$2612 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-flagged-summary><span><strong> subscriber<!> will be flagged for review at their next renewal.</strong><span class=app-admin-convert-detail>Their refills still go out; each is held for a person to check until the product\u2019s prices are fixed.`);
16262
16466
  var _tmpl$2711 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-review><p style=margin:0;font-size:0.875rem;line-height:1.5>Match each current strength to one of the new item\u2019s strengths \u2014 its price moves with it. A strength you don\u2019t carry over keeps its price on file but is never sold.`);
16263
- var _tmpl$288 = /* @__PURE__ */ template(`<p>This product has no prices or subscribers to carry over.`);
16467
+ var _tmpl$289 = /* @__PURE__ */ template(`<p>This product has no prices or subscribers to carry over.`);
16264
16468
  var _tmpl$297 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-step-confirm>`);
16265
16469
  var _tmpl$306 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.875rem;line-height:1.5><strong></strong> will sell from the catalog item <strong></strong> (<span class=app-admin-text-mono></span>) instead of its pharmacy drug. This is what changes:`);
16266
16470
  var _tmpl$3113 = /* @__PURE__ */ template(`<ul class=app-admin-convert-list data-testid=conversion-changes><li>The catalog item is switched on and this product is moved onto it.`);
16267
16471
  var _tmpl$3212 = /* @__PURE__ */ template(`<div><h4 class=app-admin-label style="margin:0 0 0.5rem">What the product sells after the switch</h4><ul class=app-admin-convert-list data-testid=conversion-after>`);
16268
16472
  var _tmpl$3312 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status><span><strong> subscriber<!> will be flagged for review at their next renewal.`);
16269
16473
  var _tmpl$3412 = /* @__PURE__ */ template(`<p>Converting takes about a minute. For part of that time this product\u2019s strengths may be missing from your store; existing subscriptions and refills keep working. You can undo the conversion afterwards.`);
16270
- var _tmpl$356 = /* @__PURE__ */ template(`<li> \u2192 <strong>`);
16474
+ var _tmpl$357 = /* @__PURE__ */ template(`<li> \u2192 <strong>`);
16271
16475
  var _tmpl$365 = /* @__PURE__ */ template(`<li> \u2192 <strong>not carried over`);
16272
16476
  var _tmpl$374 = /* @__PURE__ */ template(`<li>: `);
16273
16477
  var _tmpl$384 = /* @__PURE__ */ template(`<strong>needs a price before it can be sold`);
@@ -16276,7 +16480,7 @@ var _tmpl$404 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin
16276
16480
  var _tmpl$4111 = /* @__PURE__ */ template(`<section class=app-admin-catalog-block data-testid=conversion-undo aria-labelledby=conversion-undo-title><h4 class=app-admin-label id=conversion-undo-title style="margin:0 0 0.5rem">Undo conversion</h4><p style=margin-bottom:0.5rem>Puts this product back on its original pharmacy drug and its original prices, exactly as they were before it was converted. It does <strong>not</strong> undo everything:</p><ul class=app-admin-convert-list style=font-size:0.75rem><li>Requests already placed under the catalog item keep it.</li><li>Refills of subscriptions whose last request used the catalog item keep using it \u2014 that works only while the item stays switched on.</li><li>The catalog item still exists; undoing doesn\u2019t delete it.</li><li>If the item stays switched on, this product shows no strengths in your store until you switch it off or convert the product again.</li></ul><p style="margin:0.5rem 0">After the undo we list exactly what it did not undo.</p><label class=app-admin-catalog-toggle style="margin:0.5rem 0"><input type=checkbox><span>Also switch off the catalog item</span></label><p style=margin-bottom:0.75rem>Only done when nothing else uses the item. If it can\u2019t be switched off we say why; the product is restored either way.`);
16277
16481
  var _tmpl$4211 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger">Undo conversion\u2026`);
16278
16482
  var _tmpl$4311 = /* @__PURE__ */ template(`<div class=app-admin-convert data-testid=conversion-undone><div class="app-admin-banner app-admin-banner--success"role=status><span><strong>The conversion was undone.</strong> The product is back on its original pharmacy drug and prices.`);
16279
- var _tmpl$445 = /* @__PURE__ */ template(`<p>The catalog item <span class=app-admin-text-mono></span> was switched off.`);
16483
+ var _tmpl$446 = /* @__PURE__ */ template(`<p>The catalog item <span class=app-admin-text-mono></span> was switched off.`);
16280
16484
  var _tmpl$453 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=conversion-not-switched-off><span><strong>The catalog item was not switched off:</strong><ul class=app-admin-convert-list style=margin-top:0.25rem>`);
16281
16485
  var _tmpl$463 = /* @__PURE__ */ template(`<p>Later edits to the product\u2019s links and prices were overwritten; their values were recorded first.`);
16282
16486
  var _tmpl$473 = /* @__PURE__ */ template(`<p>Other products still use <span class=app-admin-text-mono></span>: <!>.`);
@@ -16315,7 +16519,7 @@ var NONE = "__not_carried_over__";
16315
16519
  function Finding2(props) {
16316
16520
  const copy = () => explainFinding(props.item);
16317
16521
  return (() => {
16318
- var _el$ = _tmpl$355(), _el$2 = _el$.firstChild;
16522
+ var _el$ = _tmpl$356(), _el$2 = _el$.firstChild;
16319
16523
  insert(_el$2, createComponent(Show, {
16320
16524
  get when() {
16321
16525
  return copy().title;
@@ -16325,11 +16529,11 @@ function Finding2(props) {
16325
16529
  },
16326
16530
  get children() {
16327
16531
  return [(() => {
16328
- var _el$3 = _tmpl$281();
16532
+ var _el$3 = _tmpl$287();
16329
16533
  insert(_el$3, () => copy().title);
16330
16534
  return _el$3;
16331
16535
  })(), (() => {
16332
- var _el$4 = _tmpl$287();
16536
+ var _el$4 = _tmpl$288();
16333
16537
  insert(_el$4, () => copy().message);
16334
16538
  return _el$4;
16335
16539
  })()];
@@ -16356,7 +16560,7 @@ function Findings(props) {
16356
16560
  return shown().length > 0;
16357
16561
  },
16358
16562
  get children() {
16359
- var _el$5 = _tmpl$444();
16563
+ var _el$5 = _tmpl$445();
16360
16564
  insert(_el$5, createComponent(For, {
16361
16565
  get each() {
16362
16566
  return shown();
@@ -16386,7 +16590,7 @@ function NoticeBanner(props) {
16386
16590
  return n.tone !== "danger";
16387
16591
  },
16388
16592
  get children() {
16389
- var _el$8 = _tmpl$539();
16593
+ var _el$8 = _tmpl$540();
16390
16594
  _el$8.$$click = () => props.flow.dismissNotice();
16391
16595
  return _el$8;
16392
16596
  }
@@ -16622,7 +16826,7 @@ function ReviewRow(props) {
16622
16826
  return row().flagged;
16623
16827
  },
16624
16828
  get children() {
16625
- var _el$59 = _tmpl$1912(), _el$60 = _el$59.firstChild;
16829
+ var _el$59 = _tmpl$1913(), _el$60 = _el$59.firstChild;
16626
16830
  insert(_el$59, () => subscribersText(row().source.subscriberCount), _el$60);
16627
16831
  return _el$59;
16628
16832
  }
@@ -16663,7 +16867,7 @@ function Review2(props) {
16663
16867
  },
16664
16868
  get fallback() {
16665
16869
  return (() => {
16666
- var _el$77 = _tmpl$288();
16870
+ var _el$77 = _tmpl$289();
16667
16871
  effect((_$p) => style(_el$77, hint4, _$p));
16668
16872
  return _el$77;
16669
16873
  })();
@@ -16746,7 +16950,7 @@ function Confirm(props) {
16746
16950
  return summary.carried;
16747
16951
  },
16748
16952
  children: (c) => (() => {
16749
- var _el$98 = _tmpl$356(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling;
16953
+ var _el$98 = _tmpl$357(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling;
16750
16954
  insert(_el$98, () => c.label, _el$99);
16751
16955
  insert(_el$98, createComponent(Show, {
16752
16956
  get when() {
@@ -16803,7 +17007,7 @@ function Confirm(props) {
16803
17007
  },
16804
17008
  get children() {
16805
17009
  return [(() => {
16806
- var _el$107 = _tmpl$281();
17010
+ var _el$107 = _tmpl$287();
16807
17011
  insert(_el$107, () => fmtPrice(x.price));
16808
17012
  return _el$107;
16809
17013
  })(), createComponent(Show, {
@@ -16924,7 +17128,7 @@ function UndoneReport(props) {
16924
17128
  return r.item.deactivated;
16925
17129
  },
16926
17130
  get children() {
16927
- var _el$132 = _tmpl$445(), _el$133 = _el$132.firstChild, _el$134 = _el$133.nextSibling;
17131
+ var _el$132 = _tmpl$446(), _el$133 = _el$132.firstChild, _el$134 = _el$133.nextSibling;
16928
17132
  insert(_el$134, () => r.item.id);
16929
17133
  effect((_$p) => style(_el$132, hint4, _$p));
16930
17134
  return _el$132;
@@ -17516,11 +17720,11 @@ function CatalogConversionStatusSection(props) {
17516
17720
  delegateEvents(["click"]);
17517
17721
 
17518
17722
  // src/pages/admin/Products.tsx
17519
- var _tmpl$289 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
17520
- var _tmpl$290 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
17521
- var _tmpl$357 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
17522
- var _tmpl$446 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
17523
- var _tmpl$540 = /* @__PURE__ */ template(`<option value>`);
17723
+ var _tmpl$290 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
17724
+ var _tmpl$291 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
17725
+ var _tmpl$358 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
17726
+ var _tmpl$447 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
17727
+ var _tmpl$541 = /* @__PURE__ */ template(`<option value>`);
17524
17728
  var _tmpl$637 = /* @__PURE__ */ template(`<option>`);
17525
17729
  var _tmpl$734 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status><strong>No price set.</strong> `);
17526
17730
  var _tmpl$829 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>Use Default from Apex`);
@@ -17536,7 +17740,7 @@ var _tmpl$1514 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label c
17536
17740
  var _tmpl$1614 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem><label class=app-admin-label>Pharmacy product</label><select class=app-admin-input title="The pharmacy product this strength is sent as">`);
17537
17741
  var _tmpl$1714 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Strength sent to the pharmacy</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Bind each strength to a specific Apex SKU so the exact product is sent to the pharmacy \u2014 no fuzzy label matching. Turn on \u201CPrescriber picks\u201D for a titration product with no fixed SKU at order time.`);
17538
17742
  var _tmpl$1814 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.625rem>`);
17539
- var _tmpl$1913 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Strengths &amp; pricing</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Strengths come from the pharmacy's own list for this drug; a compounded blend lists every ingredient's strength in one label. Leave a price blank to charge the base price<!>.`);
17743
+ var _tmpl$1914 = /* @__PURE__ */ template(`<div><label class=app-admin-label>Strengths &amp; pricing</label><p style="font-size:0.6875rem;color:var(--app-admin-fg-muted);margin:0.375rem 0 0.5rem;line-height:1.4">Strengths come from the pharmacy's own list for this drug; a compounded blend lists every ingredient's strength in one label. Leave a price blank to charge the base price<!>.`);
17540
17744
  var _tmpl$2013 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0.375rem 0.75rem">`);
17541
17745
  var _tmpl$2117 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"title="Reset this product's fields to the built-in defaults">Reset to defaults`);
17542
17746
  var _tmpl$2214 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary"title="Save these settings and make the product visible to customers"style=flex:1>`);
@@ -17552,7 +17756,7 @@ var _tmpl$3114 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(
17552
17756
  var _tmpl$3213 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>`);
17553
17757
  var _tmpl$3313 = /* @__PURE__ */ template(`<div style=margin-top:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)><div style=margin-bottom:0.25rem>Unknown categories on this product:</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
17554
17758
  var _tmpl$3413 = /* @__PURE__ */ template(`<span style="display:inline-flex;align-items:center;gap:0.25rem;padding:0.125rem 0.5rem;background:var(--app-admin-warning-bg);border:1px solid var(--app-admin-warning-bg-strong);border-radius:var(--app-admin-radius-sm)"><button type=button title=Remove style=background:none;border:none;color:inherit;cursor:pointer;line-height:1;padding:0>\xD7`);
17555
- var _tmpl$358 = /* @__PURE__ */ template(`<tr><th class=app-admin-table-cell--check><input type=checkbox></th><th>Drug</th><th>Price</th><th class=app-admin-products-col-dosages>Strengths</th><th>Categories</th><th class=app-admin-table-cell--actions><span class=app-admin-sr-only>Actions`);
17759
+ var _tmpl$359 = /* @__PURE__ */ template(`<tr><th class=app-admin-table-cell--check><input type=checkbox></th><th>Drug</th><th>Price</th><th class=app-admin-products-col-dosages>Strengths</th><th>Categories</th><th class=app-admin-table-cell--actions><span class=app-admin-sr-only>Actions`);
17556
17760
  var _tmpl$366 = /* @__PURE__ */ template(`<span class=app-admin-text-muted title="Priced and ready \u2014 check it and press &quot;Add to store&quot;"style=font-size:0.7rem;margin-left:0.5rem;white-space:nowrap>Ready to add`);
17557
17761
  var _tmpl$375 = /* @__PURE__ */ template(`<span style=opacity:0.6;font-size:0.75rem>Set categories`);
17558
17762
  var _tmpl$385 = /* @__PURE__ */ template(`<tr tabindex=0 title="Click to edit price and details; use the checkbox to move it"><td class="app-admin-table-cell--no-label app-admin-table-cell--check"><input type=checkbox></td><td data-label=Drug class=app-admin-table-cell--title><div class=app-admin-product-cell><span class=app-admin-product-thumb></span><div class=app-admin-product-cell__text><span class=app-admin-product-name></span><div class="app-admin-product-id app-admin-text-mono app-admin-text-muted"></div></div></div></td><td data-label=Price class=app-admin-table-cell--num><button type=button></button></td><td data-label=Strengths class="app-admin-text-muted app-admin-products-col-dosages"style=font-size:0.75rem></td><td data-label=Categories class=app-admin-text-muted><button type=button class=app-admin-cell-btn title="Set categories"style=display:flex;flex-wrap:wrap;gap:0.25rem></button></td><td class="app-admin-table-cell--no-label app-admin-table-cell--actions"><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Edit price, strengths, categories and details"><span aria-hidden=true>\u270E</span> Edit`);
@@ -17561,7 +17765,7 @@ var _tmpl$405 = /* @__PURE__ */ template(`<span>Needs a price`);
17561
17765
  var _tmpl$4112 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>`);
17562
17766
  var _tmpl$4212 = /* @__PURE__ */ template(`<span style=opacity:0.5>-`);
17563
17767
  var _tmpl$4312 = /* @__PURE__ */ template(`<span style="padding:0.125rem 0.375rem;background:rgba(127,127,127,0.1);border-radius:var(--app-admin-radius-sm);font-size:0.75rem">`);
17564
- var _tmpl$447 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
17768
+ var _tmpl$448 = /* @__PURE__ */ template(`<p id=new-rx-product-blocked class=app-admin-text-muted style="flex:1 1 100%;margin:0;font-size:0.8125rem">`);
17565
17769
  var _tmpl$454 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap;margin-bottom:1.25rem><div style="flex:1 1 16rem;max-width:28rem"><input type=search placeholder="Search by drug, ID, or category"aria-label="Search products"class=app-admin-input></div><button type=button class="app-admin-btn app-admin-btn-primary">New prescription product`);
17566
17770
  var _tmpl$464 = /* @__PURE__ */ template(`<table class=app-admin-table><thead></thead><tbody>`);
17567
17771
  var _tmpl$474 = /* @__PURE__ */ template(`<div class=app-admin-products-panes-host><div class=app-admin-products-transfer role=group aria-label="Move checked products"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button></div><div class=app-admin-products-panes><section class=app-admin-section aria-labelledby=admin-products-available-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-available-title>Available to add<span class=app-admin-section-count></span></h2></div></section><section class=app-admin-section aria-labelledby=admin-products-store-title><div class=app-admin-section-header><h2 class=app-admin-section-title id=admin-products-store-title>In your store<span class=app-admin-section-count>`);
@@ -17672,7 +17876,7 @@ function ThumbnailUpload(props) {
17672
17876
  }
17673
17877
  };
17674
17878
  return (() => {
17675
- var _el$ = _tmpl$357(), _el$2 = _el$.firstChild;
17879
+ var _el$ = _tmpl$358(), _el$2 = _el$.firstChild;
17676
17880
  _el$2.addEventListener("change", (e) => {
17677
17881
  const file = e.currentTarget.files?.[0];
17678
17882
  if (file) handleFile(file);
@@ -17685,7 +17889,7 @@ function ThumbnailUpload(props) {
17685
17889
  return error();
17686
17890
  },
17687
17891
  get children() {
17688
- var _el$3 = _tmpl$289();
17892
+ var _el$3 = _tmpl$290();
17689
17893
  insert(_el$3, error);
17690
17894
  return _el$3;
17691
17895
  }
@@ -17696,7 +17900,7 @@ function ThumbnailUpload(props) {
17696
17900
  },
17697
17901
  get fallback() {
17698
17902
  return (() => {
17699
- var _el$9 = _tmpl$446(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
17903
+ var _el$9 = _tmpl$447(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
17700
17904
  _el$9.$$click = () => fileInput.click();
17701
17905
  insert(_el$1, () => uploading() ? "Uploading\u2026" : "Add thumbnail");
17702
17906
  effect(() => _el$9.disabled = uploading());
@@ -17704,7 +17908,7 @@ function ThumbnailUpload(props) {
17704
17908
  })();
17705
17909
  },
17706
17910
  get children() {
17707
- var _el$4 = _tmpl$290(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
17911
+ var _el$4 = _tmpl$291(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
17708
17912
  _el$6.addEventListener("mouseleave", (e) => e.currentTarget.style.opacity = "0");
17709
17913
  _el$6.addEventListener("mouseenter", (e) => e.currentTarget.style.opacity = "1");
17710
17914
  _el$7.$$click = () => fileInput.click();
@@ -17731,7 +17935,7 @@ function ThumbnailUpload(props) {
17731
17935
  }
17732
17936
  function SkuSelectOptions(props) {
17733
17937
  return [(() => {
17734
- var _el$10 = _tmpl$540();
17938
+ var _el$10 = _tmpl$541();
17735
17939
  insert(_el$10, () => props.placeholder);
17736
17940
  return _el$10;
17737
17941
  })(), createComponent(For, {
@@ -18177,7 +18381,7 @@ function ProductEditPanel(props) {
18177
18381
  return memo(() => !!(!isCatalog() && !singleStrength()))() && pricingMode() === "per_dose";
18178
18382
  },
18179
18383
  get children() {
18180
- var _el$61 = _tmpl$1913(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.firstChild, _el$66 = _el$64.nextSibling; _el$66.nextSibling;
18384
+ var _el$61 = _tmpl$1914(), _el$62 = _el$61.firstChild, _el$63 = _el$62.nextSibling, _el$64 = _el$63.firstChild, _el$66 = _el$64.nextSibling; _el$66.nextSibling;
18181
18385
  insert(_el$63, (() => {
18182
18386
  var _c$ = memo(() => !!price());
18183
18387
  return () => _c$() ? ` ($${price()})` : "";
@@ -18772,7 +18976,7 @@ function Products(props) {
18772
18976
  const all = () => list.length > 0 && list.every(isChecked);
18773
18977
  const some = () => !all() && list.some(isChecked);
18774
18978
  return (() => {
18775
- var _el$104 = _tmpl$358(), _el$105 = _el$104.firstChild, _el$106 = _el$105.firstChild;
18979
+ var _el$104 = _tmpl$359(), _el$105 = _el$104.firstChild, _el$106 = _el$105.firstChild;
18776
18980
  _el$106.addEventListener("change", (e) => setCheckedFor(list.map((x) => x.drugId), e.currentTarget.checked));
18777
18981
  use((el) => createEffect(() => el.indeterminate = some()), _el$106);
18778
18982
  effect(() => setAttribute(_el$106, "aria-label", `Select all ${list.length} shown in ${listLabel}`));
@@ -18936,7 +19140,7 @@ function Products(props) {
18936
19140
  return !canCreateCatalogProduct();
18937
19141
  },
18938
19142
  get children() {
18939
- var _el$136 = _tmpl$447();
19143
+ var _el$136 = _tmpl$448();
18940
19144
  insert(_el$136, createBlockedNote);
18941
19145
  return _el$136;
18942
19146
  }
@@ -19246,11 +19450,11 @@ function daysAgo(iso) {
19246
19450
  }
19247
19451
 
19248
19452
  // src/pages/admin/Offers.tsx
19249
- var _tmpl$291 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19250
- var _tmpl$299 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
19251
- var _tmpl$359 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
19252
- var _tmpl$448 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19253
- var _tmpl$541 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19453
+ var _tmpl$299 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19454
+ var _tmpl$2100 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
19455
+ var _tmpl$360 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
19456
+ var _tmpl$449 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19457
+ var _tmpl$544 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19254
19458
  var _tmpl$638 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
19255
19459
  var _tmpl$735 = /* @__PURE__ */ template(`<form style=display:flex;gap:0.75rem;align-items:flex-end;flex-wrap:wrap><div style="flex:1 1 16rem"><label class=app-admin-label for=offer-grant-email>Email</label><input id=offer-grant-email type=email required placeholder=person@example.com class=app-admin-input></div><div><label class=app-admin-label for=offer-grant-days>Valid for (days)</label><input id=offer-grant-days type=number min=1 max=365 required class=app-admin-input style=width:7rem></div><button type=submit class="app-admin-btn app-admin-btn-primary">`);
19256
19460
  var _tmpl$830 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0.625rem 0 0">`);
@@ -19345,7 +19549,7 @@ function OfferEditPanel(props) {
19345
19549
  }
19346
19550
  };
19347
19551
  return (() => {
19348
- var _el$ = _tmpl$448(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _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$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
19552
+ var _el$ = _tmpl$449(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$9 = _el$7.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _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$17 = _el$10.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$21 = _el$17.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild; _el$23.nextSibling; var _el$26 = _el$22.nextSibling, _el$27 = _el$21.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.nextSibling, _el$30 = _el$29.firstChild; _el$30.nextSibling; var _el$32 = _el$27.nextSibling, _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
19349
19553
  insert(_el$4, () => editing() ? "Edit Offer" : "New Offer");
19350
19554
  addEventListener(_el$5, "click", props.onClose, true);
19351
19555
  insert(_el$2, createComponent(Show, {
@@ -19353,7 +19557,7 @@ function OfferEditPanel(props) {
19353
19557
  return error();
19354
19558
  },
19355
19559
  get children() {
19356
- var _el$6 = _tmpl$291();
19560
+ var _el$6 = _tmpl$299();
19357
19561
  insert(_el$6, error);
19358
19562
  return _el$6;
19359
19563
  }
@@ -19363,7 +19567,7 @@ function OfferEditPanel(props) {
19363
19567
  return editing();
19364
19568
  },
19365
19569
  get children() {
19366
- return _tmpl$299();
19570
+ return _tmpl$2100();
19367
19571
  }
19368
19572
  }), _el$9);
19369
19573
  _el$1.$$input = (e) => setName(e.currentTarget.value);
@@ -19376,7 +19580,7 @@ function OfferEditPanel(props) {
19376
19580
  return recurringMode() === "finite";
19377
19581
  },
19378
19582
  get children() {
19379
- var _el$20 = _tmpl$359();
19583
+ var _el$20 = _tmpl$360();
19380
19584
  _el$20.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
19381
19585
  effect(() => _el$20.value = recurringCharges());
19382
19586
  return _el$20;
@@ -19387,7 +19591,7 @@ function OfferEditPanel(props) {
19387
19591
  return props.products.length > 0;
19388
19592
  },
19389
19593
  get fallback() {
19390
- return _tmpl$541();
19594
+ return _tmpl$544();
19391
19595
  },
19392
19596
  get children() {
19393
19597
  return createComponent(For, {
@@ -19873,10 +20077,10 @@ function Offers() {
19873
20077
  }
19874
20078
  delegateEvents(["click", "input"]);
19875
20079
  var _tmpl$300 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
19876
- var _tmpl$2100 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
19877
- var _tmpl$360 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
19878
- var _tmpl$449 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
19879
- var _tmpl$544 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
20080
+ var _tmpl$2101 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
20081
+ var _tmpl$361 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
20082
+ var _tmpl$450 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
20083
+ var _tmpl$545 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
19880
20084
  var _tmpl$639 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Name</th><th>Discount</th><th>Window</th><th>Products</th><th>Status</th><th style=width:8rem></th></tr></thead><tbody>`);
19881
20085
  var _tmpl$736 = /* @__PURE__ */ template(`<div><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem><button type=button class="app-admin-btn app-admin-btn-primary">+ New sale`);
19882
20086
  var _tmpl$831 = /* @__PURE__ */ template(`<span style=margin-left:0.5rem;font-size:0.75rem;color:var(--app-admin-warning-fg)>exclusive`);
@@ -19940,7 +20144,7 @@ function SaleEditPanel(props) {
19940
20144
  }
19941
20145
  };
19942
20146
  return (() => {
19943
- var _el$ = _tmpl$360(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
20147
+ var _el$ = _tmpl$361(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$1.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$17.nextSibling, _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$16.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild; _el$25.nextSibling; var _el$28 = _el$24.nextSibling, _el$29 = _el$23.nextSibling, _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling, _el$33 = _el$29.nextSibling, _el$34 = _el$33.firstChild; _el$34.nextSibling; var _el$36 = _el$33.nextSibling, _el$37 = _el$36.firstChild; _el$37.nextSibling; var _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling;
19944
20148
  insert(_el$4, () => editing() ? "Edit Sale" : "New Sale");
19945
20149
  addEventListener(_el$5, "click", props.onClose, true);
19946
20150
  insert(_el$2, createComponent(Show, {
@@ -19964,7 +20168,7 @@ function SaleEditPanel(props) {
19964
20168
  return props.products.length > 0;
19965
20169
  },
19966
20170
  get fallback() {
19967
- return _tmpl$449();
20171
+ return _tmpl$450();
19968
20172
  },
19969
20173
  get children() {
19970
20174
  return createComponent(For, {
@@ -19972,7 +20176,7 @@ function SaleEditPanel(props) {
19972
20176
  return props.products;
19973
20177
  },
19974
20178
  children: (p) => (() => {
19975
- var _el$43 = _tmpl$544(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
20179
+ var _el$43 = _tmpl$545(), _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
19976
20180
  _el$44.addEventListener("change", () => toggleProduct(p.id));
19977
20181
  insert(_el$45, () => p.name);
19978
20182
  effect(() => _el$44.checked = productIds().includes(p.id));
@@ -19987,7 +20191,7 @@ function SaleEditPanel(props) {
19987
20191
  return recurringMode() === "finite";
19988
20192
  },
19989
20193
  get children() {
19990
- var _el$32 = _tmpl$2100();
20194
+ var _el$32 = _tmpl$2101();
19991
20195
  _el$32.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
19992
20196
  effect(() => _el$32.value = recurringCharges());
19993
20197
  return _el$32;
@@ -20166,10 +20370,10 @@ function isWaitingOnSupport(thread) {
20166
20370
  return thread.lastSender === "customer" && thread.status !== "closed" && thread.status !== "transferred";
20167
20371
  }
20168
20372
  var _tmpl$301 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
20169
- var _tmpl$2101 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
20170
- var _tmpl$361 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
20171
- var _tmpl$450 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
20172
- var _tmpl$545 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
20373
+ var _tmpl$2102 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
20374
+ var _tmpl$367 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
20375
+ var _tmpl$451 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
20376
+ var _tmpl$546 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
20173
20377
  var _tmpl$640 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.75rem>Some sections couldn't be loaded (<!>).`);
20174
20378
  var _tmpl$737 = /* @__PURE__ */ template(`<div class=app-admin-support-scroll data-scrollable style=padding:1rem;display:flex;flex-direction:column;gap:1.25rem><div><div style=font-weight:600></div><div class=app-admin-text-muted style=font-size:0.8125rem;overflow:hidden;text-overflow:ellipsis></div><div style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem;flex-wrap:wrap><span class="app-admin-badge app-admin-badge--neutral"></span><span class=app-admin-text-muted style=font-size:0.75rem>Since `);
20175
20379
  var _tmpl$832 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None.`);
@@ -20187,14 +20391,14 @@ function RailSection(props) {
20187
20391
  }
20188
20392
  function RailRow(props) {
20189
20393
  return (() => {
20190
- var _el$3 = _tmpl$361(), _el$4 = _el$3.firstChild;
20394
+ var _el$3 = _tmpl$367(), _el$4 = _el$3.firstChild;
20191
20395
  insert(_el$4, () => props.left);
20192
20396
  insert(_el$3, createComponent(Show, {
20193
20397
  get when() {
20194
20398
  return props.right;
20195
20399
  },
20196
20400
  get children() {
20197
- var _el$5 = _tmpl$2101();
20401
+ var _el$5 = _tmpl$2102();
20198
20402
  insert(_el$5, () => props.right);
20199
20403
  return _el$5;
20200
20404
  }
@@ -20226,7 +20430,7 @@ function SupportCustomerRail(props) {
20226
20430
  const payments = () => (overview()?.payments ?? []).slice(0, 3);
20227
20431
  const requests = () => (overview()?.requests.items ?? []).filter((r) => r.status !== "completed" && r.status !== "denied");
20228
20432
  return (() => {
20229
- var _el$6 = _tmpl$450();
20433
+ var _el$6 = _tmpl$451();
20230
20434
  insert(_el$6, createComponent(Show, {
20231
20435
  get when() {
20232
20436
  return props.userId;
@@ -20265,7 +20469,7 @@ function SupportCustomerRail(props) {
20265
20469
  return props.onOpenCustomer;
20266
20470
  },
20267
20471
  get children() {
20268
- var _el$13 = _tmpl$545();
20472
+ var _el$13 = _tmpl$546();
20269
20473
  _el$13.$$click = () => props.onOpenCustomer(o().customer.uid);
20270
20474
  return _el$13;
20271
20475
  }
@@ -20395,15 +20599,15 @@ function SupportCustomerRail(props) {
20395
20599
  }
20396
20600
  delegateEvents(["click"]);
20397
20601
  var _tmpl$308 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
20398
- var _tmpl$2102 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
20399
- var _tmpl$367 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
20400
- var _tmpl$451 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
20401
- var _tmpl$546 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20602
+ var _tmpl$2103 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
20603
+ var _tmpl$368 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
20604
+ var _tmpl$455 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
20605
+ var _tmpl$547 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
20402
20606
  var _tmpl$641 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.6875rem>`);
20403
20607
  var _tmpl$738 = /* @__PURE__ */ template(`<button type=button class=app-admin-support-row><div style=display:flex;align-items:center;gap:0.5rem><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></span><span class=app-admin-text-muted style=font-size:0.75rem;flex-shrink:0></span></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.1875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.3125rem;margin-top:0.375rem;flex-wrap:wrap><span style=flex:1>`);
20404
20608
  function SupportQueue(props) {
20405
20609
  return (() => {
20406
- var _el$ = _tmpl$2102(), _el$2 = _el$.firstChild;
20610
+ var _el$ = _tmpl$2103(), _el$2 = _el$.firstChild;
20407
20611
  insert(_el$2, createComponent(Show, {
20408
20612
  get when() {
20409
20613
  return !props.loading;
@@ -20434,7 +20638,7 @@ function SupportQueue(props) {
20434
20638
  return t.adminUnread;
20435
20639
  },
20436
20640
  get children() {
20437
- return _tmpl$367();
20641
+ return _tmpl$368();
20438
20642
  }
20439
20643
  }), _el$8);
20440
20644
  insert(_el$8, () => customerLabel(t));
@@ -20452,7 +20656,7 @@ function SupportQueue(props) {
20452
20656
  })();
20453
20657
  },
20454
20658
  get children() {
20455
- var _el$10 = _tmpl$451(); _el$10.firstChild;
20659
+ var _el$10 = _tmpl$455(); _el$10.firstChild;
20456
20660
  insert(_el$10, () => formatWaiting(t.lastMessageAt), null);
20457
20661
  return _el$10;
20458
20662
  }
@@ -20462,7 +20666,7 @@ function SupportQueue(props) {
20462
20666
  return t.sourceRef?.startsWith("apex:handoff:");
20463
20667
  },
20464
20668
  get children() {
20465
- return _tmpl$546();
20669
+ return _tmpl$547();
20466
20670
  }
20467
20671
  }), null);
20468
20672
  insert(_el$1, createComponent(Show, {
@@ -20515,10 +20719,10 @@ function SupportQueue(props) {
20515
20719
  }
20516
20720
  delegateEvents(["click"]);
20517
20721
  var _tmpl$309 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
20518
- var _tmpl$2103 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
20519
- var _tmpl$368 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
20520
- var _tmpl$455 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
20521
- var _tmpl$547 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
20722
+ var _tmpl$2104 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
20723
+ var _tmpl$369 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
20724
+ var _tmpl$456 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
20725
+ var _tmpl$548 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
20522
20726
  var _tmpl$644 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0>`);
20523
20727
  var _tmpl$739 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>View customer`);
20524
20728
  var _tmpl$833 = /* @__PURE__ */ template(`<span style="flex-shrink:0;font-size:0.75rem;font-weight:600;color:var(--app-admin-warning-fg);background:var(--app-admin-warning-bg);padding:0.1875rem 0.5rem;border-radius:999px">Waiting `);
@@ -20534,7 +20738,7 @@ var _tmpl$1516 = /* @__PURE__ */ template(`<form style="padding:0.75rem 1.25rem
20534
20738
  var _tmpl$1616 = /* @__PURE__ */ template(`<option>`);
20535
20739
  var _tmpl$1716 = /* @__PURE__ */ template(`<button type=button style=font-size:0.75rem>`);
20536
20740
  var _tmpl$1816 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">Cancel`);
20537
- var _tmpl$1914 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
20741
+ var _tmpl$1915 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
20538
20742
  var _tmpl$2014 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=font-size:0.75rem>`);
20539
20743
  var _tmpl$2118 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.8125rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-left:0.25rem;font-size:0.75rem>remove`);
20540
20744
  var STATUS_ACTIONS = [{
@@ -20768,7 +20972,7 @@ ${body}` : body);
20768
20972
  },
20769
20973
  get fallback() {
20770
20974
  return (() => {
20771
- var _el$4 = _tmpl$368();
20975
+ var _el$4 = _tmpl$369();
20772
20976
  _el$4.$$click = () => openAttachment(p.attachment.id);
20773
20977
  insert(_el$4, createComponent(ClipIcon, {}), null);
20774
20978
  insert(_el$4, () => p.attachment.filename, null);
@@ -20776,7 +20980,7 @@ ${body}` : body);
20776
20980
  })();
20777
20981
  },
20778
20982
  get children() {
20779
- var _el$2 = _tmpl$2103(), _el$3 = _el$2.firstChild;
20983
+ var _el$2 = _tmpl$2104(), _el$3 = _el$2.firstChild;
20780
20984
  _el$2.$$click = () => openAttachment(p.attachment.id);
20781
20985
  _el$3.addEventListener("error", () => {
20782
20986
  if (retried) {
@@ -20802,7 +21006,7 @@ ${body}` : body);
20802
21006
  const Bubble = (p) => {
20803
21007
  const fromSupport = () => p.msg.sender === "support";
20804
21008
  return (() => {
20805
- var _el$5 = _tmpl$547(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
21009
+ var _el$5 = _tmpl$548(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
20806
21010
  insert(_el$7, () => fromSupport() ? "Support" : "Customer");
20807
21011
  insert(_el$8, () => new Date(p.msg.createdAt).toLocaleString("en-US", {
20808
21012
  month: "short",
@@ -20815,7 +21019,7 @@ ${body}` : body);
20815
21019
  return p.msg.body;
20816
21020
  },
20817
21021
  get children() {
20818
- var _el$9 = _tmpl$455();
21022
+ var _el$9 = _tmpl$456();
20819
21023
  insert(_el$9, () => p.msg.body);
20820
21024
  return _el$9;
20821
21025
  }
@@ -20992,7 +21196,7 @@ ${body}` : body);
20992
21196
  effect(() => _el$39.disabled = transferring());
20993
21197
  return _el$39;
20994
21198
  })(), (() => {
20995
- var _el$40 = _tmpl$1914();
21199
+ var _el$40 = _tmpl$1915();
20996
21200
  _el$40.$$click = confirmTransfer;
20997
21201
  insert(_el$40, () => transferring() ? "Forwarding\u2026" : "Forward");
20998
21202
  effect(() => _el$40.disabled = transferring());
@@ -21109,11 +21313,11 @@ ${body}` : body);
21109
21313
  delegateEvents(["click", "input", "keydown"]);
21110
21314
 
21111
21315
  // src/pages/admin/Support.tsx
21112
- var _tmpl$369 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
21113
- var _tmpl$2104 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
21114
- var _tmpl$370 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
21115
- var _tmpl$456 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
21116
- var _tmpl$548 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
21316
+ var _tmpl$370 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
21317
+ var _tmpl$2105 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
21318
+ var _tmpl$371 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
21319
+ var _tmpl$457 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
21320
+ var _tmpl$549 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
21117
21321
  var _tmpl$645 = /* @__PURE__ */ template(`<button type=button>`);
21118
21322
  var STATUS_FILTERS3 = [{
21119
21323
  value: "all",
@@ -21255,7 +21459,7 @@ function Support(props = {}) {
21255
21459
  return formatWaiting(oldest.lastMessageAt);
21256
21460
  };
21257
21461
  return (() => {
21258
- var _el$ = _tmpl$369(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
21462
+ var _el$ = _tmpl$370(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
21259
21463
  insert(_el$, createComponent(PageTitle, {
21260
21464
  subtitle: "Customer messages from the member portal",
21261
21465
  children: "Support"
@@ -21265,15 +21469,15 @@ function Support(props = {}) {
21265
21469
  return stats();
21266
21470
  },
21267
21471
  children: (s) => [(() => {
21268
- var _el$6 = _tmpl$2104(), _el$7 = _el$6.firstChild;
21472
+ var _el$6 = _tmpl$2105(), _el$7 = _el$6.firstChild;
21269
21473
  insert(_el$6, () => s().unread, _el$7);
21270
21474
  return _el$6;
21271
21475
  })(), (() => {
21272
- var _el$8 = _tmpl$370(), _el$9 = _el$8.firstChild;
21476
+ var _el$8 = _tmpl$371(), _el$9 = _el$8.firstChild;
21273
21477
  insert(_el$8, () => s().open, _el$9);
21274
21478
  return _el$8;
21275
21479
  })(), (() => {
21276
- var _el$0 = _tmpl$456(), _el$1 = _el$0.firstChild;
21480
+ var _el$0 = _tmpl$457(), _el$1 = _el$0.firstChild;
21277
21481
  insert(_el$0, () => s().total, _el$1);
21278
21482
  return _el$0;
21279
21483
  })()]
@@ -21283,7 +21487,7 @@ function Support(props = {}) {
21283
21487
  return longestWait();
21284
21488
  },
21285
21489
  children: (w) => (() => {
21286
- var _el$10 = _tmpl$548(); _el$10.firstChild;
21490
+ var _el$10 = _tmpl$549(); _el$10.firstChild;
21287
21491
  insert(_el$10, w, null);
21288
21492
  return _el$10;
21289
21493
  })()
@@ -21353,10 +21557,10 @@ function Support(props = {}) {
21353
21557
  })();
21354
21558
  }
21355
21559
  delegateEvents(["click"]);
21356
- var _tmpl$371 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
21357
- var _tmpl$2105 = /* @__PURE__ */ template(`<div>`);
21358
- var _tmpl$376 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
21359
- var _tmpl$457 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
21560
+ var _tmpl$376 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
21561
+ var _tmpl$2106 = /* @__PURE__ */ template(`<div>`);
21562
+ var _tmpl$377 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
21563
+ var _tmpl$458 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
21360
21564
  function Webhooks() {
21361
21565
  const [expanded, setExpanded] = createSignal(null);
21362
21566
  const [webhooks] = createResource(async () => {
@@ -21373,7 +21577,7 @@ function Webhooks() {
21373
21577
  setExpanded((prev) => prev === id ? null : id);
21374
21578
  };
21375
21579
  return (() => {
21376
- var _el$ = _tmpl$2105();
21580
+ var _el$ = _tmpl$2106();
21377
21581
  insert(_el$, createComponent(PageTitle, {
21378
21582
  children: "Webhook Events"
21379
21583
  }), null);
@@ -21385,13 +21589,13 @@ function Webhooks() {
21385
21589
  return createComponent(LoadingSpinner, {});
21386
21590
  },
21387
21591
  get children() {
21388
- var _el$2 = _tmpl$371(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
21592
+ var _el$2 = _tmpl$376(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
21389
21593
  insert(_el$1, createComponent(For, {
21390
21594
  get each() {
21391
21595
  return webhooks() ?? [];
21392
21596
  },
21393
21597
  children: (event) => [(() => {
21394
- var _el$10 = _tmpl$376(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
21598
+ var _el$10 = _tmpl$377(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild;
21395
21599
  _el$10.$$click = () => toggleExpand(String(event.id));
21396
21600
  insert(_el$11, () => event.date);
21397
21601
  insert(_el$12, () => event.provider || "Authorize.Net");
@@ -21408,7 +21612,7 @@ function Webhooks() {
21408
21612
  return expanded() === String(event.id);
21409
21613
  },
21410
21614
  get children() {
21411
- var _el$17 = _tmpl$457(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
21615
+ var _el$17 = _tmpl$458(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild;
21412
21616
  insert(_el$19, (() => {
21413
21617
  var _c$ = memo(() => typeof event.payload === "string");
21414
21618
  return () => _c$() ? (() => {
@@ -21636,11 +21840,11 @@ function buildEmailBodyExtensions(lookup) {
21636
21840
  }
21637
21841
 
21638
21842
  // src/pages/admin/EmailBodyEditor.tsx
21639
- var _tmpl$377 = /* @__PURE__ */ template(`<button type=button>`);
21640
- var _tmpl$2106 = /* @__PURE__ */ template(`<strong>B`);
21641
- var _tmpl$378 = /* @__PURE__ */ template(`<em>I`);
21642
- var _tmpl$458 = /* @__PURE__ */ template(`<u>U`);
21643
- var _tmpl$549 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
21843
+ var _tmpl$378 = /* @__PURE__ */ template(`<button type=button>`);
21844
+ var _tmpl$2107 = /* @__PURE__ */ template(`<strong>B`);
21845
+ var _tmpl$379 = /* @__PURE__ */ template(`<em>I`);
21846
+ var _tmpl$459 = /* @__PURE__ */ template(`<u>U`);
21847
+ var _tmpl$550 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
21644
21848
  var _tmpl$646 = /* @__PURE__ */ template(`<div class=app-admin-email-editor><div class=app-admin-email-toolbar role=toolbar aria-label=Formatting><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><span class=app-admin-email-tool-sep aria-hidden=true></span><div class=app-admin-email-menu-wrap><button type=button class=app-admin-email-tool aria-haspopup=menu>Insert placeholder &#9662;</button></div></div><div class=app-admin-email-canvas><div class=app-admin-email-page>`);
21645
21849
  var _tmpl$740 = /* @__PURE__ */ template(`<button type=button role=menuitem class=app-admin-email-menu-item><span class=app-admin-email-menu-token></span><span class=app-admin-email-menu-desc>`);
21646
21850
  var _tmpl$834 = /* @__PURE__ */ template(`<label class=app-admin-email-dialog-field><span></span><input type=text class=app-admin-input>`);
@@ -21901,7 +22105,7 @@ function EmailBodyEditor(props) {
21901
22105
  moveFocus(items, document.activeElement, e.key === "ArrowRight" ? 1 : -1);
21902
22106
  };
21903
22107
  const ToolButton = (p) => (() => {
21904
- var _el$ = _tmpl$377();
22108
+ var _el$ = _tmpl$378();
21905
22109
  addEventListener(_el$, "click", p.onClick, true);
21906
22110
  _el$.$$mousedown = (e) => e.preventDefault();
21907
22111
  insert(_el$, () => p.children);
@@ -21928,7 +22132,7 @@ function EmailBodyEditor(props) {
21928
22132
  pressed: () => isActive("bold"),
21929
22133
  onClick: () => run((ed) => ed.chain().focus().toggleBold().run()),
21930
22134
  get children() {
21931
- return _tmpl$2106();
22135
+ return _tmpl$2107();
21932
22136
  }
21933
22137
  }), _el$7);
21934
22138
  insert(_el$3, createComponent(ToolButton, {
@@ -21936,7 +22140,7 @@ function EmailBodyEditor(props) {
21936
22140
  pressed: () => isActive("italic"),
21937
22141
  onClick: () => run((ed) => ed.chain().focus().toggleItalic().run()),
21938
22142
  get children() {
21939
- return _tmpl$378();
22143
+ return _tmpl$379();
21940
22144
  }
21941
22145
  }), _el$7);
21942
22146
  insert(_el$3, createComponent(ToolButton, {
@@ -21944,7 +22148,7 @@ function EmailBodyEditor(props) {
21944
22148
  pressed: () => isActive("underline"),
21945
22149
  onClick: () => run((ed) => ed.chain().focus().toggleUnderline().run()),
21946
22150
  get children() {
21947
- return _tmpl$458();
22151
+ return _tmpl$459();
21948
22152
  }
21949
22153
  }), _el$7);
21950
22154
  insert(_el$3, createComponent(ToolButton, {
@@ -21990,7 +22194,7 @@ function EmailBodyEditor(props) {
21990
22194
  return menuOpen();
21991
22195
  },
21992
22196
  get children() {
21993
- var _el$10 = _tmpl$549();
22197
+ var _el$10 = _tmpl$550();
21994
22198
  _el$10.$$keydown = onMenuKeyDown;
21995
22199
  var _ref$2 = menuEl;
21996
22200
  typeof _ref$2 === "function" ? use(_ref$2, _el$10) : menuEl = _el$10;
@@ -22125,11 +22329,11 @@ function EmailBodyEditor(props) {
22125
22329
  delegateEvents(["mousedown", "click", "keydown", "input"]);
22126
22330
 
22127
22331
  // src/pages/admin/EmailTextEditor.tsx
22128
- var _tmpl$379 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
22129
- var _tmpl$2107 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
22130
- var _tmpl$380 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
22131
- var _tmpl$459 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
22132
- var _tmpl$550 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
22332
+ var _tmpl$380 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
22333
+ var _tmpl$2108 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
22334
+ var _tmpl$381 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
22335
+ var _tmpl$460 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
22336
+ var _tmpl$551 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
22133
22337
  var TEMPLATE_LIMITS = {
22134
22338
  subject: 200,
22135
22339
  body: 2e4
@@ -22161,13 +22365,13 @@ function TemplateTextEditor(props) {
22161
22365
  };
22162
22366
  const bodyTooLong = () => props.value.body.length > TEMPLATE_LIMITS.body;
22163
22367
  return (() => {
22164
- var _el$ = _tmpl$459(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
22368
+ var _el$ = _tmpl$460(), _el$8 = _el$.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$8.nextSibling; _el$11.firstChild;
22165
22369
  insert(_el$, createComponent(Show, {
22166
22370
  get when() {
22167
22371
  return props.placeholders.length > 0;
22168
22372
  },
22169
22373
  get children() {
22170
- var _el$2 = _tmpl$2107(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
22374
+ var _el$2 = _tmpl$2108(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
22171
22375
  insert(_el$6, createComponent(For, {
22172
22376
  get each() {
22173
22377
  return props.placeholders;
@@ -22175,7 +22379,7 @@ function TemplateTextEditor(props) {
22175
22379
  children: (p) => {
22176
22380
  const blocked = () => target() === "subject" && !fitsSubject(p);
22177
22381
  return (() => {
22178
- var _el$20 = _tmpl$550();
22382
+ var _el$20 = _tmpl$551();
22179
22383
  _el$20.$$click = () => insertToken(p);
22180
22384
  _el$20.$$mousedown = (e) => e.preventDefault();
22181
22385
  insert(_el$20, () => p.token);
@@ -22199,7 +22403,7 @@ function TemplateTextEditor(props) {
22199
22403
  return props.note;
22200
22404
  },
22201
22405
  get children() {
22202
- var _el$7 = _tmpl$379();
22406
+ var _el$7 = _tmpl$380();
22203
22407
  insert(_el$7, () => props.note);
22204
22408
  return _el$7;
22205
22409
  }
@@ -22235,7 +22439,7 @@ function TemplateTextEditor(props) {
22235
22439
  return bodyTooLong();
22236
22440
  },
22237
22441
  get children() {
22238
- var _el$13 = _tmpl$380(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
22442
+ var _el$13 = _tmpl$381(), _el$14 = _el$13.firstChild, _el$18 = _el$14.nextSibling, _el$15 = _el$18.nextSibling, _el$19 = _el$15.nextSibling; _el$19.nextSibling;
22239
22443
  insert(_el$13, () => props.value.body.length.toLocaleString(), _el$18);
22240
22444
  insert(_el$13, () => TEMPLATE_LIMITS.body.toLocaleString(), _el$19);
22241
22445
  return _el$13;
@@ -22249,11 +22453,11 @@ function TemplateTextEditor(props) {
22249
22453
  delegateEvents(["input", "mousedown", "click"]);
22250
22454
 
22251
22455
  // src/pages/admin/EmailTemplates.tsx
22252
- var _tmpl$381 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
22253
- var _tmpl$2108 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
22254
- var _tmpl$386 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
22255
- var _tmpl$460 = /* @__PURE__ */ template(`<div>`);
22256
- var _tmpl$551 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
22456
+ var _tmpl$386 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
22457
+ var _tmpl$2109 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
22458
+ var _tmpl$387 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
22459
+ var _tmpl$461 = /* @__PURE__ */ template(`<div>`);
22460
+ var _tmpl$554 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
22257
22461
  var _tmpl$647 = /* @__PURE__ */ template(`<div style=margin-bottom:0.25rem>`);
22258
22462
  var _tmpl$741 = /* @__PURE__ */ template(`<div class=app-admin-card style=padding:1.25rem;flex:1;min-width:0><div style=display:flex;flex-direction:column;gap:1.25rem><div style="display:flex;flex-wrap:wrap;gap:0.75rem;padding-top:1rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-primary"></button><button type=button class="app-admin-btn app-admin-btn-ghost"></button><button type=button class="app-admin-btn app-admin-btn-ghost">`);
22259
22463
  var _tmpl$835 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>Used by: `);
@@ -22284,7 +22488,7 @@ var CATEGORY_DEFS = [{
22284
22488
  var MARKETING_LABEL = "Marketing";
22285
22489
  var MARKETING_NOTE = "These go to people who told us about their health and did not buy. Keep the copy general \u2014 no drug names, no condition names \u2014 and keep {{unsubscribeLink}} in every template.";
22286
22490
  var isSameSelection = (a, b) => a.kind === b.kind && (a.kind === "fixed" ? a.key === b.key : a.id === b.id);
22287
- function humanize(key) {
22491
+ function humanize2(key) {
22288
22492
  return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\w/, (c) => c.toUpperCase()).trim();
22289
22493
  }
22290
22494
  var BLANK_CUSTOM_BODY = "<p>Hi {{firstName}},</p><p>If you would rather not hear from us about this, {{unsubscribeLink}}.</p>";
@@ -22472,7 +22676,7 @@ function EmailTemplates(props = {}) {
22472
22676
  const handleReset = async () => {
22473
22677
  const key = activeKey();
22474
22678
  if (!key) return;
22475
- if (!confirm(`Reset "${humanize(key)}" to default? This cannot be undone.`)) return;
22679
+ if (!confirm(`Reset "${humanize2(key)}" to default? This cannot be undone.`)) return;
22476
22680
  setResetting(true);
22477
22681
  try {
22478
22682
  const res = await adminApi.resetEmailTemplate(key);
@@ -22583,7 +22787,7 @@ function EmailTemplates(props = {}) {
22583
22787
  }
22584
22788
  };
22585
22789
  const navButton = (opts) => (() => {
22586
- var _el$ = _tmpl$381();
22790
+ var _el$ = _tmpl$386();
22587
22791
  addEventListener(_el$, "click", opts.onClick, true);
22588
22792
  insert(_el$, () => opts.label);
22589
22793
  effect((_p$) => {
@@ -22598,14 +22802,14 @@ function EmailTemplates(props = {}) {
22598
22802
  return _el$;
22599
22803
  })();
22600
22804
  const groupHeader = (label3) => (() => {
22601
- var _el$2 = _tmpl$2108(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22805
+ var _el$2 = _tmpl$2109(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22602
22806
  _el$2.$$click = () => toggleCategory(label3);
22603
22807
  insert(_el$3, label3);
22604
22808
  insert(_el$4, () => collapsed()[label3] ? "\u25B8" : "\u25BE");
22605
22809
  return _el$2;
22606
22810
  })();
22607
22811
  return (() => {
22608
- var _el$5 = _tmpl$460();
22812
+ var _el$5 = _tmpl$461();
22609
22813
  insert(_el$5, createComponent(PageTitle, {
22610
22814
  subtitle: "Customize the transactional emails sent to your customers, and write the ones your sequences send.",
22611
22815
  children: "Email Templates"
@@ -22623,10 +22827,10 @@ function EmailTemplates(props = {}) {
22623
22827
  return templateKeys().length > 0;
22624
22828
  },
22625
22829
  get fallback() {
22626
- return _tmpl$551();
22830
+ return _tmpl$554();
22627
22831
  },
22628
22832
  get children() {
22629
- var _el$6 = _tmpl$386(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
22833
+ var _el$6 = _tmpl$387(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
22630
22834
  insert(_el$7, createComponent(For, {
22631
22835
  get each() {
22632
22836
  return categorizedKeys();
@@ -22644,7 +22848,7 @@ function EmailTemplates(props = {}) {
22644
22848
  return group.keys;
22645
22849
  },
22646
22850
  children: (key) => navButton({
22647
- label: humanize(key),
22851
+ label: humanize2(key),
22648
22852
  active: () => activeKey() === key,
22649
22853
  onClick: () => handleTabSwitch(key)
22650
22854
  })
@@ -22788,11 +22992,11 @@ function EmailTemplates(props = {}) {
22788
22992
  })();
22789
22993
  }
22790
22994
  delegateEvents(["click", "input"]);
22791
- var _tmpl$387 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
22792
- var _tmpl$2109 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
22793
- var _tmpl$388 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
22794
- var _tmpl$461 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
22795
- var _tmpl$554 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
22995
+ var _tmpl$388 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
22996
+ var _tmpl$2119 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
22997
+ var _tmpl$389 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
22998
+ var _tmpl$465 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
22999
+ var _tmpl$555 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
22796
23000
  var _tmpl$648 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>No sequences yet \u2014 create one in the Sequences tab.`);
22797
23001
  var _tmpl$743 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><select class=app-admin-input aria-label=Sequence style=width:auto><option value>Add to sequence\u2026</option></select><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
22798
23002
  var _tmpl$836 = /* @__PURE__ */ template(`<option>`);
@@ -22808,9 +23012,9 @@ var _tmpl$1517 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;disp
22808
23012
  var _tmpl$1617 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><p class=app-admin-text-muted style=font-size:0.75rem;margin:0>Anyone you add from the Funnel tab. Tick segments to also enroll whoever enters them (the hourly check adds and removes them; their clock starts at their own entry).</p><label><input type=checkbox aria-label="Savings-program members only"><span>Savings-program members only<span class=app-admin-text-muted style=display:block;font-size:0.75rem;margin-top:0.125rem>Re-checked at every send: someone who is no longer a member in good standing is removed instead of emailed.`);
22809
23013
  var _tmpl$1717 = /* @__PURE__ */ template(`<option selected>`);
22810
23014
  var _tmpl$1817 = /* @__PURE__ */ template(`<label><span>Valid for (days)</span><input class=app-admin-input type=number min=1 max=365 aria-label="Offer valid for days"style=width:6rem><span class=app-admin-text-muted style=font-size:0.75rem>Each person gets their own deadline, counted from the day they were enrolled.`);
22811
- var _tmpl$1915 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Offers`);
23015
+ var _tmpl$1916 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Offers`);
22812
23016
  var _tmpl$2015 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap><span class=app-admin-text-muted style=font-size:0.75rem>No active offers yet. Create one under Marketing \u203A Offers.`);
22813
- var _tmpl$2119 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Offer</span><select class=app-admin-input aria-label=Offer><option value>None</option></select><span class=app-admin-text-muted style=font-size:0.75rem>Granted to each person when they are enrolled. A step is not sent once their offer has lapsed.`);
23017
+ var _tmpl$2120 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Offer</span><select class=app-admin-input aria-label=Offer><option value>None</option></select><span class=app-admin-text-muted style=font-size:0.75rem>Granted to each person when they are enrolled. A step is not sent once their offer has lapsed.`);
22814
23018
  var _tmpl$2215 = /* @__PURE__ */ template(`<div style=max-width:40rem>`);
22815
23019
  var _tmpl$2314 = /* @__PURE__ */ template(`<div><nav role=tablist aria-label="Sequence sections"style="display:flex;gap:0.25rem;border-bottom:1px solid var(--app-admin-border);margin:1rem 0 1.25rem">`);
22816
23020
  var _tmpl$2414 = /* @__PURE__ */ template(`<span style=text-transform:none>`);
@@ -22827,7 +23031,7 @@ var _tmpl$3414 = /* @__PURE__ */ template(`<tr><td data-label=Person><div class=
22827
23031
  var _tmpl$3510 = /* @__PURE__ */ template(`<div><div style=font-size:0.75rem;margin-bottom:0.25rem></div><div style=display:grid;gap:0.25rem>`);
22828
23032
  var _tmpl$3610 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
22829
23033
  var _tmpl$3710 = /* @__PURE__ */ template(`<option> \u2014 <!> off`);
22830
- var _tmpl$389 = /* @__PURE__ */ template(`<div>`);
23034
+ var _tmpl$3810 = /* @__PURE__ */ template(`<div>`);
22831
23035
  var _tmpl$396 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr></thead><tbody>`);
22832
23036
  var _tmpl$406 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>Sequences</h2><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">New sequence`);
22833
23037
  var _tmpl$4113 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
@@ -22921,7 +23125,7 @@ function SequenceQueue(props) {
22921
23125
  return rows().length > 0;
22922
23126
  },
22923
23127
  get children() {
22924
- var _el$5 = _tmpl$388();
23128
+ var _el$5 = _tmpl$389();
22925
23129
  _el$5.$$click = () => void sendAll();
22926
23130
  effect(() => _el$5.disabled = busy() === "all");
22927
23131
  return _el$5;
@@ -22934,7 +23138,7 @@ function SequenceQueue(props) {
22934
23138
  return !props.sequence.autoSend;
22935
23139
  },
22936
23140
  get children() {
22937
- return _tmpl$387();
23141
+ return _tmpl$388();
22938
23142
  }
22939
23143
  }), createComponent(Show, {
22940
23144
  get when() {
@@ -22956,13 +23160,13 @@ function SequenceQueue(props) {
22956
23160
  });
22957
23161
  },
22958
23162
  get children() {
22959
- var _el$2 = _tmpl$2109(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
23163
+ var _el$2 = _tmpl$2119(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
22960
23164
  insert(_el$4, createComponent(For, {
22961
23165
  get each() {
22962
23166
  return rows();
22963
23167
  },
22964
23168
  children: (row) => (() => {
22965
- var _el$6 = _tmpl$554(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
23169
+ var _el$6 = _tmpl$555(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
22966
23170
  insert(_el$7, createComponent(Show, {
22967
23171
  get when() {
22968
23172
  return row.userId && nav;
@@ -22971,7 +23175,7 @@ function SequenceQueue(props) {
22971
23175
  return row.email;
22972
23176
  },
22973
23177
  get children() {
22974
- var _el$8 = _tmpl$461();
23178
+ var _el$8 = _tmpl$465();
22975
23179
  _el$8.$$click = () => nav.openCustomer(row.userId);
22976
23180
  insert(_el$8, () => row.email);
22977
23181
  return _el$8;
@@ -23547,7 +23751,7 @@ function SequenceEditor(props) {
23547
23751
  return e.email;
23548
23752
  },
23549
23753
  get children() {
23550
- var _el$98 = _tmpl$461();
23754
+ var _el$98 = _tmpl$465();
23551
23755
  _el$98.$$click = () => nav.openCustomer(e.userId);
23552
23756
  insert(_el$98, () => e.email);
23553
23757
  return _el$98;
@@ -23690,7 +23894,7 @@ function SequenceEditor(props) {
23690
23894
  insert(_el$44, createComponent(Section, {
23691
23895
  title: "Offer",
23692
23896
  get children() {
23693
- var _el$70 = _tmpl$2119(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild; _el$73.nextSibling;
23897
+ var _el$70 = _tmpl$2120(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling, _el$74 = _el$73.firstChild; _el$73.nextSibling;
23694
23898
  _el$73.addEventListener("change", (e) => {
23695
23899
  const offerId = e.currentTarget.value || null;
23696
23900
  update({
@@ -23758,7 +23962,7 @@ function SequenceEditor(props) {
23758
23962
  return nav?.isTabEnabled("offers");
23759
23963
  },
23760
23964
  get children() {
23761
- var _el$83 = _tmpl$1915();
23965
+ var _el$83 = _tmpl$1916();
23762
23966
  _el$83.$$click = () => nav.selectTab("offers");
23763
23967
  return _el$83;
23764
23968
  }
@@ -23815,7 +24019,7 @@ function Sequences() {
23815
24019
  void refetchQueue();
23816
24020
  };
23817
24021
  return (() => {
23818
- var _el$116 = _tmpl$389();
24022
+ var _el$116 = _tmpl$3810();
23819
24023
  insert(_el$116, createComponent(Show, {
23820
24024
  get when() {
23821
24025
  return !editing();
@@ -23929,10 +24133,10 @@ delegateEvents(["click", "input"]);
23929
24133
 
23930
24134
  // src/pages/admin/Funnel.tsx
23931
24135
  var _tmpl$390 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23932
- var _tmpl$2120 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
24136
+ var _tmpl$2121 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
23933
24137
  var _tmpl$391 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
23934
- var _tmpl$465 = /* @__PURE__ */ template(`<th>Account`);
23935
- var _tmpl$555 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
24138
+ var _tmpl$466 = /* @__PURE__ */ template(`<th>Account`);
24139
+ var _tmpl$556 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
23936
24140
  var _tmpl$649 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;display:grid;gap:0.5rem"></div><div style="padding:0.5rem 1.25rem 0.75rem;border-top:1px solid var(--app-admin-border-soft)"></div><table class=app-admin-table><thead><tr><th style=width:2rem><input type=checkbox aria-label="Select all"></th><th>Person</th><th>Where they stopped</th><th>Since</th></tr></thead><tbody>`);
23937
24141
  var _tmpl$744 = /* @__PURE__ */ template(`<span style=color:var(--app-admin-fg-subtle);margin-left:0.375rem> savings`);
23938
24142
  var _tmpl$837 = /* @__PURE__ */ template(`<button type=button style="display:grid;grid-template-columns:12rem 1fr 7rem;align-items:center;gap:0.75rem;background:none;border:none;padding:0.125rem 0;cursor:pointer;text-align:left;color:inherit;font:inherit"><span style=font-size:0.8125rem;color:var(--app-admin-fg-muted)></span><span style=display:block;background:var(--app-admin-border-soft);border-radius:4px;height:1.125rem><span style=display:block;height:100%;background:var(--app-admin-primary);border-radius:4px></span></span><span style=font-size:0.8125rem;text-align:right>`);
@@ -23949,7 +24153,7 @@ var _tmpl$1618 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color
23949
24153
  var _tmpl$1718 = /* @__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)>`);
23950
24154
  function CardHeader(props) {
23951
24155
  return (() => {
23952
- var _el$ = _tmpl$2120(), _el$2 = _el$.firstChild;
24156
+ var _el$ = _tmpl$2121(), _el$2 = _el$.firstChild;
23953
24157
  insert(_el$2, () => props.title);
23954
24158
  insert(_el$, createComponent(Show, {
23955
24159
  get when() {
@@ -24068,7 +24272,7 @@ function SegmentSection(props) {
24068
24272
  return props.group === "b";
24069
24273
  },
24070
24274
  get children() {
24071
- return _tmpl$465();
24275
+ return _tmpl$466();
24072
24276
  }
24073
24277
  }), null);
24074
24278
  insert(_el$19, createComponent(Show, {
@@ -24182,7 +24386,7 @@ function SegmentSection(props) {
24182
24386
  return people()?.hasMore;
24183
24387
  },
24184
24388
  get children() {
24185
- var _el$20 = _tmpl$555(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
24389
+ var _el$20 = _tmpl$556(), _el$21 = _el$20.firstChild, _el$23 = _el$21.nextSibling; _el$23.nextSibling;
24186
24390
  insert(_el$20, () => people().total, _el$23);
24187
24391
  return _el$20;
24188
24392
  }
@@ -24287,10 +24491,10 @@ function Funnel() {
24287
24491
  }
24288
24492
  delegateEvents(["click"]);
24289
24493
  var _tmpl$397 = /* @__PURE__ */ template(`<div>`);
24290
- var _tmpl$2121 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
24494
+ var _tmpl$2122 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
24291
24495
  var _tmpl$398 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
24292
- var _tmpl$466 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
24293
- var _tmpl$556 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
24496
+ var _tmpl$467 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
24497
+ var _tmpl$557 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
24294
24498
  var _tmpl$650 = /* @__PURE__ */ template(`<div>No longer in it: <!>.`);
24295
24499
  var _tmpl$745 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.375rem>`);
24296
24500
  var _tmpl$838 = /* @__PURE__ */ template(`<h3 class=app-admin-heading style="font-size:0.875rem;font-weight:600;margin:1.25rem 0 0.5rem">Who bought`);
@@ -24306,9 +24510,9 @@ var _tmpl$1519 = /* @__PURE__ */ template(`<td data-label="Claimed the offer">`)
24306
24510
  var _tmpl$1619 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label=Bought></td><td data-label="Last email before buying"></td><td data-label="Followed a link"></td><td data-label="Paid since">`);
24307
24511
  var _tmpl$1719 = /* @__PURE__ */ template(`<span>none yet`);
24308
24512
  var _tmpl$1818 = /* @__PURE__ */ template(`<span>No`);
24309
- var _tmpl$1916 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Sequences`);
24513
+ var _tmpl$1917 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Sequences`);
24310
24514
  var _tmpl$2016 = /* @__PURE__ */ template(`<div style=display:flex;justify-content:flex-end;gap:0.5rem;margin-bottom:0.75rem><button type=button class="app-admin-btn app-admin-btn-sm">Refresh`);
24311
- var _tmpl$2122 = /* @__PURE__ */ template(`<div style=display:grid;gap:1.25rem>`);
24515
+ var _tmpl$2123 = /* @__PURE__ */ template(`<div style=display:grid;gap:1.25rem>`);
24312
24516
  var _tmpl$2216 = /* @__PURE__ */ template(`<div style=margin-top:1.25rem;display:grid;gap:0.25rem><div>A purchase counts if it happened while the person was in the sequence, or within <!> days of their last email from it.</div><div>A link counts as followed when the person\u2019s browser opens the site from the email. Emails sent before link tracking was added show none.</div><div>Paid is every settled payment from those buyers since they were enrolled, not only the first.`);
24313
24517
  var muted = {
24314
24518
  color: "var(--app-admin-fg-muted)",
@@ -24326,7 +24530,7 @@ function money(cents) {
24326
24530
  }
24327
24531
  function Figure(props) {
24328
24532
  return (() => {
24329
- var _el$ = _tmpl$2121(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
24533
+ var _el$ = _tmpl$2122(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
24330
24534
  insert(_el$2, () => props.label);
24331
24535
  insert(_el$3, () => props.value);
24332
24536
  insert(_el$, createComponent(Show, {
@@ -24455,7 +24659,7 @@ function SequenceCard(props) {
24455
24659
  })();
24456
24660
  },
24457
24661
  get children() {
24458
- var _el$6 = _tmpl$466(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
24662
+ var _el$6 = _tmpl$467(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
24459
24663
  insert(_el$8, createComponent(For, {
24460
24664
  get each() {
24461
24665
  return r().steps;
@@ -24484,7 +24688,7 @@ function SequenceCard(props) {
24484
24688
  return beforeAnyEmail() > 0;
24485
24689
  },
24486
24690
  get children() {
24487
- var _el$0 = _tmpl$556(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
24691
+ var _el$0 = _tmpl$557(), _el$1 = _el$0.firstChild, _el$11 = _el$1.nextSibling; _el$11.nextSibling;
24488
24692
  insert(_el$0, beforeAnyEmail, _el$1);
24489
24693
  insert(_el$0, () => p().bought, _el$11);
24490
24694
  return _el$0;
@@ -24641,7 +24845,7 @@ function SequenceResults() {
24641
24845
  return nav?.isTabEnabled("sequences");
24642
24846
  },
24643
24847
  get children() {
24644
- var _el$64 = _tmpl$1916();
24848
+ var _el$64 = _tmpl$1917();
24645
24849
  _el$64.$$click = () => nav.selectTab("sequences");
24646
24850
  return _el$64;
24647
24851
  }
@@ -24649,7 +24853,7 @@ function SequenceResults() {
24649
24853
  _el$65.$$click = () => void refetch();
24650
24854
  return _el$63;
24651
24855
  })(), (() => {
24652
- var _el$66 = _tmpl$2122();
24856
+ var _el$66 = _tmpl$2123();
24653
24857
  insert(_el$66, createComponent(For, {
24654
24858
  get each() {
24655
24859
  return report().sequences;
@@ -24681,10 +24885,10 @@ var [supportChannelMode, setSupportChannelMode] = createSignal(null);
24681
24885
 
24682
24886
  // src/pages/admin/EmailNotifications.tsx
24683
24887
  var _tmpl$399 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
24684
- var _tmpl$2123 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
24888
+ var _tmpl$2124 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
24685
24889
  var _tmpl$3100 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
24686
- var _tmpl$467 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
24687
- var _tmpl$557 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
24890
+ var _tmpl$468 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
24891
+ var _tmpl$558 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
24688
24892
  var _tmpl$651 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Send a copy for</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr));gap:0.375rem 1rem">`);
24689
24893
  var _tmpl$746 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.8125rem>Nobody \u2014 admin copies go nowhere until someone is added.`);
24690
24894
  var _tmpl$839 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem;align-items:center><button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0;font-size:1rem;line-height:1>&times;`);
@@ -24696,7 +24900,7 @@ var _tmpl$1129 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:v
24696
24900
  var _tmpl$1222 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem;max-width:24rem><span>Support inbox</span><input type=email class=app-admin-input data-testid=support-channel-email-input placeholder=help@example.com>`);
24697
24901
  var _tmpl$1320 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"data-testid=support-channel-save>`);
24698
24902
  var _tmpl$1420 = /* @__PURE__ */ template(`<div>`);
24699
- function humanize2(key) {
24903
+ function humanize3(key) {
24700
24904
  return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\w/, (c) => c.toUpperCase()).trim();
24701
24905
  }
24702
24906
  var label2 = {
@@ -24705,7 +24909,7 @@ var label2 = {
24705
24909
  };
24706
24910
  function Card(props) {
24707
24911
  return (() => {
24708
- var _el$ = _tmpl$2123(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
24912
+ var _el$ = _tmpl$2124(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
24709
24913
  insert(_el$4, () => props.title);
24710
24914
  insert(_el$3, createComponent(Show, {
24711
24915
  get when() {
@@ -24776,7 +24980,7 @@ function NotificationsCard() {
24776
24980
  note: "Who receives a copy when one of these emails goes to a customer. Clinical emails (new messages, prescription updates) are never copied.",
24777
24981
  get aside() {
24778
24982
  return (() => {
24779
- var _el$9 = _tmpl$467();
24983
+ var _el$9 = _tmpl$468();
24780
24984
  _el$9.$$click = () => void save();
24781
24985
  insert(_el$9, () => saving() ? "Saving\u2026" : "Save");
24782
24986
  effect(() => _el$9.disabled = !dirty() || saving());
@@ -24792,7 +24996,7 @@ function NotificationsCard() {
24792
24996
  return createComponent(LoadingSpinner, {});
24793
24997
  },
24794
24998
  children: (s) => [(() => {
24795
- var _el$0 = _tmpl$557(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
24999
+ var _el$0 = _tmpl$558(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
24796
25000
  insert(_el$10, createComponent(For, {
24797
25001
  get each() {
24798
25002
  return s().recipientEmails;
@@ -24826,7 +25030,7 @@ function NotificationsCard() {
24826
25030
  },
24827
25031
  children: (key) => createComponent(Toggle, {
24828
25032
  get label() {
24829
- return humanize2(key);
25033
+ return humanize3(key);
24830
25034
  },
24831
25035
  get checked() {
24832
25036
  return !!s().enabledEvents[key];
@@ -24897,7 +25101,7 @@ function BillingRemindersCard() {
24897
25101
  note: "Automated emails about upcoming renewals, expiring cards and past-due subscriptions. Each one's copy is under Templates.",
24898
25102
  get aside() {
24899
25103
  return (() => {
24900
- var _el$20 = _tmpl$467();
25104
+ var _el$20 = _tmpl$468();
24901
25105
  _el$20.$$click = () => void save();
24902
25106
  insert(_el$20, () => saving() ? "Saving\u2026" : "Save");
24903
25107
  effect(() => _el$20.disabled = !dirty() || saving());
@@ -25143,10 +25347,10 @@ function EmailNotifications() {
25143
25347
  }
25144
25348
  delegateEvents(["click", "input", "keydown"]);
25145
25349
  var _tmpl$400 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
25146
- var _tmpl$2124 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
25350
+ var _tmpl$2125 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
25147
25351
  var _tmpl$3101 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
25148
- var _tmpl$468 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
25149
- var _tmpl$558 = /* @__PURE__ */ template(`<div>`);
25352
+ var _tmpl$469 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
25353
+ var _tmpl$559 = /* @__PURE__ */ template(`<div>`);
25150
25354
  var _tmpl$654 = /* @__PURE__ */ template(`<button type=button role=switch class=app-admin-toggle><span class=app-admin-toggle__knob>`);
25151
25355
  var _tmpl$747 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--success">On`);
25152
25356
  var _tmpl$840 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Request`);
@@ -25189,7 +25393,7 @@ function Row(props) {
25189
25393
  return props.note;
25190
25394
  },
25191
25395
  get children() {
25192
- var _el$0 = _tmpl$2124();
25396
+ var _el$0 = _tmpl$2125();
25193
25397
  insert(_el$0, () => props.note);
25194
25398
  effect((_$p) => style(_el$0, {
25195
25399
  ...muted2
@@ -25272,7 +25476,7 @@ function Features() {
25272
25476
  }
25273
25477
  };
25274
25478
  return (() => {
25275
- var _el$10 = _tmpl$558();
25479
+ var _el$10 = _tmpl$559();
25276
25480
  insert(_el$10, createComponent(PageTitle, {
25277
25481
  subtitle: "What this site has switched on, and what you can ask for",
25278
25482
  children: "Features"
@@ -25282,7 +25486,7 @@ function Features() {
25282
25486
  return data.error;
25283
25487
  },
25284
25488
  get children() {
25285
- var _el$11 = _tmpl$468(); _el$11.firstChild;
25489
+ var _el$11 = _tmpl$469(); _el$11.firstChild;
25286
25490
  insert(_el$11, () => data.error?.message, null);
25287
25491
  return _el$11;
25288
25492
  }
@@ -25459,10 +25663,10 @@ function Features() {
25459
25663
  }
25460
25664
  delegateEvents(["click", "input"]);
25461
25665
  var _tmpl$401 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
25462
- var _tmpl$2125 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
25666
+ var _tmpl$2126 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
25463
25667
  var _tmpl$3102 = /* @__PURE__ */ template(`<option>`);
25464
- var _tmpl$469 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
25465
- var _tmpl$559 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
25668
+ var _tmpl$470 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
25669
+ var _tmpl$560 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
25466
25670
  var _tmpl$655 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
25467
25671
  var _tmpl$748 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Email</th><th>Role when they join</th><th>Expires</th><th style=text-align:right></th></tr></thead><tbody>`);
25468
25672
  var _tmpl$841 = /* @__PURE__ */ template(`<div><form class=app-admin-card style=padding:1rem;margin-bottom:1.5rem><div class=app-admin-heading style=font-size:1rem;margin-bottom:0.75rem>Invite an admin</div><div style=display:flex;gap:0.75rem;flex-wrap:wrap;align-items:flex-end><label style="display:flex;flex-direction:column;gap:0.25rem;flex:1 1 16rem"><span class=app-admin-label>Email</span><input class=app-admin-input type=email required placeholder=name@example.com></label><label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>Role</span></label><button type=submit class="app-admin-btn app-admin-btn-primary"></button></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.5rem>: `);
@@ -25483,7 +25687,7 @@ var ROLE_LABEL = {
25483
25687
  };
25484
25688
  function RoleSelect(props) {
25485
25689
  return (() => {
25486
- var _el$ = _tmpl$2125();
25690
+ var _el$ = _tmpl$2126();
25487
25691
  _el$.addEventListener("change", (e) => props.onChange(e.currentTarget.value));
25488
25692
  insert(_el$, createComponent(Show, {
25489
25693
  get when() {
@@ -25584,7 +25788,7 @@ function Admins(props) {
25584
25788
  return apexNote();
25585
25789
  },
25586
25790
  get children() {
25587
- var _el$14 = _tmpl$469();
25791
+ var _el$14 = _tmpl$470();
25588
25792
  insert(_el$14, apexNote);
25589
25793
  return _el$14;
25590
25794
  }
@@ -25608,7 +25812,7 @@ function Admins(props) {
25608
25812
  },
25609
25813
  get children() {
25610
25814
  return [(() => {
25611
- var _el$15 = _tmpl$559(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$16.nextSibling;
25815
+ var _el$15 = _tmpl$560(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$16.nextSibling;
25612
25816
  insert(_el$21, createComponent(For, {
25613
25817
  get each() {
25614
25818
  return team()?.admins ?? [];
@@ -25680,10 +25884,10 @@ delegateEvents(["input", "click"]);
25680
25884
 
25681
25885
  // src/pages/AdminDashboard.tsx
25682
25886
  var _tmpl$407 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
25683
- var _tmpl$2126 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
25887
+ var _tmpl$2127 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
25684
25888
  var _tmpl$3103 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin 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-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
25685
- var _tmpl$470 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
25686
- var _tmpl$560 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
25889
+ var _tmpl$471 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
25890
+ var _tmpl$561 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
25687
25891
  var _tmpl$656 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>This section failed to load</div><div style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem;word-break:break-word></div><button type=button style="padding:0.5rem 0.875rem;border-radius:var(--app-admin-radius-sm);border:1px solid var(--app-admin-border);background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-size:0.875rem;font-weight:500;cursor:pointer">Try again`);
25688
25892
  var _tmpl$749 = /* @__PURE__ */ template(`<div class=app-admin-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-admin-bg)><div role=status aria-label="Loading admin"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-admin-border);border-top-color:var(--app-admin-primary);animation:app-admin-gate-spin 0.8s linear infinite"></div><style>@keyframes app-admin-gate-spin { to { transform: rotate(360deg); } }`);
25689
25893
  var TAB_LABELS = {
@@ -25848,7 +26052,7 @@ function AdminDashboard(props) {
25848
26052
  };
25849
26053
  const topOffset = () => props.topOffset ?? "0px";
25850
26054
  const TabButton = (btnProps) => (() => {
25851
- var _el$ = _tmpl$2126();
26055
+ var _el$ = _tmpl$2127();
25852
26056
  _el$.$$click = () => handleTabClick(btnProps.tab);
25853
26057
  insert(_el$, createComponent(Show, {
25854
26058
  get when() {
@@ -25904,7 +26108,7 @@ function AdminDashboard(props) {
25904
26108
  return visibleGroups();
25905
26109
  },
25906
26110
  children: (group) => [(() => {
25907
- var _el$11 = _tmpl$470();
26111
+ var _el$11 = _tmpl$471();
25908
26112
  insert(_el$11, () => group.label);
25909
26113
  return _el$11;
25910
26114
  })(), createComponent(For, {
@@ -26156,7 +26360,7 @@ function AdminDashboard(props) {
26156
26360
  }
26157
26361
  function RoleForbidden() {
26158
26362
  return (() => {
26159
- var _el$12 = _tmpl$560(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
26363
+ var _el$12 = _tmpl$561(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
26160
26364
  return _el$12;
26161
26365
  })();
26162
26366
  }
@@ -26254,10 +26458,10 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
26254
26458
  return "overview";
26255
26459
  }
26256
26460
  var _tmpl$408 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
26257
- var _tmpl$2127 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
26461
+ var _tmpl$2128 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
26258
26462
  var _tmpl$3104 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
26259
- var _tmpl$471 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
26260
- var _tmpl$561 = /* @__PURE__ */ template(`<div><h3>Subscription`);
26463
+ var _tmpl$475 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
26464
+ var _tmpl$564 = /* @__PURE__ */ template(`<div><h3>Subscription`);
26261
26465
  var _tmpl$657 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
26262
26466
  var _tmpl$750 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
26263
26467
  var _tmpl$842 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
@@ -26289,7 +26493,7 @@ function PatientDashboardPreview(props) {
26289
26493
  },
26290
26494
  keyed: true,
26291
26495
  children: (msg) => (() => {
26292
- var _el$1 = _tmpl$2127(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26496
+ var _el$1 = _tmpl$2128(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
26293
26497
  insert(_el$10, msg);
26294
26498
  _el$11.$$click = () => data.retry();
26295
26499
  return _el$1;
@@ -26311,13 +26515,13 @@ function PatientDashboardPreview(props) {
26311
26515
  return _tmpl$3104();
26312
26516
  },
26313
26517
  children: (profile) => [(() => {
26314
- var _el$13 = _tmpl$471(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
26518
+ var _el$13 = _tmpl$475(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
26315
26519
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
26316
26520
  insert(_el$17, () => profile().email);
26317
26521
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
26318
26522
  return _el$13;
26319
26523
  })(), (() => {
26320
- var _el$18 = _tmpl$561(), _el$19 = _el$18.firstChild;
26524
+ var _el$18 = _tmpl$564(), _el$19 = _el$18.firstChild;
26321
26525
  insert(_el$18, createComponent(Show, {
26322
26526
  get when() {
26323
26527
  return data.subscription();
@@ -26468,7 +26672,7 @@ function PatientDashboardPreview(props) {
26468
26672
  }
26469
26673
  delegateEvents(["click"]);
26470
26674
  var _tmpl$409 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
26471
- var _tmpl$2128 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
26675
+ var _tmpl$2129 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
26472
26676
  var _tmpl$3105 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
26473
26677
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
26474
26678
  function UpdatePaymentMethod(props) {
@@ -26530,7 +26734,7 @@ function UpdatePaymentMethod(props) {
26530
26734
  return memo(() => !!!resolving())() && !noSubscription();
26531
26735
  },
26532
26736
  get children() {
26533
- var _el$3 = _tmpl$2128(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
26737
+ var _el$3 = _tmpl$2129(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
26534
26738
  _el$3.addEventListener("submit", handleSubmit);
26535
26739
  insert(_el$3, createComponent(Show, {
26536
26740
  get when() {
@@ -26615,11 +26819,11 @@ function UpdatePaymentMethod(props) {
26615
26819
  return _el$;
26616
26820
  })();
26617
26821
  }
26618
- var _tmpl$475 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
26619
- var _tmpl$2129 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
26822
+ var _tmpl$476 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
26823
+ var _tmpl$2130 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
26620
26824
  var _tmpl$3106 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
26621
- var _tmpl$476 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
26622
- var _tmpl$564 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
26825
+ var _tmpl$477 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
26826
+ var _tmpl$565 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
26623
26827
  var _tmpl$658 = /* @__PURE__ */ template(`<div><span class=refill__dot aria-hidden=true></span><span class="lab-label refill__label"></span><span class=refill__date></span><span class=refill__rel>`);
26624
26828
  var _tmpl$751 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
26625
26829
  var _tmpl$843 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-savings-note><strong>Member pricing is active on your account.</strong> It applies automatically when you check out.`);
@@ -26635,7 +26839,7 @@ var _tmpl$1521 = /* @__PURE__ */ template(`<button type=button class="portal-btn
26635
26839
  var _tmpl$1621 = /* @__PURE__ */ template(`<li><div class=thread__rail><span class=thread__bead></span></div><div><div class=thread__top><span class="lab-label thread__label">`);
26636
26840
  var _tmpl$1721 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your care team is reviewing your request. You\u2019ll be able to message them here once your consult begins.`);
26637
26841
  var _tmpl$1819 = /* @__PURE__ */ template(`<p class="thread__caption thread__await"data-testid=await-messaging>Your provider will follow up with you about next steps.`);
26638
- var _tmpl$1917 = /* @__PURE__ */ template(`<span class=tracker__dose> \xB7 `);
26842
+ var _tmpl$1918 = /* @__PURE__ */ template(`<span class=tracker__dose> \xB7 `);
26639
26843
  var _tmpl$2017 = /* @__PURE__ */ template(`<div class=tracker data-testid=order-tracker><div class=tracker__intro><span class=lab-label>Your order</span><p class=tracker__med></p></div><ol>`);
26640
26844
  function TrackingChip(props) {
26641
26845
  let copied;
@@ -26653,7 +26857,7 @@ function TrackingChip(props) {
26653
26857
  }
26654
26858
  };
26655
26859
  return (() => {
26656
- var _el$ = _tmpl$2129(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
26860
+ var _el$ = _tmpl$2130(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
26657
26861
  insert(_el$2, () => props.eta);
26658
26862
  _el$4.$$click = copy;
26659
26863
  insert(_el$5, () => props.number);
@@ -26664,7 +26868,7 @@ function TrackingChip(props) {
26664
26868
  return props.url;
26665
26869
  },
26666
26870
  get children() {
26667
- var _el$8 = _tmpl$475(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
26871
+ var _el$8 = _tmpl$476(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
26668
26872
  insert(_el$8, (() => {
26669
26873
  var _c$ = memo(() => !!props.carrier);
26670
26874
  return () => _c$() ? ` with ${props.carrier}` : "";
@@ -26685,13 +26889,13 @@ function OrderTracker(props) {
26685
26889
  return refill();
26686
26890
  },
26687
26891
  children: (r) => (() => {
26688
- var _el$11 = _tmpl$476(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
26892
+ var _el$11 = _tmpl$477(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
26689
26893
  insert(_el$12, createComponent(Show, {
26690
26894
  get when() {
26691
26895
  return !r().pendingFill;
26692
26896
  },
26693
26897
  get fallback() {
26694
- return _tmpl$564();
26898
+ return _tmpl$565();
26695
26899
  },
26696
26900
  get children() {
26697
26901
  var _el$14 = _tmpl$3106(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
@@ -26909,7 +27113,7 @@ function OrderTracker(props) {
26909
27113
  return rx().dosage;
26910
27114
  },
26911
27115
  get children() {
26912
- var _el$61 = _tmpl$1917(); _el$61.firstChild;
27116
+ var _el$61 = _tmpl$1918(); _el$61.firstChild;
26913
27117
  insert(_el$61, () => rx().dosage, null);
26914
27118
  return _el$61;
26915
27119
  }
@@ -26944,8 +27148,8 @@ function OrderTracker(props) {
26944
27148
  });
26945
27149
  }
26946
27150
  delegateEvents(["click"]);
26947
- var _tmpl$477 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
26948
- var _tmpl$2130 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
27151
+ var _tmpl$478 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
27152
+ var _tmpl$2131 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
26949
27153
  var _tmpl$3107 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
26950
27154
  var STATUS_LABEL = {
26951
27155
  pending: "Under review",
@@ -26971,7 +27175,7 @@ function RxRow(props) {
26971
27175
  return props.rx.dosage;
26972
27176
  },
26973
27177
  get children() {
26974
- var _el$4 = _tmpl$477(); _el$4.firstChild;
27178
+ var _el$4 = _tmpl$478(); _el$4.firstChild;
26975
27179
  insert(_el$4, () => props.rx.dosage, null);
26976
27180
  return _el$4;
26977
27181
  }
@@ -26982,7 +27186,7 @@ function RxRow(props) {
26982
27186
  return open();
26983
27187
  },
26984
27188
  get children() {
26985
- var _el$8 = _tmpl$2130();
27189
+ var _el$8 = _tmpl$2131();
26986
27190
  insert(_el$8, createComponent(OrderTracker, {
26987
27191
  get request() {
26988
27192
  return props.request;
@@ -27025,11 +27229,11 @@ function RxRow(props) {
27025
27229
  })();
27026
27230
  }
27027
27231
  delegateEvents(["click"]);
27028
- var _tmpl$478 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
27029
- var _tmpl$2131 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
27232
+ var _tmpl$479 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
27233
+ var _tmpl$2132 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
27030
27234
  var _tmpl$3108 = /* @__PURE__ */ template(`<p class=membership__dose>`);
27031
- var _tmpl$479 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
27032
- var _tmpl$565 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
27235
+ var _tmpl$480 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
27236
+ var _tmpl$566 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
27033
27237
  var _tmpl$659 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
27034
27238
  var _tmpl$752 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
27035
27239
  var _tmpl$844 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
@@ -27080,20 +27284,20 @@ function PlanBilling(props) {
27080
27284
  }
27081
27285
  };
27082
27286
  return (() => {
27083
- var _el$ = _tmpl$478(); _el$.firstChild;
27287
+ var _el$ = _tmpl$479(); _el$.firstChild;
27084
27288
  insert(_el$, createComponent(Show, {
27085
27289
  get when() {
27086
27290
  return primary();
27087
27291
  },
27088
27292
  get fallback() {
27089
27293
  return (() => {
27090
- var _el$3 = _tmpl$2131(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
27294
+ var _el$3 = _tmpl$2132(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
27091
27295
  effect(() => setAttribute(_el$6, "href", props.intakeHref));
27092
27296
  return _el$3;
27093
27297
  })();
27094
27298
  },
27095
27299
  children: (sub) => [(() => {
27096
- var _el$7 = _tmpl$479(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
27300
+ var _el$7 = _tmpl$480(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
27097
27301
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
27098
27302
  insert(_el$1, () => props.brandName);
27099
27303
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -27112,7 +27316,7 @@ function PlanBilling(props) {
27112
27316
  effect(() => className(_el$7, `membership membership--${sub().status}`));
27113
27317
  return _el$7;
27114
27318
  })(), (() => {
27115
- var _el$17 = _tmpl$565(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
27319
+ var _el$17 = _tmpl$566(), _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
27116
27320
  insert(_el$20, () => formatLongDate(sub().createdAt));
27117
27321
  insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
27118
27322
  insert(_el$26, () => formatCents(sub().amountCents), _el$27);
@@ -27204,11 +27408,11 @@ function PlanBilling(props) {
27204
27408
  })();
27205
27409
  }
27206
27410
  delegateEvents(["click"]);
27207
- var _tmpl$480 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
27208
- var _tmpl$2132 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
27411
+ var _tmpl$481 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
27412
+ var _tmpl$2133 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
27209
27413
  var _tmpl$3109 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
27210
- var _tmpl$481 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
27211
- var _tmpl$566 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
27414
+ var _tmpl$485 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
27415
+ var _tmpl$567 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
27212
27416
  var _tmpl$660 = /* @__PURE__ */ template(`<a class=account__support-link>`);
27213
27417
  function pick(member, ...keys) {
27214
27418
  if (!member) return "";
@@ -27250,13 +27454,13 @@ function AccountPanel(props) {
27250
27454
  value: address()
27251
27455
  }].filter((f) => f.value);
27252
27456
  return (() => {
27253
- var _el$ = _tmpl$481(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
27457
+ var _el$ = _tmpl$485(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
27254
27458
  insert(_el$4, createComponent(For, {
27255
27459
  get each() {
27256
27460
  return fields();
27257
27461
  },
27258
27462
  children: (f) => (() => {
27259
- var _el$11 = _tmpl$566(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
27463
+ var _el$11 = _tmpl$567(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
27260
27464
  insert(_el$12, () => f.label);
27261
27465
  insert(_el$13, () => f.value);
27262
27466
  return _el$11;
@@ -27267,7 +27471,7 @@ function AccountPanel(props) {
27267
27471
  return fields().length === 0;
27268
27472
  },
27269
27473
  get children() {
27270
- return _tmpl$480();
27474
+ return _tmpl$481();
27271
27475
  }
27272
27476
  }), _el$0);
27273
27477
  insert(_el$, createComponent(Show, {
@@ -27275,7 +27479,7 @@ function AccountPanel(props) {
27275
27479
  return props.messagingEnabled;
27276
27480
  },
27277
27481
  get children() {
27278
- var _el$6 = _tmpl$2132(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
27482
+ var _el$6 = _tmpl$2133(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
27279
27483
  _el$9.$$click = () => props.onOpenMessages({
27280
27484
  channel: "support",
27281
27485
  category: "account"
@@ -27309,11 +27513,11 @@ function AccountPanel(props) {
27309
27513
  })();
27310
27514
  }
27311
27515
  delegateEvents(["click"]);
27312
- var _tmpl$485 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
27313
- var _tmpl$2133 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
27516
+ var _tmpl$486 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
27517
+ var _tmpl$2134 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
27314
27518
  var _tmpl$3116 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
27315
- var _tmpl$486 = /* @__PURE__ */ template(`<li>`);
27316
- var _tmpl$567 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
27519
+ var _tmpl$487 = /* @__PURE__ */ template(`<li>`);
27520
+ var _tmpl$568 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
27317
27521
  var _tmpl$661 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
27318
27522
  function firstNumber(s) {
27319
27523
  const m = (s || "").match(/\d+(\.\d+)?/);
@@ -27344,7 +27548,7 @@ function MedicationGuide(props) {
27344
27548
  return props.guide.doNotUseIf;
27345
27549
  },
27346
27550
  children: (item) => (() => {
27347
- var _el$45 = _tmpl$486();
27551
+ var _el$45 = _tmpl$487();
27348
27552
  insert(_el$45, item);
27349
27553
  return _el$45;
27350
27554
  })()
@@ -27354,7 +27558,7 @@ function MedicationGuide(props) {
27354
27558
  return props.guide.titration;
27355
27559
  },
27356
27560
  children: (step, i) => (() => {
27357
- var _el$46 = _tmpl$567(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
27561
+ var _el$46 = _tmpl$568(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
27358
27562
  insert(_el$50, () => step.dose);
27359
27563
  insert(_el$51, () => step.phase);
27360
27564
  insert(_el$52, () => step.timeframe);
@@ -27380,7 +27584,7 @@ function MedicationGuide(props) {
27380
27584
  return props.guide.storage;
27381
27585
  },
27382
27586
  children: (item) => (() => {
27383
- var _el$59 = _tmpl$486();
27587
+ var _el$59 = _tmpl$487();
27384
27588
  insert(_el$59, item);
27385
27589
  return _el$59;
27386
27590
  })()
@@ -27391,7 +27595,7 @@ function MedicationGuide(props) {
27391
27595
  return props.guide.contraception;
27392
27596
  },
27393
27597
  get children() {
27394
- var _el$24 = _tmpl$485(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27598
+ var _el$24 = _tmpl$486(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
27395
27599
  insert(_el$26, () => props.guide.contraception);
27396
27600
  return _el$24;
27397
27601
  }
@@ -27401,7 +27605,7 @@ function MedicationGuide(props) {
27401
27605
  return props.guide.sideEffectsCommon;
27402
27606
  },
27403
27607
  children: (item) => (() => {
27404
- var _el$60 = _tmpl$486();
27608
+ var _el$60 = _tmpl$487();
27405
27609
  insert(_el$60, item);
27406
27610
  return _el$60;
27407
27611
  })()
@@ -27411,7 +27615,7 @@ function MedicationGuide(props) {
27411
27615
  return props.guide.sideEffectsSerious;
27412
27616
  },
27413
27617
  children: (item) => (() => {
27414
- var _el$61 = _tmpl$486();
27618
+ var _el$61 = _tmpl$487();
27415
27619
  insert(_el$61, item);
27416
27620
  return _el$61;
27417
27621
  })()
@@ -27421,7 +27625,7 @@ function MedicationGuide(props) {
27421
27625
  return props.guide.whenToCall;
27422
27626
  },
27423
27627
  children: (item) => (() => {
27424
- var _el$62 = _tmpl$486();
27628
+ var _el$62 = _tmpl$487();
27425
27629
  insert(_el$62, item);
27426
27630
  return _el$62;
27427
27631
  })()
@@ -27431,7 +27635,7 @@ function MedicationGuide(props) {
27431
27635
  return props.guide.tips;
27432
27636
  },
27433
27637
  children: (item) => (() => {
27434
- var _el$63 = _tmpl$486();
27638
+ var _el$63 = _tmpl$487();
27435
27639
  insert(_el$63, item);
27436
27640
  return _el$63;
27437
27641
  })()
@@ -27443,13 +27647,13 @@ function MedicationGuide(props) {
27443
27647
  return showDisclaimers();
27444
27648
  },
27445
27649
  get children() {
27446
- var _el$44 = _tmpl$2133();
27650
+ var _el$44 = _tmpl$2134();
27447
27651
  insert(_el$44, createComponent(For, {
27448
27652
  get each() {
27449
27653
  return props.guide.disclaimers;
27450
27654
  },
27451
27655
  children: (item) => (() => {
27452
- var _el$64 = _tmpl$486();
27656
+ var _el$64 = _tmpl$487();
27453
27657
  insert(_el$64, item);
27454
27658
  return _el$64;
27455
27659
  })()
@@ -27470,11 +27674,11 @@ function MedicationGuide(props) {
27470
27674
  })();
27471
27675
  }
27472
27676
  delegateEvents(["click"]);
27473
- var _tmpl$487 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27474
- var _tmpl$2134 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27677
+ var _tmpl$488 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
27678
+ var _tmpl$2135 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
27475
27679
  var _tmpl$3117 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
27476
- var _tmpl$488 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
27477
- var _tmpl$568 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
27680
+ var _tmpl$489 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
27681
+ var _tmpl$569 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
27478
27682
  var _tmpl$664 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
27479
27683
  var _tmpl$753 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
27480
27684
  var _tmpl$845 = /* @__PURE__ */ template(`<button type=button><div class=msg-list__row><span class=msg-list__name-group><span class=msg-list__name></span></span><span class=msg-list__time></span></div><div class=msg-list__row><span class=msg-list__preview>`);
@@ -27490,9 +27694,9 @@ var _tmpl$1522 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
27490
27694
  var _tmpl$1622 = /* @__PURE__ */ template(`<button type=button class="msg-compose__staged-remove msg-compose__staged-remove--inline">Remove file`);
27491
27695
  var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=alert>`);
27492
27696
  var _tmpl$1820 = /* @__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 data-testid=support-compose-back><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 data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</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>`);
27493
- var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
27697
+ var _tmpl$1919 = /* @__PURE__ */ template(`<button type=button>`);
27494
27698
  var _tmpl$2018 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team 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=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
27495
- var _tmpl$2135 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27699
+ var _tmpl$2136 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
27496
27700
  var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
27497
27701
  var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
27498
27702
  var _tmpl$2415 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
@@ -27509,7 +27713,7 @@ var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=a
27509
27713
  var _tmpl$3511 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
27510
27714
  var _tmpl$3611 = /* @__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>`);
27511
27715
  var _tmpl$3711 = /* @__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>`);
27512
- var _tmpl$3810 = /* @__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`);
27716
+ var _tmpl$3811 = /* @__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`);
27513
27717
  var _tmpl$3910 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
27514
27718
  var _tmpl$4010 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel>`);
27515
27719
  var _tmpl$4114 = /* @__PURE__ */ template(`<div class="msg-panel__layout msg-panel__layout--gate">`);
@@ -27715,14 +27919,14 @@ function MessagesPanel(props) {
27715
27919
  }
27716
27920
  }
27717
27921
  const ChannelChip = (p) => (() => {
27718
- var _el$ = _tmpl$487();
27922
+ var _el$ = _tmpl$488();
27719
27923
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
27720
27924
  insert(_el$, createComponent(Show, {
27721
27925
  get when() {
27722
27926
  return memo(() => p.source === "support")() && categoryLabel(p.category);
27723
27927
  },
27724
27928
  children: (label3) => (() => {
27725
- var _el$2 = _tmpl$2134();
27929
+ var _el$2 = _tmpl$2135();
27726
27930
  insert(_el$2, label3);
27727
27931
  return _el$2;
27728
27932
  })()
@@ -27752,7 +27956,7 @@ function MessagesPanel(props) {
27752
27956
  return thread().loadingConversations();
27753
27957
  },
27754
27958
  get children() {
27755
- return _tmpl$488();
27959
+ return _tmpl$489();
27756
27960
  }
27757
27961
  }), null);
27758
27962
  insert(_el$8, createComponent(Show, {
@@ -27760,7 +27964,7 @@ function MessagesPanel(props) {
27760
27964
  return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
27761
27965
  },
27762
27966
  get children() {
27763
- var _el$0 = _tmpl$568(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
27967
+ var _el$0 = _tmpl$569(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
27764
27968
  insert(_el$11, createComponent(Show, {
27765
27969
  get when() {
27766
27970
  return channel() === "care";
@@ -27971,7 +28175,7 @@ function MessagesPanel(props) {
27971
28175
  insert(_el$44, createComponent(For, {
27972
28176
  each: SUPPORT_CATEGORIES,
27973
28177
  children: (c) => (() => {
27974
- var _el$56 = _tmpl$1918();
28178
+ var _el$56 = _tmpl$1919();
27975
28179
  _el$56.$$click = () => setNewCategory((prev) => prev === c.key ? null : c.key);
27976
28180
  insert(_el$56, () => c.label);
27977
28181
  effect((_p$) => {
@@ -28084,7 +28288,7 @@ function MessagesPanel(props) {
28084
28288
  return careUnreadCount() > 0;
28085
28289
  },
28086
28290
  get children() {
28087
- var _el$77 = _tmpl$2135();
28291
+ var _el$77 = _tmpl$2136();
28088
28292
  insert(_el$77, careUnreadCount);
28089
28293
  return _el$77;
28090
28294
  }
@@ -28188,7 +28392,7 @@ function MessagesPanel(props) {
28188
28392
  return thread().loadingMessages();
28189
28393
  },
28190
28394
  get children() {
28191
- return _tmpl$488();
28395
+ return _tmpl$489();
28192
28396
  }
28193
28397
  }), _el$110);
28194
28398
  insert(_el$108, createComponent(For, {
@@ -28213,7 +28417,7 @@ function MessagesPanel(props) {
28213
28417
  return pendingFile();
28214
28418
  },
28215
28419
  children: (file) => (() => {
28216
- var _el$120 = _tmpl$3810(), _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling;
28420
+ var _el$120 = _tmpl$3811(), _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling;
28217
28421
  insert(_el$120, () => file().name, _el$122);
28218
28422
  insert(_el$122, () => formatFileSize(file().size));
28219
28423
  _el$123.$$click = () => setPendingFile(null);
@@ -28372,11 +28576,11 @@ function MessagesPanel(props) {
28372
28576
  })();
28373
28577
  }
28374
28578
  delegateEvents(["click", "input", "keydown"]);
28375
- var _tmpl$489 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
28376
- var _tmpl$2136 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
28579
+ var _tmpl$490 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
28580
+ var _tmpl$2137 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
28377
28581
  var _tmpl$3119 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
28378
- var _tmpl$490 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
28379
- var _tmpl$569 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
28582
+ var _tmpl$491 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
28583
+ var _tmpl$570 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
28380
28584
  var _tmpl$665 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
28381
28585
  var _tmpl$754 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
28382
28586
  var _tmpl$846 = /* @__PURE__ */ template(`<article class=history-transcript><header class=history-transcript__head><h2></h2><p class=history-transcript__meta>Submitted <!>. Your answers are shown exactly as they were at the time \u2014 they aren't updated afterwards.`);
@@ -28411,7 +28615,7 @@ function SurveyHistory() {
28411
28615
  return !list.error;
28412
28616
  },
28413
28617
  get fallback() {
28414
- return _tmpl$2136();
28618
+ return _tmpl$2137();
28415
28619
  },
28416
28620
  get children() {
28417
28621
  return createComponent(Show, {
@@ -28422,13 +28626,13 @@ function SurveyHistory() {
28422
28626
  return _tmpl$3119();
28423
28627
  },
28424
28628
  get children() {
28425
- var _el$ = _tmpl$489();
28629
+ var _el$ = _tmpl$490();
28426
28630
  insert(_el$, createComponent(For, {
28427
28631
  get each() {
28428
28632
  return list();
28429
28633
  },
28430
28634
  children: (item) => (() => {
28431
- var _el$4 = _tmpl$490(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28635
+ var _el$4 = _tmpl$491(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
28432
28636
  _el$5.$$click = () => setSelectedId(item.id);
28433
28637
  insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
28434
28638
  insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
@@ -28441,7 +28645,7 @@ function SurveyHistory() {
28441
28645
  }
28442
28646
  });
28443
28647
  const DetailView = () => (() => {
28444
- var _el$8 = _tmpl$569(), _el$9 = _el$8.firstChild;
28648
+ var _el$8 = _tmpl$570(), _el$9 = _el$8.firstChild;
28445
28649
  _el$9.$$click = () => setSelectedId(null);
28446
28650
  insert(_el$8, createComponent(Show, {
28447
28651
  get when() {
@@ -28519,11 +28723,11 @@ function SurveyHistory() {
28519
28723
  delegateEvents(["click"]);
28520
28724
 
28521
28725
  // src/pages/MemberPortal.tsx
28522
- var _tmpl$491 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28523
- var _tmpl$2137 = /* @__PURE__ */ template(`<span>`);
28726
+ var _tmpl$495 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
28727
+ var _tmpl$2138 = /* @__PURE__ */ template(`<span>`);
28524
28728
  var _tmpl$3120 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
28525
- var _tmpl$495 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
28526
- var _tmpl$570 = /* @__PURE__ */ template(`<div class=rx-stack>`);
28729
+ var _tmpl$496 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
28730
+ var _tmpl$571 = /* @__PURE__ */ template(`<div class=rx-stack>`);
28527
28731
  var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
28528
28732
  var _tmpl$755 = /* @__PURE__ */ template(`<div class="request-status__error portal-state"><p class=request-status__error-text></p><button type=button class="portal-btn portal-btn--ghost">Try again`);
28529
28733
  var _tmpl$847 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
@@ -28666,7 +28870,7 @@ function MemberPortal(props) {
28666
28870
  return memo(() => item.key === "tracker")() && inMotion();
28667
28871
  },
28668
28872
  get children() {
28669
- return _tmpl$491();
28873
+ return _tmpl$495();
28670
28874
  }
28671
28875
  }), null);
28672
28876
  insert(_el$, createComponent(Show, {
@@ -28674,7 +28878,7 @@ function MemberPortal(props) {
28674
28878
  return memo(() => item.key === "messages")() && unreadTotal() > 0;
28675
28879
  },
28676
28880
  get children() {
28677
- var _el$5 = _tmpl$2137();
28881
+ var _el$5 = _tmpl$2138();
28678
28882
  insert(_el$5, (() => {
28679
28883
  var _c$ = memo(() => unreadTotal() > 99);
28680
28884
  return () => _c$() ? "99+" : unreadTotal();
@@ -28732,7 +28936,7 @@ function MemberPortal(props) {
28732
28936
  });
28733
28937
  },
28734
28938
  children: (primary) => (() => {
28735
- var _el$6 = _tmpl$570();
28939
+ var _el$6 = _tmpl$571();
28736
28940
  insert(_el$6, createComponent(OrderTracker, {
28737
28941
  get request() {
28738
28942
  return data.toTrackerRequest(primary());
@@ -28762,7 +28966,7 @@ function MemberPortal(props) {
28762
28966
  return data.otherRx().length > 0;
28763
28967
  },
28764
28968
  get children() {
28765
- var _el$7 = _tmpl$495(); _el$7.firstChild;
28969
+ var _el$7 = _tmpl$496(); _el$7.firstChild;
28766
28970
  insert(_el$7, createComponent(For, {
28767
28971
  get each() {
28768
28972
  return data.otherRx();
@@ -28985,11 +29189,11 @@ function MemberPortal(props) {
28985
29189
  })();
28986
29190
  }
28987
29191
  delegateEvents(["click"]);
28988
- var _tmpl$496 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
28989
- var _tmpl$2138 = /* @__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)>Overview`);
29192
+ var _tmpl$497 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
29193
+ var _tmpl$2139 = /* @__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)>Overview`);
28990
29194
  var _tmpl$3121 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
28991
- var _tmpl$497 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
28992
- var _tmpl$571 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
29195
+ var _tmpl$498 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
29196
+ var _tmpl$574 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
28993
29197
  function formatMoney(cents) {
28994
29198
  return `$${(cents / 100).toFixed(2)}`;
28995
29199
  }
@@ -29022,13 +29226,13 @@ function AffiliateOverview() {
29022
29226
  value: `${(s.conversionRate * 100).toFixed(1)}%`
29023
29227
  }];
29024
29228
  return (() => {
29025
- var _el$ = _tmpl$2138(); _el$.firstChild;
29229
+ var _el$ = _tmpl$2139(); _el$.firstChild;
29026
29230
  insert(_el$, createComponent(Show, {
29027
29231
  get when() {
29028
29232
  return isPending();
29029
29233
  },
29030
29234
  get children() {
29031
- return _tmpl$496();
29235
+ return _tmpl$497();
29032
29236
  }
29033
29237
  }), null);
29034
29238
  insert(_el$, createComponent(Show, {
@@ -29039,13 +29243,13 @@ function AffiliateOverview() {
29039
29243
  return _tmpl$3121();
29040
29244
  },
29041
29245
  children: (s) => (() => {
29042
- var _el$5 = _tmpl$497();
29246
+ var _el$5 = _tmpl$498();
29043
29247
  insert(_el$5, createComponent(For, {
29044
29248
  get each() {
29045
29249
  return cards(s());
29046
29250
  },
29047
29251
  children: (card) => (() => {
29048
- var _el$6 = _tmpl$571(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
29252
+ var _el$6 = _tmpl$574(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
29049
29253
  insert(_el$7, () => card.label);
29050
29254
  insert(_el$8, () => card.value);
29051
29255
  return _el$6;
@@ -29057,11 +29261,11 @@ function AffiliateOverview() {
29057
29261
  return _el$;
29058
29262
  })();
29059
29263
  }
29060
- var _tmpl$498 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
29061
- var _tmpl$2139 = /* @__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)>Conversions`);
29264
+ var _tmpl$499 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
29265
+ var _tmpl$2140 = /* @__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)>Conversions`);
29062
29266
  var _tmpl$3122 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
29063
- var _tmpl$499 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
29064
- var _tmpl$574 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
29267
+ var _tmpl$4100 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
29268
+ var _tmpl$575 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
29065
29269
  function formatMoney2(cents) {
29066
29270
  return `$${(cents / 100).toFixed(2)}`;
29067
29271
  }
@@ -29099,7 +29303,7 @@ function AffiliateConversions() {
29099
29303
  limit: 100
29100
29304
  });
29101
29305
  return (() => {
29102
- var _el$ = _tmpl$2139(); _el$.firstChild;
29306
+ var _el$ = _tmpl$2140(); _el$.firstChild;
29103
29307
  insert(_el$, createComponent(Show, {
29104
29308
  get when() {
29105
29309
  return (conversions() ?? []).length > 0;
@@ -29108,13 +29312,13 @@ function AffiliateConversions() {
29108
29312
  return _tmpl$3122();
29109
29313
  },
29110
29314
  get children() {
29111
- var _el$3 = _tmpl$498(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
29315
+ var _el$3 = _tmpl$499(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
29112
29316
  insert(_el$10, createComponent(For, {
29113
29317
  get each() {
29114
29318
  return conversions();
29115
29319
  },
29116
29320
  children: (c) => (() => {
29117
- var _el$12 = _tmpl$574(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
29321
+ var _el$12 = _tmpl$575(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
29118
29322
  insert(_el$13, () => formatDate4(c.createdAt));
29119
29323
  insert(_el$14, () => c.paymentType, null);
29120
29324
  insert(_el$14, createComponent(Show, {
@@ -29122,7 +29326,7 @@ function AffiliateConversions() {
29122
29326
  return c.tier === 2;
29123
29327
  },
29124
29328
  get children() {
29125
- return _tmpl$499();
29329
+ return _tmpl$4100();
29126
29330
  }
29127
29331
  }), null);
29128
29332
  insert(_el$16, () => formatMoney2(c.orderTotalCents));
@@ -29194,9 +29398,9 @@ function td() {
29194
29398
  };
29195
29399
  }
29196
29400
  var _tmpl$500 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
29197
- var _tmpl$2140 = /* @__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)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
29401
+ var _tmpl$2141 = /* @__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)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
29198
29402
  var _tmpl$3123 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
29199
- var _tmpl$4100 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
29403
+ var _tmpl$4101 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
29200
29404
  function formatDate5(iso) {
29201
29405
  const d = new Date(iso);
29202
29406
  if (Number.isNaN(d.getTime())) return iso;
@@ -29229,7 +29433,7 @@ function AffiliateDownline() {
29229
29433
  downline
29230
29434
  } = useAffiliateDownline();
29231
29435
  return (() => {
29232
- var _el$ = _tmpl$2140(), _el$2 = _el$.firstChild; _el$2.nextSibling;
29436
+ var _el$ = _tmpl$2141(), _el$2 = _el$.firstChild; _el$2.nextSibling;
29233
29437
  insert(_el$, createComponent(Show, {
29234
29438
  get when() {
29235
29439
  return (downline() ?? []).length > 0;
@@ -29244,7 +29448,7 @@ function AffiliateDownline() {
29244
29448
  return downline();
29245
29449
  },
29246
29450
  children: (d) => (() => {
29247
- var _el$12 = _tmpl$4100(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
29451
+ var _el$12 = _tmpl$4101(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
29248
29452
  insert(_el$13, () => d.affiliateCode);
29249
29453
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
29250
29454
  insert(_el$16, () => d.status);
@@ -29308,7 +29512,7 @@ function td2() {
29308
29512
  };
29309
29513
  }
29310
29514
  var _tmpl$501 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
29311
- var _tmpl$2141 = /* @__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)>Referral link`);
29515
+ var _tmpl$2142 = /* @__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)>Referral link`);
29312
29516
  var _tmpl$3124 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
29313
29517
  function AffiliateReferralLink() {
29314
29518
  const {
@@ -29334,7 +29538,7 @@ function AffiliateReferralLink() {
29334
29538
  }
29335
29539
  }
29336
29540
  return (() => {
29337
- var _el$ = _tmpl$2141(); _el$.firstChild;
29541
+ var _el$ = _tmpl$2142(); _el$.firstChild;
29338
29542
  insert(_el$, createComponent(Show, {
29339
29543
  get when() {
29340
29544
  return homepageLink();
@@ -29355,9 +29559,9 @@ function AffiliateReferralLink() {
29355
29559
  }
29356
29560
  delegateEvents(["click"]);
29357
29561
  var _tmpl$505 = /* @__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.`);
29358
- var _tmpl$2142 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29562
+ var _tmpl$2143 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
29359
29563
  var _tmpl$3125 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
29360
- var _tmpl$4101 = /* @__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)>`);
29564
+ var _tmpl$4102 = /* @__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)>`);
29361
29565
  var STATUS_LABEL2 = {
29362
29566
  pending: "Pending approval",
29363
29567
  active: "Active",
@@ -29398,7 +29602,7 @@ function AffiliateSettings() {
29398
29602
  return affiliate();
29399
29603
  },
29400
29604
  get fallback() {
29401
- return _tmpl$2142();
29605
+ return _tmpl$2143();
29402
29606
  },
29403
29607
  children: (a) => (() => {
29404
29608
  var _el$7 = _tmpl$3125();
@@ -29407,7 +29611,7 @@ function AffiliateSettings() {
29407
29611
  return rows(a());
29408
29612
  },
29409
29613
  children: (row) => (() => {
29410
- var _el$8 = _tmpl$4101(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29614
+ var _el$8 = _tmpl$4102(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
29411
29615
  insert(_el$9, () => row.label);
29412
29616
  insert(_el$0, () => row.value);
29413
29617
  return _el$8;
@@ -29424,9 +29628,9 @@ delegateEvents(["click"]);
29424
29628
 
29425
29629
  // src/pages/AffiliatePortal.tsx
29426
29630
  var _tmpl$506 = /* @__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>`);
29427
- var _tmpl$2143 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29631
+ var _tmpl$2144 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
29428
29632
  var _tmpl$3126 = /* @__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">`);
29429
- var _tmpl$4102 = /* @__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); } }`);
29633
+ var _tmpl$4103 = /* @__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); } }`);
29430
29634
  var TAB_LABELS2 = {
29431
29635
  overview: "Overview",
29432
29636
  conversions: "Conversions",
@@ -29487,7 +29691,7 @@ function AffiliatePortal(props) {
29487
29691
  return props.tabIcons?.[tab];
29488
29692
  },
29489
29693
  get children() {
29490
- var _el$10 = _tmpl$2143();
29694
+ var _el$10 = _tmpl$2144();
29491
29695
  effect(() => className(_el$10, props.tabIcons[tab]));
29492
29696
  return _el$10;
29493
29697
  }
@@ -29569,7 +29773,7 @@ function AffiliatePortal(props) {
29569
29773
  }
29570
29774
  function AffiliateGateSpinner(props) {
29571
29775
  return (() => {
29572
- var _el$11 = _tmpl$4102(); _el$11.firstChild;
29776
+ var _el$11 = _tmpl$4103(); _el$11.firstChild;
29573
29777
  effect((_p$) => {
29574
29778
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
29575
29779
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -29629,10 +29833,10 @@ delegateEvents(["input", "click"]);
29629
29833
 
29630
29834
  // src/pages/AffiliateRegister.tsx
29631
29835
  var _tmpl$508 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
29632
- var _tmpl$2144 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
29836
+ var _tmpl$2145 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
29633
29837
  var _tmpl$3127 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
29634
- var _tmpl$4103 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
29635
- var _tmpl$575 = /* @__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">`);
29838
+ var _tmpl$4104 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
29839
+ var _tmpl$576 = /* @__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">`);
29636
29840
  var _tmpl$667 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
29637
29841
  var _tmpl$756 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius-sm);font-size:0.8125rem;line-height:1.5;color:var(--app-affiliate-fg-muted)">A customer's purchase earns you commission only if they reached the site through your referral link \u2014 the site address with <code>?ref=</code> appended:<div style=font-weight:600;word-break:break-all;margin-top:0.25rem;color:var(--app-affiliate-fg)>/?ref=</div>Make sure any marketing materials use that full link for tracking, not just the website address itself.</div><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">`);
29638
29842
  var _tmpl$848 = /* @__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:28rem;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"><div><h1 style="font-family:var(--app-affiliate-font-display);margin:0 0 0.5rem;font-size:1.5rem">Become an affiliate</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>New applications are reviewed by an admin before activation.`);
@@ -29693,7 +29897,7 @@ function AffiliateRegister(props) {
29693
29897
  insert(_el$6, createComponent(Row2, {
29694
29898
  label: "Last name",
29695
29899
  get children() {
29696
- var _el$8 = _tmpl$2144();
29900
+ var _el$8 = _tmpl$2145();
29697
29901
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
29698
29902
  effect((_$p) => style(_el$8, inputStyle2(), _$p));
29699
29903
  effect(() => _el$8.value = lastName());
@@ -29729,7 +29933,7 @@ function AffiliateRegister(props) {
29729
29933
  label: "Affiliate code",
29730
29934
  hint: "The handle in your referral URL (4+ characters)",
29731
29935
  get children() {
29732
- var _el$0 = _tmpl$4103();
29936
+ var _el$0 = _tmpl$4104();
29733
29937
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
29734
29938
  effect((_$p) => style(_el$0, inputStyle2(), _$p));
29735
29939
  effect(() => _el$0.value = affiliateCode());
@@ -29744,7 +29948,7 @@ function AffiliateRegister(props) {
29744
29948
  return error();
29745
29949
  },
29746
29950
  get children() {
29747
- var _el$17 = _tmpl$575();
29951
+ var _el$17 = _tmpl$576();
29748
29952
  insert(_el$17, error);
29749
29953
  return _el$17;
29750
29954
  }
@@ -29823,9 +30027,9 @@ function linkStyle() {
29823
30027
  }
29824
30028
  delegateEvents(["input", "click"]);
29825
30029
  var _tmpl$509 = /* @__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">`);
29826
- var _tmpl$2145 = /* @__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?`);
30030
+ var _tmpl$2146 = /* @__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?`);
29827
30031
  var _tmpl$3128 = /* @__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`);
29828
- var _tmpl$4104 = /* @__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">`);
30032
+ var _tmpl$4105 = /* @__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">`);
29829
30033
  function AffiliateLogin(props) {
29830
30034
  const [email, setEmail] = createSignal("");
29831
30035
  const [password, setPassword] = createSignal("");
@@ -29845,7 +30049,7 @@ function AffiliateLogin(props) {
29845
30049
  }
29846
30050
  }
29847
30051
  return (() => {
29848
- var _el$ = _tmpl$4104(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _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$1 = _el$8.nextSibling;
30052
+ var _el$ = _tmpl$4105(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _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$1 = _el$8.nextSibling;
29849
30053
  _el$4.addEventListener("submit", handleSubmit);
29850
30054
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29851
30055
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -29872,7 +30076,7 @@ function AffiliateLogin(props) {
29872
30076
  return props.onNavigateForgotPassword;
29873
30077
  },
29874
30078
  get children() {
29875
- var _el$10 = _tmpl$2145();
30079
+ var _el$10 = _tmpl$2146();
29876
30080
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
29877
30081
  return _el$10;
29878
30082
  }
@@ -29930,11 +30134,11 @@ function inputStyle3() {
29930
30134
  };
29931
30135
  }
29932
30136
  delegateEvents(["input", "click"]);
29933
- var _tmpl$576 = /* @__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">`);
29934
- var _tmpl$2146 = /* @__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">`);
30137
+ var _tmpl$577 = /* @__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">`);
30138
+ var _tmpl$2147 = /* @__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">`);
29935
30139
  var _tmpl$3129 = /* @__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`);
29936
- var _tmpl$4105 = /* @__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">`);
29937
- var _tmpl$577 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
30140
+ var _tmpl$4106 = /* @__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">`);
30141
+ var _tmpl$578 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
29938
30142
  var _tmpl$668 = /* @__PURE__ */ template(`<button type=button 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;cursor:pointer">Back to sign in`);
29939
30143
  function ForgotPasswordPage(props) {
29940
30144
  const [email, setEmail] = createSignal("");
@@ -29965,10 +30169,10 @@ function ForgotPasswordPage(props) {
29965
30169
  },
29966
30170
  get fallback() {
29967
30171
  return [(() => {
29968
- var _el$0 = _tmpl$4105();
30172
+ var _el$0 = _tmpl$4106();
29969
30173
  insert(_el$0, message);
29970
30174
  return _el$0;
29971
- })(), _tmpl$577(), createComponent(Show, {
30175
+ })(), _tmpl$578(), createComponent(Show, {
29972
30176
  get when() {
29973
30177
  return props.onDone;
29974
30178
  },
@@ -29980,7 +30184,7 @@ function ForgotPasswordPage(props) {
29980
30184
  })];
29981
30185
  },
29982
30186
  get children() {
29983
- var _el$4 = _tmpl$2146(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30187
+ var _el$4 = _tmpl$2147(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
29984
30188
  _el$4.addEventListener("submit", handleSubmit);
29985
30189
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
29986
30190
  insert(_el$4, createComponent(Show, {
@@ -29988,7 +30192,7 @@ function ForgotPasswordPage(props) {
29988
30192
  return error();
29989
30193
  },
29990
30194
  get children() {
29991
- var _el$8 = _tmpl$576();
30195
+ var _el$8 = _tmpl$577();
29992
30196
  insert(_el$8, error);
29993
30197
  return _el$8;
29994
30198
  }
@@ -30038,10 +30242,10 @@ function inputStyle4() {
30038
30242
  };
30039
30243
  }
30040
30244
  delegateEvents(["input", "click"]);
30041
- var _tmpl$578 = /* @__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">`);
30042
- var _tmpl$2147 = /* @__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">`);
30245
+ var _tmpl$579 = /* @__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">`);
30246
+ var _tmpl$2148 = /* @__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">`);
30043
30247
  var _tmpl$3130 = /* @__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`);
30044
- var _tmpl$4106 = /* @__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">`);
30248
+ var _tmpl$4107 = /* @__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">`);
30045
30249
  function queryParam(name) {
30046
30250
  if (typeof window === "undefined") return "";
30047
30251
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -30088,13 +30292,13 @@ function ResetPasswordPage(props) {
30088
30292
  },
30089
30293
  get fallback() {
30090
30294
  return (() => {
30091
- var _el$11 = _tmpl$4106();
30295
+ var _el$11 = _tmpl$4107();
30092
30296
  insert(_el$11, message);
30093
30297
  return _el$11;
30094
30298
  })();
30095
30299
  },
30096
30300
  get children() {
30097
- var _el$4 = _tmpl$2147(), _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;
30301
+ var _el$4 = _tmpl$2148(), _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;
30098
30302
  _el$4.addEventListener("submit", handleSubmit);
30099
30303
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
30100
30304
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -30103,7 +30307,7 @@ function ResetPasswordPage(props) {
30103
30307
  return error();
30104
30308
  },
30105
30309
  get children() {
30106
- var _el$1 = _tmpl$578();
30310
+ var _el$1 = _tmpl$579();
30107
30311
  insert(_el$1, error);
30108
30312
  return _el$1;
30109
30313
  }
@@ -30158,10 +30362,10 @@ function inputStyle5() {
30158
30362
  };
30159
30363
  }
30160
30364
  delegateEvents(["input"]);
30161
- var _tmpl$579 = /* @__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">`);
30162
- var _tmpl$2148 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a 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">`);
30365
+ var _tmpl$580 = /* @__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">`);
30366
+ var _tmpl$2149 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a 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">`);
30163
30367
  var _tmpl$3131 = /* @__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>Accept your admin invite`);
30164
- var _tmpl$4107 = /* @__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">`);
30368
+ var _tmpl$4108 = /* @__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">`);
30165
30369
  function queryParam2(name) {
30166
30370
  if (typeof window === "undefined") return "";
30167
30371
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -30213,13 +30417,13 @@ function AcceptAdminInvitePage(props) {
30213
30417
  },
30214
30418
  get fallback() {
30215
30419
  return (() => {
30216
- var _el$11 = _tmpl$4107();
30420
+ var _el$11 = _tmpl$4108();
30217
30421
  insert(_el$11, message);
30218
30422
  return _el$11;
30219
30423
  })();
30220
30424
  },
30221
30425
  get children() {
30222
- var _el$4 = _tmpl$2148(), _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;
30426
+ var _el$4 = _tmpl$2149(), _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;
30223
30427
  _el$4.addEventListener("submit", handleSubmit);
30224
30428
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
30225
30429
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -30228,7 +30432,7 @@ function AcceptAdminInvitePage(props) {
30228
30432
  return error();
30229
30433
  },
30230
30434
  get children() {
30231
- var _el$1 = _tmpl$579();
30435
+ var _el$1 = _tmpl$580();
30232
30436
  insert(_el$1, error);
30233
30437
  return _el$1;
30234
30438
  }
@@ -30283,11 +30487,11 @@ function inputStyle6() {
30283
30487
  };
30284
30488
  }
30285
30489
  delegateEvents(["input"]);
30286
- var _tmpl$580 = /* @__PURE__ */ template(`<div>`);
30287
- var _tmpl$2149 = /* @__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>`);
30490
+ var _tmpl$581 = /* @__PURE__ */ template(`<div>`);
30491
+ var _tmpl$2150 = /* @__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>`);
30288
30492
  var _tmpl$3132 = /* @__PURE__ */ template(`<button type=button>Back to login`);
30289
- var _tmpl$4108 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
30290
- var _tmpl$581 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
30493
+ var _tmpl$4109 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
30494
+ var _tmpl$584 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
30291
30495
  function AffiliateForgotPassword(props) {
30292
30496
  const [email, setEmail] = createSignal("");
30293
30497
  const [submitting, setSubmitting] = createSignal(false);
@@ -30310,20 +30514,20 @@ function AffiliateForgotPassword(props) {
30310
30514
  }
30311
30515
  }
30312
30516
  return (() => {
30313
- var _el$ = _tmpl$4108(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30517
+ var _el$ = _tmpl$4109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
30314
30518
  insert(_el$2, createComponent(Show, {
30315
30519
  get when() {
30316
30520
  return !message();
30317
30521
  },
30318
30522
  get fallback() {
30319
30523
  return (() => {
30320
- var _el$1 = _tmpl$581();
30524
+ var _el$1 = _tmpl$584();
30321
30525
  insert(_el$1, message);
30322
30526
  return _el$1;
30323
30527
  })();
30324
30528
  },
30325
30529
  get children() {
30326
- var _el$4 = _tmpl$2149(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30530
+ var _el$4 = _tmpl$2150(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
30327
30531
  _el$4.addEventListener("submit", handleSubmit);
30328
30532
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
30329
30533
  insert(_el$4, createComponent(Show, {
@@ -30331,7 +30535,7 @@ function AffiliateForgotPassword(props) {
30331
30535
  return error();
30332
30536
  },
30333
30537
  get children() {
30334
- var _el$8 = _tmpl$580();
30538
+ var _el$8 = _tmpl$581();
30335
30539
  insert(_el$8, error);
30336
30540
  effect((_$p) => style(_el$8, errorStyle(), _$p));
30337
30541
  return _el$8;
@@ -30466,10 +30670,10 @@ function linkStyle2() {
30466
30670
  };
30467
30671
  }
30468
30672
  delegateEvents(["input", "click"]);
30469
- var _tmpl$584 = /* @__PURE__ */ template(`<div>`);
30470
- var _tmpl$2150 = /* @__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>`);
30673
+ var _tmpl$585 = /* @__PURE__ */ template(`<div>`);
30674
+ var _tmpl$2151 = /* @__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>`);
30471
30675
  var _tmpl$3133 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
30472
- var _tmpl$4109 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
30676
+ var _tmpl$4115 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
30473
30677
  function queryParam3(name) {
30474
30678
  if (typeof window === "undefined") return "";
30475
30679
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -30519,10 +30723,10 @@ function AffiliateResetPassword(props) {
30519
30723
  return !done();
30520
30724
  },
30521
30725
  get fallback() {
30522
- return _tmpl$4109();
30726
+ return _tmpl$4115();
30523
30727
  },
30524
30728
  get children() {
30525
- var _el$4 = _tmpl$2150(), _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;
30729
+ var _el$4 = _tmpl$2151(), _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;
30526
30730
  _el$4.addEventListener("submit", handleSubmit);
30527
30731
  insert(_el$5, createComponent(AffiliatePasswordInput, {
30528
30732
  required: true,
@@ -30547,7 +30751,7 @@ function AffiliateResetPassword(props) {
30547
30751
  return error();
30548
30752
  },
30549
30753
  get children() {
30550
- var _el$9 = _tmpl$584();
30754
+ var _el$9 = _tmpl$585();
30551
30755
  insert(_el$9, error);
30552
30756
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
30553
30757
  return _el$9;
@@ -30646,5 +30850,5 @@ function primaryButtonStyle2(submitting) {
30646
30850
  }
30647
30851
 
30648
30852
  export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AcceptAdminInvitePage, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
30649
- //# sourceMappingURL=AY7MYFVF.js.map
30650
- //# sourceMappingURL=AY7MYFVF.js.map
30853
+ //# sourceMappingURL=B3IHYFCS.js.map
30854
+ //# sourceMappingURL=B3IHYFCS.js.map