summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js')
-rw-r--r--src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js b/src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js
new file mode 100644
index 000000000..f7113fefe
--- /dev/null
+++ b/src/web/gui/v2/7436.6d4c25c5ff7d2e65734c.chunk.js
@@ -0,0 +1 @@
+!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]="6e4a4358-e84e-456d-91ac-762dd8101ae3",e._sentryDebugIdIdentifier="sentry-dbid-6e4a4358-e84e-456d-91ac-762dd8101ae3")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(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 i=n(87659);const o=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,i.A)(!localStorage.getItem(n)),{trialEndsAtRaw:u}=(0,l.A)(),c="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:o(u),onClose:p}}},57436:(e,t,n)=>{n.r(t),n.d(t,{OptOut:()=>p.A,OptOutModal:()=>f.A,TrialMessage:()=>b.A,TrialWarning:()=>g,default:()=>E,useBusinessPlan:()=>y.A,useTrial:()=>i.A});var a=n(96540),r=n(22292),l=(n(62953),n(39225)),i=n(25624),o=n(99904);const s=(0,l.A)((()=>n.e(9843).then(n.bind(n,19843))),"TrialWelcome"),d=(0,l.A)((()=>n.e(1839).then(n.bind(n,41839))),"BumpedWarning"),u=()=>{const{isEarlybirdAndCommunitySunset:e}=(0,o.A)(),{trialWelcomeVisible:t}=(0,i.A)();if(!e&&!t)return null;const n=e?d:s;return a.createElement(a.Suspense,{fallback:""},a.createElement(n,null))};var c=n(93155);const m=(0,l.A)((()=>Promise.all([n.e(3584),n.e(86)]).then(n.bind(n,60086))),"Warnings"),g=e=>{const t=(0,r.uW)("isAnonymous");return c.bO&&!t?a.createElement(a.Suspense,{fallback:""},a.createElement(m,e)):null};var p=n(66732),f=n(34641),b=n(93476),y=n(28061);const E=()=>(0,r.uW)("isAnonymous")?null:a.createElement(u,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),i=n(10058),o=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)(i.Button),f=e=>{let{onConfirm:t,onDecline:n=l(),onCancellingEnd:r=l()}=e;const d=(0,o.M4)(),[f,b]=(0,s.A)(),{id:y}=(0,g.A)(),{sendLog:E,isReady:A}=(0,u.A)(),[v,,x,h]=(0,m.A)(),C=(0,a.useCallback)((()=>{x(),d({productId:y}).then((()=>{f({header:"Successfully canceled subscription",text:"You are now on Community plan"}),E({feature:"TrialOptOut",isSuccess:!0})})).catch((()=>{b({header:"Failed to cancel the subscription",text:"Remained on Business plan"}),E({feature:"TrialOptOut",isFailure:!0,error:"Failed to cancel the subscription"})})).finally((()=>{r(),h()}))}),[y,A]),w=(0,a.useCallback)((()=>{t?t():C()}),[t,C]);return a.createElement(i.Modal,{backdropProps:{backdropBlur:!0}},a.createElement(c.Ay,{feature:"TrialOptOut"},a.createElement(i.ModalContent,{width:{base:140}},a.createElement(i.ModalHeader,null,a.createElement(i.Flex,{gap:2,alignItems:"center"},a.createElement(i.H4,null,"Go to Community plan"))),a.createElement(i.ModalBody,null,v?a.createElement(i.Flex,{height:"100px"},a.createElement(i.TextBig,null,"Changing billing plan...")):a.createElement(i.Flex,{gap:2,column:!0},a.createElement(i.H3,null,"Are You Sure?"),a.createElement(i.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(i.TextBig,null,"By opting out, you will switch to the community plan immediately."))),a.createElement(i.ModalFooter,null,a.createElement(i.Flex,{justifyContent:"end",gap:4,padding:[1,2]},a.createElement(p,{feature:"TrialOptOut",label:"Yes, I am sure!",flavour:"hollow",small:!0,onClick:w,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:()=>i,TB:()=>o,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],i="dismissedTrialWelcome",o="dismissedTrialWarningDate"},93476:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(58168),r=n(96540),l=n(10058),i=n(63950),o=n.n(i),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=o(),children:i,...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),i):null},g=e=>{let{flavour:t,couponRemainingDays:n,onUpdateClick:i=o()}=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:i},"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:i},"Consider upgrading for unlimited access."):r.createElement(r.Fragment,null,"Consider upgrading for unlimited access.")))}},24864:(e,t,n)=>{n.d(t,{PL:()=>o,Te:()=>s,bg:()=>i});var a=n(8711),r=n(10058),l=n(35454);const i=(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)})),o=(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),i=n(10058),o=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,o.A)(),c=(0,a.useCallback)((()=>{n(),d({feature:"TrialOptOut",isStart:!0})}),[u]);return a.createElement(i.Text,r,"After the trial, you'll automatically switch to the free Community plan."," ",a.createElement(i.Box,{"data-testid":"upgrade-to-business-banner",onClick:c,as:i.Text,cursor:"pointer",textDecoration:"underline",color:"primary"},s[t]),".")}},25624:(e,t,n)=>{n.d(t,{A:()=>f});n(62953);var a=n(96540),r=n(46741),l=n(5668),i=n(22292),o=(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(93155);const p=e=>{const t=new Date(e||void 0).toLocaleDateString();return"Invalid Date"!==t?t:null},f=()=>{const{loaded:e,value:t,refresh:n}=(0,d.JN)(),{isFailure:f}=(0,u.A)(),{slug:b,trialEndsAt:y}=t||{},E=(0,a.useMemo)((()=>(e=>{if(!e)return null;const t=new Date(e)-new Date;return Math.ceil(t/864e5)})(y)),[y]),A=e&&!!y,v=(0,r.JT)("billing:Manage"),[x]=(0,l.ng)("trialModalDismissed"),h=g.bO&&v&&(A||f)&&!localStorage.getItem(c.$B)&&!x,[C,w]=(0,a.useState)(localStorage.getItem(c.TB)),T=(0,a.useMemo)((()=>g.bO&&A),[A]),[S,k]=(0,a.useState)(),B=(O=E)>15?"default":O>5?"warning":"critical";var O;const I=!(0,i.uW)("isAnonymous")&&v;return(0,a.useEffect)((()=>{const e=((e,t,n,a)=>{if(t<0)return!1;const r=new Date(e||void 0);if(!(0,o.f)(r))return!1;const l=new Date(a||void 0);if(!(0,o.f)(l))return!0;const{days:i}=(0,s.F)({start:l,end:r}),d=i;return n.some((e=>e>=t&&e<d))})(y,E,c.ml,C);k(g.bO&&e)}),[y,E,C]),{trialWelcomeVisible:h,sidebarWarningVisible:T,bannerVisible:S,dismissBanner:()=>{const e=(new Date).toISOString();w(e),localStorage.setItem(c.TB,e)},daysRemaining:E,trialEndsAt:p(y),trialEndsAtRaw:y,type:B,canUpgrade:I,onTrial:A,refreshPlan:n,planIsFreeOrEarlyBird:(0,m.Kj)(b)}}},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