try{let 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]="43ed8c55-0414-49cd-9eab-ab806c1f904d",e._sentryDebugIdIdentifier="sentry-dbid-43ed8c55-0414-49cd-9eab-ab806c1f904d")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"9d662ef6f51428cedd2ad1624c18a68882fcbb5b"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1878],{12296:(e,n,t)=>{t.d(n,{m:()=>h});var a=t(52365),r=t(75156),o=t(92516),i=t(1108),s=t(5305),d=t(96054),c=t(61501),l=t(10911),u=t(91349);function f(e,n,t){const a=(0,o.q)(),f=t?.locale??a.locale??r.c,h=(0,d.z)(e,n);if(isNaN(h))throw new RangeError("Invalid time value");const p=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:h}),[m,b]=(0,s.x)(t?.in,...h>0?[n,e]:[e,n]),g=(0,u.O)(b,m),w=((0,i.G)(b)-(0,i.G)(m))/1e3,x=Math.round((g-w)/60);let D;if(x<2)return t?.includeSeconds?g<5?f.formatDistance("lessThanXSeconds",5,p):g<10?f.formatDistance("lessThanXSeconds",10,p):g<20?f.formatDistance("lessThanXSeconds",20,p):g<40?f.formatDistance("halfAMinute",0,p):g<60?f.formatDistance("lessThanXMinutes",1,p):f.formatDistance("xMinutes",1,p):0===x?f.formatDistance("lessThanXMinutes",1,p):f.formatDistance("xMinutes",x,p);if(x<45)return f.formatDistance("xMinutes",x,p);if(x<90)return f.formatDistance("aboutXHours",1,p);if(x<c.F6){const e=Math.round(x/60);return f.formatDistance("aboutXHours",e,p)}if(x<2520)return f.formatDistance("xDays",1,p);if(x<c.Nw){const e=Math.round(x/c.F6);return f.formatDistance("xDays",e,p)}if(x<2*c.Nw)return D=Math.round(x/c.Nw),f.formatDistance("aboutXMonths",D,p);if(D=(0,l.W)(b,m),D<12){const e=Math.round(x/c.Nw);return f.formatDistance("xMonths",e,p)}{const e=D%12,n=Math.trunc(D/12);return e<3?f.formatDistance("aboutXYears",n,p):e<9?f.formatDistance("overXYears",n,p):f.formatDistance("almostXYears",n+1,p)}}function h(e,n){return f(e,(0,a.A)(e),n)}},45710:(e,n,t)=>{t.d(n,{R:()=>r});var a=t(29407);function r(e){return+(0,a.a)(e)<Date.now()}},52365:(e,n,t)=>{t.d(n,{A:()=>r});var a=t(43329);function r(e){return(0,a.w)(e,Date.now())}},91878:(e,n,t)=>{t.r(n),t.d(n,{default:()=>D});var a=t(96540),r=t(52035),o=t(34843),i=t(84929),s=t(42539),d=t(85577),c=t(12296),l=t(45710),u=t(32370),f=t(41394),h=t(91130),p=t(65258),m=t(56171),b=t(79748),g=t(6304),w=t(74848);const x=(0,r.eU)((()=>h.A.get("/api/v1/license").then((e=>e.data)).catch((()=>null)))),D=()=>{const e=(0,o.md)((0,i.Rq)(x)),[n,t]=(0,g.A)(),[r,h]=(0,a.useState)(),[D,y]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if("hasValue"!==e.state)return;const n=e.data?.data;if(!n)return;const a=(0,f.H)(n.exp);if(h(a),!(0,u.f)(a))return;const r=parseInt((a-new Date)/1e3/60/60/24);if(r>30)return;const o=localStorage.getItem("dismissLicenceWarning");o&&(0,u.f)((0,f.H)(o))&&!(0,l.R)((0,f.H)(o))&&r>0||(t(!0),r<0&&y(!0))}),[e]),window.envSettings.onprem&&n?D?(0,w.jsx)(p.Layer,{full:!0,backdropProps:{backdropBlur:"3px"},children:(0,w.jsx)(m.A,{testId:"onprem-banner",width:"100%",background:"errorBackground",position:"absolute",top:"0",tooltipProps:{align:"top"},zIndex:20,children:(0,w.jsx)(p.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(p.Text,{children:["Your Netdata Enterprise On-prem License has expired on ",(0,d.GP)(r,"PPPP"),". Please contact your admin /"," ",(0,w.jsx)(b.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main",children:"billing@netdata.cloud"})," ","to renew your license."]})})})}):(0,w.jsx)(m.A,{testId:"onprem-banner",width:"100%",background:"warningBackground",position:"absolute",top:"0",onClose:()=>{t(),localStorage.setItem("dismissLicenceWarning",(0,s.W)(new Date,{days:1}).toISOString())},tooltipProps:{align:"top"},zIndex:20,children:(0,w.jsx)(p.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2,children:(0,w.jsxs)(p.Text,{children:["Your Netdata Enterprise On-prem License will expire in ",(0,c.m)(r),". Please contact your admin /"," ",(0,w.jsx)(b.A,{"data-testid":"renew",href:"mailto:billing@netdata.cloud",as:"a",cursor:"pointer",textDecoration:"underline",color:"main",children:"billing@netdata.cloud"})," ","to renew your license."]})})}):null}}}]);