1 |
- !function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="115267bc-0e8e-4668-a9f5-ee4a3289658b",n._sentryDebugIdIdentifier="sentry-dbid-115267bc-0e8e-4668-a9f5-ee4a3289658b")}catch(n){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"833aaee1cc06f5081274f22d18347a1cce30fb04"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3212],{14808:function(n,e,t){t.d(e,{Z3:function(){return l},h2:function(){return s},nA:function(){return f},xy:function(){return u}});t(26699),t(32023);var r="trialWarning",o="alertConfiguration",i="editAlertConfiguration",c=[r,o];function a(n){if(c.includes(n))return function(){return!0};var e="true"===localStorage.getItem(n);return function(n){return n||e}}var u=a("mobileAppNotifications")(),l=a(r)(),s=a(o)(),f=a(i)()},52428:function(n,e,t){t.d(e,{J:function(){return l}});t(47941),t(82526),t(57327),t(41539),t(88449),t(2490),t(59849),t(38880),t(15581),t(34514),t(54747),t(49337),t(33321),t(69070);var r=t(4942),o=t(58206),i=t(52631),c=t(74855);function a(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function u(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?a(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var l=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,o.Z)(n);var t=(0,c.sc)(u(u({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},e),{},{success:!0}));i.Z.success(t,{context:"copy"})}}},57387:function(n,e,t){t.d(e,{ZM:function(){return g}});t(47941),t(82526),t(57327),t(41539),t(88449),t(2490),t(59849),t(38880),t(15581),t(34514),t(54747),t(49337),t(33321),t(69070);var r=t(45987),o=t(4942),i=t(67294),c=t(71893),a=t(13655),u=t(52428),l=["children"],s=["children","confirmationText","commandText"];function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}var d=(0,c.default)(a.Box).attrs((function(n){return function(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,o.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}({color:"textDescription",background:"modalTabsBackground",border:{side:"all",color:"borderSecondary"},padding:[4,10,4,4],position:"relative",width:"100%"},n)})).withConfig({displayName:"command__StyledTerminalCommand",componentId:"sc-wnwmk3-0"})(["color:",";border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;font-family:Courier New,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;"],(0,a.getColor)("textDescription")),p=(0,c.default)(a.Icon).withConfig({displayName:"command__StyledIcon",componentId:"sc-wnwmk3-1"})(["display:flex;align-self:flex-end;cursor:pointer;"]),b=(0,c.default)(a.Box).attrs({color:"textDescription",border:{side:"all",color:"borderSecondary"},background:"modalTabsBackground",padding:[0,1]}).withConfig({displayName:"command__CodeText",componentId:"sc-wnwmk3-2"})(["display:inline-block;color:",";border-radius:2px;font-family:Courier New,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;"],(0,a.getColor)("textDescription")),g=function(n){var e=n.children,t=(0,r.Z)(n,l);return i.createElement(b,t,e)};e.ZP=function(n){var e=n.children,t=n.confirmationText,o=void 0===t?"Command copied to your clipboard.":t,c=n.commandText,l=void 0===c?e:c,f=(0,r.Z)(n,s);return i.createElement(d,f,e,i.createElement(a.Box,{position:"absolute",bottom:"8px",right:"8px"},i.createElement(p,{name:"copy",size:"small",color:"primary",onClick:(0,u.J)(l||e,{text:o})})))}},69019:function(n,e,t){t.d(e,{Cl:function(){return O},E3:function(){return p},FD:function(){return k},Vs:function(){return w},ZQ:function(){return y},fA:function(){return j},fh:function(){return h},fz:function(){return P},uV:function(){return Z},xl:function(){return E}});t(47941),t(82526),t(57327),t(88449),t(59849),t(38880),t(49337),t(33321),t(69070);var r=t(93433),o=t(29439),i=t(4942),c=(t(85827),t(41539),t(25387),t(2490),t(72608),t(15581),t(34514),t(54747),t(69720),t(92222),t(26398)),a=t(50308),u=t.n(a),l=t(66152),s=t(49489);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function d(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){(0,i.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}var p={id:null,name:"",description:"",commitment:!1,pricing:[],enrolledAt:null,currentPeriodFrom:null,currentPeriodTo:null,committedNodes:0,billingEmail:"",balance:{amount:0,currency:"usd"}},b={Pro:"pro",Professional:"pro",Community:"free",EarlyBird:"earlyBird",Business:"business"},g=function(n){var e,t=b[n.class],r=(0,l.k5)(n),o=Array.isArray(r.pricing)?r.pricing.reduce((function(n,e){return d(d({},n),{},(0,i.Z)({},e.type,e))}),{}):{},c=null===(e=s.Hh[t])||void 0===e?void 0:e[n.version];return d(d(d({},p),r),{},{planLimitations:c,pricing:o,slug:t})},v=function(n){return(0,l.k5)(n)},y=function(n){return c.Z.get("/api/v2/spaces/".concat(n,"/billing/plans"),{transform:function(n){var e=n.plans.reduce((function(n,e){var t=g(e),r=n[t.slug]||[];return"year"===t.interval?r.unshift(t):r.push(t),n[t.slug]=r,n}),{});return Object.entries(e).forEach((function(n){var t=(0,o.Z)(n,2),i=t[0],c=t[1].reduce((function(n,e){var t=e.version;return n[t]?n[t]=[].concat((0,r.Z)(n[t]),[e]):n[t]=[e],n}),{});e[i]=c})),e}})},h=function(n){return c.Z.get("/api/v2/spaces/".concat(n,"/billing/plan"),{allow401:!0,transform:g})},m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update";return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="update"==n?c.Z.put:c.Z.post;return"function"!==typeof r?u():r("/api/v2/spaces/".concat(e,"/billing/plan"),(0,l.v)(t),{transform:function(n){return n.url}})}},O=function(n,e){return m("checkout")(n,e)},w=function(n,e){return m()(n,e)},P=function(n,e){return c.Z.get("/api/v2/spaces/".concat(n,"/billing/portal?redirect_url=").concat(encodeURIComponent(e)),{transform:function(n){return n.url}})},j=function(n,e){var t=e.after,r=e.before;return c.Z.get("/api/v2/spaces/".concat(n,"/billing/node-count?from=").concat(t,"&to=").concat(r))},Z=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.Z.put("/api/v2/spaces/".concat(n,"/billing/plan/preview"),(0,l.v)(e),{transform:v})},k=function(n){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).email;return c.Z.post("/api/v2/spaces/".concat(n,"/billing/trial"),{email:e})},E=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c.Z.post("api/v2/spaces/".concat(n,"/billing/promo-code/check"),(0,l.v)(e))}},36285:function(n,e,t){t.d(e,{x1:function(){return _},eY:function(){return x},sk:function(){return A},RP:function(){return k},SH:function(){return E},Gl:function(){return O},fG:function(){return j},kK:function(){return S},Zn:function(){return D}});var r=t(4942),o=t(45987),i=t(29439),c=(t(41539),t(88674),t(17727),t(47941),t(82526),t(57327),t(88449),t(2490),t(59849),t(38880),t(15581),t(34514),t(54747),t(49337),t(33321),t(69070),t(67294)),a=t(4480),u=(0,a.cn)({key:"billingPlanCancelling",default:!1}),l=t(50308),s=t.n(l),f=t(74059),d=t(69019),p=t(49489),b=t(65840),g=t(78710),v=["spaceId"];function y(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}var h=[],m=(0,a.CG)({key:"plans",get:function(n){return function(){return(0,d.ZQ)(n)}}}),O=function(){var n,e=(0,f.th)(),t=(0,a.$P)(m(e));return{loaded:"loading"!==t.state,value:(null===(n=t.contents)||void 0===n?void 0:n.data)||h,hasError:"hasError"===t.state}},w=(0,a.CG)({key:"previewPlan",get:function(n){var e=n.spaceId,t=n.payload;return function(){return(0,d.uV)(e,t)}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),P=function(n){var e;return p.Fi[null===n||void 0===n||null===(e=n.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.errorMsgKey]},j=function(n,e){var t,r=(0,f.th)(),o=(0,a.$P)(w({spaceId:r,payload:n,forceFetch:e}));return{loading:"loading"===o.state,value:(null===(t=o.contents)||void 0===t?void 0:t.data)||{},promoCodeError:"hasError"===o.state?P(o.contents):void 0}},Z=(0,a.CG)({key:"currentPlan",get:function(n){return function(){return n&&!(0,g.Ly)(n)?(0,d.fh)(n):Promise.resolve()}}}),k=function(){var n,e=(0,f.th)(),t=(0,a.$P)(Z(e)),r=(0,a.C)(Z(e));return{loaded:"loading"!==t.state,value:(null===(n=t.contents)||void 0===n?void 0:n.data)||d.E3,hasError:"hasError"===t.state,refresh:r}},E=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,e=(0,c.useState)(!1),t=(0,i.Z)(e,2),r=t[0],o=t[1],a=(0,f.th)();return[(0,c.useCallback)((function(){o(!0),(0,d.fz)(a,n).then((function(n){var e=n.data;return location.href=e})).finally((function(){return o(!1)}))}),[a,n]),r]},C=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.Vs,e=(0,f.th)(),t=k(),r=(0,b.HK)();return!t.loaded||t.hasError?s():function(o){return n(e,o).then((function(n){t.refresh(),r(),null!==n&&void 0!==n&&n.data&&(location.href=n.data)}))}},x=function(){return C(d.Cl)},D=function(){return C()},S=function(){var n=(0,f.th)();return function(e){return(0,d.FD)(n,e)}},_=function(){var n=(0,a.FV)(u),e=(0,i.Z)(n,2),t=e[0],r=e[1];return{cancelling:t,startCancelling:(0,c.useCallback)((function(){return r(!0)}),[]),stopCancelling:(0,c.useCallback)((function(){return r(!1)}),[])}},I=(0,a.CG)({key:"couponCheck",get:function(n){var e=n.spaceId,t=(0,o.Z)(n,v);return function(){return t.promotionCode?(0,d.xl)(e,t):Promise.resolve({})}}}),A=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,f.th)(),o=(0,a.$P)(I(function(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?y(Object(t),!0).forEach((function(e){(0,r.Z)(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}({spaceId:t},e)));return console.log(o),{loading:"loading"===o.state,discount:(null===(n=o.contents)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.percent_off)||0,promoCodeError:"hasError"===o.state?P(o.contents):void 0}}},5710:function(n,e,t){var r=t(87462),o=t(45987),i=t(67294),c=t(79655),a=t(91008),u=t(74059),l=["children"];e.Z=function(n){var e=n.children,t=(0,o.Z)(n,l),s=(0,u.uk)(),f="/spaces/".concat(s,"/settings/nodes");return i.createElement(a.Z,(0,r.Z)({as:c.rU,to:f},t),e)}},37503:function(n,e,t){var r=t(87462),o=t(45987),i=t(67294),c=t(79655),a=t(91008),u=t(99826),l=["children"];e.Z=function(n){var e=n.children,t=(0,o.Z)(n,l),s=(0,u.Z)("business").url;return i.createElement(a.Z,(0,r.Z)({as:c.rU,to:s,disabled:!s},t),e)}},34735:function(n,e,t){t(26699),t(32023);var r=t(67294),o=t(97945),i=t(36285),c=t(14808);e.Z=function(){var n=(0,o.ul)(),e=n.loaded,t=n.nodes,a=n.hasError,u=n.refresh,l=(0,i.RP)(),s=l.loaded,f=l.value,d=l.hasError,p=c.Z3&&!(null===f||void 0===f||!f.planLimitations),b=(null===f||void 0===f?void 0:f.planLimitations)||{},g=b.maxNodes,v=void 0===g?0:g,y=b.maxDashboards,h=void 0===y?0:y,m=(0,r.useCallback)((function(n){return p&&!t.includes(n)}),[t,p]);return{loaded:e&&s,hasError:a||d,currentPlan:f,hasLimitations:p,maxNodes:v,maxDashboards:h,preferredNodes:t,isNodeRestricted:m,refreshPreferredNodes:u}}},99826:function(n,e,t){t(92222);var r=t(67294),o=t(36285),i=t(74059);e.Z=function(n){var e=(0,o.RP)(),t=e.loaded,c=e.value,a=e.hasError,u=(0,i.uk)(),l=t&&c?c.billingEmail?"update":"checkout":"",s="/spaces/".concat(u,"/settings/billing/all-plans"),f=(0,r.useCallback)((function(n){return t&&c?"".concat(s,"#billingModalType=").concat(l,"&billingModalSlug=").concat(n):null}),[n,u,l]),d=n?f(n):s;return{loaded:t,getUrl:f,url:d,hasError:a}}},91128:function(n,e,t){var r=t(29439),o=t(65565),i=t(46667),c=t(9058);e.Z=function(){var n=(0,i.Z)(!1),e=(0,r.Z)(n,2),t=e[0],a=e[1],u=(0,c.e)();return(0,o.Z)((function(){if(u&&u.getRoot())return u.getRoot().updateAttribute("paused",!u.getRoot().getAttribute("autofetchOnWindowBlur")&&u.getRoot().getAttribute("blurred")||t),function(){return u.getRoot().updateAttribute("paused",!u.getRoot().getAttribute("autofetchOnWindowBlur")&&u.getRoot().getAttribute("blurred"))}}),[t]),a}}}]);
|