@apextelemed/partner-core 0.11.0 → 0.12.0-dev.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/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/{ALS5FXNC.jsx → 2KT2KDH2.jsx} +2 -2
  5. package/dist/chunk/{WO4H2CXD.jsx → 2YG6QASH.jsx} +269 -102
  6. package/dist/chunk/{A3XK3UAQ.jsx → BJXNZYUF.jsx} +2 -2
  7. package/dist/chunk/{A56QXD45.js → FTCGYXXP.js} +3 -3
  8. package/dist/chunk/{A56QXD45.js.map → FTCGYXXP.js.map} +1 -1
  9. package/dist/chunk/{RYISMGS2.jsx → GDKKCH5S.jsx} +5 -5
  10. package/dist/chunk/{6K2CMG26.js → GKVOO7MO.js} +3 -3
  11. package/dist/chunk/{6K2CMG26.js.map → GKVOO7MO.js.map} +1 -1
  12. package/dist/chunk/{6OP52OQK.jsx → HGPLI3DF.jsx} +2 -2
  13. package/dist/chunk/{SIXC23N6.jsx → JBYV7POQ.jsx} +25 -4
  14. package/dist/chunk/{POIS4SBW.js → JZS2FNNX.js} +415 -240
  15. package/dist/chunk/JZS2FNNX.js.map +1 -0
  16. package/dist/chunk/{OBFYSGB6.jsx → KIT35L4T.jsx} +22 -4
  17. package/dist/chunk/{PT6E3DLE.js → NHKEFETN.js} +3 -3
  18. package/dist/chunk/{PT6E3DLE.js.map → NHKEFETN.js.map} +1 -1
  19. package/dist/chunk/{WL6HP6BE.js → YNSFBOWV.js} +26 -5
  20. package/dist/chunk/YNSFBOWV.js.map +1 -0
  21. package/dist/chunk/{5W6SC6JO.js → ZGRTE3DX.js} +6 -6
  22. package/dist/chunk/{5W6SC6JO.js.map → ZGRTE3DX.js.map} +1 -1
  23. package/dist/chunk/{CLPOTUII.js → ZTLXI4Y4.js} +23 -5
  24. package/dist/chunk/ZTLXI4Y4.js.map +1 -0
  25. package/dist/{client-DsIvVM5a.d.ts → client-5akRVYcz.d.ts} +35 -1
  26. package/dist/flows/index.d.ts +10 -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/CLPOTUII.js.map +0 -1
  40. package/dist/chunk/POIS4SBW.js.map +0 -1
  41. package/dist/chunk/WL6HP6BE.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, 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, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './WL6HP6BE.js';
3
- import { fetchFunnelConfig } from './6K2CMG26.js';
2
+ import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, 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, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './YNSFBOWV.js';
3
+ import { fetchFunnelConfig } from './GKVOO7MO.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './PT6E3DLE.js';
6
- import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './CLPOTUII.js';
5
+ import { cart_default, auth_default, affiliateAuth_default } from './NHKEFETN.js';
6
+ import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './ZTLXI4Y4.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
8
- import { createContext, createEffect, on, Show, For, createResource, createSignal, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
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';
10
10
  import { Node, Editor } from '@tiptap/core';
11
11
  import StarterKit from '@tiptap/starter-kit';
@@ -22220,6 +22220,9 @@ function SequenceResults() {
22220
22220
  })();
22221
22221
  }
22222
22222
  delegateEvents(["click"]);
22223
+ var [supportChannelMode, setSupportChannelMode] = createSignal(null);
22224
+
22225
+ // src/pages/admin/EmailNotifications.tsx
22223
22226
  var _tmpl$375 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
22224
22227
  var _tmpl$2107 = /* @__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">`);
22225
22228
  var _tmpl$376 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
@@ -22231,7 +22234,11 @@ var _tmpl$836 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin
22231
22234
  var _tmpl$933 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(15rem, 1fr));gap:1rem"><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><div>Days before renewal</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div><div style=display:flex;gap:0.5rem><input type=number class=app-admin-input min=1 max=90 placeholder="e.g. 7"aria-label="Add days before"style=width:6rem><button type=button class="app-admin-btn app-admin-btn-sm">Add</button></div></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Days before expiry</span><input type=number class=app-admin-input min=7 max=90></label></div><div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.5rem><label style=display:grid;gap:0.25rem><span>Every (days)</span><input type=number class=app-admin-input min=1 max=30></label><label style=display:grid;gap:0.25rem><span>At most (nudges)</span><input type=number class=app-admin-input min=1 max=20>`);
22232
22235
  var _tmpl$029 = /* @__PURE__ */ template(`<button type=button style=background:none;border:none;cursor:pointer;color:inherit;padding:0>&times;`);
22233
22236
  var _tmpl$1124 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none;display:inline-flex;gap:0.375rem>d`);
22234
- var _tmpl$1023 = /* @__PURE__ */ template(`<div>`);
22237
+ var _tmpl$1023 = /* @__PURE__ */ template(`<label style=display:flex;gap:0.5rem;align-items:flex-start;cursor:pointer><input type=radio name=support-channel-mode style=margin-top:0.1875rem><span><span style=font-size:0.875rem;display:block></span><span style=font-size:0.75rem>`);
22238
+ var _tmpl$1125 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-danger-fg)>Enter the inbox that should receive support messages.`);
22239
+ var _tmpl$1220 = /* @__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>`);
22240
+ var _tmpl$1318 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"data-testid=support-channel-save>`);
22241
+ var _tmpl$1418 = /* @__PURE__ */ template(`<div>`);
22235
22242
  function humanize2(key) {
22236
22243
  return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\w/, (c) => c.toUpperCase()).trim();
22237
22244
  }
@@ -22556,16 +22563,125 @@ function BillingRemindersCard() {
22556
22563
  }
22557
22564
  });
22558
22565
  }
22566
+ function SupportChannelCard() {
22567
+ const [saved, {
22568
+ mutate
22569
+ }] = createResource(async () => {
22570
+ try {
22571
+ return await adminApi.getSupportChannel();
22572
+ } catch {
22573
+ return null;
22574
+ }
22575
+ });
22576
+ const [draft, setDraft] = createSignal(null);
22577
+ const [saving, setSaving] = createSignal(false);
22578
+ const current2 = () => draft() ?? saved() ?? null;
22579
+ const update = (patch) => setDraft({
22580
+ ...current2(),
22581
+ ...patch
22582
+ });
22583
+ const dirty = () => !!draft() && JSON.stringify(draft()) !== JSON.stringify(saved());
22584
+ const inbox = () => (current2()?.email ?? "").trim();
22585
+ const needsInbox = () => current2()?.mode === "email" && !inbox().includes("@");
22586
+ const save = async () => {
22587
+ const d = draft();
22588
+ if (!d || needsInbox()) return;
22589
+ const next = {
22590
+ mode: d.mode,
22591
+ email: (d.email ?? "").trim() || null
22592
+ };
22593
+ setSaving(true);
22594
+ try {
22595
+ await adminApi.saveSupportChannel(next);
22596
+ mutate(next);
22597
+ setSupportChannelMode(next.mode);
22598
+ setDraft(null);
22599
+ toastSuccess("Support channel saved");
22600
+ } catch (err) {
22601
+ toastError(err instanceof Error ? err.message : "Failed to save");
22602
+ } finally {
22603
+ setSaving(false);
22604
+ }
22605
+ };
22606
+ const option = (mode, title, note) => (() => {
22607
+ var _el$42 = _tmpl$1023(), _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
22608
+ _el$43.addEventListener("change", () => update({
22609
+ mode
22610
+ }));
22611
+ setAttribute(_el$43, "data-testid", `support-channel-${mode}`);
22612
+ insert(_el$45, title);
22613
+ insert(_el$46, note);
22614
+ effect((_$p) => style(_el$46, {
22615
+ ...label2
22616
+ }, _$p));
22617
+ effect(() => _el$43.checked = current2()?.mode === mode);
22618
+ return _el$42;
22619
+ })();
22620
+ return createComponent(Show, {
22621
+ get when() {
22622
+ return saved.loading || saved();
22623
+ },
22624
+ get children() {
22625
+ return createComponent(Card, {
22626
+ title: "Customer support messages",
22627
+ note: "Where messages from the member portal's Support form go. Care-team messages are not affected.",
22628
+ get aside() {
22629
+ return (() => {
22630
+ var _el$51 = _tmpl$1318();
22631
+ _el$51.$$click = save;
22632
+ insert(_el$51, () => saving() ? "Saving\u2026" : "Save");
22633
+ effect(() => _el$51.disabled = !dirty() || saving() || needsInbox());
22634
+ return _el$51;
22635
+ })();
22636
+ },
22637
+ get children() {
22638
+ return createComponent(Show, {
22639
+ get when() {
22640
+ return current2();
22641
+ },
22642
+ get fallback() {
22643
+ return createComponent(LoadingSpinner, {});
22644
+ },
22645
+ get children() {
22646
+ return [memo(() => option("portal", "Admin portal", "Customers get a two-way conversation in their portal, and you reply from the Support tab.")), memo(() => option("email", "Email inbox", "Customers see only the Support form. Each message is emailed to the address below; reply to that email to answer them. The Support tab is hidden and nothing is kept in the portal.")), (() => {
22647
+ var _el$47 = _tmpl$1220(), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
22648
+ _el$49.$$input = (ev) => update({
22649
+ email: ev.currentTarget.value
22650
+ });
22651
+ insert(_el$47, createComponent(Show, {
22652
+ get when() {
22653
+ return needsInbox();
22654
+ },
22655
+ get children() {
22656
+ var _el$50 = _tmpl$1125();
22657
+ effect((_$p) => style(_el$50, {
22658
+ ...label2
22659
+ }, _$p));
22660
+ return _el$50;
22661
+ }
22662
+ }), null);
22663
+ effect((_$p) => style(_el$48, label2, _$p));
22664
+ effect(() => _el$49.value = current2()?.email ?? "");
22665
+ return _el$47;
22666
+ })()];
22667
+ }
22668
+ });
22669
+ }
22670
+ });
22671
+ }
22672
+ });
22673
+ }
22559
22674
  function EmailNotifications() {
22560
22675
  return (() => {
22561
- var _el$42 = _tmpl$1023();
22562
- insert(_el$42, createComponent(PageTitle, {
22676
+ var _el$52 = _tmpl$1418();
22677
+ insert(_el$52, createComponent(PageTitle, {
22563
22678
  subtitle: "Who gets admin copies, and when the automated billing reminders go out",
22564
22679
  children: "Notifications"
22565
22680
  }), null);
22566
- insert(_el$42, createComponent(NotificationsCard, {}), null);
22567
- insert(_el$42, createComponent(BillingRemindersCard, {}), null);
22568
- return _el$42;
22681
+ insert(_el$52, createComponent(NotificationsCard, {}), null);
22682
+ insert(_el$52, createComponent(BillingRemindersCard, {}), null);
22683
+ insert(_el$52, createComponent(SupportChannelCard, {}), null);
22684
+ return _el$52;
22569
22685
  })();
22570
22686
  }
22571
22687
  delegateEvents(["click", "input", "keydown"]);
@@ -22579,9 +22695,9 @@ var _tmpl$742 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin
22579
22695
  var _tmpl$837 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Request`);
22580
22696
  var _tmpl$934 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Requested `);
22581
22697
  var _tmpl$030 = /* @__PURE__ */ template(`<p style="margin:0 0 0.875rem">`);
22582
- var _tmpl$1125 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem><span>Anything we should know? (optional)</span><textarea class=app-admin-input rows=4 maxlength=1000>`);
22698
+ var _tmpl$1126 = /* @__PURE__ */ template(`<label style=display:grid;gap:0.25rem><span>Anything we should know? (optional)</span><textarea class=app-admin-input rows=4 maxlength=1000>`);
22583
22699
  var _tmpl$1024 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.75rem 0 0">We'll email our team and reply to you. Nothing changes on your site until we turn it on.`);
22584
- var _tmpl$1126 = /* @__PURE__ */ template(`<div class=app-admin-btn-row><button type=button class=app-admin-btn>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary">`);
22700
+ var _tmpl$1127 = /* @__PURE__ */ template(`<div class=app-admin-btn-row><button type=button class=app-admin-btn>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary">`);
22585
22701
  var muted2 = {
22586
22702
  "font-size": "0.8125rem",
22587
22703
  color: "var(--app-admin-fg-muted)"
@@ -22841,7 +22957,7 @@ function Features() {
22841
22957
  onClose: () => !sending() && setRequesting(null),
22842
22958
  get footer() {
22843
22959
  return (() => {
22844
- var _el$23 = _tmpl$1126(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
22960
+ var _el$23 = _tmpl$1127(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
22845
22961
  _el$24.$$click = () => setRequesting(null);
22846
22962
  _el$25.$$click = () => void sendRequest();
22847
22963
  insert(_el$25, () => sending() ? "Sending\u2026" : "Send request");
@@ -22866,7 +22982,7 @@ function Features() {
22866
22982
  }, _$p));
22867
22983
  return _el$18;
22868
22984
  })(), (() => {
22869
- var _el$19 = _tmpl$1125(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
22985
+ var _el$19 = _tmpl$1126(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
22870
22986
  _el$21.$$input = (e) => setNote(e.currentTarget.value);
22871
22987
  effect((_$p) => style(_el$20, muted2, _$p));
22872
22988
  effect(() => _el$21.value = note());
@@ -22946,10 +23062,11 @@ var DEFAULT_TAB_GROUPS = [
22946
23062
  ];
22947
23063
  var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
22948
23064
  function AdminDashboard(props) {
22949
- const visibleTopTabs = () => filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs);
23065
+ const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
23066
+ const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
22950
23067
  const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({
22951
23068
  label: g.label,
22952
- tabs: filterEnabled(g.tabs, props.enabledTabs)
23069
+ tabs: withoutHidden(filterEnabled(g.tabs, props.enabledTabs))
22953
23070
  })).filter((g) => g.tabs.length > 0);
22954
23071
  const orderedTabs = () => [...visibleTopTabs(), ...visibleGroups().flatMap((g) => g.tabs)];
22955
23072
  const isTabEnabled = (tab) => orderedTabs().includes(tab);
@@ -22977,6 +23094,11 @@ function AdminDashboard(props) {
22977
23094
  if (!auth) return true;
22978
23095
  return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
22979
23096
  };
23097
+ createEffect(() => {
23098
+ if (!adminAllowed()) return;
23099
+ void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
23100
+ });
23101
+ });
22980
23102
  const [pendingCustomerUid, setPendingCustomerUid] = createSignal(null);
22981
23103
  const [pendingThreadId, setPendingThreadId] = createSignal(null);
22982
23104
  const [pendingTemplateId, setPendingTemplateId] = createSignal(null);
@@ -23404,12 +23526,12 @@ var _tmpl$743 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
23404
23526
  var _tmpl$838 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
23405
23527
  var _tmpl$935 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
23406
23528
  var _tmpl$031 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
23407
- var _tmpl$1127 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
23529
+ var _tmpl$1128 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
23408
23530
  var _tmpl$1025 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23409
- var _tmpl$1128 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
23410
- var _tmpl$1220 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
23411
- var _tmpl$1318 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
23412
- var _tmpl$1418 = /* @__PURE__ */ template(`<span> \xB7 `);
23531
+ var _tmpl$1129 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
23532
+ var _tmpl$1221 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
23533
+ var _tmpl$1319 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
23534
+ var _tmpl$1419 = /* @__PURE__ */ template(`<span> \xB7 `);
23413
23535
  var _tmpl$1518 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><div><span style=font-size:0.875rem;font-weight:500></span></div></div><div style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-top:0.25rem>`);
23414
23536
  var _tmpl$1618 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No pending surveys.`);
23415
23537
  var _tmpl$1718 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><span style=font-size:0.875rem;font-weight:500></span><span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>Cycle `);
@@ -23467,7 +23589,7 @@ function PatientDashboardPreview(props) {
23467
23589
  return _tmpl$935();
23468
23590
  },
23469
23591
  children: (sub) => (() => {
23470
- var _el$27 = _tmpl$1127(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
23592
+ var _el$27 = _tmpl$1128(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
23471
23593
  insert(_el$29, createComponent(Show, {
23472
23594
  get when() {
23473
23595
  return sub().amount != null;
@@ -23502,7 +23624,7 @@ function PatientDashboardPreview(props) {
23502
23624
  return data.rxStatus();
23503
23625
  },
23504
23626
  children: (rx) => (() => {
23505
- var _el$32 = _tmpl$1128(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
23627
+ var _el$32 = _tmpl$1129(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
23506
23628
  insert(_el$35, createComponent(StatusBadge, {
23507
23629
  get status() {
23508
23630
  return rx().status;
@@ -23528,7 +23650,7 @@ function PatientDashboardPreview(props) {
23528
23650
  return (data.rxList() ?? []).length > 0;
23529
23651
  },
23530
23652
  get fallback() {
23531
- return _tmpl$1220();
23653
+ return _tmpl$1221();
23532
23654
  },
23533
23655
  get children() {
23534
23656
  var _el$22 = _tmpl$649();
@@ -23544,7 +23666,7 @@ function PatientDashboardPreview(props) {
23544
23666
  return req.dosage;
23545
23667
  },
23546
23668
  get children() {
23547
- var _el$43 = _tmpl$1318();
23669
+ var _el$43 = _tmpl$1319();
23548
23670
  insert(_el$43, () => req.dosage);
23549
23671
  return _el$43;
23550
23672
  }
@@ -23559,7 +23681,7 @@ function PatientDashboardPreview(props) {
23559
23681
  return req.priceCents != null;
23560
23682
  },
23561
23683
  get children() {
23562
- var _el$45 = _tmpl$1418(), _el$46 = _el$45.firstChild;
23684
+ var _el$45 = _tmpl$1419(), _el$46 = _el$45.firstChild;
23563
23685
  insert(_el$45, () => centsToUsd(req.priceCents), _el$46);
23564
23686
  return _el$45;
23565
23687
  }
@@ -23766,12 +23888,12 @@ var _tmpl$744 = /* @__PURE__ */ template(`<a class=refill__action>Complete check
23766
23888
  var _tmpl$839 = /* @__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.`);
23767
23889
  var _tmpl$936 = /* @__PURE__ */ template(`<div class=tracker><span class=lab-label>Your order</span><div class=tracker__empty data-testid=tracker-empty><div class=tracker__empty-mark aria-hidden=true><span class=tracker__empty-bead></span></div><h2 class=tracker__empty-title>Your journey starts here</h2><p class=tracker__empty-text></p><a class="portal-btn portal-btn--primary">Start your intake`);
23768
23890
  var _tmpl$032 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-offer-note><strong>You have <!> waiting.</strong> It applies automatically at checkout \u2014 finish your intake by <!> to keep it.`);
23769
- var _tmpl$1129 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
23891
+ var _tmpl$1130 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
23770
23892
  var _tmpl$1026 = /* @__PURE__ */ template(`<time class=thread__time>`);
23771
- var _tmpl$1130 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
23772
- var _tmpl$1221 = /* @__PURE__ */ template(`<p class=thread__caption>`);
23773
- var _tmpl$1319 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
23774
- var _tmpl$1419 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
23893
+ var _tmpl$1131 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
23894
+ var _tmpl$1222 = /* @__PURE__ */ template(`<p class=thread__caption>`);
23895
+ var _tmpl$1320 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
23896
+ var _tmpl$1420 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
23775
23897
  var _tmpl$1519 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Talk to your provider`);
23776
23898
  var _tmpl$1619 = /* @__PURE__ */ template(`<li><div class=thread__rail><span class=thread__bead></span></div><div><div class=thread__top><span class="lab-label thread__label">`);
23777
23899
  var _tmpl$1719 = /* @__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.`);
@@ -23907,7 +24029,7 @@ function OrderTracker(props) {
23907
24029
  insert(_el$44, createComponent(Show, {
23908
24030
  when: isActive,
23909
24031
  get children() {
23910
- return _tmpl$1129();
24032
+ return _tmpl$1130();
23911
24033
  }
23912
24034
  }));
23913
24035
  className(_el$46, `thread__content${isActive ? " thread__content--active" : ""}`);
@@ -23927,7 +24049,7 @@ function OrderTracker(props) {
23927
24049
  return s.heroWord;
23928
24050
  },
23929
24051
  get children() {
23930
- var _el$50 = _tmpl$1130();
24052
+ var _el$50 = _tmpl$1131();
23931
24053
  insert(_el$50, () => s.heroWord);
23932
24054
  return _el$50;
23933
24055
  }
@@ -23937,7 +24059,7 @@ function OrderTracker(props) {
23937
24059
  return s.subCaption;
23938
24060
  },
23939
24061
  get children() {
23940
- var _el$51 = _tmpl$1221();
24062
+ var _el$51 = _tmpl$1222();
23941
24063
  insert(_el$51, () => s.subCaption);
23942
24064
  return _el$51;
23943
24065
  }
@@ -23965,7 +24087,7 @@ function OrderTracker(props) {
23965
24087
  return props.messagingEnabled;
23966
24088
  },
23967
24089
  get children() {
23968
- var _el$52 = _tmpl$1319();
24090
+ var _el$52 = _tmpl$1320();
23969
24091
  _el$52.$$click = () => props.onOpenMessages({
23970
24092
  channel: "support",
23971
24093
  category: "orders"
@@ -23988,7 +24110,7 @@ function OrderTracker(props) {
23988
24110
  return _tmpl$1719();
23989
24111
  },
23990
24112
  get children() {
23991
- var _el$53 = _tmpl$1419();
24113
+ var _el$53 = _tmpl$1420();
23992
24114
  _el$53.$$click = () => props.onOpenMessages({
23993
24115
  channel: "care"
23994
24116
  });
@@ -24176,7 +24298,7 @@ var _tmpl$745 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
24176
24298
  var _tmpl$840 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
24177
24299
  var _tmpl$937 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
24178
24300
  var _tmpl$033 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
24179
- var _tmpl$1131 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
24301
+ var _tmpl$1132 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
24180
24302
  function formatCents(cents) {
24181
24303
  if (cents == null || Number.isNaN(cents)) return "\u2014";
24182
24304
  return `$${(cents / 100).toFixed(2)}`;
@@ -24323,7 +24445,7 @@ function PlanBilling(props) {
24323
24445
  return confirmCancel();
24324
24446
  },
24325
24447
  get children() {
24326
- var _el$38 = _tmpl$1131(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
24448
+ var _el$38 = _tmpl$1132(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
24327
24449
  insert(_el$39, () => formatLongDate(sub().currentPeriodEnd), _el$42);
24328
24450
  _el$44.$$click = () => setConfirmCancel(false);
24329
24451
  _el$45.$$click = () => run("cancel", () => subscriptionsApi.cancel(sub().id)).then(() => setConfirmCancel(false));
@@ -24621,16 +24743,16 @@ var _tmpl$746 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
24621
24743
  var _tmpl$841 = /* @__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>`);
24622
24744
  var _tmpl$938 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
24623
24745
  var _tmpl$034 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__file><span class=msg-attachment__file-icon aria-hidden=true><i class="ph-thin ph-paperclip"></i></span><span class=msg-attachment__file-info><span class=msg-attachment__file-name></span><span class=msg-attachment__file-size>`);
24624
- var _tmpl$1132 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
24746
+ var _tmpl$1133 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
24625
24747
  var _tmpl$1027 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
24626
- var _tmpl$1133 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
24627
- var _tmpl$1222 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
24628
- var _tmpl$1320 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
24629
- var _tmpl$1420 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
24748
+ var _tmpl$1134 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
24749
+ var _tmpl$1223 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
24750
+ var _tmpl$1321 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
24751
+ var _tmpl$1421 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
24630
24752
  var _tmpl$1520 = /* @__PURE__ */ template(`<p class=msg-thread__text>`);
24631
24753
  var _tmpl$1620 = /* @__PURE__ */ template(`<button type=button class="msg-compose__staged-remove msg-compose__staged-remove--inline">Remove file`);
24632
24754
  var _tmpl$1720 = /* @__PURE__ */ template(`<p class=msg-compose__error role=alert>`);
24633
- var _tmpl$1818 = /* @__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>We usually reply within one business day</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>`);
24755
+ var _tmpl$1818 = /* @__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>`);
24634
24756
  var _tmpl$1916 = /* @__PURE__ */ template(`<button type=button>`);
24635
24757
  var _tmpl$2016 = /* @__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>`);
24636
24758
  var _tmpl$2127 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
@@ -24640,20 +24762,21 @@ var _tmpl$2413 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
24640
24762
  var _tmpl$2513 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-care-loading>`);
24641
24763
  var _tmpl$2613 = /* @__PURE__ */ template(`<span class="msg-choice__option-spinner request-status__spinner"data-testid=gate-support-loading>`);
24642
24764
  var _tmpl$2711 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=care-team-notice><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Care team</h3><p class=msg-thread__role>Goes to your care team</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Your care team will reach out after reviewing your case. If you have a question about your account or order in the meantime, send it to support.</p><button type=button class="portal-btn portal-btn--primary"data-testid=care-team-notice-switch>Message support instead`);
24643
- var _tmpl$2811 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
24644
- var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
24645
- var _tmpl$3010 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
24646
- var _tmpl$3114 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
24647
- var _tmpl$3213 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
24648
- var _tmpl$3313 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
24649
- var _tmpl$3413 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
24650
- var _tmpl$3511 = /* @__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>`);
24651
- var _tmpl$3610 = /* @__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>`);
24652
- var _tmpl$3710 = /* @__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`);
24653
- var _tmpl$3810 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
24654
- var _tmpl$3910 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel>`);
24655
- var _tmpl$405 = /* @__PURE__ */ template(`<div class="msg-panel__layout msg-panel__layout--gate">`);
24656
- var _tmpl$4113 = /* @__PURE__ */ template(`<div class=msg-panel__placeholder data-testid=messages-placeholder><p>Select a conversation to read and reply.`);
24765
+ var _tmpl$2811 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=support-email-sent><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message sent</h3><p class=msg-thread__role>Support</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Thanks, your message is on its way to our support team. We'll reply by email, usually within one business day.</p><button type=button class="portal-btn portal-btn--primary"data-testid=support-email-another>Send another message`);
24766
+ var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
24767
+ var _tmpl$3010 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
24768
+ var _tmpl$3114 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
24769
+ var _tmpl$3213 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
24770
+ var _tmpl$3313 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
24771
+ var _tmpl$3413 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
24772
+ var _tmpl$3511 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
24773
+ var _tmpl$3610 = /* @__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>`);
24774
+ var _tmpl$3710 = /* @__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>`);
24775
+ 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`);
24776
+ var _tmpl$3910 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
24777
+ var _tmpl$405 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel>`);
24778
+ var _tmpl$4113 = /* @__PURE__ */ template(`<div class="msg-panel__layout msg-panel__layout--gate">`);
24779
+ var _tmpl$4213 = /* @__PURE__ */ template(`<div class=msg-panel__placeholder data-testid=messages-placeholder><p>Select a conversation to read and reply.`);
24657
24780
  function sanitizeMessageHtml(html) {
24658
24781
  return DOMPurify.sanitize(html, {
24659
24782
  ALLOWED_TAGS: ["a", "b", "strong", "i", "em", "u", "s", "p", "br", "ul", "ol", "li", "blockquote", "h1", "h2", "h3", "h4", "span", "div", "table", "thead", "tbody", "tr", "th", "td", "img", "hr", "code", "pre"],
@@ -24680,8 +24803,11 @@ function MessagesPanel(props) {
24680
24803
  const [channel, setChannel] = createSignal("gate");
24681
24804
  const [threadNotFound, setThreadNotFound] = createSignal(false);
24682
24805
  const [pendingThreadIntentId, setPendingThreadIntentId] = createSignal(null);
24806
+ const emailSupport = () => thread().supportChannel() === "email";
24807
+ const [emailSent, setEmailSent] = createSignal(false);
24683
24808
  function switchChannel(next) {
24684
24809
  thread().clearSelection();
24810
+ setEmailSent(false);
24685
24811
  setChannel(next);
24686
24812
  }
24687
24813
  function goToGate() {
@@ -24784,6 +24910,19 @@ function MessagesPanel(props) {
24784
24910
  async function submitCompose(e) {
24785
24911
  e.preventDefault();
24786
24912
  setComposeError(null);
24913
+ if (emailSupport()) {
24914
+ const sent = await thread().sendSupportEmail(newSubject(), newBody(), newFile() ?? void 0, newCategory());
24915
+ if (!sent) {
24916
+ setComposeError("That didn't send. Please try again.");
24917
+ return;
24918
+ }
24919
+ setNewSubject("");
24920
+ setNewBody("");
24921
+ setNewCategory(null);
24922
+ setNewFile(null);
24923
+ setEmailSent(true);
24924
+ return;
24925
+ }
24787
24926
  const result = await thread().startSupportThread(newSubject(), newBody(), newFile() ?? void 0, newCategory());
24788
24927
  if (!result.created) {
24789
24928
  setComposeError("That didn't send. Please try again.");
@@ -24975,7 +25114,7 @@ function MessagesPanel(props) {
24975
25114
  },
24976
25115
  get fallback() {
24977
25116
  return (() => {
24978
- var _el$27 = _tmpl$1132();
25117
+ var _el$27 = _tmpl$1133();
24979
25118
  insert(_el$27, () => failed() ? "Attachment unavailable" : "Loading\u2026");
24980
25119
  return _el$27;
24981
25120
  })();
@@ -25015,13 +25154,13 @@ function MessagesPanel(props) {
25015
25154
  },
25016
25155
  get fallback() {
25017
25156
  return (() => {
25018
- var _el$34 = _tmpl$1420();
25157
+ var _el$34 = _tmpl$1421();
25019
25158
  insert(_el$34, body);
25020
25159
  return _el$34;
25021
25160
  })();
25022
25161
  },
25023
25162
  get children() {
25024
- var _el$28 = _tmpl$1320(), _el$29 = _el$28.firstChild, _el$33 = _el$29.firstChild;
25163
+ var _el$28 = _tmpl$1321(), _el$29 = _el$28.firstChild, _el$33 = _el$29.firstChild;
25025
25164
  insert(_el$29, createComponent(Show, {
25026
25165
  get when() {
25027
25166
  return memo(() => !!!isOwn())() && p.msg.senderName;
@@ -25049,7 +25188,7 @@ function MessagesPanel(props) {
25049
25188
  })();
25050
25189
  },
25051
25190
  get children() {
25052
- var _el$31 = _tmpl$1133();
25191
+ var _el$31 = _tmpl$1134();
25053
25192
  effect(() => _el$31.innerHTML = sanitizeMessageHtml(body()));
25054
25193
  return _el$31;
25055
25194
  }
@@ -25061,7 +25200,7 @@ function MessagesPanel(props) {
25061
25200
  return p.msg.attachments?.length;
25062
25201
  },
25063
25202
  get children() {
25064
- var _el$32 = _tmpl$1222();
25203
+ var _el$32 = _tmpl$1223();
25065
25204
  insert(_el$32, createComponent(For, {
25066
25205
  get each() {
25067
25206
  return p.msg.attachments;
@@ -25088,113 +25227,114 @@ function MessagesPanel(props) {
25088
25227
  });
25089
25228
  };
25090
25229
  const NewSupportThread = () => (() => {
25091
- var _el$36 = _tmpl$1818(), _el$37 = _el$36.firstChild, _el$38 = _el$37.firstChild, _el$39 = _el$37.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$41.nextSibling, _el$43 = _el$42.nextSibling, _el$44 = _el$43.nextSibling, _el$45 = _el$44.nextSibling, _el$46 = _el$45.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.nextSibling, _el$52 = _el$46.nextSibling;
25230
+ var _el$36 = _tmpl$1818(), _el$37 = _el$36.firstChild, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$39.firstChild, _el$41 = _el$40.nextSibling, _el$42 = _el$37.nextSibling, _el$43 = _el$42.firstChild, _el$44 = _el$43.nextSibling, _el$45 = _el$44.nextSibling, _el$46 = _el$45.nextSibling, _el$47 = _el$46.nextSibling, _el$48 = _el$47.nextSibling, _el$49 = _el$48.nextSibling, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$51.nextSibling, _el$55 = _el$49.nextSibling;
25092
25231
  _el$36.addEventListener("submit", submitCompose);
25093
- _el$38.$$click = () => setComposing(false);
25094
- insert(_el$41, createComponent(For, {
25232
+ _el$38.$$click = () => emailSupport() ? goToGate() : setComposing(false);
25233
+ insert(_el$41, () => emailSupport() ? "We'll reply by email, usually within one business day" : "We usually reply within one business day");
25234
+ insert(_el$44, createComponent(For, {
25095
25235
  each: SUPPORT_CATEGORIES,
25096
25236
  children: (c) => (() => {
25097
- var _el$53 = _tmpl$1916();
25098
- _el$53.$$click = () => setNewCategory((prev) => prev === c.key ? null : c.key);
25099
- insert(_el$53, () => c.label);
25237
+ var _el$56 = _tmpl$1916();
25238
+ _el$56.$$click = () => setNewCategory((prev) => prev === c.key ? null : c.key);
25239
+ insert(_el$56, () => c.label);
25100
25240
  effect((_p$) => {
25101
25241
  var _v$1 = `msg-compose__category-chip${newCategory() === c.key ? " is-selected" : ""}`, _v$10 = `compose-category-${c.key}`, _v$11 = newCategory() === c.key;
25102
- _v$1 !== _p$.e && className(_el$53, _p$.e = _v$1);
25103
- _v$10 !== _p$.t && setAttribute(_el$53, "data-testid", _p$.t = _v$10);
25104
- _v$11 !== _p$.a && setAttribute(_el$53, "aria-pressed", _p$.a = _v$11);
25242
+ _v$1 !== _p$.e && className(_el$56, _p$.e = _v$1);
25243
+ _v$10 !== _p$.t && setAttribute(_el$56, "data-testid", _p$.t = _v$10);
25244
+ _v$11 !== _p$.a && setAttribute(_el$56, "aria-pressed", _p$.a = _v$11);
25105
25245
  return _p$;
25106
25246
  }, {
25107
25247
  e: void 0,
25108
25248
  t: void 0,
25109
25249
  a: void 0
25110
25250
  });
25111
- return _el$53;
25251
+ return _el$56;
25112
25252
  })()
25113
25253
  }));
25114
- _el$43.$$input = (e) => setNewSubject(e.currentTarget.value);
25115
- _el$45.$$input = (e) => setNewBody(e.currentTarget.value);
25116
- insert(_el$48, () => newFile()?.name ?? "Attach a file (optional)");
25117
- _el$49.addEventListener("change", (e) => stageFile(e.currentTarget, setNewFile));
25118
- insert(_el$39, createComponent(Show, {
25254
+ _el$46.$$input = (e) => setNewSubject(e.currentTarget.value);
25255
+ _el$48.$$input = (e) => setNewBody(e.currentTarget.value);
25256
+ insert(_el$51, () => newFile()?.name ?? "Attach a file (optional)");
25257
+ _el$52.addEventListener("change", (e) => stageFile(e.currentTarget, setNewFile));
25258
+ insert(_el$42, createComponent(Show, {
25119
25259
  get when() {
25120
25260
  return newFile();
25121
25261
  },
25122
25262
  get children() {
25123
- var _el$50 = _tmpl$1620();
25124
- _el$50.$$click = () => setNewFile(null);
25125
- return _el$50;
25263
+ var _el$53 = _tmpl$1620();
25264
+ _el$53.$$click = () => setNewFile(null);
25265
+ return _el$53;
25126
25266
  }
25127
- }), _el$52);
25128
- insert(_el$39, createComponent(Show, {
25267
+ }), _el$55);
25268
+ insert(_el$42, createComponent(Show, {
25129
25269
  get when() {
25130
25270
  return attachError() || composeError();
25131
25271
  },
25132
25272
  get children() {
25133
- var _el$51 = _tmpl$1720();
25134
- insert(_el$51, () => attachError() ?? composeError());
25135
- return _el$51;
25273
+ var _el$54 = _tmpl$1720();
25274
+ insert(_el$54, () => attachError() ?? composeError());
25275
+ return _el$54;
25136
25276
  }
25137
- }), _el$52);
25138
- insert(_el$52, () => thread().startingThread() ? "Sending\u2026" : "Send");
25277
+ }), _el$55);
25278
+ insert(_el$55, () => thread().startingThread() ? "Sending\u2026" : "Send");
25139
25279
  effect((_p$) => {
25140
25280
  var _v$9 = SUPPORT_ATTACHMENT_MIME_TYPES.join(","), _v$0 = thread().startingThread() || !newSubject().trim() || !newBody().trim();
25141
- _v$9 !== _p$.e && setAttribute(_el$49, "accept", _p$.e = _v$9);
25142
- _v$0 !== _p$.t && (_el$52.disabled = _p$.t = _v$0);
25281
+ _v$9 !== _p$.e && setAttribute(_el$52, "accept", _p$.e = _v$9);
25282
+ _v$0 !== _p$.t && (_el$55.disabled = _p$.t = _v$0);
25143
25283
  return _p$;
25144
25284
  }, {
25145
25285
  e: void 0,
25146
25286
  t: void 0
25147
25287
  });
25148
- effect(() => _el$43.value = newSubject());
25149
- effect(() => _el$45.value = newBody());
25288
+ effect(() => _el$46.value = newSubject());
25289
+ effect(() => _el$48.value = newBody());
25150
25290
  return _el$36;
25151
25291
  })();
25152
25292
  const NewCareTeamThread = () => (() => {
25153
- var _el$54 = _tmpl$2016(), _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$55.nextSibling, _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, _el$60 = _el$59.nextSibling, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling, _el$63 = _el$62.nextSibling, _el$66 = _el$60.nextSibling;
25154
- _el$54.addEventListener("submit", submitCareCompose);
25155
- _el$56.$$click = () => setComposing(false);
25156
- _el$59.$$input = (e) => setNewBody(e.currentTarget.value);
25157
- insert(_el$62, () => newFile()?.name ?? "Attach a file (optional)");
25158
- _el$63.addEventListener("change", (e) => stageFile(e.currentTarget, setNewFile));
25159
- insert(_el$57, createComponent(Show, {
25293
+ var _el$57 = _tmpl$2016(), _el$58 = _el$57.firstChild, _el$59 = _el$58.firstChild, _el$60 = _el$58.nextSibling, _el$61 = _el$60.firstChild, _el$62 = _el$61.nextSibling, _el$63 = _el$62.nextSibling, _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling, _el$66 = _el$65.nextSibling, _el$69 = _el$63.nextSibling;
25294
+ _el$57.addEventListener("submit", submitCareCompose);
25295
+ _el$59.$$click = () => setComposing(false);
25296
+ _el$62.$$input = (e) => setNewBody(e.currentTarget.value);
25297
+ insert(_el$65, () => newFile()?.name ?? "Attach a file (optional)");
25298
+ _el$66.addEventListener("change", (e) => stageFile(e.currentTarget, setNewFile));
25299
+ insert(_el$60, createComponent(Show, {
25160
25300
  get when() {
25161
25301
  return newFile();
25162
25302
  },
25163
25303
  get children() {
25164
- var _el$64 = _tmpl$1620();
25165
- _el$64.$$click = () => setNewFile(null);
25166
- return _el$64;
25304
+ var _el$67 = _tmpl$1620();
25305
+ _el$67.$$click = () => setNewFile(null);
25306
+ return _el$67;
25167
25307
  }
25168
- }), _el$66);
25169
- insert(_el$57, createComponent(Show, {
25308
+ }), _el$69);
25309
+ insert(_el$60, createComponent(Show, {
25170
25310
  get when() {
25171
25311
  return attachError() || composeError();
25172
25312
  },
25173
25313
  get children() {
25174
- var _el$65 = _tmpl$1720();
25175
- insert(_el$65, () => attachError() ?? composeError());
25176
- return _el$65;
25314
+ var _el$68 = _tmpl$1720();
25315
+ insert(_el$68, () => attachError() ?? composeError());
25316
+ return _el$68;
25177
25317
  }
25178
- }), _el$66);
25179
- insert(_el$66, () => thread().startingCareTeamThread() ? "Sending\u2026" : "Send");
25318
+ }), _el$69);
25319
+ insert(_el$69, () => thread().startingCareTeamThread() ? "Sending\u2026" : "Send");
25180
25320
  effect((_p$) => {
25181
25321
  var _v$12 = SUPPORT_ATTACHMENT_MIME_TYPES.join(","), _v$13 = thread().startingCareTeamThread() || !newBody().trim();
25182
- _v$12 !== _p$.e && setAttribute(_el$63, "accept", _p$.e = _v$12);
25183
- _v$13 !== _p$.t && (_el$66.disabled = _p$.t = _v$13);
25322
+ _v$12 !== _p$.e && setAttribute(_el$66, "accept", _p$.e = _v$12);
25323
+ _v$13 !== _p$.t && (_el$69.disabled = _p$.t = _v$13);
25184
25324
  return _p$;
25185
25325
  }, {
25186
25326
  e: void 0,
25187
25327
  t: void 0
25188
25328
  });
25189
- effect(() => _el$59.value = newBody());
25190
- return _el$54;
25329
+ effect(() => _el$62.value = newBody());
25330
+ return _el$57;
25191
25331
  })();
25192
25332
  const careUnreadCount = () => thread().conversations().filter((c) => c.source === "clinical").reduce((sum, c) => sum + (c.unreadCount ?? 0), 0);
25193
25333
  const supportUnreadCount = () => thread().conversations().filter((c) => c.source === "support" && (c.unreadCount ?? 0) > 0).length;
25194
25334
  const ChannelGate = () => (() => {
25195
- var _el$67 = _tmpl$2413(), _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling, _el$70 = _el$69.firstChild, _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling; _el$72.nextSibling; var _el$75 = _el$70.nextSibling, _el$76 = _el$75.firstChild, _el$77 = _el$76.nextSibling; _el$77.nextSibling;
25196
- _el$70.$$click = () => switchChannel("care");
25197
- insert(_el$70, createComponent(Show, {
25335
+ var _el$70 = _tmpl$2413(), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling, _el$73 = _el$72.firstChild, _el$74 = _el$73.firstChild, _el$75 = _el$74.nextSibling; _el$75.nextSibling; var _el$78 = _el$73.nextSibling, _el$79 = _el$78.firstChild, _el$80 = _el$79.nextSibling; _el$80.nextSibling;
25336
+ _el$73.$$click = () => switchChannel("care");
25337
+ insert(_el$73, createComponent(Show, {
25198
25338
  get when() {
25199
25339
  return !thread().loadingConversations();
25200
25340
  },
@@ -25207,15 +25347,15 @@ function MessagesPanel(props) {
25207
25347
  return careUnreadCount() > 0;
25208
25348
  },
25209
25349
  get children() {
25210
- var _el$74 = _tmpl$2127();
25211
- insert(_el$74, careUnreadCount);
25212
- return _el$74;
25350
+ var _el$77 = _tmpl$2127();
25351
+ insert(_el$77, careUnreadCount);
25352
+ return _el$77;
25213
25353
  }
25214
25354
  });
25215
25355
  }
25216
25356
  }), null);
25217
- _el$75.$$click = () => switchChannel("support");
25218
- insert(_el$75, createComponent(Show, {
25357
+ _el$78.$$click = () => switchChannel("support");
25358
+ insert(_el$78, createComponent(Show, {
25219
25359
  get when() {
25220
25360
  return !thread().loadingConversations();
25221
25361
  },
@@ -25225,17 +25365,17 @@ function MessagesPanel(props) {
25225
25365
  get children() {
25226
25366
  return createComponent(Show, {
25227
25367
  get when() {
25228
- return supportUnreadCount() > 0;
25368
+ return memo(() => supportUnreadCount() > 0)() && !emailSupport();
25229
25369
  },
25230
25370
  get children() {
25231
- var _el$79 = _tmpl$2215();
25232
- insert(_el$79, supportUnreadCount);
25233
- return _el$79;
25371
+ var _el$82 = _tmpl$2215();
25372
+ insert(_el$82, supportUnreadCount);
25373
+ return _el$82;
25234
25374
  }
25235
25375
  });
25236
25376
  }
25237
25377
  }), null);
25238
- insert(_el$67, createComponent(Show, {
25378
+ insert(_el$70, createComponent(Show, {
25239
25379
  get when() {
25240
25380
  return threadNotFound();
25241
25381
  },
@@ -25243,22 +25383,28 @@ function MessagesPanel(props) {
25243
25383
  return _tmpl$2313();
25244
25384
  }
25245
25385
  }), null);
25246
- return _el$67;
25386
+ return _el$70;
25247
25387
  })();
25248
25388
  const CareTeamNotice = () => (() => {
25249
- var _el$83 = _tmpl$2711(), _el$84 = _el$83.firstChild, _el$85 = _el$84.firstChild, _el$86 = _el$84.nextSibling, _el$87 = _el$86.firstChild, _el$88 = _el$87.nextSibling;
25250
- _el$85.$$click = () => setComposing(false);
25251
- _el$88.$$click = () => {
25389
+ var _el$86 = _tmpl$2711(), _el$87 = _el$86.firstChild, _el$88 = _el$87.firstChild, _el$89 = _el$87.nextSibling, _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling;
25390
+ _el$88.$$click = () => setComposing(false);
25391
+ _el$91.$$click = () => {
25252
25392
  switchChannel("support");
25253
25393
  setComposeStep("support");
25254
25394
  };
25255
- return _el$83;
25395
+ return _el$86;
25396
+ })();
25397
+ const SupportEmailSent = () => (() => {
25398
+ var _el$92 = _tmpl$2811(), _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling, _el$96 = _el$95.firstChild, _el$97 = _el$96.nextSibling;
25399
+ _el$94.$$click = goToGate;
25400
+ _el$97.$$click = () => setEmailSent(false);
25401
+ return _el$92;
25256
25402
  })();
25257
25403
  const Thread = () => [(() => {
25258
- var _el$89 = _tmpl$3010(), _el$90 = _el$89.firstChild, _el$91 = _el$90.nextSibling, _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$92.nextSibling;
25259
- _el$90.$$click = () => thread().clearSelection();
25260
- insert(_el$93, () => selectedConvo()?.participantName ?? "Provider");
25261
- insert(_el$92, createComponent(Show, {
25404
+ var _el$98 = _tmpl$3114(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
25405
+ _el$99.$$click = () => thread().clearSelection();
25406
+ insert(_el$102, () => selectedConvo()?.participantName ?? "Provider");
25407
+ insert(_el$101, createComponent(Show, {
25262
25408
  get when() {
25263
25409
  return selectedConvo();
25264
25410
  },
@@ -25271,192 +25417,221 @@ function MessagesPanel(props) {
25271
25417
  }
25272
25418
  })
25273
25419
  }), null);
25274
- insert(_el$94, () => selectedConvo()?.participantRole ?? "Prescriber");
25275
- insert(_el$89, createComponent(Show, {
25420
+ insert(_el$103, () => selectedConvo()?.participantRole ?? "Prescriber");
25421
+ insert(_el$98, createComponent(Show, {
25276
25422
  get when() {
25277
25423
  return memo(() => selectedConvo()?.source === "support")() && selectedConvo()?.status === "closed";
25278
25424
  },
25279
25425
  get children() {
25280
- return _tmpl$2811();
25426
+ return _tmpl$2911();
25281
25427
  }
25282
25428
  }), null);
25283
- insert(_el$89, createComponent(Show, {
25429
+ insert(_el$98, createComponent(Show, {
25284
25430
  get when() {
25285
25431
  return memo(() => selectedConvo()?.source === "support")() && selectedConvo()?.status === "transferred";
25286
25432
  },
25287
25433
  get children() {
25288
- return _tmpl$2911();
25434
+ return _tmpl$3010();
25289
25435
  }
25290
25436
  }), null);
25291
- return _el$89;
25437
+ return _el$98;
25292
25438
  })(), createComponent(Show, {
25293
25439
  get when() {
25294
25440
  return memo(() => selectedConvo()?.source === "support")() && (selectedConvo()?.status === "closed" || selectedConvo()?.status === "transferred");
25295
25441
  },
25296
25442
  get children() {
25297
- var _el$97 = _tmpl$3114(), _el$98 = _el$97.firstChild;
25298
- _el$98.$$click = continueWithCareTeam;
25299
- return _el$97;
25443
+ var _el$106 = _tmpl$3213(), _el$107 = _el$106.firstChild;
25444
+ _el$107.$$click = continueWithCareTeam;
25445
+ return _el$106;
25300
25446
  }
25301
25447
  }), (() => {
25302
- var _el$99 = _tmpl$3213(), _el$101 = _el$99.firstChild;
25303
- insert(_el$99, createComponent(Show, {
25448
+ var _el$108 = _tmpl$3313(), _el$110 = _el$108.firstChild;
25449
+ insert(_el$108, createComponent(Show, {
25304
25450
  get when() {
25305
25451
  return thread().loadingMessages();
25306
25452
  },
25307
25453
  get children() {
25308
25454
  return _tmpl$470();
25309
25455
  }
25310
- }), _el$101);
25311
- insert(_el$99, createComponent(For, {
25456
+ }), _el$110);
25457
+ insert(_el$108, createComponent(For, {
25312
25458
  get each() {
25313
25459
  return thread().messages();
25314
25460
  },
25315
25461
  children: (msg) => createComponent(Bubble, {
25316
25462
  msg
25317
25463
  })
25318
- }), _el$101);
25464
+ }), _el$110);
25319
25465
  var _ref$ = endRef;
25320
- typeof _ref$ === "function" ? use(_ref$, _el$101) : endRef = _el$101;
25321
- return _el$99;
25466
+ typeof _ref$ === "function" ? use(_ref$, _el$110) : endRef = _el$110;
25467
+ return _el$108;
25322
25468
  })(), createComponent(Show, {
25323
25469
  get when() {
25324
25470
  return pendingFile() || attachError();
25325
25471
  },
25326
25472
  get children() {
25327
- var _el$102 = _tmpl$3413();
25328
- insert(_el$102, createComponent(Show, {
25473
+ var _el$111 = _tmpl$3511();
25474
+ insert(_el$111, createComponent(Show, {
25329
25475
  get when() {
25330
25476
  return pendingFile();
25331
25477
  },
25332
25478
  children: (file) => (() => {
25333
- var _el$111 = _tmpl$3710(), _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.nextSibling;
25334
- insert(_el$111, () => file().name, _el$113);
25335
- insert(_el$113, () => formatFileSize(file().size));
25336
- _el$114.$$click = () => setPendingFile(null);
25337
- return _el$111;
25479
+ var _el$120 = _tmpl$3810(), _el$121 = _el$120.firstChild, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling;
25480
+ insert(_el$120, () => file().name, _el$122);
25481
+ insert(_el$122, () => formatFileSize(file().size));
25482
+ _el$123.$$click = () => setPendingFile(null);
25483
+ return _el$120;
25338
25484
  })()
25339
25485
  }), null);
25340
- insert(_el$102, createComponent(Show, {
25486
+ insert(_el$111, createComponent(Show, {
25341
25487
  get when() {
25342
25488
  return attachError();
25343
25489
  },
25344
25490
  get children() {
25345
- var _el$103 = _tmpl$3313();
25346
- insert(_el$103, attachError);
25347
- return _el$103;
25491
+ var _el$112 = _tmpl$3413();
25492
+ insert(_el$112, attachError);
25493
+ return _el$112;
25348
25494
  }
25349
25495
  }), null);
25350
- return _el$102;
25496
+ return _el$111;
25351
25497
  }
25352
25498
  }), createComponent(Show, {
25353
25499
  get when() {
25354
25500
  return !(selectedConvo()?.source === "support" && selectedConvo()?.status === "transferred");
25355
25501
  },
25356
25502
  get children() {
25357
- var _el$104 = _tmpl$3610(), _el$109 = _el$104.firstChild, _el$110 = _el$109.nextSibling;
25358
- insert(_el$104, createComponent(Show, {
25503
+ var _el$113 = _tmpl$3710(), _el$118 = _el$113.firstChild, _el$119 = _el$118.nextSibling;
25504
+ insert(_el$113, createComponent(Show, {
25359
25505
  get when() {
25360
25506
  return thread().selectedSource() === "support";
25361
25507
  },
25362
25508
  get children() {
25363
- var _el$105 = _tmpl$3511(), _el$106 = _el$105.firstChild, _el$107 = _el$106.nextSibling, _el$108 = _el$107.nextSibling;
25364
- _el$108.addEventListener("change", (e) => stageFile(e.currentTarget, setPendingFile));
25365
- effect(() => setAttribute(_el$108, "accept", SUPPORT_ATTACHMENT_MIME_TYPES.join(",")));
25366
- return _el$105;
25509
+ var _el$114 = _tmpl$3610(), _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling, _el$117 = _el$116.nextSibling;
25510
+ _el$117.addEventListener("change", (e) => stageFile(e.currentTarget, setPendingFile));
25511
+ effect(() => setAttribute(_el$117, "accept", SUPPORT_ATTACHMENT_MIME_TYPES.join(",")));
25512
+ return _el$114;
25367
25513
  }
25368
- }), _el$109);
25369
- _el$109.$$keydown = handleKeyDown;
25370
- _el$109.$$input = (e) => thread().setDraft(e.currentTarget.value);
25514
+ }), _el$118);
25515
+ _el$118.$$keydown = handleKeyDown;
25516
+ _el$118.$$input = (e) => thread().setDraft(e.currentTarget.value);
25371
25517
  var _ref$2 = composerRef;
25372
- typeof _ref$2 === "function" ? use(_ref$2, _el$109) : composerRef = _el$109;
25373
- _el$110.$$click = handleSend;
25374
- insert(_el$110, () => thread().sending() ? "Sending\u2026" : "Send");
25375
- effect(() => _el$110.disabled = !canSend());
25376
- effect(() => _el$109.value = thread().draft());
25377
- return _el$104;
25518
+ typeof _ref$2 === "function" ? use(_ref$2, _el$118) : composerRef = _el$118;
25519
+ _el$119.$$click = handleSend;
25520
+ insert(_el$119, () => thread().sending() ? "Sending\u2026" : "Send");
25521
+ effect(() => _el$119.disabled = !canSend());
25522
+ effect(() => _el$118.value = thread().draft());
25523
+ return _el$113;
25378
25524
  }
25379
25525
  })];
25380
25526
  return (() => {
25381
- var _el$115 = _tmpl$3910();
25382
- insert(_el$115, createComponent(Show, {
25527
+ var _el$124 = _tmpl$405();
25528
+ insert(_el$124, createComponent(Show, {
25383
25529
  get when() {
25384
25530
  return channel() !== "gate";
25385
25531
  },
25386
25532
  get fallback() {
25387
25533
  return (() => {
25388
- var _el$119 = _tmpl$405();
25389
- insert(_el$119, createComponent(ChannelGate, {}));
25390
- return _el$119;
25534
+ var _el$128 = _tmpl$4113();
25535
+ insert(_el$128, createComponent(ChannelGate, {}));
25536
+ return _el$128;
25391
25537
  })();
25392
25538
  },
25393
25539
  get children() {
25394
- var _el$116 = _tmpl$3810(), _el$117 = _el$116.firstChild, _el$118 = _el$117.nextSibling;
25395
- insert(_el$117, createComponent(ConversationList, {}));
25396
- insert(_el$118, createComponent(Show, {
25540
+ return createComponent(Show, {
25397
25541
  get when() {
25398
- return composing();
25542
+ return !(channel() === "support" && emailSupport() && thread().selectedId() == null);
25399
25543
  },
25400
- get children() {
25401
- return createComponent(Switch, {
25402
- get children() {
25403
- return [createComponent(Match, {
25404
- get when() {
25405
- return composeStep() === "care";
25406
- },
25407
- get children() {
25408
- return createComponent(NewCareTeamThread, {});
25409
- }
25410
- }), createComponent(Match, {
25544
+ get fallback() {
25545
+ return (
25546
+ // Email-channel support: the form (or its confirmation) and nothing
25547
+ // else. A deep-linked thread that predates the switch still opens
25548
+ // in the normal layout below, since it has a selection.
25549
+ (() => {
25550
+ var _el$129 = _tmpl$4113();
25551
+ insert(_el$129, createComponent(Show, {
25411
25552
  get when() {
25412
- return composeStep() === "care-notice";
25553
+ return !emailSent();
25413
25554
  },
25414
- get children() {
25415
- return createComponent(CareTeamNotice, {});
25416
- }
25417
- }), createComponent(Match, {
25418
- get when() {
25419
- return composeStep() === "support";
25555
+ get fallback() {
25556
+ return createComponent(SupportEmailSent, {});
25420
25557
  },
25421
25558
  get children() {
25422
25559
  return createComponent(NewSupportThread, {});
25423
25560
  }
25424
- })];
25425
- }
25426
- });
25427
- }
25428
- }), null);
25429
- insert(_el$118, createComponent(Show, {
25430
- get when() {
25431
- return !composing();
25561
+ }));
25562
+ return _el$129;
25563
+ })()
25564
+ );
25432
25565
  },
25433
25566
  get children() {
25434
- return createComponent(Show, {
25567
+ var _el$125 = _tmpl$3910(), _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling;
25568
+ insert(_el$126, createComponent(ConversationList, {}));
25569
+ insert(_el$127, createComponent(Show, {
25435
25570
  get when() {
25436
- return thread().selectedId() != null;
25571
+ return composing();
25437
25572
  },
25438
- get fallback() {
25439
- return _tmpl$4113();
25573
+ get children() {
25574
+ return createComponent(Switch, {
25575
+ get children() {
25576
+ return [createComponent(Match, {
25577
+ get when() {
25578
+ return composeStep() === "care";
25579
+ },
25580
+ get children() {
25581
+ return createComponent(NewCareTeamThread, {});
25582
+ }
25583
+ }), createComponent(Match, {
25584
+ get when() {
25585
+ return composeStep() === "care-notice";
25586
+ },
25587
+ get children() {
25588
+ return createComponent(CareTeamNotice, {});
25589
+ }
25590
+ }), createComponent(Match, {
25591
+ get when() {
25592
+ return composeStep() === "support";
25593
+ },
25594
+ get children() {
25595
+ return createComponent(NewSupportThread, {});
25596
+ }
25597
+ })];
25598
+ }
25599
+ });
25600
+ }
25601
+ }), null);
25602
+ insert(_el$127, createComponent(Show, {
25603
+ get when() {
25604
+ return !composing();
25440
25605
  },
25441
25606
  get children() {
25442
- return createComponent(Thread, {});
25607
+ return createComponent(Show, {
25608
+ get when() {
25609
+ return thread().selectedId() != null;
25610
+ },
25611
+ get fallback() {
25612
+ return _tmpl$4213();
25613
+ },
25614
+ get children() {
25615
+ return createComponent(Thread, {});
25616
+ }
25617
+ });
25443
25618
  }
25619
+ }), null);
25620
+ effect((_p$) => {
25621
+ var _v$14 = `msg-panel__sidebar${threadOpen() ? " msg-panel__sidebar--hidden-mobile" : ""}`, _v$15 = `msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`;
25622
+ _v$14 !== _p$.e && className(_el$126, _p$.e = _v$14);
25623
+ _v$15 !== _p$.t && className(_el$127, _p$.t = _v$15);
25624
+ return _p$;
25625
+ }, {
25626
+ e: void 0,
25627
+ t: void 0
25444
25628
  });
25629
+ return _el$125;
25445
25630
  }
25446
- }), null);
25447
- effect((_p$) => {
25448
- var _v$14 = `msg-panel__sidebar${threadOpen() ? " msg-panel__sidebar--hidden-mobile" : ""}`, _v$15 = `msg-panel__main${threadOpen() ? "" : " msg-panel__main--hidden-mobile"}`;
25449
- _v$14 !== _p$.e && className(_el$117, _p$.e = _v$14);
25450
- _v$15 !== _p$.t && className(_el$118, _p$.t = _v$15);
25451
- return _p$;
25452
- }, {
25453
- e: void 0,
25454
- t: void 0
25455
25631
  });
25456
- return _el$116;
25457
25632
  }
25458
25633
  }));
25459
- return _el$115;
25634
+ return _el$124;
25460
25635
  })();
25461
25636
  }
25462
25637
  delegateEvents(["click", "input", "keydown"]);
@@ -25470,7 +25645,7 @@ var _tmpl$747 = /* @__PURE__ */ template(`<div class=portal-state data-testid=hi
25470
25645
  var _tmpl$842 = /* @__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.`);
25471
25646
  var _tmpl$939 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
25472
25647
  var _tmpl$035 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
25473
- var _tmpl$1134 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
25648
+ var _tmpl$1135 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
25474
25649
  var _tmpl$1028 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
25475
25650
  var MODE_LABELS = {
25476
25651
  initial: "Intake questionnaire",
@@ -25579,7 +25754,7 @@ function SurveyHistory() {
25579
25754
  return _el$8;
25580
25755
  })();
25581
25756
  return (() => {
25582
- var _el$22 = _tmpl$1134();
25757
+ var _el$22 = _tmpl$1135();
25583
25758
  insert(_el$22, createComponent(Show, {
25584
25759
  get when() {
25585
25760
  return !list.loading || selectedId();
@@ -25617,9 +25792,9 @@ var _tmpl$748 = /* @__PURE__ */ template(`<div class="request-status__error port
25617
25792
  var _tmpl$843 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
25618
25793
  var _tmpl$940 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
25619
25794
  var _tmpl$036 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
25620
- var _tmpl$1135 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
25795
+ var _tmpl$1136 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
25621
25796
  var _tmpl$1029 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
25622
- var _tmpl$1136 = /* @__PURE__ */ template(`<img>`);
25797
+ var _tmpl$1137 = /* @__PURE__ */ template(`<img>`);
25623
25798
  var ICONS = {
25624
25799
  tracker: "ph-thin ph-path",
25625
25800
  instructions: "ph-thin ph-first-aid-kit",
@@ -25992,7 +26167,7 @@ function MemberPortal(props) {
25992
26167
  }
25993
26168
  });
25994
26169
  return (() => {
25995
- var _el$11 = _tmpl$1135(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
26170
+ var _el$11 = _tmpl$1136(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
25996
26171
  insert(_el$14, createComponent(Show, {
25997
26172
  get when() {
25998
26173
  return props.brand.logoSrc;
@@ -26005,7 +26180,7 @@ function MemberPortal(props) {
26005
26180
  })();
26006
26181
  },
26007
26182
  children: (src) => (() => {
26008
- var _el$26 = _tmpl$1136();
26183
+ var _el$26 = _tmpl$1137();
26009
26184
  effect((_p$) => {
26010
26185
  var _v$8 = src(), _v$9 = props.brand.name;
26011
26186
  _v$8 !== _p$.e && setAttribute(_el$26, "src", _p$.e = _v$8);
@@ -26726,7 +26901,7 @@ var _tmpl$749 = /* @__PURE__ */ template(`<form style=display:flex;flex-directio
26726
26901
  var _tmpl$844 = /* @__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.`);
26727
26902
  var _tmpl$941 = /* @__PURE__ */ template(`<div style=padding:1rem;background:var(--app-affiliate-success-bg);color:var(--app-affiliate-success-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem>Thanks \u2014 we received your application. You'll be able to log in once it's approved.`);
26728
26903
  var _tmpl$037 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
26729
- var _tmpl$1137 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
26904
+ var _tmpl$1138 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
26730
26905
  function AffiliateRegister(props) {
26731
26906
  const [firstName, setFirstName] = createSignal("");
26732
26907
  const [lastName, setLastName] = createSignal("");
@@ -26868,7 +27043,7 @@ function AffiliateRegister(props) {
26868
27043
  }
26869
27044
  function Row2(props) {
26870
27045
  return (() => {
26871
- var _el$21 = _tmpl$1137(), _el$22 = _el$21.firstChild;
27046
+ var _el$21 = _tmpl$1138(), _el$22 = _el$21.firstChild;
26872
27047
  insert(_el$22, () => props.label);
26873
27048
  insert(_el$21, () => props.children, null);
26874
27049
  insert(_el$21, createComponent(Show, {
@@ -27609,5 +27784,5 @@ function primaryButtonStyle2(submitting) {
27609
27784
  }
27610
27785
 
27611
27786
  export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
27612
- //# sourceMappingURL=POIS4SBW.js.map
27613
- //# sourceMappingURL=POIS4SBW.js.map
27787
+ //# sourceMappingURL=JZS2FNNX.js.map
27788
+ //# sourceMappingURL=JZS2FNNX.js.map