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]="5785c574-abf9-4c20-9c48-62c1a5d43086",e._sentryDebugIdIdentifier="sentry-dbid-5785c574-abf9-4c20-9c48-62c1a5d43086")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"c6e90b75029143378cf96f31f3bee729c9327ca4"};(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),i=n(46587),s=n(43891),a=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 u=n(6304),f=n(3203),g=n(60908),h=n(10444),p=n(10853),x=n(68399),y=n(53142),m=n(18739),b=n(24285);const j=(0,f.A)(o.Button),w=(0,t.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:l}=(0,p.A)(),n=(0,h.J)(),d=(0,i.uW)("email"),[f,,,w]=(0,u.A)(!0),[T,,_]=(0,u.A)(),{isFailure:C,reset:B}=(0,y.A)(),[k,,A,E]=(0,u.A)(),{refreshPlan:I}=(0,p.A)(),[,M]=(0,b.ng)("trialModalDismissed"),F=(0,m.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)(a.A,{onDecline:_,onCancellingEnd:()=>{localStorage.setItem(x.$B,!0),_(),w()}}):f?(0,r.jsx)(o.Modal,{backdropProps:{backdropBlur:!0},children:(0,r.jsx)(g.Ay,{feature:"TrialWelcome",children:(0,r.jsxs)(s.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(x.$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:()=>i,P:()=>s});var t=n(33185),o=n(99275);const i=t.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),s=(0,t.default)(o.ModalContent).attrs((e=>{let{isMobile:l}=e;return{width:l?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);