File: //opt/netdata/usr/local/local/local/share/netdata/web/v3/2201.c8c16da01d51d47faefd.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"0725d67f2585acd82a0d73d488b6cd9060c3224d"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fc0def94-2c17-4499-b966-0f3959ff8c4a",e._sentryDebugIdIdentifier="sentry-dbid-fc0def94-2c17-4499-b966-0f3959ff8c4a")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[2201,4582],{52201(e,n,t){t.r(n),t.d(n,{OptOut:()=>j.A,OptOutModal:()=>A.A,TrialMessage:()=>k.A,TrialWarning:()=>y,default:()=>T,useBusinessPlan:()=>w.A,useTrial:()=>o.A});var l=t(46587),r=t(96540),s=t(7960),a=t(24285),o=t(10853),i=t(60266),d=t(19707),u=t(10444),c=t(34495),h=t(74848);const p=(0,s.A)(()=>Promise.resolve().then(t.bind(t,34495)),"PostSignup"),f=(0,s.A)(()=>t.e(4484).then(t.bind(t,14484)),"TrialWelcome"),g=(0,s.A)(()=>t.e(3718).then(t.bind(t,11337)),"BumpedWarning"),x=(0,s.A)(()=>t.e(2108).then(t.bind(t,62108)),"OnboardingForm"),b=()=>{const{isEarlybirdAndCommunitySunset:e}=(0,i.A)(),{trialWelcomeVisible:n,paymentProvider:t}=(0,o.A)(),{email:s,isAnonymous:b}=(0,l.uW)(),[m]=(0,a.tF)("signupSurveySubmitted"),y=(0,d.I)(),[j]=(0,c.usePostSignup)(),A=(0,u.J)();if(!e&&!y&&"AWS"!==t&&!b&&!m)return(0,h.jsx)(r.Suspense,{fallback:"",children:(0,h.jsx)(x,{email:s})});if(A&&!j)return(0,h.jsx)(r.Suspense,{fallback:"",children:(0,h.jsx)(p,{})});const k=e?g:n?f:null;return k?(0,h.jsx)(r.Suspense,{fallback:"",children:(0,h.jsx)(k,{})}):null},m=(0,s.A)(()=>Promise.resolve().then(t.bind(t,44913)),"Warnings"),y=e=>(0,l.uW)("isAnonymous")?null:(0,h.jsx)(r.Suspense,{fallback:"",children:(0,h.jsx)(m,{...e})});var j=t(42711),A=t(71282),k=t(3033),w=t(2652);const T=()=>{const e=(0,l.uW)("isAnonymous");return window.envSettings.onprem||e?null:(0,h.jsx)(b,{})}},34495(e,n,t){t.r(n),t.d(n,{default:()=>c,usePostSignup:()=>u});var l=t(96540),r=t(76667),s=t(78904),a=t(46587),o=t(10444),i=t(79748),d=t(74848);const u=()=>{const e=`postsignup-disnissed-${(0,a.NJ)()}`;return[localStorage.getItem(e),(0,l.useCallback)(()=>{localStorage.setItem(e,!0)},[e])]},c=()=>{const e=(0,r.Zp)(),{pathname:n}=(0,r.zy)(),[,t]=u(),a=(0,o.J)(),c=(0,l.useCallback)(()=>{t(),e(n,{replace:!0})},[n,t]);return(0,d.jsx)(s.Modal,{backdropProps:{backdropBlur:!0},children:(0,d.jsxs)(s.ModalContent,{width:a?{base:"95vw"}:{},children:[(0,d.jsx)(s.ModalHeader,{children:(0,d.jsxs)(s.Flex,{gap:2,alignItems:"center",children:["Tip",(0,d.jsx)(s.ModalCloseButton,{testId:"close-button",onClose:c})]})}),(0,d.jsx)(s.ModalBody,{children:(0,d.jsxs)(s.Flex,{column:!0,gap:3,width:{max:120},padding:[0,0,4,0],children:[(0,d.jsx)(s.TextBigger,{lineHeight:1.5,children:"Netdata works best on larger screens. Try logging in from a laptop, desktop or tablet for the ultimate dashboard adventure."}),(0,d.jsxs)(s.TextBigger,{lineHeight:1.5,children:["Installing the Netdata agent takes less than a minute, check out the"," ",(0,d.jsx)(i.A,{Component:s.TextBigger,href:"https://www.youtube.com/watch?v=z5m8JdwMOn8",target:"_blank",rel:"noopener noreferrer",children:"video"})," ","and try it out yourself!"]})]})}),(0,d.jsx)(s.ModalFooter,{children:(0,d.jsx)(s.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:(0,d.jsx)(s.Button,{label:"Dismiss",flavour:"hollow",onClick:c})})})]})})}},71282(e,n,t){t.d(n,{A:()=>x});var l=t(96540),r=t(63950),s=t.n(r),a=t(78904),o=t(18739),i=t(63872),d=t(60908),u=t(94404),c=t(3319),h=t(6304),p=t(37785),f=t(74848);const g=(0,u.A)(a.Button),x=e=>{let{onConfirm:n,onDecline:t=s(),onCancellingEnd:r=s()}=e;const u=(0,o.M4)(),[x,b]=(0,i.A)(),{id:m}=(0,p.A)(),{sendLog:y,isReady:j}=(0,c.A)(),[A,,k,w]=(0,h.A)(),T=(0,l.useCallback)(()=>{k(),u({productId:m}).then(()=>{x({header:"Successfully canceled subscription",text:"You are now on Community plan"}),y({feature:"TrialOptOut",isSuccess:!0})}).catch(()=>{b({header:"Failed to cancel the subscription",text:"Remained on Business plan"}),y({feature:"TrialOptOut",isFailure:!0,error:"Failed to cancel the subscription"})}).finally(()=>{r(),w()})},[m,j]),C=(0,l.useCallback)(()=>{n?n():T()},[n,T]);return(0,f.jsx)(a.Modal,{backdropProps:{backdropBlur:!0},children:(0,f.jsx)(d.Ay,{feature:"TrialOptOut",children:(0,f.jsxs)(a.ModalContent,{width:{base:140},children:[(0,f.jsx)(a.ModalHeader,{children:(0,f.jsx)(a.Flex,{gap:2,alignItems:"center",children:(0,f.jsx)(a.H4,{children:"Opt out of Free Trial"})})}),(0,f.jsx)(a.ModalBody,{children:A?(0,f.jsx)(a.Flex,{height:"100px",children:(0,f.jsx)(a.TextBig,{children:"Changing billing plan..."})}):(0,f.jsxs)(a.Flex,{gap:2,column:!0,children:[(0,f.jsx)(a.H3,{children:"Are You Sure?"}),(0,f.jsx)(a.TextBig,{children:"It looks like you have chosen to opt-out of your free 14-day business trial. Are you sure you do not want to experience all the features Netdata has to offer?"}),(0,f.jsx)(a.TextBig,{children:"By opting out, you will be downgraded to the community plan immediately."})]})}),(0,f.jsx)(a.ModalFooter,{children:(0,f.jsxs)(a.Flex,{justifyContent:"end",gap:4,padding:[1,2],children:[(0,f.jsx)(g,{feature:"TrialOptOut",label:"Yes, I am sure!",flavour:"hollow",small:!0,onClick:C,disabled:!m||A,textTransform:""}),(0,f.jsx)(g,{feature:"TrialOptOut",label:"No, I want the trial!",small:!0,onClick:t,disabled:A,textTransform:""})]})})]})})})}},42711(e,n,t){t.d(n,{A:()=>u});var l=t(96540),r=t(63950),s=t.n(r),a=t(78904),o=t(3319),i=t(74848);const d={default:"Or you can opt to downgrade immediately",billing:"Or you can opt to downgrade immediately"},u=e=>{let{flavour:n="default",onOptOutClick:t=s(),...r}=e;const{sendLog:u,isReady:c}=(0,o.A)(),h=(0,l.useCallback)(()=>{t(),u({feature:"TrialOptOut",isStart:!0})},[c]);return(0,i.jsxs)(a.Text,{...r,children:["After the trial, you'll automatically switch to the free Community plan."," ",(0,i.jsx)(a.Box,{"data-testid":"upgrade-to-business-banner",onClick:h,as:a.Text,cursor:"pointer",textDecoration:"underline",color:"primary",children:d[n]}),"."]})}},37785(e,n,t){t.d(n,{A:()=>i,s:()=>o});var l=t(18739),r=t(18387),s=t(50979);const a=e=>{const{value:n}=(0,l.lU)();if(!n?.[e])return{};const t=Object.keys(n[e]).sort(r.M7)[0];return{id:n[e][t]?n[e][t][0]?.id:null,version:t}},o=()=>a(s.VH.homelab),i=()=>a(s.VH.free)}}]);