@apextelemed/partner-core 0.17.0-dev.54 → 0.17.0-dev.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.jsx +3 -3
- package/dist/chunk/{VUDLDIMS.jsx → 2LZ4RMMO.jsx} +541 -554
- package/dist/chunk/{MUNFWRXF.js → 54ICTHZX.js} +6 -3
- package/dist/chunk/54ICTHZX.js.map +1 -0
- package/dist/chunk/{WTQ63KR4.js → 5DNJWMSW.js} +3 -3
- package/dist/chunk/{WTQ63KR4.js.map → 5DNJWMSW.js.map} +1 -1
- package/dist/chunk/{Z5QDFCLZ.js → ERW2WNI6.js} +330 -343
- package/dist/chunk/ERW2WNI6.js.map +1 -0
- package/dist/chunk/{BI7NBPCA.jsx → FAKJL3AD.jsx} +5 -2
- package/dist/chunk/{P3TJ6ALH.jsx → KI3RUQTI.jsx} +2 -2
- package/dist/chunk/{CAG35QKZ.jsx → KSWWT576.jsx} +5 -5
- package/dist/chunk/{XDRP4X2N.js → L6ZE7Q7C.js} +3 -3
- package/dist/chunk/{XDRP4X2N.js.map → L6ZE7Q7C.js.map} +1 -1
- package/dist/chunk/{Q2L3CZPR.jsx → LON6ZV4S.jsx} +2 -2
- package/dist/chunk/{MQRPGAH7.js → Q7VYJUQC.js} +5 -5
- package/dist/chunk/{MQRPGAH7.js.map → Q7VYJUQC.js.map} +1 -1
- package/dist/chunk/{XI4OZ4SZ.js → QJAMR6MG.js} +3 -3
- package/dist/chunk/{XI4OZ4SZ.js.map → QJAMR6MG.js.map} +1 -1
- package/dist/chunk/{HXBRBHFR.jsx → TFELHUFX.jsx} +2 -2
- package/dist/chunk/{F5PDIE2J.js → TKN2GOKS.js} +6 -6
- package/dist/chunk/{F5PDIE2J.js.map → TKN2GOKS.js.map} +1 -1
- package/dist/chunk/{DC24EAWT.jsx → YGKENMTV.jsx} +4 -4
- package/dist/{client-BH1wq2Pp.d.ts → client-CEt_6guF.d.ts} +5 -2
- package/dist/flows/index.d.ts +1 -1
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +6 -6
- package/dist/index/index.d.ts +1 -1
- package/dist/index/index.js +7 -7
- package/dist/index/index.jsx +7 -7
- package/dist/pages/index.d.ts +8 -6
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +5 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/package.json +1 -1
- package/dist/chunk/MUNFWRXF.js.map +0 -1
- package/dist/chunk/Z5QDFCLZ.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
|
|
2
|
-
import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './
|
|
3
|
-
import { fetchFunnelConfig } from './
|
|
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, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './Q7VYJUQC.js';
|
|
3
|
+
import { fetchFunnelConfig } from './5DNJWMSW.js';
|
|
4
4
|
import { usePrimitives } from './67KHO66G.js';
|
|
5
|
-
import { cart_default, auth_default, affiliateAuth_default } from './
|
|
6
|
-
import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './
|
|
5
|
+
import { cart_default, auth_default, affiliateAuth_default } from './QJAMR6MG.js';
|
|
6
|
+
import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './54ICTHZX.js';
|
|
7
7
|
import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
|
|
8
8
|
import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
|
|
9
9
|
import { isQuestionVisible } from '@apextelemed/survey-core';
|
|
@@ -25780,141 +25780,10 @@ function Features() {
|
|
|
25780
25780
|
})();
|
|
25781
25781
|
}
|
|
25782
25782
|
delegateEvents(["click", "input"]);
|
|
25783
|
-
var _tmpl$401 = /* @__PURE__ */ template(`<
|
|
25784
|
-
var _tmpl$2126 = /* @__PURE__ */ template(`<
|
|
25785
|
-
var _tmpl$3102 = /* @__PURE__ */ template(`<
|
|
25786
|
-
var _tmpl$470 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;
|
|
25787
|
-
function queryParam(name) {
|
|
25788
|
-
if (typeof window === "undefined") return "";
|
|
25789
|
-
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
25790
|
-
}
|
|
25791
|
-
var MIN_PASSWORD_LENGTH = 8;
|
|
25792
|
-
var ADMIN_INVITE_PARAM = "adminInvite";
|
|
25793
|
-
function isAdminInviteLink() {
|
|
25794
|
-
return typeof window !== "undefined" && new URLSearchParams(window.location.search).has(ADMIN_INVITE_PARAM);
|
|
25795
|
-
}
|
|
25796
|
-
function AcceptAdminInvitePage(props) {
|
|
25797
|
-
const token = () => props.token ?? queryParam("token");
|
|
25798
|
-
const email = () => props.email ?? queryParam("email");
|
|
25799
|
-
const [password, setPassword] = createSignal("");
|
|
25800
|
-
const [confirm2, setConfirm] = createSignal("");
|
|
25801
|
-
const [submitting, setSubmitting] = createSignal(false);
|
|
25802
|
-
const [error, setError] = createSignal(null);
|
|
25803
|
-
const [message, setMessage] = createSignal(null);
|
|
25804
|
-
async function handleSubmit(e) {
|
|
25805
|
-
e.preventDefault();
|
|
25806
|
-
setError(null);
|
|
25807
|
-
if (!token() || !email()) {
|
|
25808
|
-
setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
|
|
25809
|
-
return;
|
|
25810
|
-
}
|
|
25811
|
-
if (password().length < MIN_PASSWORD_LENGTH) {
|
|
25812
|
-
setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
|
|
25813
|
-
return;
|
|
25814
|
-
}
|
|
25815
|
-
if (password() !== confirm2()) {
|
|
25816
|
-
setError("Passwords do not match.");
|
|
25817
|
-
return;
|
|
25818
|
-
}
|
|
25819
|
-
setSubmitting(true);
|
|
25820
|
-
try {
|
|
25821
|
-
await authApi.acceptAdminInvite({
|
|
25822
|
-
email: email().trim().toLowerCase(),
|
|
25823
|
-
token: token(),
|
|
25824
|
-
password: password()
|
|
25825
|
-
});
|
|
25826
|
-
setMessage("You\u2019re all set. Sign in with this email and your new password.");
|
|
25827
|
-
props.onSuccess?.();
|
|
25828
|
-
} catch (err) {
|
|
25829
|
-
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
25830
|
-
} finally {
|
|
25831
|
-
setSubmitting(false);
|
|
25832
|
-
}
|
|
25833
|
-
}
|
|
25834
|
-
return (() => {
|
|
25835
|
-
var _el$ = _tmpl$3102(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
25836
|
-
insert(_el$2, createComponent(Show, {
|
|
25837
|
-
get when() {
|
|
25838
|
-
return !message();
|
|
25839
|
-
},
|
|
25840
|
-
get fallback() {
|
|
25841
|
-
return (() => {
|
|
25842
|
-
var _el$11 = _tmpl$470();
|
|
25843
|
-
insert(_el$11, message);
|
|
25844
|
-
return _el$11;
|
|
25845
|
-
})();
|
|
25846
|
-
},
|
|
25847
|
-
get children() {
|
|
25848
|
-
var _el$4 = _tmpl$2126(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
25849
|
-
_el$4.addEventListener("submit", handleSubmit);
|
|
25850
|
-
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
25851
|
-
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
25852
|
-
insert(_el$4, createComponent(Show, {
|
|
25853
|
-
get when() {
|
|
25854
|
-
return error();
|
|
25855
|
-
},
|
|
25856
|
-
get children() {
|
|
25857
|
-
var _el$1 = _tmpl$401();
|
|
25858
|
-
insert(_el$1, error);
|
|
25859
|
-
return _el$1;
|
|
25860
|
-
}
|
|
25861
|
-
}), _el$10);
|
|
25862
|
-
insert(_el$10, () => submitting() ? "Saving\u2026" : "Accept invite");
|
|
25863
|
-
effect((_p$) => {
|
|
25864
|
-
var _v$ = labelStyle(), _v$2 = inputStyle(), _v$3 = labelStyle(), _v$4 = inputStyle(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
25865
|
-
_p$.e = style(_el$6, _v$, _p$.e);
|
|
25866
|
-
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
25867
|
-
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
25868
|
-
_p$.o = style(_el$0, _v$4, _p$.o);
|
|
25869
|
-
_v$5 !== _p$.i && (_el$10.disabled = _p$.i = _v$5);
|
|
25870
|
-
_v$6 !== _p$.n && setStyleProperty(_el$10, "cursor", _p$.n = _v$6);
|
|
25871
|
-
_v$7 !== _p$.s && setStyleProperty(_el$10, "opacity", _p$.s = _v$7);
|
|
25872
|
-
return _p$;
|
|
25873
|
-
}, {
|
|
25874
|
-
e: void 0,
|
|
25875
|
-
t: void 0,
|
|
25876
|
-
a: void 0,
|
|
25877
|
-
o: void 0,
|
|
25878
|
-
i: void 0,
|
|
25879
|
-
n: void 0,
|
|
25880
|
-
s: void 0
|
|
25881
|
-
});
|
|
25882
|
-
effect(() => _el$7.value = password());
|
|
25883
|
-
effect(() => _el$0.value = confirm2());
|
|
25884
|
-
return _el$4;
|
|
25885
|
-
}
|
|
25886
|
-
}), null);
|
|
25887
|
-
return _el$;
|
|
25888
|
-
})();
|
|
25889
|
-
}
|
|
25890
|
-
function labelStyle() {
|
|
25891
|
-
return {
|
|
25892
|
-
"font-size": "0.75rem",
|
|
25893
|
-
"text-transform": "uppercase",
|
|
25894
|
-
"letter-spacing": "0.05em",
|
|
25895
|
-
color: "var(--app-affiliate-fg-muted)"
|
|
25896
|
-
};
|
|
25897
|
-
}
|
|
25898
|
-
function inputStyle() {
|
|
25899
|
-
return {
|
|
25900
|
-
width: "100%",
|
|
25901
|
-
padding: "0.625rem 0.75rem",
|
|
25902
|
-
background: "var(--app-affiliate-surface-light)",
|
|
25903
|
-
color: "var(--app-affiliate-fg)",
|
|
25904
|
-
border: "1px solid var(--app-affiliate-border)",
|
|
25905
|
-
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
25906
|
-
"font-size": "0.9rem",
|
|
25907
|
-
"font-family": "inherit",
|
|
25908
|
-
"box-sizing": "border-box"
|
|
25909
|
-
};
|
|
25910
|
-
}
|
|
25911
|
-
delegateEvents(["input"]);
|
|
25912
|
-
|
|
25913
|
-
// src/pages/admin/Admins.tsx
|
|
25914
|
-
var _tmpl$407 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
|
|
25915
|
-
var _tmpl$2127 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
|
|
25916
|
-
var _tmpl$3103 = /* @__PURE__ */ template(`<option>`);
|
|
25917
|
-
var _tmpl$471 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
|
|
25783
|
+
var _tmpl$401 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
|
|
25784
|
+
var _tmpl$2126 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
|
|
25785
|
+
var _tmpl$3102 = /* @__PURE__ */ template(`<option>`);
|
|
25786
|
+
var _tmpl$470 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
|
|
25918
25787
|
var _tmpl$560 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
|
|
25919
25788
|
var _tmpl$656 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
|
|
25920
25789
|
var _tmpl$749 = /* @__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>`);
|
|
@@ -25934,26 +25803,22 @@ var ROLE_LABEL = {
|
|
|
25934
25803
|
accounting: "Accounting",
|
|
25935
25804
|
marketing: "Marketing"
|
|
25936
25805
|
};
|
|
25937
|
-
function defaultAcceptUrl() {
|
|
25938
|
-
if (typeof window === "undefined") return "";
|
|
25939
|
-
return `${window.location.origin}${window.location.pathname}?${ADMIN_INVITE_PARAM}=1`;
|
|
25940
|
-
}
|
|
25941
25806
|
function RoleSelect(props) {
|
|
25942
25807
|
return (() => {
|
|
25943
|
-
var _el$ = _tmpl$
|
|
25808
|
+
var _el$ = _tmpl$2126();
|
|
25944
25809
|
_el$.addEventListener("change", (e) => props.onChange(e.currentTarget.value));
|
|
25945
25810
|
insert(_el$, createComponent(Show, {
|
|
25946
25811
|
get when() {
|
|
25947
25812
|
return props.value === null;
|
|
25948
25813
|
},
|
|
25949
25814
|
get children() {
|
|
25950
|
-
return _tmpl$
|
|
25815
|
+
return _tmpl$401();
|
|
25951
25816
|
}
|
|
25952
25817
|
}), null);
|
|
25953
25818
|
insert(_el$, createComponent(For, {
|
|
25954
25819
|
each: ADMIN_ROLES,
|
|
25955
25820
|
children: (r) => (() => {
|
|
25956
|
-
var _el$3 = _tmpl$
|
|
25821
|
+
var _el$3 = _tmpl$3102();
|
|
25957
25822
|
_el$3.value = r;
|
|
25958
25823
|
insert(_el$3, () => ROLE_LABEL[r]);
|
|
25959
25824
|
return _el$3;
|
|
@@ -25991,7 +25856,7 @@ function Admins(props) {
|
|
|
25991
25856
|
const result = await adminApi.inviteAdmin({
|
|
25992
25857
|
email: address,
|
|
25993
25858
|
adminRole: role(),
|
|
25994
|
-
acceptUrl: props.acceptInviteUrl
|
|
25859
|
+
acceptUrl: props.acceptInviteUrl
|
|
25995
25860
|
});
|
|
25996
25861
|
if (result.apexInviteRequired) {
|
|
25997
25862
|
setApexNote(`${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`);
|
|
@@ -26041,7 +25906,7 @@ function Admins(props) {
|
|
|
26041
25906
|
return apexNote();
|
|
26042
25907
|
},
|
|
26043
25908
|
get children() {
|
|
26044
|
-
var _el$14 = _tmpl$
|
|
25909
|
+
var _el$14 = _tmpl$470();
|
|
26045
25910
|
insert(_el$14, apexNote);
|
|
26046
25911
|
return _el$14;
|
|
26047
25912
|
}
|
|
@@ -26136,10 +26001,10 @@ function Admins(props) {
|
|
|
26136
26001
|
delegateEvents(["input", "click"]);
|
|
26137
26002
|
|
|
26138
26003
|
// src/pages/AdminDashboard.tsx
|
|
26139
|
-
var _tmpl$
|
|
26140
|
-
var _tmpl$
|
|
26141
|
-
var _tmpl$
|
|
26142
|
-
var _tmpl$
|
|
26004
|
+
var _tmpl$407 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
26005
|
+
var _tmpl$2127 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
|
|
26006
|
+
var _tmpl$3103 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
|
|
26007
|
+
var _tmpl$471 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
|
|
26143
26008
|
var _tmpl$561 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
|
|
26144
26009
|
var _tmpl$657 = /* @__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`);
|
|
26145
26010
|
var _tmpl$750 = /* @__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); } }`);
|
|
@@ -26240,10 +26105,9 @@ function AdminDashboard(props) {
|
|
|
26240
26105
|
createEffect(() => {
|
|
26241
26106
|
setAdminToast(props.toast);
|
|
26242
26107
|
});
|
|
26243
|
-
const inviteLink = isAdminInviteLink();
|
|
26244
26108
|
createEffect(() => {
|
|
26245
26109
|
const auth = props.auth;
|
|
26246
|
-
if (!auth
|
|
26110
|
+
if (!auth) return;
|
|
26247
26111
|
if (!auth.isAuthenticated()) {
|
|
26248
26112
|
auth.onUnauthenticated?.();
|
|
26249
26113
|
return;
|
|
@@ -26253,7 +26117,6 @@ function AdminDashboard(props) {
|
|
|
26253
26117
|
}
|
|
26254
26118
|
});
|
|
26255
26119
|
const adminAllowed = () => {
|
|
26256
|
-
if (inviteLink) return false;
|
|
26257
26120
|
const auth = props.auth;
|
|
26258
26121
|
if (!auth) return true;
|
|
26259
26122
|
return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
|
|
@@ -26307,14 +26170,14 @@ function AdminDashboard(props) {
|
|
|
26307
26170
|
};
|
|
26308
26171
|
const topOffset = () => props.topOffset ?? "0px";
|
|
26309
26172
|
const TabButton = (btnProps) => (() => {
|
|
26310
|
-
var _el$ = _tmpl$
|
|
26173
|
+
var _el$ = _tmpl$2127();
|
|
26311
26174
|
_el$.$$click = () => handleTabClick(btnProps.tab);
|
|
26312
26175
|
insert(_el$, createComponent(Show, {
|
|
26313
26176
|
get when() {
|
|
26314
26177
|
return props.tabIcons?.[btnProps.tab];
|
|
26315
26178
|
},
|
|
26316
26179
|
get children() {
|
|
26317
|
-
var _el$2 = _tmpl$
|
|
26180
|
+
var _el$2 = _tmpl$407();
|
|
26318
26181
|
effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
|
|
26319
26182
|
return _el$2;
|
|
26320
26183
|
}
|
|
@@ -26331,7 +26194,6 @@ function AdminDashboard(props) {
|
|
|
26331
26194
|
});
|
|
26332
26195
|
return _el$;
|
|
26333
26196
|
})();
|
|
26334
|
-
if (inviteLink) return createComponent(AcceptAdminInvitePage, {});
|
|
26335
26197
|
return createComponent(Show, {
|
|
26336
26198
|
get when() {
|
|
26337
26199
|
return adminAllowed();
|
|
@@ -26347,7 +26209,7 @@ function AdminDashboard(props) {
|
|
|
26347
26209
|
return createComponent(AdminNavContext.Provider, {
|
|
26348
26210
|
value: adminNav,
|
|
26349
26211
|
get children() {
|
|
26350
|
-
var _el$3 = _tmpl$
|
|
26212
|
+
var _el$3 = _tmpl$3103(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
|
|
26351
26213
|
_el$5.$$click = () => setDrawerOpen(true);
|
|
26352
26214
|
insert(_el$6, () => TAB_LABELS[currentTab()]);
|
|
26353
26215
|
_el$7.$$click = () => setDrawerOpen(false);
|
|
@@ -26364,7 +26226,7 @@ function AdminDashboard(props) {
|
|
|
26364
26226
|
return visibleGroups();
|
|
26365
26227
|
},
|
|
26366
26228
|
children: (group) => [(() => {
|
|
26367
|
-
var _el$11 = _tmpl$
|
|
26229
|
+
var _el$11 = _tmpl$471();
|
|
26368
26230
|
insert(_el$11, () => group.label);
|
|
26369
26231
|
return _el$11;
|
|
26370
26232
|
})(), createComponent(For, {
|
|
@@ -26713,10 +26575,10 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
|
|
|
26713
26575
|
}
|
|
26714
26576
|
return "overview";
|
|
26715
26577
|
}
|
|
26716
|
-
var _tmpl$
|
|
26717
|
-
var _tmpl$
|
|
26718
|
-
var _tmpl$
|
|
26719
|
-
var _tmpl$
|
|
26578
|
+
var _tmpl$408 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
|
|
26579
|
+
var _tmpl$2128 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
|
|
26580
|
+
var _tmpl$3104 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
|
|
26581
|
+
var _tmpl$475 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
|
|
26720
26582
|
var _tmpl$564 = /* @__PURE__ */ template(`<div><h3>Subscription`);
|
|
26721
26583
|
var _tmpl$658 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
|
|
26722
26584
|
var _tmpl$751 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
|
|
@@ -26737,7 +26599,7 @@ function PatientDashboardPreview(props) {
|
|
|
26737
26599
|
authToken: () => props.token
|
|
26738
26600
|
});
|
|
26739
26601
|
return (() => {
|
|
26740
|
-
var _el$ = _tmpl$
|
|
26602
|
+
var _el$ = _tmpl$408(), _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;
|
|
26741
26603
|
_el$.$$click = (e) => {
|
|
26742
26604
|
if (e.target === e.currentTarget) props.onClose();
|
|
26743
26605
|
};
|
|
@@ -26749,7 +26611,7 @@ function PatientDashboardPreview(props) {
|
|
|
26749
26611
|
},
|
|
26750
26612
|
keyed: true,
|
|
26751
26613
|
children: (msg) => (() => {
|
|
26752
|
-
var _el$1 = _tmpl$
|
|
26614
|
+
var _el$1 = _tmpl$2128(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
26753
26615
|
insert(_el$10, msg);
|
|
26754
26616
|
_el$11.$$click = () => data.retry();
|
|
26755
26617
|
return _el$1;
|
|
@@ -26768,10 +26630,10 @@ function PatientDashboardPreview(props) {
|
|
|
26768
26630
|
return data.profile();
|
|
26769
26631
|
},
|
|
26770
26632
|
get fallback() {
|
|
26771
|
-
return _tmpl$
|
|
26633
|
+
return _tmpl$3104();
|
|
26772
26634
|
},
|
|
26773
26635
|
children: (profile) => [(() => {
|
|
26774
|
-
var _el$13 = _tmpl$
|
|
26636
|
+
var _el$13 = _tmpl$475(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
|
|
26775
26637
|
insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
|
|
26776
26638
|
insert(_el$17, () => profile().email);
|
|
26777
26639
|
effect((_$p) => style(_el$14, panelSectionHeader, _$p));
|
|
@@ -26927,9 +26789,9 @@ function PatientDashboardPreview(props) {
|
|
|
26927
26789
|
})();
|
|
26928
26790
|
}
|
|
26929
26791
|
delegateEvents(["click"]);
|
|
26930
|
-
var _tmpl$
|
|
26931
|
-
var _tmpl$
|
|
26932
|
-
var _tmpl$
|
|
26792
|
+
var _tmpl$409 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
|
|
26793
|
+
var _tmpl$2129 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
|
|
26794
|
+
var _tmpl$3105 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
|
|
26933
26795
|
var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
|
|
26934
26796
|
function UpdatePaymentMethod(props) {
|
|
26935
26797
|
const {
|
|
@@ -26959,7 +26821,7 @@ function UpdatePaymentMethod(props) {
|
|
|
26959
26821
|
if (ok) props.onDone();
|
|
26960
26822
|
}
|
|
26961
26823
|
return (() => {
|
|
26962
|
-
var _el$ = _tmpl$
|
|
26824
|
+
var _el$ = _tmpl$3105(), _el$2 = _el$.firstChild;
|
|
26963
26825
|
insert(_el$, createComponent(Heading, {
|
|
26964
26826
|
level: 1,
|
|
26965
26827
|
get children() {
|
|
@@ -26990,14 +26852,14 @@ function UpdatePaymentMethod(props) {
|
|
|
26990
26852
|
return memo(() => !!!resolving())() && !noSubscription();
|
|
26991
26853
|
},
|
|
26992
26854
|
get children() {
|
|
26993
|
-
var _el$3 = _tmpl$
|
|
26855
|
+
var _el$3 = _tmpl$2129(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
|
|
26994
26856
|
_el$3.addEventListener("submit", handleSubmit);
|
|
26995
26857
|
insert(_el$3, createComponent(Show, {
|
|
26996
26858
|
get when() {
|
|
26997
26859
|
return flow.error();
|
|
26998
26860
|
},
|
|
26999
26861
|
get children() {
|
|
27000
|
-
var _el$4 = _tmpl$
|
|
26862
|
+
var _el$4 = _tmpl$409();
|
|
27001
26863
|
insert(_el$4, createComponent(Banner, {
|
|
27002
26864
|
variant: "error",
|
|
27003
26865
|
get children() {
|
|
@@ -27075,10 +26937,10 @@ function UpdatePaymentMethod(props) {
|
|
|
27075
26937
|
return _el$;
|
|
27076
26938
|
})();
|
|
27077
26939
|
}
|
|
27078
|
-
var _tmpl$
|
|
27079
|
-
var _tmpl$
|
|
27080
|
-
var _tmpl$
|
|
27081
|
-
var _tmpl$
|
|
26940
|
+
var _tmpl$476 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
|
|
26941
|
+
var _tmpl$2130 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
|
|
26942
|
+
var _tmpl$3106 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
|
|
26943
|
+
var _tmpl$477 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
|
|
27082
26944
|
var _tmpl$565 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
|
|
27083
26945
|
var _tmpl$659 = /* @__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>`);
|
|
27084
26946
|
var _tmpl$752 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
|
|
@@ -27113,7 +26975,7 @@ function TrackingChip(props) {
|
|
|
27113
26975
|
}
|
|
27114
26976
|
};
|
|
27115
26977
|
return (() => {
|
|
27116
|
-
var _el$ = _tmpl$
|
|
26978
|
+
var _el$ = _tmpl$2130(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
|
|
27117
26979
|
insert(_el$2, () => props.eta);
|
|
27118
26980
|
_el$4.$$click = copy;
|
|
27119
26981
|
insert(_el$5, () => props.number);
|
|
@@ -27124,7 +26986,7 @@ function TrackingChip(props) {
|
|
|
27124
26986
|
return props.url;
|
|
27125
26987
|
},
|
|
27126
26988
|
get children() {
|
|
27127
|
-
var _el$8 = _tmpl$
|
|
26989
|
+
var _el$8 = _tmpl$476(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
|
|
27128
26990
|
insert(_el$8, (() => {
|
|
27129
26991
|
var _c$ = memo(() => !!props.carrier);
|
|
27130
26992
|
return () => _c$() ? ` with ${props.carrier}` : "";
|
|
@@ -27145,7 +27007,7 @@ function OrderTracker(props) {
|
|
|
27145
27007
|
return refill();
|
|
27146
27008
|
},
|
|
27147
27009
|
children: (r) => (() => {
|
|
27148
|
-
var _el$11 = _tmpl$
|
|
27010
|
+
var _el$11 = _tmpl$477(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
|
|
27149
27011
|
insert(_el$12, createComponent(Show, {
|
|
27150
27012
|
get when() {
|
|
27151
27013
|
return !r().pendingFill;
|
|
@@ -27154,7 +27016,7 @@ function OrderTracker(props) {
|
|
|
27154
27016
|
return _tmpl$565();
|
|
27155
27017
|
},
|
|
27156
27018
|
get children() {
|
|
27157
|
-
var _el$14 = _tmpl$
|
|
27019
|
+
var _el$14 = _tmpl$3106(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
|
|
27158
27020
|
insert(_el$14, () => r().cycleDay, _el$17);
|
|
27159
27021
|
insert(_el$14, () => r().cycleLength, null);
|
|
27160
27022
|
return _el$14;
|
|
@@ -27404,9 +27266,9 @@ function OrderTracker(props) {
|
|
|
27404
27266
|
});
|
|
27405
27267
|
}
|
|
27406
27268
|
delegateEvents(["click"]);
|
|
27407
|
-
var _tmpl$
|
|
27408
|
-
var _tmpl$
|
|
27409
|
-
var _tmpl$
|
|
27269
|
+
var _tmpl$478 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
|
|
27270
|
+
var _tmpl$2131 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
|
|
27271
|
+
var _tmpl$3107 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
|
|
27410
27272
|
var STATUS_LABEL = {
|
|
27411
27273
|
pending: "Under review",
|
|
27412
27274
|
approved: "Approved",
|
|
@@ -27423,7 +27285,7 @@ function RxRow(props) {
|
|
|
27423
27285
|
return STATUS_LABEL[props.rx.status] ?? props.rx.status;
|
|
27424
27286
|
};
|
|
27425
27287
|
return (() => {
|
|
27426
|
-
var _el$ = _tmpl$
|
|
27288
|
+
var _el$ = _tmpl$3107(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
|
|
27427
27289
|
_el$2.$$click = () => setOpen((v) => !v);
|
|
27428
27290
|
insert(_el$3, () => props.rx.drugName ?? "Medication", null);
|
|
27429
27291
|
insert(_el$3, createComponent(Show, {
|
|
@@ -27431,7 +27293,7 @@ function RxRow(props) {
|
|
|
27431
27293
|
return props.rx.dosage;
|
|
27432
27294
|
},
|
|
27433
27295
|
get children() {
|
|
27434
|
-
var _el$4 = _tmpl$
|
|
27296
|
+
var _el$4 = _tmpl$478(); _el$4.firstChild;
|
|
27435
27297
|
insert(_el$4, () => props.rx.dosage, null);
|
|
27436
27298
|
return _el$4;
|
|
27437
27299
|
}
|
|
@@ -27442,7 +27304,7 @@ function RxRow(props) {
|
|
|
27442
27304
|
return open();
|
|
27443
27305
|
},
|
|
27444
27306
|
get children() {
|
|
27445
|
-
var _el$8 = _tmpl$
|
|
27307
|
+
var _el$8 = _tmpl$2131();
|
|
27446
27308
|
insert(_el$8, createComponent(OrderTracker, {
|
|
27447
27309
|
get request() {
|
|
27448
27310
|
return props.request;
|
|
@@ -27485,10 +27347,10 @@ function RxRow(props) {
|
|
|
27485
27347
|
})();
|
|
27486
27348
|
}
|
|
27487
27349
|
delegateEvents(["click"]);
|
|
27488
|
-
var _tmpl$
|
|
27489
|
-
var _tmpl$
|
|
27490
|
-
var _tmpl$
|
|
27491
|
-
var _tmpl$
|
|
27350
|
+
var _tmpl$479 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan & billing`);
|
|
27351
|
+
var _tmpl$2132 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
|
|
27352
|
+
var _tmpl$3108 = /* @__PURE__ */ template(`<p class=membership__dose>`);
|
|
27353
|
+
var _tmpl$480 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
|
|
27492
27354
|
var _tmpl$566 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
|
|
27493
27355
|
var _tmpl$660 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
|
|
27494
27356
|
var _tmpl$753 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
|
|
@@ -27540,20 +27402,20 @@ function PlanBilling(props) {
|
|
|
27540
27402
|
}
|
|
27541
27403
|
};
|
|
27542
27404
|
return (() => {
|
|
27543
|
-
var _el$ = _tmpl$
|
|
27405
|
+
var _el$ = _tmpl$479(); _el$.firstChild;
|
|
27544
27406
|
insert(_el$, createComponent(Show, {
|
|
27545
27407
|
get when() {
|
|
27546
27408
|
return primary();
|
|
27547
27409
|
},
|
|
27548
27410
|
get fallback() {
|
|
27549
27411
|
return (() => {
|
|
27550
|
-
var _el$3 = _tmpl$
|
|
27412
|
+
var _el$3 = _tmpl$2132(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
27551
27413
|
effect(() => setAttribute(_el$6, "href", props.intakeHref));
|
|
27552
27414
|
return _el$3;
|
|
27553
27415
|
})();
|
|
27554
27416
|
},
|
|
27555
27417
|
children: (sub) => [(() => {
|
|
27556
|
-
var _el$7 = _tmpl$
|
|
27418
|
+
var _el$7 = _tmpl$480(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
|
|
27557
27419
|
insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
|
|
27558
27420
|
insert(_el$1, () => props.brandName);
|
|
27559
27421
|
insert(_el$10, () => sub().medicationName ?? sub().medication);
|
|
@@ -27562,7 +27424,7 @@ function PlanBilling(props) {
|
|
|
27562
27424
|
return sub().dosage;
|
|
27563
27425
|
},
|
|
27564
27426
|
get children() {
|
|
27565
|
-
var _el$11 = _tmpl$
|
|
27427
|
+
var _el$11 = _tmpl$3108();
|
|
27566
27428
|
insert(_el$11, () => sub().dosage);
|
|
27567
27429
|
return _el$11;
|
|
27568
27430
|
}
|
|
@@ -27664,10 +27526,10 @@ function PlanBilling(props) {
|
|
|
27664
27526
|
})();
|
|
27665
27527
|
}
|
|
27666
27528
|
delegateEvents(["click"]);
|
|
27667
|
-
var _tmpl$
|
|
27668
|
-
var _tmpl$
|
|
27669
|
-
var _tmpl$
|
|
27670
|
-
var _tmpl$
|
|
27529
|
+
var _tmpl$481 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
|
|
27530
|
+
var _tmpl$2133 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
|
|
27531
|
+
var _tmpl$3109 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
|
|
27532
|
+
var _tmpl$485 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
|
|
27671
27533
|
var _tmpl$567 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
|
|
27672
27534
|
var _tmpl$661 = /* @__PURE__ */ template(`<a class=account__support-link>`);
|
|
27673
27535
|
function pick(member, ...keys) {
|
|
@@ -27710,7 +27572,7 @@ function AccountPanel(props) {
|
|
|
27710
27572
|
value: address()
|
|
27711
27573
|
}].filter((f) => f.value);
|
|
27712
27574
|
return (() => {
|
|
27713
|
-
var _el$ = _tmpl$
|
|
27575
|
+
var _el$ = _tmpl$485(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
|
|
27714
27576
|
insert(_el$4, createComponent(For, {
|
|
27715
27577
|
get each() {
|
|
27716
27578
|
return fields();
|
|
@@ -27727,7 +27589,7 @@ function AccountPanel(props) {
|
|
|
27727
27589
|
return fields().length === 0;
|
|
27728
27590
|
},
|
|
27729
27591
|
get children() {
|
|
27730
|
-
return _tmpl$
|
|
27592
|
+
return _tmpl$481();
|
|
27731
27593
|
}
|
|
27732
27594
|
}), _el$0);
|
|
27733
27595
|
insert(_el$, createComponent(Show, {
|
|
@@ -27735,7 +27597,7 @@ function AccountPanel(props) {
|
|
|
27735
27597
|
return props.messagingEnabled;
|
|
27736
27598
|
},
|
|
27737
27599
|
get children() {
|
|
27738
|
-
var _el$6 = _tmpl$
|
|
27600
|
+
var _el$6 = _tmpl$2133(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
|
|
27739
27601
|
_el$9.$$click = () => props.onOpenMessages({
|
|
27740
27602
|
channel: "support",
|
|
27741
27603
|
category: "account"
|
|
@@ -27748,7 +27610,7 @@ function AccountPanel(props) {
|
|
|
27748
27610
|
return props.messagingEnabled;
|
|
27749
27611
|
},
|
|
27750
27612
|
get children() {
|
|
27751
|
-
var _el$1 = _tmpl$
|
|
27613
|
+
var _el$1 = _tmpl$3109();
|
|
27752
27614
|
_el$1.$$click = () => props.onOpenMessages();
|
|
27753
27615
|
return _el$1;
|
|
27754
27616
|
}
|
|
@@ -27769,10 +27631,10 @@ function AccountPanel(props) {
|
|
|
27769
27631
|
})();
|
|
27770
27632
|
}
|
|
27771
27633
|
delegateEvents(["click"]);
|
|
27772
|
-
var _tmpl$
|
|
27773
|
-
var _tmpl$
|
|
27774
|
-
var _tmpl$
|
|
27775
|
-
var _tmpl$
|
|
27634
|
+
var _tmpl$486 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
|
|
27635
|
+
var _tmpl$2134 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
|
|
27636
|
+
var _tmpl$3116 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
|
|
27637
|
+
var _tmpl$487 = /* @__PURE__ */ template(`<li>`);
|
|
27776
27638
|
var _tmpl$568 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
|
|
27777
27639
|
var _tmpl$664 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
|
|
27778
27640
|
function firstNumber(s) {
|
|
@@ -27795,7 +27657,7 @@ function MedicationGuide(props) {
|
|
|
27795
27657
|
return "upcoming";
|
|
27796
27658
|
};
|
|
27797
27659
|
return (() => {
|
|
27798
|
-
var _el$ = _tmpl$
|
|
27660
|
+
var _el$ = _tmpl$3116(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _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$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
|
|
27799
27661
|
insert(_el$4, () => props.guide.title);
|
|
27800
27662
|
insert(_el$5, () => props.guide.summary);
|
|
27801
27663
|
insert(_el$8, () => props.guide.boxedWarning);
|
|
@@ -27804,7 +27666,7 @@ function MedicationGuide(props) {
|
|
|
27804
27666
|
return props.guide.doNotUseIf;
|
|
27805
27667
|
},
|
|
27806
27668
|
children: (item) => (() => {
|
|
27807
|
-
var _el$45 = _tmpl$
|
|
27669
|
+
var _el$45 = _tmpl$487();
|
|
27808
27670
|
insert(_el$45, item);
|
|
27809
27671
|
return _el$45;
|
|
27810
27672
|
})()
|
|
@@ -27840,7 +27702,7 @@ function MedicationGuide(props) {
|
|
|
27840
27702
|
return props.guide.storage;
|
|
27841
27703
|
},
|
|
27842
27704
|
children: (item) => (() => {
|
|
27843
|
-
var _el$59 = _tmpl$
|
|
27705
|
+
var _el$59 = _tmpl$487();
|
|
27844
27706
|
insert(_el$59, item);
|
|
27845
27707
|
return _el$59;
|
|
27846
27708
|
})()
|
|
@@ -27851,7 +27713,7 @@ function MedicationGuide(props) {
|
|
|
27851
27713
|
return props.guide.contraception;
|
|
27852
27714
|
},
|
|
27853
27715
|
get children() {
|
|
27854
|
-
var _el$24 = _tmpl$
|
|
27716
|
+
var _el$24 = _tmpl$486(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
|
|
27855
27717
|
insert(_el$26, () => props.guide.contraception);
|
|
27856
27718
|
return _el$24;
|
|
27857
27719
|
}
|
|
@@ -27861,7 +27723,7 @@ function MedicationGuide(props) {
|
|
|
27861
27723
|
return props.guide.sideEffectsCommon;
|
|
27862
27724
|
},
|
|
27863
27725
|
children: (item) => (() => {
|
|
27864
|
-
var _el$60 = _tmpl$
|
|
27726
|
+
var _el$60 = _tmpl$487();
|
|
27865
27727
|
insert(_el$60, item);
|
|
27866
27728
|
return _el$60;
|
|
27867
27729
|
})()
|
|
@@ -27871,7 +27733,7 @@ function MedicationGuide(props) {
|
|
|
27871
27733
|
return props.guide.sideEffectsSerious;
|
|
27872
27734
|
},
|
|
27873
27735
|
children: (item) => (() => {
|
|
27874
|
-
var _el$61 = _tmpl$
|
|
27736
|
+
var _el$61 = _tmpl$487();
|
|
27875
27737
|
insert(_el$61, item);
|
|
27876
27738
|
return _el$61;
|
|
27877
27739
|
})()
|
|
@@ -27881,7 +27743,7 @@ function MedicationGuide(props) {
|
|
|
27881
27743
|
return props.guide.whenToCall;
|
|
27882
27744
|
},
|
|
27883
27745
|
children: (item) => (() => {
|
|
27884
|
-
var _el$62 = _tmpl$
|
|
27746
|
+
var _el$62 = _tmpl$487();
|
|
27885
27747
|
insert(_el$62, item);
|
|
27886
27748
|
return _el$62;
|
|
27887
27749
|
})()
|
|
@@ -27891,7 +27753,7 @@ function MedicationGuide(props) {
|
|
|
27891
27753
|
return props.guide.tips;
|
|
27892
27754
|
},
|
|
27893
27755
|
children: (item) => (() => {
|
|
27894
|
-
var _el$63 = _tmpl$
|
|
27756
|
+
var _el$63 = _tmpl$487();
|
|
27895
27757
|
insert(_el$63, item);
|
|
27896
27758
|
return _el$63;
|
|
27897
27759
|
})()
|
|
@@ -27903,13 +27765,13 @@ function MedicationGuide(props) {
|
|
|
27903
27765
|
return showDisclaimers();
|
|
27904
27766
|
},
|
|
27905
27767
|
get children() {
|
|
27906
|
-
var _el$44 = _tmpl$
|
|
27768
|
+
var _el$44 = _tmpl$2134();
|
|
27907
27769
|
insert(_el$44, createComponent(For, {
|
|
27908
27770
|
get each() {
|
|
27909
27771
|
return props.guide.disclaimers;
|
|
27910
27772
|
},
|
|
27911
27773
|
children: (item) => (() => {
|
|
27912
|
-
var _el$64 = _tmpl$
|
|
27774
|
+
var _el$64 = _tmpl$487();
|
|
27913
27775
|
insert(_el$64, item);
|
|
27914
27776
|
return _el$64;
|
|
27915
27777
|
})()
|
|
@@ -27930,10 +27792,10 @@ function MedicationGuide(props) {
|
|
|
27930
27792
|
})();
|
|
27931
27793
|
}
|
|
27932
27794
|
delegateEvents(["click"]);
|
|
27933
|
-
var _tmpl$
|
|
27934
|
-
var _tmpl$
|
|
27935
|
-
var _tmpl$
|
|
27936
|
-
var _tmpl$
|
|
27795
|
+
var _tmpl$488 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
|
|
27796
|
+
var _tmpl$2135 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
|
|
27797
|
+
var _tmpl$3117 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
|
|
27798
|
+
var _tmpl$489 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
|
|
27937
27799
|
var _tmpl$569 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
|
|
27938
27800
|
var _tmpl$665 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
|
|
27939
27801
|
var _tmpl$754 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
|
|
@@ -27952,7 +27814,7 @@ var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
|
|
|
27952
27814
|
var _tmpl$1820 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=support-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
|
|
27953
27815
|
var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
|
|
27954
27816
|
var _tmpl$2018 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
|
|
27955
|
-
var _tmpl$
|
|
27817
|
+
var _tmpl$2136 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
|
|
27956
27818
|
var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
|
|
27957
27819
|
var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
|
|
27958
27820
|
var _tmpl$2415 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
|
|
@@ -27962,7 +27824,7 @@ var _tmpl$2714 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
|
|
|
27962
27824
|
var _tmpl$2813 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=support-email-sent><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message sent</h3><p class=msg-thread__role>Support</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Thanks, your message is on its way to our support team. We'll reply by email, usually within one business day.</p><button type=button class="portal-btn portal-btn--primary"data-testid=support-email-another>Send another message`);
|
|
27963
27825
|
var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
|
|
27964
27826
|
var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
|
|
27965
|
-
var _tmpl$
|
|
27827
|
+
var _tmpl$3118 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
|
|
27966
27828
|
var _tmpl$3215 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
|
|
27967
27829
|
var _tmpl$3315 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
|
|
27968
27830
|
var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
|
|
@@ -28175,14 +28037,14 @@ function MessagesPanel(props) {
|
|
|
28175
28037
|
}
|
|
28176
28038
|
}
|
|
28177
28039
|
const ChannelChip = (p) => (() => {
|
|
28178
|
-
var _el$ = _tmpl$
|
|
28040
|
+
var _el$ = _tmpl$488();
|
|
28179
28041
|
insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
|
|
28180
28042
|
insert(_el$, createComponent(Show, {
|
|
28181
28043
|
get when() {
|
|
28182
28044
|
return memo(() => p.source === "support")() && categoryLabel(p.category);
|
|
28183
28045
|
},
|
|
28184
28046
|
children: (label3) => (() => {
|
|
28185
|
-
var _el$2 = _tmpl$
|
|
28047
|
+
var _el$2 = _tmpl$2135();
|
|
28186
28048
|
insert(_el$2, label3);
|
|
28187
28049
|
return _el$2;
|
|
28188
28050
|
})()
|
|
@@ -28200,7 +28062,7 @@ function MessagesPanel(props) {
|
|
|
28200
28062
|
})();
|
|
28201
28063
|
const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
|
|
28202
28064
|
const ConversationList = () => [(() => {
|
|
28203
|
-
var _el$3 = _tmpl$
|
|
28065
|
+
var _el$3 = _tmpl$3117(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
|
|
28204
28066
|
_el$5.$$click = goToGate;
|
|
28205
28067
|
insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
|
|
28206
28068
|
_el$7.$$click = openCompose;
|
|
@@ -28212,7 +28074,7 @@ function MessagesPanel(props) {
|
|
|
28212
28074
|
return thread().loadingConversations();
|
|
28213
28075
|
},
|
|
28214
28076
|
get children() {
|
|
28215
|
-
return _tmpl$
|
|
28077
|
+
return _tmpl$489();
|
|
28216
28078
|
}
|
|
28217
28079
|
}), null);
|
|
28218
28080
|
insert(_el$8, createComponent(Show, {
|
|
@@ -28544,7 +28406,7 @@ function MessagesPanel(props) {
|
|
|
28544
28406
|
return careUnreadCount() > 0;
|
|
28545
28407
|
},
|
|
28546
28408
|
get children() {
|
|
28547
|
-
var _el$77 = _tmpl$
|
|
28409
|
+
var _el$77 = _tmpl$2136();
|
|
28548
28410
|
insert(_el$77, careUnreadCount);
|
|
28549
28411
|
return _el$77;
|
|
28550
28412
|
}
|
|
@@ -28598,7 +28460,7 @@ function MessagesPanel(props) {
|
|
|
28598
28460
|
return _el$92;
|
|
28599
28461
|
})();
|
|
28600
28462
|
const Thread = () => [(() => {
|
|
28601
|
-
var _el$98 = _tmpl$
|
|
28463
|
+
var _el$98 = _tmpl$3118(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
|
|
28602
28464
|
_el$99.$$click = () => thread().clearSelection();
|
|
28603
28465
|
insert(_el$102, () => selectedConvo()?.participantName ?? "Provider");
|
|
28604
28466
|
insert(_el$101, createComponent(Show, {
|
|
@@ -28648,7 +28510,7 @@ function MessagesPanel(props) {
|
|
|
28648
28510
|
return thread().loadingMessages();
|
|
28649
28511
|
},
|
|
28650
28512
|
get children() {
|
|
28651
|
-
return _tmpl$
|
|
28513
|
+
return _tmpl$489();
|
|
28652
28514
|
}
|
|
28653
28515
|
}), _el$110);
|
|
28654
28516
|
insert(_el$108, createComponent(For, {
|
|
@@ -28832,10 +28694,10 @@ function MessagesPanel(props) {
|
|
|
28832
28694
|
})();
|
|
28833
28695
|
}
|
|
28834
28696
|
delegateEvents(["click", "input", "keydown"]);
|
|
28835
|
-
var _tmpl$
|
|
28836
|
-
var _tmpl$
|
|
28837
|
-
var _tmpl$
|
|
28838
|
-
var _tmpl$
|
|
28697
|
+
var _tmpl$490 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
|
|
28698
|
+
var _tmpl$2137 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
|
|
28699
|
+
var _tmpl$3119 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
|
|
28700
|
+
var _tmpl$491 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
|
|
28839
28701
|
var _tmpl$570 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
|
|
28840
28702
|
var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
|
|
28841
28703
|
var _tmpl$755 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
|
|
@@ -28871,7 +28733,7 @@ function SurveyHistory() {
|
|
|
28871
28733
|
return !list.error;
|
|
28872
28734
|
},
|
|
28873
28735
|
get fallback() {
|
|
28874
|
-
return _tmpl$
|
|
28736
|
+
return _tmpl$2137();
|
|
28875
28737
|
},
|
|
28876
28738
|
get children() {
|
|
28877
28739
|
return createComponent(Show, {
|
|
@@ -28879,16 +28741,16 @@ function SurveyHistory() {
|
|
|
28879
28741
|
return (list() ?? []).length > 0;
|
|
28880
28742
|
},
|
|
28881
28743
|
get fallback() {
|
|
28882
|
-
return _tmpl$
|
|
28744
|
+
return _tmpl$3119();
|
|
28883
28745
|
},
|
|
28884
28746
|
get children() {
|
|
28885
|
-
var _el$ = _tmpl$
|
|
28747
|
+
var _el$ = _tmpl$490();
|
|
28886
28748
|
insert(_el$, createComponent(For, {
|
|
28887
28749
|
get each() {
|
|
28888
28750
|
return list();
|
|
28889
28751
|
},
|
|
28890
28752
|
children: (item) => (() => {
|
|
28891
|
-
var _el$4 = _tmpl$
|
|
28753
|
+
var _el$4 = _tmpl$491(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
28892
28754
|
_el$5.$$click = () => setSelectedId(item.id);
|
|
28893
28755
|
insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
|
|
28894
28756
|
insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
|
|
@@ -28979,10 +28841,10 @@ function SurveyHistory() {
|
|
|
28979
28841
|
delegateEvents(["click"]);
|
|
28980
28842
|
|
|
28981
28843
|
// src/pages/MemberPortal.tsx
|
|
28982
|
-
var _tmpl$
|
|
28983
|
-
var _tmpl$
|
|
28984
|
-
var _tmpl$
|
|
28985
|
-
var _tmpl$
|
|
28844
|
+
var _tmpl$495 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
|
|
28845
|
+
var _tmpl$2138 = /* @__PURE__ */ template(`<span>`);
|
|
28846
|
+
var _tmpl$3120 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
|
|
28847
|
+
var _tmpl$496 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
|
|
28986
28848
|
var _tmpl$571 = /* @__PURE__ */ template(`<div class=rx-stack>`);
|
|
28987
28849
|
var _tmpl$667 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
|
|
28988
28850
|
var _tmpl$756 = /* @__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`);
|
|
@@ -29118,7 +28980,7 @@ function MemberPortal(props) {
|
|
|
29118
28980
|
return tabs();
|
|
29119
28981
|
},
|
|
29120
28982
|
children: (item) => (() => {
|
|
29121
|
-
var _el$ = _tmpl$
|
|
28983
|
+
var _el$ = _tmpl$3120(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
29122
28984
|
_el$.$$click = () => selectTab(item.key);
|
|
29123
28985
|
insert(_el$3, () => item.label);
|
|
29124
28986
|
insert(_el$, createComponent(Show, {
|
|
@@ -29126,7 +28988,7 @@ function MemberPortal(props) {
|
|
|
29126
28988
|
return memo(() => item.key === "tracker")() && inMotion();
|
|
29127
28989
|
},
|
|
29128
28990
|
get children() {
|
|
29129
|
-
return _tmpl$
|
|
28991
|
+
return _tmpl$495();
|
|
29130
28992
|
}
|
|
29131
28993
|
}), null);
|
|
29132
28994
|
insert(_el$, createComponent(Show, {
|
|
@@ -29134,7 +28996,7 @@ function MemberPortal(props) {
|
|
|
29134
28996
|
return memo(() => item.key === "messages")() && unreadTotal() > 0;
|
|
29135
28997
|
},
|
|
29136
28998
|
get children() {
|
|
29137
|
-
var _el$5 = _tmpl$
|
|
28999
|
+
var _el$5 = _tmpl$2138();
|
|
29138
29000
|
insert(_el$5, (() => {
|
|
29139
29001
|
var _c$ = memo(() => unreadTotal() > 99);
|
|
29140
29002
|
return () => _c$() ? "99+" : unreadTotal();
|
|
@@ -29222,7 +29084,7 @@ function MemberPortal(props) {
|
|
|
29222
29084
|
return data.otherRx().length > 0;
|
|
29223
29085
|
},
|
|
29224
29086
|
get children() {
|
|
29225
|
-
var _el$7 = _tmpl$
|
|
29087
|
+
var _el$7 = _tmpl$496(); _el$7.firstChild;
|
|
29226
29088
|
insert(_el$7, createComponent(For, {
|
|
29227
29089
|
get each() {
|
|
29228
29090
|
return data.otherRx();
|
|
@@ -29445,10 +29307,10 @@ function MemberPortal(props) {
|
|
|
29445
29307
|
})();
|
|
29446
29308
|
}
|
|
29447
29309
|
delegateEvents(["click"]);
|
|
29448
|
-
var _tmpl$
|
|
29449
|
-
var _tmpl$
|
|
29450
|
-
var _tmpl$
|
|
29451
|
-
var _tmpl$
|
|
29310
|
+
var _tmpl$497 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
|
|
29311
|
+
var _tmpl$2139 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Overview`);
|
|
29312
|
+
var _tmpl$3121 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
|
|
29313
|
+
var _tmpl$498 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
|
|
29452
29314
|
var _tmpl$574 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
|
|
29453
29315
|
function formatMoney(cents) {
|
|
29454
29316
|
return `$${(cents / 100).toFixed(2)}`;
|
|
@@ -29482,13 +29344,13 @@ function AffiliateOverview() {
|
|
|
29482
29344
|
value: `${(s.conversionRate * 100).toFixed(1)}%`
|
|
29483
29345
|
}];
|
|
29484
29346
|
return (() => {
|
|
29485
|
-
var _el$ = _tmpl$
|
|
29347
|
+
var _el$ = _tmpl$2139(); _el$.firstChild;
|
|
29486
29348
|
insert(_el$, createComponent(Show, {
|
|
29487
29349
|
get when() {
|
|
29488
29350
|
return isPending();
|
|
29489
29351
|
},
|
|
29490
29352
|
get children() {
|
|
29491
|
-
return _tmpl$
|
|
29353
|
+
return _tmpl$497();
|
|
29492
29354
|
}
|
|
29493
29355
|
}), null);
|
|
29494
29356
|
insert(_el$, createComponent(Show, {
|
|
@@ -29496,10 +29358,10 @@ function AffiliateOverview() {
|
|
|
29496
29358
|
return stats();
|
|
29497
29359
|
},
|
|
29498
29360
|
get fallback() {
|
|
29499
|
-
return _tmpl$
|
|
29361
|
+
return _tmpl$3121();
|
|
29500
29362
|
},
|
|
29501
29363
|
children: (s) => (() => {
|
|
29502
|
-
var _el$5 = _tmpl$
|
|
29364
|
+
var _el$5 = _tmpl$498();
|
|
29503
29365
|
insert(_el$5, createComponent(For, {
|
|
29504
29366
|
get each() {
|
|
29505
29367
|
return cards(s());
|
|
@@ -29517,10 +29379,10 @@ function AffiliateOverview() {
|
|
|
29517
29379
|
return _el$;
|
|
29518
29380
|
})();
|
|
29519
29381
|
}
|
|
29520
|
-
var _tmpl$
|
|
29521
|
-
var _tmpl$
|
|
29522
|
-
var _tmpl$
|
|
29523
|
-
var _tmpl$
|
|
29382
|
+
var _tmpl$499 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
|
|
29383
|
+
var _tmpl$2140 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Conversions`);
|
|
29384
|
+
var _tmpl$3122 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
|
|
29385
|
+
var _tmpl$4100 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
|
|
29524
29386
|
var _tmpl$575 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
|
|
29525
29387
|
function formatMoney2(cents) {
|
|
29526
29388
|
return `$${(cents / 100).toFixed(2)}`;
|
|
@@ -29559,16 +29421,16 @@ function AffiliateConversions() {
|
|
|
29559
29421
|
limit: 100
|
|
29560
29422
|
});
|
|
29561
29423
|
return (() => {
|
|
29562
|
-
var _el$ = _tmpl$
|
|
29424
|
+
var _el$ = _tmpl$2140(); _el$.firstChild;
|
|
29563
29425
|
insert(_el$, createComponent(Show, {
|
|
29564
29426
|
get when() {
|
|
29565
29427
|
return (conversions() ?? []).length > 0;
|
|
29566
29428
|
},
|
|
29567
29429
|
get fallback() {
|
|
29568
|
-
return _tmpl$
|
|
29430
|
+
return _tmpl$3122();
|
|
29569
29431
|
},
|
|
29570
29432
|
get children() {
|
|
29571
|
-
var _el$3 = _tmpl$
|
|
29433
|
+
var _el$3 = _tmpl$499(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
|
|
29572
29434
|
insert(_el$10, createComponent(For, {
|
|
29573
29435
|
get each() {
|
|
29574
29436
|
return conversions();
|
|
@@ -29582,7 +29444,7 @@ function AffiliateConversions() {
|
|
|
29582
29444
|
return c.tier === 2;
|
|
29583
29445
|
},
|
|
29584
29446
|
get children() {
|
|
29585
|
-
return _tmpl$
|
|
29447
|
+
return _tmpl$4100();
|
|
29586
29448
|
}
|
|
29587
29449
|
}), null);
|
|
29588
29450
|
insert(_el$16, () => formatMoney2(c.orderTotalCents));
|
|
@@ -29653,10 +29515,10 @@ function td() {
|
|
|
29653
29515
|
color: "var(--app-affiliate-fg)"
|
|
29654
29516
|
};
|
|
29655
29517
|
}
|
|
29656
|
-
var _tmpl$
|
|
29657
|
-
var _tmpl$
|
|
29658
|
-
var _tmpl$
|
|
29659
|
-
var _tmpl$
|
|
29518
|
+
var _tmpl$500 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
|
|
29519
|
+
var _tmpl$2141 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
|
|
29520
|
+
var _tmpl$3123 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
|
|
29521
|
+
var _tmpl$4101 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
|
|
29660
29522
|
function formatDate5(iso) {
|
|
29661
29523
|
const d = new Date(iso);
|
|
29662
29524
|
if (Number.isNaN(d.getTime())) return iso;
|
|
@@ -29689,22 +29551,22 @@ function AffiliateDownline() {
|
|
|
29689
29551
|
downline
|
|
29690
29552
|
} = useAffiliateDownline();
|
|
29691
29553
|
return (() => {
|
|
29692
|
-
var _el$ = _tmpl$
|
|
29554
|
+
var _el$ = _tmpl$2141(), _el$2 = _el$.firstChild; _el$2.nextSibling;
|
|
29693
29555
|
insert(_el$, createComponent(Show, {
|
|
29694
29556
|
get when() {
|
|
29695
29557
|
return (downline() ?? []).length > 0;
|
|
29696
29558
|
},
|
|
29697
29559
|
get fallback() {
|
|
29698
|
-
return _tmpl$
|
|
29560
|
+
return _tmpl$3123();
|
|
29699
29561
|
},
|
|
29700
29562
|
get children() {
|
|
29701
|
-
var _el$4 = _tmpl$
|
|
29563
|
+
var _el$4 = _tmpl$500(), _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;
|
|
29702
29564
|
insert(_el$10, createComponent(For, {
|
|
29703
29565
|
get each() {
|
|
29704
29566
|
return downline();
|
|
29705
29567
|
},
|
|
29706
29568
|
children: (d) => (() => {
|
|
29707
|
-
var _el$12 = _tmpl$
|
|
29569
|
+
var _el$12 = _tmpl$4101(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
|
|
29708
29570
|
insert(_el$13, () => d.affiliateCode);
|
|
29709
29571
|
insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
|
|
29710
29572
|
insert(_el$16, () => d.status);
|
|
@@ -29767,9 +29629,9 @@ function td2() {
|
|
|
29767
29629
|
color: "var(--app-affiliate-fg)"
|
|
29768
29630
|
};
|
|
29769
29631
|
}
|
|
29770
|
-
var _tmpl$
|
|
29771
|
-
var _tmpl$
|
|
29772
|
-
var _tmpl$
|
|
29632
|
+
var _tmpl$501 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
|
|
29633
|
+
var _tmpl$2142 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Referral link`);
|
|
29634
|
+
var _tmpl$3124 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
|
|
29773
29635
|
function AffiliateReferralLink() {
|
|
29774
29636
|
const {
|
|
29775
29637
|
links
|
|
@@ -29794,16 +29656,16 @@ function AffiliateReferralLink() {
|
|
|
29794
29656
|
}
|
|
29795
29657
|
}
|
|
29796
29658
|
return (() => {
|
|
29797
|
-
var _el$ = _tmpl$
|
|
29659
|
+
var _el$ = _tmpl$2142(); _el$.firstChild;
|
|
29798
29660
|
insert(_el$, createComponent(Show, {
|
|
29799
29661
|
get when() {
|
|
29800
29662
|
return homepageLink();
|
|
29801
29663
|
},
|
|
29802
29664
|
get fallback() {
|
|
29803
|
-
return _tmpl$
|
|
29665
|
+
return _tmpl$3124();
|
|
29804
29666
|
},
|
|
29805
29667
|
get children() {
|
|
29806
|
-
var _el$3 = _tmpl$
|
|
29668
|
+
var _el$3 = _tmpl$501(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
|
|
29807
29669
|
insert(_el$6, homepageLink);
|
|
29808
29670
|
_el$7.$$click = copy;
|
|
29809
29671
|
insert(_el$7, () => copied() ? "Copied" : "Copy");
|
|
@@ -29814,10 +29676,10 @@ function AffiliateReferralLink() {
|
|
|
29814
29676
|
})();
|
|
29815
29677
|
}
|
|
29816
29678
|
delegateEvents(["click"]);
|
|
29817
|
-
var _tmpl$
|
|
29818
|
-
var _tmpl$
|
|
29819
|
-
var _tmpl$
|
|
29820
|
-
var _tmpl$
|
|
29679
|
+
var _tmpl$505 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
|
|
29680
|
+
var _tmpl$2143 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
|
|
29681
|
+
var _tmpl$3125 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
|
|
29682
|
+
var _tmpl$4102 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
|
|
29821
29683
|
var STATUS_LABEL2 = {
|
|
29822
29684
|
pending: "Pending approval",
|
|
29823
29685
|
active: "Active",
|
|
@@ -29852,22 +29714,22 @@ function AffiliateSettings() {
|
|
|
29852
29714
|
value: a.paymentEmail ?? "\u2014"
|
|
29853
29715
|
}];
|
|
29854
29716
|
return (() => {
|
|
29855
|
-
var _el$ = _tmpl$
|
|
29717
|
+
var _el$ = _tmpl$505(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
|
|
29856
29718
|
insert(_el$, createComponent(Show, {
|
|
29857
29719
|
get when() {
|
|
29858
29720
|
return affiliate();
|
|
29859
29721
|
},
|
|
29860
29722
|
get fallback() {
|
|
29861
|
-
return _tmpl$
|
|
29723
|
+
return _tmpl$2143();
|
|
29862
29724
|
},
|
|
29863
29725
|
children: (a) => (() => {
|
|
29864
|
-
var _el$7 = _tmpl$
|
|
29726
|
+
var _el$7 = _tmpl$3125();
|
|
29865
29727
|
insert(_el$7, createComponent(For, {
|
|
29866
29728
|
get each() {
|
|
29867
29729
|
return rows(a());
|
|
29868
29730
|
},
|
|
29869
29731
|
children: (row) => (() => {
|
|
29870
|
-
var _el$8 = _tmpl$
|
|
29732
|
+
var _el$8 = _tmpl$4102(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
29871
29733
|
insert(_el$9, () => row.label);
|
|
29872
29734
|
insert(_el$0, () => row.value);
|
|
29873
29735
|
return _el$8;
|
|
@@ -29883,10 +29745,10 @@ function AffiliateSettings() {
|
|
|
29883
29745
|
delegateEvents(["click"]);
|
|
29884
29746
|
|
|
29885
29747
|
// src/pages/AffiliatePortal.tsx
|
|
29886
|
-
var _tmpl$
|
|
29887
|
-
var _tmpl$
|
|
29888
|
-
var _tmpl$
|
|
29889
|
-
var _tmpl$
|
|
29748
|
+
var _tmpl$506 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
|
|
29749
|
+
var _tmpl$2144 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
29750
|
+
var _tmpl$3126 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
|
|
29751
|
+
var _tmpl$4103 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
|
|
29890
29752
|
var TAB_LABELS2 = {
|
|
29891
29753
|
overview: "Overview",
|
|
29892
29754
|
conversions: "Conversions",
|
|
@@ -29931,7 +29793,7 @@ function AffiliatePortal(props) {
|
|
|
29931
29793
|
});
|
|
29932
29794
|
},
|
|
29933
29795
|
get children() {
|
|
29934
|
-
var _el$ = _tmpl$
|
|
29796
|
+
var _el$ = _tmpl$506(), _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;
|
|
29935
29797
|
_el$3.$$click = () => setDrawerOpen(true);
|
|
29936
29798
|
insert(_el$4, () => TAB_LABELS2[currentTab()]);
|
|
29937
29799
|
_el$5.$$click = () => setDrawerOpen(false);
|
|
@@ -29940,14 +29802,14 @@ function AffiliatePortal(props) {
|
|
|
29940
29802
|
return orderedTabs();
|
|
29941
29803
|
},
|
|
29942
29804
|
children: (tab) => (() => {
|
|
29943
|
-
var _el$1 = _tmpl$
|
|
29805
|
+
var _el$1 = _tmpl$3126();
|
|
29944
29806
|
_el$1.$$click = () => handleTabClick(tab);
|
|
29945
29807
|
insert(_el$1, createComponent(Show, {
|
|
29946
29808
|
get when() {
|
|
29947
29809
|
return props.tabIcons?.[tab];
|
|
29948
29810
|
},
|
|
29949
29811
|
get children() {
|
|
29950
|
-
var _el$10 = _tmpl$
|
|
29812
|
+
var _el$10 = _tmpl$2144();
|
|
29951
29813
|
effect(() => className(_el$10, props.tabIcons[tab]));
|
|
29952
29814
|
return _el$10;
|
|
29953
29815
|
}
|
|
@@ -30029,7 +29891,7 @@ function AffiliatePortal(props) {
|
|
|
30029
29891
|
}
|
|
30030
29892
|
function AffiliateGateSpinner(props) {
|
|
30031
29893
|
return (() => {
|
|
30032
|
-
var _el$11 = _tmpl$
|
|
29894
|
+
var _el$11 = _tmpl$4103(); _el$11.firstChild;
|
|
30033
29895
|
effect((_p$) => {
|
|
30034
29896
|
var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
|
|
30035
29897
|
_v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
|
|
@@ -30043,16 +29905,16 @@ function AffiliateGateSpinner(props) {
|
|
|
30043
29905
|
})();
|
|
30044
29906
|
}
|
|
30045
29907
|
delegateEvents(["click"]);
|
|
30046
|
-
var _tmpl$
|
|
29908
|
+
var _tmpl$507 = /* @__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">`);
|
|
30047
29909
|
function AffiliatePasswordInput(props) {
|
|
30048
29910
|
const [visible, setVisible] = createSignal(false);
|
|
30049
29911
|
return (() => {
|
|
30050
|
-
var _el$ = _tmpl$
|
|
29912
|
+
var _el$ = _tmpl$507(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
30051
29913
|
_el$2.$$input = (e) => props.onInput(e.currentTarget.value);
|
|
30052
29914
|
_el$3.$$click = () => setVisible((v) => !v);
|
|
30053
29915
|
insert(_el$3, () => visible() ? "Hide" : "Show");
|
|
30054
29916
|
effect((_p$) => {
|
|
30055
|
-
var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 =
|
|
29917
|
+
var _v$ = visible() ? "text" : "password", _v$2 = props.required, _v$3 = props.minLength, _v$4 = props.autocomplete, _v$5 = inputStyle(), _v$6 = visible() ? "Hide password" : "Show password";
|
|
30056
29918
|
_v$ !== _p$.e && setAttribute(_el$2, "type", _p$.e = _v$);
|
|
30057
29919
|
_v$2 !== _p$.t && (_el$2.required = _p$.t = _v$2);
|
|
30058
29920
|
_v$3 !== _p$.a && setAttribute(_el$2, "minlength", _p$.a = _v$3);
|
|
@@ -30072,7 +29934,7 @@ function AffiliatePasswordInput(props) {
|
|
|
30072
29934
|
return _el$;
|
|
30073
29935
|
})();
|
|
30074
29936
|
}
|
|
30075
|
-
function
|
|
29937
|
+
function inputStyle() {
|
|
30076
29938
|
return {
|
|
30077
29939
|
width: "100%",
|
|
30078
29940
|
padding: "0.625rem 2.9rem 0.625rem 0.75rem",
|
|
@@ -30088,10 +29950,10 @@ function inputStyle2() {
|
|
|
30088
29950
|
delegateEvents(["input", "click"]);
|
|
30089
29951
|
|
|
30090
29952
|
// src/pages/AffiliateRegister.tsx
|
|
30091
|
-
var _tmpl$
|
|
30092
|
-
var _tmpl$
|
|
30093
|
-
var _tmpl$
|
|
30094
|
-
var _tmpl$
|
|
29953
|
+
var _tmpl$508 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
|
|
29954
|
+
var _tmpl$2145 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
|
|
29955
|
+
var _tmpl$3127 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
|
|
29956
|
+
var _tmpl$4104 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
|
|
30095
29957
|
var _tmpl$576 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30096
29958
|
var _tmpl$668 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
|
|
30097
29959
|
var _tmpl$757 = /* @__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">`);
|
|
@@ -30143,9 +30005,9 @@ function AffiliateRegister(props) {
|
|
|
30143
30005
|
insert(_el$6, createComponent(Row2, {
|
|
30144
30006
|
label: "First name",
|
|
30145
30007
|
get children() {
|
|
30146
|
-
var _el$7 = _tmpl$
|
|
30008
|
+
var _el$7 = _tmpl$508();
|
|
30147
30009
|
_el$7.$$input = (e) => setFirstName(e.currentTarget.value);
|
|
30148
|
-
effect((_$p) => style(_el$7,
|
|
30010
|
+
effect((_$p) => style(_el$7, inputStyle2(), _$p));
|
|
30149
30011
|
effect(() => _el$7.value = firstName());
|
|
30150
30012
|
return _el$7;
|
|
30151
30013
|
}
|
|
@@ -30153,9 +30015,9 @@ function AffiliateRegister(props) {
|
|
|
30153
30015
|
insert(_el$6, createComponent(Row2, {
|
|
30154
30016
|
label: "Last name",
|
|
30155
30017
|
get children() {
|
|
30156
|
-
var _el$8 = _tmpl$
|
|
30018
|
+
var _el$8 = _tmpl$2145();
|
|
30157
30019
|
_el$8.$$input = (e) => setLastName(e.currentTarget.value);
|
|
30158
|
-
effect((_$p) => style(_el$8,
|
|
30020
|
+
effect((_$p) => style(_el$8, inputStyle2(), _$p));
|
|
30159
30021
|
effect(() => _el$8.value = lastName());
|
|
30160
30022
|
return _el$8;
|
|
30161
30023
|
}
|
|
@@ -30163,9 +30025,9 @@ function AffiliateRegister(props) {
|
|
|
30163
30025
|
insert(_el$6, createComponent(Row2, {
|
|
30164
30026
|
label: "Email",
|
|
30165
30027
|
get children() {
|
|
30166
|
-
var _el$9 = _tmpl$
|
|
30028
|
+
var _el$9 = _tmpl$3127();
|
|
30167
30029
|
_el$9.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30168
|
-
effect((_$p) => style(_el$9,
|
|
30030
|
+
effect((_$p) => style(_el$9, inputStyle2(), _$p));
|
|
30169
30031
|
effect(() => _el$9.value = email());
|
|
30170
30032
|
return _el$9;
|
|
30171
30033
|
}
|
|
@@ -30189,9 +30051,9 @@ function AffiliateRegister(props) {
|
|
|
30189
30051
|
label: "Affiliate code",
|
|
30190
30052
|
hint: "The handle in your referral URL (4+ characters)",
|
|
30191
30053
|
get children() {
|
|
30192
|
-
var _el$0 = _tmpl$
|
|
30054
|
+
var _el$0 = _tmpl$4104();
|
|
30193
30055
|
_el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
|
|
30194
|
-
effect((_$p) => style(_el$0,
|
|
30056
|
+
effect((_$p) => style(_el$0, inputStyle2(), _$p));
|
|
30195
30057
|
effect(() => _el$0.value = affiliateCode());
|
|
30196
30058
|
return _el$0;
|
|
30197
30059
|
}
|
|
@@ -30256,7 +30118,7 @@ function Row2(props) {
|
|
|
30256
30118
|
return _el$21;
|
|
30257
30119
|
})();
|
|
30258
30120
|
}
|
|
30259
|
-
function
|
|
30121
|
+
function inputStyle2() {
|
|
30260
30122
|
return {
|
|
30261
30123
|
width: "100%",
|
|
30262
30124
|
padding: "0.625rem 0.75rem",
|
|
@@ -30282,10 +30144,10 @@ function linkStyle() {
|
|
|
30282
30144
|
};
|
|
30283
30145
|
}
|
|
30284
30146
|
delegateEvents(["input", "click"]);
|
|
30285
|
-
var _tmpl$
|
|
30286
|
-
var _tmpl$
|
|
30287
|
-
var _tmpl$
|
|
30288
|
-
var _tmpl$
|
|
30147
|
+
var _tmpl$509 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30148
|
+
var _tmpl$2146 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
|
|
30149
|
+
var _tmpl$3128 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-primary-soft-fg);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>New affiliate? Apply`);
|
|
30150
|
+
var _tmpl$4105 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30289
30151
|
function AffiliateLogin(props) {
|
|
30290
30152
|
const [email, setEmail] = createSignal("");
|
|
30291
30153
|
const [password, setPassword] = createSignal("");
|
|
@@ -30305,7 +30167,7 @@ function AffiliateLogin(props) {
|
|
|
30305
30167
|
}
|
|
30306
30168
|
}
|
|
30307
30169
|
return (() => {
|
|
30308
|
-
var _el$ = _tmpl$
|
|
30170
|
+
var _el$ = _tmpl$4105(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling;
|
|
30309
30171
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30310
30172
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30311
30173
|
insert(_el$8, createComponent(AffiliatePasswordInput, {
|
|
@@ -30321,7 +30183,7 @@ function AffiliateLogin(props) {
|
|
|
30321
30183
|
return error();
|
|
30322
30184
|
},
|
|
30323
30185
|
get children() {
|
|
30324
|
-
var _el$0 = _tmpl$
|
|
30186
|
+
var _el$0 = _tmpl$509();
|
|
30325
30187
|
insert(_el$0, error);
|
|
30326
30188
|
return _el$0;
|
|
30327
30189
|
}
|
|
@@ -30332,7 +30194,7 @@ function AffiliateLogin(props) {
|
|
|
30332
30194
|
return props.onNavigateForgotPassword;
|
|
30333
30195
|
},
|
|
30334
30196
|
get children() {
|
|
30335
|
-
var _el$10 = _tmpl$
|
|
30197
|
+
var _el$10 = _tmpl$2146();
|
|
30336
30198
|
_el$10.$$click = () => props.onNavigateForgotPassword?.();
|
|
30337
30199
|
return _el$10;
|
|
30338
30200
|
}
|
|
@@ -30342,13 +30204,13 @@ function AffiliateLogin(props) {
|
|
|
30342
30204
|
return props.onNavigateRegister;
|
|
30343
30205
|
},
|
|
30344
30206
|
get children() {
|
|
30345
|
-
var _el$11 = _tmpl$
|
|
30207
|
+
var _el$11 = _tmpl$3128();
|
|
30346
30208
|
_el$11.$$click = () => props.onNavigateRegister?.();
|
|
30347
30209
|
return _el$11;
|
|
30348
30210
|
}
|
|
30349
30211
|
}), null);
|
|
30350
30212
|
effect((_p$) => {
|
|
30351
|
-
var _v$ =
|
|
30213
|
+
var _v$ = labelStyle(), _v$2 = inputStyle3(), _v$3 = labelStyle(), _v$4 = submitting(), _v$5 = submitting() ? "not-allowed" : "pointer", _v$6 = submitting() ? 0.7 : 1;
|
|
30352
30214
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30353
30215
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30354
30216
|
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
@@ -30368,7 +30230,7 @@ function AffiliateLogin(props) {
|
|
|
30368
30230
|
return _el$;
|
|
30369
30231
|
})();
|
|
30370
30232
|
}
|
|
30371
|
-
function
|
|
30233
|
+
function labelStyle() {
|
|
30372
30234
|
return {
|
|
30373
30235
|
"font-size": "0.75rem",
|
|
30374
30236
|
"text-transform": "uppercase",
|
|
@@ -30376,7 +30238,7 @@ function labelStyle2() {
|
|
|
30376
30238
|
color: "var(--app-affiliate-fg-muted)"
|
|
30377
30239
|
};
|
|
30378
30240
|
}
|
|
30379
|
-
function
|
|
30241
|
+
function inputStyle3() {
|
|
30380
30242
|
return {
|
|
30381
30243
|
width: "100%",
|
|
30382
30244
|
padding: "0.625rem 0.75rem",
|
|
@@ -30390,11 +30252,11 @@ function inputStyle4() {
|
|
|
30390
30252
|
};
|
|
30391
30253
|
}
|
|
30392
30254
|
delegateEvents(["input", "click"]);
|
|
30393
|
-
var _tmpl$
|
|
30394
|
-
var _tmpl$
|
|
30395
|
-
var _tmpl$
|
|
30396
|
-
var _tmpl$
|
|
30397
|
-
var _tmpl$
|
|
30255
|
+
var _tmpl$577 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30256
|
+
var _tmpl$2147 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30257
|
+
var _tmpl$3129 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Reset your password`);
|
|
30258
|
+
var _tmpl$4106 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30259
|
+
var _tmpl$578 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
|
|
30398
30260
|
var _tmpl$669 = /* @__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`);
|
|
30399
30261
|
function ForgotPasswordPage(props) {
|
|
30400
30262
|
const [email, setEmail] = createSignal("");
|
|
@@ -30418,17 +30280,17 @@ function ForgotPasswordPage(props) {
|
|
|
30418
30280
|
}
|
|
30419
30281
|
}
|
|
30420
30282
|
return (() => {
|
|
30421
|
-
var _el$ = _tmpl$
|
|
30283
|
+
var _el$ = _tmpl$3129(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
30422
30284
|
insert(_el$2, createComponent(Show, {
|
|
30423
30285
|
get when() {
|
|
30424
30286
|
return !message();
|
|
30425
30287
|
},
|
|
30426
30288
|
get fallback() {
|
|
30427
30289
|
return [(() => {
|
|
30428
|
-
var _el$0 = _tmpl$
|
|
30290
|
+
var _el$0 = _tmpl$4106();
|
|
30429
30291
|
insert(_el$0, message);
|
|
30430
30292
|
return _el$0;
|
|
30431
|
-
})(), _tmpl$
|
|
30293
|
+
})(), _tmpl$578(), createComponent(Show, {
|
|
30432
30294
|
get when() {
|
|
30433
30295
|
return props.onDone;
|
|
30434
30296
|
},
|
|
@@ -30440,7 +30302,7 @@ function ForgotPasswordPage(props) {
|
|
|
30440
30302
|
})];
|
|
30441
30303
|
},
|
|
30442
30304
|
get children() {
|
|
30443
|
-
var _el$4 = _tmpl$
|
|
30305
|
+
var _el$4 = _tmpl$2147(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
|
|
30444
30306
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30445
30307
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30446
30308
|
insert(_el$4, createComponent(Show, {
|
|
@@ -30448,14 +30310,14 @@ function ForgotPasswordPage(props) {
|
|
|
30448
30310
|
return error();
|
|
30449
30311
|
},
|
|
30450
30312
|
get children() {
|
|
30451
|
-
var _el$8 = _tmpl$
|
|
30313
|
+
var _el$8 = _tmpl$577();
|
|
30452
30314
|
insert(_el$8, error);
|
|
30453
30315
|
return _el$8;
|
|
30454
30316
|
}
|
|
30455
30317
|
}), _el$9);
|
|
30456
30318
|
insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
|
|
30457
30319
|
effect((_p$) => {
|
|
30458
|
-
var _v$ =
|
|
30320
|
+
var _v$ = labelStyle2(), _v$2 = inputStyle4(), _v$3 = submitting(), _v$4 = submitting() ? "not-allowed" : "pointer", _v$5 = submitting() ? 0.7 : 1;
|
|
30459
30321
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30460
30322
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30461
30323
|
_v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
|
|
@@ -30476,6 +30338,126 @@ function ForgotPasswordPage(props) {
|
|
|
30476
30338
|
return _el$;
|
|
30477
30339
|
})();
|
|
30478
30340
|
}
|
|
30341
|
+
function labelStyle2() {
|
|
30342
|
+
return {
|
|
30343
|
+
"font-size": "0.75rem",
|
|
30344
|
+
"text-transform": "uppercase",
|
|
30345
|
+
"letter-spacing": "0.05em",
|
|
30346
|
+
color: "var(--app-affiliate-fg-muted)"
|
|
30347
|
+
};
|
|
30348
|
+
}
|
|
30349
|
+
function inputStyle4() {
|
|
30350
|
+
return {
|
|
30351
|
+
width: "100%",
|
|
30352
|
+
padding: "0.625rem 0.75rem",
|
|
30353
|
+
background: "var(--app-affiliate-surface-light)",
|
|
30354
|
+
color: "var(--app-affiliate-fg)",
|
|
30355
|
+
border: "1px solid var(--app-affiliate-border)",
|
|
30356
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
30357
|
+
"font-size": "0.9rem",
|
|
30358
|
+
"font-family": "inherit",
|
|
30359
|
+
"box-sizing": "border-box"
|
|
30360
|
+
};
|
|
30361
|
+
}
|
|
30362
|
+
delegateEvents(["input", "click"]);
|
|
30363
|
+
var _tmpl$579 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30364
|
+
var _tmpl$2148 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30365
|
+
var _tmpl$3130 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Choose a new password`);
|
|
30366
|
+
var _tmpl$4107 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30367
|
+
function queryParam(name) {
|
|
30368
|
+
if (typeof window === "undefined") return "";
|
|
30369
|
+
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30370
|
+
}
|
|
30371
|
+
function ResetPasswordPage(props) {
|
|
30372
|
+
const token = () => props.token ?? queryParam("token");
|
|
30373
|
+
const email = () => props.email ?? queryParam("email");
|
|
30374
|
+
const [password, setPassword] = createSignal("");
|
|
30375
|
+
const [confirm2, setConfirm] = createSignal("");
|
|
30376
|
+
const [submitting, setSubmitting] = createSignal(false);
|
|
30377
|
+
const [error, setError] = createSignal(null);
|
|
30378
|
+
const [message, setMessage] = createSignal(null);
|
|
30379
|
+
async function handleSubmit(e) {
|
|
30380
|
+
e.preventDefault();
|
|
30381
|
+
setError(null);
|
|
30382
|
+
if (!token() || !email()) {
|
|
30383
|
+
setError("This reset link is missing its token. Please request a new one.");
|
|
30384
|
+
return;
|
|
30385
|
+
}
|
|
30386
|
+
if (password() !== confirm2()) {
|
|
30387
|
+
setError("Passwords do not match.");
|
|
30388
|
+
return;
|
|
30389
|
+
}
|
|
30390
|
+
setSubmitting(true);
|
|
30391
|
+
try {
|
|
30392
|
+
const res = await authApi.resetPassword({
|
|
30393
|
+
email: email().trim().toLowerCase(),
|
|
30394
|
+
token: token(),
|
|
30395
|
+
newPassword: password()
|
|
30396
|
+
});
|
|
30397
|
+
setMessage(res.message);
|
|
30398
|
+
props.onSuccess?.();
|
|
30399
|
+
} catch (err) {
|
|
30400
|
+
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
30401
|
+
} finally {
|
|
30402
|
+
setSubmitting(false);
|
|
30403
|
+
}
|
|
30404
|
+
}
|
|
30405
|
+
return (() => {
|
|
30406
|
+
var _el$ = _tmpl$3130(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
30407
|
+
insert(_el$2, createComponent(Show, {
|
|
30408
|
+
get when() {
|
|
30409
|
+
return !message();
|
|
30410
|
+
},
|
|
30411
|
+
get fallback() {
|
|
30412
|
+
return (() => {
|
|
30413
|
+
var _el$11 = _tmpl$4107();
|
|
30414
|
+
insert(_el$11, message);
|
|
30415
|
+
return _el$11;
|
|
30416
|
+
})();
|
|
30417
|
+
},
|
|
30418
|
+
get children() {
|
|
30419
|
+
var _el$4 = _tmpl$2148(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
30420
|
+
_el$4.addEventListener("submit", handleSubmit);
|
|
30421
|
+
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
30422
|
+
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
30423
|
+
insert(_el$4, createComponent(Show, {
|
|
30424
|
+
get when() {
|
|
30425
|
+
return error();
|
|
30426
|
+
},
|
|
30427
|
+
get children() {
|
|
30428
|
+
var _el$1 = _tmpl$579();
|
|
30429
|
+
insert(_el$1, error);
|
|
30430
|
+
return _el$1;
|
|
30431
|
+
}
|
|
30432
|
+
}), _el$10);
|
|
30433
|
+
insert(_el$10, () => submitting() ? "Resetting\u2026" : "Reset password");
|
|
30434
|
+
effect((_p$) => {
|
|
30435
|
+
var _v$ = labelStyle3(), _v$2 = inputStyle5(), _v$3 = labelStyle3(), _v$4 = inputStyle5(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
30436
|
+
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30437
|
+
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30438
|
+
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
30439
|
+
_p$.o = style(_el$0, _v$4, _p$.o);
|
|
30440
|
+
_v$5 !== _p$.i && (_el$10.disabled = _p$.i = _v$5);
|
|
30441
|
+
_v$6 !== _p$.n && setStyleProperty(_el$10, "cursor", _p$.n = _v$6);
|
|
30442
|
+
_v$7 !== _p$.s && setStyleProperty(_el$10, "opacity", _p$.s = _v$7);
|
|
30443
|
+
return _p$;
|
|
30444
|
+
}, {
|
|
30445
|
+
e: void 0,
|
|
30446
|
+
t: void 0,
|
|
30447
|
+
a: void 0,
|
|
30448
|
+
o: void 0,
|
|
30449
|
+
i: void 0,
|
|
30450
|
+
n: void 0,
|
|
30451
|
+
s: void 0
|
|
30452
|
+
});
|
|
30453
|
+
effect(() => _el$7.value = password());
|
|
30454
|
+
effect(() => _el$0.value = confirm2());
|
|
30455
|
+
return _el$4;
|
|
30456
|
+
}
|
|
30457
|
+
}), null);
|
|
30458
|
+
return _el$;
|
|
30459
|
+
})();
|
|
30460
|
+
}
|
|
30479
30461
|
function labelStyle3() {
|
|
30480
30462
|
return {
|
|
30481
30463
|
"font-size": "0.75rem",
|
|
@@ -30497,16 +30479,17 @@ function inputStyle5() {
|
|
|
30497
30479
|
"box-sizing": "border-box"
|
|
30498
30480
|
};
|
|
30499
30481
|
}
|
|
30500
|
-
delegateEvents(["input"
|
|
30482
|
+
delegateEvents(["input"]);
|
|
30501
30483
|
var _tmpl$580 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30502
|
-
var _tmpl$2149 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>
|
|
30503
|
-
var _tmpl$3131 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>
|
|
30484
|
+
var _tmpl$2149 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
30485
|
+
var _tmpl$3131 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Accept your admin invite`);
|
|
30504
30486
|
var _tmpl$4108 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
|
|
30505
30487
|
function queryParam2(name) {
|
|
30506
30488
|
if (typeof window === "undefined") return "";
|
|
30507
30489
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30508
30490
|
}
|
|
30509
|
-
|
|
30491
|
+
var MIN_PASSWORD_LENGTH = 8;
|
|
30492
|
+
function AcceptAdminInvitePage(props) {
|
|
30510
30493
|
const token = () => props.token ?? queryParam2("token");
|
|
30511
30494
|
const email = () => props.email ?? queryParam2("email");
|
|
30512
30495
|
const [password, setPassword] = createSignal("");
|
|
@@ -30518,7 +30501,11 @@ function ResetPasswordPage(props) {
|
|
|
30518
30501
|
e.preventDefault();
|
|
30519
30502
|
setError(null);
|
|
30520
30503
|
if (!token() || !email()) {
|
|
30521
|
-
setError("This
|
|
30504
|
+
setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
|
|
30505
|
+
return;
|
|
30506
|
+
}
|
|
30507
|
+
if (password().length < MIN_PASSWORD_LENGTH) {
|
|
30508
|
+
setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
|
|
30522
30509
|
return;
|
|
30523
30510
|
}
|
|
30524
30511
|
if (password() !== confirm2()) {
|
|
@@ -30527,12 +30514,12 @@ function ResetPasswordPage(props) {
|
|
|
30527
30514
|
}
|
|
30528
30515
|
setSubmitting(true);
|
|
30529
30516
|
try {
|
|
30530
|
-
|
|
30517
|
+
await authApi.acceptAdminInvite({
|
|
30531
30518
|
email: email().trim().toLowerCase(),
|
|
30532
30519
|
token: token(),
|
|
30533
|
-
|
|
30520
|
+
password: password()
|
|
30534
30521
|
});
|
|
30535
|
-
setMessage(
|
|
30522
|
+
setMessage("You\u2019re all set. Sign in with this email and your new password.");
|
|
30536
30523
|
props.onSuccess?.();
|
|
30537
30524
|
} catch (err) {
|
|
30538
30525
|
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
@@ -30568,7 +30555,7 @@ function ResetPasswordPage(props) {
|
|
|
30568
30555
|
return _el$1;
|
|
30569
30556
|
}
|
|
30570
30557
|
}), _el$10);
|
|
30571
|
-
insert(_el$10, () => submitting() ? "
|
|
30558
|
+
insert(_el$10, () => submitting() ? "Saving\u2026" : "Accept invite");
|
|
30572
30559
|
effect((_p$) => {
|
|
30573
30560
|
var _v$ = labelStyle4(), _v$2 = inputStyle6(), _v$3 = labelStyle4(), _v$4 = inputStyle6(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
30574
30561
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
@@ -30981,5 +30968,5 @@ function primaryButtonStyle2(submitting) {
|
|
|
30981
30968
|
}
|
|
30982
30969
|
|
|
30983
30970
|
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AcceptAdminInvitePage, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
|
|
30984
|
-
//# sourceMappingURL=
|
|
30985
|
-
//# sourceMappingURL=
|
|
30971
|
+
//# sourceMappingURL=ERW2WNI6.js.map
|
|
30972
|
+
//# sourceMappingURL=ERW2WNI6.js.map
|