summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js')
-rw-r--r--src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js b/src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js
deleted file mode 100644
index d986f3f46..000000000
--- a/src/web/gui/v2/7436.1ebd371d70e6a87c5499.chunk.js
+++ /dev/null
@@ -1 +0,0 @@
-!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]="52d45d1a-d347-4647-97da-7eabff5f654a",e._sentryDebugIdIdentifier="sentry-dbid-52d45d1a-d347-4647-97da-7eabff5f654a")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"30b1ba65cc8722be7e184f4a401fb43e6b21634d"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[7436],{99904:(e,t,n)=>{n.d(t,{A:()=>s});n(62953);var a=n(96540),r=n(3914),l=n(25624);var o=n(87659);const i=e=>{const t=new Date(e||void 0).toDateString();return"Invalid Date"!==t?t:null},s=()=>{var e;const t=(0,r.ap)(),n=(0,a.useMemo)((()=>"".concat("dismissedBumpedWarningKey","_").concat(null===t||void 0===t?void 0:t.id)),[null===t||void 0===t?void 0:t.id]),[s,,,d]=(0,o.A)(!localStorage.getItem(n)),{trialEndsAtRaw:u}=(0,l.A)(),c=u&&"EarlybirdAndCommunitySunset"==(null===t||void 0===t||null===(e=t.metadata)||void 0===e?void 0:e.joinTrialCode),m=s&&u&&c,g=c?"EARLYB25":null,p=(0,a.useCallback)((()=>{localStorage.setItem(n,!0),d()}),[d,n]);return{isModalVisible:m,isEarlybirdAndCommunitySunset:c,coupon:g,trialEndsAt:i(u),onClose:p}}},57436:(e,t,n)=>{n.r(t),n.d(t,{OptOut:()=>y.A,OptOutModal:()=>A.A,TrialMessage:()=>E.A,TrialWarning:()=>b,default:()=>w,useBusinessPlan:()=>v.A,useTrial:()=>i.A});var a=n(96540),r=n(22292),l=(n(62953),n(3296),n(27208),n(48408),n(39225)),o=n(10648),i=n(25624),s=n(99904),d=n(17170);const u=(0,l.A)((()=>n.e(9843).then(n.bind(n,19843))),"TrialWelcome"),c=(0,l.A)((()=>n.e(1839).then(n.bind(n,41839))),"BumpedWarning"),m=(0,l.A)((()=>Promise.all([n.e(8938),n.e(6661)]).then(n.bind(n,46661))),"NewUserForm"),g=()=>{const{isEarlybirdAndCommunitySunset:e}=(0,s.A)(),{trialWelcomeVisible:t,paymentProvider:n}=(0,i.A)(),{email:l,createdAt:g,isAnonymous:p}=(0,r.uW)(),f=(0,d.A)();if(!e&&!t&&!f&&"AWS"!==n){const e=new URL(window.location.href).searchParams;return!p&&(0,o.o)(new Date,new Date(g))<3&&(e.get("email")||e.get("oauth"))?a.createElement(a.Suspense,{fallback:""},a.createElement(m,{email:l})):null}const b=e?c:u;return a.createElement(a.Suspense,{fallback:""},a.createElement(b,null))};var p=n(93155);const f=(0,l.A)((()=>Promise.all([n.e(6384),n.e(86)]).then(n.bind(n,60086))),"Warnings"),b=e=>{const t=(0,r.uW)("isAnonymous");return p.bO&&!t?a.createElement(a.Suspense,{fallback:""},a.createElement(f,e)):null};var y=n(66732),A=n(34641),E=n(93476),v=n(28061);const w=()=>{const e=(0,r.uW)("isAnonymous");return window.envSettings.onprem||e?null:a.createElement(g,null)}},34641:(e,t,n)=>{n.d(t,{A:()=>f});n(9391),n(62953);var a=n(96540),r=n(63950),l=n.n(r),o=n(83199),i=n(19673),s=n(71835),d=n(92155),u=n(50876),c=n(63314),m=n(87659),g=n(97118);const p=(0,d.A)(o.Button),f=e=>{let{onConfirm:t,onDecline:n=l(),onCancellingEnd:r=l()}=e;const d=(0,i.M4)(),[f,b]=(0,s.A)(),{id:y}=(0,g.A)(),{sendLog:A,isReady:E}=(0,u.A)(),[v,,w,h]=(0,m.A)(),x=(0,a.useCallback)((()=>{w(),d({productId:y}).then((()=>{f({header:"Successfully canceled subscription",text:"You are now on Community plan"}),A({feature:"TrialOptOut",isSuccess:!0})})).catch((()=>{b({header:"Failed to cancel the subscription",text:"Remained on Business plan"}),A({feature:"TrialOptOut",isFailure:!0,error:"Failed to cancel the subscription"})})).finally((()=>{r(),h()}))}),[y,E]),C=(0,a.useCallback)((()=>{t?t():x()}),[t,x]);return a.createElement(o.Modal,{backdropProps:{backdropBlur:!0}},a.createElement(c.Ay,{feature:"TrialOptOut"},a.createElement(o.ModalContent,{width:{base:140}},a.createElement(o.ModalHeader,null,a.createElement(o.Flex,{gap:2,alignItems:"center"},a.createElement(o.H4,null,"Go to Community plan"))),a.createElement(o.ModalBody,null,v?a.createElement(o.Flex,{height:"100px"},a.createElement(o.TextBig,null,"Changing billing plan...")):a.createElement(o.Flex,{gap:2,column:!0},a.createElement(o.H3,null,"Are You Sure?"),a.createElement(o.TextBig,null,"It looks like you have chosen to opt-out of your free 30-day business trial. Are you sure you do not want to experience all the features Netdata has to offer?"),a.createElement(o.TextBig,null,"By opting out, you will switch to the community plan immediately."))),a.createElement(o.ModalFooter,null,a.createElement(o.Flex,{justifyContent:"end",gap:4,padding:[1,2]},a.createElement(p,{feature:"TrialOptOut",label:"Yes, I am sure!",flavour:"hollow",small:!0,onClick:C,disabled:!y||v,textTransform:""}),a.createElement(p,{feature:"TrialOptOut",label:"No, I want the trial!",small:!0,onClick:n,disabled:v,textTransform:""}))))))}},35454:(e,t,n)=>{n.d(t,{$B:()=>o,TB:()=>i,W1:()=>r,ml:()=>l,ue:()=>a});const a={default:"successSemi",warning:"warningSemi",critical:"errorSemi"},r={default:{background:"successSemi",border:"success"},warning:{background:"warningSemi",border:"warning"},critical:{background:"errorSemi",border:"error"}},l=[30,15,3,2,1],o="dismissedTrialWelcome",i="dismissedTrialWarningDate"},93476:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(58168),r=n(96540),l=n(83199),o=n(63950),i=n.n(o),s=n(25624),d=n(99904),u=n(24864);const c={banner:{color:"main"},sidebar:{lineHeight:"1.6",color:"main"},freePlanUpgrade:{lineHeight:"1.6",color:"main"},billing:{color:"textLite"}},m=e=>{let{canUpgrade:t,onUpdateClick:n=i(),children:o,...s}=e;return t?r.createElement(l.Box,(0,a.A)({"data-testid":"upgrade-to-business-banner",onClick:n,as:l.Text,cursor:"pointer",textDecoration:"underline",color:"main"},s),o):null},g=e=>{let{flavour:t,couponRemainingDays:n,onUpdateClick:o=i()}=e;const{daysRemaining:g,canUpgrade:p,trialEndsAt:f}=(0,s.A)(),{isEarlybirdAndCommunitySunset:b}=(0,d.A)(),y=(0,r.useMemo)((()=>({isCoupon:n>0,isEarlybirdAndCommunitySunset:b,isBanner:"banner"==t,isSidebar:"sidebar"==t,isBilling:"billing"==t,isFreePlanUpgrade:"freePlanUpgrade"==t})),[t,n]);return r.createElement(l.Flex,{justifyContent:y.isBilling?"start":"center",alignItems:"center",width:"100%",gap:2},y.isCoupon?r.createElement(l.Flex,{column:!0},r.createElement(l.Text,(0,a.A)({},c[t],{fontSize:"10px",strong:!0}),"POST BLACK FRIDAY OFFER"),r.createElement(u.Te,(0,a.A)({},c[t],{fontSize:"38px",lineHeight:.8,strong:!0}),"50% off")):y.isEarlybirdAndCommunitySunset?r.createElement(l.Flex,{column:!0,gap:1,alignItems:"center"},r.createElement(l.Text,(0,a.A)({},c[t],{textAlign:"center",strong:!0},y.isBanner?{}:{fontSize:"10px"}),"Thank you for your support!"," ",y.isBanner?r.createElement(m,{canUpgrade:p,onUpdateClick:o},"Upgrade"):null),r.createElement(l.Text,(0,a.A)({},c[t],{color:"primary",fontSize:"22px",lineHeight:.8,strong:!0}),"25% Lifetime off")):y.isFreePlanUpgrade?r.createElement(l.Text,c[t],"Upgrade your plan for unlimited access and Business features."):r.createElement(l.Text,c[t],"You have ",r.createElement(l.Text,(0,a.A)({strong:!0},c[t]),"".concat(g," days"))," ","left to explore all the features of Netdata Business."," ",y.isBilling&&r.createElement(r.Fragment,null,"Trial ends at"," ",r.createElement(l.Text,(0,a.A)({strong:!0},c[t]),f),"."," "),y.isBanner?r.createElement(m,{canUpgrade:p,onUpdateClick:o},"Consider upgrading for unlimited access."):r.createElement(r.Fragment,null,"Consider upgrading for unlimited access.")))}},24864:(e,t,n)=>{n.d(t,{PL:()=>i,Te:()=>s,bg:()=>o});var a=n(8711),r=n(83199),l=n(35454);const o=(0,a.default)(r.Flex).attrs({position:"relative"}).withConfig({displayName:"styled__TrialWarningSidebar",componentId:"sc-66x250-0"})(["background-color:",";border-width:1px;border-style:dashed;border-color:",";border-radius:2px;"],(e=>{var t;let{type:n}=e;return(0,r.getColor)(null===(t=l.W1[n])||void 0===t?void 0:t.background)}),(e=>{var t;let{type:n}=e;return(0,r.getColor)(null===(t=l.W1[n])||void 0===t?void 0:t.border)})),i=(0,a.default)(r.Button).withConfig({displayName:"styled__TrialUpgradeButton",componentId:"sc-66x250-1"})(["flex:auto;"]),s=(0,a.default)(r.Text).attrs({strong:!0,lineHeight:.8}).withConfig({displayName:"styled__PromoText",componentId:"sc-66x250-2"})(["background-color:",";background-image:linear-gradient( 43deg,"," 0%,"," 46%,"," 100% );-webkit-background-clip:text;-webkit-text-fill-color:transparent;"],(0,r.getColor)("primary"),(0,r.getColor)(["blue","aquamarine"]),(0,r.getColor)(["purple","mauve"]),(0,r.getColor)("primary"))},66732:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(96540),r=n(63950),l=n.n(r),o=n(83199),i=n(50876);const s={default:"Or you can opt to downgrade immediately",billing:"Or you can opt to downgrade immediately"},d=e=>{let{flavour:t="default",onOptOutClick:n=l(),...r}=e;const{sendLog:d,isReady:u}=(0,i.A)(),c=(0,a.useCallback)((()=>{n(),d({feature:"TrialOptOut",isStart:!0})}),[u]);return a.createElement(o.Text,r,"After the trial, you'll automatically switch to the free Community plan."," ",a.createElement(o.Box,{"data-testid":"upgrade-to-business-banner",onClick:c,as:o.Text,cursor:"pointer",textDecoration:"underline",color:"primary"},s[t]),".")}},25624:(e,t,n)=>{n.d(t,{A:()=>b});n(62953);var a=n(96540),r=n(46741),l=n(5668),o=n(22292),i=(n(8159),n(98992),n(37550),n(16074)),s=n(6593);var d=n(19673),u=n(50503),c=n(35454),m=n(42728),g=n(17170),p=n(93155);const f=e=>{const t=new Date(e||void 0).toLocaleDateString();return"Invalid Date"!==t?t:null},b=()=>{const e=(0,g.A)(),{loaded:t,value:n,refresh:b}=(0,d.JN)(),{isFailure:y}=(0,u.A)(),{slug:A,trialEndsAt:E,paymentProvider:v}=n||{},w=(0,a.useMemo)((()=>(e=>{if(!e)return null;const t=new Date(e)-new Date;return Math.ceil(t/864e5)})(E)),[E]),h=t&&!!E&&!e,x=(0,r.JT)("billing:Manage"),[C]=(0,l.ng)("trialModalDismissed"),T=p.bO&&x&&(h||y)&&!localStorage.getItem(c.$B)&&!C,[S,k]=(0,a.useState)(localStorage.getItem(c.TB)),B=(0,a.useMemo)((()=>p.bO&&h),[h]),[O,I]=(0,a.useState)(),D=(F=w)>15?"default":F>5?"warning":"critical";var F;const U=!(0,o.uW)("isAnonymous")&&x;return(0,a.useEffect)((()=>{const e=((e,t,n,a)=>{if(t<0)return!1;const r=new Date(e||void 0);if(!(0,i.f)(r))return!1;const l=new Date(a||void 0);if(!(0,i.f)(l))return!0;const{days:o}=(0,s.F)({start:l,end:r}),d=o;return n.some((e=>e>=t&&e<d))})(E,w,c.ml,S);I(p.bO&&e)}),[E,w,S]),{trialWelcomeVisible:T,sidebarWarningVisible:B,bannerVisible:O,dismissBanner:()=>{const e=(new Date).toISOString();k(e),localStorage.setItem(c.TB,e)},daysRemaining:w,trialEndsAt:f(E),trialEndsAtRaw:E,type:D,canUpgrade:U,onTrial:h,refreshPlan:b,planIsFreeOrEarlyBird:(0,m.Kj)(A),paymentProvider:v}}},97118:(e,t,n)=>{n.d(t,{A:()=>l});var a=n(19673),r=n(42728);const l=()=>{var e;const{value:t}=(0,a.lU)();if(null===t||void 0===t||!t.free)return{};const n=Object.keys(t.free).sort(r.M7)[0];return{id:t.free[n]?null===(e=t.free[n][0])||void 0===e?void 0:e.id:null,version:n}}}}]); \ No newline at end of file