PageSourceSearch

https://insighttimer.com/static/js/4164.4b6ad1aa.chunk.js

js insighttimer.com collected 2026-09-24 08:27:47 UTC 7,329 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkinsight_timer=self.webpackChunkinsight_timer||[]).push([[4164],{66069:(e,r,i)=>{i.d(r,{A:()=>s});var t=i(97207),n=(i(95254),i(64582));const s=e=>{var r;const{bgColor:i,backgroundColor:s,background:l}=e,o=null!==(r=null!==i&&void 0!==i?i:s)&&void 0!==r?r:l;return(0,n.jsx)(t.$,{_hover:{opacity:.7,bgColor:o},borderRadius:"6px",padding:["11px 10px 14px 10px","11px 10px 14px 10px","15px 10px 16px 10px"],...e})}},84164:(e,r,i)=>{i.r(r),i.d(r,{default:()=>L});var t=i(78675),n=i(39654),s=i(20704),l=i(9242),o=i(4021),a=i(25325),c=i(95620),u=i(42522),d=i(54541),x=i(32104),h=i(67850),p=i(9619),g=i(95254),m=i(97877);const S=e=>{if(null===e||void 0===e||!e.length)return!1;return!!e.find((e=>e.current_period_end>Date.now()))};var C=i(89728),I=i(15263),j=i(56087),b=i(6547),f=i(12867),_=i(91796),v=i(54154),E=i(66069),N=i(36658),R=i(31624),O=i(80288),y=i(29220),A=i(32094),w=i(64582);const B=A.sL,H=e=>{var r;let{subscriptionList:i,course:t,onSuccess:n}=e;const s=(0,y.A)(i),{isGlobalStatsLoading:l,courses_all:a}=(0,R.A)(),c=null!==(r=null===a||void 0===a?void 0:a.toLocaleString())&&void 0!==r?r:"";return(0,w.jsx)(o.a,{paddingBottom:["20px","20px","40px"],paddingX:["40px","40px","130px"],children:(0,w.jsx)(o.a,{position:"relative",children:(0,w.jsxs)(f.A,{container:!0,direction:"column",className:"h-full",alignItems:"stretch",children:[(0,w.jsx)(f.A,{item:!0,className:"pt-16 w-full text-right"}),(0,w.jsx)(f.A,{item:!0,className:"mb-4",children:(0,w.jsx)(C.D,{as:"h5",fontSize:"24px",lineHeight:"34px",fontWeight:500,color:"neutral.700",textAlign:"center",children:(0,w.jsx)(w.Fragment,{children:"Subscribe to MemberPlus"})})}),(0,w.jsx)(f.A,{item:!0,children:(0,w.jsx)(I.E,{maxWidth:"400px",marginX:"auto",fontSize:"16px",lineHeight:"23p",fontWeight:400,textAlign:"center",color:"neutral.600",children:(0,w.jsx)(w.Fragment,{children:"Courses are a premium offering and require an active subscription"})})}),(0,w.jsx)(f.A,{item:!0,className:"py-8",children:(0,w.jsx)("hr",{className:"border-grey_e6"})}),(0,w.jsx)(f.A,{item:!0,children:(0,w.jsxs)("div",{className:"relative",children:[(0,w.jsxs)("div",{className:"flex items-start",children:[(0,w.jsx)(v.h,{style:{width:"auto",height:"28px",marginTop:"-4px"}}),(0,w.jsxs)(o.a,{textAlign:"right",flexGrow:1,marginLeft:"5px",children:[(0,w.jsx)(C.D,{as:"h6",fontSize:"18px",lineHeight:"27px",fontWeight:700,color:"neutral.700",children:s?(0,w.jsxs)(w.Fragment,{children:["$",B,"/year"]}):(0,w.jsx)(w.Fragment,{children:"7 Day Free Trial"})}),(0,w.jsx)(I.E,{fontSize:"14px",lineHeight:"21px",fontWeight:700,color:"neutral.500",children:(0,w.jsxs)(w.Fragment,{children:["Then US$ ",B,"/year"]})})]})]}),(0,w.jsxs)(I.E,{fontSize:"16px",lineHeight:"23px",fontWeight:400,color:"neutral.600",maxWidth:"400px",marginTop:"4px",marginBottom:"32px",children:[s&&(0,w.jsx)(w.Fragment,{children:"Subscribe"})||(0,w.jsx)(w.Fragment,{children:"Start your 7 day free trial then subscribe"})," ",l?(0,w.jsx)(j.E,{width:"50%",height:"40px",borderRadius:"10px"}):(0,w.jsxs)(w.Fragment,{children:["to unlock all ",c," Insight Courses, Playlists and premium features."]})]})]})}),(0,w.jsx)(f.A,{item:!0,children:(0,w.jsx)(I.E,{fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"neutral.600",children:s?(0,w.jsxs)(w.Fragment,{children:["Your annual subscription will automatically renew after one year at USD ",B,"."]}):(0,w.jsxs)(w.Fragment,{children:["You may cancel your subscription any time within the trial at no charge. Your annual subscription will automatically begin after 7 days at USD ",B,"/year."]})})}),(0,w.jsx)(f.A,{item:!0,children:(0,w.jsx)(N.A,{handleSubmit:async e=>{var r,i,s,l;let{recaptchaToken:o,userData:a,stripe:c,elements:u,hasTrialled:d}=e;const x=null===u||void 0===u?void 0:u.getElement(_.CardNumberElement);if(!x)return;const h=await(null===c||void 0===c?void 0:c.createSource(x,{type:"card",owner:a}));if(null!==h&&void 0!==h&&h.error)throw new Error(h.error.message);if(null===h||void 0===h||null===(r=h.source)||void 0===r||!r.id)throw new Error("There is some issue in payment processing. Please try again later.");const p={subscription_reason:"web_course_paywall",subscription_reason_
1item_id:t.id,subscription_reason_item_type:"LIBRARY_ITEMS"};await(0,O.B1)(null!==(i=a.email)&&void 0!==i?i:"",null!==(s=null===h||void 0===h||null===(l=h.source)||void 0===l?void 0:l.id)&&void 0!==s?s:"",null!==O.I&&void 0!==O.I?O.I:"",d?A.S1:O.ZJ,p,{"g-recaptcha-token":o})&&n()},renderSubmitButton:e=>{let{isSubmitting:r}=e;return(0,w.jsx)(E.A,{type:"submit",color:"neutral.0",bgColor:"yellow.400",borderRadius:"12px",width:"100%",height:"50px",fontSize:"18px",lineHeight:"25px",fontWeight:500,disabled:r,_hover:{bgColor:"yellow.400"},children:r?(0,w.jsx)(b.A,{className:"w-6 h-6 text-black"}):s?(0,w.jsx)(w.Fragment,{children:"Start Subscription"}):(0,w.jsx)(w.Fragment,{children:"Start free trial"})})}})})]})})})};var T=i(3119);const F=()=>(0,w.jsxs)(I.E,{paddingY:"10px",color:"neutral.0",width:"100%",textAlign:"center",zIndex:1e3,children:["By continuing you agree to our"," ",(0,w.jsx)(T.N,{href:"/legal/terms-of-service",target:"_blank",rel:"noopener noreferrer",fontWeight:500,children:"Terms"},"terms")]}),U=e=>{let{course:r,onStageChange:i,metaRef:C}=e;const{user:I}=(0,x.t7)(),[j,b]=(0,g.useState)(void 0),{isOpen:f,onOpen:_,onClose:v}=(0,t.j)(),{authState:E}=(0,x.t7)(),{isLoading:N,isSubscriber:R}=(0,h.H7)(),{isFetchingSubscriptions:O,subscriptionList:y}=(0,p.A)(),{showLoginPopup:A}=(0,d.YF)(),B=(0,g.useRef)({onStageChange:i});B.current.onStageChange=i;const T="SUBSCRIPTION_FORM"===j&&!O&&r,U=()=>{v(),"SUBSCRIBED"!==j&&b("MODAL_CLOSED")};(0,g.useEffect)((()=>{B.current.onStageChange&&B.current.onStageChange(j)}),[j]),(0,g.useEffect)((()=>{if(E!==x.kj.PENDING&&"CHECK_LOGIN"===j){if(E===x.kj.AUTHORIZED)return void b("CHECKING_SUBSCRIPTION");b("AUTH_FORM"),A({onSuccess:()=>{b("CHECKING_SUBSCRIPTION")},onModalClose:e=>{e||b("MODAL_CLOSED")}})}}),[j,E,A]),(0,g.useEffect)((()=>{"CHECKING_SUBSCRIPTION"===j&&null!==I&&void 0!==I&&I.uid&&!N&&!O&&null!==r&&void 0!==r&&r.id&&("INSIGHT_FREE_COURSE"!==r.purchase_tier?R||y&&S(y)?b("ALREADY_MEMBER"):(0,m.W_)({userId:I.uid,courseId:r.id}).then((e=>{null!==e&&void 0!==e&&e.is_purchased_separately?b("ALREADY_MEMBER"):(b("SUBSCRIPTION_FORM"),_())})).catch((()=>{b("SUBSCRIPTION_FORM"),_()})):b("SUBSCRIBED"))}),[j,_,N,R,I,y,O,r]);const L=(0,g.useCallback)((async()=>{b("CHECK_LOGIN")}),[]);return(0,g.useImperativeHandle)(C,(()=>({checkSubscription:L}))),(0,w.jsxs)(c.A,{closeOnEsc:"CHECK_LOGIN"!==j&&"CHECKING_SUBSCRIPTION"!==j,closeOnOverlayClick:"CHECK_LOGIN"!==j&&"CHECKING_SUBSCRIPTION"!==j,size:"2xl",isOpen:f,isCentered:"SUBSCRIPTION_FORM"!==j,preserveScrollBarGap:!0,blockScrollOnMount:!0,onClose:()=>{U()},children:[(0,w.jsx)(n.m,{}),(0,w.jsxs)(s.$,{borderRadius:"12px",bgColor:"neutral.0",children:["CHECKING_SUBSCRIPTION"!==j&&(0,w.jsx)(u.A,{zIndex:10,onClick:U}),(0,w.jsxs)(l.c,{padding:"0px",children:["CHECKING_SUBSCRIPTION"===j&&(0,w.jsx)(a.A,{minHeight:"200px"}),T?(0,w.jsx)(H,{course:r,subscriptionList:y,onSuccess:()=>{b("SUBSCRIBED"),v()}}):null]}),"SUBSCRIPTION_FORM"===j&&(0,w.jsx)(o.a,{position:"absolute",bottom:"-44px",left:"0px",width:"100%",children:(0,w.jsx)(F,{})})]})]})},L=e=>(0,w.jsx)(U,{...e})}}]);
2//# sourceMappingURL=4164.4b6ad1aa.chunk.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.