1import{c as e,a as t,R as a,d as s,_ as n,cV as r,a9 as o,cW as i,aq as l,ap as c,i as m}from"./index.Dcq7Tn10.js";import{c as p,g as d,cW as u,cX as g,d as h,cY as _,cZ as y,n as b,ai as f,cd as w,B as v,T as E,ab as x,H as j,c_ as S,c$ as I,d0 as T,d1 as L,d2 as N,d3 as M,d4 as k,d5 as C}from"./main.BpO2XlP_.js";import{_ as P}from"./kebabCase.CKbq_fCZ.js";import{T as R}from"./index.lMO_rAot.js";import{E as O}from"./index.ChjocfVT.js";import{B as D,a as A}from"./index.BHXStpDr.js";import{P as H}from"./index.CueWW7_u.js";import{R as U}from"./index.Btbzzceh.js";import{R as V}from"./index.C9PI3zUr.js";import{c as B,P as Y}from"./connect.B8_DVB94.js";import{J as $}from"./index.CgT13_SX.js";import{L as z}from"./index.6feDNYSn.js";import{s as F,a as W,b as K,l as J}from"./selectHomeSections.DNtogGHD.js";import{S as Q}from"./Row.WSDJADOH.js";import"./staticTextEn.UPMVf61n.js";import"./staticTextEs.DJF2PufX.js";import"./staticTextDe.DGaNPAXM.js";import"./staticTextFr.CRVsglAw.js";import"./_createCompounder.Cx_OY_wF.js";import"./index.C9bO-XWU.js";import"./index.NlzaB8YT.js";import"./index.CieSfI8y.js";import"./index.DcJ0qRRN.js";import"./withIcon.DvSZpKgo.js";import"./selectors.CVQy6HCL.js";import"./index.BXEGjshX.js";import"./hooks.BW7_Y6Tu.js";import"./useQuery.DAn0LDAH.js";import"./useWarnRemovedOption.Os8in3ZX.js";import"./useLazyQuery.-sEQ1kMb.js";import"./useIsomorphicLayoutEffect.CDczTpja.js";import"./index.browser.hjgqbxqf.js";import"./index.VSe4IGF9.js";import"./index.DsGlV8y0.js";import"./utils.CuaRQ5Mq.js";import"./PlanGridCurrency.BfMKa7xP.js";import"./utils.CJhm6lXi.js";import"./index.D7gSPFUi.js";import"./index.eyGRDgxC.js";import"./index.TfHq0YND.js";import"./NotificationsFollowButton.N9zduadi.js";import"./index.D5e9EDSc.js";import"./LoadMore.DwJyt3Az.js";import"./selectReadyToRenderSections.DZTN-Nzo.js";const G={articleKeys:["halfmoon","triangle","onelegbow","sphinx","reclinehero","revolvedtriangle","floorfrog"],rowTitle:"View Yoga Pose Library",articles:[{id:"halfmoon",url:"https://www.gaia.com/article/ardha-chandrasana-half-moon-pose",title:"Ardha Chandrasana: Half Moon Pose"},{id:"triangle",url:"https://www.gaia.com/article/utthita-trikonasana-triangle-pose",title:"Utthita Trikonasana: Triangle Pose"},{id:"onelegbow",url:"https://www.gaia.com/article/eka-pada-dhanurasana-one-legged-bow-pose",title:"Eka Pada Urdhva Dhanurasana: One-Legged Bow Pose"},{id:"sphinx",url:"https://www.gaia.com/article/salamba-bhujangasana-sphinx-pose",title:"Salamba Bhujangasana: Sphinx Pose"},{id:"reclinehero",url:"https://www.gaia.com/article/supta-virasana-reclining-hero-pose",title:"Supta Virasana: Reclining Hero Pose"},{id:"revolvedtriangle",url:"https://www.gaia.com/article/parivrtta-trikonasana-revolved-triangle-pose",title:"Parivrtta Trikonasana: Revolved Triangle Pose"},{id:"floorfrog",url:"https://www.gaia.com/article/frog-pose-mandukasana",title:"Mandukasana: Frog Pose"}]};function Z(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function q(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},s=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),s.forEach(function(t){Z(e,t,a[t])})}return e}const X=s(),ee=!!n(X,["features","rowV3"]),te=_({screenType:y,contextType:y}),ae={teaser:!0,heroLabel:!0,hideArrows:!0,maxItemsInView:4,playlistButton:!0},se={teaser:!0,hideArrows:!0,maxItemsInView:4,playlistButton:!0},ne={moreInfo:!0},re={},oe={playlistButton:!0},ie=oe;function le(e){switch(e){case"legacy-row1":return ae;case"legacy-row2":return se;case"legacy-row3":return ne;case"legacy-row4":return re;case"legacy-row5":return oe;default:return ie}}function ce(){return t.fromJS(G)}function me(e){const s=e.getIn(["data","linkText"]),n=e.getIn(["data","linkUrl"]),r=e.getIn(["data","displayMode"]);return e.get("id"),s&&n?"button"===r?function(e){const{text:s,classes:n=t.List()}=e,r=["yoga-home__button-link-button","button--primary","button--small","button--last"];return n.size&&r.push(...n),a.createElement("div",{className:"yoga-home__button-link"},a.createElement(D,{text:s,buttonClass:r,type:A,scrollToTop:!0}))}({text:s}
1):function(e){const{text:s,url:n,classes:r=t.List()}=e,o="yoga-home__view-more-link",i=r.size?r.push(o).join(" "):o;return a.createElement("div",{className:"yoga-home__link-wrapper"},a.createElement(f,{className:i,to:n},s))}({text:s,url:n}):null}let pe=class extends a.Component{componentDidMount(){const{props:e}=this,{setUpstreamContext:t}=e;t(te)}render(){const{props:e,renderSections:t,renderLoadMore:s}=this,{sections:n}=e;return a.createElement("div",{className:"yoga-home"},t(n),s())}constructor(e){super(e),Z(this,"articleClicked",e=>{const{props:t}=this,{setEventDefault:a}=t;a(r.mergeDeep(q({ui_element:"Yoga Article",ui_location:"Yoga Home"},e&&{article_name:e})))}),Z(this,"legacyRenderArticle",e=>{const t=ce().get("articles").find(t=>t.get("id")===e),s=t.get("title");if(t){const e=t.get("id",""),n=b(e);return a.createElement("div",{key:e,className:"yoga-home__article"},a.createElement(f,{className:`yoga-home__article-img yoga-home__article-img--${n}`,to:t.get("url",""),onClick:()=>this.articleClicked(s)}),a.createElement(f,{className:"yoga-home__article-desc",to:t.get("url",""),onClick:()=>this.articleClicked()},s))}return null}),Z(this,"signUpButton",e=>{if(e.get("jwt"))return null;const{props:t}=this,{staticText:s}=t,n=s.getIn(["data","signUpToStartPracticing"]);return a.createElement("div",{className:"yoga-home__btn-signup"},a.createElement(D,{text:n,buttonClass:["yoga-home__btn-signup-btn","button--primary","button--small","button--last"],type:A,scrollToTop:!0}))}),Z(this,"emailSignup",()=>{const{props:e}=this,{auth:s,staticText:n}=e;return s.get("jwt")?null:a.createElement("div",{className:"yoga-home__email-signup"},a.createElement("div",{className:"yoga-home__email-signup-title"},n.getIn(["data","signUpForFreeVideos"])),function(e,s){const{emailSignup:n,doEmailSignup:r}=e;return a.createElement("div",{className:"yoga-home__email-signup-form"},a.createElement(O,{formName:"MY_RI-95_WebApp_My_Yoga_Home_Testarossa_Campaign",success:n.get("success"),siteSegment:t.Map(),className:["footer-email-capture__email-capture",s],onFormSubmit:r,uiLocation:"Yoga Home"}))}(e))}),Z(this,"changeTab",(e,t,a)=>{e.preventDefault(),this.setState(()=>{const{activeTabs:e}=this.state;return{activeTabs:e.set(t,a)}})}),Z(this,"pillTabs",(e=t.Map(),s)=>{const{changeTab:n,props:r}=this,{pmSection:o}=r,i=e.get("id"),l=w({sectionId:i,pmSection:o});return l.size>1?a.createElement("ul",{className:"yoga-home__pilltabs"},l.map((e,r)=>{const o=e.get("tabLabel");if(e.get("tabContent",t.List()).isEmpty())return null;const l=s===r?" active":"";return a.createElement("li",{key:`pilltab-${i}-${r}-${P(o||"")}`},a.createElement(v,{type:E.GHOST,onClick:e=>n(e,i,r),className:`yoga-home__pilltab-btn${l}`,label:`View videos related to ${o}`},o))})):null}),Z(this,"renderHeaderSection",e=>{const{props:s}=this,{auth:n,staticText:r,setOverlayDialogVisible:o}=s,i=e.getIn(["data","asset","renderUrl"])||e.getIn(["data","imageUrl"],""),l=e.getIn(["data","title"],""),c=e.getIn(["data","description"],"");return a.createElement($,{auth:n,description:c,title:l,setOverlayDialogVisible:o,staticText:r,heroImage:t.Map({large:i,medium:i,mediumSmall:i,small:i})})}),Z(this,"renderContentList",e=>{const{props:s,state:r,renderRow:o,renderTile:i,pillTabs:l}=this,{pmSection:c}=s,m=e.get("id"),p=n(r,"activeTabs",t.Map()).get(m,0),d=e.getIn(["data","header","label"],""),u=e.getIn(["data","content",p,"listId"]),g=e.getIn(["data","content",p,"label"]),h=e.get("adminTitle");let _=w({sectionId:m,pmSection:c}).getIn([p,"tabContent"],t.List());_=_.map((e,t)=>e.set("index",t).set("sectionId",m).set("listId",u).set("listLabel",g).set("adminTitle",h).set("headerLabel",d));const y=e.getIn(["data","displayMode"]),b=le(y),f=["yoga-home__content-list","yoga-home__row--overstretch"];return y&&f.push(`yoga-home__content-list-${y}`),a.createElement("div",{className:"yoga-home__wrapper"},a.createElement("div",{className:f.join(" ")},a.createElement(x,{className:"yoga-home__section-title"},a.createElement("span",null,d)),l(e,p),o(_,i,b)))}),Z(this,"renderPeopleList",e=>{const{props:s,state:r,renderRow:o,renderTeacher:i,pillTabs:l}=this,{pmSection:c}=s,m=e.get("id"),p=n(r,"activeTabs",t.Map()).get(m,0),d=e.getIn(["data","header","label"],""),u=w({sectionId:m,pmSection:c}).get(p),g=e.getIn(["data","displayMode"]),h=le(g),_=e.get("adminTitle"),y=e.getIn(["data","content",p,"listId"]);let b=u?u.get("tabContent",t.List()):t.List();b=b.map((e,t)=>e.set("index",t).set("sectionId",m).set("listId",y).set("adminTitle",_).set("headerLabel",d));const f=["yoga-home__people-list","yoga-home__row--overstretch"];return g&&f.push(`yoga-home__people-list-${g}`),a.createElement("div",{className:"yoga-home__wrapper"},a.createElement("div",{className:f.join(" ")},a.createElement(x,{className:"yoga-home__section-title"},a.createElement("span",null,d)),l(e,p),o(b,i,h)))}),Z(this,"renderTile",(e=t.Map(),s)=>{const{props:n}=this,{series:r=t.Map(),videos:m=t.Map(),auth:p,user:d,setEventDefault:u}=n,g=o(d.getIn(["data","language"],"en")),{playlistButton:h=!1,heroLabel:_=!1,teaser:b=!1}=s;let f=t.Map();const w=e?e.get("contentId"):null;let v,E,x,j,S;w&&w>0&&(v=e.get("index"),E=e.get("listId"),x=e.get("listLabel"),j=e.get("sectionId"),S=e.get("headerLabel"),"video"===e.get("
1contentType")&&(f=m.getIn([i(w),g,"data"],t.Map())),"series"===e.get("contentType")&&(f=r.getIn([i(w),g,"data"],t.Map())));const I=t=>{const a=f.get("seriesId");let s=t.hasPlayIcon?l:c;s=s.mergeDeep({content_id:w,content_name:f.get("title"),content_type:e.get("type"),media_id:f.getIn(["feature","id"]),media_language:f.get("mediaLanguage"),is_featured_media:!0,ui_element:"Tile",ui_location:"Yoga Home"}),a&&(s=s.mergeDeep({parent_series_name:f.get("seriesTitle"),parent_series_id:a})),u(s)};if(f&&f.get("id")>0){const e=f.setIn(["reason","source"],y).setIn(["reason","sectionId"],j).setIn(["reason","listId"],E).setIn(["reason","listLabel"],x).setIn(["reason","itemIndex"],v).setIn(["reason","headerLabel"],S);return a.createElement(R,{heroLabel:_?f.get("heroLabel"):null,addToPlaylist:h,tileClass:"tile--row-item",showMoreInfo:!1,key:w,showTeaser:b,tileData:e,auth:p,upstreamContext:te,onClickWatch:I,single:!0})}return a.createElement("div",{className:"tile-placeholder",key:s.index},a.createElement("div",{className:"tile-placeholder__hero"}),a.createElement("div",{className:"tile-placeholder__text"}),a.createElement("div",{className:"tile-placeholder__text"}))}),Z(this,"renderTeacher",(e=t.Map(),s)=>{if(!e)return null;const{someOption:n}=s,r=e.get("name",""),o=e.get("imageUrl"),i=e.get("linkUrl"),l=e.get("description"),c=["yoga-home__teacher"];return n&&c.push(`yoga-home__teacher-${n}`),a.createElement("div",{key:r,className:c.join(" ")},a.createElement(f,{className:"yoga-home__teacher__avatar",to:i},a.createElement("span",{className:"yoga-home__teacher__avatar-inner"}),a.createElement("div",null,a.createElement("img",{className:"yoga-home__teacher__avatar-img",alt:"Teacher",src:o}))),a.createElement(j,null,a.createElement(f,{to:i},r)),a.createElement(x,null,l))}),Z(this,"renderRow",(e=t.List(),s,n={})=>{const{props:r}=this,{auth:o}=r;return ee?a.createElement(V,{style:Q.S12234},e.map((e,t)=>s(e,q({index:t},n),r))):a.createElement(U,{items:e,auth:o,createAccessor:()=>null,style:Q.S12234,disableHover:!0},e=>s(e,n))}),Z(this,"renderLegacyRow",(e=t.List(),s,n={})=>{const{props:r}=this,{auth:o}=r;return ee?a.createElement(V,{style:Q.S12234},e.map(e=>s(e,n,r))):a.createElement(U,{items:e,auth:o,createAccessor:()=>null,style:Q.S12234,disableHover:!0},e=>s(e,n,r))}),Z(this,"renderLegacyArticlesRow",()=>{const{props:e,renderLegacyRow:s}=this,{auth:n,user:r}=e,i=o(r.getIn(["data","language"],"en")),l=ce(),c=l.get("articleKeys",t.List());return"en"!==i?null:a.createElement("div",{className:"yoga-home__wrapper"},a.createElement("div",{className:"yoga-home__articles yoga-home__row--overstretch"},a.createElement(x,{className:"yoga-home__section-title"},a.createElement("span",null,l.get("rowTitle",""))),s(c,this.legacyRenderArticle,{maxItemsInView:4}),function(e,s){const{text:n,url:r,member:o,classes:i=t.List()}=s,l="yoga-home__view-more-link",c=i.size?i.push(l).join(" "):l,m=a.createElement("div",{className:"yoga-home__link-wrapper"},a.createElement(f,{className:c,to:r},n));return e.get("jwt"),m}(n,{text:"See More Yoga Poses",url:"https://www.gaia.com/articles/yoga-poses",member:!0,classes:t.List(["yoga-home__view-more-link__articles"])})))}),Z(this,"renderPlanSelection",()=>{const{props:e}=this,{auth:t}=e;return a.createElement("div",{className:"yoga-home__plans"},function(e,t){const{history:s}=t;return e.get("jwt")?null:a.createElement("div",{className:"yoga-home__checkout-picker"},a.createElement(H,{history:s}))}(t,e))}),Z(this,"renderSection",e=>{const{props:a,renderHeaderSection:s,renderContentList:r,renderPeopleList:o,emailSignup:i,renderLegacyArticlesRow:l,renderPlanSelection:c}=this,{pmSection:m}=a,p=m.getIn([e,"data"],t.Map()),d=p.get("type"),u=n(X,["features","zuoraOutage"]);return d===S?s(p):d===I||d===T?r(p):d===L?o(p):d===N?me(p):d===M?i():d===k?l():d!==C||u?null:c()}),Z(this,"renderSections",e=>{const{renderSection:t}=this;if(!e||e.status===K.EMPTY)return null;return(e.items.toArray?e.items.toArray():e.items).map(({sectionId:e})=>{const s=t(e);return s?a.createElement("div",{key:e},s):null})}),Z(this,"onLoadMore",e=>{const{props:t}=this,{fetchSection:a}=t;a&&e&&a(e)}),Z(this,"renderLoadMore",()=>{const{props:e}=this,{loadMoreSections:t}=e;if(!t)return null;const{status:s,processing:n,currentCount:r,totalCount:o,nextSectionId:i}=t;return s!==J.EMPTY&&i?a.createElement("div",{className:"yoga-home__load-more"},a.createElement(z,{onLoadMore:()=>this.onLoadMore(i),buttonClassName:["button--secondary"],currentCount:r,totalCount:o,processing:n,infiniteScroll:!0,visibilityThreshold:.01})):null}),this.state={activeTabs:t.Map()}}};const de=p(B({seoType:Y}),e(e=>({auth:e.auth,user:e.user,plans:e.plans,pmScreen:e.pmScreen,pmSection:e.pmSection,series:g(e),videos:u(e),emailSignup:e.emailSignup,upstreamContext:e.upstreamContext.get("data",t.Map()),sections:W(e),loadMoreSections:F(e)}),e=>{const t=d(e);return{doEmailSignup:t.emailSignup.doEmailSignup,getPmScreen:t.pmScreen.getPmScreen,setUpstreamContext:t.upstreamContext.setUpstreamContext,setEventDefault:t.eventTracking.setEventDefault,fetchSection:t.pageManagerActions.fetchSection,setOverlayDialogVisible:t.dialog.setOverlayDialogVisible}}),h({storeKey:"yogaHomePage"}))(pe),ue=m(Object.freeze(Object.defineProperty({__proto__:null,default:de},Symbol.toStringTag,{value:"Module"})));export{ue as default}; 2//# sourceMappingURL=index.Vn4i5Te7.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.