@zenpatient-org/healthspan-marketing-ui 0.1.111 → 0.1.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.cjs.js +1 -1
  2. package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.es.js +7 -5
  3. package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -1
  4. package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +29 -29
  5. package/dist/components/HighlightedTitle/HighlightedTitle.cjs.js +1 -1
  6. package/dist/components/HighlightedTitle/HighlightedTitle.es.js +16 -16
  7. package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
  8. package/dist/components/StepsCarousel/StepsCarousel.es.js +71 -61
  9. package/dist/healthspan-marketing-ui.css +1 -1
  10. package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
  11. package/dist/modules/CallToAction/CallToAction.es.js +17 -18
  12. package/dist/modules/HSModal/HSModal.cjs.js +1 -1
  13. package/dist/modules/HSModal/HSModal.es.js +4 -4
  14. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.cjs.js +1 -1
  15. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.es.js +16 -18
  16. package/dist/modules/HSModal/index.d.ts +1 -1
  17. package/dist/modules/HSModal/useHSModal.cjs.js +1 -1
  18. package/dist/modules/HSModal/useHSModal.d.ts +2 -2
  19. package/dist/modules/HSModal/useHSModal.es.js +46 -44
  20. package/dist/modules/IndividualProductCard/components/PlanCard/PlanCard.cjs.js +1 -1
  21. package/dist/modules/IndividualProductCard/components/PlanCard/PlanCard.es.js +18 -14
  22. package/dist/modules/IndividualProductCard/types.d.ts +1 -0
  23. package/dist/modules/LongevityPathways/LongevityPathways.cjs.js +1 -1
  24. package/dist/modules/LongevityPathways/LongevityPathways.es.js +8 -7
  25. package/dist/modules/OptimalHealth/components/ClockImages/ClockImages.cjs.js +1 -1
  26. package/dist/modules/OptimalHealth/components/ClockImages/ClockImages.es.js +36 -37
  27. package/dist/modules/ResearchStudies/ResearchStudies.cjs.js +1 -1
  28. package/dist/modules/ResearchStudies/ResearchStudies.es.js +10 -10
  29. package/dist/modules/Reviews/Reviews.cjs.js +1 -1
  30. package/dist/modules/Reviews/Reviews.es.js +27 -22
  31. package/dist/modules/Reviews/components/ReviewList/ReviewList.cjs.js +1 -1
  32. package/dist/modules/Reviews/components/ReviewList/ReviewList.d.ts +2 -1
  33. package/dist/modules/Reviews/components/ReviewList/ReviewList.es.js +35 -16
  34. package/dist/modules/Reviews/components/ReviewList/reviewList.module.css.cjs.js +1 -1
  35. package/dist/modules/Reviews/components/ReviewList/reviewList.module.css.es.js +10 -4
  36. package/dist/modules/Reviews/reviews.module.css.cjs.js +1 -1
  37. package/dist/modules/Reviews/reviews.module.css.es.js +7 -11
  38. package/dist/pageComponents/TreatmentsHero/components/TreatmentHeroCard/TreatmentHeroCard.cjs.js +1 -1
  39. package/dist/pageComponents/TreatmentsHero/components/TreatmentHeroCard/TreatmentHeroCard.es.js +17 -7
  40. package/dist/pageComponents/TreatmentsHero/components/TreatmentHeroCard/treatmentHeroCard.module.css.cjs.js +1 -1
  41. package/dist/pageComponents/TreatmentsHero/components/TreatmentHeroCard/treatmentHeroCard.module.css.es.js +9 -7
  42. package/package.json +6 -1
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),G=require("../../components/Button/Button.cjs.js"),p=require("../../components/Typography/Typography.cjs.js"),A=require("../../components/Icon/Icon.cjs.js"),C=require("../../components/Icon/constants.cjs.js"),v=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),K=require("../../node_modules/@gsap/react/src/index.cjs.js"),M=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),J=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(M.ScrollTrigger);const Q=({subtitle:k,titleTop:P,scrollableLabels:R,titleBottom:B,description:W,hsaText:$,buttonText:O,buttonLink:g,backgroundImage:X})=>{const u=l.useRef(null),i=l.useRef(null),T=l.useRef(null),h=l.useRef(null),m=l.useRef(null),N=l.useRef(null),y=l.useRef(null),b=l.useRef(null),x=l.useRef(null);return K.useGSAP(()=>{var S,V,w;const d=u.current&&u.current.getBoundingClientRect().top<window.innerHeight*.8,f=(S=T.current)==null?void 0:S.querySelector("p"),q=(V=N.current)==null?void 0:V.querySelector("p"),z=[f,h.current,i.current,m.current,q,y.current,b.current,x.current].filter(Boolean);a.gsap.set(z,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100});const o=a.gsap.to([f,h.current,i.current,m.current,q,y.current,b.current,x.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},paused:!0});M.ScrollTrigger.create({trigger:u.current,start:"top 80%",end:"+=500",onEnter:()=>o.play(),onLeave:()=>o.reverse(),onEnterBack:()=>o.play(),onLeaveBack:()=>o.reverse()}),d&&a.gsap.delayedCall(.1,()=>{o.play()});const r=(w=i.current)==null?void 0:w.querySelector("ul");if(!r)return;const L=r.innerHTML;let n=null,_=!0;const H=()=>{n&&n.kill(),r.innerHTML=L,a.gsap.set(r,{y:0});const s=Array.from(r.querySelectorAll("li"));if(s.length<=1)return;const j=s[0].clientHeight;if(!j)return;a.gsap.set(i.current,{height:j,overflow:"hidden"});const I=Array.from(s);I.forEach(E=>{r.appendChild(E.cloneNode(!0))});const F=_&&!d?2.5:0;n=a.gsap.timeline({repeat:-1,delay:F,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((E,D)=>{n&&n.to({},{duration:2}).to(r,{y:`-${(D+1)*j}`,duration:.5,ease:"power1.inOut"})}),_=!1},c=J.default(H,200);return H(),window.addEventListener("resize",c),()=>{var s;window.removeEventListener("resize",c),(s=c.kill)==null||s.call(c),n&&n.kill(),r&&(r.innerHTML=L,a.gsap.set(r,{y:0}))}},[R]),e.jsxs("section",{ref:u,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${X})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:h,children:e.jsx(v.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:R.map((d,f)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(p.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:d})},f))})}),e.jsx("div",{ref:m,children:e.jsx(v.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:B})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(v.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:k})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(p.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(A.Icon,{name:C.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:y,children:e.jsx(p.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:W})}),e.jsx("div",{ref:b,className:t.default.buttonWrapper,children:g&&e.jsx(G.Button,{as:g?"a":"button",href:g,variant:"secondary",size:"lg",children:O})}),e.jsxs("div",{ref:x,className:t.default.hsaEligible,children:[e.jsx(A.Icon,{name:C.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(p.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:$})]})]})})]})]})};exports.CallToAction=Q;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),G=require("../../components/Button/Button.cjs.js"),p=require("../../components/Typography/Typography.cjs.js"),A=require("../../components/Icon/Icon.cjs.js"),C=require("../../components/Icon/constants.cjs.js"),R=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),K=require("../../node_modules/@gsap/react/src/index.cjs.js"),M=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),J=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(M.ScrollTrigger);const Q=({subtitle:k,titleTop:P,scrollableLabels:v,titleBottom:B,description:W,hsaText:$,buttonText:O,buttonLink:g,backgroundImage:X})=>{const o=l.useRef(null),i=l.useRef(null),T=l.useRef(null),h=l.useRef(null),m=l.useRef(null),N=l.useRef(null),y=l.useRef(null),b=l.useRef(null),x=l.useRef(null);return K.useGSAP(()=>{var S,V,w;const u=o.current&&o.current.getBoundingClientRect().top<window.innerHeight*.8,d=(S=T.current)==null?void 0:S.querySelector("p"),q=(V=N.current)==null?void 0:V.querySelector("p"),z=[d,h.current,i.current,m.current,q,y.current,b.current,x.current].filter(Boolean);a.gsap.set(z,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100});const f=a.gsap.to([d,h.current,i.current,m.current,q,y.current,b.current,x.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},paused:!0});M.ScrollTrigger.create({trigger:o.current,start:"top 80%",end:"+=500",onEnter:()=>f.play(),onEnterBack:()=>f.play(),onLeaveBack:()=>f.reverse()}),u&&a.gsap.delayedCall(.1,()=>{f.play()});const r=(w=i.current)==null?void 0:w.querySelector("ul");if(!r)return;const _=r.innerHTML;let n=null,H=!0;const L=()=>{n&&n.kill(),r.innerHTML=_,a.gsap.set(r,{y:0});const s=Array.from(r.querySelectorAll("li"));if(s.length<=1)return;const j=s[0].clientHeight;if(!j)return;a.gsap.set(i.current,{height:j,overflow:"hidden"});const I=Array.from(s);I.forEach(E=>{r.appendChild(E.cloneNode(!0))});const F=H&&!u?2.5:0;n=a.gsap.timeline({repeat:-1,delay:F,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((E,D)=>{n&&n.to({},{duration:2}).to(r,{y:`-${(D+1)*j}`,duration:.5,ease:"power1.inOut"})}),H=!1},c=J.default(L,200);return L(),window.addEventListener("resize",c),()=>{var s;window.removeEventListener("resize",c),(s=c.kill)==null||s.call(c),n&&n.kill(),r&&(r.innerHTML=_,a.gsap.set(r,{y:0}))}},[v]),e.jsxs("section",{ref:o,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${X})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:h,children:e.jsx(R.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:v.map((u,d)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(p.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:u})},d))})}),e.jsx("div",{ref:m,children:e.jsx(R.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:B})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(R.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:k})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(p.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(A.Icon,{name:C.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:y,children:e.jsx(p.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:W})}),e.jsx("div",{ref:b,className:t.default.buttonWrapper,children:g&&e.jsx(G.Button,{as:g?"a":"button",href:g,variant:"secondary",size:"lg",children:O})}),e.jsxs("div",{ref:x,className:t.default.hsaEligible,children:[e.jsx(A.Icon,{name:C.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(p.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:$})]})]})})]})]})};exports.CallToAction=Q;
@@ -23,11 +23,11 @@ const ce = ({
23
23
  buttonLink: h,
24
24
  backgroundImage: j
25
25
  }) => {
26
- const u = l(null), o = l(null), w = l(null), y = l(null), b = l(null), S = l(null), g = l(null), v = l(null), N = l(null);
26
+ const d = l(null), o = l(null), w = l(null), y = l(null), b = l(null), S = l(null), g = l(null), v = l(null), N = l(null);
27
27
  return J(() => {
28
28
  var k, M, A;
29
- const m = u.current && u.current.getBoundingClientRect().top < window.innerHeight * 0.8, p = (k = w.current) == null ? void 0 : k.querySelector("p"), T = (M = S.current) == null ? void 0 : M.querySelector("p"), D = [
30
- p,
29
+ const u = d.current && d.current.getBoundingClientRect().top < window.innerHeight * 0.8, m = (k = w.current) == null ? void 0 : k.querySelector("p"), T = (M = S.current) == null ? void 0 : M.querySelector("p"), D = [
30
+ m,
31
31
  y.current,
32
32
  o.current,
33
33
  b.current,
@@ -40,9 +40,9 @@ const ce = ({
40
40
  clipPath: "inset(0% 0% 100% 0%)",
41
41
  yPercent: 100
42
42
  });
43
- const c = a.to(
43
+ const p = a.to(
44
44
  [
45
- p,
45
+ m,
46
46
  y.current,
47
47
  o.current,
48
48
  b.current,
@@ -66,15 +66,14 @@ const ce = ({
66
66
  }
67
67
  );
68
68
  q.create({
69
- trigger: u.current,
69
+ trigger: d.current,
70
70
  start: "top 80%",
71
71
  end: "+=500",
72
- onEnter: () => c.play(),
73
- onLeave: () => c.reverse(),
74
- onEnterBack: () => c.play(),
75
- onLeaveBack: () => c.reverse()
76
- }), m && a.delayedCall(0.1, () => {
77
- c.play();
72
+ onEnter: () => p.play(),
73
+ onEnterBack: () => p.play(),
74
+ onLeaveBack: () => p.reverse()
75
+ }), u && a.delayedCall(0.1, () => {
76
+ p.play();
78
77
  });
79
78
  const t = (A = o.current) == null ? void 0 : A.querySelector("ul");
80
79
  if (!t) return;
@@ -91,7 +90,7 @@ const ce = ({
91
90
  I.forEach((P) => {
92
91
  t.appendChild(P.cloneNode(!0));
93
92
  });
94
- const $ = E && !m ? 2.5 : 0;
93
+ const $ = E && !u ? 2.5 : 0;
95
94
  i = a.timeline({
96
95
  repeat: -1,
97
96
  delay: $,
@@ -105,12 +104,12 @@ const ce = ({
105
104
  ease: "power1.inOut"
106
105
  });
107
106
  }), E = !1;
108
- }, d = Q(H, 200);
109
- return H(), window.addEventListener("resize", d), () => {
107
+ }, c = Q(H, 200);
108
+ return H(), window.addEventListener("resize", c), () => {
110
109
  var n;
111
- window.removeEventListener("resize", d), (n = d.kill) == null || n.call(d), i && i.kill(), t && (t.innerHTML = C, a.set(t, { y: 0 }));
110
+ window.removeEventListener("resize", c), (n = c.kill) == null || n.call(c), i && i.kill(), t && (t.innerHTML = C, a.set(t, { y: 0 }));
112
111
  };
113
- }, [V]), /* @__PURE__ */ s("section", { ref: u, className: r.root, children: [
112
+ }, [V]), /* @__PURE__ */ s("section", { ref: d, className: r.root, children: [
114
113
  /* @__PURE__ */ e("div", { className: r.backgroundImage, style: { backgroundImage: `url(${j})` } }),
115
114
  /* @__PURE__ */ s("div", { className: r.container, children: [
116
115
  /* @__PURE__ */ e("div", { className: r.leftContent, children: /* @__PURE__ */ s("div", { className: r.content, children: [
@@ -124,7 +123,7 @@ const ce = ({
124
123
  title: X
125
124
  }
126
125
  ) }),
127
- /* @__PURE__ */ e("div", { ref: o, className: r.scrollableLabelsWrapper, children: /* @__PURE__ */ e("ul", { className: r.scrollableLabels, children: V.map((m, p) => /* @__PURE__ */ e("li", { className: r.scrollableLabel, children: /* @__PURE__ */ e(f, { defaultVariant: "displayXl", mobileVariant: "displayMd", as: "span", children: m }) }, p)) }) }),
126
+ /* @__PURE__ */ e("div", { ref: o, className: r.scrollableLabelsWrapper, children: /* @__PURE__ */ e("ul", { className: r.scrollableLabels, children: V.map((u, m) => /* @__PURE__ */ e("li", { className: r.scrollableLabel, children: /* @__PURE__ */ e(f, { defaultVariant: "displayXl", mobileVariant: "displayMd", as: "span", children: u }) }, m)) }) }),
128
127
  /* @__PURE__ */ e("div", { ref: b, children: /* @__PURE__ */ e(
129
128
  L,
130
129
  {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./components/MailchimpModal/MailchimpModal.cjs.js"),r=require("./useHSModal.cjs.js"),d=require("./hsModal.module.css.cjs.js"),u=l=>{const{isOpen:a,closeModal:i,handleClick:n,handleOverlayClick:c}=r.useHSModal({id:l.id,initiallyOpen:l.initiallyOpen,trigger:l.trigger,onCloseCallback:l.onCloseCallback,onClickCallback:l.onClickCallback}),o=()=>{switch(l.type){case"mailchimp":return e.jsx(t.MailchimpModal,{...l,onCloseCallback:i,onClickCallback:n});default:return null}};return a?e.jsx("div",{className:d.default.overlay,onClick:c,children:o()}):null};exports.HSModal=u;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),t=require("./components/MailchimpModal/MailchimpModal.cjs.js"),r=require("./useHSModal.cjs.js"),d=require("./hsModal.module.css.cjs.js"),s=l=>{const{isOpen:e,closeModal:i,handleClick:n,handleOverlayClick:c}=r.useHSModal({id:l.id,initiallyOpen:l.initiallyOpen,trigger:l.trigger,onCloseCallback:l.onCloseCallback,onClickCallback:l.onClickCallback}),o=()=>{switch(l.type){case"mailchimp":return a.jsx(t.MailchimpModal,{...l,onCloseCallback:i,onClickCallback:n});default:return null}};return console.log(">>>>> isOpen: ",e),e?a.jsx("div",{className:d.default.overlay,onClick:c,children:o()}):null};exports.HSModal=s;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
2
+ import { jsx as i } from "react/jsx-runtime";
3
3
  import { MailchimpModal as t } from "./components/MailchimpModal/MailchimpModal.es.js";
4
4
  import { useHSModal as r } from "./useHSModal.es.js";
5
5
  import C from "./hsModal.module.css.es.js";
6
6
  const u = (l) => {
7
- const { isOpen: i, closeModal: a, handleClick: n, handleOverlayClick: o } = r({
7
+ const { isOpen: e, closeModal: n, handleClick: a, handleOverlayClick: o } = r({
8
8
  id: l.id,
9
9
  initiallyOpen: l.initiallyOpen,
10
10
  trigger: l.trigger,
@@ -13,12 +13,12 @@ const u = (l) => {
13
13
  }), c = () => {
14
14
  switch (l.type) {
15
15
  case "mailchimp":
16
- return /* @__PURE__ */ e(t, { ...l, onCloseCallback: a, onClickCallback: n });
16
+ return /* @__PURE__ */ i(t, { ...l, onCloseCallback: n, onClickCallback: a });
17
17
  default:
18
18
  return null;
19
19
  }
20
20
  };
21
- return i ? /* @__PURE__ */ e("div", { className: C.overlay, onClick: o, children: c() }) : null;
21
+ return console.log(">>>>> isOpen: ", e), e ? /* @__PURE__ */ i("div", { className: C.overlay, onClick: o, children: c() }) : null;
22
22
  };
23
23
  export {
24
24
  u as HSModal
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="mailchimpModal-module__overlay___peQPr",t="mailchimpModal-module__contentWrapper___HpcOd",a="mailchimpModal-module__light___-lF5m",o="mailchimpModal-module__dark___7FKcx",_="mailchimpModal-module__content___xscO6",l="mailchimpModal-module__imageWrapper___lBCUP",m="mailchimpModal-module__text___t5kPi",i="mailchimpModal-module__image___2R979",c={overlay:e,contentWrapper:t,light:a,dark:o,content:_,imageWrapper:l,text:m,image:i};exports.content=_;exports.contentWrapper=t;exports.dark=o;exports.default=c;exports.image=i;exports.imageWrapper=l;exports.light=a;exports.overlay=e;exports.text=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="mailchimpModal-module__contentWrapper___HpcOd",t="mailchimpModal-module__light___-lF5m",a="mailchimpModal-module__dark___7FKcx",_="mailchimpModal-module__content___xscO6",o="mailchimpModal-module__imageWrapper___lBCUP",l="mailchimpModal-module__text___t5kPi",i="mailchimpModal-module__image___2R979",m={contentWrapper:e,light:t,dark:a,content:_,imageWrapper:o,text:l,image:i};exports.content=_;exports.contentWrapper=e;exports.dark=a;exports.default=m;exports.image=i;exports.imageWrapper=o;exports.light=t;exports.text=l;
@@ -1,21 +1,19 @@
1
- const _ = "mailchimpModal-module__overlay___peQPr", a = "mailchimpModal-module__contentWrapper___HpcOd", e = "mailchimpModal-module__light___-lF5m", o = "mailchimpModal-module__dark___7FKcx", l = "mailchimpModal-module__content___xscO6", t = "mailchimpModal-module__imageWrapper___lBCUP", m = "mailchimpModal-module__text___t5kPi", c = "mailchimpModal-module__image___2R979", i = {
2
- overlay: _,
3
- contentWrapper: a,
4
- light: e,
5
- dark: o,
6
- content: l,
7
- imageWrapper: t,
8
- text: m,
9
- image: c
1
+ const _ = "mailchimpModal-module__contentWrapper___HpcOd", t = "mailchimpModal-module__light___-lF5m", a = "mailchimpModal-module__dark___7FKcx", e = "mailchimpModal-module__content___xscO6", o = "mailchimpModal-module__imageWrapper___lBCUP", l = "mailchimpModal-module__text___t5kPi", m = "mailchimpModal-module__image___2R979", c = {
2
+ contentWrapper: _,
3
+ light: t,
4
+ dark: a,
5
+ content: e,
6
+ imageWrapper: o,
7
+ text: l,
8
+ image: m
10
9
  };
11
10
  export {
12
- l as content,
13
- a as contentWrapper,
14
- o as dark,
15
- i as default,
16
- c as image,
17
- t as imageWrapper,
18
- e as light,
19
- _ as overlay,
20
- m as text
11
+ e as content,
12
+ _ as contentWrapper,
13
+ a as dark,
14
+ c as default,
15
+ m as image,
16
+ o as imageWrapper,
17
+ t as light,
18
+ l as text
21
19
  };
@@ -1,3 +1,3 @@
1
1
  export { HSModal } from './HSModal';
2
- export { useHSModal, shouldShowPopup, getDaysUntilNextShow } from './useHSModal';
2
+ export { useHSModal } from './useHSModal';
3
3
  export type { TMailchimpModal, THSModal } from './types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),m=7,i=24*60*60*1e3,w=o=>{try{const n=localStorage.getItem(`popup_${o}_lastShown`);if(!n)return!0;const e=parseInt(n,10);return(new Date().getTime()-e)/i>=m}catch(n){return console.warn("Error checking popup cooldown:",n),!0}},E=({id:o,initiallyOpen:n=!1,trigger:e,onCloseCallback:r,onClickCallback:u})=>{const[c,S]=t.useState(n),a=t.useCallback(()=>{w(o)&&S(!0)},[o]),d=t.useCallback(()=>{S(!1),r==null||r()},[r]),y=t.useCallback(()=>{u==null||u()},[u]);t.useEffect(()=>{if((e==null?void 0:e.type)==="timer"&&!c){const s=setTimeout(()=>{a()},e.delay*1e3);return()=>clearTimeout(s)}},[e,c,a]),t.useEffect(()=>{if(!c)return;const s=new Date().getTime();localStorage.setItem(`popup_${o}_lastShown`,s.toString());const h=window.getComputedStyle(document.body).overflow;document.body.style.overflow="hidden";const p=l=>{l.key==="Escape"&&d()};return document.addEventListener("keydown",p),()=>{document.body.style.overflow=h,document.removeEventListener("keydown",p)}},[c,d,o]);const f=t.useCallback(s=>{s.target===s.currentTarget&&d()},[d]);return{isOpen:c,openModal:a,closeModal:d,handleClick:y,handleOverlayClick:f}};exports.shouldShowPopup=w;exports.useHSModal=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),y=7*24*60*60*1e3,a="healthspanClosedModalList",f=()=>{try{return JSON.parse(localStorage.getItem(a)||"{}")}catch{return{}}},i=e=>{localStorage.setItem(a,JSON.stringify(e))},p=e=>{const o=f()[e];return!o||Date.now()>o},w=({id:e,initiallyOpen:l=!1,trigger:o,onCloseCallback:c,onClickCallback:u})=>{const[n,M]=s.useState(l),r=s.useCallback(()=>{p(e)&&M(!0)},[e]),d=s.useCallback(()=>{M(!1);const t=f();t[e]=Date.now()+y,i(t),c==null||c()},[e,c]),E=s.useCallback(()=>{u==null||u()},[u]);s.useEffect(()=>{if((o==null?void 0:o.type)==="timer"&&!n){const t=setTimeout(()=>{r()},o.delay*1e3);return()=>clearTimeout(t)}},[o,n,r]),s.useEffect(()=>{if(!n)return;const t=window.getComputedStyle(document.body).overflow;document.body.style.overflow="hidden";const S=O=>{O.key==="Escape"&&d()};return document.addEventListener("keydown",S),()=>{document.body.style.overflow=t,document.removeEventListener("keydown",S)}},[n,d,e]);const m=s.useCallback(t=>{t.target===t.currentTarget&&d()},[d]);return{isOpen:n,openModal:r,closeModal:d,handleClick:E,handleOverlayClick:m}};exports.CLOSED_MODALS_KEY=a;exports.REOPEN_TIMEOUT_MS=y;exports.useHSModal=w;
@@ -1,5 +1,5 @@
1
- export declare const shouldShowPopup: (id: string) => boolean;
2
- export declare const getDaysUntilNextShow: (id: string) => number;
1
+ export declare const REOPEN_TIMEOUT_MS: number;
2
+ export declare const CLOSED_MODALS_KEY = "healthspanClosedModalList";
3
3
  type UseHSModalProps = {
4
4
  id: string;
5
5
  initiallyOpen?: boolean;
@@ -1,63 +1,65 @@
1
- import { useState as i, useCallback as d, useEffect as a } from "react";
2
- const E = 7, _ = 24 * 60 * 60 * 1e3, v = (t) => {
1
+ import { useState as E, useCallback as c, useEffect as f } from "react";
2
+ const h = 7 * 24 * 60 * 60 * 1e3, l = "healthspanClosedModalList", M = () => {
3
3
  try {
4
- const o = localStorage.getItem(`popup_${t}_lastShown`);
5
- if (!o)
6
- return !0;
7
- const e = parseInt(o, 10);
8
- return ((/* @__PURE__ */ new Date()).getTime() - e) / _ >= E;
9
- } catch (o) {
10
- return console.warn("Error checking popup cooldown:", o), !0;
4
+ return JSON.parse(localStorage.getItem(l) || "{}");
5
+ } catch {
6
+ return {};
11
7
  }
8
+ }, O = (e) => {
9
+ localStorage.setItem(l, JSON.stringify(e));
10
+ }, i = (e) => {
11
+ const o = M()[e];
12
+ return !o || Date.now() > o;
12
13
  }, T = ({
13
- id: t,
14
- initiallyOpen: o = !1,
15
- trigger: e,
16
- onCloseCallback: s,
14
+ id: e,
15
+ initiallyOpen: a = !1,
16
+ trigger: o,
17
+ onCloseCallback: d,
17
18
  onClickCallback: r
18
19
  }) => {
19
- const [u, w] = i(o), p = d(() => {
20
- v(t) && w(!0);
21
- }, [t]), c = d(() => {
22
- w(!1), s == null || s();
23
- }, [s]), m = d(() => {
20
+ const [s, m] = E(a), u = c(() => {
21
+ i(e) && m(!0);
22
+ }, [e]), n = c(() => {
23
+ m(!1);
24
+ const t = M();
25
+ t[e] = Date.now() + h, O(t), d == null || d();
26
+ }, [e, d]), p = c(() => {
24
27
  r == null || r();
25
28
  }, [r]);
26
- a(() => {
27
- if ((e == null ? void 0 : e.type) === "timer" && !u) {
28
- const n = setTimeout(() => {
29
- p();
30
- }, e.delay * 1e3);
31
- return () => clearTimeout(n);
29
+ f(() => {
30
+ if ((o == null ? void 0 : o.type) === "timer" && !s) {
31
+ const t = setTimeout(() => {
32
+ u();
33
+ }, o.delay * 1e3);
34
+ return () => clearTimeout(t);
32
35
  }
33
- }, [e, u, p]), a(() => {
34
- if (!u) return;
35
- const n = (/* @__PURE__ */ new Date()).getTime();
36
- localStorage.setItem(`popup_${t}_lastShown`, n.toString());
37
- const f = window.getComputedStyle(document.body).overflow;
36
+ }, [o, s, u]), f(() => {
37
+ if (!s) return;
38
+ const t = window.getComputedStyle(document.body).overflow;
38
39
  document.body.style.overflow = "hidden";
39
- const S = (h) => {
40
- h.key === "Escape" && c();
40
+ const y = (w) => {
41
+ w.key === "Escape" && n();
41
42
  };
42
- return document.addEventListener("keydown", S), () => {
43
- document.body.style.overflow = f, document.removeEventListener("keydown", S);
43
+ return document.addEventListener("keydown", y), () => {
44
+ document.body.style.overflow = t, document.removeEventListener("keydown", y);
44
45
  };
45
- }, [u, c, t]);
46
- const y = d(
47
- (n) => {
48
- n.target === n.currentTarget && c();
46
+ }, [s, n, e]);
47
+ const S = c(
48
+ (t) => {
49
+ t.target === t.currentTarget && n();
49
50
  },
50
- [c]
51
+ [n]
51
52
  );
52
53
  return {
53
- isOpen: u,
54
- openModal: p,
55
- closeModal: c,
56
- handleClick: m,
57
- handleOverlayClick: y
54
+ isOpen: s,
55
+ openModal: u,
56
+ closeModal: n,
57
+ handleClick: p,
58
+ handleOverlayClick: S
58
59
  };
59
60
  };
60
61
  export {
61
- v as shouldShowPopup,
62
+ l as CLOSED_MODALS_KEY,
63
+ h as REOPEN_TIMEOUT_MS,
62
64
  T as useHSModal
63
65
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../../../components/Icon/Icon.cjs.js"),l=require("../../../../components/Icon/constants.cjs.js"),d=require("../../../../components/RadioButton/RadioButton.cjs.js"),t=require("../../../../components/Typography/Typography.cjs.js"),u=require("../../../../components/Label/Label.cjs.js"),n=require("../../../../utils/cn/cn.cjs.js"),i=require("../../../../utils/formatUnits/formatUnits.cjs.js"),a=require("./planCard.module.css.cjs.js"),m=({plan:s,isActive:r,onSelect:o})=>e.jsxs("button",{className:n.cn(a.default.root,r&&a.default.active),onClick:()=>o(s.id),children:[s.featured&&e.jsx(u.Label,{color:"black",className:a.default.label,size:"sm",children:"Most popular"}),e.jsxs("div",{className:a.default.planContainer,children:[e.jsxs("div",{className:a.default.planInfo,children:[e.jsx(d.RadioButton,{checked:r}),e.jsxs("div",{className:a.default.planDetails,children:[e.jsx(t.Typography,{as:"h4",defaultVariant:"bodySm",emphasis:!0,children:s.label}),!!s.savingsPercentage&&e.jsxs(t.Typography,{as:"p",defaultVariant:"labelXs",weight:"regular",className:a.default.description,children:["Save ",s.savingsPercentage,"%"]})]})]}),e.jsxs("div",{className:a.default.priceDetails,children:[e.jsxs("div",{className:n.cn(a.default.priceContainer),children:[s.price!==s.totalPrice&&e.jsx(t.Typography,{as:"p",defaultVariant:"bodySm",weight:"regular",className:a.default.totalPrice,children:i.formatUnits(s.price,"usd",0)}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodySm",emphasis:!0,className:a.default.price,children:i.formatUnits(s.totalPrice,"usd",0)})]}),!!s.monthlyPrice&&e.jsxs(t.Typography,{as:"p",defaultVariant:"labelXs",weight:"regular",className:a.default.description,children:[i.formatUnits(s.monthlyPrice,"usd",0),"/mo"]})]})]}),!!s.duration&&s.duration!=="one-time"&&e.jsx("div",{className:n.cn(a.default.benefitsContainer,r&&a.default.benefitsActive),children:e.jsxs("div",{className:a.default.benefitsContent,children:[e.jsxs("div",{className:a.default.benefit,children:[e.jsx(c.Icon,{name:l.EIconName.ARROW_RETURN,className:a.default.benefitIcon}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodyXs",children:"Delivered every month"})]}),e.jsxs("div",{className:a.default.benefit,children:[e.jsx(c.Icon,{name:l.EIconName.CALENDAR,className:a.default.benefitIcon}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodyXs",children:"Modify or cancel anytime"})]})]})})]});exports.PlanCard=m;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../../../components/Icon/Icon.cjs.js"),c=require("../../../../components/Icon/constants.cjs.js"),d=require("../../../../components/RadioButton/RadioButton.cjs.js"),t=require("../../../../components/Typography/Typography.cjs.js"),u=require("../../../../components/Label/Label.cjs.js"),r=require("../../../../utils/cn/cn.cjs.js"),i=require("../../../../utils/formatUnits/formatUnits.cjs.js"),a=require("./planCard.module.css.cjs.js"),m=({plan:s,isActive:n,onSelect:l})=>e.jsxs("button",{className:r.cn(a.default.root,n&&a.default.active),onClick:()=>l(s.id),children:[s.featured&&e.jsx(u.Label,{color:"black",className:a.default.label,size:"sm",children:"Most popular"}),e.jsxs("div",{className:a.default.planContainer,children:[e.jsxs("div",{className:a.default.planInfo,children:[e.jsx(d.RadioButton,{checked:n}),e.jsxs("div",{className:a.default.planDetails,children:[e.jsx(t.Typography,{as:"h4",defaultVariant:"bodySm",emphasis:!0,align:"left",children:s.label}),!!s.savingsPercentage&&e.jsxs(t.Typography,{as:"p",defaultVariant:"labelXs",weight:"regular",className:a.default.description,children:["Save ",s.savingsPercentage,"%"]})]})]}),e.jsxs("div",{className:a.default.priceDetails,children:[e.jsxs("div",{className:r.cn(a.default.priceContainer),children:[s.price!==s.totalPrice&&e.jsx(t.Typography,{as:"p",defaultVariant:"bodySm",weight:"regular",className:a.default.totalPrice,children:i.formatUnits(s.price,"usd",0)}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodySm",emphasis:!0,className:a.default.price,children:i.formatUnits(s.totalPrice,"usd",0)})]}),!!s.monthlyPrice&&e.jsxs(t.Typography,{as:"p",defaultVariant:"labelXs",weight:"regular",className:a.default.description,children:[i.formatUnits(s.monthlyPrice,"usd",0),"/mo"]})]})]}),!!s.duration&&s.duration!=="one-time"&&e.jsx("div",{className:r.cn(a.default.benefitsContainer,n&&a.default.benefitsActive),children:e.jsxs("div",{className:a.default.benefitsContent,children:[e.jsxs("div",{className:a.default.benefit,children:[e.jsx(o.Icon,{name:c.EIconName.ARROW_RETURN,className:a.default.benefitIcon}),e.jsxs(t.Typography,{as:"p",defaultVariant:"bodyXs",children:["Delivered every"," ",s.durationAmount&&s.durationAmount>1?`${s.durationAmount} months`:"month"]})]}),e.jsxs("div",{className:a.default.benefit,children:[e.jsx(o.Icon,{name:c.EIconName.CALENDAR,className:a.default.benefitIcon}),e.jsx(t.Typography,{as:"p",defaultVariant:"bodyXs",children:"Modify or cancel anytime"})]})]})})]});exports.PlanCard=m;
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
3
- import { Icon as n } from "../../../../components/Icon/Icon.es.js";
4
- import { EIconName as o } from "../../../../components/Icon/constants.es.js";
3
+ import { Icon as c } from "../../../../components/Icon/Icon.es.js";
4
+ import { EIconName as l } from "../../../../components/Icon/constants.es.js";
5
5
  import { RadioButton as m } from "../../../../components/RadioButton/RadioButton.es.js";
6
6
  import { Typography as t } from "../../../../components/Typography/Typography.es.js";
7
7
  import { Label as h } from "../../../../components/Label/Label.es.js";
8
- import { cn as c } from "../../../../utils/cn/cn.es.js";
9
- import { formatUnits as l } from "../../../../utils/formatUnits/formatUnits.es.js";
8
+ import { cn as o } from "../../../../utils/cn/cn.es.js";
9
+ import { formatUnits as n } from "../../../../utils/formatUnits/formatUnits.es.js";
10
10
  import e from "./planCard.module.css.es.js";
11
- const C = ({ plan: a, isActive: s, onSelect: d }) => /* @__PURE__ */ i("button", { className: c(e.root, s && e.active), onClick: () => d(a.id), children: [
11
+ const C = ({ plan: a, isActive: s, onSelect: d }) => /* @__PURE__ */ i("button", { className: o(e.root, s && e.active), onClick: () => d(a.id), children: [
12
12
  a.featured && /* @__PURE__ */ r(h, { color: "black", className: e.label, size: "sm", children: "Most popular" }),
13
13
  /* @__PURE__ */ i("div", { className: e.planContainer, children: [
14
14
  /* @__PURE__ */ i("div", { className: e.planInfo, children: [
15
15
  /* @__PURE__ */ r(m, { checked: s }),
16
16
  /* @__PURE__ */ i("div", { className: e.planDetails, children: [
17
- /* @__PURE__ */ r(t, { as: "h4", defaultVariant: "bodySm", emphasis: !0, children: a.label }),
17
+ /* @__PURE__ */ r(t, { as: "h4", defaultVariant: "bodySm", emphasis: !0, align: "left", children: a.label }),
18
18
  !!a.savingsPercentage && /* @__PURE__ */ i(t, { as: "p", defaultVariant: "labelXs", weight: "regular", className: e.description, children: [
19
19
  "Save ",
20
20
  a.savingsPercentage,
@@ -23,23 +23,27 @@ const C = ({ plan: a, isActive: s, onSelect: d }) => /* @__PURE__ */ i("button",
23
23
  ] })
24
24
  ] }),
25
25
  /* @__PURE__ */ i("div", { className: e.priceDetails, children: [
26
- /* @__PURE__ */ i("div", { className: c(e.priceContainer), children: [
27
- a.price !== a.totalPrice && /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodySm", weight: "regular", className: e.totalPrice, children: l(a.price, "usd", 0) }),
28
- /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodySm", emphasis: !0, className: e.price, children: l(a.totalPrice, "usd", 0) })
26
+ /* @__PURE__ */ i("div", { className: o(e.priceContainer), children: [
27
+ a.price !== a.totalPrice && /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodySm", weight: "regular", className: e.totalPrice, children: n(a.price, "usd", 0) }),
28
+ /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodySm", emphasis: !0, className: e.price, children: n(a.totalPrice, "usd", 0) })
29
29
  ] }),
30
30
  !!a.monthlyPrice && /* @__PURE__ */ i(t, { as: "p", defaultVariant: "labelXs", weight: "regular", className: e.description, children: [
31
- l(a.monthlyPrice, "usd", 0),
31
+ n(a.monthlyPrice, "usd", 0),
32
32
  "/mo"
33
33
  ] })
34
34
  ] })
35
35
  ] }),
36
- !!a.duration && a.duration !== "one-time" && /* @__PURE__ */ r("div", { className: c(e.benefitsContainer, s && e.benefitsActive), children: /* @__PURE__ */ i("div", { className: e.benefitsContent, children: [
36
+ !!a.duration && a.duration !== "one-time" && /* @__PURE__ */ r("div", { className: o(e.benefitsContainer, s && e.benefitsActive), children: /* @__PURE__ */ i("div", { className: e.benefitsContent, children: [
37
37
  /* @__PURE__ */ i("div", { className: e.benefit, children: [
38
- /* @__PURE__ */ r(n, { name: o.ARROW_RETURN, className: e.benefitIcon }),
39
- /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodyXs", children: "Delivered every month" })
38
+ /* @__PURE__ */ r(c, { name: l.ARROW_RETURN, className: e.benefitIcon }),
39
+ /* @__PURE__ */ i(t, { as: "p", defaultVariant: "bodyXs", children: [
40
+ "Delivered every",
41
+ " ",
42
+ a.durationAmount && a.durationAmount > 1 ? `${a.durationAmount} months` : "month"
43
+ ] })
40
44
  ] }),
41
45
  /* @__PURE__ */ i("div", { className: e.benefit, children: [
42
- /* @__PURE__ */ r(n, { name: o.CALENDAR, className: e.benefitIcon }),
46
+ /* @__PURE__ */ r(c, { name: l.CALENDAR, className: e.benefitIcon }),
43
47
  /* @__PURE__ */ r(t, { as: "p", defaultVariant: "bodyXs", children: "Modify or cancel anytime" })
44
48
  ] })
45
49
  ] }) })
@@ -13,5 +13,6 @@ export type TProductPlan = {
13
13
  monthlyPrice?: number;
14
14
  savingsPercentage?: number;
15
15
  duration?: 'one-time' | 'day' | 'month' | 'year';
16
+ durationAmount?: number;
16
17
  featured?: boolean;
17
18
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),o=require("../../components/ComplexImageCarousel/ComplexImageCarousel.cjs.js"),t=require("./longevityPathways.module.css.cjs.js"),r=({view:a,label:n,title:l,carousel:i})=>e.jsxs("section",{className:t.default.root,children:[e.jsx("div",{className:t.default.header,children:e.jsx(s.HighlightedTitle,{title:l,className:t.default.title,defaultVariant:"displayMd",mobileVariant:"headingXl"})}),e.jsx(o.ComplexImageCarousel,{images:i,view:a})]});exports.LongevityPathways=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),r=require("../../components/ComplexImageCarousel/ComplexImageCarousel.cjs.js"),t=require("./longevityPathways.module.css.cjs.js"),n=({view:a,label:i,title:l,carousel:s})=>e.jsxs("section",{className:t.default.root,children:[e.jsx("div",{className:t.default.header,children:e.jsx(o.HighlightedTitle,{title:l,label:i,className:t.default.title,defaultVariant:"displayMd",mobileVariant:"headingXl"})}),e.jsx(r.ComplexImageCarousel,{images:s,view:a})]});exports.LongevityPathways=n;
@@ -1,18 +1,19 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { HighlightedTitle as o } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
3
- import { ComplexImageCarousel as s } from "../../components/ComplexImageCarousel/ComplexImageCarousel.es.js";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { HighlightedTitle as l } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
3
+ import { ComplexImageCarousel as m } from "../../components/ComplexImageCarousel/ComplexImageCarousel.es.js";
4
4
  import a from "./longevityPathways.module.css.es.js";
5
- const p = ({ view: i, label: m, title: t, carousel: r }) => /* @__PURE__ */ l("section", { className: a.root, children: [
5
+ const p = ({ view: i, label: t, title: r, carousel: o }) => /* @__PURE__ */ s("section", { className: a.root, children: [
6
6
  /* @__PURE__ */ e("div", { className: a.header, children: /* @__PURE__ */ e(
7
- o,
7
+ l,
8
8
  {
9
- title: t,
9
+ title: r,
10
+ label: t,
10
11
  className: a.title,
11
12
  defaultVariant: "displayMd",
12
13
  mobileVariant: "headingXl"
13
14
  }
14
15
  ) }),
15
- /* @__PURE__ */ e(s, { images: r, view: i })
16
+ /* @__PURE__ */ e(m, { images: o, view: i })
16
17
  ] });
17
18
  export {
18
19
  p as LongevityPathways
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),g=require("../../../../node_modules/gsap/index.cjs.js"),y=require("../../../../node_modules/gsap/ScrollTrigger.cjs.js"),e=require("./clockImages.module.css.cjs.js"),f=require("../../../../utils/cn/cn.cjs.js"),q=require("react");g.gsap.registerPlugin(y.ScrollTrigger);const s=[{key:"smallSquareImage1",className:e.default.smallSquareImage,to:{x:100,y:60}},{key:"rectImage2",className:e.default.rectImage,to:{x:70,y:70}},{key:"smallSquareImage3",className:e.default.smallSquareImage,to:{x:40,y:60}},{key:"largeSquareImage4",className:e.default.largeSquareImage,to:{x:-110,y:55}},{key:"rectImage5",className:e.default.rectImage,to:{x:-150,y:69}},{key:"smallSquareImage6",className:e.default.smallSquareImage,to:{x:-100,y:9}},{key:"rectImage7",className:e.default.rectImage,to:{x:-65,y:-100}},{key:"smallSquareImage8",className:e.default.smallSquareImage,to:{x:50,y:-100}},{key:"rectImage9",className:e.default.rectImage,to:{x:50,y:-50}},{key:"largeSquareImage10",className:e.default.largeSquareImage,to:{x:56,y:13}}],S=({images:n})=>{const t=q.useRef(null),i=a=>{var c,o,m;const r=(c=t.current)==null?void 0:c.querySelector(`[data-ohealth-image-key="${a}"]`);if(!r)return;const d=((o=s.find(l=>l.key===a))==null?void 0:o.to.x)||0,I=((m=s.find(l=>l.key===a))==null?void 0:m.to.y)||0;g.gsap.fromTo(r,{x:0,y:0},{x:d,y:I,duration:5,ease:"power2.out",scrollTrigger:{trigger:t.current,start:"center center",end:"center center",once:!0,scrub:!1,toggleActions:"play none none reverse"}})};return u.jsx("div",{ref:t,className:e.default.root,children:s.map(({key:a,className:r})=>u.jsx("img",{src:n[a],className:f.cn(e.default.image,r,e.default[a]),"data-ohealth-image-key":a,alt:a,onLoad:()=>i(a)},a))})};exports.ClockImages=S;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("../../../../node_modules/gsap/index.cjs.js"),n=require("../../../../node_modules/gsap/ScrollTrigger.cjs.js"),e=require("./clockImages.module.css.cjs.js"),i=require("../../../../utils/cn/cn.cjs.js"),m=require("react");o.gsap.registerPlugin(n.ScrollTrigger);const g=[{key:"smallSquareImage1",className:e.default.smallSquareImage,to:{x:100,y:60}},{key:"rectImage2",className:e.default.rectImage,to:{x:70,y:70}},{key:"smallSquareImage3",className:e.default.smallSquareImage,to:{x:40,y:60}},{key:"largeSquareImage4",className:e.default.largeSquareImage,to:{x:-110,y:55}},{key:"rectImage5",className:e.default.rectImage,to:{x:-150,y:69}},{key:"smallSquareImage6",className:e.default.smallSquareImage,to:{x:-100,y:9}},{key:"rectImage7",className:e.default.rectImage,to:{x:-65,y:-100}},{key:"smallSquareImage8",className:e.default.smallSquareImage,to:{x:50,y:-100}},{key:"rectImage9",className:e.default.rectImage,to:{x:50,y:-50}},{key:"largeSquareImage10",className:e.default.largeSquareImage,to:{x:56,y:13}}],y=({images:l})=>{const r=m.useRef(null);return m.useEffect(()=>{r.current&&g.forEach(({key:a,to:t})=>{var c;const s=(c=r.current)==null?void 0:c.querySelector(`[data-ohealth-image-key="${a}"]`);s&&o.gsap.fromTo(s,{x:0,y:0},{x:t.x,y:t.y,duration:5,ease:"power2.out",scrollTrigger:{trigger:r.current,start:"center center",end:"center center",once:!0,scrub:!1,toggleActions:"play none none reverse"}})})},[l]),u.jsx("div",{ref:r,className:e.default.root,children:g.map(({key:a,className:t})=>u.jsx("img",{src:l[a],className:i.cn(e.default.image,t,e.default[a]),"data-ohealth-image-key":a,alt:a},a))})};exports.ClockImages=y;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { jsx as g } from "react/jsx-runtime";
3
- import { gsap as n } from "../../../../node_modules/gsap/index.es.js";
4
- import { ScrollTrigger as S } from "../../../../node_modules/gsap/ScrollTrigger.es.js";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { gsap as g } from "../../../../node_modules/gsap/index.es.js";
4
+ import { ScrollTrigger as n } from "../../../../node_modules/gsap/ScrollTrigger.es.js";
5
5
  import e from "./clockImages.module.css.es.js";
6
- import { cn as x } from "../../../../utils/cn/cn.es.js";
7
- import { useRef as f } from "react";
8
- n.registerPlugin(S);
9
- const s = [
6
+ import { cn as u } from "../../../../utils/cn/cn.es.js";
7
+ import { useRef as i, useEffect as y } from "react";
8
+ g.registerPlugin(n);
9
+ const c = [
10
10
  { key: "smallSquareImage1", className: e.smallSquareImage, to: { x: 100, y: 60 } },
11
11
  { key: "rectImage2", className: e.rectImage, to: { x: 70, y: 70 } },
12
12
  { key: "smallSquareImage3", className: e.smallSquareImage, to: { x: 40, y: 60 } },
@@ -17,43 +17,42 @@ const s = [
17
17
  { key: "smallSquareImage8", className: e.smallSquareImage, to: { x: 50, y: -100 } },
18
18
  { key: "rectImage9", className: e.rectImage, to: { x: 50, y: -50 } },
19
19
  { key: "largeSquareImage10", className: e.largeSquareImage, to: { x: 56, y: 13 } }
20
- ], C = ({ images: i }) => {
21
- const t = f(null), u = (a) => {
22
- var o, l, c;
23
- const r = (o = t.current) == null ? void 0 : o.querySelector(`[data-ohealth-image-key="${a}"]`);
24
- if (!r) return;
25
- const I = ((l = s.find((m) => m.key === a)) == null ? void 0 : l.to.x) || 0, y = ((c = s.find((m) => m.key === a)) == null ? void 0 : c.to.y) || 0;
26
- n.fromTo(
27
- r,
28
- { x: 0, y: 0 },
29
- {
30
- x: I,
31
- y,
32
- duration: 5,
33
- ease: "power2.out",
34
- scrollTrigger: {
35
- trigger: t.current,
36
- start: "center center",
37
- end: "center center",
38
- once: !0,
39
- scrub: !1,
40
- toggleActions: "play none none reverse"
20
+ ], p = ({ images: m }) => {
21
+ const r = i(null);
22
+ return y(() => {
23
+ r.current && c.forEach(({ key: a, to: t }) => {
24
+ var l;
25
+ const s = (l = r.current) == null ? void 0 : l.querySelector(`[data-ohealth-image-key="${a}"]`);
26
+ s && g.fromTo(
27
+ s,
28
+ { x: 0, y: 0 },
29
+ {
30
+ x: t.x,
31
+ y: t.y,
32
+ duration: 5,
33
+ ease: "power2.out",
34
+ scrollTrigger: {
35
+ trigger: r.current,
36
+ start: "center center",
37
+ end: "center center",
38
+ once: !0,
39
+ scrub: !1,
40
+ toggleActions: "play none none reverse"
41
+ }
41
42
  }
42
- }
43
- );
44
- };
45
- return /* @__PURE__ */ g("div", { ref: t, className: e.root, children: s.map(({ key: a, className: r }) => /* @__PURE__ */ g(
43
+ );
44
+ });
45
+ }, [m]), /* @__PURE__ */ o("div", { ref: r, className: e.root, children: c.map(({ key: a, className: t }) => /* @__PURE__ */ o(
46
46
  "img",
47
47
  {
48
- src: i[a],
49
- className: x(e.image, r, e[a]),
48
+ src: m[a],
49
+ className: u(e.image, t, e[a]),
50
50
  "data-ohealth-image-key": a,
51
- alt: a,
52
- onLoad: () => u(a)
51
+ alt: a
53
52
  },
54
53
  a
55
54
  )) });
56
55
  };
57
56
  export {
58
- C as ClockImages
57
+ p as ClockImages
59
58
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../components/Button/Button.cjs.js");require("../../components/Icon/Icon.cjs.js");const n=require("../../components/Icon/constants.cjs.js"),h=require("../../components/Typography/Typography.cjs.js"),m=require("./components/StudyCard/StudyCard.cjs.js"),x=require("./components/StudiesSkeleton/StudiesSkeleton.cjs.js"),s=require("./researchStudies.module.css.cjs.js"),f=6,p=({studies:d,hasMoreButton:l,title:o,backButton:r,loading:c,onClickShowMore:u})=>e.jsx("div",{className:s.default.root,children:e.jsxs("div",{className:s.default.container,children:[e.jsxs("div",{className:s.default.header,children:[r&&e.jsx("div",{className:s.default.backButton,children:e.jsx(t.Button,{as:"a",href:r.href,size:"xs",prefixIcon:n.EIconName.ARROW_BACK,variant:"ghost",children:r==null?void 0:r.label})}),e.jsx(h.Typography,{defaultVariant:"displayXs",mobileVariant:"headingLg",children:o})]}),e.jsxs("div",{className:s.default.studies,children:[d.map((a,i)=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(m.StudyCard,{...a})},`${a.title}_${a.link}`)),c&&Array.from({length:f}).map((a,i)=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(x.StudiesSkeleton,{},i)},i))]}),l&&e.jsx("div",{className:s.default.buttonContainer,children:e.jsx(t.Button,{size:"lg",variant:"muted",prefixIcon:n.EIconName.PLUS,onClick:u,children:"show more"})})]})});exports.ResearchStudies=p;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../components/Button/Button.cjs.js");require("../../components/Icon/Icon.cjs.js");const n=require("../../components/Icon/constants.cjs.js"),h=require("../../components/Typography/Typography.cjs.js"),m=require("./components/StudyCard/StudyCard.cjs.js"),f=require("./components/StudiesSkeleton/StudiesSkeleton.cjs.js"),s=require("./researchStudies.module.css.cjs.js"),p=6,x=({studies:d,hasMoreButton:l,title:o,backButton:r,loading:c,onClickShowMore:u})=>e.jsx("div",{className:s.default.root,children:e.jsxs("div",{className:s.default.container,children:[e.jsxs("div",{className:s.default.header,children:[r&&e.jsx("div",{className:s.default.backButton,children:e.jsx(t.Button,{as:"a",href:r.href,size:"xs",prefixIcon:n.EIconName.ARROW_BACK,variant:"ghost",children:r==null?void 0:r.label})}),e.jsx(h.Typography,{defaultVariant:"displayXs",mobileVariant:"headingLg",children:o})]}),e.jsxs("div",{className:s.default.studies,children:[d.map(a=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(m.StudyCard,{...a})},`${a.title}_${a.link}`)),c&&Array.from({length:p}).map((a,i)=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(f.StudiesSkeleton,{},i)},i))]}),l&&e.jsx("div",{className:s.default.buttonContainer,children:e.jsx(t.Button,{size:"lg",variant:"muted",prefixIcon:n.EIconName.PLUS,onClick:u,children:"show more"})})]})});exports.ResearchStudies=x;