@apextelemed/partner-core 0.23.0-dev.83 → 0.23.0-dev.84

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.
@@ -1,5 +1,5 @@
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, useSmsPreferences, formatUsPhone, 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 './ANR4H6TB.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, isValidUsPhone, useSmsPreferences, formatUsPhone, 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, PHONE_ERROR, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './ANR4H6TB.js';
3
3
  import { fetchFunnelConfig } from './TUIMLDLN.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
5
  import { cart_default, auth_default, affiliateAuth_default } from './DFZFYIME.js';
@@ -28018,7 +28018,10 @@ function SmsLogCard(props) {
28018
28018
  delegateEvents(["click"]);
28019
28019
  var _tmpl$478 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.875rem;display:grid;gap:0.625rem><div style=font-size:0.875rem;font-weight:600></div><div data-testid=sms-preview>Preview: <span style=color:var(--app-admin-fg)></span></div><div class=app-admin-btn-row><button type=button class="app-admin-btn app-admin-btn-sm">`);
28020
28020
  var _tmpl$2131 = /* @__PURE__ */ template(`<div class=app-admin-notice role=status>`);
28021
- var _tmpl$3105 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert>The texts could not be loaded. `);
28021
+ var _tmpl$3105 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=color:var(--app-admin-danger-fg)>`);
28022
+ var _tmpl$479 = /* @__PURE__ */ template(`<div class=app-admin-card-soft data-testid=sms-test-phone style=padding:0.875rem;display:grid;gap:0.5rem><label class=app-admin-label for=sms-test-phone-input style=font-size:0.875rem;font-weight:600>Your phone for test texts</label><div>Test texts are sent to this number. It is the phone on your own account.</div><div class=app-admin-btn-row><input id=sms-test-phone-input class=app-admin-input type=tel inputmode=tel autocomplete=tel placeholder="(555) 555-1234"><button type=button class="app-admin-btn app-admin-btn-sm">`);
28023
+ var _tmpl$568 = /* @__PURE__ */ template(`<div>Save your phone number above to send a test.`);
28024
+ var _tmpl$660 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert>The texts could not be loaded. `);
28022
28025
  function testMessage(res) {
28023
28026
  switch (res.status) {
28024
28027
  case "sent":
@@ -28087,7 +28090,7 @@ function TemplateRow(props) {
28087
28090
  })()
28088
28091
  }), null);
28089
28092
  effect((_p$) => {
28090
- var _v$ = t().key, _v$2 = muted3, _v$3 = testing();
28093
+ var _v$ = t().key, _v$2 = muted3, _v$3 = testing() || !props.canTest;
28091
28094
  _v$ !== _p$.e && setAttribute(_el$, "data-template", _p$.e = _v$);
28092
28095
  _p$.t = style(_el$3, _v$2, _p$.t);
28093
28096
  _v$3 !== _p$.a && (_el$7.disabled = _p$.a = _v$3);
@@ -28100,25 +28103,129 @@ function TemplateRow(props) {
28100
28103
  return _el$;
28101
28104
  })();
28102
28105
  }
28106
+ function TestPhoneBlock(props) {
28107
+ const [value, setValue] = createSignal("");
28108
+ const [saving, setSaving] = createSignal(false);
28109
+ const [error, setError] = createSignal("");
28110
+ const [note, setNote] = createSignal(null);
28111
+ const [loaded] = createResource(async () => {
28112
+ try {
28113
+ const res = await usersApi.getProfile();
28114
+ const raw = res.data?.phone;
28115
+ const phone = typeof raw === "string" ? raw : "";
28116
+ setValue(phone);
28117
+ props.onLoaded(phone);
28118
+ } catch {
28119
+ }
28120
+ return true;
28121
+ });
28122
+ const save = async () => {
28123
+ if (saving()) return;
28124
+ const phone = value().trim();
28125
+ setNote(null);
28126
+ if (!isValidUsPhone(phone)) {
28127
+ setError(PHONE_ERROR);
28128
+ return;
28129
+ }
28130
+ setError("");
28131
+ setSaving(true);
28132
+ try {
28133
+ await usersApi.updateProfile({
28134
+ phone
28135
+ });
28136
+ props.onSaved(phone);
28137
+ setNote({
28138
+ tone: "ok",
28139
+ text: "Saved to your account."
28140
+ });
28141
+ } catch (e) {
28142
+ setNote({
28143
+ tone: "bad",
28144
+ text: e instanceof Error ? e.message : "Could not save your number."
28145
+ });
28146
+ } finally {
28147
+ setSaving(false);
28148
+ }
28149
+ };
28150
+ return (() => {
28151
+ var _el$9 = _tmpl$479(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling;
28152
+ _el$11.$$input = (e) => {
28153
+ setValue(e.currentTarget.value);
28154
+ setError("");
28155
+ setNote(null);
28156
+ };
28157
+ _el$12.$$click = () => void save();
28158
+ insert(_el$12, () => saving() ? "Saving\u2026" : "Save");
28159
+ insert(_el$9, createComponent(Show, {
28160
+ get when() {
28161
+ return error();
28162
+ },
28163
+ get children() {
28164
+ var _el$13 = _tmpl$3105();
28165
+ insert(_el$13, error);
28166
+ return _el$13;
28167
+ }
28168
+ }), null);
28169
+ insert(_el$9, createComponent(Show, {
28170
+ get when() {
28171
+ return note();
28172
+ },
28173
+ children: (r) => (() => {
28174
+ var _el$14 = _tmpl$2131();
28175
+ insert(_el$14, () => r().text);
28176
+ effect((_$p) => style(_el$14, r().tone === "bad" ? {
28177
+ color: "var(--app-admin-danger-fg)"
28178
+ } : void 0, _$p));
28179
+ return _el$14;
28180
+ })()
28181
+ }), null);
28182
+ effect((_p$) => {
28183
+ var _v$4 = muted3, _v$5 = loaded.loading, _v$6 = saving() || loaded.loading;
28184
+ _p$.e = style(_el$1, _v$4, _p$.e);
28185
+ _v$5 !== _p$.t && (_el$11.disabled = _p$.t = _v$5);
28186
+ _v$6 !== _p$.a && (_el$12.disabled = _p$.a = _v$6);
28187
+ return _p$;
28188
+ }, {
28189
+ e: void 0,
28190
+ t: void 0,
28191
+ a: void 0
28192
+ });
28193
+ effect(() => _el$11.value = value());
28194
+ return _el$9;
28195
+ })();
28196
+ }
28103
28197
  function SmsTemplatesCard(props) {
28104
28198
  const [data] = createResource(async () => {
28105
28199
  const res = await adminApi.getSmsTemplates();
28106
28200
  props.onLoaded?.(res.templates);
28107
28201
  return res;
28108
28202
  });
28203
+ const [phone, setPhone] = createSignal("");
28109
28204
  const templates = () => data.error ? [] : data()?.templates ?? [];
28110
28205
  return createComponent(SmsCard, {
28111
28206
  title: "What the texts say",
28112
28207
  note: "Every text below is sent automatically once texts are set up. The wording is fixed.",
28113
28208
  get children() {
28114
- return [createComponent(Show, {
28209
+ return [createComponent(TestPhoneBlock, {
28210
+ onSaved: setPhone,
28211
+ onLoaded: setPhone
28212
+ }), createComponent(Show, {
28213
+ get when() {
28214
+ return !isValidUsPhone(phone());
28215
+ },
28216
+ get children() {
28217
+ var _el$15 = _tmpl$568();
28218
+ effect((_$p) => style(_el$15, muted3, _$p));
28219
+ return _el$15;
28220
+ }
28221
+ }), createComponent(Show, {
28115
28222
  get when() {
28116
28223
  return data.error;
28117
28224
  },
28118
28225
  get children() {
28119
- var _el$9 = _tmpl$3105(); _el$9.firstChild;
28120
- insert(_el$9, () => data.error?.message, null);
28121
- return _el$9;
28226
+ var _el$16 = _tmpl$660(); _el$16.firstChild;
28227
+ insert(_el$16, () => data.error?.message, null);
28228
+ return _el$16;
28122
28229
  }
28123
28230
  }), createComponent(Show, {
28124
28231
  get when() {
@@ -28132,21 +28239,24 @@ function SmsTemplatesCard(props) {
28132
28239
  return templates();
28133
28240
  },
28134
28241
  children: (t) => createComponent(TemplateRow, {
28135
- template: t
28242
+ template: t,
28243
+ get canTest() {
28244
+ return isValidUsPhone(phone());
28245
+ }
28136
28246
  })
28137
28247
  })];
28138
28248
  }
28139
28249
  });
28140
28250
  }
28141
- delegateEvents(["click"]);
28251
+ delegateEvents(["click", "input"]);
28142
28252
 
28143
28253
  // src/pages/admin/SmsSettings.tsx
28144
- var _tmpl$479 = /* @__PURE__ */ template(`<div style=display:flex;gap:1rem;font-size:0.875rem><div style=width:8rem;flex-shrink:0></div><div style=min-width:0;word-break:break-word>`);
28254
+ var _tmpl$480 = /* @__PURE__ */ template(`<div style=display:flex;gap:1rem;font-size:0.875rem><div style=width:8rem;flex-shrink:0></div><div style=min-width:0;word-break:break-word>`);
28145
28255
  var _tmpl$2132 = /* @__PURE__ */ template(`<p data-testid=sms-status-text style=margin:0;font-size:0.875rem>`);
28146
28256
  var _tmpl$3106 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>Go to Features`);
28147
- var _tmpl$480 = /* @__PURE__ */ template(`<div class=app-admin-notice data-testid=sms-feature-off>Before this site can text customers, a number has to be registered with carriers, which we set up for you. Ask for it under Settings \u203A Features.`);
28148
- var _tmpl$568 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer">`);
28149
- var _tmpl$660 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.5rem>`);
28257
+ var _tmpl$481 = /* @__PURE__ */ template(`<div class=app-admin-notice data-testid=sms-feature-off>Before this site can text customers, a number has to be registered with carriers, which we set up for you. Ask for it under Settings \u203A Features.`);
28258
+ var _tmpl$569 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer">`);
28259
+ var _tmpl$661 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.5rem>`);
28150
28260
  var _tmpl$754 = /* @__PURE__ */ template(`<span data-testid=sms-status-badge>`);
28151
28261
  var _tmpl$846 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>No number yet`);
28152
28262
  var _tmpl$942 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>-`);
@@ -28159,7 +28269,7 @@ var NOT_READY = {
28159
28269
  };
28160
28270
  function Row2(props) {
28161
28271
  return (() => {
28162
- var _el$ = _tmpl$479(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
28272
+ var _el$ = _tmpl$480(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
28163
28273
  insert(_el$2, () => props.label);
28164
28274
  insert(_el$3, () => props.children);
28165
28275
  effect((_$p) => style(_el$2, {
@@ -28195,7 +28305,7 @@ function StatusCard(props) {
28195
28305
  return !s().feature;
28196
28306
  },
28197
28307
  get children() {
28198
- var _el$5 = _tmpl$480(); _el$5.firstChild;
28308
+ var _el$5 = _tmpl$481(); _el$5.firstChild;
28199
28309
  insert(_el$5, createComponent(Show, {
28200
28310
  get when() {
28201
28311
  return canOpenFeatures();
@@ -28215,7 +28325,7 @@ function StatusCard(props) {
28215
28325
  return s().feature;
28216
28326
  },
28217
28327
  get children() {
28218
- var _el$8 = _tmpl$660();
28328
+ var _el$8 = _tmpl$661();
28219
28329
  insert(_el$8, createComponent(Row2, {
28220
28330
  label: "Sends from",
28221
28331
  get children() {
@@ -28239,7 +28349,7 @@ function StatusCard(props) {
28239
28349
  return _tmpl$942();
28240
28350
  },
28241
28351
  get children() {
28242
- var _el$9 = _tmpl$568();
28352
+ var _el$9 = _tmpl$569();
28243
28353
  insert(_el$9, () => s().termsUrl);
28244
28354
  effect(() => setAttribute(_el$9, "href", s().termsUrl));
28245
28355
  return _el$9;
@@ -28258,7 +28368,7 @@ function StatusCard(props) {
28258
28368
  return _tmpl$942();
28259
28369
  },
28260
28370
  get children() {
28261
- var _el$0 = _tmpl$568();
28371
+ var _el$0 = _tmpl$569();
28262
28372
  insert(_el$0, () => s().privacyUrl);
28263
28373
  effect(() => setAttribute(_el$0, "href", s().privacyUrl));
28264
28374
  return _el$0;
@@ -28344,12 +28454,12 @@ function SmsSettings() {
28344
28454
  })();
28345
28455
  }
28346
28456
  delegateEvents(["click"]);
28347
- var _tmpl$481 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
28457
+ var _tmpl$485 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
28348
28458
  var _tmpl$2133 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
28349
28459
  var _tmpl$3107 = /* @__PURE__ */ template(`<option>`);
28350
- var _tmpl$485 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
28351
- var _tmpl$569 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
28352
- var _tmpl$661 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
28460
+ var _tmpl$486 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
28461
+ var _tmpl$570 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
28462
+ var _tmpl$664 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
28353
28463
  var _tmpl$755 = /* @__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>`);
28354
28464
  var _tmpl$847 = /* @__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>: `);
28355
28465
  var _tmpl$943 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (you)`);
@@ -28376,7 +28486,7 @@ function RoleSelect(props) {
28376
28486
  return props.value === null;
28377
28487
  },
28378
28488
  get children() {
28379
- return _tmpl$481();
28489
+ return _tmpl$485();
28380
28490
  }
28381
28491
  }), null);
28382
28492
  insert(_el$, createComponent(For, {
@@ -28470,7 +28580,7 @@ function Admins(props) {
28470
28580
  return apexNote();
28471
28581
  },
28472
28582
  get children() {
28473
- var _el$14 = _tmpl$485();
28583
+ var _el$14 = _tmpl$486();
28474
28584
  insert(_el$14, apexNote);
28475
28585
  return _el$14;
28476
28586
  }
@@ -28494,7 +28604,7 @@ function Admins(props) {
28494
28604
  },
28495
28605
  get children() {
28496
28606
  return [(() => {
28497
- var _el$15 = _tmpl$569(), _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;
28607
+ var _el$15 = _tmpl$570(), _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;
28498
28608
  insert(_el$21, createComponent(For, {
28499
28609
  get each() {
28500
28610
  return team()?.admins ?? [];
@@ -28526,7 +28636,7 @@ function Admins(props) {
28526
28636
  return (team()?.invites ?? []).length > 0;
28527
28637
  },
28528
28638
  get children() {
28529
- return [_tmpl$661(), (() => {
28639
+ return [_tmpl$664(), (() => {
28530
28640
  var _el$23 = _tmpl$755(), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling; _el$28.nextSibling; var _el$30 = _el$24.nextSibling;
28531
28641
  insert(_el$30, createComponent(For, {
28532
28642
  get each() {
@@ -28565,12 +28675,12 @@ function Admins(props) {
28565
28675
  delegateEvents(["input", "click"]);
28566
28676
 
28567
28677
  // src/pages/AdminDashboard.tsx
28568
- var _tmpl$486 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
28678
+ var _tmpl$487 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
28569
28679
  var _tmpl$2134 = /* @__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">`);
28570
28680
  var _tmpl$3108 = /* @__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>`);
28571
- var _tmpl$487 = /* @__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">`);
28572
- var _tmpl$570 = /* @__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.`);
28573
- var _tmpl$664 = /* @__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`);
28681
+ var _tmpl$488 = /* @__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">`);
28682
+ var _tmpl$571 = /* @__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.`);
28683
+ var _tmpl$665 = /* @__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`);
28574
28684
  var _tmpl$756 = /* @__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); } }`);
28575
28685
  var TAB_LABELS = {
28576
28686
  dashboard: "Dashboard",
@@ -28754,7 +28864,7 @@ function AdminDashboard(props) {
28754
28864
  return props.tabIcons?.[btnProps.tab];
28755
28865
  },
28756
28866
  get children() {
28757
- var _el$2 = _tmpl$486();
28867
+ var _el$2 = _tmpl$487();
28758
28868
  effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
28759
28869
  return _el$2;
28760
28870
  }
@@ -28803,7 +28913,7 @@ function AdminDashboard(props) {
28803
28913
  return visibleGroups();
28804
28914
  },
28805
28915
  children: (group) => [(() => {
28806
- var _el$11 = _tmpl$487();
28916
+ var _el$11 = _tmpl$488();
28807
28917
  insert(_el$11, () => group.label);
28808
28918
  return _el$11;
28809
28919
  })(), createComponent(For, {
@@ -29067,7 +29177,7 @@ function AdminDashboard(props) {
29067
29177
  }
29068
29178
  function RoleForbidden() {
29069
29179
  return (() => {
29070
- var _el$12 = _tmpl$570(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
29180
+ var _el$12 = _tmpl$571(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
29071
29181
  return _el$12;
29072
29182
  })();
29073
29183
  }
@@ -29075,7 +29185,7 @@ function AdminTabError(props) {
29075
29185
  console.error("[AdminDashboard] tab failed to render:", props.error);
29076
29186
  const message = () => props.error instanceof Error ? props.error.message : String(props.error);
29077
29187
  return (() => {
29078
- var _el$15 = _tmpl$664(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
29188
+ var _el$15 = _tmpl$665(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
29079
29189
  insert(_el$17, message);
29080
29190
  _el$18.$$click = () => props.reset();
29081
29191
  return _el$15;
@@ -29165,12 +29275,12 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
29165
29275
  }
29166
29276
  return "overview";
29167
29277
  }
29168
- var _tmpl$488 = /* @__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`);
29278
+ var _tmpl$489 = /* @__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`);
29169
29279
  var _tmpl$2135 = /* @__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`);
29170
29280
  var _tmpl$3109 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
29171
- var _tmpl$489 = /* @__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">`);
29172
- var _tmpl$571 = /* @__PURE__ */ template(`<div><h3>Subscription`);
29173
- var _tmpl$665 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
29281
+ var _tmpl$490 = /* @__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">`);
29282
+ var _tmpl$574 = /* @__PURE__ */ template(`<div><h3>Subscription`);
29283
+ var _tmpl$666 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
29174
29284
  var _tmpl$757 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
29175
29285
  var _tmpl$848 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
29176
29286
  var _tmpl$944 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
@@ -29189,7 +29299,7 @@ function PatientDashboardPreview(props) {
29189
29299
  authToken: () => props.token
29190
29300
  });
29191
29301
  return (() => {
29192
- var _el$ = _tmpl$488(), _el$2 = _el$.firstChild, _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.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
29302
+ var _el$ = _tmpl$489(), _el$2 = _el$.firstChild, _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.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
29193
29303
  _el$.$$click = (e) => {
29194
29304
  if (e.target === e.currentTarget) props.onClose();
29195
29305
  };
@@ -29223,13 +29333,13 @@ function PatientDashboardPreview(props) {
29223
29333
  return _tmpl$3109();
29224
29334
  },
29225
29335
  children: (profile) => [(() => {
29226
- var _el$13 = _tmpl$489(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
29336
+ var _el$13 = _tmpl$490(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
29227
29337
  insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
29228
29338
  insert(_el$17, () => profile().email);
29229
29339
  effect((_$p) => style(_el$14, panelSectionHeader, _$p));
29230
29340
  return _el$13;
29231
29341
  })(), (() => {
29232
- var _el$18 = _tmpl$571(), _el$19 = _el$18.firstChild;
29342
+ var _el$18 = _tmpl$574(), _el$19 = _el$18.firstChild;
29233
29343
  insert(_el$18, createComponent(Show, {
29234
29344
  get when() {
29235
29345
  return data.subscription();
@@ -29302,7 +29412,7 @@ function PatientDashboardPreview(props) {
29302
29412
  return _tmpl$1226();
29303
29413
  },
29304
29414
  get children() {
29305
- var _el$22 = _tmpl$665();
29415
+ var _el$22 = _tmpl$666();
29306
29416
  insert(_el$22, createComponent(For, {
29307
29417
  get each() {
29308
29418
  return data.rxList();
@@ -29354,7 +29464,7 @@ function PatientDashboardPreview(props) {
29354
29464
  return _tmpl$1621();
29355
29465
  },
29356
29466
  get children() {
29357
- var _el$25 = _tmpl$665();
29467
+ var _el$25 = _tmpl$666();
29358
29468
  insert(_el$25, createComponent(For, {
29359
29469
  get each() {
29360
29470
  return data.pendingSurveys();
@@ -29379,7 +29489,7 @@ function PatientDashboardPreview(props) {
29379
29489
  })();
29380
29490
  }
29381
29491
  delegateEvents(["click"]);
29382
- var _tmpl$490 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
29492
+ var _tmpl$491 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
29383
29493
  var _tmpl$2136 = /* @__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>`);
29384
29494
  var _tmpl$3117 = /* @__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.`);
29385
29495
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
@@ -29449,7 +29559,7 @@ function UpdatePaymentMethod(props) {
29449
29559
  return flow.error();
29450
29560
  },
29451
29561
  get children() {
29452
- var _el$4 = _tmpl$490();
29562
+ var _el$4 = _tmpl$491();
29453
29563
  insert(_el$4, createComponent(Banner, {
29454
29564
  variant: "error",
29455
29565
  get children() {
@@ -29527,12 +29637,12 @@ function UpdatePaymentMethod(props) {
29527
29637
  return _el$;
29528
29638
  })();
29529
29639
  }
29530
- var _tmpl$491 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
29640
+ var _tmpl$495 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
29531
29641
  var _tmpl$2137 = /* @__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>`);
29532
29642
  var _tmpl$3118 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
29533
- var _tmpl$495 = /* @__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>`);
29534
- var _tmpl$574 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
29535
- var _tmpl$666 = /* @__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>`);
29643
+ var _tmpl$496 = /* @__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>`);
29644
+ var _tmpl$575 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
29645
+ var _tmpl$667 = /* @__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>`);
29536
29646
  var _tmpl$758 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
29537
29647
  var _tmpl$849 = /* @__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.`);
29538
29648
  var _tmpl$945 = /* @__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`);
@@ -29576,7 +29686,7 @@ function TrackingChip(props) {
29576
29686
  return props.url;
29577
29687
  },
29578
29688
  get children() {
29579
- var _el$8 = _tmpl$491(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
29689
+ var _el$8 = _tmpl$495(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
29580
29690
  insert(_el$8, (() => {
29581
29691
  var _c$ = memo(() => !!props.carrier);
29582
29692
  return () => _c$() ? ` with ${props.carrier}` : "";
@@ -29597,13 +29707,13 @@ function OrderTracker(props) {
29597
29707
  return refill();
29598
29708
  },
29599
29709
  children: (r) => (() => {
29600
- var _el$11 = _tmpl$495(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
29710
+ var _el$11 = _tmpl$496(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
29601
29711
  insert(_el$12, createComponent(Show, {
29602
29712
  get when() {
29603
29713
  return !r().pendingFill;
29604
29714
  },
29605
29715
  get fallback() {
29606
- return _tmpl$574();
29716
+ return _tmpl$575();
29607
29717
  },
29608
29718
  get children() {
29609
29719
  var _el$14 = _tmpl$3118(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
@@ -29617,7 +29727,7 @@ function OrderTracker(props) {
29617
29727
  return r().events;
29618
29728
  },
29619
29729
  children: (e) => (() => {
29620
- var _el$20 = _tmpl$666(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
29730
+ var _el$20 = _tmpl$667(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
29621
29731
  insert(_el$22, () => e.label);
29622
29732
  insert(_el$23, () => formatEventDate(e.date));
29623
29733
  insert(_el$24, (() => {
@@ -29856,7 +29966,7 @@ function OrderTracker(props) {
29856
29966
  });
29857
29967
  }
29858
29968
  delegateEvents(["click"]);
29859
- var _tmpl$496 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
29969
+ var _tmpl$497 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
29860
29970
  var _tmpl$2138 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
29861
29971
  var _tmpl$3119 = /* @__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>`);
29862
29972
  var STATUS_LABEL = {
@@ -29883,7 +29993,7 @@ function RxRow(props) {
29883
29993
  return props.rx.dosage;
29884
29994
  },
29885
29995
  get children() {
29886
- var _el$4 = _tmpl$496(); _el$4.firstChild;
29996
+ var _el$4 = _tmpl$497(); _el$4.firstChild;
29887
29997
  insert(_el$4, () => props.rx.dosage, null);
29888
29998
  return _el$4;
29889
29999
  }
@@ -29937,12 +30047,12 @@ function RxRow(props) {
29937
30047
  })();
29938
30048
  }
29939
30049
  delegateEvents(["click"]);
29940
- var _tmpl$497 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
30050
+ var _tmpl$498 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
29941
30051
  var _tmpl$2139 = /* @__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`);
29942
30052
  var _tmpl$3120 = /* @__PURE__ */ template(`<p class=membership__dose>`);
29943
- var _tmpl$498 = /* @__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 `);
29944
- var _tmpl$575 = /* @__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`);
29945
- var _tmpl$667 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
30053
+ var _tmpl$499 = /* @__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 `);
30054
+ var _tmpl$576 = /* @__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`);
30055
+ var _tmpl$668 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
29946
30056
  var _tmpl$759 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
29947
30057
  var _tmpl$850 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
29948
30058
  var _tmpl$946 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
@@ -29992,7 +30102,7 @@ function PlanBilling(props) {
29992
30102
  }
29993
30103
  };
29994
30104
  return (() => {
29995
- var _el$ = _tmpl$497(); _el$.firstChild;
30105
+ var _el$ = _tmpl$498(); _el$.firstChild;
29996
30106
  insert(_el$, createComponent(Show, {
29997
30107
  get when() {
29998
30108
  return primary();
@@ -30005,7 +30115,7 @@ function PlanBilling(props) {
30005
30115
  })();
30006
30116
  },
30007
30117
  children: (sub) => [(() => {
30008
- var _el$7 = _tmpl$498(), _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;
30118
+ var _el$7 = _tmpl$499(), _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;
30009
30119
  insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
30010
30120
  insert(_el$1, () => props.brandName);
30011
30121
  insert(_el$10, () => sub().medicationName ?? sub().medication);
@@ -30024,7 +30134,7 @@ function PlanBilling(props) {
30024
30134
  effect(() => className(_el$7, `membership membership--${sub().status}`));
30025
30135
  return _el$7;
30026
30136
  })(), (() => {
30027
- var _el$17 = _tmpl$575(), _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;
30137
+ var _el$17 = _tmpl$576(), _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;
30028
30138
  insert(_el$20, () => formatLongDate(sub().createdAt));
30029
30139
  insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
30030
30140
  insert(_el$26, () => formatCents(sub().amountCents), _el$27);
@@ -30034,7 +30144,7 @@ function PlanBilling(props) {
30034
30144
  return props.messagingEnabled;
30035
30145
  },
30036
30146
  get children() {
30037
- var _el$28 = _tmpl$667(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
30147
+ var _el$28 = _tmpl$668(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
30038
30148
  _el$31.$$click = () => props.onOpenMessages({
30039
30149
  channel: "support",
30040
30150
  category: "billing"
@@ -30116,12 +30226,12 @@ function PlanBilling(props) {
30116
30226
  })();
30117
30227
  }
30118
30228
  delegateEvents(["click"]);
30119
- var _tmpl$499 = /* @__PURE__ */ template(`<dd class=account__sms-edit><input class=account__sms-input type=tel inputmode=tel autocomplete=tel aria-label="Mobile number"><button type=button class="portal-btn portal-btn--primary">Save number</button><button type=button class="portal-btn portal-btn--ghost">Cancel`);
30229
+ var _tmpl$500 = /* @__PURE__ */ template(`<dd class=account__sms-edit><input class=account__sms-input type=tel inputmode=tel autocomplete=tel aria-label="Mobile number"><button type=button class="portal-btn portal-btn--primary">Save number</button><button type=button class="portal-btn portal-btn--ghost">Cancel`);
30120
30230
  var _tmpl$2140 = /* @__PURE__ */ template(`<p class=account__sms-error role=alert>`);
30121
30231
  var _tmpl$3121 = /* @__PURE__ */ template(`<div class=account__sms-on><span>Texts are on</span><button type=button class=plan__link-btn>Turn off texts`);
30122
30232
  var _tmpl$4100 = /* @__PURE__ */ template(`<ul class=account__sms-events aria-label="Which texts you get">`);
30123
- var _tmpl$576 = /* @__PURE__ */ template(`<section class=account__sms data-testid=sms-section aria-labelledby=sms-heading><span class=lab-label id=sms-heading>Text messages</span><dl class=account__fields><div class=account__field><dt class=lab-label>Mobile number`);
30124
- var _tmpl$668 = /* @__PURE__ */ template(`<dd class=account__sms-number><span></span><button type=button class=account__note-link>`);
30233
+ var _tmpl$577 = /* @__PURE__ */ template(`<section class=account__sms data-testid=sms-section aria-labelledby=sms-heading><span class=lab-label id=sms-heading>Text messages</span><dl class=account__fields><div class=account__field><dt class=lab-label>Mobile number`);
30234
+ var _tmpl$669 = /* @__PURE__ */ template(`<dd class=account__sms-number><span></span><button type=button class=account__note-link>`);
30125
30235
  var _tmpl$760 = /* @__PURE__ */ template(`<p class=account__sms-notice role=status>`);
30126
30236
  var _tmpl$851 = /* @__PURE__ */ template(`<p class=account__sms-stop data-testid=sms-stop>You replied STOP. Text START to <!> to receive texts again.`);
30127
30237
  var _tmpl$947 = /* @__PURE__ */ template(`<p class=account__sms-links>`);
@@ -30146,14 +30256,14 @@ function SmsSection() {
30146
30256
  return sms.available();
30147
30257
  },
30148
30258
  get children() {
30149
- var _el$ = _tmpl$576(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$4.firstChild;
30259
+ var _el$ = _tmpl$577(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$4.firstChild;
30150
30260
  insert(_el$4, createComponent(Show, {
30151
30261
  get when() {
30152
30262
  return editing();
30153
30263
  },
30154
30264
  get fallback() {
30155
30265
  return (() => {
30156
- var _el$13 = _tmpl$668(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
30266
+ var _el$13 = _tmpl$669(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
30157
30267
  insert(_el$14, (() => {
30158
30268
  var _c$ = memo(() => !!sms.phone());
30159
30269
  return () => _c$() ? formatUsPhone(sms.phone()) : "No number on file";
@@ -30165,7 +30275,7 @@ function SmsSection() {
30165
30275
  })();
30166
30276
  },
30167
30277
  get children() {
30168
- var _el$6 = _tmpl$499(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
30278
+ var _el$6 = _tmpl$500(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling;
30169
30279
  _el$7.$$input = (e) => setDraft(e.currentTarget.value);
30170
30280
  _el$8.$$click = savePhone;
30171
30281
  _el$9.$$click = () => setEditing(false);
@@ -30317,12 +30427,12 @@ function SmsSection() {
30317
30427
  delegateEvents(["input", "click"]);
30318
30428
 
30319
30429
  // src/pages/member/AccountPanel.tsx
30320
- var _tmpl$500 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
30430
+ var _tmpl$501 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
30321
30431
  var _tmpl$2141 = /* @__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.`);
30322
30432
  var _tmpl$3122 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
30323
30433
  var _tmpl$4101 = /* @__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`);
30324
- var _tmpl$577 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
30325
- var _tmpl$669 = /* @__PURE__ */ template(`<a class=account__support-link>`);
30434
+ var _tmpl$578 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
30435
+ var _tmpl$670 = /* @__PURE__ */ template(`<a class=account__support-link>`);
30326
30436
  function pick(member, ...keys) {
30327
30437
  if (!member) return "";
30328
30438
  for (const k of keys) {
@@ -30369,7 +30479,7 @@ function AccountPanel(props) {
30369
30479
  return fields();
30370
30480
  },
30371
30481
  children: (f) => (() => {
30372
- var _el$11 = _tmpl$577(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
30482
+ var _el$11 = _tmpl$578(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
30373
30483
  insert(_el$12, () => f.label);
30374
30484
  insert(_el$13, () => f.value);
30375
30485
  return _el$11;
@@ -30380,7 +30490,7 @@ function AccountPanel(props) {
30380
30490
  return fields().length === 0;
30381
30491
  },
30382
30492
  get children() {
30383
- return _tmpl$500();
30493
+ return _tmpl$501();
30384
30494
  }
30385
30495
  }), _el$0);
30386
30496
  insert(_el$, createComponent(SmsSection, {}), _el$0);
@@ -30412,7 +30522,7 @@ function AccountPanel(props) {
30412
30522
  return props.legalLinks ?? [];
30413
30523
  },
30414
30524
  children: (link) => (() => {
30415
- var _el$14 = _tmpl$669();
30525
+ var _el$14 = _tmpl$670();
30416
30526
  insert(_el$14, () => link.label);
30417
30527
  effect(() => setAttribute(_el$14, "href", link.href));
30418
30528
  return _el$14;
@@ -30423,12 +30533,12 @@ function AccountPanel(props) {
30423
30533
  })();
30424
30534
  }
30425
30535
  delegateEvents(["click"]);
30426
- var _tmpl$501 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
30536
+ var _tmpl$505 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
30427
30537
  var _tmpl$2142 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
30428
30538
  var _tmpl$3123 = /* @__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>`);
30429
30539
  var _tmpl$4102 = /* @__PURE__ */ template(`<li>`);
30430
- var _tmpl$578 = /* @__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>`);
30431
- var _tmpl$670 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
30540
+ var _tmpl$579 = /* @__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>`);
30541
+ var _tmpl$671 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
30432
30542
  function firstNumber(s) {
30433
30543
  const m = (s || "").match(/\d+(\.\d+)?/);
30434
30544
  return m ? m[0] : null;
@@ -30468,7 +30578,7 @@ function MedicationGuide(props) {
30468
30578
  return props.guide.titration;
30469
30579
  },
30470
30580
  children: (step, i) => (() => {
30471
- var _el$46 = _tmpl$578(), _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;
30581
+ var _el$46 = _tmpl$579(), _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;
30472
30582
  insert(_el$50, () => step.dose);
30473
30583
  insert(_el$51, () => step.phase);
30474
30584
  insert(_el$52, () => step.timeframe);
@@ -30482,7 +30592,7 @@ function MedicationGuide(props) {
30482
30592
  return props.guide.injectionSteps;
30483
30593
  },
30484
30594
  children: (step) => (() => {
30485
- var _el$54 = _tmpl$670(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
30595
+ var _el$54 = _tmpl$671(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
30486
30596
  insert(_el$55, () => step.n);
30487
30597
  insert(_el$57, () => step.title);
30488
30598
  insert(_el$58, () => step.detail);
@@ -30505,7 +30615,7 @@ function MedicationGuide(props) {
30505
30615
  return props.guide.contraception;
30506
30616
  },
30507
30617
  get children() {
30508
- var _el$24 = _tmpl$501(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
30618
+ var _el$24 = _tmpl$505(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
30509
30619
  insert(_el$26, () => props.guide.contraception);
30510
30620
  return _el$24;
30511
30621
  }
@@ -30584,12 +30694,12 @@ function MedicationGuide(props) {
30584
30694
  })();
30585
30695
  }
30586
30696
  delegateEvents(["click"]);
30587
- var _tmpl$505 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
30697
+ var _tmpl$506 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
30588
30698
  var _tmpl$2143 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
30589
30699
  var _tmpl$3124 = /* @__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`);
30590
30700
  var _tmpl$4103 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
30591
- var _tmpl$579 = /* @__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>`);
30592
- var _tmpl$671 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
30701
+ var _tmpl$580 = /* @__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>`);
30702
+ var _tmpl$673 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
30593
30703
  var _tmpl$761 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
30594
30704
  var _tmpl$852 = /* @__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>`);
30595
30705
  var _tmpl$948 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
@@ -30829,7 +30939,7 @@ function MessagesPanel(props) {
30829
30939
  }
30830
30940
  }
30831
30941
  const ChannelChip = (p) => (() => {
30832
- var _el$ = _tmpl$505();
30942
+ var _el$ = _tmpl$506();
30833
30943
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
30834
30944
  insert(_el$, createComponent(Show, {
30835
30945
  get when() {
@@ -30860,7 +30970,7 @@ function MessagesPanel(props) {
30860
30970
  _el$7.$$click = openCompose;
30861
30971
  return _el$3;
30862
30972
  })(), (() => {
30863
- var _el$8 = _tmpl$671();
30973
+ var _el$8 = _tmpl$673();
30864
30974
  insert(_el$8, createComponent(Show, {
30865
30975
  get when() {
30866
30976
  return thread().loadingConversations();
@@ -30874,7 +30984,7 @@ function MessagesPanel(props) {
30874
30984
  return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
30875
30985
  },
30876
30986
  get children() {
30877
- var _el$0 = _tmpl$579(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
30987
+ var _el$0 = _tmpl$580(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
30878
30988
  insert(_el$11, createComponent(Show, {
30879
30989
  get when() {
30880
30990
  return channel() === "care";
@@ -31486,12 +31596,12 @@ function MessagesPanel(props) {
31486
31596
  })();
31487
31597
  }
31488
31598
  delegateEvents(["click", "input", "keydown"]);
31489
- var _tmpl$506 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
31599
+ var _tmpl$507 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
31490
31600
  var _tmpl$2145 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
31491
31601
  var _tmpl$3126 = /* @__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.`);
31492
31602
  var _tmpl$4104 = /* @__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>`);
31493
- var _tmpl$580 = /* @__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`);
31494
- var _tmpl$673 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
31603
+ var _tmpl$581 = /* @__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`);
31604
+ var _tmpl$674 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
31495
31605
  var _tmpl$762 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
31496
31606
  var _tmpl$853 = /* @__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.`);
31497
31607
  var _tmpl$949 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
@@ -31536,7 +31646,7 @@ function SurveyHistory() {
31536
31646
  return _tmpl$3126();
31537
31647
  },
31538
31648
  get children() {
31539
- var _el$ = _tmpl$506();
31649
+ var _el$ = _tmpl$507();
31540
31650
  insert(_el$, createComponent(For, {
31541
31651
  get each() {
31542
31652
  return list();
@@ -31555,14 +31665,14 @@ function SurveyHistory() {
31555
31665
  }
31556
31666
  });
31557
31667
  const DetailView = () => (() => {
31558
- var _el$8 = _tmpl$580(), _el$9 = _el$8.firstChild;
31668
+ var _el$8 = _tmpl$581(), _el$9 = _el$8.firstChild;
31559
31669
  _el$9.$$click = () => setSelectedId(null);
31560
31670
  insert(_el$8, createComponent(Show, {
31561
31671
  get when() {
31562
31672
  return !detail.loading;
31563
31673
  },
31564
31674
  get fallback() {
31565
- return _tmpl$673();
31675
+ return _tmpl$674();
31566
31676
  },
31567
31677
  get children() {
31568
31678
  return createComponent(Show, {
@@ -31633,12 +31743,12 @@ function SurveyHistory() {
31633
31743
  delegateEvents(["click"]);
31634
31744
 
31635
31745
  // src/pages/MemberPortal.tsx
31636
- var _tmpl$507 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
31746
+ var _tmpl$508 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
31637
31747
  var _tmpl$2146 = /* @__PURE__ */ template(`<span>`);
31638
31748
  var _tmpl$3127 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
31639
31749
  var _tmpl$4105 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
31640
- var _tmpl$581 = /* @__PURE__ */ template(`<div class=rx-stack>`);
31641
- var _tmpl$674 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
31750
+ var _tmpl$584 = /* @__PURE__ */ template(`<div class=rx-stack>`);
31751
+ var _tmpl$675 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
31642
31752
  var _tmpl$763 = /* @__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`);
31643
31753
  var _tmpl$854 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
31644
31754
  var _tmpl$950 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
@@ -31780,7 +31890,7 @@ function MemberPortal(props) {
31780
31890
  return memo(() => item.key === "tracker")() && inMotion();
31781
31891
  },
31782
31892
  get children() {
31783
- return _tmpl$507();
31893
+ return _tmpl$508();
31784
31894
  }
31785
31895
  }), null);
31786
31896
  insert(_el$, createComponent(Show, {
@@ -31846,7 +31956,7 @@ function MemberPortal(props) {
31846
31956
  });
31847
31957
  },
31848
31958
  children: (primary) => (() => {
31849
- var _el$6 = _tmpl$581();
31959
+ var _el$6 = _tmpl$584();
31850
31960
  insert(_el$6, createComponent(OrderTracker, {
31851
31961
  get request() {
31852
31962
  return data.toTrackerRequest(primary());
@@ -31912,7 +32022,7 @@ function MemberPortal(props) {
31912
32022
  return !data.loading();
31913
32023
  },
31914
32024
  get fallback() {
31915
- return _tmpl$674();
32025
+ return _tmpl$675();
31916
32026
  },
31917
32027
  get children() {
31918
32028
  return createComponent(Show, {
@@ -32099,11 +32209,11 @@ function MemberPortal(props) {
32099
32209
  })();
32100
32210
  }
32101
32211
  delegateEvents(["click"]);
32102
- var _tmpl$508 = /* @__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.`);
32212
+ var _tmpl$509 = /* @__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.`);
32103
32213
  var _tmpl$2147 = /* @__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`);
32104
32214
  var _tmpl$3128 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
32105
32215
  var _tmpl$4106 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
32106
- var _tmpl$584 = /* @__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)>`);
32216
+ var _tmpl$585 = /* @__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)>`);
32107
32217
  function formatMoney(cents) {
32108
32218
  return `$${(cents / 100).toFixed(2)}`;
32109
32219
  }
@@ -32142,7 +32252,7 @@ function AffiliateOverview() {
32142
32252
  return isPending();
32143
32253
  },
32144
32254
  get children() {
32145
- return _tmpl$508();
32255
+ return _tmpl$509();
32146
32256
  }
32147
32257
  }), null);
32148
32258
  insert(_el$, createComponent(Show, {
@@ -32159,7 +32269,7 @@ function AffiliateOverview() {
32159
32269
  return cards(s());
32160
32270
  },
32161
32271
  children: (card) => (() => {
32162
- var _el$6 = _tmpl$584(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
32272
+ var _el$6 = _tmpl$585(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
32163
32273
  insert(_el$7, () => card.label);
32164
32274
  insert(_el$8, () => card.value);
32165
32275
  return _el$6;
@@ -32171,11 +32281,11 @@ function AffiliateOverview() {
32171
32281
  return _el$;
32172
32282
  })();
32173
32283
  }
32174
- var _tmpl$509 = /* @__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>`);
32284
+ var _tmpl$586 = /* @__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>`);
32175
32285
  var _tmpl$2148 = /* @__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`);
32176
32286
  var _tmpl$3129 = /* @__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.`);
32177
32287
  var _tmpl$4107 = /* @__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`);
32178
- var _tmpl$585 = /* @__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">`);
32288
+ var _tmpl$587 = /* @__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">`);
32179
32289
  function formatMoney2(cents) {
32180
32290
  return `$${(cents / 100).toFixed(2)}`;
32181
32291
  }
@@ -32222,13 +32332,13 @@ function AffiliateConversions() {
32222
32332
  return _tmpl$3129();
32223
32333
  },
32224
32334
  get children() {
32225
- var _el$3 = _tmpl$509(), _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;
32335
+ var _el$3 = _tmpl$586(), _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;
32226
32336
  insert(_el$10, createComponent(For, {
32227
32337
  get each() {
32228
32338
  return conversions();
32229
32339
  },
32230
32340
  children: (c) => (() => {
32231
- var _el$12 = _tmpl$585(), _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;
32341
+ var _el$12 = _tmpl$587(), _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;
32232
32342
  insert(_el$13, () => formatDate4(c.createdAt));
32233
32343
  insert(_el$14, () => c.paymentType, null);
32234
32344
  insert(_el$14, createComponent(Show, {
@@ -32307,7 +32417,7 @@ function td() {
32307
32417
  color: "var(--app-affiliate-fg)"
32308
32418
  };
32309
32419
  }
32310
- var _tmpl$586 = /* @__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>`);
32420
+ var _tmpl$588 = /* @__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>`);
32311
32421
  var _tmpl$2149 = /* @__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.`);
32312
32422
  var _tmpl$3130 = /* @__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.`);
32313
32423
  var _tmpl$4108 = /* @__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>`);
@@ -32352,7 +32462,7 @@ function AffiliateDownline() {
32352
32462
  return _tmpl$3130();
32353
32463
  },
32354
32464
  get children() {
32355
- var _el$4 = _tmpl$586(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
32465
+ var _el$4 = _tmpl$588(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
32356
32466
  insert(_el$10, createComponent(For, {
32357
32467
  get each() {
32358
32468
  return downline();
@@ -32421,7 +32531,7 @@ function td2() {
32421
32531
  color: "var(--app-affiliate-fg)"
32422
32532
  };
32423
32533
  }
32424
- var _tmpl$587 = /* @__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.`);
32534
+ var _tmpl$589 = /* @__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.`);
32425
32535
  var _tmpl$2150 = /* @__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`);
32426
32536
  var _tmpl$3131 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
32427
32537
  function AffiliateReferralLink() {
@@ -32457,7 +32567,7 @@ function AffiliateReferralLink() {
32457
32567
  return _tmpl$3131();
32458
32568
  },
32459
32569
  get children() {
32460
- var _el$3 = _tmpl$587(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
32570
+ var _el$3 = _tmpl$589(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
32461
32571
  insert(_el$6, homepageLink);
32462
32572
  _el$7.$$click = copy;
32463
32573
  insert(_el$7, () => copied() ? "Copied" : "Copy");
@@ -32468,7 +32578,7 @@ function AffiliateReferralLink() {
32468
32578
  })();
32469
32579
  }
32470
32580
  delegateEvents(["click"]);
32471
- var _tmpl$588 = /* @__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.`);
32581
+ var _tmpl$590 = /* @__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.`);
32472
32582
  var _tmpl$2151 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
32473
32583
  var _tmpl$3132 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
32474
32584
  var _tmpl$4109 = /* @__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)>`);
@@ -32506,7 +32616,7 @@ function AffiliateSettings() {
32506
32616
  value: a.paymentEmail ?? "\u2014"
32507
32617
  }];
32508
32618
  return (() => {
32509
- var _el$ = _tmpl$588(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
32619
+ var _el$ = _tmpl$590(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
32510
32620
  insert(_el$, createComponent(Show, {
32511
32621
  get when() {
32512
32622
  return affiliate();
@@ -32537,7 +32647,7 @@ function AffiliateSettings() {
32537
32647
  delegateEvents(["click"]);
32538
32648
 
32539
32649
  // src/pages/AffiliatePortal.tsx
32540
- var _tmpl$589 = /* @__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>`);
32650
+ var _tmpl$591 = /* @__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>`);
32541
32651
  var _tmpl$2152 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
32542
32652
  var _tmpl$3133 = /* @__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">`);
32543
32653
  var _tmpl$4115 = /* @__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); } }`);
@@ -32585,7 +32695,7 @@ function AffiliatePortal(props) {
32585
32695
  });
32586
32696
  },
32587
32697
  get children() {
32588
- var _el$ = _tmpl$589(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
32698
+ var _el$ = _tmpl$591(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
32589
32699
  _el$3.$$click = () => setDrawerOpen(true);
32590
32700
  insert(_el$4, () => TAB_LABELS2[currentTab()]);
32591
32701
  _el$5.$$click = () => setDrawerOpen(false);
@@ -32697,11 +32807,11 @@ function AffiliateGateSpinner(props) {
32697
32807
  })();
32698
32808
  }
32699
32809
  delegateEvents(["click"]);
32700
- var _tmpl$590 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
32810
+ var _tmpl$594 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
32701
32811
  function AffiliatePasswordInput(props) {
32702
32812
  const [visible, setVisible] = createSignal(false);
32703
32813
  return (() => {
32704
- var _el$ = _tmpl$590(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
32814
+ var _el$ = _tmpl$594(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
32705
32815
  _el$2.$$input = (e) => props.onInput(e.currentTarget.value);
32706
32816
  _el$3.$$click = () => setVisible((v) => !v);
32707
32817
  insert(_el$3, () => visible() ? "Hide" : "Show");
@@ -32742,12 +32852,12 @@ function inputStyle() {
32742
32852
  delegateEvents(["input", "click"]);
32743
32853
 
32744
32854
  // src/pages/AffiliateRegister.tsx
32745
- var _tmpl$591 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
32855
+ var _tmpl$595 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
32746
32856
  var _tmpl$2153 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
32747
32857
  var _tmpl$3134 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
32748
32858
  var _tmpl$4116 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
32749
- var _tmpl$594 = /* @__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">`);
32750
- var _tmpl$675 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
32859
+ var _tmpl$596 = /* @__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">`);
32860
+ var _tmpl$676 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
32751
32861
  var _tmpl$764 = /* @__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">`);
32752
32862
  var _tmpl$855 = /* @__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.`);
32753
32863
  var _tmpl$951 = /* @__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.`);
@@ -32797,7 +32907,7 @@ function AffiliateRegister(props) {
32797
32907
  insert(_el$6, createComponent(Row3, {
32798
32908
  label: "First name",
32799
32909
  get children() {
32800
- var _el$7 = _tmpl$591();
32910
+ var _el$7 = _tmpl$595();
32801
32911
  _el$7.$$input = (e) => setFirstName(e.currentTarget.value);
32802
32912
  effect((_$p) => style(_el$7, inputStyle2(), _$p));
32803
32913
  effect(() => _el$7.value = firstName());
@@ -32858,7 +32968,7 @@ function AffiliateRegister(props) {
32858
32968
  return error();
32859
32969
  },
32860
32970
  get children() {
32861
- var _el$17 = _tmpl$594();
32971
+ var _el$17 = _tmpl$596();
32862
32972
  insert(_el$17, error);
32863
32973
  return _el$17;
32864
32974
  }
@@ -32869,7 +32979,7 @@ function AffiliateRegister(props) {
32869
32979
  return props.onNavigateLogin;
32870
32980
  },
32871
32981
  get children() {
32872
- var _el$19 = _tmpl$675();
32982
+ var _el$19 = _tmpl$676();
32873
32983
  _el$19.$$click = () => props.onNavigateLogin?.();
32874
32984
  effect((_$p) => style(_el$19, linkStyle(), _$p));
32875
32985
  return _el$19;
@@ -32936,7 +33046,7 @@ function linkStyle() {
32936
33046
  };
32937
33047
  }
32938
33048
  delegateEvents(["input", "click"]);
32939
- var _tmpl$595 = /* @__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">`);
33049
+ var _tmpl$597 = /* @__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">`);
32940
33050
  var _tmpl$2154 = /* @__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?`);
32941
33051
  var _tmpl$3135 = /* @__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`);
32942
33052
  var _tmpl$4117 = /* @__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">`);
@@ -32975,7 +33085,7 @@ function AffiliateLogin(props) {
32975
33085
  return error();
32976
33086
  },
32977
33087
  get children() {
32978
- var _el$0 = _tmpl$595();
33088
+ var _el$0 = _tmpl$597();
32979
33089
  insert(_el$0, error);
32980
33090
  return _el$0;
32981
33091
  }
@@ -33044,12 +33154,12 @@ function inputStyle3() {
33044
33154
  };
33045
33155
  }
33046
33156
  delegateEvents(["input", "click"]);
33047
- var _tmpl$596 = /* @__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">`);
33157
+ var _tmpl$598 = /* @__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">`);
33048
33158
  var _tmpl$2155 = /* @__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">`);
33049
33159
  var _tmpl$3136 = /* @__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`);
33050
33160
  var _tmpl$4118 = /* @__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">`);
33051
- var _tmpl$597 = /* @__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.`);
33052
- var _tmpl$676 = /* @__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`);
33161
+ var _tmpl$599 = /* @__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.`);
33162
+ var _tmpl$677 = /* @__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`);
33053
33163
  function ForgotPasswordPage(props) {
33054
33164
  const [email, setEmail] = createSignal("");
33055
33165
  const [submitting, setSubmitting] = createSignal(false);
@@ -33082,12 +33192,12 @@ function ForgotPasswordPage(props) {
33082
33192
  var _el$0 = _tmpl$4118();
33083
33193
  insert(_el$0, message);
33084
33194
  return _el$0;
33085
- })(), _tmpl$597(), createComponent(Show, {
33195
+ })(), _tmpl$599(), createComponent(Show, {
33086
33196
  get when() {
33087
33197
  return props.onDone;
33088
33198
  },
33089
33199
  get children() {
33090
- var _el$10 = _tmpl$676();
33200
+ var _el$10 = _tmpl$677();
33091
33201
  _el$10.$$click = () => props.onDone?.();
33092
33202
  return _el$10;
33093
33203
  }
@@ -33102,7 +33212,7 @@ function ForgotPasswordPage(props) {
33102
33212
  return error();
33103
33213
  },
33104
33214
  get children() {
33105
- var _el$8 = _tmpl$596();
33215
+ var _el$8 = _tmpl$598();
33106
33216
  insert(_el$8, error);
33107
33217
  return _el$8;
33108
33218
  }
@@ -33152,7 +33262,7 @@ function inputStyle4() {
33152
33262
  };
33153
33263
  }
33154
33264
  delegateEvents(["input", "click"]);
33155
- var _tmpl$598 = /* @__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">`);
33265
+ var _tmpl$600 = /* @__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">`);
33156
33266
  var _tmpl$2156 = /* @__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">`);
33157
33267
  var _tmpl$3137 = /* @__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`);
33158
33268
  var _tmpl$4119 = /* @__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">`);
@@ -33217,7 +33327,7 @@ function ResetPasswordPage(props) {
33217
33327
  return error();
33218
33328
  },
33219
33329
  get children() {
33220
- var _el$1 = _tmpl$598();
33330
+ var _el$1 = _tmpl$600();
33221
33331
  insert(_el$1, error);
33222
33332
  return _el$1;
33223
33333
  }
@@ -33272,7 +33382,7 @@ function inputStyle5() {
33272
33382
  };
33273
33383
  }
33274
33384
  delegateEvents(["input"]);
33275
- var _tmpl$599 = /* @__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">`);
33385
+ var _tmpl$601 = /* @__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">`);
33276
33386
  var _tmpl$2157 = /* @__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">`);
33277
33387
  var _tmpl$3138 = /* @__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`);
33278
33388
  var _tmpl$4120 = /* @__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">`);
@@ -33342,7 +33452,7 @@ function AcceptAdminInvitePage(props) {
33342
33452
  return error();
33343
33453
  },
33344
33454
  get children() {
33345
- var _el$1 = _tmpl$599();
33455
+ var _el$1 = _tmpl$601();
33346
33456
  insert(_el$1, error);
33347
33457
  return _el$1;
33348
33458
  }
@@ -33397,7 +33507,7 @@ function inputStyle6() {
33397
33507
  };
33398
33508
  }
33399
33509
  delegateEvents(["input"]);
33400
- var _tmpl$600 = /* @__PURE__ */ template(`<div>`);
33510
+ var _tmpl$604 = /* @__PURE__ */ template(`<div>`);
33401
33511
  var _tmpl$2158 = /* @__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>`);
33402
33512
  var _tmpl$3139 = /* @__PURE__ */ template(`<button type=button>Back to login`);
33403
33513
  var _tmpl$4121 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
@@ -33445,7 +33555,7 @@ function AffiliateForgotPassword(props) {
33445
33555
  return error();
33446
33556
  },
33447
33557
  get children() {
33448
- var _el$8 = _tmpl$600();
33558
+ var _el$8 = _tmpl$604();
33449
33559
  insert(_el$8, error);
33450
33560
  effect((_$p) => style(_el$8, errorStyle(), _$p));
33451
33561
  return _el$8;
@@ -33580,7 +33690,7 @@ function linkStyle2() {
33580
33690
  };
33581
33691
  }
33582
33692
  delegateEvents(["input", "click"]);
33583
- var _tmpl$601 = /* @__PURE__ */ template(`<div>`);
33693
+ var _tmpl$605 = /* @__PURE__ */ template(`<div>`);
33584
33694
  var _tmpl$2159 = /* @__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>`);
33585
33695
  var _tmpl$3140 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
33586
33696
  var _tmpl$4122 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
@@ -33661,7 +33771,7 @@ function AffiliateResetPassword(props) {
33661
33771
  return error();
33662
33772
  },
33663
33773
  get children() {
33664
- var _el$9 = _tmpl$601();
33774
+ var _el$9 = _tmpl$605();
33665
33775
  insert(_el$9, error);
33666
33776
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
33667
33777
  return _el$9;
@@ -33760,5 +33870,5 @@ function primaryButtonStyle2(submitting) {
33760
33870
  }
33761
33871
 
33762
33872
  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, SmsConsentField, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
33763
- //# sourceMappingURL=W4HVE5RI.js.map
33764
- //# sourceMappingURL=W4HVE5RI.js.map
33873
+ //# sourceMappingURL=XB27METC.js.map
33874
+ //# sourceMappingURL=XB27METC.js.map