File: //opt/netdata/netdata-web-files/v3/4484.5fcc729f6828e38506f7.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38fffcee-c03e-4c85-a4cf-8946b07b86bb",e._sentryDebugIdIdentifier="sentry-dbid-38fffcee-c03e-4c85-a4cf-8946b07b86bb")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0d597b660e680dc5bde02dc0a1a30ba3e59b2b5c"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484:(e,t,l)=>{l.r(t),l.d(t,{default:()=>w});var n=l(96540),i=l(86177),o=l(46587),a=l(43891),s=l(71282),r=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)(r.A,{onOptOutClick:l})]})})};var u=l(6304),f=l(94404),g=l(60908),h=l(10444),p=l(10853),y=l(68399),b=l(53142),m=l(18739),x=l(24285);const j=(0,f.A)(i.Button),w=(0,n.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,h.J)(),r=(0,o.uW)("email"),[f,,,w]=(0,u.A)(!0),[T,,C]=(0,u.A)(),{isFailure:_,reset:A}=(0,b.A)(),[B,,k,I]=(0,u.A)(),{refreshPlan:M}=(0,p.A)(),[,E]=(0,x.ng)("trialModalDismissed"),F=(0,m.i5)(),v=(0,n.useCallback)((()=>{k(),F({email:r}).then((()=>{setTimeout((()=>{M(),A(),I()}),2e3)})).catch((()=>{I()}))}),[r]),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)(s.A,{onDecline:C,onCancellingEnd:()=>{localStorage.setItem(y.$B,!0),C(),w()}}):f?(0,d.jsx)(i.Modal,{backdropProps:{backdropBlur:!0},children:(0,d.jsx)(g.Ay,{feature:"TrialWelcome",children:(0,d.jsxs)(a.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:v,disabled:B,isLoading:B}),(0,d.jsx)(j,{onClick:()=>{w(),A(),localStorage.setItem(y.$B,!0),!_&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),E(!0)},disabled:B,...P})]})})]})})}):null:null}))},43891:(e,t,l)=>{l.d(t,{K:()=>o,P:()=>a});var n=l(33185),i=l(86177);const o=n.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),a=(0,n.default)(i.ModalContent).attrs((e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);