(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6954],{83811:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog/fitness",function(){return e(41854)}])},73153:function(n,t,e){"use strict";e.d(t,{Z:function(){return d},C:function(){return p}});var s=e(85893),o=e(67294),r=e(4115),i=e(69925),a=e(45604),l=e(37429),_=e.n(l),u=e(94184),c=e.n(u);class d extends o.Component{sendEvent(n){(0,a.Ng)(n,this.props.id),this.props.onClick&&this.props.onClick()}static getDerivedStateFromProps(n,t){return n.toObj!==t.toObj?{toObj:t.toObj}:null}render(){let{children:n,className:t,to:e,toLegacySite:o,shadow:a,newWindow:l,id:u,toObj:d,onClick:p,autoTablet:h,variant:g,ariaLabel:m}=this.props,f=this.state.toObj?this.state.toObj:{...d},b=!!Object.keys(f).length,k=g?_()["buttonLink_".concat(g)]:_().buttonLink,L=c()(k,this.props.className);if(o)return(0,s.jsx)("a",{"aria-label":m,role:"link",id:u,href:e,className:L,target:l?"_blank":"_self",rel:"noreferrer",children:n});if(!b)return(0,s.jsx)(r.Z,{href:(0,i.E)(e),children:(0,s.jsx)("a",{"aria-label":m+"Open in new Window",role:"link",id:u,className:L,onClick:()=>this.sendEvent(e),target:l?"_blank":"_self",children:n})});if(b){let t=f.query&&f.query.handle?f.query.handle:"",e=f.as?f.as:"".concat(f.pathname,"/").concat(t);if(e){let{as:n,...t}={...f};f=t}return(0,s.jsx)(r.Z,{href:f,as:e,children:(0,s.jsx)("a",{"aria-label":m,role:"link",id:u,className:L,onClick:()=>this.sendEvent(e),children:n})})}return(0,s.jsx)(s.Fragment,{})}constructor(n){super(n),this.state={toObj:this.props.toObj},this.sendEvent=this.sendEvent.bind(this)}}var p=d},25662:function(n,t,e){"use strict";e.d(t,{x:function(){return u}});var s=e(85893),o=e(88317),r=e(73153),i=e(94184),a=e.n(i),l=e(85146),_=e.n(l);let u=n=>(0,s.jsx)(o._y,{src:n.imgMobile,alt:"",sources:[{mediaQuery:"(min-width: 600px)",src:n.imgDesktop}],className:_().container,children:(0,s.jsxs)("div",{className:a()("inner-paddings-x",_().hero_content),children:[n.subtext?(0,s.jsx)("p",{className:a()("light",_().subtext),children:n.subtext}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("h1",{className:a()("light",_().heading),children:n.heading}),(0,s.jsx)("div",{className:_().hero_cta_c,children:(0,s.jsx)(r.Z,{variant:"white",to:n.href,className:_().hero_cta,children:"Read more"})})]})})},66159:function(n,t,e){"use strict";e.d(t,{S:function(){return v}});var s=e(85893),o=e(7297),r=e(17283),i=e(24145),a=e(46693),l=e(38067);function _(){let n=(0,o.Z)(["\n query GetAllPosts($after: String) {\n posts(first: 100, after: $after, where: { orderby: { field: DATE, order: DESC } }) {\n edges {\n node {\n id\n slug\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n }\n }\n }\n"]);return _=function(){return n},n}function u(){let n=(0,o.Z)(['\n {\n posts(first: 3, where: { orderby: { field: DATE, order: DESC }, nameIn: ["improved-sleep-quality", "optimal-sleeping-temperature", "accessing-a-deep-state-of-rest-with-nsdr"] }) {\n edges {\n node {\n id\n title\n slug\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n date\n content(format: RENDERED)\n }\n }\n }\n }\n']);return u=function(){return n},n}function c(){let n=(0,o.Z)(['\n {\n posts(first: 3, where: { orderby: { field: DATE, order: DESC }, tagNotIn: "','", tagSlugIn: ["wellness", "sleep", "fitness", "science", "membership"] }) {\n edges {\n node {\n id\n title\n slug\n excerpt\n date\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n content(format: RENDERED)\n }\n }\n }\n }\n']);return c=function(){return n},n}function d(){let n=(0,o.Z)(['\n query GetPostBySlug($slug: String) {\n postBy(slug: $slug) {\n id\n title\n slug\n excerpt\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n date\n content(format: RENDERED)\n author {\n node {\n name\n slug\n posts(first: 4, where: { orderby: { field: DATE, order: DESC }, tagNotIn: "','", tagSlugIn: ["wellness", "sleep", "fitness", "science", "membership"] }) {\n edges {\n node {\n title\n slug\n excerpt\n date\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n tags {\n edges {\n node {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n']);return d=function(){return n},n}function p(){let n=(0,o.Z)(['\n query GetLatestPostsByAuthor($author: String) {\n posts(first: 3, where: { authorName: $author, orderby: { field: DATE, order: DESC }, tagNotIn: "','", tagSlugIn: ["wellness", "sleep", "fitness", "science", "membership"] }) {\n edges {\n node {\n id\n slug\n title\n excerpt\n date\n featuredImage {\n node {\n altText\n sourceUrl\n }\n }\n }\n }\n }\n }\n']);return p=function(){return n},n}let h="dGVybToxMzc0",g=["wellness","sleep","fitness","science","membership"];(0,r.Ps)(_()),(0,r.Ps)(u()),(0,r.Ps)(c(),h),(0,r.Ps)(d(),h),(0,r.Ps)(p(),h),new i.f({ssrMode:!0,link:(0,a.L)({uri:"https://blog.eightsleep.com/graphql",credentials:"same-origin"}),cache:new l.h});var m=e(89728),f=e(41664),b=e.n(f),k=e(67294),L=e(484),x=e.n(L);let v=n=>{var t,e,o;let r=(0,k.useRef)(null),{post:i}=n;(0,k.useEffect)(()=>{if(r.current){var n;r.current.innerHTML=(null===(n=i.excerpt)||void 0===n?void 0:n.split("g.includes(n.node.name.toLowerCase()));return(0,s.jsxs)(b(),{href:"/blog/".concat(i.slug),className:x().post,style:n.style,children:[(0,s.jsx)("img",{className:x().img,src:(null===(e=i.featuredImage)||void 0===e?void 0:e.node.sourceUrl)||"https://repository-images.githubusercontent.com/410643287/8b3f76cf-81c8-4678-a1c1-5808c4ddcf79",alt:(null===(o=i.featuredImage)||void 0===o?void 0:o.node.altText)||"Empty image"}),(0,s.jsxs)("span",{children:[a&&a[0]?(0,s.jsx)("div",{className:x().tag,children:(0,s.jsx)("span",{children:a[0].node.name})}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("h3",{className:x().h3,children:i.title}),i.excerpt?(0,s.jsx)("span",{className:x().excerpt,ref:r}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)("small",{className:x().date,children:(0,m.H)(i.date)})]})]},"post-".concat(i.id))}},41854:function(n,t,e){"use strict";e.r(t),e.d(t,{__N_SSG:function(){return d}});var s=e(85893);e(67294);var o=e(66508),r=e(25662),i=e(66159),a=e(94184),l=e.n(a),_=e(84398),u=e.n(_);let c=n=>(0,s.jsxs)(o.G,{children:[(0,s.jsx)(r.x,{href:"/how-sleeping-on-a-pod-pro-improved-my-levels-and-oura-data/",imgDesktop:"https://cdn.shopify.com/s/files/1/1354/6123/files/fitnesshero.png?v=1675431575",imgMobile:"https://cdn.shopify.com/s/files/1/1354/6123/files/fitnesshero.png?v=1675431575",heading:"How Sleeping on a Pod Improved my Levels and Oura data"}),(0,s.jsxs)("div",{className:"inner-paddings-x outer-margins-y",children:[(0,s.jsxs)("h2",{className:u().heading,children:["Latest posts from ",(0,s.jsx)("strong",{style:{color:"blue"},children:"Fitness"})]}),(0,s.jsx)("div",{className:l()("grid","test",u().postslider),children:n.featured_posts.map((n,t)=>(0,s.jsx)(i.S,{post:n,style:{gridColumn:"".concat((4*t+1)%12," / span 4")}},"featured-post-".concat(t)))})]})]});var d=!0;t.default=c},89728:function(n,t,e){"use strict";e.d(t,{H:function(){return r},p:function(){return i}});var s=e(30381),o=e.n(s);let r=n=>{let t=new Date(n),e=o()(t).format("MMMM DD, YYYY");return e},i=(n,t,e,s)=>{let o=t?t.split(" 

","").replace(/(<([^>]+)>)/gi,"").split(".").slice(0,2).join(".")+".":"";return{title:n,meta:[{name:"description",content:o},{itemprop:"name",content:n},{itemprop:"description",content:o},{itemprop:"image",content:e},{property:"og:url",content:"https://www.eightsleep.com/blog/".concat(s)},{property:"og:type",content:"website"},{property:"og:title",content:n},{property:"og:description",content:o},{property:"og:image",content:e},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:n},{name:"twitter:description",content:o},{name:"twitter:image",content:e}]}}},37429:function(n){n.exports={buttonLink:"ButtonLink_buttonLink__LdU96",buttonLink_transparent:"ButtonLink_buttonLink_transparent__OdN1k",buttonLink_transparent_blue:"ButtonLink_buttonLink_transparent_blue__KlLoD ButtonLink_buttonLink__LdU96",buttonLink_outline:"ButtonLink_buttonLink_outline__ge_qn ButtonLink_buttonLink__LdU96",buttonLink_outline_thin:"ButtonLink_buttonLink_outline_thin__HLzkQ ButtonLink_buttonLink__LdU96",buttonLink_block:"ButtonLink_buttonLink_block__4w0wg ButtonLink_buttonLink__LdU96",buttonLink_electricBlue:"ButtonLink_buttonLink_electricBlue__GsMet ButtonLink_buttonLink__LdU96",buttonLink_navbar:"ButtonLink_buttonLink_navbar__RLw_D ButtonLink_buttonLink__LdU96",buttonLink_nav_shop:"ButtonLink_buttonLink_nav_shop__VGOSf ButtonLink_buttonLink__LdU96",buttonLink_nav_shop_white:"ButtonLink_buttonLink_nav_shop_white__mNZGR ButtonLink_buttonLink_nav_shop__VGOSf ButtonLink_buttonLink__LdU96",buttonLink_white:"ButtonLink_buttonLink_white__AoEjS ButtonLink_buttonLink__LdU96",buttonLink_dark_red:"ButtonLink_buttonLink_dark_red__YWx9F ButtonLink_buttonLink__LdU96"}},85146:function(n){n.exports={container:"HomeHero_container__9AY__",hero_content:"HomeHero_hero_content__ZZ0OK",subtext:"HomeHero_subtext__w5_kG",heading:"HomeHero_heading__RZWrg",hero_cta_c:"HomeHero_hero_cta_c__9RoU6"}},484:function(n){n.exports={post:"Post_post__HGUDA",h3:"Post_h3__gOCzd",img:"Post_img__vzX8V",excerpt:"Post_excerpt__K1vpG",date:"Post_date__9vV_t",tag:"Post_tag__o4uGC",post_excerpt:"Post_post_excerpt__zP9lV",thumbnail_c:"Post_thumbnail_c__4RqD7",text:"Post_text__cLvqu",title:"Post_title__xIbPi",html:"Post_html__GSR2n"}},84398:function(n){n.exports={heading:"pagestyles_heading__BB_qn",posts:"pagestyles_posts__Jpo7X",post:"pagestyles_post__bePn1",img:"pagestyles_img__gHS5q",h3:"pagestyles_h3__4S_1w",postslider:"pagestyles_postslider__8qQc0",excerpts:"pagestyles_excerpts__pQGJq"}}},function(n){n.O(0,[4885,5174,9774,2888,179],function(){return n(n.s=83811)}),_N_E=n.O()}]); //# sourceMappingURL=fitness-105dfb2d970aa86d.js.map