File: //opt/netdata/usr/local/share/netdata/web/v3/1368.19c1bff2c401faaa738c.chunk.js
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]="752a3adc-d333-4026-b63b-42ff61101809",e._sentryDebugIdIdentifier="sentry-dbid-752a3adc-d333-4026-b63b-42ff61101809")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"5ded98bed5f4589e490b1beae30dccf288de26e3"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1368],{41368:(e,n,a)=>{a.r(n),a.d(n,{default:()=>B});var t=a(96540),d=a(92415),r=a(12268),o=a(32370),s=a(41394),i=a(45710),l=a(42539),u=a(52365),f=a(84287);function c(e,n){return(0,f.k)(e,(0,u.A)(e),n)}var p=a(85577),b=a(56171),g=a(45087),x=a(6304),h=a(94404),w=a(78152),y=a(10853),D=a(51262),A=a(60266),I=a(68399),j=a(99243),k=a(77058),m=a(2652),v=a(74848);const S=w.DO?(0,r.D)(new Date(2025,10,30)):(0,r.D)(new Date(2024,11,31)),U=new Date,E=(T=(0,h.A)(j.PL),e=>{let{canUpgrade:n,...a}=e;return n?(0,v.jsx)(T,{...a}):(0,v.jsx)(g.A,{content:"You don't have permissions to upgrade the plan",children:(0,v.jsx)(d.Flex,{children:(0,v.jsx)(T,{disabled:!0,...a})})})});var T;const B=e=>{let{flavour:n="banner"}=e;const{onTrial:a,sidebarWarningVisible:r,bannerVisible:u,dismissBanner:f,type:g,canUpgrade:h,planIsFreeOrEarlyBird:w}=(0,y.A)(),{coupon:T}=(0,A.A)(),{loaded:B,isNewUser:C}=(0,D.A)(),_=B&&C&&parseFloat((S-U)/1e3/60/60/24),R=T||(_>0?"BF1Y2025":""),F=(0,m.A)(R),P=(!!R||!a)&&w,[H,M]=(0,x.A)();return(0,t.useEffect)((()=>{const e=localStorage.getItem("dismissSidebarBanner");e&&(0,o.f)((0,s.H)(e))&&!(0,i.R)((0,s.H)(e))||M(!0)}),[]),"sidebar"===n&&(r||P)?H?(0,v.jsxs)(j.bg,{type:a?g:"default",column:!0,gap:2,margin:[2],padding:[2],children:[(0,v.jsx)(d.Box,{"data-testid":"close-button",as:d.Icon,color:"text",cursor:"pointer",name:"x",position:"absolute",right:"2px",top:"2px",width:"12px",height:"12px",onClick:()=>{M(),localStorage.setItem("dismissSidebarBanner",(0,l.W)(new Date,{days:2}).toISOString())}}),(0,v.jsx)(k.A,{flavour:a?n:"freePlanUpgrade",couponRemainingDays:_,expDate:S,onUpdateClick:F}),(0,v.jsx)(E,{feature:"UpgradeToBusiness",isStart:!0,small:!0,"data-testid":"upgradeToBusiness-sidebar",label:_>0?"Upgrade & Save":"Upgrade",canUpgrade:h,onClick:F,days:_}),_>0&&(0,o.f)(S)&&(0,v.jsx)(d.TextNano,{strong:!0,textAlign:"center",lineHeight:.8,children:_<3?`Expires ${c(S,{addSuffix:!0})}`:`Expires ${(0,p.GP)(S,"MMM dd")}`})]}):null:u?(0,v.jsx)(b.A,{testId:"trial-banner",width:"100%",background:I.ue[g],onClose:f,tooltipProps:{align:"top"},zIndex:20,children:(0,v.jsx)(k.A,{flavour:n,onUpdateClick:F})}):null}},45710:(e,n,a)=>{a.d(n,{R:()=>d});var t=a(29407);function d(e){return+(0,t.a)(e)<Date.now()}},52365:(e,n,a)=>{a.d(n,{A:()=>d});var t=a(43329);function d(e){return(0,t.w)(e,Date.now())}}}]);