!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"8754b08e308d2722ff43ad1473703ef3d578ce90"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f7bec544-fbaa-4c89-8cb1-4214a08b8090",e._sentryDebugIdIdentifier="sentry-dbid-f7bec544-fbaa-4c89-8cb1-4214a08b8090")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[4484],{14484(e,t,l){l.r(t),l.d(t,{default:()=>w});var n=l(96540),i=l(56327),a=l(46587),o=l(43891),r=l(71282),s=l(42711),d=l(74848);const c=e=>{let{daysRemaining:t,onOptOutClick:l,isFailure:n}=e;return(0,d.jsx)(i.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,d.jsx)(i.TextBigger,{lineHeight:1.5,children:"Something unexpected happened when trying to enrol you to the free Business trial."})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.TextBigger,{lineHeight:1.5,strong:!0,children:["Your ",t,"-day trial has started, giving you access to all premium features and 10 free Netdata AI credits to help you troubleshoot faster."]}),(0,d.jsxs)(i.TextBigger,{lineHeight:1.5,children:["At the end of your trial, you can choose to upgrade to a paid plan, alternatively your space will automatically switch to the"," ",(0,d.jsx)(i.TextBigger,{lineHeight:1.5,strong:!0,children:"Free Community plan."})]}),(0,d.jsx)(i.TextBigger,{lineHeight:1.5,children:"Happy monitoring!"}),"function"===typeof l&&(0,d.jsx)(s.A,{onOptOutClick:l})]})})};var u=l(6304),g=l(94404),h=l(60908),f=l(10444),p=l(10853),m=l(68399),x=l(53142),y=l(18739),b=l(24285);const j=(0,g.A)(i.Button),w=(0,n.memo)(()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,f.J)(),s=(0,a.uW)("email"),[g,,,w]=(0,u.A)(!0),[T,,C]=(0,u.A)(),{isFailure:_,reset:A}=(0,x.A)(),[B,,k,I]=(0,u.A)(),{refreshPlan:M}=(0,p.A)(),[,v]=(0,b.ng)("trialModalDismissed"),E=(0,y.i5)(),F=(0,n.useCallback)(()=>{k(),E({email:s}).then(()=>{setTimeout(()=>{M(),A(),I()},2e3)}).catch(()=>{I()})},[s]),P=(0,n.useMemo)(()=>_?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"},[_]);return e?T?(0,d.jsx)(r.A,{onDecline:C,onCancellingEnd:()=>{localStorage.setItem(m.$B,!0),C(),w()}}):g?(0,d.jsx)(i.Modal,{backdropProps:{backdropBlur:!0},children:(0,d.jsx)(h.Ay,{feature:"TrialWelcome",children:(0,d.jsxs)(o.P,{isMobile:l,children:[(0,d.jsx)(i.ModalHeader,{children:(0,d.jsxs)(i.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(i.Icon,{name:"netdataPress",color:"text"}),(0,d.jsx)(i.H4,{children:"Welcome to Netdata!"})]})}),(0,d.jsx)(i.ModalBody,{children:(0,d.jsx)(c,{daysRemaining:t,isFailure:_})}),(0,d.jsx)(i.ModalFooter,{children:(0,d.jsxs)(i.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:[_&&(0,d.jsx)(j,{feature:"RetryTrialEnrolment",label:"Retry",onClick:F,disabled:B,isLoading:B}),(0,d.jsx)(j,{onClick:()=>{w(),A(),localStorage.setItem(m.$B,!0),!_&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),v(!0)},disabled:B,...P})]})})]})})}):null:null})},43891(e,t,l){l.d(t,{K:()=>a,P:()=>o});var n=l(882),i=l(56327);const a=n.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),o=(0,n.default)(i.ModalContent).attrs(e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}}).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);