try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="fc1ab5c7-f45f-4d19-afb4-f2393bf5daca",e._sentryDebugIdIdentifier="sentry-dbid-fc1ab5c7-f45f-4d19-afb4-f2393bf5daca")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"3c3ec92b9804220c7220d2a736674a446591eb9f"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484:(e,l,n)=>{n.r(l),n.d(l,{default:()=>w});var t=n(96540),o=n(99275),a=n(46587),i=n(43891),s=n(71282),d=n(42711),r=n(74848);const c=e=>{let{daysRemaining:l,onOptOutClick:n,isFailure:t}=e;return(0,r.jsx)(o.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,r.jsx)(o.TextBigger,{lineHeight:1.5,children:"Something unexpected happened when trying to enrol you to the free Business trial."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.TextBigger,{lineHeight:1.5,children:["We are happy to upgrade your account to Netdata Business, for free, for"," ",(0,r.jsxs)(o.TextBigger,{strong:!0,children:[l," days"]}),"."]}),(0,r.jsx)(o.TextBigger,{children:"Enjoy the best of Netdata!"}),"function"===typeof n&&(0,r.jsx)(d.A,{onOptOutClick:n})]})})};var f=n(6304),u=n(3203),g=n(60908),h=n(10444),p=n(10853),b=n(68399),x=n(53142),y=n(18739),m=n(24285);const j=(0,u.A)(o.Button),w=(0,t.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:l}=(0,p.A)(),n=(0,h.J)(),d=(0,a.uW)("email"),[u,,,w]=(0,f.A)(!0),[T,,_]=(0,f.A)(),{isFailure:C,reset:B}=(0,x.A)(),[k,,A,E]=(0,f.A)(),{refreshPlan:I}=(0,p.A)(),[,M]=(0,m.ng)("trialModalDismissed"),F=(0,y.i5)(),P=(0,t.useCallback)((()=>{A(),F({email:d}).then((()=>{setTimeout((()=>{I(),B(),E()}),2e3)})).catch((()=>{E()}))}),[d]),R=(0,t.useMemo)((()=>C?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}),[C]);return e?T?(0,r.jsx)(s.A,{onDecline:_,onCancellingEnd:()=>{localStorage.setItem(b.$B,!0),_(),w()}}):u?(0,r.jsx)(o.Modal,{backdropProps:{backdropBlur:!0},children:(0,r.jsx)(g.Ay,{feature:"TrialWelcome",children:(0,r.jsxs)(i.P,{isMobile:n,children:[(0,r.jsx)(o.ModalHeader,{children:(0,r.jsxs)(o.Flex,{gap:2,alignItems:"center",children:[(0,r.jsx)(o.Icon,{name:"netdataPress",color:"text"}),(0,r.jsx)(o.H4,{children:"Welcome to Netdata!"})]})}),(0,r.jsx)(o.ModalBody,{children:(0,r.jsx)(c,{daysRemaining:l,isFailure:C})}),(0,r.jsx)(o.ModalFooter,{children:(0,r.jsxs)(o.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:[C&&(0,r.jsx)(j,{feature:"RetryTrialEnrolment",label:"Retry",onClick:P,disabled:k,isLoading:k}),(0,r.jsx)(j,{onClick:()=>{w(),B(),localStorage.setItem(b.$B,!0),!C&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),M(!0)},disabled:k,...R})]})})]})})}):null:null}))},43891:(e,l,n)=>{n.d(l,{K:()=>a,P:()=>i});var t=n(33185),o=n(99275);const a=t.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),i=(0,t.default)(o.ModalContent).attrs((e=>{let{isMobile:l}=e;return{width:l?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);