(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{58846:function(e,t,o){"use strict";let i;o.d(t,{X:function(){return O}});var n,r=o(95235),l=o(2784),s=o(20011),a=o(82066),d=o(26021),c=o(45327),u=o(15635),p=o(19598),h=o(56325),m=o(5632),g=o(42892),x=o(47164),f=o(52322);let v=d.default.div.withConfig({displayName:"PayToUnlockForm__Container",componentId:"sc-upqgwq-0"})(["background-color:",";padding:50px 30px;padding-top:30px;flex:1;display:flex;flex-direction:column;@media (max-width:","){padding:35px 20px;}"],c.O9T.baselineSurface,c.ZPZ.sm),b=d.default.div.withConfig({displayName:"PayToUnlockForm__Row",componentId:"sc-upqgwq-1"})(["display:flex;padding-bottom:10px;flex:1;justify-content:flex-end;margin-bottom:24px;"]),y=d.default.div.withConfig({displayName:"PayToUnlockForm__ButtonsContainer",componentId:"sc-upqgwq-2"})(["display:flex;justify-content:space-between;width:100%;"]),j=d.default.div.withConfig({displayName:"PayToUnlockForm__ButtonWrapper",componentId:"sc-upqgwq-3"})(["display:flex;width:160px;"]),w=(0,d.default)(c.ZT$).withConfig({displayName:"PayToUnlockForm__Label",componentId:"sc-upqgwq-4"})(["padding-right:15px;flex:1;"]),C=(0,d.default)(c.ZT$).withConfig({displayName:"PayToUnlockForm__Value",componentId:"sc-upqgwq-5"})(["padding-left:15px;"]),P=e=>{let{balance:t,unlockAmount:o,onSubmit:i,onReloadAccount:n,isFetching:r,isSubmitting:l,containerStyles:s,status:a,cardData:d}=e,u=(0,m.useRouter)(),{modal:p,showModal:h}=(0,c.ddY)({title:"",description:"",style:{width:"100%",maxWidth:"550px"},modalallowedmaxwidth:"550px"});return(0,f.jsxs)(v,{style:s,children:[(0,f.jsx)(c.ZT$,{style:{marginBottom:40},bold:!0,variant:"lg",children:"Pay-to-Unlock"}),(0,f.jsxs)(b,{children:[(0,f.jsx)(w,{color:c.O9T.textSubtle,children:"Available Balance"}),(0,f.jsx)(C,{color:c.O9T.textSubtle,children:(0,c.j2z)(t)})]}),(0,f.jsxs)(b,{children:[(0,f.jsx)(w,{children:"Pay-to-Unlock Price"}),(0,f.jsx)(C,{children:(0,c.j2z)(o)})]}),(0,f.jsxs)(b,{style:{marginBottom:0},children:[(0,f.jsx)(w,{children:"Ending Balance"}),(0,f.jsx)(C,{children:(0,c.j2z)(Math.max(0,t-o))})]}),(0,f.jsx)("div",{style:{minHeight:24},children:t-o<0&&(0,f.jsx)(c.ZT$,{color:c.O9T.error,bold:!0,variant:"sm",children:"Insufficient funds"})}),(0,f.jsxs)(y,{children:[(0,f.jsx)(j,{children:(0,f.jsx)(x.g,{variant:"secondary",onClick:n,"data-testid":"reload-nav",style:{marginRight:20,flexGrow:1},disabled:r||l,children:"Reload Wallet"})}),(0,f.jsx)(j,{children:(0,f.jsx)(x.g,{onClick:()=>{"SUSPENDED"===a?h({title:"Unable to complete request",description:"Your account is currently suspended. Please reach out to support for additional details. ",acceptButtonText:"Contact Us",sortButtonActionFirst:!1,acceptAction:()=>u.push("/faq")}):i()},loading:l,disabled:t-o<0||r||l||(null==d?void 0:d.length)===0,"data-testid":"unlock-post",style:{flexGrow:1},children:"Unlock"})})]}),p]})};function S(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}function I(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?S(Object(o),!0).forEach(function(t){(0,r.Z)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):S(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(n=i||(i={})).UNLOCK="UNLOCK",n.WALLET="WALLET",n.CONGRATULATIONS="CONGRATULATIONS";let k=d.default.div.withConfig({displayName:"PayToUnlockFormWrapper__FormContainer",componentId:"sc-1b4hrfx-0"})(["position:relative;width:100%;height:350px;overflow:hidden;display:flex;justify-content:center;align-items:center;@media (max-width:","){height:100%;min-height:410px;max-height:410px;}"],c.ZPZ.sm);d.default.div.withConfig({displayName:"PayToUnlockFormWrapper__Container",componentId:"sc-1b4hrfx-1"})(["padding:20px;height:280px;padding-top:30px;display:flex;justify-items:center;flex-direction:column;align-items:center;"]),d.default.div.withConfig({displayName:"PayToUnlockFormWrapper__ModalTitle",componentId:"sc-1b4hrfx-2"})(["font-size:16px;text-align:center;font-weight:500;"]);let T={position:"absolute",display:"flex",top:0,right:0,left:0,bottom:0,width:"100%"},O=e=>{var t;let{onMissingPaymentMethod:o,onCongratulationClose:n,onUnlockSuccess:r,productId:d,postId:x,unlockAmount:v,status:b,containerRender:y=e=>{let{content:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}}=e,{0:j,1:w}=(0,l.useState)(i.UNLOCK),C=(0,m.useRouter)(),{modal:S,showModal:O,hideModal:M}=(0,c.xko)({title:"Unlock",description:"",style:{width:"100%",maxWidth:"450px"},modalAllowedMaxWidth:450}),E=e=>O({title:"error",description:e,sortButtonActionFirst:!1,style:{width:"100%",maxWidth:"450px"},modalAllowedMaxWidth:450}),{data:U,isLoading:A,refetch:N}=(0,a.useQuery)(["fetchWalletBalanceApi"],u.QFP),{data:_,isLoading:$}=(0,a.useQuery)(["fetchCardApi"],u.vDE),R=null==U?void 0:U.data.balance,{mutate:L,isLoading:B}=(0,a.useMutation)(u.Zy,{onError:(e,t)=>O({type:"alert",description:"At this moment we are not able to process your request. Please try again later.",acceptButtonText:"OK",acceptAction:()=>M(),isTextCentered:!0}),onSuccess:(e,t)=>{null==r||r(),N(),w(i.CONGRATULATIONS),O({type:"success",title:"Success",description:"Your content has been unlocked successfully!",acceptButtonText:"Ok",isCloseable:!0,onClose:()=>{null==n||n(x)},acceptAction:()=>{null==n||n(x),M()}})}}),Z=null==_?void 0:_.data.data[0],{isLoading:F,mutate:D}=(0,p.Jh)({onError:(e,t)=>{let o={title:"Error",description:"Your wallet re-load did not occur due to an error during processing. Please try again or contact support for assistance.",cancelButtonText:"Contact Us",sortButtonActionFirst:!1,isTextCentered:!1,titleCentered:!1,cancelButtonAction:()=>C.push(g.Z.Faq)};t?O(I(I({},o),{},{acceptButtonText:"Try Again",acceptAction:()=>D({amount:t.amount,creditCardId:t.creditCardId})})):O(o)},onSuccess:(e,t)=>{e?O({type:"success",title:"Wallet Reload",description:"Your funds have been added successfully to your available balance and are available immediately. For any larger transactions ($25+), however, please wait a few moments as the card processors may take a few minutes to update before they will approve larger transactions.",sortButtonActionFirst:!1,isTextCentered:!1,style:{width:"100%",maxWidth:"450px"},modalAllowedMaxWidth:450,acceptAction:()=>{N(),w(i.UNLOCK),M()},onClose:()=>{N(),w(i.UNLOCK)}}):E("Your wallet re-load did not occur due to an error during processing. Please try again or contact support for assistance.")}});(0,l.useEffect)(()=>{var e,t,o;void 0!==R&&0===R&&j===i.UNLOCK&&null!=_&&null!==(e=_.data)&&void 0!==e&&e.data&&(null==_?void 0:null===(t=_.data)||void 0===t?void 0:null===(o=t.data)||void 0===o?void 0:o.length)===0&&w(i.WALLET)},[R,j,_]);let{x:W,opacity:q}=(0,s.q_)({from:{x:-800,opacity:1},x:j!==i.WALLET?-800:0,opacity:j!==i.WALLET?0:1}),z=B||F||$||A||void 0===R;if(j===i.CONGRATULATIONS)return(0,f.jsx)(f.Fragment,{children:S});let H=z?(0,f.jsx)(k,{children:(0,f.jsx)(c.$jN,{size:50})}):(0,f.jsxs)(k,{style:{height:"350px"},children:[(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(s.q.div,{style:I(I({},T),{},{opacity:q.to(e=>1-e)}),children:(0,f.jsx)(P,{status:b,balance:R,unlockAmount:v,onSubmit:()=>{L({productId:d,postId:x})},onReloadAccount:()=>{w(i.WALLET)},isFetching:!1,isSubmitting:!1,cardData:null==_?void 0:null===(t=_.data)||void 0===t?void 0:t.data,containerStyles:{borderRadius:"8px"}})}),(0,f.jsx)(s.q.div,{style:I(I({},T),{},{opacity:q,transform:W.to(e=>`translate(${e}px, 0px)`)}),children:(0,f.jsx)(h.V,{status:b,onCancel:()=>w(i.UNLOCK),cardData:Z,isLoading:F,onMissingPaymentMethod:o,onSubmit:e=>{O({title:"PAYMENT",description:(0,f.jsxs)("div",{children:["Please confirm your $",e.amount.toFixed(2)," wallet reload using card ending in ",null==Z?void 0:Z.lastNumbers,"."]}),style:{width:"100%",maxWidth:"450px"},modalAllowedMaxWidth:450,cancelButtonAction:M,cancelButtonText:"No",acceptButtonText:"Yes",sortButtonActionFirst:!1,isTextCentered:!1,titleCentered:!1,acceptAction:()=>{_&&(D(e),M())}})}})})]}),S]});return y({isLoading:z,content:H})}},72818:function(e,t,o){"use strict";o.d(t,{a:function(){return c}});var i=o(95235),n=o(2784),r=o(44621),l=o(67982),s=o(91125),a=o(52322);function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}let c=e=>{let{0:t,1:o}=(0,n.useState)(!1);return(0,n.useEffect)(()=>((0,l.Ld)(s.L,t=>{let{detail:{postId:i,mediaId:n}}=t;i===e.postId&&o(!1)}),()=>{(0,l.r1)(s.L,()=>{})}),[e.postId]),(0,a.jsx)(r.Y7,function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach(function(t){(0,i.Z)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({autoControlPlay:!1,playing:t,onStart:()=>{o(!0)},onPause:()=>{o(!1)},onPlay:()=>{o(!0)}},e))}},15526:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSP:function(){return ea},default:function(){return es}});var i=o(95235),n=o(2784),r=o(9069),l=o(47746),s=o(27149),a=o(24862),d=o(41075),c=o(26021),u=o(5632),p=o(82066),h=o(21805),m=o(97729),g=o.n(m),x=o(15631),f=o(45019),v=o(45327),b=o(33499),y=o(44621),j=o(12621),w=o(14955),C=o(15635),P=o(19598),S=o(67721),I=o(42892),k=o(97992),T=o(40930),O=o(67106),M=o(52322);let E=(0,c.createGlobalStyle)(["body{height:unset;overflow:auto;padding-bottom:0;}#__next{height:unset;padding-top:0 !important;padding-bottom:0 !important;}"]),U=()=>{let{0:e,1:t}=(0,n.useState)(!1),{0:o,1:i}=(0,n.useState)(!1),{0:r,1:l}=(0,n.useState)(!1),{data:s,error:a,isLoading:d}=(0,p.useQuery)("fetchHomeSplashPageApi",async()=>await (0,k.tI)({pageType:"splash"}));return((0,n.useEffect)(()=>{let e=0,o=(e,t)=>{e?t(e):console.error("Element not found")},n=async(t,i)=>{let r=document.getElementsByClassName(t);0===r.length&&e<10?new Promise(e=>setTimeout(e,500)).then(()=>{e+=1,n(t,i)}):o(r,i)},r=()=>{i(!0),t(!1)},s=()=>{i(!1),t(!0)},a=(e,t,o)=>{n(t,t=>{[...t].forEach(function(t){t.addEventListener(e,o)})})};a("click","join-button",s),a("click","login-button",r),l(!0)},[]),d)?(0,M.jsx)("div",{}):a?(0,M.jsx)("div",{children:"Error"}):r?(0,M.jsxs)("div",{suppressHydrationWarning:!0,children:[(0,M.jsx)(E,{}),(0,M.jsx)("div",{dangerouslySetInnerHTML:{__html:(null==s?void 0:s.content)??""},suppressHydrationWarning:!0}),(0,M.jsx)(v.l98,{customStyle:{maxWidth:"400px"},showModal:e,closeModal:()=>{t(!1)},children:(0,M.jsx)(T.Z,{afterSuccessSignUpRedirect:()=>{h.Z.set("splash-page-last-visit",new Date().toString()),window.location.href="/?showEmailConfimModal=true"},widgetTypeToShow:O.l.SignUp})}),(0,M.jsx)(v.l98,{customStyle:{maxWidth:"400px"},showModal:o,closeModal:()=>{i(!1)},children:(0,M.jsx)(T.Z,{afterSuccessSignInRedirect:()=>{h.Z.set("splash-page-last-visit",new Date().toString()),window.location.href="/"},widgetTypeToShow:O.l.SignIn})})]}):(0,M.jsx)("div",{})};var A=o(9859),N=o(94195),_=o(61167);let $=new _.t1({fixedHeight:!1,fixedWidth:!0,defaultHeight:78});var R=o(58846),L=o(72818);function B(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}function Z(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?B(Object(o),!0).forEach(function(t){(0,i.Z)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let F=e=>{let{dataProfile:t,cardComponentProps:o,infiniteQuery:i,isCreator:r,isSmall:l,isUserAuthenticated:a,isUserPremium:d,onMediaError:c,onPurchaseSuccess:h,onSubscribe:m,openRegisterModal:g,scrollRef:x,setCounterPost:f,siteCustomization:b,creatorName:j}=e,{0:w,1:P}=(0,n.useState)(!1),{0:S,1:k}=(0,n.useState)(""),{0:T,1:O}=(0,n.useState)(!1),{0:E,1:U}=(0,n.useState)(""),{0:A,1:N}=(0,n.useState)(""),{0:B,1:F}=(0,n.useState)(0),{data:D,fetchNextPage:W,hasNextPage:q,isFetching:z,isFetchingNextPage:H,isLoading:G}=i,Y=[];null==D||D.pages.forEach(e=>{e.data.data.forEach(e=>{Y.push(e)})});let Q=Y.filter(e=>e.liked).map(e=>e.postId),{0:V,1:K}=(0,n.useState)([]),{0:X,1:J}=(0,n.useState)([]),ee=Y.reduce((e,t)=>Z(Z({},e),{},{[t.postId]:t.likes}),{}),et=(0,v.D9i)(Y.length),eo=(0,s.Z)(`(max-width:${v.ZPZ.md})`);(0,n.useEffect)(()=>{Y.length!==et&&$.clearAll(),f(Y.length)},[Y.length,et]);let{mutate:ei}=(0,p.useMutation)(C.Cry),en=G||!q||H||z?Y.length:Y.length+1,er=(0,u.useRouter)(),el=e=>t=>{var o,i,n,s,u,p,h,x,f,w,C,S;let T,E;let{index:A,key:R,style:B,parent:D}=t,W={},q=b.postBackgroundTransparency?(0,v.nfO)(b.postBackgroundColor):b.postBackgroundColor,z={$backgroundColor:`${q}`,$borderTop:`1px solid ${b.accentColor} !important`},H={$borderRadius:"0 !important",$borderRadiusMobile:"0 !important",$boxShadow:"none !important"};l?(W=Z(Z(Z({},z),H),{},{$padding:"0 0 10px !important"}),T=Z(Z({},z),H)):0===A?(W=Z(Z({},z),{},{$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 0 8px 8px !important"}),T=Z(Z({},z),{},{$borderRadius:"8px 8px 0 0 !important",$borderRadiusMobile:"8px 8px 0 0 !important"})):(W=Z({},z),T=Z({},z));let G=Y[A];if(!G)return(0,M.jsx)(_.Z8,{cache:$,parent:D,columnIndex:0,rowIndex:A,children:(0,M.jsx)("div",{style:B,children:(0,M.jsx)(v.Zbd,Z(Z({},W),{},{$padding:"18px 0px",children:(0,M.jsx)(v.$jN,{color:null==b?void 0:b.accentColor,size:30,position:"static"})}))})},R);null!==(o=G)&&void 0!==o&&o.highlightPost&&(E=Z({},G),G=null===(S=G)||void 0===S?void 0:S.highlightPost);let et=V.includes(G.postId),en=X.includes(G.postId),el=Q.includes(G.postId),es=ee[G.postId],ea=e=>{let{id:t,mediaId:o,comments:i}=e;er.push({pathname:I.Z.PostDetails,hash:i?"comments":void 0,query:Z({postId:t},o?{mediaId:o}:{})})},ed=(e,t,o,i)=>{let n=!1,r=0;return e&&t&&(n=!1,r=i-1),e&&!t&&(n=!0,r=i),!e&&o&&(n=!0,r=i+1),e||o||(n=!1,r=i),{liked:n,count:r}};return(0,M.jsx)(_.Z8,{cache:$,parent:D,columnIndex:0,rowIndex:A,children:(0,M.jsx)("div",{style:B,children:E?(0,M.jsx)(v.y$I,{cardComponentProps:T,comments:0,description:G.description,highlightDescription:E.highlightDescription||"",highlightPublishDate:new Date(E.publishDate),liked:ed(el,en,et,es).liked,likes:ed(el,en,et,es).count,onMediaError:c,payToUnlockPrice:(null===(h=G.pricingTiers)||void 0===h?void 0:null===(x=h[0])||void 0===x?void 0:null===(f=x.products[0])||void 0===f?void 0:f.price)||0,postId:G.postId,pricingTier:(null===(w=G.pricingTiers)||void 0===w?void 0:null===(C=w[0])||void 0===C?void 0:C.type)||v.jcx.FREE,title:G.title,width:e-50,creatorName:j,renderPlayer:e=>{let{style:t,url:o,mediaId:i,light:n}=e;return(0,M.jsx)(y.Y7,{url:o||"",style:t,light:n,onError:()=>c({mediaId:i,postId:G.postId})})},isUserAuthenticated:a,isUserPremium:d,mediaList:G.media||[],mediaThumbnail:G.mediaThumbnail,onMediaClick:e=>ea({id:G.postId,mediaId:e}),onPayClick:r?void 0:()=>{if(a){var e,t,o,i,n,r;U(null===(e=G.pricingTiers)||void 0===e?void 0:null===(t=e[0])||void 0===t?void 0:null===(o=t.products[0])||void 0===o?void 0:o.id),N(G.postId),F((null===(i=G.pricingTiers)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:null===(r=n.products[0])||void 0===r?void 0:r.price)||0),O(!0)}else g()},onSubscribe:m,onTitleClick:()=>ea({id:G.postId}),onLikeClick:a?()=>{let e="";el||et||(e="ACTIVE",K(e=>e.concat(G.postId))),el&&!en&&(e="INACTIVE",J(e=>e.concat(G.postId))),el&&en&&(e="ACTIVE",J(e=>e.filter(e=>e!==G.postId))),et&&(e="INACTIVE",K(e=>e.filter(e=>e!==G.postId))),ei({postId:G.postId,status:e})}:void 0,onCommentClick:()=>ea({id:G.postId,comments:!0}),onShareClick:()=>null,onTipClick:r?void 0:e=>{a?(k(G.postId),P(!0)):g()},onBookmarkClick:()=>null,index:A,pin:G.pin,publishDate:new Date(G.publishDate),siteCustomization:b}):(0,M.jsx)(v.SOp,{cardComponentProps:W,postInfoStyles:{padding:`${l?20:24}px 24px ${l?15:10}px`,color:`${b.postFontColor??v.O9T.textFullHex}`},comments:0,description:G.description,gift:G.gift,index:A,isPurchase:G.isPurchased,isUserAuthenticated:a,isUserPremium:d,liked:ed(el,en,et,es).liked,likes:ed(el,en,et,es).count,like:G.like,mediaList:G.media||[],mediaThumbnail:G.mediaThumbnail,onBookmarkClick:()=>null,onCommentClick:()=>ea({id:G.postId,comments:!0}),creatorName:j,onLikeClick:a?()=>{let e="";el||et||(e="ACTIVE",K(e=>e.concat(G.postId))),el&&!en&&(e="INACTIVE",J(e=>e.concat(G.postId))),el&&en&&(e="ACTIVE",J(e=>e.filter(e=>e!==G.postId))),et&&(e="INACTIVE",K(e=>e.filter(e=>e!==G.postId))),ei({postId:G.postId,status:e})}:void 0,onMediaClick:e=>ea({id:G.postId,mediaId:e}),onMediaError:c,onPayClick:r?void 0:()=>{if(a){var e,t,o,i,n,r;U(null===(e=G.pricingTiers)||void 0===e?void 0:null===(t=e[0])||void 0===t?void 0:null===(o=t.products[0])||void 0===o?void 0:o.id),N(G.postId),F((null===(i=G.pricingTiers)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:null===(r=n.products[0])||void 0===r?void 0:r.price)||0),O(!0)}else g()},onShareClick:()=>null,onSubscribe:m,onTitleClick:()=>ea({id:G.postId}),onTipClick:r?void 0:e=>{a?(k(G.postId),P(!0)):g()},payToUnlockPrice:(null===(i=G.pricingTiers)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:null===(s=n.products[0])||void 0===s?void 0:s.price)||0,pin:G.pin,postId:G.postId,pricingTier:(null===(u=G.pricingTiers)||void 0===u?void 0:null===(p=u[0])||void 0===p?void 0:p.type)||v.jcx.FREE,publishDate:new Date(G.publishDate),renderPlayer:e=>{var t,o;let{style:i,url:n,mediaId:r,light:l}=e;return(0,M.jsx)(L.a,{postId:G.postId,mediaId:r,url:n||"",style:i,light:l,onError:()=>c({mediaId:r,postId:G.postId}),urlToDownload:((null===(t=G.pricingTiers[0])||void 0===t?void 0:t.type)===v.jcx.PAY||(null===(o=G.pricingTiers[0])||void 0===o?void 0:o.type)===v.jcx.PRIVATE)&&G.media.filter(e=>!!e.url).length>0?G.media[0].url:void 0})},title:G.title,width:eo?390:e-50,siteCustomization:b})})},R)};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(_.b2,{isRowLoaded:e=>{let{index:t}=e;return t<Y.length},loadMoreRows:async()=>{W()},rowCount:en,threshold:10,children:e=>{let{onRowsRendered:t,registerChild:o}=e;return(0,M.jsx)(_._K,{scrollElement:x.current,children:e=>{let{height:i,scrollTop:n,registerChild:r}=e;return(0,M.jsx)(_.qj,{disableHeight:!0,onResize:()=>{$.clearAll()},children:e=>{let{width:l}=e;return(0,M.jsx)("div",{ref:function(){r(...arguments),o(...arguments)},children:(0,M.jsx)(_.aV,{autoHeight:!0,deferredMeasurementCache:$,height:i||0,onRowsRendered:t,rowCount:en,rowHeight:e=>$.rowHeight(e),rowRenderer:el(l),scrollTop:n,width:l})})}})}},`${x.current}`)}}),(0,M.jsx)(y.Yh,{onCongratulationClose:()=>{k(""),P(!1)},tipModalPostId:S,tipFrom:"POST",status:(null==t?void 0:t.status)||"",onMissingPaymentMethod:()=>er.push(I.Z.SubscriberPaymentMethod),containerRender:e=>{let{isLoading:t,content:o}=e;return(0,M.jsx)(v.l98,{showModal:w,closeModal:()=>P(!1),customStyle:{maxWidth:"500px"},children:o})}}),T&&(0,M.jsx)(R.X,{status:(null==t?void 0:t.status)||"",onMissingPaymentMethod:()=>er.push(I.Z.SubscriberPaymentMethod),onCongratulationClose:e=>{h(e),O(!1)},onUnlockSuccess:()=>{},productId:E,postId:A,unlockAmount:B,containerRender:e=>{let{isLoading:t,content:o}=e;return(0,M.jsx)(v.l98,{showModal:T,closeModal:()=>O(!1),customStyle:{maxWidth:"500px"},children:o})}})]})};var D=o(90193);function W(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}function q(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?W(Object(o),!0).forEach(function(t){(0,i.Z)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):W(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let z=c.default.div.withConfig({displayName:"MediaFeed__MediaContainer",componentId:"sc-13rywlb-0"})(["padding-bottom:10px;"]),H=e=>{let{onSubscribe:t,onMediaError:o,infiniteQuery:i,setCounterPost:r,isUserAuthenticated:l,openRegisterModal:s,onPurchaseSuccess:a,siteCustomization:d}=e,c=(0,u.useRouter)(),{user:h,isCreator:m,isPremium:g}=S.Cn.useState(),{0:x,1:f}=(0,n.useState)(""),{0:b,1:j}=(0,n.useState)(""),{0:w,1:P}=(0,n.useState)(0),{0:k,1:T}=(0,n.useState)(!1),{0:O,1:E}=(0,n.useState)(!0),{data:U,refetch:A}=i,{data:N}=(0,p.useQuery)("fetchSubscriberProfileApi",C.lTX,{cacheTime:0,enabled:!m&&l}),_=(0,D.uniqBy)(e=>e.postId,null==U?void 0:U.pages.flatMap(e=>e.data.data));(0,n.useEffect)(()=>{r(_.length)},[_]);let $=d.postBackgroundTransparency?(0,v.nfO)(d.postBackgroundColor):d.postBackgroundColor;return(0,M.jsxs)(v.Zbd,{$backgroundColor:$,$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 0 8px 8px !important",children:[_.filter(e=>(e.media||[]).length>0).map(e=>{var i,n,r;return(0,M.jsx)(z,{children:(0,M.jsx)(v.QUq,{optimizePostMedia:!0,siteCustomization:d,postId:e.postId,isUserAuthenticated:!!h,isUserPremium:m||g,isPurchased:e.media.filter(e=>!!e.url).length>0,renderPlayer:t=>{let{style:i,url:n,mediaId:r,light:l}=t;return(0,M.jsx)(y.Y7,{url:n||"",style:q(q({},i),{},{zIndex:2}),light:l,onError:()=>o({mediaId:r,postId:e.postId})})},payToUnlockPrice:(null===(i=e.pricingTiers[0])||void 0===i?void 0:null===(n=i.products[0])||void 0===n?void 0:n.price)||0,onMediaError:o,pricingTier:(null===(r=e.pricingTiers[0])||void 0===r?void 0:r.type)||v.jcx.FREE,mediaList:e.media,onSubscribe:t,onPayClick:m?void 0:()=>{if(l){var t,o,i,n;f(null===(t=e.pricingTiers[0])||void 0===t?void 0:null===(o=t.products[0])||void 0===o?void 0:o.id),j(e.postId),P((null===(i=e.pricingTiers[0])||void 0===i?void 0:null===(n=i.products[0])||void 0===n?void 0:n.price)||0),T(!0)}else s()},onMediaClick:t=>c.push({pathname:I.Z.PostDetails,query:q({postId:e.postId},t?{mediaId:t}:{})}),topOffset:69,limitlessImageHeight:!0})},e.postId)}),k&&(0,M.jsx)(R.X,{status:(null==N?void 0:N.data.status)||"",onMissingPaymentMethod:()=>c.push(I.Z.SubscriberPaymentMethod),onCongratulationClose:e=>{E(!0),a(e),T(!1)},onUnlockSuccess:()=>{E(!1),A()},productId:x,postId:b,unlockAmount:w,containerRender:e=>{let{isLoading:t,content:o}=e;return(0,M.jsx)(v.u_l,{topPosition:"15%",alignModal:"baseline",modalWidth:"95%",modalallowedmaxwidth:"550px",onClose:()=>T(!1),isCloseable:!t&&O,children:o})}})]})};var G=o(41311);let Y=c.default.img.withConfig({displayName:"GraphicItem__GraphicImage",componentId:"sc-jvolxq-0"})(["width:100%;object-fit:cover;aspect-ratio:1/1;"]),Q=c.default.video.withConfig({displayName:"GraphicItem__GraphicVideo",componentId:"sc-jvolxq-1"})(["width:100%;object-fit:cover;aspect-ratio:1/1;"]),V=e=>{var t;let{media:o,url:i}=e,r=(0,n.useMemo)(()=>{var e,t,n;return null!=o&&null!==(e=o.url)&&void 0!==e&&e.url?"IMAGE"===o.type?(0,M.jsx)("a",{href:i,target:"_blank",rel:"noreferrer",style:{display:"block",height:"100%",width:"100%"},children:(0,M.jsx)(Y,{src:null==o?void 0:null===(t=o.url)||void 0===t?void 0:t.url,alt:"graphic"})}):"VIDEO"===o.type?(0,M.jsx)(Q,{src:null==o?void 0:null===(n=o.url)||void 0===n?void 0:n.url,controls:!0}):null:null},[null==o?void 0:null===(t=o.url)||void 0===t?void 0:t.url,o.type,i]);return(0,M.jsx)(G.Z,{justifyContent:"center",alignItems:"center",children:r})};function K(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)}return o}function X(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){(0,i.Z)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let J=c.default.div.withConfig({displayName:"Home__TabsContainer",componentId:"sc-17ptmu3-0"})(["display:flex;flex-direction:column;flex:1;position:relative;@media (max-width:576px){margin-top:0px;}@media (min-width:577px){margin-top:22px;}"]),ee=c.default.div.withConfig({displayName:"Home__Content",componentId:"sc-17ptmu3-1"})(["display:flex;flex-direction:column;flex:1;margin-top:0;position:relative;"]),et=(0,c.default)(v.Zbd).withConfig({displayName:"Home__Card",componentId:"sc-17ptmu3-2"})([""]),eo=(0,c.default)(et).withConfig({displayName:"Home__SpinnerCard",componentId:"sc-17ptmu3-3"})(["height:","px;@media (max-width:","){height:200px;}"],e=>{let{height:t=400}=e;return t},v.ZPZ.sm),ei=c.default.div.withConfig({displayName:"Home__SpinnerContainer",componentId:"sc-17ptmu3-4"})(["display:flex;justify-content:center;align-items:center;height:300px;"]),en=c.default.div.withConfig({displayName:"Home__SwitchContainer",componentId:"sc-17ptmu3-5"})(["display:flex;justify-content:flex-end;"]),er=c.default.a.withConfig({displayName:"Home__Link",componentId:"sc-17ptmu3-6"})(["text-decoration:underline;color:",";cursor:pointer;"],v.O9T.textSubtle),el=c.default.div.withConfig({displayName:"Home__HtmlContainer",componentId:"sc-17ptmu3-7"})(["height:auto;"]),es=e=>{var t,o,i,c;let m;let{staticPreferences:k,customTabs:T,splashPageFlag:O,disablePremiumButton:E}=e,{isAuthenticated:_,isCreator:R,isPremium:L,user:B}=S.Cn.useState(e=>({isAuthenticated:!!e.user,isCreator:e.isCreator,isPremium:e.isPremium,user:e.user})),{modal:Z,showModal:D,hideModal:W}=(0,v.ddY)({title:"",description:"",style:{width:450}}),{0:q,1:z}=(0,n.useState)({token:"",fullName:""}),{displayName:G,homePageSummaries:Y,siteCustomization:Q,socials:K}=(0,P.Gn)(k),{0:es,1:ea}=(0,n.useState)({signIn:!1,signUp:!1,forgotPassword:!1,resetPassword:!1,signUpEmail:!1,errorReset:!1}),{0:ed,1:ec}=(0,n.useState)(-1),{0:eu,1:ep}=(0,n.useState)(-1),{0:eh,1:em}=(0,n.useState)(-1),{0:eg,1:ex}=(0,n.useState)(""),{0:ef,1:ev}=(0,n.useState)(""),{0:eb,1:ey}=(0,n.useState)(!1),{0:ej,1:ew}=(0,n.useState)(!1),{0:eC,1:eP}=(0,n.useState)([]),{0:eS,1:eI}=(0,n.useState)([]),{0:ek,1:eT}=(0,n.useState)(!1),eO=!!(0,x.G)((0,f.down)("sm")),eM=(0,l.Z)(),eE=(0,s.Z)(eM.breakpoints.down("sm")),eU=(0,n.useRef)(null),eA=(0,u.useRouter)(),eN=(null==Q?void 0:Q.siteBannerPreSignedUrl)||(null==Q?void 0:Q.profilePicturePreSignedUrl)||(null==Q?void 0:Q.siteLogoPreSignedUrl)||(null==Q?void 0:Q.sponsorGraphicPreSignedUrl)||"",e_=(0,p.useQuery)("fetchSubscriberProfileApi",C.lTX,{cacheTime:1,enabled:!R&&_,onSuccess:e=>{S.Cn.update(t=>X(X({},t),{},{isPremium:e.data.isPremium}))}}),e$=(e,t)=>ea(X(X({},es),{},{[e]:t})),eR=(e,t)=>ea(X(X({},es),{},{[e]:!0,[t]:!1}));(0,n.useEffect)(()=>{let e=async()=>{var e;let t=await (0,C.bnv)(["swipeable_homepage"]),o=null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.some(e=>(null==e?void 0:e.value)==="true");eT(o)};e()},[]);let eL=(0,p.useInfiniteQuery)(["fetchFeedApiFeed",_],e=>{let{pageParam:t}=e;return(0,C.gw7)({isPublic:!_,offset:t,limit:10,pricingTier:null,purchased:!1})},{enabled:!0,cacheTime:0,onSuccess(){W()},refetchOnWindowFocus:!1,getNextPageParam:e=>parseInt(e.data.offset,10)+10>=e.data.total?null:parseInt(e.data.offset,10)+10,keepPreviousData:!1,refetchOnMount:!0}),eB=(0,p.useInfiniteQuery)(["fetchFeedApiUnlocks",_,ej],e=>{let{pageParam:t}=e;return(0,C.gw7)({isPublic:!_,offset:t,limit:10,pricingTier:v.jcx.PAY,purchased:ej})},{onSuccess(){W()},refetchOnWindowFocus:!1,getNextPageParam:e=>parseInt(e.data.offset,10)+10>=e.data.total?null:parseInt(e.data.offset,10)+10}),eZ=(0,p.useInfiniteQuery)(["fetchFeedApiMedia",_],e=>{let{pageParam:t}=e;return(0,C.gw7)({isPublic:!_,offset:t,limit:10,pricingTier:null,purchased:!1})},{onSuccess(){W()},refetchOnWindowFocus:!1,getNextPageParam:e=>parseInt(e.data.offset,10)+10>=e.data.total?null:parseInt(e.data.offset,10)+10}),{data:eF}=(0,p.useQuery)(["fetchCustomLinks"],C.bOz,{}),{data:eD,refetch:eW}=(0,p.useQuery)(["onlineStatusCreator"],C.yH1,{}),eq=(0,n.useMemo)(()=>{let e=K?K.map(e=>({Icon:j.R[e.id],id:e.id,label:j.Wx[e.id],url:e.url,onClick:()=>{window.open(e.url,"_blank")}})):[],t=null!=eF&&eF.data?eF.data.map(e=>{var t;let o=null===(t=w.Qw.find(t=>t.name===e.icon))||void 0===t?void 0:t.component;return{"data-testid":"",Icon:o,id:e.id,label:e.title,url:e.url,onClick:()=>{window.open(e.url,"_blank")}}}):[];return[...!(null!=e&&e.length)||eO&&null!=Q&&Q.showMobileSocialIcons?[]:[{disabled:!0,isGroupLabel:!0,label:"Social Media",id:"social-media-group"},...e],...null!=t&&t.length?[{disabled:!0,isGroupLabel:!0,label:"Links",id:"links-group"}]:[],...t]},[K,null==eF?void 0:eF.data,eO,Q]),{mutate:ez}=(0,p.useMutation)(C.W7B,{onSuccess:e=>{let t=new URL(document.location).searchParams,o=t.get("token");z({token:o,fullName:e.data.message.fullName??""}),e$("resetPassword",!0)},onError:e=>{ex(`The reset password confirmation token has a problem. The error provided by the backend is as follows : ${null==e?void 0:e.message}.`),e$("errorReset",!0),z({token:"",fullName:""})}}),eH=()=>eA.push(I.Z.Subscribe),eG=()=>e$("signUp",!0);(0,n.useEffect)(()=>{"true"===eA.query.register_status&&("false"!==eA.query.success_message&&ev("Success! Your email address has been verified. Please login below."),e$("signIn",!0),window.history.pushState({additionalInformation:document.title},document.title,"/"),eA.replace("/",void 0,{shallow:!0})),"true"===eA.query.reset_email&&(e$("forgotPassword",!0),window.history.pushState({additionalInformation:document.title},document.title,"/"),eA.replace("/",void 0,{shallow:!0})),"true"===eA.query.showEmailConfimModal&&e$("signUpEmail",!0)},[eA.query]);let eY=()=>{eA.push(I.Z.SubscriberChat),_?eA.push(I.Z.SubscriberChat):e$("signIn",!0)},eQ=e=>{let{postId:t}=e;eL.refetch({refetchPage:e=>e.data.data.some(e=>e.postId===t)})},eV=null!=Q&&Q.postBackgroundColor?Q.postBackgroundTransparency?(0,v.nfO)(Q.postBackgroundColor):Q.postBackgroundColor:v.O9T.baselineSurface;m=eO?{$border:"none !important",$borderRadius:"0 !important",$borderRadiusMobile:"0 !important",$boxShadow:"none !important",$backgroundColor:`${eV} !important`}:{$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 0 8px 8px !important",$backgroundColor:`${eV} !important`};let eK=e=>{D({acceptButtonText:"",description:(0,M.jsx)(ei,{children:(0,M.jsx)(v.$jN,{color:null==Q?void 0:Q.accentColor,size:80,position:"static"})})}),eL.refetch({refetchPage:t=>t.data.data.some(t=>t.postId===e)})},eX=(0,n.useMemo)(()=>{var e,t,o,i,n,r,l,s,c,u,p;let h=(null==eS?void 0:null===(e=eS.customPages)||void 0===e?void 0:null===(t=e[0])||void 0===t?void 0:t.graphicsPosition)==="topRight";return(0,M.jsxs)(a.Z,{children:[(0,M.jsx)(a.Z,{sx:h&&!eE?{float:"left",width:"calc(100% - 300px)",pr:5}:void 0,children:/<([a-z]+)(?![^>]*\/>)[^>]*>/.test((null==eS?void 0:null===(o=eS.customPages)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.body)||"")?(0,M.jsx)(el,{dangerouslySetInnerHTML:{__html:(null==eS?void 0:null===(n=eS.customPages)||void 0===n?void 0:null===(r=n[0])||void 0===r?void 0:r.body)||""}}):(0,v.Zmb)((null==eS?void 0:null===(l=eS.customPages)||void 0===l?void 0:null===(s=l[0])||void 0===s?void 0:s.body)||"")}),(0,M.jsx)(d.ZP,{direction:h||eE?"column":"row",flexWrap:eO?"wrap":"nowrap",container:!0,spacing:2,sx:h||eE?{width:300,margin:"0 auto"}:{mt:4},children:null==eS?void 0:null===(c=eS.customPages)||void 0===c?void 0:null===(u=c[0])||void 0===u?void 0:null===(p=u.customPagesMedia)||void 0===p?void 0:p.sort((e,t)=>t.order>e.order?-1:t.order<e.order?1:0).map(e=>{var t,o;return(0,M.jsx)(d.ZP,{item:!0,sx:{paddingLeft:{xs:"0px !important",md:"16px !important"}},xs:4,children:(0,M.jsx)(V,{matches:eE,graphicsPosition:null==eS?void 0:null===(t=eS.customPages)||void 0===t?void 0:null===(o=t[0])||void 0===o?void 0:o.graphicsPosition,media:e.media,url:e.url,isSmall:eO})},e.id)})})]})},[Q,eS,eO]);(0,n.useEffect)(()=>{let e=new URL(document.location).searchParams,t=e.get("token");if(t&&!_&&ez({token:t}),T){var o;let e;let t=null===(e=T.filter(e=>"UNLOCKS"!==e.tabKey).map(e=>X(X({},e),{},{label:e.name})),!R&&_&&(e=T.map(e=>X(X({},e),{},{label:e.name}))),o=e)||void 0===o?void 0:o.filter(e=>!e.hidden);eP(t),eI(t.find(e=>e.isDefault)||t[0])}},[T]);let eJ=()=>{var e;let t;switch(eS.tabKey){case"FEED":t=(0,M.jsx)(ee,{backgroundColor:eV,children:eL.isLoading&&-1===ed?(0,M.jsx)(eo,{$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 !important",$backgroundColor:eV,children:(0,M.jsx)(v.$jN,{color:null==Q?void 0:Q.accentColor,padding:"0 30px 0 30px",size:50,loadingText:"Please give us a moment while the feed loads..."})}):eL.isError?(0,M.jsx)(et,{$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 !important",$backgroundColor:eV,children:(0,M.jsx)(v.ZT$,{children:"* Staying mysterious, for now. Will reveal more about me soon."})}):0===ed?(0,M.jsx)(et,{$borderRadius:"0 8px 8px 8px !important",$borderRadiusMobile:"0 !important",$backgroundColor:eV,children:(0,M.jsx)(v.ZT$,{children:"Staying mysterious, for now. Will reveal more about me soon."})}):(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(F,{dataProfile:null==e_?void 0:null===(e=e_.data)||void 0===e?void 0:e.data,infiniteQuery:eL,isCreator:R,isSmall:eO,isUserAuthenticated:_,isUserPremium:R||L,onMediaError:eQ,onPurchaseSuccess:eK,onSubscribe:_?eH:eG,openRegisterModal:eG,scrollRef:eU,setCounterPost:ec,siteCustomization:Q,creatorName:G||""})})});break;case"MEDIA":t=(0,M.jsx)(ee,{backgroundColor:eV,children:eZ.isLoading&&-1===eu?(0,M.jsx)(eo,X(X({},m),{},{children:(0,M.jsx)(v.$jN,{color:null==Q?void 0:Q.accentColor,size:50,loadingText:"Please give us a moment while the media loads..."})})):eZ.isError?(0,M.jsx)(et,X(X({},m),{},{children:(0,M.jsx)(v.ZT$,{children:"* Staying mysterious, for now. Will reveal more about me soon."})})):0===eu?(0,M.jsx)(et,X(X({},m),{},{children:(0,M.jsx)(v.ZT$,{children:"Staying mysterious, for now. Will reveal more about me soon."})})):(0,M.jsx)(H,{siteCustomization:Q,isUserAuthenticated:_,setCounterPost:ep,infiniteQuery:eZ,onMediaError:eQ,openRegisterModal:eG,onPurchaseSuccess:eK,onSubscribe:_?eH:eG})});break;case"UNLOCKS":t=(0,M.jsxs)(ee,{backgroundColor:eV,children:[(0,M.jsx)(et,X(X({},m),{},{$margin:"0 0 24px 0 !important",$padding:"24px",children:(0,M.jsxs)(en,{children:[(0,M.jsx)(v.ZT$,{style:{paddingRight:8},children:"Show my paid posts only"}),(0,M.jsx)(v.rsf,{id:"switch-button","data-testid":"switch-button",onChange:()=>{ew(e=>!e),em(-1)},checked:ej})]})})),eB.isLoading&&-1===eh?(0,M.jsx)(eo,{children:(0,M.jsx)(v.$jN,{color:null==Q?void 0:Q.accentColor,size:50,loadingText:"Please give us a moment while the unlocks load..."})}):ej||0!==eh?eB.isError?(0,M.jsx)(et,{children:(0,M.jsx)(v.ZT$,{children:"* Staying mysterious, for now. Will reveal more about me soon."})}):0===eh?(0,M.jsx)(et,{$padding:"24px",children:(0,M.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,M.jsx)(v.ZT$,{style:{paddingBottom:8},children:"You have not unlocked any premium content yet."}),(0,M.jsx)(er,{onClick:()=>{ew(e=>!e),em(-1)},children:"See what’s available here."})]})}):(0,M.jsx)(F,{infiniteQuery:eB,isCreator:R,isSmall:eO,isUserAuthenticated:_,isUserPremium:R||L,onMediaError:eQ,onPurchaseSuccess:eK,onSubscribe:_?eH:eG,openRegisterModal:eG,scrollRef:eU,setCounterPost:em,siteCustomization:Q,creatorName:G||""}):(0,M.jsx)(et,{$padding:"24px",children:(0,M.jsx)(v.ZT$,{align:"center",children:"Come back soon and view exclusive content here."})})]});break;case"FASTCHANNEL":t=(0,M.jsx)(A.Z,{isCustomTab:!0});break;case"ADRIENNEPRESS":t=(0,M.jsx)(N.Z,{});break;default:t=(0,M.jsx)(ee,{backgroundColor:eV,children:(0,M.jsx)(et,X(X({$overflow:"hidden"},m),{},{children:eX}))})}return t},e0=eJ(),{0:e1,1:e5}=(0,n.useState)(0),e2=e=>{e5(e),eI(eC[e])},e8=e=>eJ(),e4=(0,n.useRef)(null);if((0,n.useEffect)(()=>{if(e4.current){let e=e4.current.children[2].children[0].children[e1];e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}},[e1]),O){let e=h.Z.get("splash-page-last-visit");if(void 0===e){if(_)h.Z.set("splash-page-last-visit",new Date().toString());else if(!_)return(0,M.jsx)(U,{})}}return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(g(),{children:[(0,M.jsx)("title",{children:(null==Q?void 0:Q.websiteTitle)||""}),(0,M.jsx)("meta",{property:"og:title",content:(null==Q?void 0:Q.websiteTitle)||""}),(0,M.jsx)("meta",{property:"og:description",content:(null==Q?void 0:Q.bio)||""}),(0,M.jsx)("meta",{property:"og:image",content:eN}),(null==Q?void 0:Q.faviconPreSignedUrl)&&(0,M.jsx)("link",{rel:"icon",href:Q.faviconPreSignedUrl,sizes:"any"})]}),(0,M.jsx)(y.IW,{linksDrawerItems:eq,openLinksDrawer:eb,refetchFeed:eL.refetch,resetCacheFeed:eL.remove,setOpenLinksDrawer:ey,title:Q.websiteTitle}),(0,M.jsx)(g(),{children:(null==k?void 0:null===(t=k.siteCustomization)||void 0===t?void 0:t.faviconPreSignedUrl)&&(0,M.jsx)("link",{rel:"icon",href:null==k?void 0:null===(o=k.siteCustomization)||void 0===o?void 0:o.faviconPreSignedUrl,sizes:"any"})}),(0,M.jsxs)(v.xFL,{aboutYou:eE?Q.shortAboutYou||Q.aboutYou||"":Q.aboutYou||"",avatar:(null==Q?void 0:Q.profilePicturePreSignedUrl)||"",buttonFont:null==Q?void 0:Q.siteBodyFont,color:(null==Q?void 0:Q.siteBodyFontColor)||"",creatorStatus:null==eD?void 0:eD.data,customLinks:null==eF?void 0:eF.data,disablePremiumButton:E,events:[],font:null==Q?void 0:Q.siteBodyFont,headerImage:(null==Q?void 0:Q.siteBannerPreSignedUrl)||"",homePageSummaries:Y,isAuthenticated:_,isCreator:R,isPremium:L,joinButtonBoldToggle:Q.joinButtonBoldToggle,joinButtonColorHex:Q.joinButtonColorHex,joinButtonLabel:Q.joinButtonLabel,mobileHeaderImage:(null==Q?void 0:Q.mobileSiteBannerPreSignedUrl)||(null==Q?void 0:Q.siteBannerPreSignedUrl)||"",name:G||"",onMessageClick:_?eY:eG,onSubscribe:_?eH:eG,pageBackgroundColor:(null==Q?void 0:Q.pageBackgroundColor)||"",pageBackgroundImageUrl:null==Q?void 0:Q.pageBackgroundImageUrl,ref:eU,refetchStatusCreator:eW,setOpenLinksDrawer:ey,siteCustomization:Q,socials:K,sponsorGraphic:(null==k?void 0:null===(i=k.siteCustomization)||void 0===i?void 0:i.sponsorGraphicPreSignedUrl)||"",sponsorGraphicPosition:(null==k?void 0:null===(c=k.siteCustomization)||void 0===c?void 0:c.sponsorGraphicPosition)||"left",children:[(0,M.jsxs)(J,{isSmall:eO,children:[(null==B?void 0:B.id_token)&&(0,M.jsx)(y.Fk,{refetchFeed:eL.refetch,resetCacheFeed:eL.remove,name:G||"",token:B.id_token,refetchStatusCreator:()=>eW()}),(0,M.jsx)(y.ao,{tabMui:!0,tabs:eC.filter(e=>!e.hidden),selected:eS,onChange:(e,t)=>{$.clearAll(),eI(eC[t]),e5(t),"Unlocks"===e.label&&ew(!1)},isSmall:eO,siteCustomization:Q,buttonStyle:{color:`${null==Q?void 0:Q.siteBodyFontColor}`,backgroundColor:`${eV}`},tabsRef:e4}),ek?(0,M.jsx)(r.ZP,{axis:"rtl"===eM.direction?"x-reverse":"x",index:e1,onChangeIndex:e2,enableMouseEvents:!1,children:eC.map((e,t)=>e8(e.tabKey))}):e0]}),(0,M.jsx)(b.l9,{showModal:es.signIn,closeModal:()=>e$("signIn",!1),customStyle:{maxWidth:"350px"},children:(0,M.jsx)(b.cL,{resetCacheFeed:eL.remove,refetchFeed:eL.refetch,successMessage:ef,handleBetweenSign:eR})}),(0,M.jsx)(b.l9,{showModal:es.signUp,closeModal:()=>e$("signUp",!1),customStyle:{maxWidth:"350px"},children:(0,M.jsx)(b.Mo,{handleBetweenSign:eR})}),(0,M.jsx)(b.l9,{showModal:es.forgotPassword,closeModal:()=>e$("forgotPassword",!1),customStyle:{maxWidth:"500px"},children:(0,M.jsx)(b.oP,{closeModal:()=>e$("forgotPassword",!1)})}),(0,M.jsx)(b.l9,{showModal:es.signUpEmail,closeModal:()=>e$("signUpEmail",!1),customStyle:{maxWidth:"450px"},children:(0,M.jsx)(b.GG,{closeModal:()=>{e$("signUpEmail",!1),eA.replace("/",void 0,{shallow:!0})}})}),(0,M.jsx)(b.l9,{showModal:es.resetPassword,closeModal:()=>e$("resetPassword",!1),customStyle:{maxWidth:"700px"},children:(0,M.jsx)(b.tq,{tokenInfo:q,setTokenInfo:z,successMessage:ef,setSuccessMessage:ev,setErrorSubtitle:ex,handleBetweenSign:eR,closeModal:()=>e$("resetPassword",!1)})}),(0,M.jsx)(b.l9,{showModal:es.errorReset,closeModal:()=>e$("errorReset",!1),customStyle:{maxWidth:"450px"},children:(0,M.jsx)(b.jj,{subTitle:eg,closeModal:()=>e$("errorReset",!1)})})]}),Z]})};var ea=!0},21086:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return o(15526)}])}},function(e){e.O(0,[3755,1485,9069,3155,4621,4032,9774,2888,179],function(){return e(e.s=21086)}),_N_E=e.O()}]);