try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="caad10c0-699f-45f1-ae19-4ee5b5f5f761",e._sentryDebugIdIdentifier="sentry-dbid-caad10c0-699f-45f1-ae19-4ee5b5f5f761")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"dd305b9a707fe1fc2ae01eb09726abafb220e121"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var l=t(96540),o=t(83937),a=t(46587),i=t(43891),s=t(71282),d=t(42711),r=t(74848);const c=e=>{let{daysRemaining:n,onOptOutClick:t,isFailure:l}=e;return(0,r.jsx)(o.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:l?(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:[n," days"]}),"."]}),(0,r.jsx)(o.TextBigger,{children:"Enjoy the best of Netdata!"}),"function"===typeof t&&(0,r.jsx)(d.A,{onOptOutClick:t})]})})};var f=t(6304),u=t(3203),g=t(60908),h=t(10444),p=t(10853),y=t(68399),x=t(53142),b=t(18739),m=t(24285);const j=(0,u.A)(o.Button),w=(0,l.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:n}=(0,p.A)(),t=(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,b.i5)(),P=(0,l.useCallback)((()=>{A(),F({email:d}).then((()=>{setTimeout((()=>{I(),B(),E()}),2e3)})).catch((()=>{E()}))}),[d]),v=(0,l.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(y.$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:t,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:n,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(y.$B,!0),!C&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),M(!0)},disabled:k,...v})]})})]})})}):null:null}))},43891:(e,n,t)=>{t.d(n,{K:()=>a,P:()=>i});var l=t(33185),o=t(83937);const a=l.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),i=(0,l.default)(o.ModalContent).attrs((e=>{let{isMobile:n}=e;return{width:n?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);