!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e4511e06-d58c-4304-8e54-bac375ebf598",e._sentryDebugIdIdentifier="sentry-dbid-e4511e06-d58c-4304-8e54-bac375ebf598")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"2cf8df3206339b597c7cbea290c34f66439c3909"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[8505],{8505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var a=n(96540),r=n(52035),o=n(34843),l=n(84929),i=n(7310),d=n(16074),c=n(63933),s=n(82526),u=n(29176),f=n(87991),p=n(31629),g=n(8573),b=n(5396),m=n(4659),w=n(87659);const y=(0,r.eU)((()=>p.A.get("/api/v1/license").then((e=>e.data)).catch((()=>null)))),E=()=>{const e=(0,o.md)((0,l.Rq)(y)),[t,n]=(0,w.A)(),[r,p]=(0,a.useState)(),[E,I]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if("hasValue"!==e.state)return;const t=e.data,a=(0,i.H)(t.exp);if(p(a),!(0,d.f)(a))return;const r=parseInt((a-new Date)/1e3/60/60/24);if(r>30)return;const o=localStorage.getItem("dismissLicenceWarning");o&&(0,d.f)((0,i.H)(o))&&!(0,c.R)((0,i.H)(o))&&r>0||(n(!0),r<0&&I(!0))}),[e]),window.envSettings.onprem&&t?E?a.createElement(g.Layer,{full:!0,backdropProps:{backdropBlur:"3px"}},a.createElement(b.A,{testId:"onprem-banner",width:"100%",background:"errorBackground",position:"absolute",top:"0",tooltipProps:{align:"top"},zIndex:20},a.createElement(g.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},a.createElement(g.Text,null,"Your Netdata Enterprise On-prem License has expired on ",(0,f.GP)(r,"PPPP"),". Please contact your admin /"," ",a.createElement(m.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main"},"billing@netdata.cloud")," ","to renew your license.")))):a.createElement(b.A,{testId:"onprem-banner",width:"100%",background:"warningBackground",position:"absolute",top:"0",onClose:()=>{n(),localStorage.setItem("dismissLicenceWarning",(0,s.W)(new Date,{days:1}).toISOString())},tooltipProps:{align:"top"},zIndex:20},a.createElement(g.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},a.createElement(g.Text,null,"Your Netdata Enterprise On-prem License will expire in ",(0,u.m)(r),". Please contact your admin /"," ",a.createElement(m.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main"},"billing@netdata.cloud")," ","to renew your license."))):null}}}]);