@everlywell/consumer-ui 1.37.7 → 1.39.0

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 (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +2 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -27,4 +27,4 @@ Check the top-level render call using <`+o+">.")}return r}}function nt(e,r){{if(
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Ve,te,Ft,te),lt[te+Ve]=!0}}return e===a?kt(L):Tt(L),L}}function Lt(e,r,o){return it(e,r,o,!0)}function Dt(e,r,o){return it(e,r,o,!1)}var It=Dt,Bt=Lt;je.Fragment=a,je.jsx=It,je.jsxs=Bt}()),je}process.env.NODE_ENV==="production"?Ge.exports=Ot():Ge.exports=Pt();var t=Ge.exports;const ze=60,st=6,Mt=l=>{const{activeStepIndex:i,hideIndicators:s=!1,steps:a,stepperTheme:c={light:"eggplant.light",base:"eggplant.base"}}=l,{activeStep:u,setActiveStep:p}=n.useSteps({index:i,count:a.length});return w.useEffect(()=>{p(i)},[i,p]),t.jsx(n.Box,{position:"relative",width:"100%","data-testid":"stepper",children:t.jsx(n.Stepper,{role:"progressbar",index:u,width:"100%",display:"flex",flexWrap:"nowrap",children:a.map((y,x)=>{const b=u===x,d=x===0,E=x===a.length-1,C=u>x;let g=`${ze}px`;const _=`calc(100% - ((${ze*(a.length-1)}px) - (${a.length-1} * ${st*2}px)))`;return b?g=_:(d||E)&&(g=`${ze-st}px`),t.jsx(n.Box,{width:g,opacity:C||b?1:.2,paddingRight:E?"0":"6px",paddingLeft:d?"0":"6px",transition:"width 0.4s ease-in-out, opacity 0.4s ease-in-out",children:t.jsx(n.Box,{paddingTop:s?2:5,position:"relative",width:"100%",children:t.jsx(n.Box,{width:"100%",position:"absolute",top:"0",backgroundColor:C?c.light:c.base,height:s?"4px":"8px",borderRadius:"4",left:"0"})})},`step-${x}`)})})})},$t=w.memo(Mt),Ht=({children:l,...i})=>t.jsx(Z.Text,{color:"tints.uiGrey",fontSize:["md",null,null,"lg"],...i,children:l}),de=(l,i)=>{const s=(l==null?void 0:l.startsWith("http"))||(l==null?void 0:l.startsWith("mailto"));return i&&!s?{to:l}:{href:l}},Le=w.forwardRef((l,i)=>{const{label:s,additionalContent:a,mainTextFontSize:c,linkComponent:u,href:p,...y}=l,x=u||n.Link,b=de(p,!!u);return t.jsxs(n.Box,{ref:i,as:x,display:"flex",alignItems:"center",gap:[null,null,null,1],justifyContent:[null,null,null,"space-between"],paddingY:[3,null,null,0],color:"tints.black",_hover:{color:"viridian.base",textDecoration:"none"},borderBottom:["1px",null,null,"unset"],borderColor:["tints.cream",null,null,"unset"],width:["100%",null,null,"fit-content"],cursor:"pointer",...b,...y,children:[t.jsx(n.Icon,{display:["none",null,null,"block"],as:I.CaretRight,fontSize:"lg",color:"viridian.light",role:"img","aria-label":"Caret right icon",weight:"bold"}),t.jsxs(n.Flex,{alignItems:"center",gap:"1",width:["100%",null,null,"auto"],children:[t.jsx(n.Text,{fontSize:[c||"xl",null,null,"lg"],fontWeight:"medium",children:s}),a&&(typeof a=="string"?t.jsx(n.Text,{fontSize:["xl",null,null,"lg"],fontWeight:"medium",color:"tints.uiGrey",sx:{"a:hover &":{color:"viridian.base"}},children:a}):a),t.jsx(n.Icon,{display:["block",null,null,"none"],as:I.CaretRight,fontSize:"2xl",color:"tints.uiGrey",role:"img","aria-label":"Caret right icon",marginLeft:"auto"})]})]})}),we=w.forwardRef((l,i)=>{const{children:s,isSelected:a,...c}=l,u=l.backgroundColor||(a?"tints.lightCream":"transparent");return t.jsx(n.Button,{ref:i,borderRadius:"full",backgroundColor:u,fontSize:"lg !important",fontWeight:"normal",color:"tints.black",sx:{"&[href]":{textDecoration:"none"}},_before:{content:'""',position:"absolute",top:[null,null,null,-6],right:[null,null,null,-2],bottom:[null,null,null,-6],left:[null,null,null,-2]},_hover:{backgroundColor:u,textDecoration:"none",filter:"brightness(0.95)"},...c,children:s})}),pt=({title:l,description:i,imageSrc:s,imageElement:a,button:c,backgroundColor:u="viridian.wash",onClick:p,href:y,linkComponent:x})=>{const C=x||n.Link,g=de(y,!!x),_=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0});return t.jsxs(n.Flex,{direction:["row",null,null,"column"],alignItems:["center"],borderRadius:"xl",overflow:"hidden",height:["80px",null,null,"272px"],backgroundColor:u,onClick:p,"data-testid":"spotlight-card",position:"relative",transition:"box-shadow 0.2s ease-in-out",border:"1px solid",borderColor:"transparent",minWidth:["100%",null,null,"320px"],maxWidth:["100%",null,null,"380px"],_hover:{boxShadow:"lg",textDecoration:"none",border:"1px solid",borderColor:"tints.white"},as:_?n.Flex:C,..._?{}:g,children:[t.jsx(n.Box,{width:["72px",null,null,"100%"],height:["100%",null,null,"188px"],sx:{img:{height:_?"188px":"100%"}},children:s?t.jsx(n.Image,{src:s,objectFit:"cover",width:"100%",alt:"","data-testid":"spotlight-card-image"}):t.jsx(n.Box,{height:[80,null,null,188],overflow:"hidden",children:a})}),t.jsxs(n.Flex,{direction:["column",null,null,"row"],justifyContent:[null,null,null,"space-between"],alignItems:["left",null,null,"center"],padding:"4",height:["80px",null,null,"84px"],width:"100%",bottom:[null,null,null,"0"],backgroundColor:[null,null,null,`${u}CC`],backdropFilter:[null,null,null,"blur(8px)"],flex:"1",gap:[null,null,null,3],children:[t.jsxs(n.Flex,{direction:"column",justifyContent:"center",height:"100%",children:[t.jsx(n.Text,{fontSize:"lg",fontWeight:"medium",color:"tints.black",children:l}),t.jsx(n.Text,{fontSize:"sm",color:"tints.darkGrey",children:i})]}),_?t.jsx(n.Box,{children:c}):null]})]})},ne=l=>t.jsx(n.IconButton,{size:"sm",width:["40px",null,null,"46px"],height:["40px",null,null,"46px"],padding:["2 !important",null,null,"3 !important"],colorScheme:"whiteCS",backgroundColor:"tints.cream",sx:{svg:{width:"24px",height:"24px"}},_hover:{backgroundColor:"tints.cream",filter:"brightness(0.95)"},...l}),xt=({color:l=n.theme.colors.viridian.base,width:i})=>t.jsx(Z.Box,{as:"svg",width:i,height:"auto",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Everlywell Logo",children:t.jsx("g",{id:"Everlywell Logo",children:t.jsx("path",{fill:l,id:"Everlywell Logo_2",fillRule:"evenodd",clipRule:"evenodd",d:"M54.8224 1V17.8352H52.4272V1H54.8224ZM5.65731 14.992C4.9835 14.4474 4.59261 13.726 4.48231 12.8278H13.7822C13.9984 10.4829 13.5723 8.70006 12.5039 7.47915C11.4322 6.25824 9.93769 5.64945 8.01698 5.64945C6.23518 5.64945 4.78896 6.22479 3.67214 7.38216C2.55841 8.5395 2 9.92767 2 11.8377C2 13.7476 2.56171 15.273 3.68501 16.4136C4.80831 17.5542 6.30612 18.1229 8.18163 18.1229C9.11125 18.1229 10.0216 17.9489 10.9125 17.5944C11.8034 17.2431 12.533 16.7447 13.1075 16.1025L11.5517 14.5371C11.2095 14.9217 10.7253 15.2294 10.099 15.4636C9.46959 15.6944 8.84662 15.8115 8.22684 15.8115C7.18735 15.8115 6.33197 15.5372 5.65731 14.992ZM10.4671 8.60977C11.0772 9.10817 11.416 9.81395 11.4774 10.7305H4.52751C4.71152 9.81395 5.12475 9.10817 5.77027 8.60977C6.41589 8.11136 7.18735 7.86384 8.08473 7.86384C9.05966 7.86384 9.85696 8.11136 10.4671 8.60977ZM22.1465 17.8819L27.0047 5.93699H24.3771L22.6565 10.2486L20.8424 15.2828L18.8217 9.76697L17.2884 5.93699H14.6382L19.5189 17.8819H22.1465ZM30.3737 12.8244C30.4835 13.7242 30.8741 14.4467 31.5487 14.992C32.2234 15.5372 33.0788 15.8115 34.1181 15.8115C34.7379 15.8115 35.361 15.6944 35.9905 15.4636C36.6166 15.2294 37.1009 14.9217 37.4431 14.5371L38.999 16.1025C38.4244 16.7447 37.6948 17.2431 36.8039 17.5944C35.9129 17.9489 35.0027 18.1229 34.0729 18.1229C32.1975 18.1229 30.6997 17.5542 29.5764 16.4136C28.453 15.273 27.8914 13.7476 27.8914 11.8377C27.8914 9.92767 28.4498 8.5395 29.5635 7.38216C30.6804 6.22479 32.1265 5.64945 33.9084 5.64945C35.829 5.64945 37.3236 6.25824 38.3952 7.47915C39.4638 8.70006 39.8899 10.4829 39.6736 12.8278H30.3769L30.3737 12.8244ZM37.3688 10.7305C37.3075 9.81395 36.9685 9.10817 36.3584 8.60977C35.7483 8.11136 34.951 7.86384 33.9762 7.86384C33.0788 7.86384 32.3073 8.11136 31.6617 8.60977C31.0161 9.10817 30.6029 9.81395 30.4189 10.7305H37.3688ZM44.5032 7.5263L44.3418 5.96085H44.3385H42.108V17.8355H44.5032V11.4031C44.5032 10.3595 44.8001 9.5567 45.3877 8.99473C45.9751 8.43278 46.7112 8.15181 47.5956 8.15181C48.3703 8.15181 49.0417 8.39264 49.6163 8.87432L50.7073 6.70677C49.9811 6.03445 49.0353 5.6966 47.8732 5.6966C46.2914 5.6966 45.1681 6.30539 44.5032 7.5263ZM60.3782 12.3193V5.96054H57.983V12.3428C57.983 14.1089 58.4286 15.5004 59.3195 16.5106C60.2104 17.5241 61.3789 18.0292 62.8186 18.0292C64.552 18.0292 65.8787 17.387 66.7923 16.1025V18.1262C66.7923 19.2669 66.4824 20.1499 65.8626 20.7754C65.2429 21.401 64.494 21.7154 63.6094 21.7154C61.8889 21.7154 60.8754 20.9661 60.5654 19.4742H58.2187C58.3252 20.9326 58.8644 22.0532 59.8327 22.8326C60.8011 23.612 62.1214 24 63.6546 24C65.188 24 66.4727 23.5049 67.5121 22.5081C68.5515 21.5147 69.0712 20.0697 69.0712 18.1731V5.96054H66.6761V12.1521C66.6761 13.1623 66.3791 14.0153 65.7819 14.7043C65.188 15.3967 64.4681 15.7412 63.4933 15.7412C62.5184 15.7412 61.7566 15.4268 61.2047 14.8013C60.6526 14.1725 60.3782 13.3463 60.3782 12.3193ZM81.5989 5.93699L84.3427 15.2828L87.1768 5.93699H89.8496L85.8275 17.8819H83.0385L81.6892 13.9315L80.5724 9.79039L79.4328 13.9315L78.0836 17.8819H75.2945L71.2498 5.93699H73.9453L76.7795 15.2828L79.5232 5.93699H81.5924H81.5989ZM94.65 14.992C93.9754 14.4467 93.5848 13.7242 93.475 12.8244L93.4847 12.8278H102.781C102.998 10.4829 102.572 8.70006 101.503 7.47915C100.431 6.25824 98.9368 5.64945 97.0162 5.64945C95.2343 5.64945 93.785 6.22479 92.668 7.38216C91.5544 8.5395 90.9959 9.92767 90.9959 11.8377C90.9959 13.7476 91.5576 15.273 92.6809 16.4136C93.8043 17.5542 95.3021 18.1229 97.1775 18.1229C98.1073 18.1229 99.0175 17.9489 99.9084 17.5944C100.799 17.2431 101.529 16.7447 102.103 16.1025L100.544 14.5371C100.202 14.9217 99.7212 15.2328 99.0918 15.4636C98.4623 15.6944 97.8393 15.8115 97.2196 15.8115C96.1802 15.8115 95.3247 15.5372 94.65 14.992ZM99.4598 8.60977C100.07 9.10817 100.409 9.81395 100.47 10.7305H93.5202C93.7042 9.81395 94.1175 9.10817 94.763 8.60977C95.4086 8.11136 96.1802 7.86384 97.0774 7.86384C98.0524 7.86384 98.8465 8.11136 99.4598 8.60977ZM107.698 1V17.8352H105.303V1H107.698ZM113.53 17.8352V1H111.135V17.8352H113.53Z"})})}),Nt=(l,i)=>{let s;return(...a)=>{s&&clearTimeout(s),s=setTimeout(()=>{l(...a)},i)}},Ye=l=>l.toLowerCase().replace(/['']/g,"").replace(/[^a-z0-9]/g,""),Wt=(l,i)=>{l.length<i.length&&([l,i]=[i,l]);let s=Array(i.length+1).fill(0),a=Array(i.length+1).fill(0);for(let c=0;c<=i.length;c++)s[c]=c;for(let c=1;c<=l.length;c++){a[0]=c;for(let u=1;u<=i.length;u++){const p=l[c-1]===i[u-1]?0:1;a[u]=Math.min(a[u-1]+1,s[u]+1,s[u-1]+p)}[s,a]=[a,s]}return s[i.length]},Be=(l,i,s=.6)=>{if(l.length<=3||i.length<=3)return l.includes(i)||i.includes(l);const a=Wt(l,i),c=Math.max(l.length,i.length);return 1-a/c>=s},ut=(l,i)=>{const s=l.split(/\s+/);return i.length<=4?s.some(a=>a.includes(i)):s.some(a=>{if(Be(a,i))return!0;if(a.length>=i.length)for(let c=0;c<=a.length-i.length;c++){const u=a.slice(c,c+i.length+1);if(Be(i,u))return!0}return!1})},Ue="nav-drawer-hover",Ze="nav-drawer-animation-start",Ke="nav-drawer-animation-end",ct=l=>{window.dispatchEvent(new CustomEvent(Ue,{detail:{isHovering:l},bubbles:!0,cancelable:!0}))},dt=l=>{window.dispatchEvent(new CustomEvent(l,{bubbles:!0,cancelable:!0}))},Vt=(l=!1,i=!1,s=!1)=>l||!i?"column":s?"row":"row-reverse",zt=Ie.motion(n.DrawerContent),Yt=Ie.motion(n.DrawerOverlay),De=({isOpen:l=!1,onClose:i,title:s,navDrawerLinks:a,bottomNavButtons:c,spotlightCards:u,bottomButton:p,hasBackButton:y=!0,onBackClick:x,hasOnlySpotlightCards:b=!1,hasSearch:d=!1,onSearch:E=()=>({}),topOffset:C})=>{var G,J;const g=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0}),_=g?"top":"right",[P,Y]=w.useState(0),[F,T]=w.useState(!1),q=()=>{Y(D=>D+1)},M=w.useCallback(Nt(D=>{E(D),q()},100),[]);w.useEffect(()=>{l&&(T(!0),dt(Ze))},[l]);const z=()=>{l||(T(!1),i()),dt(Ke)};return t.jsx(n.Drawer,{isOpen:F||l,onClose:()=>{F&&g||i()},placement:_,blockScrollOnMount:!1,autoFocus:!1,...g?{styleConfig:{baseStyle:{...n.theme.components.Drawer.baseStyle,dialogContainer:{...(J=(G=n.theme.components.Drawer)==null?void 0:G.baseStyle)==null?void 0:J.dialogContainer,top:g?`${C}px`:void 0,zIndex:["overlay"]}}}}:{},children:t.jsx(Ie.AnimatePresence,{children:l?t.jsxs(t.Fragment,{children:[t.jsx(Yt,{backgroundColor:"tints.black",top:["0",null,null,`${C}px`],opacity:g?void 0:"0.4 !important",...g?{initial:{opacity:0},animate:{opacity:.4},exit:{opacity:0},transition:{duration:.2,delay:.15,ease:"easeOut"}}:{}}),t.jsxs(zt,{onClick:D=>{const $=D.target.closest("a");$&&$.href===window.location.href&&i()},onMouseEnter:()=>{g&&ct(!0)},onMouseLeave:D=>{g&&(!d||d&&(D.target===D.currentTarget||!D.currentTarget.contains(D.target)&&!F))&&ct(!1)},paddingTop:"4",paddingX:[4,null,null,12],paddingBottom:"24",overflow:["auto",null,null,"hidden"],maxHeight:"100vh",position:"relative",top:g?`${C}px !important`:void 0,onAnimationComplete:z,boxShadow:"none",...g?{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3}}:{},children:[!d&&g?null:t.jsxs(n.DrawerHeader,{padding:"0",flexDirection:d?"column":"row",gap:d?"4":"0",children:[g?null:t.jsxs(n.Flex,{width:"100%",justifyContent:"space-between",alignItems:"center",children:[y?t.jsx(ne,{icon:t.jsx(I.CaretLeft,{}),onClick:()=>{x&&x()},"aria-label":"Back"}):null,t.jsx(n.Text,{color:"tints.uiGrey",fontSize:["xl",null,null,"lg"],children:s}),t.jsx(ne,{icon:t.jsx(I.X,{}),onClick:i,"aria-label":"Close"})]}),d&&t.jsxs(Z.InputGroup,{width:"100%",children:[t.jsx(Z.Input,{onChange:D=>{M(D.target.value)},placeholder:"Search",autoFocus:!0,width:"full",type:"search"}),t.jsx(Z.InputRightElement,{pointerEvents:"none",children:t.jsx(Z.Icon,{as:I.MagnifyingGlass,color:"gray.500"})})]})]}),t.jsx(n.DrawerBody,{paddingX:"0",paddingBottom:[6,null,null,4],"data-testid":`navbar-drawer-body-${s.toLowerCase()}`,children:t.jsxs(Ie.motion.div,{...g?{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.5,delay:.2,ease:[.4,0,.2,1],exit:{duration:.5,delay:.2,ease:[.4,0,.2,1]}}}:{},style:{display:"flex",flexDirection:Vt(b,g,d),gap:"24px",justifyContent:"space-between"},children:[u?t.jsx(n.Box,{gap:[3,null,null,6],display:"flex",justifyContent:[null,null,null,"center"],sx:{flexWrap:"wrap",flexDirection:["column",null,null,"row"]},children:u}):null,t.jsxs(n.Flex,{position:[null,null,null,"relative"],flexDirection:"column",gap:"6",width:["100%",null,null,d?null:"auto"],children:[a?t.jsx(n.Box,{children:a}):null,c&&!g?t.jsx(n.Box,{children:c}):null,p?t.jsx(n.Box,{width:["100%"],position:[null,null,null,"absolute"],bottom:[null,null,null,0],children:p}):null]})]},P)})]})]}):null})})},gt=({desktopTopButtons:l,kitRegistrationElement:i,profileElement:s,cartElement:a,onSearchClick:c,onMenuClick:u,hasSearch:p=!1,logoLink:y="https://www.everlywell.com",setTopOffset:x,linkComponent:b,onLogoClick:d})=>{const E=w.useRef(null),[C,g]=w.useState(!1);w.useEffect(()=>{const P=()=>g(!0),Y=()=>g(!1);return window.addEventListener(Ze,P),window.addEventListener(Ke,Y),()=>{window.removeEventListener(Ze,P),window.removeEventListener(Ke,Y)}},[]);const _=w.useCallback(()=>{if(E.current){const P=E.current.getBoundingClientRect();x(P.bottom)}},[]);return w.useEffect(()=>{_()},[_]),t.jsx(n.Box,{ref:E,paddingY:"4",paddingX:[4,null,null,12],borderBottom:"1px solid",borderColor:"tints.lightCream",backgroundColor:"tints.white",position:"sticky",top:"0",width:"100%",zIndex:["sticky",null,null,C?"modal":"sticky"],onMouseEnter:_,children:t.jsxs(n.Flex,{justifyContent:"space-between",alignItems:"center",children:[t.jsxs(n.Flex,{alignItems:"center",gap:"5",children:[t.jsx(n.Box,{"aria-label":"Go to homepage",onClick:d,as:b||n.Link,...de(y,!!b),children:t.jsx(xt,{width:"116px"})}),t.jsx(n.Flex,{display:["none",null,null,"flex"],children:l})]}),t.jsxs(n.Flex,{alignItems:"center",gap:"2",children:[t.jsx(n.Box,{display:["none",null,null,"block"],children:i}),p?t.jsx(ne,{"aria-label":"Search",icon:t.jsx(n.Icon,{as:I.MagnifyingGlass}),onClick:c}):null,a,t.jsx(n.Box,{display:["flex",null,null,"none"],children:t.jsx(ne,{icon:t.jsx(I.List,{}),"aria-label":"menu","data-testid":"menu-button",onClick:u})}),t.jsx(n.Box,{display:["none",null,null,"block"],children:s})]})]})})},vt=({count:l=0,...i})=>t.jsxs(n.Box,{position:"relative",display:"inline-block",children:[t.jsx(ne,{icon:t.jsx(I.Basket,{}),...i}),l>0&&t.jsx(n.Box,{display:"flex",minWidth:"20px",height:"20px",py:"4px",px:"6px",justifyContent:"center",alignItems:"center",position:"absolute",right:"-4px",top:"-4px",borderRadius:"32px",background:"viridian.base",color:"white",fontSize:"xs",fontWeight:"normal",children:l})]}),Gt=({numDesktopLinks:l=5,showPromoButton:i=!1})=>t.jsx(n.VStack,{spacing:0,align:"stretch",children:t.jsx(n.Box,{paddingY:4,paddingX:6,borderBottomWidth:"1px",borderColor:"tints.lightCream",children:t.jsxs(n.Flex,{justify:"space-between",align:"center",children:[t.jsx(n.Skeleton,{w:"120px",h:"48px"}),t.jsxs(n.HStack,{spacing:8,marginLeft:12,display:["none",null,null,"flex"],"data-testid":"desktop-nav",children:[Array.from({length:l}).map((s,a)=>t.jsx(n.Skeleton,{width:"90px",height:"48px"},a)),i&&t.jsx(n.Skeleton,{width:"110px",height:"48px",borderRadius:"full"})]}),t.jsxs(n.HStack,{spacing:4,ml:"auto",children:[t.jsx(n.SkeletonCircle,{width:"120px",height:"48px",display:["none",null,null,"block"],"data-testid":"register-kit"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," "]})]})})}),Ut=({source:l,onSearchCallback:i,isActive:s})=>{const[a,c]=w.useState(""),[u,p]=w.useState([]),y=(d,E)=>{if(!d)return[];const g=Ye(d).split(/\s+/);return E.filter(_=>{const P=Ye(_.label);if(g.some(M=>ut(P,M)))return!0;const F=P.split(/\s+/),T=g.some(M=>F.some(z=>z.includes(M)||Be(M,z))),q=typeof _.additionalContent=="string"&&g.some(M=>{const z=Ye(_.additionalContent);return ut(z,M)||z.split(/\s+/).some(G=>G.includes(M)||Be(M,G))});return T||q}).sort((_,P)=>_.label.localeCompare(P.label))},x=d=>{if(c(d),!d){p([]);return}const E=y(d,l);p(E),i&&i(d,E)},b=()=>{c(""),p([])};return w.useEffect(()=>{s||(c(""),p([]))},[s]),{query:a,results:u,handleClose:b,handleSearch:x}},Zt=l=>{const i=new Set;return l.reduce((s,a)=>{var u;const c=((u=a.sections)==null?void 0:u.reduce((p,y)=>{const x=y.links.filter(b=>i.has(b.label)||b.isSearchable!==!0?!1:(i.add(b.label),!0));return[...p,...x]},[]))??[];return[...s,...c]},[])},Kt=({categories:l=[],onCartClick:i,mainCategoryLabel:s="Menu",logoLink:a="https://www.everlywell.com",hasSearch:c=!0,onSearchClick:u,registrationUrl:p,profileUrl:y="https://secure.everlywell.com/login",mobileBottomButtons:x=[],numberOfCartItems:b=0,linkComponent:d,onSearchCallback:E,onLinkClick:C,onCategoryOpen:g,onMobileMenuOpen:_,onBackToMainMenu:P,onRegisterKitClick:Y,onProfileClick:F,onLogoClick:T,shopAllProductsUrl:q,onShopAllProductsClick:M})=>{var Q,ge,ve;const[z,G]=w.useState(!1),[J,D]=w.useState(!1),[R,$]=w.useState(null),[Ce,fe]=w.useState(!1),[W,K]=w.useState(!1),[X,ye]=w.useState(0),Ee=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0})??!1;w.useEffect(()=>{ie(),$(null)},[Ee]);const{query:Se,results:re,handleSearch:Re}=Ut({source:Zt(l),onSearchCallback:E,isActive:J}),he=re.length>0,le=d||n.Link,_e=de(q,!!d),Fe=Se&&t.jsxs(n.Flex,{gap:he?"6":0,direction:"column",children:[he?t.jsx(n.Text,{color:"tints.uiGrey",children:`${re.length} Results`}):t.jsxs(n.Flex,{direction:"column",gap:"6",alignItems:"flex-start",children:[t.jsx(n.Text,{color:"tints.uiGrey",children:"We didn't find what you were looking for."}),t.jsx(n.Button,{as:le,onClick:M,_hover:{textDecoration:"none"},width:["100%",null,null,"auto"],..._e,children:"Shop all products"})]}),t.jsx(n.Grid,{columns:[1,1,1,4],children:re.map((f,B)=>t.jsx(n.GridItem,{children:t.jsx(Le,{href:f.href,label:f.label,additionalContent:f==null?void 0:f.additionalContent,linkComponent:d})},`${f.label}-${B}`))})]}),ie=()=>{G(!1),$(null)},U=f=>"href"in f,pe=f=>{U(f)?C==null||C(f.label):$(f)},oe=f=>{fe(!0),D(!1),$(null),!U(f)&&(f.sections||f.spotlightCards)&&$(f)},xe=()=>{fe(!1)};w.useEffect(()=>{const f=B=>{K(B.detail.isHovering)};return window.addEventListener(Ue,f),()=>{window.removeEventListener(Ue,f)}},[]),w.useEffect(()=>{!Ce&&!W&&($(null),D(!1))},[Ce,W]),w.useEffect(()=>{let f=window.location.href;const B=()=>{const A=window.location.href;A!==f&&(f=A,ie(),$(null))},H=setInterval(B,100);return window.addEventListener("popstate",B),()=>{window.removeEventListener("popstate",B),clearInterval(H)}},[]);const ae=l==null?void 0:l.map((f,B)=>t.jsx(we,{onMouseEnter:()=>{oe(f),g==null||g(f.label)},onMouseLeave:xe,isSelected:(R==null?void 0:R.label)===f.label,as:U(f)&&le?le:n.Link,href:U(f)?f.href:void 0,onClick:U(f)?()=>C==null?void 0:C(f.label):void 0,...f.buttonProps,children:f.label},`${f.label}-${B}`)),Ae=(Q=l.filter(f=>!U(f)&&f.isMobileTopLink!==!1))==null?void 0:Q.map((f,B)=>{const H=f;return t.jsx(n.Box,{onClick:()=>{pe(H),g==null||g(H.label)},children:t.jsx(Le,{label:H.label,role:"link",additionalContent:H.additionalContent,mainTextFontSize:"3xl",linkComponent:d})},`${H.label}-${B}`)}),Te=t.jsxs(t.Fragment,{children:[t.jsx(we,{as:n.Link,href:y,width:"100%",backgroundColor:"tints.cream",onClick:F,children:t.jsxs(n.Flex,{gap:"2",children:["My Everly",t.jsx(n.Icon,{as:I.User,size:24})]})},"my-everly"),t.jsx(we,{as:n.Link,width:"100%",href:p,backgroundColor:"tints.cream",onClick:Y,children:t.jsxs(n.Flex,{gap:"2",children:["Register kit",t.jsx(n.Icon,{as:I.QrCode,size:24})]})},"register-kit")]}),Oe=t.jsxs(n.Flex,{gap:"2",flexDirection:"column",children:[x,Te]}),Pe=R?t.jsx(n.Flex,{direction:["column",null,null,"row"],gap:"8",children:(ge=R==null?void 0:R.sections)==null?void 0:ge.map((f,B)=>{const H=[];for(let A=0;A<f.links.length;A+=3)H.push(f.links.slice(A,A+3));return t.jsxs(n.Box,{children:[t.jsx(n.Text,{fontSize:"md",color:"tints.uiGrey",marginBottom:[0,null,null,6],children:f.title}),t.jsx(n.Flex,{flexDirection:["column",null,null,"row"],gap:[null,null,null,8],children:H==null?void 0:H.map((A,Me)=>t.jsx(n.Flex,{flexDirection:["column"],gap:[null,null,null,5],marginLeft:[null,null,null,-2],children:A==null?void 0:A.map((ee,ke)=>t.jsx(Le,{label:ee.label,href:ee.href,additionalContent:ee.additionalContent,linkComponent:d,onClick:()=>C==null?void 0:C(ee.label)},`${ee.label}-${ke}`))},Me))})]},`${f.title}-${B}`)})}):null,se=R!=null&&R.spotlightCards?(ve=R.spotlightCards)==null?void 0:ve.map((f,B)=>t.jsx(pt,{...f},`${f.title}-${B}`)):t.jsx(n.Box,{});return t.jsxs(t.Fragment,{children:[t.jsx(gt,{desktopTopButtons:ae,kitRegistrationElement:t.jsx(we,{as:n.Link,href:p,onClick:Y,backgroundColor:"tints.cream",children:"Register Kit"}),profileElement:t.jsx(n.Link,{href:y,"aria-label":"login",onClick:F,children:t.jsx(ne,{icon:t.jsx(n.Icon,{as:I.User}),"aria-label":"Profile"})}),cartElement:t.jsx(vt,{"aria-label":"Cart",count:b,onClick:i}),onSearchClick:()=>{D(!J),u==null||u()},onMenuClick:()=>{G(!0),_==null||_()},hasSearch:c,logoLink:a,linkComponent:d,onLogoClick:T,setTopOffset:ye}),t.jsxs(n.Box,{position:"relative",zIndex:"modal",children:[t.jsx(De,{isOpen:z,onClose:ie,title:s,navDrawerLinks:Ae,bottomNavButtons:Oe,hasBackButton:!1,topOffset:X}),t.jsx(De,{isOpen:!!R,onClose:()=>{ie(),$(null)},title:(R==null?void 0:R.label)||"",navDrawerLinks:Pe,onBackClick:()=>$(null),spotlightCards:se,hasOnlySpotlightCards:R==null?void 0:R.hasOnlySpotlightCards,bottomButton:R==null?void 0:R.bottomButton,topOffset:X}),t.jsx(De,{isOpen:J,onClose:()=>D(!1),title:"Search",navDrawerLinks:Fe,onSearch:Re,hasSearch:!0,hasBackButton:!1,topOffset:X})]})]})},ft=({links:l,linkComponent:i,onLinkClick:s})=>{const a=i||n.Link,c=u=>{s&&s(u)};return t.jsx(n.Flex,{direction:"column",gap:6,children:l.map(u=>t.jsx(n.Text,{as:a,color:"white",size:"lg",_hover:{color:"viridian.lighter",textDecoration:"none"},onClick:()=>c(u.label),...de(u.href,!!i),children:u.label},u.label))})},Xt=({title:l,links:i,isLast:s})=>{const a=s?"transparent":`${n.theme.colors.viridian.lighter}20`;return i?t.jsx(n.AccordionItem,{borderColor:a,children:({isExpanded:c})=>t.jsxs(t.Fragment,{children:[t.jsxs(n.AccordionButton,{paddingX:0,paddingY:4,_hover:{bg:"transparent"},children:[t.jsx(n.Text,{color:"viridian.lighter",size:"lg",flex:"1",textAlign:"left",children:l}),t.jsx(n.Icon,{as:I.CaretDown,size:"sm",color:"viridian.lighter",transform:c?"rotate(-180deg)":"rotate(0deg)",transition:"transform 0.3s ease"})]}),t.jsx(n.AccordionPanel,{pb:4,px:0,children:i})]})}):null},Jt=({title:l,links:i})=>i?t.jsxs(n.Box,{children:[t.jsx(n.Text,{color:"viridian.lighter",mb:6,fontSize:"lg",children:l}),i]}):null,Qt=({sections:l,linkComponent:i,onLinkClick:s})=>Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!0,desktop:!0})?t.jsx(n.Flex,{justify:"space-between",align:"flex-start",children:t.jsx(n.Flex,{gap:120,children:l.map(({title:c,links:u})=>t.jsx(Jt,{title:c,links:t.jsx(ft,{links:u,linkComponent:i,onLinkClick:s})},c))})}):t.jsx(n.Accordion,{allowMultiple:!0,defaultIndex:[0],width:"100%",display:"flex",flexDirection:"column",children:l.map(({title:c,links:u},p)=>t.jsx(Xt,{title:c,links:t.jsx(ft,{links:u,linkComponent:i,onLinkClick:s}),isLast:p===l.length-1},c))}),ht={instagram:I.InstagramLogo,linkedin:I.LinkedinLogo,facebook:I.FacebookLogo,tiktok:I.TiktokLogo,x:I.XLogo},qt=({socialLinks:l,onEmailSubmit:i,socialMediaLabel:s,newsletterLabel:a,onLinkClick:c})=>{const[u,p]=w.useState(""),y=()=>{u&&i&&(i(u),p(""))},x=d=>{d.key==="Enter"&&y()},b=d=>{c&&c(d)};return t.jsxs(n.Box,{width:["100%",null,null,"440px"],children:[t.jsxs(n.Box,{mb:[8,10],children:[t.jsx(n.Text,{color:"viridian.lighter",mb:6,size:"lg",children:a}),t.jsxs(n.InputGroup,{children:[t.jsx(n.Input,{placeholder:"Enter your email",bg:"transparent",border:"1px solid",borderColor:"viridian.lighter",color:"viridian.lighter",_placeholder:{color:"viridian.lighter"},opacity:.66,height:"52px",pr:"48px",value:u,onChange:d=>p(d.target.value),onKeyPress:x}),t.jsx(n.InputRightElement,{h:"52px",pr:4,children:t.jsx(n.Icon,{as:I.ArrowRight,color:"viridian.lighter",width:"24px",height:"24px",opacity:.66,cursor:"pointer",onClick:y,"data-testid":"arrow-right-icon",role:"button","aria-label":"Submit"})})]})]}),t.jsxs(n.Box,{children:[t.jsx(n.Text,{color:"viridian.lighter",marginBottom:4,size:"lg",children:s}),t.jsx(n.Flex,{gap:3,children:l==null?void 0:l.map(d=>t.jsx(n.Link,{href:d.href,target:"_blank",rel:"noopener noreferrer","aria-label":d.name,onClick:()=>b(d.name),children:ht[d.name.toLowerCase()]&&t.jsx(n.Icon,{as:ht[d.name.toLowerCase()],color:"white",width:["48px",null,"24px",null],height:["48px",null,"24px",null]})},d.name))})]})]})},en=({links:l,linkComponent:i,onLinkClick:s})=>{const a=i||n.Link,c=p=>{s&&s(p)},u=l==null?void 0:l.map(p=>t.jsx(n.Text,{as:a,color:"viridian.lighter",size:"sm",_hover:{color:"white",textDecoration:"none"},onClick:()=>c(p.label),...de(p.href,!!i),children:p.label},p.label));return t.jsxs(n.Flex,{direction:["column","column","row"],justify:"space-between",align:["flex-start","flex-start","center"],gap:[6,6,0],children:[t.jsx(n.Flex,{direction:"row",flexWrap:"wrap",gap:[4,6,10],width:["100%","auto"],children:u}),t.jsxs(n.Text,{color:"viridian.lighter",fontSize:"sm",children:["© Everlywell ",new Date().getFullYear()]})]})},tn=w.forwardRef(({navigationSections:l=[],disclaimer:i,newsletterLabel:s,socialMediaLabel:a,socialLinks:c,complianceLinks:u,linkComponent:p,onEmailSubmit:y,additionalContent:x,onLinkClick:b,onSocialMediaClick:d},E)=>t.jsx(n.Box,{as:"footer",bg:"viridian.dark",py:[6,8],px:[4,6],ref:E,children:t.jsxs(n.Container,{size:"fluid",children:[t.jsxs(n.Flex,{direction:"column",gap:[8,12],children:[t.jsx(n.Box,{children:t.jsx(xt,{width:["150px","202px"],color:"white"})}),t.jsxs(n.Flex,{direction:["column",null,null,"row"],justify:"space-between",align:["flex-start"],gap:[8,8,8,0],children:[t.jsx(Qt,{sections:l,linkComponent:p,onLinkClick:b}),t.jsx(qt,{socialLinks:c,newsletterLabel:s,socialMediaLabel:a,onEmailSubmit:y,onLinkClick:d})]}),t.jsxs(n.Flex,{direction:["column","column","row"],justify:"space-between",alignContent:"center",align:["flex-start","flex-start","center"],gap:[6,6,0],children:[i&&t.jsx(n.Text,{color:"viridian.lighter",fontSize:"sm",maxWidth:["100%","100%","1024px"],dangerouslySetInnerHTML:{__html:i},sx:{"a:hover":{color:"viridian.light",textDecoration:"underline"}}}),x]})]}),t.jsx(n.Box,{borderTop:"1px solid",borderColor:`${n.theme.colors.viridian.lighter}20`,marginTop:"10",marginBottom:"8"}),t.jsx(en,{disclaimer:i,links:u,linkComponent:p,onLinkClick:b})]})}));exports.BasketButton=vt;exports.CategoryLabel=Ht;exports.Footer=tn;exports.NavButton=we;exports.NavSkeleton=Gt;exports.NavbarDrawer=De;exports.NavbarDrawerLink=Le;exports.NavigationBar=Kt;exports.SpotlightCard=pt;exports.Stepper=$t;exports.TopNavIconButton=ne;exports.TopNavigation=gt;
30
+ <%s key={someKey} {...props} />`,Ve,te,Ft,te),lt[te+Ve]=!0}}return e===a?kt(L):Tt(L),L}}function Lt(e,r,o){return it(e,r,o,!0)}function Dt(e,r,o){return it(e,r,o,!1)}var It=Dt,Bt=Lt;je.Fragment=a,je.jsx=It,je.jsxs=Bt}()),je}process.env.NODE_ENV==="production"?Ge.exports=Ot():Ge.exports=Pt();var t=Ge.exports;const ze=60,st=6,Mt=l=>{const{activeStepIndex:i,hideIndicators:s=!1,steps:a,stepperTheme:c={light:"eggplant.light",base:"eggplant.base"}}=l,{activeStep:u,setActiveStep:p}=n.useSteps({index:i,count:a.length});return w.useEffect(()=>{p(i)},[i,p]),t.jsx(n.Box,{position:"relative",width:"100%","data-testid":"stepper",children:t.jsx(n.Stepper,{role:"progressbar",index:u,width:"100%",display:"flex",flexWrap:"nowrap",children:a.map((y,x)=>{const b=u===x,d=x===0,E=x===a.length-1,C=u>x;let g=`${ze}px`;const _=`calc(100% - ((${ze*(a.length-1)}px) - (${a.length-1} * ${st*2}px)))`;return b?g=_:(d||E)&&(g=`${ze-st}px`),t.jsx(n.Box,{width:g,opacity:C||b?1:.2,paddingRight:E?"0":"6px",paddingLeft:d?"0":"6px",transition:"width 0.4s ease-in-out, opacity 0.4s ease-in-out",children:t.jsx(n.Box,{paddingTop:s?2:5,position:"relative",width:"100%",children:t.jsx(n.Box,{width:"100%",position:"absolute",top:"0",backgroundColor:C?c.light:c.base,height:s?"4px":"8px",borderRadius:"4",left:"0"})})},`step-${x}`)})})})},$t=w.memo(Mt),Ht=({children:l,...i})=>t.jsx(Z.Text,{color:"tints.uiGrey",fontSize:["md",null,null,"lg"],...i,children:l}),de=(l,i)=>{const s=(l==null?void 0:l.startsWith("http"))||(l==null?void 0:l.startsWith("mailto"));return i&&!s?{to:l}:{href:l}},Le=w.forwardRef((l,i)=>{const{label:s,additionalContent:a,mainTextFontSize:c,linkComponent:u,href:p,...y}=l,x=u||n.Link,b=de(p,!!u);return t.jsxs(n.Box,{ref:i,as:x,display:"flex",alignItems:"center",gap:[null,null,null,1],justifyContent:[null,null,null,"space-between"],paddingY:[3,null,null,0],color:"tints.black",_hover:{color:"viridian.base",textDecoration:"none"},borderBottom:["1px",null,null,"unset"],borderColor:["tints.cream",null,null,"unset"],width:["100%",null,null,"fit-content"],cursor:"pointer",...b,...y,children:[t.jsx(n.Icon,{display:["none",null,null,"block"],as:I.CaretRight,fontSize:"lg",color:"viridian.light",role:"img","aria-label":"Caret right icon",weight:"bold"}),t.jsxs(n.Flex,{alignItems:"center",gap:"1",width:["100%",null,null,"auto"],children:[t.jsx(n.Text,{fontSize:[c||"xl",null,null,"lg"],fontWeight:"medium",children:s}),a&&(typeof a=="string"?t.jsx(n.Text,{fontSize:["xl",null,null,"lg"],fontWeight:"medium",color:"tints.uiGrey",sx:{"a:hover &":{color:"viridian.base"}},children:a}):a),t.jsx(n.Icon,{display:["block",null,null,"none"],as:I.CaretRight,fontSize:"2xl",color:"tints.uiGrey",role:"img","aria-label":"Caret right icon",marginLeft:"auto"})]})]})}),we=w.forwardRef((l,i)=>{const{children:s,isSelected:a,...c}=l,u=l.backgroundColor||(a?"tints.lightCream":"transparent");return t.jsx(n.Button,{ref:i,borderRadius:"full",backgroundColor:u,fontSize:"lg !important",fontWeight:"normal",color:"tints.black",sx:{"&[href]":{textDecoration:"none"}},_before:{content:'""',position:"absolute",top:[null,null,null,-6],right:[null,null,null,-2],bottom:[null,null,null,-6],left:[null,null,null,-2]},_hover:{backgroundColor:u,textDecoration:"none",filter:"brightness(0.95)"},...c,children:s})}),pt=({title:l,description:i,imageSrc:s,imageElement:a,button:c,backgroundColor:u="viridian.wash",onClick:p,href:y,linkComponent:x})=>{const C=x||n.Link,g=de(y,!!x),_=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0});return t.jsxs(n.Flex,{direction:["row",null,null,"column"],alignItems:["center"],borderRadius:"xl",overflow:"hidden",height:["80px",null,null,"272px"],backgroundColor:u,onClick:p,"data-testid":"spotlight-card",position:"relative",transition:"box-shadow 0.2s ease-in-out",border:"1px solid",borderColor:"transparent",minWidth:["100%",null,null,"320px"],maxWidth:["100%",null,null,"380px"],_hover:{boxShadow:"lg",textDecoration:"none",border:"1px solid",borderColor:"tints.white"},as:_?n.Flex:C,..._?{}:g,children:[t.jsx(n.Box,{width:["72px",null,null,"100%"],height:["100%",null,null,"188px"],sx:{img:{height:_?"188px":"100%"}},children:s?t.jsx(n.Image,{src:s,objectFit:"cover",width:"100%",alt:"","data-testid":"spotlight-card-image"}):t.jsx(n.Box,{height:[80,null,null,188],overflow:"hidden",children:a})}),t.jsxs(n.Flex,{direction:["column",null,null,"row"],justifyContent:[null,null,null,"space-between"],alignItems:["left",null,null,"center"],padding:"4",height:["80px",null,null,"84px"],width:"100%",bottom:[null,null,null,"0"],backgroundColor:[null,null,null,`${u}CC`],backdropFilter:[null,null,null,"blur(8px)"],flex:"1",gap:[null,null,null,3],children:[t.jsxs(n.Flex,{direction:"column",justifyContent:"center",height:"100%",children:[t.jsx(n.Text,{fontSize:"lg",fontWeight:"medium",color:"tints.black",children:l}),t.jsx(n.Text,{fontSize:"sm",color:"tints.darkGrey",children:i})]}),_?t.jsx(n.Box,{children:c}):null]})]})},ne=l=>t.jsx(n.IconButton,{size:"sm",width:["40px",null,null,"46px"],height:["40px",null,null,"46px"],padding:["2 !important",null,null,"3 !important"],colorScheme:"whiteCS",backgroundColor:"tints.cream",sx:{svg:{width:"24px",height:"24px"}},_hover:{backgroundColor:"tints.cream",filter:"brightness(0.95)"},...l}),xt=({color:l=n.theme.colors.viridian.base,width:i})=>t.jsx(Z.Box,{as:"svg",width:i,height:"auto",viewBox:"0 0 116 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Everlywell Logo",children:t.jsx("g",{id:"Everlywell Logo",children:t.jsx("path",{fill:l,id:"Everlywell Logo_2",fillRule:"evenodd",clipRule:"evenodd",d:"M54.8224 1V17.8352H52.4272V1H54.8224ZM5.65731 14.992C4.9835 14.4474 4.59261 13.726 4.48231 12.8278H13.7822C13.9984 10.4829 13.5723 8.70006 12.5039 7.47915C11.4322 6.25824 9.93769 5.64945 8.01698 5.64945C6.23518 5.64945 4.78896 6.22479 3.67214 7.38216C2.55841 8.5395 2 9.92767 2 11.8377C2 13.7476 2.56171 15.273 3.68501 16.4136C4.80831 17.5542 6.30612 18.1229 8.18163 18.1229C9.11125 18.1229 10.0216 17.9489 10.9125 17.5944C11.8034 17.2431 12.533 16.7447 13.1075 16.1025L11.5517 14.5371C11.2095 14.9217 10.7253 15.2294 10.099 15.4636C9.46959 15.6944 8.84662 15.8115 8.22684 15.8115C7.18735 15.8115 6.33197 15.5372 5.65731 14.992ZM10.4671 8.60977C11.0772 9.10817 11.416 9.81395 11.4774 10.7305H4.52751C4.71152 9.81395 5.12475 9.10817 5.77027 8.60977C6.41589 8.11136 7.18735 7.86384 8.08473 7.86384C9.05966 7.86384 9.85696 8.11136 10.4671 8.60977ZM22.1465 17.8819L27.0047 5.93699H24.3771L22.6565 10.2486L20.8424 15.2828L18.8217 9.76697L17.2884 5.93699H14.6382L19.5189 17.8819H22.1465ZM30.3737 12.8244C30.4835 13.7242 30.8741 14.4467 31.5487 14.992C32.2234 15.5372 33.0788 15.8115 34.1181 15.8115C34.7379 15.8115 35.361 15.6944 35.9905 15.4636C36.6166 15.2294 37.1009 14.9217 37.4431 14.5371L38.999 16.1025C38.4244 16.7447 37.6948 17.2431 36.8039 17.5944C35.9129 17.9489 35.0027 18.1229 34.0729 18.1229C32.1975 18.1229 30.6997 17.5542 29.5764 16.4136C28.453 15.273 27.8914 13.7476 27.8914 11.8377C27.8914 9.92767 28.4498 8.5395 29.5635 7.38216C30.6804 6.22479 32.1265 5.64945 33.9084 5.64945C35.829 5.64945 37.3236 6.25824 38.3952 7.47915C39.4638 8.70006 39.8899 10.4829 39.6736 12.8278H30.3769L30.3737 12.8244ZM37.3688 10.7305C37.3075 9.81395 36.9685 9.10817 36.3584 8.60977C35.7483 8.11136 34.951 7.86384 33.9762 7.86384C33.0788 7.86384 32.3073 8.11136 31.6617 8.60977C31.0161 9.10817 30.6029 9.81395 30.4189 10.7305H37.3688ZM44.5032 7.5263L44.3418 5.96085H44.3385H42.108V17.8355H44.5032V11.4031C44.5032 10.3595 44.8001 9.5567 45.3877 8.99473C45.9751 8.43278 46.7112 8.15181 47.5956 8.15181C48.3703 8.15181 49.0417 8.39264 49.6163 8.87432L50.7073 6.70677C49.9811 6.03445 49.0353 5.6966 47.8732 5.6966C46.2914 5.6966 45.1681 6.30539 44.5032 7.5263ZM60.3782 12.3193V5.96054H57.983V12.3428C57.983 14.1089 58.4286 15.5004 59.3195 16.5106C60.2104 17.5241 61.3789 18.0292 62.8186 18.0292C64.552 18.0292 65.8787 17.387 66.7923 16.1025V18.1262C66.7923 19.2669 66.4824 20.1499 65.8626 20.7754C65.2429 21.401 64.494 21.7154 63.6094 21.7154C61.8889 21.7154 60.8754 20.9661 60.5654 19.4742H58.2187C58.3252 20.9326 58.8644 22.0532 59.8327 22.8326C60.8011 23.612 62.1214 24 63.6546 24C65.188 24 66.4727 23.5049 67.5121 22.5081C68.5515 21.5147 69.0712 20.0697 69.0712 18.1731V5.96054H66.6761V12.1521C66.6761 13.1623 66.3791 14.0153 65.7819 14.7043C65.188 15.3967 64.4681 15.7412 63.4933 15.7412C62.5184 15.7412 61.7566 15.4268 61.2047 14.8013C60.6526 14.1725 60.3782 13.3463 60.3782 12.3193ZM81.5989 5.93699L84.3427 15.2828L87.1768 5.93699H89.8496L85.8275 17.8819H83.0385L81.6892 13.9315L80.5724 9.79039L79.4328 13.9315L78.0836 17.8819H75.2945L71.2498 5.93699H73.9453L76.7795 15.2828L79.5232 5.93699H81.5924H81.5989ZM94.65 14.992C93.9754 14.4467 93.5848 13.7242 93.475 12.8244L93.4847 12.8278H102.781C102.998 10.4829 102.572 8.70006 101.503 7.47915C100.431 6.25824 98.9368 5.64945 97.0162 5.64945C95.2343 5.64945 93.785 6.22479 92.668 7.38216C91.5544 8.5395 90.9959 9.92767 90.9959 11.8377C90.9959 13.7476 91.5576 15.273 92.6809 16.4136C93.8043 17.5542 95.3021 18.1229 97.1775 18.1229C98.1073 18.1229 99.0175 17.9489 99.9084 17.5944C100.799 17.2431 101.529 16.7447 102.103 16.1025L100.544 14.5371C100.202 14.9217 99.7212 15.2328 99.0918 15.4636C98.4623 15.6944 97.8393 15.8115 97.2196 15.8115C96.1802 15.8115 95.3247 15.5372 94.65 14.992ZM99.4598 8.60977C100.07 9.10817 100.409 9.81395 100.47 10.7305H93.5202C93.7042 9.81395 94.1175 9.10817 94.763 8.60977C95.4086 8.11136 96.1802 7.86384 97.0774 7.86384C98.0524 7.86384 98.8465 8.11136 99.4598 8.60977ZM107.698 1V17.8352H105.303V1H107.698ZM113.53 17.8352V1H111.135V17.8352H113.53Z"})})}),Nt=(l,i)=>{let s;return(...a)=>{s&&clearTimeout(s),s=setTimeout(()=>{l(...a)},i)}},Ye=l=>l.toLowerCase().replace(/['']/g,"").replace(/[^a-z0-9]/g,""),Wt=(l,i)=>{l.length<i.length&&([l,i]=[i,l]);let s=Array(i.length+1).fill(0),a=Array(i.length+1).fill(0);for(let c=0;c<=i.length;c++)s[c]=c;for(let c=1;c<=l.length;c++){a[0]=c;for(let u=1;u<=i.length;u++){const p=l[c-1]===i[u-1]?0:1;a[u]=Math.min(a[u-1]+1,s[u]+1,s[u-1]+p)}[s,a]=[a,s]}return s[i.length]},Be=(l,i,s=.6)=>{if(l.length<=3||i.length<=3)return l.includes(i)||i.includes(l);const a=Wt(l,i),c=Math.max(l.length,i.length);return 1-a/c>=s},ut=(l,i)=>{const s=l.split(/\s+/);return i.length<=4?s.some(a=>a.includes(i)):s.some(a=>{if(Be(a,i))return!0;if(a.length>=i.length)for(let c=0;c<=a.length-i.length;c++){const u=a.slice(c,c+i.length+1);if(Be(i,u))return!0}return!1})},Ue="nav-drawer-hover",Ze="nav-drawer-animation-start",Ke="nav-drawer-animation-end",ct=l=>{window.dispatchEvent(new CustomEvent(Ue,{detail:{isHovering:l},bubbles:!0,cancelable:!0}))},dt=l=>{window.dispatchEvent(new CustomEvent(l,{bubbles:!0,cancelable:!0}))},Vt=(l=!1,i=!1,s=!1)=>l||!i?"column":s?"row":"row-reverse",zt=Ie.motion(n.DrawerContent),Yt=Ie.motion(n.DrawerOverlay),De=({isOpen:l=!1,onClose:i,title:s,navDrawerLinks:a,bottomNavButtons:c,spotlightCards:u,bottomButton:p,hasBackButton:y=!0,onBackClick:x,hasOnlySpotlightCards:b=!1,hasSearch:d=!1,onSearch:E=()=>({}),topOffset:C})=>{var G,J;const g=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0}),_=g?"top":"right",[P,Y]=w.useState(0),[F,T]=w.useState(!1),q=()=>{Y(D=>D+1)},M=w.useCallback(Nt(D=>{E(D),q()},100),[]);w.useEffect(()=>{l&&(T(!0),dt(Ze))},[l]);const z=()=>{l||(T(!1),i()),dt(Ke)};return t.jsx(n.Drawer,{isOpen:F||l,onClose:()=>{F&&g||i()},placement:_,blockScrollOnMount:!1,autoFocus:!1,...g?{styleConfig:{baseStyle:{...n.theme.components.Drawer.baseStyle,dialogContainer:{...(J=(G=n.theme.components.Drawer)==null?void 0:G.baseStyle)==null?void 0:J.dialogContainer,top:g?`${C}px`:void 0,zIndex:["overlay"]}}}}:{},children:t.jsx(Ie.AnimatePresence,{children:l?t.jsxs(t.Fragment,{children:[t.jsx(Yt,{backgroundColor:"tints.black",top:["0",null,null,`${C}px`],opacity:g?void 0:"0.4 !important",...g?{initial:{opacity:0},animate:{opacity:.4},exit:{opacity:0},transition:{duration:.2,delay:.15,ease:"easeOut"}}:{}}),t.jsxs(zt,{onClick:D=>{const $=D.target.closest("a");$&&$.href===window.location.href&&i()},onMouseEnter:()=>{g&&ct(!0)},onMouseLeave:D=>{g&&(!d||d&&(D.target===D.currentTarget||!D.currentTarget.contains(D.target)&&!F))&&ct(!1)},paddingTop:"4",paddingX:[4,null,null,12],paddingBottom:"24",overflow:["auto",null,null,"hidden"],maxHeight:"100vh",position:"relative",top:g?`${C}px !important`:void 0,onAnimationComplete:z,boxShadow:"none",...g?{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3}}:{},children:[!d&&g?null:t.jsxs(n.DrawerHeader,{padding:"0",flexDirection:d?"column":"row",gap:d?"4":"0",children:[g?null:t.jsxs(n.Flex,{width:"100%",justifyContent:"space-between",alignItems:"center",children:[y?t.jsx(ne,{icon:t.jsx(I.CaretLeft,{}),onClick:()=>{x&&x()},"aria-label":"Back"}):null,t.jsx(n.Text,{color:"tints.uiGrey",fontSize:["xl",null,null,"lg"],children:s}),t.jsx(ne,{icon:t.jsx(I.X,{}),onClick:i,"aria-label":"Close"})]}),d&&t.jsxs(Z.InputGroup,{width:"100%",children:[t.jsx(Z.Input,{onChange:D=>{M(D.target.value)},placeholder:"Search",autoFocus:!0,width:"full",type:"search"}),t.jsx(Z.InputRightElement,{pointerEvents:"none",children:t.jsx(Z.Icon,{as:I.MagnifyingGlass,color:"gray.500"})})]})]}),t.jsx(n.DrawerBody,{paddingX:"0",paddingBottom:[6,null,null,4],"data-testid":`navbar-drawer-body-${s.toLowerCase()}`,children:t.jsxs(Ie.motion.div,{...g?{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.5,delay:.2,ease:[.4,0,.2,1],exit:{duration:.5,delay:.2,ease:[.4,0,.2,1]}}}:{},style:{display:"flex",flexDirection:Vt(b,g,d),gap:"24px",justifyContent:"space-between"},children:[u?t.jsx(n.Box,{gap:[3,null,null,6],display:"flex",justifyContent:[null,null,null,"center"],sx:{flexWrap:"wrap",flexDirection:["column",null,null,"row"]},children:u}):null,t.jsxs(n.Flex,{position:[null,null,null,"relative"],flexDirection:"column",gap:"6",width:["100%",null,null,d?null:"auto"],children:[a?t.jsx(n.Box,{children:a}):null,c&&!g?t.jsx(n.Box,{children:c}):null,p?t.jsx(n.Box,{width:["100%"],position:[null,null,null,"absolute"],bottom:[null,null,null,0],children:p}):null]})]},P)})]})]}):null})})},gt=({desktopTopButtons:l,kitRegistrationElement:i,profileElement:s,cartElement:a,onSearchClick:c,onMenuClick:u,hasSearch:p=!1,logoLink:y="https://www.everlywell.com",setTopOffset:x,linkComponent:b,onLogoClick:d})=>{const E=w.useRef(null),[C,g]=w.useState(!1);w.useEffect(()=>{const P=()=>g(!0),Y=()=>g(!1);return window.addEventListener(Ze,P),window.addEventListener(Ke,Y),()=>{window.removeEventListener(Ze,P),window.removeEventListener(Ke,Y)}},[]);const _=w.useCallback(()=>{if(E.current){const P=E.current.getBoundingClientRect();x(P.bottom)}},[]);return w.useEffect(()=>{_()},[_]),t.jsx(n.Box,{ref:E,paddingY:"4",paddingX:[4,null,null,12],borderBottom:"1px solid",borderColor:"tints.lightCream",backgroundColor:"tints.white",position:"sticky",top:"0",width:"100%",zIndex:["sticky",null,null,C?"modal":"sticky"],onMouseEnter:_,children:t.jsxs(n.Flex,{justifyContent:"space-between",alignItems:"center",children:[t.jsxs(n.Flex,{alignItems:"center",gap:"5",children:[t.jsx(n.Box,{"aria-label":"Go to homepage",onClick:d,as:b||n.Link,...de(y,!!b),children:t.jsx(xt,{width:"116px"})}),t.jsx(n.Flex,{display:["none",null,null,"flex"],children:l})]}),t.jsxs(n.Flex,{alignItems:"center",gap:"2",children:[t.jsx(n.Box,{display:["none",null,null,"block"],children:i}),p?t.jsx(ne,{"aria-label":"Search",icon:t.jsx(n.Icon,{as:I.MagnifyingGlass}),onClick:c}):null,a,t.jsx(n.Box,{display:["flex",null,null,"none"],children:t.jsx(ne,{icon:t.jsx(I.List,{}),"aria-label":"menu","data-testid":"menu-button",onClick:u})}),t.jsx(n.Box,{display:["none",null,null,"block"],children:s})]})]})})},vt=({count:l=0,...i})=>t.jsxs(n.Box,{position:"relative",display:"inline-block",children:[t.jsx(ne,{icon:t.jsx(I.Basket,{}),...i}),l>0&&t.jsx(n.Box,{display:"flex",minWidth:"20px",height:"20px",py:"4px",px:"6px",justifyContent:"center",alignItems:"center",position:"absolute",right:"-4px",top:"-4px",borderRadius:"32px",background:"viridian.base",color:"white",fontSize:"xs",fontWeight:"normal",children:l})]}),Gt=({numDesktopLinks:l=5,showPromoButton:i=!1})=>t.jsx(n.VStack,{spacing:0,align:"stretch",children:t.jsx(n.Box,{paddingY:4,paddingX:6,borderBottomWidth:"1px",borderColor:"tints.lightCream",children:t.jsxs(n.Flex,{justify:"space-between",align:"center",children:[t.jsx(n.Skeleton,{w:"120px",h:"48px"}),t.jsxs(n.HStack,{spacing:8,marginLeft:12,display:["none",null,null,"flex"],"data-testid":"desktop-nav",children:[Array.from({length:l}).map((s,a)=>t.jsx(n.Skeleton,{width:"90px",height:"48px"},a)),i&&t.jsx(n.Skeleton,{width:"110px",height:"48px",borderRadius:"full"})]}),t.jsxs(n.HStack,{spacing:4,ml:"auto",children:[t.jsx(n.SkeletonCircle,{width:"120px",height:"48px",display:["none",null,null,"block"],"data-testid":"register-kit"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," ",t.jsx(n.SkeletonCircle,{width:"48px",height:"48px"})," "]})]})})}),Ut=({source:l,onSearchCallback:i,isActive:s})=>{const[a,c]=w.useState(""),[u,p]=w.useState([]),y=(d,E)=>{if(!d)return[];const g=Ye(d).split(/\s+/);return E.filter(_=>{const P=Ye(_.label);if(g.some(M=>ut(P,M)))return!0;const F=P.split(/\s+/),T=g.some(M=>F.some(z=>z.includes(M)||Be(M,z))),q=typeof _.additionalContent=="string"&&g.some(M=>{const z=Ye(_.additionalContent);return ut(z,M)||z.split(/\s+/).some(G=>G.includes(M)||Be(M,G))});return T||q}).sort((_,P)=>_.label.localeCompare(P.label))},x=d=>{if(c(d),!d){p([]);return}const E=y(d,l);p(E),i&&i(d,E)},b=()=>{c(""),p([])};return w.useEffect(()=>{s||(c(""),p([]))},[s]),{query:a,results:u,handleClose:b,handleSearch:x}},Zt=l=>{const i=new Set;return l.reduce((s,a)=>{var u;const c=((u=a.sections)==null?void 0:u.reduce((p,y)=>{const x=y.links.filter(b=>i.has(b.label)||b.isSearchable!==!0?!1:(i.add(b.label),!0));return[...p,...x]},[]))??[];return[...s,...c]},[])},Kt=({categories:l=[],onCartClick:i,mainCategoryLabel:s="Menu",logoLink:a="https://www.everlywell.com",hasSearch:c=!0,onSearchClick:u,registrationUrl:p,profileUrl:y="https://secure.everlywell.com/login",mobileBottomButtons:x=[],numberOfCartItems:b=0,linkComponent:d,onSearchCallback:E,onLinkClick:C,onCategoryOpen:g,onMobileMenuOpen:_,onBackToMainMenu:P,onRegisterKitClick:Y,onProfileClick:F,onLogoClick:T,shopAllProductsUrl:q,onShopAllProductsClick:M})=>{var Q,ge,ve;const[z,G]=w.useState(!1),[J,D]=w.useState(!1),[R,$]=w.useState(null),[Ce,fe]=w.useState(!1),[W,K]=w.useState(!1),[X,ye]=w.useState(0),Ee=Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!1,desktop:!0})??!1;w.useEffect(()=>{ie(),$(null)},[Ee]);const{query:Se,results:re,handleSearch:Re}=Ut({source:Zt(l),onSearchCallback:E,isActive:J}),he=re.length>0,le=d||n.Link,_e=de(q,!!d),Fe=Se&&t.jsxs(n.Flex,{gap:he?"6":0,direction:"column",children:[he?t.jsx(n.Text,{color:"tints.uiGrey",children:`${re.length} Results`}):t.jsxs(n.Flex,{direction:"column",gap:"6",alignItems:"flex-start",children:[t.jsx(n.Text,{color:"tints.uiGrey",children:"We didn't find what you were looking for."}),t.jsx(n.Button,{as:le,onClick:M,_hover:{textDecoration:"none"},width:["100%",null,null,"auto"],..._e,children:"Shop all products"})]}),t.jsx(n.Grid,{columns:[1,1,1,4],children:re.map((f,B)=>t.jsx(n.GridItem,{children:t.jsx(Le,{href:f.href,label:f.label,additionalContent:f==null?void 0:f.additionalContent,linkComponent:d})},`${f.label}-${B}`))})]}),ie=()=>{G(!1),$(null)},U=f=>"href"in f,pe=f=>{U(f)?C==null||C(f.label):$(f)},oe=f=>{fe(!0),D(!1),$(null),!U(f)&&(f.sections||f.spotlightCards)&&$(f)},xe=()=>{fe(!1)};w.useEffect(()=>{const f=B=>{K(B.detail.isHovering)};return window.addEventListener(Ue,f),()=>{window.removeEventListener(Ue,f)}},[]),w.useEffect(()=>{!Ce&&!W&&($(null),D(!1))},[Ce,W]),w.useEffect(()=>{let f=window.location.href;const B=()=>{const A=window.location.href;A!==f&&(f=A,ie(),$(null))},H=setInterval(B,100);return window.addEventListener("popstate",B),()=>{window.removeEventListener("popstate",B),clearInterval(H)}},[]);const ae=l==null?void 0:l.map((f,B)=>t.jsx(we,{onMouseEnter:()=>{oe(f),g==null||g(f.label)},onMouseLeave:xe,isSelected:(R==null?void 0:R.label)===f.label,as:U(f)&&le?le:n.Link,href:U(f)?f.href:void 0,onClick:U(f)?()=>C==null?void 0:C(f.label):void 0,...f.buttonProps,children:f.label},`${f.label}-${B}`)),Ae=(Q=l.filter(f=>!U(f)&&f.isMobileTopLink!==!1))==null?void 0:Q.map((f,B)=>{const H=f;return t.jsx(n.Box,{onClick:()=>{pe(H),g==null||g(H.label)},children:t.jsx(Le,{label:H.label,role:"link",additionalContent:H.additionalContent,mainTextFontSize:"3xl",linkComponent:d})},`${H.label}-${B}`)}),Te=t.jsxs(t.Fragment,{children:[t.jsx(we,{as:n.Link,href:y,width:"100%",backgroundColor:"tints.cream",onClick:F,children:t.jsxs(n.Flex,{gap:"2",children:["My Everly",t.jsx(n.Icon,{as:I.User,size:24})]})},"my-everly"),t.jsx(we,{as:n.Link,width:"100%",href:p,backgroundColor:"tints.cream",onClick:Y,children:t.jsxs(n.Flex,{gap:"2",children:["Register kit",t.jsx(n.Icon,{as:I.QrCode,size:24})]})},"register-kit")]}),Oe=t.jsxs(n.Flex,{gap:"2",flexDirection:"column",children:[x,Te]}),Pe=R?t.jsx(n.Flex,{direction:["column",null,null,"row"],gap:"8",children:(ge=R==null?void 0:R.sections)==null?void 0:ge.map((f,B)=>{const H=[];for(let A=0;A<f.links.length;A+=3)H.push(f.links.slice(A,A+3));return t.jsxs(n.Box,{children:[t.jsx(n.Text,{fontSize:"md",color:"tints.uiGrey",marginBottom:[0,null,null,6],children:f.title}),t.jsx(n.Flex,{flexDirection:["column",null,null,"row"],gap:[null,null,null,8],children:H==null?void 0:H.map((A,Me)=>t.jsx(n.Flex,{flexDirection:["column"],gap:[null,null,null,5],marginLeft:[null,null,null,-2],children:A==null?void 0:A.map((ee,ke)=>t.jsx(Le,{label:ee.label,href:ee.href,additionalContent:ee.additionalContent,linkComponent:d,onClick:()=>C==null?void 0:C(ee.label)},`${ee.label}-${ke}`))},Me))})]},`${f.title}-${B}`)})}):null,se=R!=null&&R.spotlightCards?(ve=R.spotlightCards)==null?void 0:ve.map((f,B)=>t.jsx(pt,{...f},`${f.title}-${B}`)):t.jsx(n.Box,{});return t.jsxs("nav",{"aria-label":"Main navigation",children:[t.jsx(gt,{desktopTopButtons:ae,kitRegistrationElement:t.jsx(we,{as:n.Link,href:p,onClick:Y,backgroundColor:"tints.cream",children:"Register Kit"}),profileElement:t.jsx(n.Link,{href:y,"aria-label":"login",onClick:F,children:t.jsx(ne,{icon:t.jsx(n.Icon,{as:I.User}),"aria-label":"Profile"})}),cartElement:t.jsx(vt,{"aria-label":"Cart",count:b,onClick:i}),onSearchClick:()=>{D(!J),u==null||u()},onMenuClick:()=>{G(!0),_==null||_()},hasSearch:c,logoLink:a,linkComponent:d,onLogoClick:T,setTopOffset:ye}),t.jsxs(n.Box,{position:"relative",zIndex:"modal",children:[t.jsx(De,{isOpen:z,onClose:ie,title:s,navDrawerLinks:Ae,bottomNavButtons:Oe,hasBackButton:!1,topOffset:X}),t.jsx(De,{isOpen:!!R,onClose:()=>{ie(),$(null)},title:(R==null?void 0:R.label)||"",navDrawerLinks:Pe,onBackClick:()=>$(null),spotlightCards:se,hasOnlySpotlightCards:R==null?void 0:R.hasOnlySpotlightCards,bottomButton:R==null?void 0:R.bottomButton,topOffset:X}),t.jsx(De,{isOpen:J,onClose:()=>D(!1),title:"Search",navDrawerLinks:Fe,onSearch:Re,hasSearch:!0,hasBackButton:!1,topOffset:X})]})]})},ft=({links:l,linkComponent:i,onLinkClick:s})=>{const a=i||n.Link,c=u=>{s&&s(u)};return t.jsx(n.Flex,{direction:"column",gap:6,children:l.map(u=>t.jsx(n.Text,{as:a,color:"white",size:"lg",_hover:{color:"viridian.lighter",textDecoration:"none"},onClick:()=>c(u.label),...de(u.href,!!i),children:u.label},u.label))})},Xt=({title:l,links:i,isLast:s})=>{const a=s?"transparent":`${n.theme.colors.viridian.lighter}20`;return i?t.jsx(n.AccordionItem,{borderColor:a,children:({isExpanded:c})=>t.jsxs(t.Fragment,{children:[t.jsxs(n.AccordionButton,{paddingX:0,paddingY:4,_hover:{bg:"transparent"},children:[t.jsx(n.Text,{color:"viridian.lighter",size:"lg",flex:"1",textAlign:"left",children:l}),t.jsx(n.Icon,{as:I.CaretDown,size:"sm",color:"viridian.lighter",transform:c?"rotate(-180deg)":"rotate(0deg)",transition:"transform 0.3s ease"})]}),t.jsx(n.AccordionPanel,{pb:4,px:0,children:i})]})}):null},Jt=({title:l,links:i})=>i?t.jsxs(n.Box,{children:[t.jsx(n.Text,{color:"viridian.lighter",mb:6,fontSize:"lg",children:l}),i]}):null,Qt=({sections:l,linkComponent:i,onLinkClick:s})=>Z.useBreakpointValue({base:!1,tablet:!1,largeTablet:!0,desktop:!0})?t.jsx(n.Flex,{justify:"space-between",align:"flex-start",children:t.jsx(n.Flex,{gap:120,children:l.map(({title:c,links:u})=>t.jsx(Jt,{title:c,links:t.jsx(ft,{links:u,linkComponent:i,onLinkClick:s})},c))})}):t.jsx(n.Accordion,{allowMultiple:!0,defaultIndex:[0],width:"100%",display:"flex",flexDirection:"column",children:l.map(({title:c,links:u},p)=>t.jsx(Xt,{title:c,links:t.jsx(ft,{links:u,linkComponent:i,onLinkClick:s}),isLast:p===l.length-1},c))}),ht={instagram:I.InstagramLogo,linkedin:I.LinkedinLogo,facebook:I.FacebookLogo,tiktok:I.TiktokLogo,x:I.XLogo},qt=({socialLinks:l,onEmailSubmit:i,socialMediaLabel:s,newsletterLabel:a,onLinkClick:c})=>{const[u,p]=w.useState(""),y=()=>{u&&i&&(i(u),p(""))},x=d=>{d.key==="Enter"&&y()},b=d=>{c&&c(d)};return t.jsxs(n.Box,{width:["100%",null,null,"440px"],children:[t.jsxs(n.Box,{mb:[8,10],children:[t.jsx(n.Text,{color:"viridian.lighter",mb:6,size:"lg",children:a}),t.jsxs(n.InputGroup,{children:[t.jsx(n.Input,{placeholder:"Enter your email",bg:"transparent",border:"1px solid",borderColor:"viridian.lighter",color:"viridian.lighter",_placeholder:{color:"viridian.lighter"},opacity:.66,height:"52px",pr:"48px",value:u,onChange:d=>p(d.target.value),onKeyPress:x}),t.jsx(n.InputRightElement,{h:"52px",pr:4,children:t.jsx(n.Icon,{as:I.ArrowRight,color:"viridian.lighter",width:"24px",height:"24px",opacity:.66,cursor:"pointer",onClick:y,"data-testid":"arrow-right-icon",role:"button","aria-label":"Submit"})})]})]}),t.jsxs(n.Box,{children:[t.jsx(n.Text,{color:"viridian.lighter",marginBottom:4,size:"lg",children:s}),t.jsx(n.Flex,{gap:3,children:l==null?void 0:l.map(d=>t.jsx(n.Link,{href:d.href,target:"_blank",rel:"noopener noreferrer","aria-label":d.name,onClick:()=>b(d.name),children:ht[d.name.toLowerCase()]&&t.jsx(n.Icon,{as:ht[d.name.toLowerCase()],color:"white",width:["48px",null,"24px",null],height:["48px",null,"24px",null]})},d.name))})]})]})},en=({links:l,linkComponent:i,onLinkClick:s})=>{const a=i||n.Link,c=p=>{s&&s(p)},u=l==null?void 0:l.map(p=>t.jsx(n.Text,{as:a,color:"viridian.lighter",size:"sm",_hover:{color:"white",textDecoration:"none"},onClick:()=>c(p.label),...de(p.href,!!i),children:p.label},p.label));return t.jsxs(n.Flex,{direction:["column","column","row"],justify:"space-between",align:["flex-start","flex-start","center"],gap:[6,6,0],children:[t.jsx(n.Flex,{direction:"row",flexWrap:"wrap",gap:[4,6,10],width:["100%","auto"],children:u}),t.jsxs(n.Text,{color:"viridian.lighter",fontSize:"sm",children:["© Everlywell ",new Date().getFullYear()]})]})},tn=w.forwardRef(({navigationSections:l=[],disclaimer:i,newsletterLabel:s,socialMediaLabel:a,socialLinks:c,complianceLinks:u,linkComponent:p,onEmailSubmit:y,additionalContent:x,onLinkClick:b,onSocialMediaClick:d},E)=>t.jsx(n.Box,{as:"footer",bg:"viridian.dark",py:[6,8],px:[4,6],ref:E,children:t.jsxs(n.Container,{size:"fluid",children:[t.jsxs(n.Flex,{direction:"column",gap:[8,12],children:[t.jsx(n.Box,{children:t.jsx(xt,{width:["150px","202px"],color:"white"})}),t.jsxs(n.Flex,{direction:["column",null,null,"row"],justify:"space-between",align:["flex-start"],gap:[8,8,8,0],children:[t.jsx(Qt,{sections:l,linkComponent:p,onLinkClick:b}),t.jsx(qt,{socialLinks:c,newsletterLabel:s,socialMediaLabel:a,onEmailSubmit:y,onLinkClick:d})]}),t.jsxs(n.Flex,{direction:["column","column","row"],justify:"space-between",alignContent:"center",align:["flex-start","flex-start","center"],gap:[6,6,0],children:[i&&t.jsx(n.Text,{color:"viridian.lighter",fontSize:"sm",maxWidth:["100%","100%","1024px"],dangerouslySetInnerHTML:{__html:i},sx:{"a:hover":{color:"viridian.light",textDecoration:"underline"}}}),x]})]}),t.jsx(n.Box,{borderTop:"1px solid",borderColor:`${n.theme.colors.viridian.lighter}20`,marginTop:"10",marginBottom:"8"}),t.jsx(en,{disclaimer:i,links:u,linkComponent:p,onLinkClick:b})]})}));exports.BasketButton=vt;exports.CategoryLabel=Ht;exports.Footer=tn;exports.NavButton=we;exports.NavSkeleton=Gt;exports.NavbarDrawer=De;exports.NavbarDrawerLink=Le;exports.NavigationBar=Kt;exports.SpotlightCard=pt;exports.Stepper=$t;exports.TopNavIconButton=ne;exports.TopNavigation=gt;
package/index.mjs CHANGED
@@ -1805,8 +1805,8 @@ const Ke = 60, bt = 6, Mn = (r) => {
1805
1805
  (d, L) => /* @__PURE__ */ t.jsx(Hn, { ...d }, `${d.title}-${L}`)
1806
1806
  ) : /* @__PURE__ */ t.jsx(m, {});
1807
1807
  return /* @__PURE__ */ t.jsxs(
1808
- t.Fragment,
1809
- { children: [
1808
+ "nav",
1809
+ { "aria-label": "Main navigation", children: [
1810
1810
  /* @__PURE__ */ t.jsx(
1811
1811
  Vn,
1812
1812
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everlywell/consumer-ui",
3
- "version": "1.37.7",
3
+ "version": "1.39.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {