summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/app.efc4ebf75cd13cc4f5f4.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/gui/v2/app.efc4ebf75cd13cc4f5f4.js')
-rw-r--r--web/gui/v2/app.efc4ebf75cd13cc4f5f4.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/web/gui/v2/app.efc4ebf75cd13cc4f5f4.js b/web/gui/v2/app.efc4ebf75cd13cc4f5f4.js
deleted file mode 100644
index 667560e5..00000000
--- a/web/gui/v2/app.efc4ebf75cd13cc4f5f4.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]="731bd492-719a-4a98-bcee-a04eeff9b5fe",e._sentryDebugIdIdentifier="sentry-dbid-731bd492-719a-4a98-bcee-a04eeff9b5fe")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2143],{64637:function(e,t,n){"use strict";n.d(t,{a:function(){return o},db:function(){return i},fm:function(){return a},h2:function(){return u},lV:function(){return c}});n(47042),n(74916),n(15306),n(73210);var r=n(53087),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return(0,r.default)(e,t)},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.toLowerCase():e;return t.charAt(0).toUpperCase()+t.slice(1)},i=function(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2")},u=function(e){return e.replace(/([^:]\/)\/+/g,"$1")},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=(e=e.trim()).replace(/\s+/g,"-")).replace(/[^a-zA-Z0-9-]/g,"")).toLowerCase()}},63346:function(e,t,n){"use strict";n.d(t,{O$:function(){return v},Ht:function(){return h},Xe:function(){return b},ZP:function(){return y}});var r=n(29439),o=n(4942),a=n(45987),i=(n(69826),n(41539),n(31672),n(2490),n(59461),n(91038),n(78783),n(38862),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(54005),c=n(87462),s=n(16294),l=["children","logImpression","options","delay"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p,v=(0,i.createContext)({}),m={allowLogInvisible:!0},g=function(e){var t=e.children,n=e.logImpression,o=void 0===n||n,c=e.options,f=void 0===c?{}:c,p=e.delay,g=void 0===p?750:p,b=(0,a.Z)(e,l),h=d(d({},m),f),y=(0,i.useContext)(v),S=(0,i.useState)(),O=(0,r.Z)(S,2),w=O[0],A=O[1],k=(0,i.useRef)(),P=(0,i.useRef)(),Z=(0,u.Z)(),E=Z.sendLog,j=Z.isReady,x=(0,i.useCallback)((function(e){var t=e[0];t&&w!==t.isIntersecting&&A(t.isIntersecting)}),[]),C=(0,i.useCallback)((function(){var e,t=new IntersectionObserver(x,{root:null,rootMargin:"0px",threshold:.5}),n=null===k||void 0===k||null===(e=k.current)||void 0===e?void 0:e.childNodes,r=Array.from(n||[]).find((function(e){return null!==e.offsetParent}));r&&t.observe(r)}),[null===k||void 0===k?void 0:k.current]);return(0,i.useEffect)((function(){h.allowLogInvisible||C()}),[h.allowLogInvisible]),(0,i.useEffect)((function(){var e=!0,t=null,n=d(d({action:s.Nw.elementViewed},y),b);return j&&(null===P||void 0===P?void 0:P.current)!==JSON.stringify(n)&&o&&(h.allowLogInvisible||w)&&(t=setTimeout((function(){e&&(E(n),P.current=JSON.stringify(n))}),g)),function(){e=!1,t&&(clearTimeout(t),t=null)}}),[j,o,w,b]),i.createElement(v.Consumer,null,(function(e){return i.createElement(v.Provider,{value:d(d({},e),b)},i.createElement("div",{ref:k,style:{display:"contents"}},t))}))},b=(p=g,function(e){return i.createElement(p,(0,c.Z)({},e,{isSuccess:!0}))}),h=function(e){return function(t){return i.createElement(e,(0,c.Z)({},t,{isFailure:!0}))}}(g),y=g},16294:function(e,t,n){"use strict";n.d(t,{Hw:function(){return a},Nw:function(){return i},WL:function(){return r},uS:function(){return u},uf:function(){return o}});var r={success:"success",fail:"failure"},o={visitor:"visitor"},a={sequence:"telemetrySequence",session:"telemetrySessionId"},i={elementViewed:"element-viewed",buttonClicked:"button-clicked"},u={start:"start",end:"end"}},54005:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r,o=n(4942),a=n(29439),i=n(45987),u=n(67294),c=n(50308),s=n.n(c),l=n(78710),f=n(26398),d=n(74059),p=n(63346),v=n(73012),m=n(28852),g="undefined"!==typeof process&&!(null===(r=process)||void 0===r||null===(r=r.env)||void 0===r||!r.JEST_WORKER_ID),b=n(6308),h=n(16294),y=n(96929),S=n(93742),O=n(97945),w=["isAnonymous"],A=["feature","action","isStart","isSuccess","isFailure","eventReason"];function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=function(){if(g)return{sendLog:s(),isReady:!0};var e=(0,m.Z)(),t=e.isAnonymous,n=(0,i.Z)(e,w),r=(0,d.th)(),o=(0,u.useContext)(p.O$),c=(0,b.Z)(),k=(0,a.Z)(c,3),Z=k[1],E=k[2],j=n.id&&(!Z||t),x=(0,S.p)("id"),C=(0,y.X7)(x,"ids"),I=(0,O.HZ)(C),T=(0,O.e5)(C),D=(0,O.mf)(C),N=(0,O.Y0)(C),M=(0,u.useCallback)((function(e,t){var a,u,c=P(P({},t?P({},o):{}),e),s=c.feature,d=c.action,p=c.isStart,m=c.isSuccess,g=c.isFailure,b=c.eventReason,y=(0,i.Z)(c,A);return function(e){return f.Z.post("/api/v1/telemetry/push",e)}({"@timestamp":(new Date).toISOString(),labels:P(P({},y),window.localNetdataRegistry?P(P({},window.localNetdataRegistry.mg?{machine:window.localNetdataRegistry.mg}:{}),window.localNetdataRegistry.nd?{nodeId:window.localNetdataRegistry.nd}:{}):{}),event:P(P(P({action:d,sequence:(0,v.$S)(),provider:l.ZP?"agent":"app"},m||g?{outcome:m?h.WL.success:h.WL.fail}:{}),p?{type:[h.uS.start]}:m||g?{type:[h.uS.end]}:{}),b?{reason:b}:{}),user:n,url:{full:null===(a=window)||void 0===a||null===(a=a.location)||void 0===a?void 0:a.href},Netdata:P(P({},r?{space:{id:r}}:{}),{},{statistics:{nodes:P({total:l.ZP?1:E},l.ZP?{}:{live:(I||[]).length,stale:(T||[]).length,offline:(D||[]).length,created:(N||[]).length})},telemetry:{feature:s,session:{id:(0,v.MQ)()},visitor:{id:null===(u=window.envSettings)||void 0===u?void 0:u.visitor}}})}).catch((function(e){"production"!==window.envSettings.nodeEnv&&(console.groupCollapsed("[Netdata telemetry error]"),console.warn(e),console.groupEnd())}))}),[n,t,E,Z,r,j]),R=(0,u.useCallback)((function(e,t){return M(P({action:h.Nw.buttonClicked},e),t)}),[]);return{sendLog:M,sendButtonClickedLog:R,isReady:j}}},28852:function(e,t,n){"use strict";var r=n(29439),o=(n(74916),n(15306),n(67294)),a=n(13477),i=n(78710);t.Z=function(){var e=(0,a.Iy)(),t=e.id,n=e.email,u=e.isAnonymous,c=(0,o.useState)({}),s=(0,r.Z)(c,2),l=s[0],f=s[1];return(0,o.useEffect)((function(){var e,r,o,a=u?(null===(e=window.localNetdataRegistry)||void 0===e?void 0:e.pg)||window.envSettings.visitor:t||"",c=u?void 0:n,s=u?(null===(r=window.localNetdataRegistry)||void 0===r?void 0:r.registry)||"localhost":i.ZP?((null===(o=window.envSettings)||void 0===o?void 0:o.apiUrl)||"").replace(/^https:\/\//,""):location.host;f({id:a,email:c,domain:s,isAnonymous:u})}),[t,n,u]),l}},73012:function(e,t,n){"use strict";n.d(t,{$S:function(){return a},MQ:function(){return i},xp:function(){return u}});n(91058),n(41539),n(15581),n(2490),n(34514),n(54747),n(26833);var r=n(16294),o=n(28721),a=function(){var e,t,n=r.Hw.sequence,o=parseInt((null===(e=window.sessionStorage)||void 0===e?void 0:e.getItem(n))||0,10);return null===(t=window.sessionStorage)||void 0===t||t.setItem(n,o+1),o},i=function(){return sessionStorage.getItem(r.Hw.session)||sessionStorage.setItem(r.Hw.session,(0,o.Z)()),sessionStorage.getItem(r.Hw.session)||""},u=function(){Object.values(r.Hw).forEach((function(e){return sessionStorage.removeItem(e)}))}},89405:function(e,t,n){"use strict";n.d(t,{rA:function(){return y},tb:function(){return b}});var r=n(4942),o=n(45987),a=(n(91058),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(49546),u=n(58591),c=n(14600),s=["long","isTime","secs","timezone"],l=["locale"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=!!(Intl&&Intl.DateTimeFormat&&navigator.language),v=function(e){return"number"===typeof e?new Date(e):e},m=function(e){return(e=v(e))?(0,i.default)(e,"MM/dd/yyyy"):""},g=function(e){return(e=v(e))?(0,i.default)(e,"HH:mm"):""},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Date(new Date(e).getTime()+60*parseInt(t)*60*1e3)},h=function(e,t){var n=t.locale,r=(0,o.Z)(t,l);return new Intl.DateTimeFormat(null!==n&&void 0!==n?n:navigator.language,function(e){var t=e.long,n=e.isTime,r=e.secs,a=e.timezone,i=(0,o.Z)(e,s);return d(d(d({hourCycle:"h23"},n?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"}),n&&{timeStyle:r?"medium":"short"}),{},{timeZone:a},i)}(r)).format(e)},y=function(){var e=function(){var e=(0,u.m$)().utc;return(0,c.E)("default",e)}(),t=e.utc,n=e.offset;return{localeDateString:(0,a.useMemo)((function(){return p?function(e,n){return h(e,d({long:!0,timezone:t},n))}:m}),[t]),localeTimeString:(0,a.useMemo)((function(){return p?function(e,n){return h(e,d({secs:!0,isTime:!0,timezone:t},n))}:g}),[t]),utcOffset:n}}},41331:function(e,t,n){"use strict";n.d(t,{hX:function(){return o}});var r=n(71002),o=(n(41539),n(68216),n(2490),n(79433),n(91038),n(78783),n(57327),n(88449),n(59849),n(26699),n(32023),n(47941),function(e,t){var n=t.omit,r=void 0===n?[]:n,o=t.keep,a=void 0===o?[]:o;return r.length||a.length?e.filter((function(e){return a.length?a.includes(e):!r.includes(e)})):e});t.ZP=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t===n)return!0;if("object"!==(0,r.Z)(t)||null===t||"object"!==(0,r.Z)(n)||null===n)return!1;var i=o(Object.keys(t),a),u=o(Object.keys(n),a);if(i.length!==u.length)return!1;var c=Object.prototype.hasOwnProperty.bind(n);return i.every((function(r){return!!c(r)&&e(t[r],n[r])}))}},38609:function(e,t,n){"use strict";var r=n(71002),o=n(93433),a=(n(85827),n(41539),n(25387),n(2490),n(72608),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(47941),n(41331)),i=function(e,t,n){var r=(0,a.hX)(e,n);return r.reduce((function(e,t,o){return e.push(c(t,r[o],n)),e}),[])},u=function(e,t,n){var r=(0,a.hX)((0,o.Z)(new Set([].concat((0,o.Z)(Object.keys(e)),(0,o.Z)(Object.keys(t))))),n),i=Object.prototype.hasOwnProperty.bind(t);return r.reduce((function(r,o){return i(o)?r[o]=c(e[o],t[o],n):r[o]=e[o],r}),{})},c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e===t||"object"!==(0,r.Z)(e)||null===e||"object"!==(0,r.Z)(t)||null===t?t:Array.isArray(t)?i(e,0,n):u(e,t,n)};t.Z=c},58591:function(e,t,n){"use strict";n.d(t,{bp:function(){return g},kG:function(){return p},m$:function(){return f},np:function(){return m},xs:function(){return v}});var r=n(29439),o=(n(74916),n(23123),n(85827),n(41539),n(25387),n(2490),n(72608),n(82772),n(69720),n(21249),n(57640),n(9924),n(92222),n(59242)),a=n.n(o),i=n(82492),u=n.n(i),c=n(57557),s=n.n(c),l=/[&;]/,f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:decodeURIComponent(window.location.hash.substr(1));return 0===e.length?{}:e.split(l).reduce((function(e,t){var n=t.indexOf("=");-1!==n&&(e[t.substring(0,n)]=t.substring(n+1));return e}),{})},d=function(e){var t=Object.entries(e);return 0===t.length?"":t.map((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return"".concat(n,"=").concat(encodeURIComponent(o))})).join("&")},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1)),n=s()(f(t),e);return d(n)},v=(a()([f,d]),function(e){var t=f();u()(t,e);var n="#".concat(d(t)),r=history.state;location.hash=n,history.replaceState(r,"",n)}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:decodeURIComponent(window.location.hash.substr(1));return f(t)[e]},g=function(e){history.replaceState(history.state,"","#".concat(p(e)))}},78710:function(e,t,n){"use strict";n.d(t,{xZ:function(){return y},Fb:function(){return h},aD:function(){return b},HM:function(){return g},Xh:function(){return m},ZP:function(){return w},vT:function(){return S},iM:function(){return d},Ly:function(){return O},tj:function(){return p},se:function(){return v}});var r,o,a,i=n(4942),u=(n(74916),n(15306),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(75674)),c=n(64637);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=(null===(r=window.envSettings)||void 0===r?void 0:r.isAgent)||!1,d=function(){var e,t,n;return f&&!(null!==(e=window.localNetdataAgent)&&void 0!==e&&e.cloudEnabled||"disabled"!==(null===(t=window.localNetdataRegistry)||void 0===t?void 0:t.cloudStatus)&&"unavailable"!==(null===(n=window.localNetdataRegistry)||void 0===n?void 0:n.cloudStatus)||localStorage.getItem("netdataJWT"))},p=/\/(spaces|nodes|overview|alerts|dashboards|anomalies|events|cloud)\/?.*/,v=f?window.location.pathname.replace(p,""):"/",m=(0,c.lV)((null===(o=window.localNetdataRegistry)||void 0===o?void 0:o.hostname)||"agent"),g=(null===(a=window.localNetdataRegistry)||void 0===a?void 0:a.mg)||"agent",b={createdAt:"",description:"",iconURL:"",id:g,error:null,loaded:!0,name:m,slug:m,permissions:{"user:ChangeName":"user:ChangeName","user:ChangeTheme":"user:ChangeTheme","user:ChangeEmailSetting":"user:ChangeEmailSetting","user:ChangeSpaceRoomNotifications":!1,"user:AddAPIToken":"user:AddAPIToken","user:DeleteAPIToken":"user:DeleteAPIToken","user:ReplaceAPIToken":"user:ReplaceAPIToken","user:CreateSpace":"user:CreateSpace","user:UpdateVisitedNodes":"user:UpdateVisitedNodes","space:Read":"space:Read","space:UpdateMeta":"space:UpdateMeta","room:ReadUsers":"room:ReadUsers","room:ReadAll":"room:ReadAll","room:Read":"room:Read","alert:ReadAll":"alert:ReadAll","function:ReadAll":"function:ReadAll","function:ExecAll":"function:ExecAll","function:Exec":"function:Exec","function:ExecPrivileged":"function:ExecPrivileged","feed:ReadBasic":"feed:ReadBasic","feed:ReadManagement":"feed:ReadManagement","billing:ReadAll":"billing:ReadAll","billing:ReadBasic":"billing:ReadBasic","visitedNodes:Update":"visitedNodes:Update","visitedNodes:ReadAll":"visitedNodes:ReadAll"}},h="local",y=l(l({},u.Z),{},{id:h,slug:h,name:h,loaded:!0,fullyLoaded:!0,spaceId:g,untouchable:!1}),S="overview",O=function(e){return f&&e===g},w=f},2145:function(e,t,n){"use strict";var r=n(15861),o=n(64687),a=n.n(o),i=(n(92222),n(47941),n(67294));t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="refreshed-after-lazy-import",o=t?"".concat(t,"-").concat(n):n;return(0,i.lazy)((0,r.Z)(a().mark((function t(){var n,r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=JSON.parse(window.sessionStorage.getItem(o)||"false"),t.prev=1,t.next=4,e();case 4:return r=t.sent,window.sessionStorage.setItem(o,"false"),t.abrupt("return",r);case 9:if(t.prev=9,t.t0=t.catch(1),n){t.next=14;break}return window.sessionStorage.setItem(o,"true"),t.abrupt("return",window.location.reload());case 14:throw t.t0;case 15:case"end":return t.stop()}}),t,null,[[1,9]])}))))}},66152:function(e,t,n){"use strict";n.d(t,{Tg:function(){return v},k5:function(){return p},v:function(){return d}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(71002),o=n(4942);n(74916),n(15306),n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(26699),n(32023);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=[],c=function(e,t,n){return i(i({},e),{},(0,o.Z)({},function(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase()}(t),n))},s=function(e,t,n){return i(i({},e),{},(0,o.Z)({},function(e){return e.replace(/([_][a-z])/g,(function(e){return e[1].toUpperCase()}))}(t),n))},l=function(e,t,n){return i(i({},e),{},(0,o.Z)({},function(e){return e.replace(/([\s\-_][a-z])/g,(function(e){return e[1].toUpperCase()}))}(t),n))},f=function(e,t){var n=t.func,a=t.action,c=t.omit,s=void 0===c?u:c,l=t.depth,f=void 0===l?0:l;return(f-=1)?Array.isArray(e)?e.map((function(e){return n(e,{omit:s})})):"object"===(0,r.Z)(e)&&e?Object.keys(e).reduce((function(t,r){if(s.includes(r))return i(i({},t),{},(0,o.Z)({},r,e[r]));var u=n(e[r],{omit:s});return a(t,r,u)}),{}):e:e},d=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.omit,o=n.depth;return f(t,{func:e,action:c,omit:r,depth:o})},p=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.omit,o=n.depth;return f(t,{func:e,action:s,omit:r,depth:o})},v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.omit,o=n.depth;return f(t,{func:e,action:l,omit:r,depth:o})}},26398:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(4942),o=n(29439),a=(n(74916),n(77601),n(47941),n(4723),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(52861)),i=n(46189),u=n(78710),c=(n(15306),n(92222),n(64765),n(64637)),s=(n(26699),n(32023),function(e,t,n){var r=n.includes("join-callback")?n:encodeURIComponent(n);return"".concat(t).concat(t?"&":"?","cloudRoute=").concat(e).concat(r)});function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){return function(t,n){try{if(/text\/plain/.test(n.getContentType()))throw{errorMessage:t};var r=JSON.parse(t||"{}");if(r.errorMsgKey)throw r;return e?e(r):r}catch(o){return o}}},p=function(e){return e},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=e.apply(void 0,n),a=o.catch((function(e){var t,r;if(401!==(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)||null!==e&&void 0!==e&&null!==(r=e.config)&&void 0!==r&&r.allow401)throw e;if(u.ZP){var o=window.location.origin+window.location.pathname.replace(u.tj,"");if(n[1].baseURL===window.envSettings.agentApiUrl)throw e;window.location.href=(0,c.h2)("".concat(window.envSettings.cloudUrl,"/trust?redirect_uri=").concat(encodeURIComponent(window.location.href),"&agent_uri=").concat(encodeURIComponent(o||window.envSettings.agentApiUrl)))}else{var a=window.location,i=a.pathname,l=a.search,f=a.hash;if(!/(sign-(in|up)|join-space)/.test(i))return window.location.replace((0,c.h2)("".concat(u.ZP?window.envSettings.cloudUrl:"","/sign-in").concat(s(i,l,f))))}}));return a.cancel=o.cancel,a}}((function(n){for(var r,c,s,l=arguments.length,v=new Array(l>1?l-1:0),m=1;m<l;m++)v[m-1]=arguments[m];var g=t?v:[null,v[0]],b=(0,o.Z)(g,2),h=b[0],y=b[1],S=void 0===y?{}:y,O=a.Z.CancelToken.source(),w=S.transform,A=void 0===w?p:w,k=S.validateStatus,P=void 0===k?function(e){return e<300||304===e}:k,Z=localStorage.getItem("netdataJWT"),E=null===(r=window.localNetdataRegistry)||void 0===r?void 0:r.mg,j=localStorage.getItem("agentJWT:".concat(E)),x=S.baseURL||i.Z.apiBaseURL||"",C=function(n,r){return t?a.Z[e](n,h,r):a.Z[e](n,r)}(n,f(f({validateStatus:P},S),{},{baseURL:x,transformResponse:[d(A)],cancelToken:O.token},(!!Z||!!j)&&{headers:f(f(f({},null===S||void 0===S?void 0:S.headers),/netdata\.cloud/.test(x)&&{Authorization:"Bearer ".concat(Z)}),x===window.envSettings.agentApiUrl&&j&&"undefined"!==j&&(null!==(c=window.localNetdataRegistry)&&void 0!==c&&c.xNetdataAuthHeader?{"X-Netdata-Auth":"Bearer ".concat(j)}:{Authorization:"Bearer ".concat(j)}))})),I=C.catch((function(e){throw e.isCancel=a.Z.isCancel(e),e}));I.cancel=function(){return O.cancel()};var T=null===(s=n.match(/\/spaces\/(.+?)\//))||void 0===s?void 0:s[1];return(0,u.Ly)(T)&&I.cancel(),I}))},m={get:v("get"),post:v("post",!0),patch:v("patch",!0),put:v("put",!0),delete:v("delete")}},16634:function(e,t){"use strict";t.Z=function(e){if(!e.response){var t=e.message||"Something went wrong";return{errorCode:500,errorMessage:t,errorMsgKey:500,status:500,statusText:t}}var n=e.response,r=n.data;return{errorCode:r.errorCode,errorMessage:r.errorMessage,errorMsgKey:r.errorMsgKey,status:n.status,statusText:n.statusText}}},28234:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});n(66992),n(51532),n(41539),n(78783),n(10072),n(23042),n(99137),n(71957),n(96306),n(103),n(74592),n(58276),n(35082),n(12813),n(18222),n(38563),n(50336),n(7512),n(33948);var r=new Map([["ErrParsingRequestBody","Bad Request"],["ErrUntrustedRedirectURI","Untrusted Redirect URI"],["ErrInternalServerError","Internal Server Error"],["ErrUnauthenticated","User Not Authenticated"],["ErrInvalidLastUpdatedRange","Invalid Time Selection"],["ErrForbidden","Forbidden"],["ErrInvalidEmail","Invalid E-mail"],["ErrInvalidRedirectURI","Invalid Redirect URI"],["ErrMissingStateCookie","Missing Authentication Cookie"],["ErrIncorrectChallengeResponse","Incorrect Response"],["ErrAccountDeleted","Account Deleted!"],["ErrInvalidAccountID","Invalid Account ID"],["ErrVisitedNodeNotFound","Node Not Found"],["ErrAccountIsTheLastMemberOfAPaidSpace","Cannot delete account"],["ErrWworkspaceSlugTaken","Space Slug Unavailable"],["ErrInvalidWorkspaceName","Bad Space Name"],["ErrNotWorkspaceMember","User is not a Space member"],["ErrInvalidWorkspaceID","Invalid Space ID"],["ErrWorkspaceNotFound","No Space Found"],["ErrSpaceSlugTaken","Space Slug Unavailable"],["ErrInvalidSpaceName","Invalid Space Name"],["ErrNotSpaceMember","Not a Space Member"],["ErrForbiddenNotAdmin","Not a Space Admin"],["ErrLastSpaceAdmin","Last Admin In Space"],["ErrLastSpaceMember","Last Member In Space"],["ErrInvalidSpaceID","Bad Space ID"],["ErrInvalidMemberID","Bad Member ID"],["ErrForbiddenNotMember","Not a Member"],["ErrMissingMemberIDs","No Member IDs Given"],["ErrSpaceNotFound","Space Not Found"],["ErrSpaceMemberNotFound","Space Member Not Found"],["ErrMissingTokenIDs","Token ID Not Found"],["ErrCannotDeleteCurrentToken","You cannot delete the token in use for this session"],["ErrInvalidRole","Invalid Member Role"],["ErrCannotLeaveSpace","Cannot Leave Space"],["ErrInvalidSpaceDescription","Invalid Space Description"],["ErrInvalidEmailDomain","Invalid Email Domain"],["ErrCanNotDeletePaidSpace","Cannot delete paid space"],["ErrAgentCanceledBigResponse","Agent's response is too big"],["ErrAgentExpired","Agent is overloaded"],["ErrAgentTimeout","Timeout waiting agent response"],["ErrAlreadyClaimed","Node Already Claimed"],["ErrContextNotFound","Node doesn't have the requested context"],["ErrInternal","Internal server error"],["ErrInvalidNodeID","Invalid Node ID"],["ErrMissingNodeIDs","No Node IDs Given"],["ErrNoData","Node doesn't have data for the requested period"],["ErrNodeNotFound","Node Not Found"],["ErrNodeUnreachable","Unreachable Node"],["ErrUnreachable","Node is unreachable"],["ErrNodeInstanceNotFound","Node doesn't exist on Netdata"],["ErrRoomNameExist","Room Name Already Exists"],["ErrInvalidRoomName","Invalid Room Name"],["ErrRoomNotFound","Room Not Found"],["ErrInvalidRoomID","Invalid Room ID"],["ErrRoomNameTaken","Room Name Unavailable"],["ErrContextNotFound","Context Not Found"],["ErrNodeContextNotFound","Metric Context Not Found"],["ErrInvalidContextID","Invalid Metric Context ID"],["ErrForbiddenNotRoomMember","Not a Room Member"],["ErrUntouchableRoom","Room Cannot Be Changed"],["ErrRoomCannotBeDefault","Private Room Cannot Be Set As Default"],["ErrInvalidRoomDescription","Invalid Room Description"],["ErrRoomMemberAlreadyExists","Member Already Exists In Room"],["ErrAllowedMembersIncreased","Space member limit"],["ErrPendingInvitationsLimitReached","Pending invitations limit"],["ErrSpaceMembersLimitReached","Space member limit"],["Network Error","No internet connection"],["Timeout","Timeout"],["default","Something went wrong"]]),o=function(e){if(e)return r.has(e)?r.get(e):r.get("default")}},20709:function(e,t){"use strict";var n=36e5;t.Z=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date)-e;if(t<0)return"0 seconds ago";var r=Math.floor(t/864e5);if(r>1)return"".concat(r," days ago");var o=Math.floor(t/n);if(o>0)return"".concat(o," hours ago");var a=Math.floor(t/6e4);if(a>1)return"".concat(a," mins ago");var i=Math.floor(t/1e3);return"".concat(i," seconds ago")}},91008:function(e,t,n){"use strict";var r,o=n(87462),a=n(45987),i=(n(92222),n(67294)),u=n(79655),c=n(71893),s=n(93416),l=n(82351),f=["alignItems","disabledColor","color","flavour","hoverColor","visitedColor","gap","strong"],d=["Component","as","disabled","onClick","to","href","isBasic"],p=["boxProps","showToolTip","content","align","isBasic"],v={default:{initial:"primary",visited:"accent",hover:"primary"},tableLink:{initial:"text",visited:"text",hover:"primary"}},m=function(e){return(0,c.default)(e).withConfig({displayName:"anchor",componentId:"sc-oaxxs6-0"})(["",""],(function(e){var t=e.disabled,n=e.color,r=e.hoverColor,o=e.disabledColor,a=e.visitedColor,i=e.theme,u=e.flavour,c=void 0===u?"default":u;return t?function(e){var t,n,r,o=e.disabledColor,a=e.color,i=e.theme,u=e.flavour,c=e.visitedColor;return"\n color: ".concat((0,s.getColor)(o||a||(null===(t=v[u])||void 0===t?void 0:t.initial))({theme:i}),";\n ").concat(o?"":"opacity: 0.4;","\n pointer-events: none;\n\n & > svg > use {\n fill: ").concat((0,s.getColor)(o||a||(null===(n=v[u])||void 0===n?void 0:n.initial))({theme:i}),";\n }\n \n &:visited {\n color: ").concat((0,s.getColor)(c||o||a||(null===(r=v[u])||void 0===r?void 0:r.visited))({theme:i}),";\n }\n")}({disabledColor:o,color:n,theme:i,flavour:c}):function(e){var t,n,r,o,a,i,u=e.color,c=e.theme,l=e.hoverColor,f=e.visitedColor,d=e.flavour;return"\n color: ".concat((0,s.getColor)(u||(null===(t=v[d])||void 0===t?void 0:t.initial))({theme:c}),";\n & > svg > use {\n fill: ").concat((0,s.getColor)(u||(null===(n=v[d])||void 0===n?void 0:n.initial))({theme:c}),";\n }\n &:hover {\n color: ").concat((0,s.getColor)(l||(null===(r=v[d])||void 0===r?void 0:r.hover))({theme:c})," !important;\n & > svg > use {\n fill: ").concat((0,s.getColor)(l||(null===(o=v[d])||void 0===o?void 0:o.hover))({theme:c})," !important;\n }\n }\n &:visited {\n color: ").concat((0,s.getColor)(f||u||(null===(a=v[d])||void 0===a?void 0:a.visited))({theme:c}),";\n & > svg > use {\n fill: ").concat((0,s.getColor)(f||u||(null===(i=v[d])||void 0===i?void 0:i.visited))({theme:c}),";\n }\n }\n cursor:pointer\n")}({color:n,theme:i,hoverColor:r,visitedColor:a,flavour:c})}))},g=m("a"),b=m((0,i.forwardRef)((function(e,t){e.alignItems,e.disabledColor,e.color,e.flavour,e.hoverColor,e.visitedColor,e.gap,e.strong;var n=(0,a.Z)(e,f);return i.createElement(u.rU,(0,o.Z)({ref:t},n))}))),h=function(e){return e.preventDefault()};t.Z=(r=function(e){var t=e.Component,n=void 0===t?s.Text:t,r=e.as,u=void 0===r?"a":r,c=e.disabled,l=e.onClick,f=e.to,p=e.href,v=(e.isBasic,(0,a.Z)(e,d));return i.createElement(n,(0,o.Z)({as:"a"===u?g:b,disabled:c,onClick:c?h:l},f&&!c&&{to:f},p&&!c&&{href:p},v))},function(e){var t=e.boxProps,n=e.showToolTip,o=e.content,u=e.align,c=e.isBasic,f=(0,a.Z)(e,p);return n?i.createElement(l.Z,{plain:!0,content:o,align:u,isBasic:c},i.createElement(s.Box,t,i.createElement(r,f))):i.createElement(r,f)})},92501:function(e,t,n){"use strict";n.d(t,{NY:function(){return p},Pf:function(){return g}});n(41539),n(81299),n(12419);var r=n(15671),o=n(43144),a=n(60136),i=n(82963),u=n(61120),c=n(24975),s=n(67294),l=n(93416),f=n(91008);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.Z)(e);if(t){var o=(0,u.Z)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}var p=function(e){var t=e.title,n=void 0===t?"Oops, something unexpected happened!":t,r=e.message,o=void 0===r?"":r;return s.createElement(l.Flex,{alignItems:"center",justifyContent:"center","data-testid":"error-boundary",flex:!0},s.createElement(l.Flex,{flex:!0,column:!0,alignItems:"center",gap:4,width:{max:115}},s.createElement(l.H3,null,n),!!o&&s.createElement(l.Text,null,o),s.createElement(l.Text,null,"We track these errors automatically, but if the problem persists feel free to contact us with a"," ",s.createElement(f.Z,{href:"https://github.com/netdata/netdata-cloud/issues/new/choose",target:"_blank",rel:"noopener noreferrer"},"ticket"),", a"," ",s.createElement(f.Z,{href:"https://community.netdata.cloud/",target:"_blank",rel:"noopener noreferrer"},"post in the forum")," ","or through"," ",s.createElement(f.Z,{href:"https://discord.com/invite/mPZ6WZKKG2",target:"_blank",rel:"noopener noreferrer"},"Discord"),"."),s.createElement(l.Text,null,"In the meantime you can refresh this page"),s.createElement(l.Button,{label:"Refresh",icon:"refresh",onClick:function(){return window.location.reload()},"data-ga":"error-boundary::click-reload::reload-on-error","data-testid":"error-boundary-reload"})))},v=function(e){(0,a.Z)(n,e);var t=d(n);function n(e){var o;return(0,r.Z)(this,n),(o=t.call(this,e)).state={hasError:!1},o}return(0,o.Z)(n,[{key:"componentDidCatch",value:function(e,t){console.log(e,t)}},{key:"render",value:function(){return this.state.hasError?s.createElement(p,null):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0}}}]),n}(s.Component),m=function(e){(0,a.Z)(n,e);var t=d(n);function n(){return(0,r.Z)(this,n),t.apply(this,arguments)}return(0,o.Z)(n)}(c.SV);m.defaultProps={fallback:p};var g=function(e){var t=window.envSettings.tracking?m:v;return function(n){return s.createElement(t,{fallback:p},s.createElement(e,n))}};t.ZP=m},14600:function(e,t,n){"use strict";n.d(t,{E:function(){return v},K:function(){return d}});var r=n(45987),o=n(4942),a=n(29439),i=(n(92222),n(41539),n(39714),n(74916),n(15306),n(85827),n(25387),n(2490),n(72608),n(4723),n(15581),n(34514),n(54747),n(2707),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),[{value:"Dateline Standard Time",abbr:"DST",text:"International Date Line West",utc:["Etc/GMT+12"]},{value:"UTC-11",abbr:"U",text:"Coordinated Universal Time-11",utc:["Etc/GMT+11","Pacific/Midway","Pacific/Niue","Pacific/Pago_Pago"]},{value:"Hawaiian Standard Time",abbr:"HST",text:"Hawaii",utc:["Etc/GMT+10","Pacific/Honolulu","Pacific/Johnston","Pacific/Rarotonga","Pacific/Tahiti"]},{value:"Alaskan Standard Time",abbr:"AKDT",text:"Alaska",utc:["America/Anchorage","America/Juneau","America/Nome","America/Sitka","America/Yakutat"]},{value:"Pacific Standard Time (Mexico)",abbr:"PDT",text:"Baja California",utc:["America/Santa_Isabel"]},{value:"Pacific Standard Time",abbr:"PST",text:"Pacific Time (US & Canada)",utc:["America/Los_Angeles","America/Dawson","America/Tijuana","America/Vancouver","America/Whitehorse","PST8PDT"]},{value:"US Mountain Standard Time",abbr:"UMST",text:"Arizona",utc:["America/Creston","America/Dawson_Creek","America/Hermosillo","America/Phoenix","Etc/GMT+7"]},{value:"Mountain Standard Time (Mexico)",abbr:"MDT",text:"Chihuahua, La Paz, Mazatlan",utc:["America/Chihuahua","America/Mazatlan"]},{value:"Mountain Standard Time",abbr:"MDT",text:"Mountain Time (US & Canada)",utc:["America/Boise","America/Cambridge_Bay","America/Denver","America/Edmonton","America/Inuvik","America/Ojinaga","America/Yellowknife","MST7MDT"]},{value:"Central America Standard Time",abbr:"CAST",text:"Central America",utc:["America/Belize","America/Costa_Rica","America/El_Salvador","America/Guatemala","America/Managua","America/Tegucigalpa","Etc/GMT+6","Pacific/Galapagos"]},{value:"Central Standard Time",abbr:"CDT",text:"Central Time (US & Canada)",utc:["America/Chicago","America/Indiana/Knox","America/Indiana/Tell_City","America/Matamoros","America/Menominee","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Rainy_River","America/Rankin_Inlet","America/Resolute","America/Winnipeg","CST6CDT"]},{value:"Central Standard Time (Mexico)",abbr:"CDT",text:"Guadalajara, Mexico City, Monterrey",utc:["America/Bahia_Banderas","America/Cancun","America/Merida","America/Mexico_City","America/Monterrey"]},{value:"Canada Central Standard Time",abbr:"CCST",text:"Saskatchewan",utc:["America/Regina","America/Swift_Current"]},{value:"SA Pacific Standard Time",abbr:"SPST",text:"Bogota, Lima, Quito",utc:["America/Bogota","America/Cayman","America/Coral_Harbour","America/Eirunepe","America/Guayaquil","America/Jamaica","America/Lima","America/Panama","America/Rio_Branco","Etc/GMT+5"]},{value:"Eastern Standard Time",abbr:"EDT",text:"Eastern Time (US & Canada)",utc:["America/Detroit","America/Havana","America/Indiana/Petersburg","America/Indiana/Vincennes","America/Indiana/Winamac","America/Iqaluit","America/Kentucky/Monticello","America/Louisville","America/Montreal","America/Nassau","America/New_York","America/Nipigon","America/Pangnirtung","America/Port-au-Prince","America/Thunder_Bay","America/Toronto","EST5EDT"]},{value:"US Eastern Standard Time",abbr:"UEDT",text:"Indiana (East)",utc:["America/Indiana/Marengo","America/Indiana/Vevay","America/Indianapolis"]},{value:"Venezuela Standard Time",abbr:"VST",text:"Caracas",utc:["America/Caracas"]},{value:"Paraguay Standard Time",abbr:"PYT",text:"Asuncion",utc:["America/Asuncion"]},{value:"Atlantic Standard Time",abbr:"ADT",text:"Atlantic Time (Canada)",utc:["America/Glace_Bay","America/Goose_Bay","America/Halifax","America/Moncton","America/Thule","Atlantic/Bermuda"]},{value:"Central Brazilian Standard Time",abbr:"CBST",text:"Cuiaba",utc:["America/Campo_Grande","America/Cuiaba"]},{value:"SA Western Standard Time",abbr:"SWST",text:"Georgetown, La Paz, Manaus, San Juan",utc:["America/Anguilla","America/Antigua","America/Aruba","America/Barbados","America/Blanc-Sablon","America/Boa_Vista","America/Curacao","America/Dominica","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guyana","America/Kralendijk","America/La_Paz","America/Lower_Princes","America/Manaus","America/Marigot","America/Martinique","America/Montserrat","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Santo_Domingo","America/St_Barthelemy","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Tortola","Etc/GMT+4"]},{value:"Pacific SA Standard Time",abbr:"PSST",text:"Santiago",utc:["America/Santiago","Antarctica/Palmer"]},{value:"Newfoundland Standard Time",abbr:"NDT",text:"Newfoundland",utc:["America/St_Johns"]},{value:"E. South America Standard Time",abbr:"ESAST",text:"Brasilia",utc:["America/Sao_Paulo"]},{value:"Argentina Standard Time",abbr:"AST",text:"Buenos Aires",utc:["America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Buenos_Aires","America/Catamarca","America/Cordoba","America/Jujuy","America/Mendoza"]},{value:"SA Eastern Standard Time",abbr:"SEST",text:"Cayenne, Fortaleza",utc:["America/Araguaina","America/Belem","America/Cayenne","America/Fortaleza","America/Maceio","America/Paramaribo","America/Recife","America/Santarem","Antarctica/Rothera","Atlantic/Stanley","Etc/GMT+3"]},{value:"Greenland Standard Time",abbr:"GDT",text:"Greenland",utc:["America/Godthab"]},{value:"Montevideo Standard Time",abbr:"MST",text:"Montevideo",utc:["America/Montevideo"]},{value:"Bahia Standard Time",abbr:"BST",text:"Salvador",utc:["America/Bahia"]},{value:"UTC-02",abbr:"U",text:"Coordinated Universal Time-02",utc:["America/Noronha","Atlantic/South_Georgia","Etc/GMT+2"]},{value:"Mid-Atlantic Standard Time",abbr:"MDT",text:"Mid-Atlantic - Old",utc:[]},{value:"Azores Standard Time",abbr:"ADT",text:"Azores",utc:["America/Scoresbysund","Atlantic/Azores"]},{value:"Cape Verde Standard Time",abbr:"CVST",text:"Cape Verde Is.",utc:["Atlantic/Cape_Verde","Etc/GMT+1"]},{value:"Morocco Standard Time",abbr:"MDT",text:"Casablanca",utc:["Africa/Casablanca","Africa/El_Aaiun"]},{value:"UTC",abbr:"UTC",text:"Coordinated Universal Time",utc:["America/Danmarkshavn","Etc/GMT"]},{value:"GMT Standard Time",abbr:"GMT",text:"Edinburgh, London",utc:["Europe/Isle_of_Man","Europe/Guernsey","Europe/Jersey","Europe/London"]},{value:"GMT Standard Time",abbr:"GDT",text:"Dublin, Lisbon",utc:["Atlantic/Canary","Atlantic/Faeroe","Atlantic/Madeira","Europe/Dublin","Europe/Lisbon"]},{value:"Greenwich Standard Time",abbr:"GST",text:"Monrovia, Reykjavik",utc:["Africa/Abidjan","Africa/Accra","Africa/Bamako","Africa/Banjul","Africa/Bissau","Africa/Conakry","Africa/Dakar","Africa/Freetown","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Africa/Sao_Tome","Atlantic/Reykjavik","Atlantic/St_Helena"]},{value:"W. Europe Standard Time",abbr:"WEDT",text:"Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",utc:["Arctic/Longyearbyen","Europe/Amsterdam","Europe/Andorra","Europe/Berlin","Europe/Busingen","Europe/Gibraltar","Europe/Luxembourg","Europe/Malta","Europe/Monaco","Europe/Oslo","Europe/Rome","Europe/San_Marino","Europe/Stockholm","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Zurich"]},{value:"Central Europe Standard Time",abbr:"CEDT",text:"Belgrade, Bratislava, Budapest, Ljubljana, Prague",utc:["Europe/Belgrade","Europe/Bratislava","Europe/Budapest","Europe/Ljubljana","Europe/Podgorica","Europe/Prague","Europe/Tirane"]},{value:"Romance Standard Time",abbr:"RDT",text:"Brussels, Copenhagen, Madrid, Paris",utc:["Africa/Ceuta","Europe/Brussels","Europe/Copenhagen","Europe/Madrid","Europe/Paris"]},{value:"Central European Standard Time",abbr:"CEDT",text:"Sarajevo, Skopje, Warsaw, Zagreb",utc:["Europe/Sarajevo","Europe/Skopje","Europe/Warsaw","Europe/Zagreb"]},{value:"W. Central Africa Standard Time",abbr:"WCAST",text:"West Central Africa",utc:["Africa/Algiers","Africa/Bangui","Africa/Brazzaville","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Malabo","Africa/Ndjamena","Africa/Niamey","Africa/Porto-Novo","Africa/Tunis","Etc/GMT-1"]},{value:"Namibia Standard Time",abbr:"NST",text:"Windhoek",utc:["Africa/Windhoek"]},{value:"GTB Standard Time",abbr:"GDT",text:"Athens, Bucharest",utc:["Europe/Athens","Asia/Nicosia","Europe/Bucharest","Europe/Chisinau"]},{value:"Middle East Standard Time",abbr:"MEDT",text:"Beirut",utc:["Asia/Beirut"]},{value:"Egypt Standard Time",abbr:"EST",text:"Cairo",utc:["Africa/Cairo"]},{value:"Syria Standard Time",abbr:"SDT",text:"Damascus",utc:["Asia/Damascus"]},{value:"E. Europe Standard Time",abbr:"EEDT",text:"E. Europe",utc:["Asia/Nicosia","Europe/Athens","Europe/Bucharest","Europe/Chisinau","Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"South Africa Standard Time",abbr:"SAST",text:"Harare, Pretoria",utc:["Africa/Blantyre","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Kigali","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Etc/GMT-2"]},{value:"FLE Standard Time",abbr:"FDT",text:"Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",utc:["Europe/Helsinki","Europe/Kiev","Europe/Mariehamn","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Uzhgorod","Europe/Vilnius","Europe/Zaporozhye"]},{value:"Turkey Standard Time",abbr:"TDT",text:"Istanbul",utc:["Europe/Istanbul"]},{value:"Israel Standard Time",abbr:"JDT",text:"Jerusalem",utc:["Asia/Jerusalem"]},{value:"Libya Standard Time",abbr:"LST",text:"Tripoli",utc:["Africa/Tripoli"]},{value:"Jordan Standard Time",abbr:"JST",text:"Amman",utc:["Asia/Amman"]},{value:"Arabic Standard Time",abbr:"AST",text:"Baghdad",utc:["Asia/Baghdad"]},{value:"Kaliningrad Standard Time",abbr:"KST",text:"Kaliningrad",utc:["Europe/Kaliningrad"]},{value:"Arab Standard Time",abbr:"AST",text:"Kuwait, Riyadh",utc:["Asia/Aden","Asia/Bahrain","Asia/Kuwait","Asia/Qatar","Asia/Riyadh"]},{value:"E. Africa Standard Time",abbr:"EAST",text:"Nairobi",utc:["Africa/Addis_Ababa","Africa/Asmera","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Mogadishu","Africa/Nairobi","Antarctica/Syowa","Etc/GMT-3","Indian/Antananarivo","Indian/Comoro","Indian/Mayotte"]},{value:"Moscow Standard Time",abbr:"MSK",text:"Moscow, St. Petersburg, Volgograd, Minsk",utc:["Europe/Kirov","Europe/Moscow","Europe/Simferopol","Europe/Volgograd","Europe/Minsk"]},{value:"Samara Time",abbr:"SAMT",text:"Samara, Ulyanovsk, Saratov",utc:["Europe/Astrakhan","Europe/Samara","Europe/Ulyanovsk"]},{value:"Iran Standard Time",abbr:"IDT",text:"Tehran",utc:["Asia/Tehran"]},{value:"Arabian Standard Time",abbr:"AST",text:"Abu Dhabi, Muscat",utc:["Asia/Dubai","Asia/Muscat","Etc/GMT-4"]},{value:"Azerbaijan Standard Time",abbr:"ADT",text:"Baku",utc:["Asia/Baku"]},{value:"Mauritius Standard Time",abbr:"MST",text:"Port Louis",utc:["Indian/Mahe","Indian/Mauritius","Indian/Reunion"]},{value:"Georgian Standard Time",abbr:"GET",text:"Tbilisi",utc:["Asia/Tbilisi"]},{value:"Caucasus Standard Time",abbr:"CST",text:"Yerevan",utc:["Asia/Yerevan"]},{value:"Afghanistan Standard Time",abbr:"AST",text:"Kabul",utc:["Asia/Kabul"]},{value:"West Asia Standard Time",abbr:"WAST",text:"Ashgabat, Tashkent",utc:["Antarctica/Mawson","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Dushanbe","Asia/Oral","Asia/Samarkand","Asia/Tashkent","Etc/GMT-5","Indian/Kerguelen","Indian/Maldives"]},{value:"Yekaterinburg Time",abbr:"YEKT",text:"Yekaterinburg",utc:["Asia/Yekaterinburg"]},{value:"Pakistan Standard Time",abbr:"PKT",text:"Islamabad, Karachi",utc:["Asia/Karachi"]},{value:"India Standard Time",abbr:"IST",text:"Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Kolkata"]},{value:"India Standard Time",abbr:"IST",text:"Chennai, Kolkata, Mumbai, New Delhi",utc:["Asia/Calcutta"]},{value:"Sri Lanka Standard Time",abbr:"SLST",text:"Sri Jayawardenepura",utc:["Asia/Colombo"]},{value:"Nepal Standard Time",abbr:"NST",text:"Kathmandu",utc:["Asia/Kathmandu"]},{value:"Central Asia Standard Time",abbr:"CAST",text:"Nur-Sultan (Astana)",utc:["Antarctica/Vostok","Asia/Almaty","Asia/Bishkek","Asia/Qyzylorda","Asia/Urumqi","Etc/GMT-6","Indian/Chagos"]},{value:"Bangladesh Standard Time",abbr:"BST",text:"Dhaka",utc:["Asia/Dhaka","Asia/Thimphu"]},{value:"Myanmar Standard Time",abbr:"MST",text:"Yangon (Rangoon)",utc:["Asia/Rangoon","Indian/Cocos"]},{value:"SE Asia Standard Time",abbr:"SAST",text:"Bangkok, Hanoi, Jakarta",utc:["Antarctica/Davis","Asia/Bangkok","Asia/Hovd","Asia/Jakarta","Asia/Phnom_Penh","Asia/Pontianak","Asia/Saigon","Asia/Vientiane","Etc/GMT-7","Indian/Christmas"]},{value:"N. Central Asia Standard Time",abbr:"NCAST",text:"Novosibirsk",utc:["Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk"]},{value:"China Standard Time",abbr:"CST",text:"Beijing, Chongqing, Hong Kong, Urumqi",utc:["Asia/Hong_Kong","Asia/Macau","Asia/Shanghai"]},{value:"North Asia Standard Time",abbr:"NAST",text:"Krasnoyarsk",utc:["Asia/Krasnoyarsk"]},{value:"Singapore Standard Time",abbr:"MPST",text:"Kuala Lumpur, Singapore",utc:["Asia/Brunei","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Makassar","Asia/Manila","Asia/Singapore","Etc/GMT-8"]},{value:"W. Australia Standard Time",abbr:"WAST",text:"Perth",utc:["Australia/Perth","Antarctica/Casey"]},{value:"Taipei Standard Time",abbr:"TST",text:"Taipei",utc:["Asia/Taipei"]},{value:"Ulaanbaatar Standard Time",abbr:"UST",text:"Ulaanbaatar",utc:["Asia/Choibalsan","Asia/Ulaanbaatar"]},{value:"North Asia East Standard Time",abbr:"NAEST",text:"Irkutsk",utc:["Asia/Irkutsk"]},{value:"Japan Standard Time",abbr:"JST",text:"Osaka, Sapporo, Tokyo",utc:["Asia/Dili","Asia/Jayapura","Asia/Tokyo","Etc/GMT-9","Pacific/Palau"]},{value:"Korea Standard Time",abbr:"KST",text:"Seoul",utc:["Asia/Pyongyang","Asia/Seoul"]},{value:"Cen. Australia Standard Time",abbr:"CAST",text:"Adelaide",utc:["Australia/Adelaide","Australia/Broken_Hill"]},{value:"AUS Central Standard Time",abbr:"ACST",text:"Darwin",utc:["Australia/Darwin"]},{value:"E. Australia Standard Time",abbr:"EAST",text:"Brisbane",utc:["Australia/Brisbane","Australia/Lindeman"]},{value:"AUS Eastern Standard Time",abbr:"AEST",text:"Canberra, Melbourne, Sydney",utc:["Australia/Melbourne","Australia/Sydney"]},{value:"West Pacific Standard Time",abbr:"WPST",text:"Guam, Port Moresby",utc:["Antarctica/DumontDUrville","Etc/GMT-10","Pacific/Guam","Pacific/Port_Moresby","Pacific/Saipan","Pacific/Truk"]},{value:"Tasmania Standard Time",abbr:"TST",text:"Hobart",utc:["Australia/Currie","Australia/Hobart"]},{value:"Yakutsk Standard Time",abbr:"YST",text:"Yakutsk",utc:["Asia/Chita","Asia/Khandyga","Asia/Yakutsk"]},{value:"Central Pacific Standard Time",abbr:"CPST",text:"Solomon Is., New Caledonia",utc:["Etc/GMT-11"]},{value:"Vladivostok Standard Time",abbr:"VST",text:"Vladivostok",utc:["Asia/Sakhalin","Asia/Ust-Nera","Asia/Vladivostok"]},{value:"New Zealand Standard Time",abbr:"NZST",text:"Auckland, Wellington",utc:["Antarctica/McMurdo","Pacific/Auckland"]},{value:"UTC+12",abbr:"U",text:"Coordinated Universal Time+12",utc:["Etc/GMT-12","Pacific/Funafuti","Pacific/Kwajalein","Pacific/Majuro","Pacific/Nauru","Pacific/Tarawa","Pacific/Wake","Pacific/Wallis"]},{value:"Fiji Standard Time",abbr:"FST",text:"Fiji",utc:["Pacific/Fiji"]},{value:"Magadan Standard Time",abbr:"MST",text:"Magadan",utc:["Asia/Anadyr","Asia/Kamchatka","Asia/Magadan","Asia/Srednekolymsk"]},{value:"Kamchatka Standard Time",abbr:"KDT",text:"Petropavlovsk-Kamchatsky - Old",utc:["Asia/Kamchatka"]},{value:"Tonga Standard Time",abbr:"TST",text:"Nuku'alofa",utc:["Etc/GMT-13","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Tongatapu"]},{value:"Samoa Standard Time",abbr:"SST",text:"Samoa",utc:["Pacific/Apia"]}]),u=["utc"];function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=new Date,f=function(){try{return new Intl.DateTimeFormat("default",{}).resolvedOptions().timeZone||"Etc/GMT"}catch(e){return"Etc/GMT"}},d=function(){var e={};return i.reduce((function(t,n){var r=n.utc;try{var o=new Intl.DateTimeFormat("fr",{timeZone:r[0],timeZoneName:"short"}).format(l).match(/[\u2212+].+/)||[],i=function(e){return e?e.replace("\u2212","-"):""}((0,a.Z)(o,1)[0]);if(e[i])return t.concat(s(s({},n),{},{offset:e[i]}));var u=function(e){if(!e)return"+0";var t=e.split(":");return t.length>1?"".concat(t[0]).concat((t[1]/60).toString().substr(1)):t[0]}(i);return e[i]=u,t.concat(s(s({},n),{},{offset:u}))}catch(c){return t}}),[])}().sort((function(e,t){return e.offset-t.offset})),p=function(e){return e.reduce((function(e,t){var n=t.utc,o=(0,r.Z)(t,u);return n.forEach((function(t){return e[t]=s(s({},o),{},{utc:t})})),e}),{})}(d),v=function(e,t){var n=t||("default"===e?f():e);return p[n in p?n:f()]||{}}},98469:function(e,t,n){"use strict";n.r(t),n.d(t,{isTryingToJoinWorkspace:function(){return s}});n(26699),n(32023),n(66992),n(41539),n(78783),n(33948),n(41637);var r=n(67294),o=n(89250),a=n(62200),i=n(78266),u=n(13477),c=n(33427),s=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").includes("/join-space")},l="Successfully joined space!";t.default=function(){var e=(0,u.Iy)("isAnonymous"),t=(0,o.s0)(),n=new URLSearchParams(window.location.hash.substr(1));return(0,r.useEffect)((function(){if(!e){var r=n.has("error_msg_key")?decodeURIComponent(n.get("error_msg_key")||""):null;if(r){var o=n.has("error_message")?decodeURIComponent(n.get("error_message")||""):null;r===a.Sq?(0,c.P4)(l):(0,c.P4)(o||"Error joining space",!0),t("/spaces",{replace:!0})}else(0,c.P4)(l)}}),[e]),r.createElement(i.Z,{title:"Adding you to the space..."})}},78266:function(e,t,n){"use strict";n.d(t,{H:function(){return d}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),u=n(93416),c=["title","width","height"],s=["title","body","iconProps","animate"],l=(0,i.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),f=(0,i.default)(u.Icon).withConfig({displayName:"loader__StyledIcon",componentId:"sc-a76ek6-0"})(["width:",";height:",";animation:",";"],(function(e){return e.width}),(function(e){return e.height}),(function(e){return e.animate?(0,i.css)([""," 1.6s ease-in infinite"],l):""})),d=function(e){var t=e.title,n=void 0===t?"Loading":t,i=e.width,u=void 0===i?"208px":i,s=e.height,l=void 0===s?"177px":s,d=(0,o.Z)(e,c);return a.createElement(f,(0,r.Z)({name:"netdata",color:"primary",title:n,"data-testid":"loading-logo",width:u,height:l},d))};t.Z=function(e){var t=e.title,n=e.body,i=e.iconProps,c=e.animate,l=void 0===c||c,f=(0,o.Z)(e,s);return a.createElement(u.Flex,(0,r.Z)({column:!0,height:"100vh",background:"mainBackground",width:"100%",justifyContent:"center",alignItems:"center"},f),a.createElement(d,(0,r.Z)({},i,{animate:l})),t&&a.createElement(u.H3,{color:"text",margin:[1,0,0]},t),n&&a.createElement(u.Text,{color:"text",margin:[4.5,0,0]},n))}},74855:function(e,t,n){"use strict";n.d(t,{P_:function(){return l},sc:function(){return d},t_:function(){return f}});var r=n(87462),o=n(45987),a=n(67294),i=n(93416),u=n(28234),c=["errorCode","errorMessage","errorMsgKey"],s={success:"success",error:"error",warning:"warning",default:"border"},l=function(e){var t=e.header,n=e.text,r=e.icon,o=e.renderContent,u=e.success,c=e.error,l=e.warning,f=(u?"success":c&&"error")||l&&"warning"||"default";return a.createElement(i.Flex,{padding:[2],alignItems:"center",justifyContent:"between"},a.createElement(i.Flex,{alignItems:"center",gap:3},r&&a.createElement(i.Flex,{flex:!1},a.createElement(i.Icon,{color:s[f],name:r,size:"large"})),a.createElement(i.Flex,{column:!0,gap:1},t&&a.createElement(i.H5,{color:s[f]},t),n&&a.createElement(i.TextSmall,{color:s[f]},n),o&&o(e))),a.createElement(i.Flex,null,a.createElement(i.Icon,{name:"x",size:"large",color:s[f]})))},f=function(e){e.errorCode;var t=e.errorMessage,n=e.errorMsgKey,i=(0,o.Z)(e,c);return a.createElement(l,(0,r.Z)({error:!0,icon:"error",text:t,header:(0,u.r)(n)},i))},d=function(e){return a.createElement(l,e)}},33427:function(e,t,n){"use strict";n.d(t,{$T:function(){return s},FR:function(){return g},OU:function(){return f},P4:function(){return p},Q5:function(){return c},R6:function(){return m},aN:function(){return d},cH:function(){return b},iL:function(){return v},oG:function(){return l}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(52631),a=n(74855);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(e){var t={header:"Nodes",text:e},n=(0,a.sc)(u(u({},t),{},{success:!0,icon:"node"}));o.Z.success(n,{context:"showNodesNotification"})},s=function(e){var t={header:"Rooms",text:e},n=(0,a.sc)(u(u({},t),{},{success:!0,icon:"space"}));o.Z.success(n,{context:"showRoomsNotification"})},l=function(e){var t={header:"Room users",text:e||(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"Users left the room!":"Users were added to room!")},n=(0,a.sc)(u(u({},t),{},{success:!0,icon:"space"}));o.Z.success(n,{context:"showUsersInRoomNotification"})},f=function(e){var t={header:"Space users",text:e||(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"Users left the space!":"Users were added to space!")},n=(0,a.sc)(u(u({},t),{},{success:!0,icon:"space"}));o.Z.success(n,{context:"showUsersInSpaceNotification"})},d=function(e){var t={header:"Rooms",text:e||(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"Rooms removed from Space!":"Rooms were added to Space!")},n=(0,a.sc)(u(u({},t),{},{success:!0,icon:"space"}));o.Z.success(n,{context:"showRoomsInSpaceNotification"})},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={header:t?"Error joining space":"Welcome!",text:e},r=(0,a.sc)(u(u({},n),{},{success:!t,icon:"gear"}));t?o.Z.error(r,{context:"showJoiningSpaceNotification"}):o.Z.success(r,{context:"showJoiningSpaceNotification"})},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={header:t?"Space removed":"Space added",text:e},r=(0,a.sc)(u(u({},n),{},{success:!t,icon:"gear"}));o.Z.success(r,{context:"showSpaceNotification"})},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={header:t?"Error creating room":"Rooms",text:e},r=(0,a.sc)(u(u({},n),{},{success:!t,icon:"gear"}));t?o.Z.error(r,{context:"showRoomCreationNotification"}):o.Z.success(r,{context:"showRoomCreationNotification"})},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={text:e},r=(0,a.sc)(u(u({},n),{},{text:e,success:!t,icon:"chart_added"}));t?o.Z.error(r,{context:"showDashboardCreatedNotification"}):o.Z.success(r,{context:"showDashboardCreatedNotification"})},b=function(){var e=(0,a.sc)({header:"Dashboard",text:"Invalid dashboard link. Please double-check the dashboard you are trying to access.",success:!1});o.Z.error(e,{context:"showInvalidDashboardSlugNotification"})}},52631:function(e,t,n){"use strict";n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(45987),a=n(55678),i=["context"],u=["context"];function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={position:a.Am.POSITION.BOTTOM_RIGHT,autoClose:1e4,pauseOnFocusLoss:!1},f={};t.Z={success:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.context,r=(0,o.Z)(t,i);n&&f[n]&&(a.Am.dismiss(f[n]),delete f[n]),f[n]=a.Am.success(e,s(s({},l),r))},error:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.context,r=(0,o.Z)(t,u);n&&f[n]&&(a.Am.dismiss(f[n]),delete f[n]),f[n]=a.Am.error(e,s(s({},l),r))},dismiss:function(e){return a.Am.dismiss(e)}}},9058:function(e,t,n){"use strict";n.d(t,{Z:function(){return S},e:function(){return y}});var r=n(4942),o=n(29439),a=(n(41539),n(15581),n(2490),n(34514),n(54747),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(67294)),i=n(33937),u=n(65565),c=n(25382),s=n(24298),l=n(4822),f=n(74059),d=n(12008),p=n(39840),v=n(58591),m=n(14600);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,a.createContext)(null),y=function(){return(0,a.useContext)(h)},S=function(e){var t,n=e.children,r=(0,i.Ro)("theme");r=r&&"unspecified"!==r?r:"dark";var g=(0,l.I0)(),y=(0,o.Z)(g,2),S=y[0],O=S.after,w=S.before,A=S.utc,k=S.highlight,P=S.forcePlay,Z=y[1],E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.after,n=e.before;return(0,a.useMemo)((function(){if(t=+t,n=+n,!isNaN(t)&&!isNaN(n)&&t&&n)return{type:"highlight",range:[Math.floor(t/1e3),Math.ceil(n/1e3)]}}),[t,n])}(k),j=(0,d.O0)(),x=(0,o.Z)(j,1)[0],C=(0,a.useMemo)((function(){return{after:O<0?O:Math.floor(O/1e3),before:O<0?0:Math.ceil(w/1e3)}}),[O,w]),I=(0,f.Q6)(),T=(0,a.useMemo)((function(){var e=function(){var e=(0,v.m$)().utc;return(0,m.E)("default",e).utc}(),t=(0,c.Z)({attributes:b(b({theme:r,timezone:e,overlays:b({},E&&{highlight:E}),autofetchOnWindowBlur:P},C),{},{agent:I,containerWidth:.8*window.innerWidth,expandable:!1})});return window.netdataSDK=t,t}),[]);(0,u.Z)((function(){T.getNodes().forEach((function(e){return e.updateAttribute("theme",r)}))}),[r]),(0,u.Z)((function(){var e=T.getRoot().getAttribute("timezone");A!==e&&T.getRoot().getApplicableNodes({syncTimezone:!0}).forEach((function(e){return e.updateAttributes({timezone:A})}))}),[A]),(0,u.Z)((function(){var e=T.getRoot().getAttribute("overlays");if(E)T.getRoot().updateAttribute("overlays",b(b({},e),{},{highlight:E})),T.getRoot().getApplicableNodes({syncHighlight:!0}).forEach((function(e){return e.updateAttribute("overlays",b(b({},e.getAttribute("overlays")),{},{highlight:E}))}));else{var t=b({},e);delete t.highlight,T.getRoot().updateAttribute("overlays",t),T.getRoot().getApplicableNodes({syncHighlight:!0}).forEach((function(e){var t=b({},e.getAttribute("overlays"));delete t.highlight,e.updateAttribute("overlays",t)}))}}),[E]),(0,a.useEffect)((function(){if(x){T.trigger("goToLink",null,x.linkToGo);var e=T.getRoot().getNode({id:x.context});if(e){var t=e.getAttribute("overlays");e.updateAttribute("overlays",b(b({},t),{},{alarm:{type:"alarm",status:x.status,value:x.formattedLastStatusChangeValue,when:x.lastStatusChange}})),e.updateAttributes({selectedInstances:["".concat(x.instance,"@").concat(x.nodeId)],selectedNodes:[x.nodeId]})}var n=!!x&&T.getRoot().on("chartLoaded",(function(e){var t=e.getAttribute("id");if(x.context===t){var r=e.getAttribute("overlays");e.updateAttribute("overlays",b(b({},r),{},{alarm:{type:"alarm",status:x.status,value:x.formattedLastStatusChangeValue,when:x.lastStatusChange}})),e.updateAttributes({selectedInstances:["".concat(x.instance,"@").concat(x.nodeId)],selectedNodes:[x.nodeId]}),n()}}));return(0,s.unregister)(n)}}),[x]),(0,a.useEffect)((function(){var e=C.after,t=C.before;T.getRoot().moveX(e,t)}),[C]),(0,p.Wi)(x);var D=localStorage.getItem("netdataJWT"),N=null===(t=window.localNetdataRegistry)||void 0===t?void 0:t.mg,M=localStorage.getItem("agentJWT:".concat(N)),R=I?M:D;return(0,a.useEffect)((function(){T.getNodes().forEach((function(e){var t;return e.updateAttributes(b(b({},I&&null!==(t=window.localNetdataRegistry)&&void 0!==t&&t.xNetdataAuthHeader?{xNetdataBearer:R,bearer:null}:{xNetdataBearer:null,bearer:R}),{},{agent:I}))}))}),[I,R]),(0,a.useEffect)((function(){return(0,s.unregister)(T.getRoot().onAttributeChange("after",(function(){var e=T.getRoot().getAttributes(),t=e.after,n=e.before;Z({after:t<0?t:1e3*t,before:t<0?0:1e3*n})})),T.getRoot().onAttributeChange("overlays",(function(e,t){var n=e.highlight;if(n!==t.highlight){var r=null===n||void 0===n?void 0:n.range;if(r){var a=(0,o.Z)(r,2),i=a[0],u=a[1];Z({highlight:{after:1e3*i,before:1e3*u}})}else Z({highlight:{after:null,before:null}})}})))}),[T]),T?a.createElement(h.Provider,{value:T},n):n}},15794:function(e,t,n){"use strict";n.d(t,{k:function(){return p}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(36459),o=n(87462),a=n(4942),i=(n(19601),n(67294)),u=n(71893),c=n(93416),s=n(33937);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={light:c.DefaultTheme,dark:c.DarkTheme,unspecified:c.DarkTheme},p=function(e,t){return function(n){var o=Object.assign({},((0,r.Z)(n),n));return i.createElement(u.ThemeProvider,{theme:d[t]||d.unspecified},i.createElement(e,o))}};t.Z=function(e){var t=(0,s.Ro)("theme"),n=(0,s.Ro)("customTheme"),r=(0,i.useMemo)((function(){return"blue"===t?f(f({},d.dark),{},{colors:f(f({},d.dark.colors),n||{})}):e.theme?d[e.theme]||d.unspecified:d[t]||d.unspecified}),[t,e.theme,n]);return i.createElement(u.ThemeProvider,(0,o.Z)({},e,{theme:r}))}},82351:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(87462),o=n(45987),a=n(67294),i=n(93416),u=function(e){var t=e.children,n=e.background,o=e.isBasic,u=e.padding;return t?a.createElement(i.Flex,(0,r.Z)({padding:u||[1.5,2],margin:[2],background:n||"tooltip",round:1,alignSelf:"start"},!o&&{width:{max:"300px"}}),a.createElement(i.TextSmall,{color:"bright"},t)):null},c=function(e,t){var n=t.background,r=t.isBasic,o=t.padding,i="function"===typeof e?e():e;return"string"===typeof e||null!==e&&void 0!==e&&r?a.createElement(u,{background:n,isBasic:r,padding:o},i):i},s=["children","content","isBasic"],l=function(e){var t=e.children,n=e.content,u=e.isBasic,l=(0,o.Z)(e,s),f=(0,a.useCallback)((function(){return c(n,{isBasic:u})}),[n]);return n?a.createElement(i.Tooltip,(0,r.Z)({plain:!0,animation:!0,content:f,zIndex:1e3},l),t):t}},46189:function(e,t){"use strict";t.Z={assetsBaseURL:"".concat(window.envSettings.cloudUrl,"/static"),apiBaseURL:window.envSettings.apiUrl,demoUrl:"".concat(window.envSettings.cloudUrl,"/spaces/netdata-demo"),demoSlug:window.envSettings.demoSlug,demoFavourites:window.envSettings.demoFavourites,demoDefaultRoomViews:{default:"overview"},pollingInterval:3e4,defaultRoomView:"home",integrationsView:"integrate-anything"}},62200:function(e,t,n){"use strict";n.d(t,{DV:function(){return c},I3:function(){return m},MC:function(){return a},OI:function(){return p},R7:function(){return f},Sq:function(){return g},WV:function(){return l},_b:function(){return v},gP:function(){return i},li:function(){return o},mX:function(){return s},t5:function(){return d},v$:function(){return u}});var r=n(2375),o="/api/v2",a="/api/v3/spaces",i=r.Z,u=20,c=13,s=["J2kdSTRJzV4","KCFFZ_qfKXk"],l={live:{flavour:"success",statusTextColor:"primary",indicatorWrapperColor:"primary",counterColor:"primary"},stale:{flavour:"stale",statusTextColor:["green","vista"],indicatorWrapperColor:["green","vista"],counterColor:["green","vista"]},offline:{flavour:"neutral",statusTextColor:"textLite",indicatorWrapperColor:"textLite",counterColor:"textLite"},unseen:{statusTextColor:"textLite",indicatorWrapperColor:"textLite",counterColor:"textLite"}},f={completed:{icon:"check",indicatorWrapperColor:"primary",textColor:"primary",text:"Completed",tooltip:"has been claimed and has successfully connected to Netdata at least once"},pending:{icon:"clock_hollow",indicatorWrapperColor:"textLite",textColor:"textLite",text:"Pending...",tooltip:"has been claimed but never connected to the Netdata."}},d=[1,39,1],p=[1,40,0],v="v1.39.1",m="v1.40.0",g="ErrSpaceMemberAlreadyExists"},87917:function(e,t,n){"use strict";n.d(t,{Jo:function(){return o},QR:function(){return a},xJ:function(){return r}});n(92222),n(57327),n(41539),n(88449),n(2490),n(59849);var r=function(e){return["admin","manager","troubleshooter","observer","billing"].concat("EarlyBird"===e?"member":[])},o=function(e){return[e["user:SetAdmin"]&&"admin",e["user:SetManager"]&&"manager",e["user:SetMember"]&&"member",e["user:SetTroubleshooter"]&&"troubleshooter",e["user:SetObserver"]&&"observer",e["user:SetBilling"]&&"billing"].filter(Boolean)},a=function(e){return[e["user:SetFromAdmin"]&&"admin",e["user:SetFromManager"]&&"manager",e["user:SetFromMember"]&&"member",e["user:SetFromTroubleshooter"]&&"troubleshooter",e["user:SetFromObserver"]&&"observer",e["user:SetFromBilling"]&&"billing"].filter(Boolean)}},48450:function(e,t,n){"use strict";n.d(t,{Kp:function(){return f},MN:function(){return S},ND:function(){return p},hN:function(){return b},jc:function(){return y},sr:function(){return m},uk:function(){return d}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(41539),n(88674),n(92087),n(74916),n(15306),n(92222),n(82481),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(66152),i=n(78710);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(e){return{id:e.roomID,alertCounter:e.alarmCounter,unreachableCount:e.unreachableCount,state:e.state}},l=function(e){return{results:(e.results||[]).map(s)}},f=function(e){return(0,i.Ly)(e)?Promise.resolve({data:{results:[]}}):o.Z.get("/api/v2/spaces/".concat(e,"/alarms"),{transform:l})},d=function(e){return(0,i.Ly)(e)?Promise.resolve({data:null}):o.Z.get("/api/v2/spaces/".concat(e,"/alarms/metas"))},p={contexts:null,names:null,roles:null},v=function(e){var t=e.alerts,n=void 0===t?[]:t,r=e.nodes,o=void 0===r?[]:r,i=e.alert_instances,u=void 0===i?[]:i;return(0,a.k5)(u.map((function(e){var t=e.ni,r=e.ati,a=e.tr_i,i=e.tr_v,u=e.tr_t,c=e.cfg,s=e.info,l=e.fami,f=e.ch,d=e.ch_n,p=void 0===d?f:d,v=e.ctx,m=e.v,g=e.t,b=e.flags,h=e.st,y=e.src,S=e.units,O=e.to,w=e.cl,A=e.cm,k=e.tp,P=e.sum,Z=o[t],E=n[r],j=E.nm,x=E.cr,C=E.wr,I=E.cl,T=E.er,D=E.in,N=E.nd,M=E.cfg,R=(j||"unknown_alert").replace(/_/g," ");return{mg:Z.mg,nd:Z.nd,nodeId:Z.nd||Z.mg,id:a,context:v,value:m,status:h.toLowerCase(),summary:P||R,name:j,displayName:R,alert:alert,criticalCount:x,warningCount:C,clearCount:I,errorCount:T,instanceCount:D,nodeCount:N,configCount:M,lastStatusChangeValue:i,lastStatusChange:u,configHash:c,info:s,family:l,instance:f,instanceName:p,lastUpdated:g,flags:b,units:S,source:y,recipient:O,class:w,component:A,type:k}})))},m=function(e,t){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=summary,instances,values,minify&status=raised",{baseURL:window.envSettings.agentApiUrl,transform:v}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[],contexts:[]},selectors:{status:["raised"]},options:["summary","values","instances"]},{transform:v})},g=function(e){var t=e.transitions,n=void 0===t?[]:t;if(!n[0])return{};var r=n[0],o=r.config_hash_id,a=r.context,i=r.machine_guid,u=r.info,c=r.transition_id,s=r.node_id,l=r.alert,f=r.new,d=f.status,p=f.value,v=r.when,m=r.old,g=m.status,b=m.value,h=m.duration,y=r.instance,S=r.instance_n,O=void 0===S?y:S,w=r.units;return{configHash:o,context:a,name:l,id:c,mg:i,nodeId:s||i,nd:s,alert:l,info:u,displayName:(l||"unknown_alert").replace(/_/g," "),status:d.toLowerCase(),lastStatusChange:v,lastStatusChangeValue:p,prevStatus:g.toLowerCase(),prevValue:b,prevDuration:h,instance:y,instanceName:O,units:w}},b=function(e,t,n){return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_transitions?options=minify&transition=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:g}).then((function(n){var r=n.data;return w(e,t,r.configHash,r)})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_transitions"),{transition:n},{transform:g}).then((function(n){var r=n.data;return w(e,t,r.configHash,r)}))},h=function(e){var t=e.alerts;return(void 0===t?[]:t).map((function(e){var t=e.nm,n=e.cr,r=e.wr,o=e.cl,a=e.er,i=e.in,u=e.nd,c=e.cfg,s=e.sum;return{name:t,displayName:(t||"unknown_alert").replace(/_/g," "),criticalCount:n,warningCount:r,clearCount:o,errorCount:a,instanceCount:i,nodeCount:u,configCount:c,summary:s||t}}))},y=function(e,t){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=minify",{baseURL:window.envSettings.agentApiUrl,transform:h}).then((function(e){return e.data})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[]}},{transform:h}).then((function(e){return e.data}))},S=function(e,t,n){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=summary,values,instances,minify&alert=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:v}).then((function(e){return e.data})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[]},selectors:{alert:[n]},options:["summary","instances","values"]},{transform:v}).then((function(e){return e.data}))},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.class,r=t.component,o=t.type,a=t.info,i=t.value,u=i.calc,s=void 0===u?"":u,l=i.update_every,f=i.units,d=i.db,p=t.status,v=t.notification||{},m=v.type,g=v.exec,b=v.to,h=v.delay,y=v.repeat||{},S=y.warn,O=y.crit,w=p||{},A=w.warn,k=w.crit,P=w.green,Z=w.red,E=d||{},j=E.dimensions,x=E.method,C=E.after,I=E.before,T=E.options;return c(c({info:a},e),{},{configInfo:a,class:n,component:r,type:o,calculation:s,updateEvery:l,units:f,warning:A,critical:k,lookupDimensions:j,lookupMethod:x,lookupAfter:C,lookupBefore:I,lookupOptions:T,notificationType:m,exec:g,recipient:b,delay:h,warnRepeatEvery:S,critRepeatEvery:O,green:P,red:Z})}},w=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_config?options=minify&config=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:O(r)}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_config"),{config:n},{transform:O(r)})}},84074:function(e,t,n){"use strict";n.d(t,{E3:function(){return i},Gs:function(){return f},HI:function(){return l},IG:function(){return s},bc:function(){return u},p$:function(){return c}});var r=n(4480),o=n(80239),a=n(48450),i={id:null,loaded:!1,nodeId:null,instance:null,instanceName:null,name:"",calculation:"",lookupAfter:0,lookupBefore:0,status:"unknown",date:"",fullyLoaded:!1,fullyLoading:!1,info:"",configInfo:"",warning:"",critical:"",updateEvery:0,source:"",recipient:"Unknown",units:"",delayUpDuration:null,delayDownDuration:null,delayMaxDuration:null,multiplier:null,delayUpToTimestamp:null,lookupDimensions:"",lookupMethod:"",lookupOptions:"",class:"Unknown",type:"Unknown",component:"Unknown"};t.ZP=(0,r.cn)({key:"alert",default:{}});var u=(0,r.cn)({key:"selectedAlert",default:null}),c=(0,r.cn)({key:"alertsTabsAtom",default:o.U}),s=(0,r.xu)({key:"alertConfigurations",default:function(e){var t=e.spaceId,n=e.roomId;return(0,a.jc)(t,n)}}),l=(0,r.xu)({key:"alertInstances",default:function(e){var t=e.spaceId,n=e.roomId,r=e.name;return(0,a.MN)(t,n,r)}}),f=(0,r.xu)({key:"selectedAlertConfiguration",default:{alertName:null,nodeId:null}})},80239:function(e,t,n){"use strict";n.d(t,{U:function(){return o},UV:function(){return a},nb:function(){return r}});var r={alertStatus:"alertStatus",os:"os"},o=0,a="https://learn.netdata.cloud/docs/alerting/health-configuration-reference#edit-health-configuration-files"},39840:function(e,t,n){"use strict";n.d(t,{Wi:function(){return b},e8:function(){return m},m9:function(){return p},pK:function(){return v},yi:function(){return d}});var r=n(29439),o=(n(92222),n(67294)),a=n(89250),i=n(37518),u=n(4822),c=n(96104),s=n(45771),l=n(20709),f=n(89405),d=function(e){var t=(0,a.s0)(),n=(0,i.A3)(),r=(0,c.XT)({extraKey:"alerts"}),s=(0,u.Sf)("alertStatuses",{extraKey:"alerts"});return(0,o.useCallback)((function(o){e&&r([e]),o&&"string"===typeof o&&s([o]),t("".concat(n,"/alerts"))}),[e,n,r])},p=function(e,t){if(void 0===e)return"-";var n=(0,s.J)(e);return t?"".concat(n," ").concat(t):n},v=function(e,t){return(0,o.useMemo)((function(){return p(e,t)}),[e,t])},m=function(e){var t=e.rawTime,n=e.secs,r=void 0!==n&&n,a=e.long,i=void 0!==a&&a,u=(0,f.rA)(),c=u.localeTimeString,s=u.localeDateString;return(0,o.useMemo)((function(){var e=new Date(1e3*t);return isNaN(e.valueOf())?{}:{timeAgo:(0,l.Z)(e,new Date),formattedDate:"".concat(s(e,{long:i})," ").concat(c(e,{secs:r}))}}),[t,c,s])},g=function(){return Math.floor((new Date).getTime()/1e3)},b=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e||{},a=n.lastUpdated,i=n.lastStatusChange,c=(0,u.TQ)(),s=function(e){var t=e||{},n=t.lastUpdated,r=t.lastStatusChange;return(0,o.useMemo)((function(){if(!n||!r)return[];var e=n||g(),t=e-r,o=Math.round(r-t),a=Math.round(e+t);return[o,a>g()?g():a]}),[n,r])}({lastUpdated:a,lastStatusChange:i}),l=(0,r.Z)(s,2),f=l[0],d=l[1];(0,o.useEffect)((function(){t&&(f||d)&&c({after:1e3*f,before:1e3*d})}),[t,f,d])}},12008:function(e,t,n){"use strict";n.d(t,{Bk:function(){return P},E5:function(){return h},ER:function(){return O},E_:function(){return k},JU:function(){return x},O0:function(){return y},__:function(){return C},fp:function(){return b},n_:function(){return E},sb:function(){return A},v3:function(){return I},w4:function(){return j},yx:function(){return w}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),a=n(4480),i=n(37518),u=n(96929),c=n(99322),s=n(97945),l=n(80239),f=n(74059),d=n(84074),p=n(48450),v=n(45771);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=(0,a.CG)({key:"alertState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)(d.ZP)[t]||d.E3;return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){var a=e.set;a(d.ZP,n?"function"!==typeof o?function(e){return g(g({},e),{},(0,r.Z)({},t,g(g({},e[t]),{},(0,r.Z)({},n,o))))}:function(e){return g(g({},e),{},(0,r.Z)({},t,g(g({},e[t]),{},(0,r.Z)({},n,o(e[t][n])))))}:function(e){return g(g({},e),{},(0,r.Z)({},t,g(g(g({},d.E3),e[t]),o)))})}}}),h=function(e,t){return(0,a.sJ)(b({id:e,key:t}))},y=function(){return(0,a.FV)(d.bc)},S=(0,a.CG)({key:"alertsState",get:function(e){return function(t){var n=t.get;return e.map((function(e){return n(b({id:e}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),O=function(e){return(0,a.sJ)(S(e))},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.spaceId,r=t.roomId,u=(0,f.th)();n=n||u;var c=(0,i.UL)();r=r||c;var s=(0,a._8)((function(t){var o=t.set;return function(){o(b({id:e,key:"fullyLoading"}),!0);var t=(0,p.hN)(n,r,e);return t.then((function(t){var n=t.data;return o(b({id:e}),g(g({},n),{},{fullyLoaded:!0,fullyLoading:!1,loaded:!0}))})).catch((function(){return o(b({id:e,key:"fullyLoading"}),!1)})),function(){return t.cancel()}}}),[r,n,e]);(0,o.useEffect)((function(){e&&s()}),[e,s])},A=function(){var e=function(){var e=(0,i.UL)();return(0,a.sJ)(k(e))}(),t=(0,u.zN)(),n=(0,s.Ne)(t);return(0,o.useMemo)((function(){return n.map((function(t){var n=e.filter((function(e){return e.nodeId===t.id}));if(!n.length)return t;var o=n.map((function(e){return e.status}));return g(g({},t),{},(0,r.Z)({},l.nb.alertStatus,(0,v.j)(o)))}))}),[e,n])},k=(0,a.CG)({key:"roomAlerts",get:function(e){return function(t){var n=t.get,r=n((0,c.e)({id:e,key:"ids"}));return n(S(r))}}}),P=function(){var e=(0,i.UL)();return(0,a.sJ)((0,c.e)({id:e,key:"loaded"}))},Z={warning:0,critical:0,clear:0},E=function(e){var t=O(e);return(0,o.useMemo)((function(){return t.reduce((function(e,t){var n=t.status;return e[n]=e[n]+1,e}),g({},Z))}),[e])},j=function(){var e=(0,f.th)(),t=(0,i.UL)();return(0,a.sJ)((0,d.IG)({spaceId:e,roomId:t}))},x=function(e,t){var n=(0,f.th)(),r=(0,i.UL)(),u=(0,a.sJ)((0,d.HI)({spaceId:n,roomId:r,name:e}));return(0,o.useMemo)((function(){return t?u.filter((function(e){return e.nodeId===t})):u}),[u,t])},C=function(){var e=(0,i.UL)();return(0,a.FV)((0,d.Gs)(e))},I=function(){var e=(0,i.UL)();return(0,a.rb)((0,d.Gs)(e))}},45771:function(e,t,n){"use strict";n.d(t,{J:function(){return r},j:function(){return o}});n(9653),n(61874),n(26699),n(32023);var r=function(e){var t=e<1?Number(e).toPrecision(3):Number(e).toFixed(2),n=Number.parseFloat(t);return Math.abs(n)>=1e9||Math.abs(n)<=1e-5&&0!==n?n.toExponential(3):n},o=function(e){return e.includes("critical")?"critical":e.includes("warning")?"warning":e.includes("clear")?"clear":e[0]}},71992:function(e,t,n){"use strict";n.d(t,{h:function(){return v},Z:function(){return g}});var r=n(29439),o=n(87462),a=n(45987),i=(n(92222),n(67294)),u=n(93416),c=n(46667),s=n(71893),l=(0,s.default)(u.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1}).withConfig({displayName:"styled__Drop",componentId:"sc-1x9syns-0"})(["box-sizing:content-box;"]),f=(0,s.default)(u.TextSmall).withConfig({displayName:"styled__DropdownItemClickable",componentId:"sc-1x9syns-1"})(["cursor:pointer;pointer-events:",";"," &:hover{background-color:",";}"],(function(e){return e.isDisabled?"none":"auto"}),(function(e){return e.isDisabled&&"color: ".concat((0,u.getColor)("textLite")(e),";")}),(0,u.getColor)("selected")),d=["children","color","disabled","icon"],p=["Component","category","context"],v=function(e){var t=e.children,n=e.color,r=void 0===n?"text":n,c=e.disabled,s=e.icon,l=(0,a.Z)(e,d);return i.createElement(f,(0,o.Z)({as:u.Flex,"data-testid":"dropdownItem",gap:2,isDisabled:c,padding:[2,4]},l),i.createElement(u.Icon,{color:c?"textLite":r,"data-testid":"dropdownItem-icon",height:"16px",name:s,width:"16px"}),i.createElement(u.Text,{color:r,"data-testid":"dropdownItem-text",whiteSpace:"nowrap"},t))},m=(0,i.forwardRef)((function(e,t){var n=e.Component,r=e.category,u=e.context,c=(0,a.Z)(e,p);return i.createElement(n,(0,o.Z)({"data-ga":"".concat(r,"::").concat(u,"::options"),"data-testid":"chartOptions",icon:"nav_dots",flavour:"borderless",neutral:!0,small:!0,padding:0,ref:t,title:"Options"},c))})),g=function(e){var t=e.Component,n=void 0===t?u.Button:t,o=e.category,a=e.context,s=e.children,f=e.testId,d=(0,c.Z)(),p=(0,r.Z)(d,4),v=p[0],g=p[1],b=p[3],h=(0,i.useRef)(),y=f||"chartsDropdown";return i.createElement(i.Fragment,null,i.createElement(m,{"data-testid":"".concat(y,"-button"),category:o,context:a,onClick:g,ref:h,Component:n}),h.current&&v&&i.createElement(l,{close:b,"data-testid":y,onClickOutside:b,onEsc:b,target:h.current},s({close:b})))}},1043:function(e,t,n){"use strict";n.d(t,{aJ:function(){return M},R2:function(){return U},O9:function(){return T},iM:function(){return D},UQ:function(){return L},T4:function(){return _},So:function(){return R}});var r=n(15861),o=n(4942),a=n(45987),i=n(29439),u=n(64687),c=n.n(u),s=(n(92222),n(74916),n(64765),n(21249),n(57640),n(9924),n(15306),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),l=n(89250),f=n(28234),d=n(74059),p=n(17563),v=n(26398),m=n(5429),g=n(93017),b=n(68008),h=n(76201),y=n(78710),S=n(13477),O=n(94510),w=n(98469);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=function(e){var t=e.cloudRoute,n=e.redirectUri;try{if(!(0,w.isTryingToJoinWorkspace)(t))return"";var r=function(e){var t=p.parse(e),n=t.error_retry||t.token?k(k({},t),{},{token:decodeURIComponent(t.token)}):p.parse(decodeURIComponent(e)),r=n.error_retry,o=n.token;return o||(o=p.parse(r).token),{inviteToken:o,spaceId:/spaces\/(.*)\/join-callback/.exec(r)[1]}}(n),o=r.inviteToken,a=r.spaceId;return"?".concat(p.stringify({token:o,space:a}))}catch(i){return console.warn("error parsing join-callback url",i),""}},Z=n(73012),E=n(80699),j=n(54005),x=["onSuccess","onFail"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var I=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,n=void 0===t?"/sign-up":t;if(window.envSettings.tracking)try{var r,o="".concat(n,"/thank-you");window.dataLayer.push({event:"pageview",virtualPage:"".concat(o).concat(e)}),window.posthog.setPersonPropertiesForFlags({netdata_cloud_account_created_days_ago:0}),(0,h.o)("".concat(null===(r=window)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.origin).concat(o).concat(e))}catch(a){}},T=function(e){return(0,b.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return v.Z.patch("/api/v1/accounts/".concat(e),t)}),[e])},D=function(){var e=(0,l.TH)(),t=e.search,n=e.hash,r=(0,l.bS)("/sign-up"),o=(0,l.bS)("/sign-in"),a=r?r.pathname:o?o.pathname:"",u=(0,l.s0)(),c=(0,g.Z)(),d=(0,i.Z)(c,2),p=d[0],m=d[1],b=(0,j.Z)(),h=b.sendLog,y=b.isReady;return(0,s.useCallback)((function(e){var r=e.email,o=e.redirectURI,i=e.registerURI,c=e.isUnverifiedRegistration,s=e.resend;return v.Z.post("/api/v2/auth/account/magic-link",{email:r,redirectURI:o,registerURI:i,isUnverifiedRegistration:c}).then((function(){p({header:"Sign in email sent"}),s||(I(t,{path:a}),"/sign-up"==a&&h({feature:"SignUpThankYou"}),u("/sign-in/magic-link-sent".concat(t).concat(n),{state:{email:r}}))})).catch((function(e){var t,n,r=(0,f.r)((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.errorMsgKey)||(null===e||void 0===e||null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.errorMessage)||"Something went wrong");throw m({header:"Sign in",text:r}),r}))}),[a,t,n,h,y])},N=function(e){var t=e.authorized_origins;return(void 0===t?[]:t).map((function(e){return{id:e.id,url:e.url,lastAccessedAt:e.last_accessed_at}}),[])},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onSuccess,n=e.onFail,r=(0,a.Z)(e,x),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,m.Z)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({fetch:function(){return v.Z.get("/api/v1/auth/account/origins",{transform:N})},initialValue:[],isDefaultLoading:!0,onSuccess:function(e){null===t||void 0===t||t(e)},onFail:function(e){null===n||void 0===n||n(e)}},r)}),i)},R=function(){var e=(0,s.useState)(""),t=(0,i.Z)(e,2),n=t[0],o=t[1],a=(0,s.useState)(!1),u=(0,i.Z)(a,2),l=u[0],f=u[1],d=(0,g.Z)(),p=(0,i.Z)(d,2)[1],m=(0,s.useCallback)(function(){var e=(0,r.Z)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,v.Z.post("/api/v1/auth/account/origins",{origin_url:t});case 4:n=e.sent,o(n.authorized_origin_url),f(!1),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),p({header:"Trust URL",text:"We couldn't trust the URL"}),f(!1);case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}(),[]);return[n,m,l]},_=function(e){e&&e.preventDefault();var t=(0,g.Z)(),n=(0,i.Z)(t,2)[1],o=(0,l.TH)().search,a=p.parse(o),u=a.cloudRoute,f=a.oauth,d=a.token,m=a.username,b=a.redirect_uri,h=(0,O.pi)(),y=(0,E.Z)().setFailure,S=P({cloudRoute:u,redirectUri:b}),w=(0,j.Z)(),A=w.sendLog,k=w.isReady;return(0,s.useCallback)((0,r.Z)(c().mark((function e(){var t,r,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="/api/v2/auth/account/".concat(f||"magic-link","/register"),e.prev=1,e.next=4,v.Z.post("".concat(t).concat(S),{token:d,username:m});case 4:r=e.sent,a=r.data,"ErrTrialUpdateFailed"==(a||{}).errorMsgKey&&y(),h(),I(o),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),n(e.t0);case 15:case"end":return e.stop()}}),e,null,[[1,12]])}))),[f,d,m,A,k])},L=function(){var e=(0,d.Q6)();return(0,s.useCallback)((0,r.Z)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.Z.post("/api/v1/auth/account/logout");case 2:if("function"==typeof(null===(t=window.posthog)||void 0===t?void 0:t.reset)&&window.posthog.reset(),n=localStorage.getItem("lastSignInMethod"),localStorage.clear(),localStorage.setItem("lastSignInMethod",n),(0,Z.xp)(),!y.ZP){e.next=9;break}return e.abrupt("return",window.location.reload());case 9:return e.abrupt("return",window.location.replace("/sign-in"));case 10:case"end":return e.stop()}}),e)}))),[e])},U=function(){var e=(0,S.jr)(),t=L(),n=(0,g.Z)(),o=(0,i.Z)(n,2)[1];return(0,s.useCallback)((0,r.Z)(c().mark((function n(){return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,v.Z.delete("/api/v1/accounts/".concat(e));case 3:t(),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),o(n.t0);case 9:case"end":return n.stop()}}),n,null,[[0,6]])}))),[])}},94510:function(e,t,n){"use strict";n.d(t,{pi:function(){return A}});var r=n(15861),o=n(4942),a=n(45987),i=n(64687),u=n.n(i),c=(n(47941),n(41539),n(88674),n(85827),n(25387),n(2490),n(72608),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),s=n(4480),l=n(26398),f=n(62200),d=n(78710),p=n(80239),v=["permissions","settings"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={auth_type:"",avatarURL:null,createdAt:"",email:"",id:null,name:"",termsAccepted:!0,isAnonymous:!1,authorizedOrigins:[]},h={theme:"unspecified",spacePanelCollapsed:!0,alertsGrouping:p.nb.alertStatus},y=function(e){var t=e.permissions,n=e.settings,r=(0,a.Z)(e,v),o=r.id===f.gP;return{permissions:t,settings:n,user:g(g({},r),{},{isAnonymous:o,termsAccepted:o||r.termsAccepted})}},S=function(){var e,t,n=JSON.parse(localStorage.getItem("userSettings"))||{},r={user:g(g({},b),{},{id:(null===(e=window.localNetdataRegistry)||void 0===e?void 0:e.pg)||null,isLoaded:!0,isAnonymous:!0}),permissions:{},settings:g(g(g({},h),n),{},{isLoaded:!0})};if((0,d.iM)())return Promise.resolve(r);return function(){var e,a;return null===(e=t)||void 0===e||null===(a=e.cancel)||void 0===a||a.call(e),(t=l.Z.get("/api/v2/accounts/me",{transform:y,allow401:!0})).then((function(e){var t=e.data,a=t.user,i=t.permissions,u=void 0===i?[]:i,c=t.settings;return d.ZP&&a.isAnonymous?r:{user:g(g(g({},b),a),{},{isLoaded:!0}),permissions:u.reduce((function(e,t){return g(g({},e),{},(0,o.Z)({},t,t))}),{}),settings:g(g(g(g({},h),n),c),{},{isLoaded:!0})}})).catch((function(){return d.ZP?r:{user:g(g({},b),{},{isLoaded:!0}),permissions:{},settings:g(g(g({},h),n),{},{isLoaded:!0})}}))}()},O=(0,s.cn)({key:"currentUserFetcher",default:null}),w=(0,s.cn)({key:"checkAuthAtom",default:1}),A=function(){var e=(0,s.Zl)(w),t=(0,s.Zl)(O);return(0,c.useCallback)((0,r.Z)(u().mark((function n(){var r;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,S();case 2:r=n.sent,t(r),e((function(e){return e+1}));case 5:case"end":return n.stop()}}),n)}))),[])},k=(0,s.nZ)({key:"fullStateFetcher",get:function(){var e=(0,r.Z)(u().mark((function e(t){var n,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.get,e.t0=n(O),e.t0){e.next=6;break}return e.next=5,S();case 5:e.t0=e.sent;case 6:return r=e.t0,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});t.ZP=(0,s.CG)({key:"currentUserFullState",get:function(e){return function(t){return(0,t.get)(k)[e]}}})},33335:function(e,t,n){"use strict";n.d(t,{SX:function(){return b},QB:function(){return S},M2:function(){return O},gI:function(){return y}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=(n(41539),n(85827),n(25387),n(2490),n(72608),n(47941),n(67294)),a=n(4480),i=n(41331),u=n(74059),c=n(78710),s=(0,a.xu)({key:"permissionsBySpaceId",default:{},effects:function(e){return(0,c.Ly)(e)?[function(e){var t=e.setSelf;"get"===e.trigger&&t(c.aD.permissions)}]:[]}}),l=n(87917),f=n(94510),d=(0,a.cn)({key:"userPermissions",default:(0,f.ZP)("permissions")});function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=["space:Leave","room:Create","space:InviteUser","space:RemoveUser","space:UpdateMeta","space:Delete","room:Delete","room:AddNode","node:Delete","user:ChangeRoles","room:UpdateMeta","room:Leave","room:RemoveNode","billing:Manage"],g={"space:ReadSettings":function(e){return!m.some((function(t){return!e[t]}))}},b=(0,a.CG)({key:"permissionsSelector",get:function(e){return function(t){return(0,t.get)(s(e))}},set:function(e){return function(t){var n=t.set,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(s(e),(function(e){return(0,i.ZP)(e,r)?e:r}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),h=function(e){var t=(0,u.th)(),n=(0,a.sJ)(b(e||t)),i=(0,a.$P)(d);return(0,o.useMemo)((function(){var e,t=v({},n);return"hasValue"===i.state&&(t=v(v({},t),i.contents)),v(v({},e=t),Object.keys(g).reduce((function(t,n){return g[n](e)?v(v({},t),{},(0,r.Z)({},n,n)):t}),{}))}),[n,i.state])},y=function(e,t){return!!h(t)[e]},S=function(){var e=h();return(0,o.useMemo)((function(){return(0,l.Jo)(e)}),[e])},O=function(){var e=h();return(0,o.useMemo)((function(){return(0,l.QR)(e)}),[e])}},33937:function(e,t,n){"use strict";n.d(t,{pI:function(){return w},kq:function(){return S},Ro:function(){return y}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(29439),a=n(4942),i=n(64687),u=n.n(i),c=n(4480),s=n(23109),l=n(94510),f=(0,c.cn)({key:"currentUserSettings",default:(0,l.ZP)("settings")}),d=n(1043),p=n(13477),v=n(74059);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=(0,c.CG)({key:"userSettings",get:function(e){return function(t){var n=(0,t.get)(f);return e?n[e]:n}},set:function(e){return function(t,n){return(0,t.set)(f,(function(t){return e?g(g({},t),{},(0,a.Z)({},e,"function"===typeof n?n(t[e]):n)):"function"===typeof n?n(t):n}))}}}),h=function(e){var t=(0,p.Iy)("isAnonymous"),n=(0,c.Zl)(b(e)),i=(0,p.jr)(),l=(0,d.O9)(i),f=(0,s.Z)("userSettings",{}),v=(0,o.Z)(f,2)[1];return(0,c._8)((function(o){var i=o.snapshot;return function(){var o=(0,r.Z)(u().mark((function r(o){var c,s,f,d;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n(o),c=i.retain(),r.prev=2,r.next=5,i.getPromise(b());case 5:if(s=r.sent,f=g(g({},s),e?(0,a.Z)({},e,o):o),!t){r.next=10;break}return v(f),r.abrupt("return");case 10:return r.next=12,l({settings:f});case 12:r.next=20;break;case 14:return r.prev=14,r.t0=r.catch(2),r.next=18,i.getPromise(b());case 18:d=r.sent,n(e?d[e]:d);case 20:return r.prev=20,c(),r.finish(20);case 23:case"end":return r.stop()}}),r,null,[[2,14,20,23]])})));return function(e){return o.apply(this,arguments)}}()}),[e])},y=function(e){return(0,c.sJ)(b(e))},S=function(e){return[y(e),h(e)]},O="spaceSettings",w=function(e){var t,n=(0,v.th)(),r=y(O),o=h(O);return[null===r||void 0===r||null===(t=r[n])||void 0===t?void 0:t[e],function(t){o(g(g({},r||{}),{},(0,a.Z)({},n,g(g({},(null===r||void 0===r?void 0:r[n])||{}),{},(0,a.Z)({},e,t)))))}]}},49674:function(e,t,n){"use strict";var r=n(4480),o=n(94510);t.Z=(0,r.cn)({key:"currentUser",default:(0,o.ZP)("user")})},13477:function(e,t,n){"use strict";n.d(t,{Iy:function(){return p},KL:function(){return d},ec:function(){return g},jr:function(){return v},oH:function(){return m}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(4942),a=n(64687),i=n.n(a),u=n(4480),c=n(49674),s=n(1043);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=(0,u.CG)({key:"userState",get:function(e){return function(t){var n=(0,t.get)(c.Z);return e?n[e]:n}},set:function(e){return function(t,n){(0,t.set)(c.Z,(function(t){return e?f(f({},t),{},(0,o.Z)({},e,n)):f(f({},t),n)}))}}}),p=function(e){return(0,u.sJ)(d(e))},v=function(){return(0,u.sJ)(d("id"))},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shouldPersist,a=t.onSuccess,c=t.onFail,l=(0,u.Zl)(d(e)),p=v(),m=(0,s.O9)(p);return(0,u._8)((function(t){var u=t.snapshot;return function(){var t=(0,r.Z)(i().mark((function t(r){var c,s;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l(r),n){t.next=3;break}return t.abrupt("return");case 3:return c=u.retain(),t.prev=4,t.next=7,m(f({},e?(0,o.Z)({},e,r):r));case 7:a&&a(),t.next=16;break;case 10:return t.prev=10,t.t0=t.catch(4),t.next=14,u.getPromise(d());case 14:s=t.sent,l(e?s[e]:s);case 16:return t.prev=16,c(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[4,10,16,19]])})));return function(e){return t.apply(this,arguments)}}()}),[e,n,a,c])},g=function(e,t){return[p(e),m(e,t)]}},67336:function(e,t,n){"use strict";n.d(t,{B1:function(){return A},O9:function(){return P},R2:function(){return k},RO:function(){return w}});n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070);var r=n(45987),o=n(4942),a=n(29439),i=(n(41539),n(39714),n(21249),n(57640),n(9924),n(47941),n(85827),n(25387),n(2490),n(72608),n(15581),n(34514),n(54747),n(4480)),u=n(68008),c=n(93017),s=n(37518),l=n(74059),f=n(19665),d=n(47133),p=n(41943),v=n(22841),m=n(9058),g=n(45215),b=n(79619),h=n(39878),y=["pristine"];function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e,t){var n=(0,c.Z)(),r=(0,a.Z)(n,2),o=r[0],i=r[1];return(0,u.Z)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(0,f.DB)(e,t,n);return r.then((function(){return o({header:"Dashboards",text:"Dashboard successfully created!"})})).catch((function(e){return!e.isCancel&&i(e)})),r}),[e,t])},A=function(){var e=(0,c.Z)(),t=(0,a.Z)(e,2),n=t[0],r=t[1];return(0,u.Z)((function(e){var t=e.dashboards,o=t.map((function(e){return e.id})).toString(),a=t[0].roomId,i=t[0].spaceId;return(0,f.iM)(i,a,o).then((function(){return n({header:"Dashboards",text:"Dashboards successfully deleted!"})})).catch((function(e){return!e.isCancel&&r}))}),[])},k=function(e){var t=(0,d.LJ)(e,"spaceId"),n=(0,d.LJ)(e,"roomId"),r=(0,c.Z)(),o=(0,a.Z)(r,2),i=o[0],s=o[1];return(0,u.Z)((function(){var r=(0,f.iM)(t,n,e);return r.then((function(){return i({header:"Dashboards",text:"Dashboard successfully deleted!"})})).catch((function(e){return!e.isCancel&&s(e)})),r}),[e,t,n])},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onSuccess,o=t.onFail,a=(0,m.e)(),u=(0,l.th)(),c=(0,s.UL)();return(0,i._8)((function(t){var i=t.snapshot,s=t.set;return function(){s((0,d.Y3)({id:e,key:"processing"}),!0);var t=i.getLoadable((0,d.Y3)({id:e})).contents,l=i.getLoadable((0,p.sX)({id:e,key:"layout"})).contents,m=i.getLoadable((0,v.oz)({id:e})).contents,S=(0,g.ZO)(a,e),w={version:t.version+1,name:t.name,snapshot:{uiState:l,items:Object.keys(m).map((function(e){if(!S||"text"===m[e].type)return O({},m[e]);var t=S.getNode({cardId:e},{inherit:!1},S.getChildren()).getAttributes(),n=t.pristine,o=(0,r.Z)(t,y),a=Object.keys(n).reduce((function(e,t){return e[t]=o[t],e}),O({},m[e]));return O(O({},m[e]),a)}))}},A=(0,f.Y)(u,c,e,w);return A.then((function(e){var t=e.data,r=t.createdAt,o=t.id,a=t.name,i=t.roomID,u=t.slug,c=t.spaceID,l=t.updatedAt,f=t.version,m=(0,b.m)(t).cards;s((0,v.oz)({id:o}),m),s((0,d.Y3)({id:o}),(function(e){return O(O({},e),{},{createdAt:r,id:o,name:a,roomId:i,slug:u,spaceId:c,updatedAt:l,version:f,processing:!1})})),s(h.UU,u),s((0,h.c7)([c,i,u]),o),s((0,p.Kl)(o)),S&&Object.keys(m).forEach((function(e){var t,n;"text"!==m[e].type&&(null===(t=S.getNode({cardId:e}))||void 0===t||null===(n=t.removePristine)||void 0===n||n.call(t))})),n&&n(t)})).catch((function(t){throw s((0,d.Y3)({id:e,key:"processing"},!1)),o&&o(t),t})),A}}))}},97723:function(e,t,n){"use strict";n.d(t,{CO:function(){return T},Di:function(){return C},EW:function(){return x},Kq:function(){return Z},Zj:function(){return j},jN:function(){return E},qN:function(){return I}});var r=n(15861),o=n(93433),a=n(4942),i=n(64687),u=n.n(i),c=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(57327),n(88449),n(59849),n(15581),n(34514),n(54747),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(67294)),s=n(4480),l=n(28721),f=n(54227),d=n(5934),p=n(44850),v=n(98475),m=n(47133),g=n(41943),b=n(22841),h=n(19665),y=n(67336);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return O(O(O({},p.js),p.v),{},{id:(0,l.Z)(),type:"chart",contextScope:e},t)},A=function(e){return function(t,n){var r=t.reduce((function(e,t){var n=t.y+t.h;return n>e?n:e}),0);return[].concat((0,o.Z)(t),[O(O({},e),{},{i:n,y:r})])}},k=A(v.Mk),P=A(v.b1),Z=function(e){return(0,s._8)((function(t){var n=t.set;return function(){var t=(0,l.Z)(),r=O(O(O({},p.js),p.Xw),{},{id:t,type:"text",editing:!0});n((0,m.Y3)({id:e,key:"cardIds"}),(function(e){return[].concat((0,o.Z)(e),[t])})),n((0,g.Fu)(e),(function(e){return P(e,t)})),n((0,b.oz)({id:e,resourceId:t}),r)}}))},E=function(e){return(0,s._8)((function(t){var n=t.set;return function(t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},a=w(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),i=a.id;n((0,m.Y3)({id:e,key:"cardIds"}),(function(e){return[].concat((0,o.Z)(e),[i])})),n((0,g.Fu)(e),(function(e){return k(e,i)})),n((0,b.oz)({id:e,resourceId:i}),a),r()}}))},j=function(e,t){return(0,s._8)((function(n){var r=n.set;return function(){r((0,m.Y3)({id:e,key:"cardIds"}),(function(e){return e.filter((function(e){return e!==t}))})),r((0,g.Fu)(e),(function(e){return e.filter((function(e){return e.i!==t}))})),r((0,b.oz)({id:e}),(function(e){var n=O({},e);return delete n[t],n}))}}))},x=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.onSuccess,a=n.onFail,i=(0,y.RO)(e,t);return(0,s._8)((function(n){var c=n.set;return function(){var n=(0,r.Z)(u().mark((function n(r){var s,l,f,p,v=arguments;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=v.length>1&&void 0!==v[1]?v[1]:o,n.prev=1,n.next=4,i(r);case 4:l=n.sent,f=l.data,p=O(O(O({},r),{},{spaceId:e,roomId:t},f),{},{loaded:!0}),c((0,m.lz)(f.id),p),c((0,d.$3)(t),p),s&&s(p),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),a?a(r):console.warn("failed",n.t0);case 15:case"end":return n.stop()}}),n,null,[[1,12]])})));return function(e){return n.apply(this,arguments)}}()}),[i,e,o,a])},C=function(e,t,n){var r=x(e,t,n);return(0,c.useCallback)((function(o,a,i){var u=w(a,i);return r({name:o},(function(r){var o;(0,h.Y)(e,t,r.id,{version:r.version+1||2,snapshot:{uiState:k([],u.id),items:[O(O({},u),{},{cardAttributes:O(O({},i),{},{id:u.id})})]}}),null===n||void 0===n||null===(o=n.onSuccess)||void 0===o||o.call(n,r)}))}),[r])},I=function(){return function(e){var t=(0,f.Le)();return(0,s._8)((function(n){var o=n.snapshot,a=n.set;return function(){var n=(0,r.Z)(u().mark((function n(r){var i,c,s,l,f,p=arguments;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=r.ids,s=(c=p.length>1&&void 0!==p[1]?p[1]:{}).onSuccess,l=c.onFail,n.next=4,o.getPromise((0,m.NM)(i));case 4:return f=n.sent,n.prev=5,n.next=8,e({dashboards:f});case 8:f.forEach((function(e){var n=e.id,r=e.roomId;a((0,m._d)(n)),a((0,d.Mg)(r),[n]),t(n)})),s&&s(f),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(5),l?l(f):console.warn("failed",n.t0);case 15:case"end":return n.stop()}}),n,null,[[5,12]])})));return function(e){return n.apply(this,arguments)}}()}),[e])}((0,y.B1)())},T=function(e,t){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.onSuccess,a=n.onFail,i=(0,m.LJ)(e,"spaceId"),c=(0,m.LJ)(e,"roomId"),l=(0,f.Le)();return(0,s._8)((function(n){var i=n.snapshot,s=n.set;return(0,r.Z)(u().mark((function n(){var r;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.getPromise((0,m.Y3)({id:e}));case 2:return r=n.sent,n.prev=3,n.next=6,t();case 6:s((0,m._d)(e)),s((0,d.Mg)(c),[e]),l(e),o&&o(r),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(3),a?a(r):console.warn("failed",n.t0);case 15:case"end":return n.stop()}}),n,null,[[3,12]])})))}),[t,i,c,e,o,a])}(e,(0,y.R2)(e),t)}},19665:function(e,t,n){"use strict";n.d(t,{AK:function(){return u},DB:function(){return a},Y:function(){return o},iM:function(){return i}});n(92222);var r=n(26398),o=function(e,t,n,o){return r.Z.patch("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/dashboards/").concat(n),o)},a=function(e,t,n){return r.Z.post("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/dashboards"),n)},i=function(e,t,n){return r.Z.delete("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/dashboards?dashboard_ids=").concat(n))},u=function(e,t,n){return r.Z.get("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/dashboards/").concat(n))}},44850:function(e,t,n){"use strict";n.d(t,{Xw:function(){return a},js:function(){return i},v:function(){return o}});var r=n(4480),o={pristine:{},id:null},a={pristine:{},id:null,text:"<p><br/></p>",editing:!1},i={id:"",type:""};t.ZP=(0,r.xu)({key:"dashboardCards",default:{}})},22841:function(e,t,n){"use strict";n.d(t,{IT:function(){return d},I_:function(){return f},_q:function(){return l},oz:function(){return c}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480),a=n(44850);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=(0,o.CG)({key:"dashboardCardsState",get:function(e){var t=e.id,n=e.resourceId;return function(e){var r=(0,e.get)((0,a.ZP)(t));return n?r[n]||a.js:r}},set:function(e){var t=e.id,n=e.resourceId;return function(e,o){var i=e.set;return n?"function"===typeof o?i((0,a.ZP)(t),(function(e){return u(u({},e),{},(0,r.Z)({},n,o(e[n])))})):void i((0,a.ZP)(t),(function(e){return u(u({},e),{},(0,r.Z)({},n,u(u({},e[n]),o)))})):i((0,a.ZP)(t),o)}}}),s=(0,o.CG)({key:"dashboardCardState",get:function(e){var t=e.id,n=e.resourceId,r=e.key;return function(e){var o=(0,e.get)(c({id:t,resourceId:n}));return r?o[r]:o}},set:function(e){var t=e.id,n=e.resourceId,o=e.key;return function(e,a){return(0,e.set)(c({id:t,resourceId:n}),(0,r.Z)({},o,a))}}}),l=function(e,t){return(0,o.sJ)(c({id:e,resourceId:t}))},f=function(e,t,n){return(0,o.sJ)(s({id:e,resourceId:t,key:n}))},d=function(e,t,n){return(0,o.Zl)(s({id:e,resourceId:t,key:n}))}},98475:function(e,t,n){"use strict";n.d(t,{E3:function(){return i},Mk:function(){return a},b1:function(){return o}});var r=n(4480),o={i:null,x:0,y:0,w:3,h:4,minW:2,minH:4},a={i:null,x:0,y:0,w:10,h:9,minW:6,minH:8},i={layout:[],pristine:{}};t.ZP=(0,r.xu)({key:"dashboardLayout",default:i})},41943:function(e,t,n){"use strict";n.d(t,{sX:function(){return p},Kl:function(){return m},Fu:function(){return v},ZL:function(){return g}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480),a=n(41331);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=n(98475);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pristine";return{updatePristine:function(t,n,o){if(!(n in(t[e]||{}))&&!(0,a.ZP)(t[n],o))return u(u({},t),{},(0,r.Z)({},e,u(u({},t[e]),{},(0,r.Z)({},n,t[n]))));if((0,a.ZP)(t[e][n],o)){var i=u({},t[e]);return delete i[n],u(u({},t),{},(0,r.Z)({},e,i))}return t},resetPristine:function(t){return u(u(u({},t),t[e]),{},(0,r.Z)({},e,{}))}}}(),d=f.updatePristine,p=(0,o.CG)({key:"dashboardLayoutState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,c.ZP)(t));return n?r[n]:r}},set:function(e){return function(t,n){(0,t.set)((0,c.ZP)(e),l(l({},c.E3),{},{layout:n}))}}}),v=(0,o.CG)({key:"updateDashboardLayoutState",get:function(e){return function(t){return(0,t.get)(p({id:e,key:"layout"}))}},set:function(e){return function(t,n){(0,t.set)((0,c.ZP)(e),(function(e){return l(l({},d(e,"layout",n)),{},{layout:n})}))}}}),m=(0,o.CG)({key:"removePristineDashboardLayoutState",set:function(e){return function(t){(0,t.set)((0,c.ZP)(e),(function(e){return l(l({},e),{},{pristine:{}})}))}}}),g=function(e){var t=function(e,t){return(0,o.sJ)(p({id:e,key:t}))}(e,"layout"),n=function(e){return(0,o.Zl)(v(e))}(e);return[t,n]}},47133:function(e,t,n){"use strict";n.d(t,{Z7:function(){return k},lz:function(){return A},g4:function(){return Z},_d:function(){return P},Y3:function(){return h},NM:function(){return O},r0:function(){return I},FV:function(){return T},DS:function(){return C},HI:function(){return y},LJ:function(){return S},QF:function(){return w}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(29439),o=n(4942),a=(n(21249),n(57640),n(9924),n(47941),n(41539),n(64211),n(2490),n(41874),n(67294)),i=n(4480),u=n(74059),c=n(37518),s=n(9058),l=n(41943),f=n(22841),d=n(39878),p={id:null,loaded:!1,fullyLoaded:!1,loading:!0,processing:!1,isOwner:!1,spaceSlug:"",roomSlug:"",spaceId:"",roomId:"",name:"",slug:"",version:0,createdAt:"",updatedAt:"",cardIds:[]},v=(0,i.xu)({key:"dashboard",default:p}),m=n(45215);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,i.CG)({key:"dashboardState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)(v(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,r){var a=e.set;return n?"function"===typeof r?a(v(t),(function(e){return b(b({},e),{},(0,o.Z)({},n,r(e[n])))})):void a(v(t),(function(e){return b(b({},e),{},(0,o.Z)({},n,r))})):a(v(t),b(b({},p),r))}}}),y=function(e){var t=e.id,n=e.key;return(0,i.FV)(h({id:t,key:n}))},S=function(e,t){return(0,i.sJ)(h({id:e,key:t}))},O=(0,i.CG)({key:"dashboardsState",get:function(e){return function(t){var n=t.get;return e.map((function(e){return n(h({id:e}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),w=function(e){return(0,i.sJ)(O(e))},A=(0,i.CG)({key:"dashboardInitializeState",get:function(e){return function(t){return(0,t.get)(v(e))}},set:function(e){return function(t,n){var r=t.set;r(h({id:e}),b(b({},n),{},{loaded:!0}));var o=n.spaceId,a=n.roomId,i=n.slug;r((0,d.c7)([o,a,i]),e)}}}),k=(0,i.CG)({key:"dashboardFullyInitializeState",set:function(e){return function(t,n){var r=t.set,o=n.layout,a=n.dashboard,i=n.cards;r(h({id:e}),b(b({},a),{},{loaded:!0,fullyLoaded:!0,loading:!1})),r((0,l.sX)(e),o),r((0,f.oz)({id:e}),i);var u=a.spaceId,c=a.roomId,s=a.slug;r((0,d.c7)([u,c,s]),e)}}}),P=(0,i.CG)({key:"dashboardReset",set:function(e){return function(t){var n=t.get,r=t.set,o=t.reset,a=n(v(e)),i=a.spaceId,u=a.roomId,c=a.slug;o(v(e)),r(d.UU,null),o((0,d.c7)([i,u,c]))}}}),Z=(0,i.CG)({key:"dashboardLoadingState",set:function(e){return function(t,n){(0,t.set)(h({id:e,key:"loading"}),n)}}}),E=function(e){var t=e.pristine,n=void 0===t?{}:t;return 0===Object.keys(n).length},j=(0,i.CG)({key:"dashboardIsPristineState",get:function(e){return function(t){var n=(0,t.get)((0,f.oz)({id:e}));return!Object.keys(n).length||Object.keys(n).some((function(e){return E(n[e])}))}}}),x=(0,i.CG)({key:"dashboardLayoutIsPristineState",get:function(e){return function(t){var n=t.get;return E(n((0,l.sX)({id:e})))}}}),C=function(e){var t=(0,s.e)(),n=function(){var n=(0,m.ZO)(t,e);return!n||!n.getChildren().some((function(e){return t=e.getAttribute("pristine"),!(0===Object.keys(t).length);var t}))},o=(0,a.useState)(n),u=(0,r.Z)(o,2),c=u[0],l=u[1];(0,a.useEffect)((function(){return null===t||void 0===t?void 0:t.on("pristineChanged",(function(){return l(n)}))}),[t]);var f=(0,i.sJ)(j(e)),d=(0,i.sJ)(x(e));return c&&f&&d},I=function(e){var t=(0,u.th)(),n=(0,c.UL)(),r=(0,d.FP)();return(0,d.qh)(t,n,e||r)},T=function(e){var t=I();return S(t,e)}},39878:function(e,t,n){"use strict";n.d(t,{FP:function(){return i},Jh:function(){return u},UU:function(){return o},c7:function(){return a},qh:function(){return c}});var r=n(4480),o=(0,r.cn)({key:"currentDashboardSlug",default:null}),a=(0,r.xu)({key:"dashboardIdBySlug",default:""}),i=function(){return(0,r.sJ)(o)},u=function(e){return(0,r.Zl)(o,e)},c=function(e,t,n){return(0,r.sJ)(a([e,t,n]))}},45215:function(e,t,n){"use strict";n.d(t,{ZP:function(){return K},ZO:function(){return G},vL:function(){return F}});var r=n(4942),o=(n(69826),n(41539),n(31672),n(2490),n(59461),n(74916),n(4723),n(92222),n(15581),n(34514),n(54747),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(67294)),a=n(34675),i=n(74059),u=n(9058),c=n(96104),s=n(65565),l=n(47133),f=n(29439),d=n(87462),p=n(89250),v=n(79238),m=n(54576),g=n(3701),b=n(22841),h=(n(15306),n(71992)),y=n(45987),S=["category","closeParent","context","openDialog"],O=function(e){var t=e.category,n=e.closeParent,r=e.context,a=e.openDialog,i=(0,y.Z)(e,S);return o.createElement(h.h,(0,d.Z)({icon:"trashcan",onClick:function(){a(),n()},"data-ga":"".concat(t,"::click-remove::").concat(r),"data-testid":"removeChart-option"},i),"Remove")},w=n(93416),A=n(97723),k=n(97945),P=function(e){var t=e.cardId,n=e.close,r=e.id,a=(0,b.I_)(r,t),i=a.nodeId,u=a.chartId,c=(0,k.iy)(i,"name"),s=(0,A.Zj)(r,t);return o.createElement(w.ConfirmationDialog,{"data-ga":"remove-chart-dialog","data-testid":"removeChartDialog",handleConfirm:s,handleDecline:n,message:o.createElement(o.Fragment,null,"You are about to remove ",o.createElement("strong",null,u),c&&o.createElement(o.Fragment,null," ","of node ",o.createElement("strong",null,c)),".",o.createElement("br",null),"Are you sure you want to continue?"),title:"Remove chart"})},Z=n(46667),E="chart-options",j="custom-dashboard",x=function(e){var t=e.id,n=e.cardId,r=e.onClick,a=(0,p.s0)(),i=(0,b.I_)(t,n,"chartId"),u=(0,l.LJ)(t),c=u.spaceSlug,s=u.roomSlug;return o.createElement(h.h,{icon:"line_chart",onClick:function(){r();var e=function(e){return"".concat("chart_").concat("string"===typeof(t=e)?t.replace(/ /g,"_").replace(/:/g,"_").replace(/\(/g,"_").replace(/\)/g,"_").replace(/\./g,"_").replace(/\//g,"_"):"");var t}(i);a("/spaces/".concat(c,"/rooms/").concat(s,"/overview#chartName=").concat(e))},"data-ga":"".concat(E,"::click-go-to-chart::").concat(j),"data-testid":"chart-goToChart"},"Go to Chart")},C=(0,o.forwardRef)((function(e,t){return o.createElement(g.Button,(0,d.Z)({},e,{icon:o.createElement(g.default,{svg:v.default,size:"16px"}),ref:t}))})),I=function(){var e=(0,Z.Z)(),t=(0,f.Z)(e,4),n=t[0],r=t[2],a=t[3],i=(0,m.useAttributeValue)("cardId"),u=(0,m.useAttributeValue)("dashboardId");return o.createElement(o.Fragment,null,o.createElement(h.Z,{Component:C,category:E,context:j,testId:"chartDropdown"},(function(e){var t=e.close;return o.createElement(o.Fragment,null,o.createElement(x,{id:u,cardId:i,onClick:t}),o.createElement(O,{cardId:i,category:E,closeParent:t,context:j,"data-testid":"chart-remove",id:u,openDialog:r}))})),n&&o.createElement(P,{cardId:i,close:a,id:u}))},T=n(71893),D=n(7849),N=(0,T.default)(g.Button).withConfig({displayName:"drag__DragButton",componentId:"sc-1t95u2-0"})(["cursor:",";"],(function(e){return e.grabbing?"grabbing":"grab"})),M=function(e){var t=(0,m.useAttributeValue)("onMouseDownDrag"),n=(0,m.useAttributeValue)("onMouseUpDrag"),r=(0,m.useAttributeValue)("onTouchEndDrag"),a=(0,Z.Z)(),i=(0,f.Z)(a,4),u=i[0],c=i[2],s=i[3];return o.createElement(N,(0,d.Z)({icon:o.createElement(g.default,{svg:D.default,size:"16px"}),title:"Drag & rearrange","data-testid":"chartHeaderToolbox-drag"},e,{onMouseDown:function(){c(),t.apply(void 0,arguments)},onMouseUp:function(){s(),n.apply(void 0,arguments)},onTouchEnd:function(){s(),r.apply(void 0,arguments)},grabbing:u}))},R=n(96415),_=n(70873),L=n(43460);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G=function(e,t){return e&&e.getRoot().getChildren().find((function(e){return e.match({id:t})}))},F=function(e){return function(t){return"dashboard-page::".concat(e.getAttribute("id"),"::").concat(t)}},K=function(e){var t=(0,l.LJ)(e),n=t.spaceId,r=t.roomId,f=(0,u.e)(),d=(0,c.fX)({extraKey:"dashboard-".concat(e)}),p=(0,i.Q6)();(0,o.useMemo)((function(){if(f){var t=G(f,e);t||(t=f.makeContainer({attributes:B(B({},f.getRoot().getAttributes()),{},{id:e,navigation:"pan",nodesScope:d,overlays:{proceeded:{type:"proceeded"}},host:p?"".concat(window.envSettings.agentApiUrl,"/api/v2"):"".concat(window.envSettings.apiUrl,"/api/v3/spaces/").concat(n,"/rooms/").concat(r),leftHeaderElements:[I,a.default],toolboxElements:[L.default,R.default,_.default,M]})}),f.appendChild(t))}}),[f,e]),(0,s.Z)((function(){if(f){var t=G(f,e);t&&t.getNodes().forEach((function(e){return e.updateAttribute("nodesScope",d)}))}}),[f,r,d]),(0,o.useEffect)((function(){return function(){var t=G(f,e);t&&t.destroy()}}),[f,r])}},79619:function(e,t,n){"use strict";n.d(t,{m:function(){return Z}});var r=n(15861),o=n(29439),a=n(71002),i=n(4942),u=n(45987),c=n(64687),s=n.n(c),l=(n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(85827),n(47941),n(23157),n(73210),n(25387),n(2490),n(72608),n(21249),n(57640),n(9924),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),f=n(4480),d=n(98475),p=n(44850),v=n(19665),m=n(47133),g=["i"],b=["aggregationMethod","chartType","dimensions","selectedDimensions","filteredLabels","selectedLabels","selectedNodeIds","selectedNodes","selectedInstances","chartId","groupBy","groupingMethod","id","host"],h=["type","cardID","id","chartID","chartId","nodeID","nodeId","chartMetadata","context","attributes","cardAttributes","contextScope","text"];function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O={TextCard:"text",ChartCard:"chart",compositeChart:"chart",chart:"chart",text:"text"},w=new Set(["text","chart"]),A=["x","y","h","w"],k=function(e,t){var n,r,o=t.i,a=(0,u.Z)(t,g),i=null!==(n=e[o])&&void 0!==n&&n.type&&"text"!==(null===(r=e[o])||void 0===r?void 0:r.type)?d.Mk:d.b1;return A.reduce((function(e,t){return e[t]=a[t]||0===a[t]?a[t]:i[t],e}),S(S({},i),{},{i:o}))},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.trim().startsWith("<p>")?e:"<p>".concat(e,"</p>")},Z=function(e){var t=e.id,n=e.name,r=e.slug,o=e.version,i=e.createdAt,c=e.updatedAt,s=e.snapshot,l=s.uiState,f=s.items||[],d=[],v=f.reduce((function(e,t){var n=t.type,r=t.cardID,o=t.id,i=void 0===o?r:o,c=t.chartID,s=t.chartId,l=void 0===s?c:s,f=t.nodeID,v=t.nodeId,m=void 0===v?f:v,g=t.chartMetadata,y=t.context,A=t.attributes,k=t.cardAttributes,Z=void 0===k?A:k,E=t.contextScope,j=t.text,x=(0,u.Z)(t,h);if(E=E||[y||(null===g||void 0===g?void 0:g.context)||l],n=O[n]||n,e[i]={id:i,type:n,nodeId:m,contextScope:E},w.has(n)){if(d.push(i),"text"===n)return e[i]=S(S(S({},p.Xw),Z),{},{text:P(j||Z.text)},e[i]),e;e[i]=function(e){var t=e.aggregationMethod,n=e.chartType,r=e.dimensions,o=void 0===r?[]:r,i=e.selectedDimensions,c=void 0===i?o||[]:i,s=e.filteredLabels,l=void 0===s?[]:s,f=e.selectedLabels,d=void 0===f?l||[]:f,v=e.selectedNodeIds,m=void 0===v?[]:v,g=e.selectedNodes,h=void 0===g?m||[]:g,y=e.selectedInstances,O=void 0===y?[]:y,w=e.chartId,A=e.groupBy,k=e.groupingMethod,P=e.id,Z=(e.host,(0,u.Z)(e,b));return S(S({},p.v),{},{aggregationMethod:t||"avg",chartType:n||"line",selectedDimensions:Array.isArray(c)?c:[],selectedLabels:Array.isArray(d)?d:d&&"object"===(0,a.Z)(d)?Object.keys(d):[],selectedNodes:Array.isArray(h)?h:[],selectedInstances:Array.isArray(O)?O:w?[w]:[],groupBy:Array.isArray(A)?A:A?[A]:["dimension"],groupingMethod:k||"average",id:P},Z)}(S(S(S({},x),Z),{},{chartId:l},e[i]))}return e}),{});return{layout:l?l.map((function(e){return k(v,e)})):f.map((function(e){var t=e.layout;return k(v,t)})),dashboard:{id:t,name:n,slug:r,version:o,createdAt:i,updatedAt:c,cardIds:d},cards:v}};t.Z=function(e,t){var n=t.spaceId,a=t.spaceSlug,i=t.roomId,u=t.roomSlug,c=(0,l.useState)(!0),d=(0,o.Z)(c,2),p=d[0],g=d[1],b=(0,f._8)((function(t){var o=t.set;return(0,r.Z)(s().mark((function t(){var r,c,l,f,d,p;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(!0),o((0,m.g4)(e),!0),t.next=4,(0,v.AK)(n,i,e);case 4:r=t.sent,c=r.data,l=Z(c),f=l.layout,d=l.dashboard,p=l.cards,o((0,m.Z7)(e),{layout:f,dashboard:S(S({},d),{},{spaceSlug:a,roomSlug:u,spaceId:n,roomId:i}),cards:p}),g(!1),o((0,m.g4)(e),!1);case 10:case"end":return t.stop()}}),t)})))}));return(0,l.useEffect)((function(){e&&b(e)}),[e]),p}},44197:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(4480),o={id:null,avatarURL:null,deactivated:!1,email:"",joinedAt:null,name:"",role:""};t.Z=(0,r.cn)({key:"member",default:{}})},34912:function(e,t,n){"use strict";n.d(t,{Bb:function(){return p},Vr:function(){return d},W3:function(){return f},mX:function(){return l}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(41539),n(15581),n(2490),n(34514),n(54747),n(66992),n(33948),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(4480)),a=n(38609),i=n(41331),u=n(44197);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=(0,o.CG)({key:"memberState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)(u.Z)[t]||u.E;return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){var a=e.set;a(u.Z,n?"function"!==typeof o?function(e){return s(s({},e),{},(0,r.Z)({},t,s(s({},e[t]),{},(0,r.Z)({},n,o))))}:function(e){return s(s({},e),{},(0,r.Z)({},t,s(s({},e[t]),{},(0,r.Z)({},n,o(e[t][n])))))}:function(e){return s(s({},e),{},(0,r.Z)({},t,s(s(s({},u.E),e[t]),o)))})}}}),f=(0,o.CG)({key:"membersState",get:function(e){return function(t){var n=t.get;return e.map((function(e){return n(l({id:e}))}))}},set:function(){return function(e,t){var n=e.set,r=(0,e.get)(u.Z);t.forEach((function(e){r[e.id]=e})),n(u.Z,r)}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),d=function(e){return(0,o.sJ)(f(e))},p=(0,o.nZ)({key:"membersInitialize",get:function(e){return(0,e.get)(u.Z)},set:function(e,t){var n=e.set,r=t.values,o=t.merge;return n(u.Z,(function(e){var t=o?(0,a.Z)(e,r):r;return(0,i.ZP)(t,e)?e:t}))}})},54227:function(e,t,n){"use strict";n.d(t,{UK:function(){return P},ZS:function(){return S},bV:function(){return O},Yy:function(){return w},Le:function(){return A},CN:function(){return k}});var r=n(4942),o=n(29439),a=n(93433),i=(n(69826),n(41539),n(31672),n(2490),n(59461),n(92222),n(57327),n(88449),n(59849),n(40561),n(21249),n(57640),n(9924),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(4480),c=n(74059),s=n(37518),l=(n(88674),n(38862),function(e){var t=e.spaceSlug,n=e.roomSlug;return"".concat(t,"-").concat(n,"-tabs")}),f=function(e,t){var n=e.spaceSlug,r=e.roomSlug,o=l({spaceSlug:n,roomSlug:r});Promise.resolve().then((function(){try{localStorage.setItem(o,JSON.stringify(t))}catch(e){}}))},d=(0,u.xu)({key:"navigation",default:function(e){var t=e.spaceSlug,n=e.roomSlug,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{var o=l({spaceSlug:t,roomSlug:n}),a=localStorage.getItem(o);return a?JSON.parse(a):r}catch(i){return r}}});function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=(0,u.CG)({key:"navigationTabsState",get:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e){return(0,e.get)(d({spaceSlug:t,roomSlug:n}))}},set:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e,r){var o=e.set;r&&t&&n&&o(d({spaceSlug:t,roomSlug:n}),(function(e){if(e.find((function(e){var t=e.id;return r.id===t})))return e;var o=[].concat((0,a.Z)(e),[r]);return f({spaceSlug:t,roomSlug:n},o),o}))}}}),g=(0,u.CG)({key:"navigationTabsState/remove",get:function(){return function(){return null}},set:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e,r){(0,e.set)(d({spaceSlug:t,roomSlug:n}),(function(e){var o=e.filter((function(e,t){return t!==r}));return f({spaceSlug:t,roomSlug:n},o),o}))}}}),b=(0,u.CG)({key:"navigationTabsState/removeById",get:function(){return function(){return null}},set:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e,r){(0,e.set)(d({spaceSlug:t,roomSlug:n}),(function(e){var o=e.filter((function(e){return e.id!==r}));return f({spaceSlug:t,roomSlug:n},o),o}))}}}),h=(0,u.CG)({key:"navigationTabsState/reorder",get:function(){return function(){return null}},set:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e,r){var i=e.set,u=r.sourceIndex,c=r.destinationIndex;i(d({spaceSlug:t,roomSlug:n}),(function(e){var r=(0,a.Z)(e),i=r.splice(u,1),s=(0,o.Z)(i,1)[0];return r.splice(c,0,s),f({spaceSlug:t,roomSlug:n},r),r}))}}}),y=(0,u.CG)({key:"navigationTabsState/removeById",get:function(){return function(){return null}},set:function(e){var t=e.spaceSlug,n=e.roomSlug;return function(e,r){var o=e.set,a=r.id,i=r.slug,u=r.path;o(d({spaceSlug:t,roomSlug:n}),(function(e){var r=e.map((function(e){return e.id!==a?e:v(v({},e),{},{title:i,path:u})}));return f({spaceSlug:t,roomSlug:n},r),r}))}}}),S=function(){var e=(0,c.uk)(),t=(0,s.vf)();return(0,u.sJ)(m({spaceSlug:e,roomSlug:t}))},O=function(e){var t=e.title,n=e.path,r=e.id,o=e.destination,a=e.type,l=void 0===a?"nodes":a,f=e.params,d=e.isReady,p=void 0===d||d,v=(0,s.A3)(),g=(0,c.uk)(),b=(0,s.vf)(),h=(0,u.Zl)(m({spaceSlug:g,roomSlug:b}));(0,i.useEffect)((function(){p&&(r&&t&&h({id:r,title:t,type:l,icon:"alerts"===l?"alarm":"node_hollow",params:f,path:"".concat(n||v,"/").concat(l,"/").concat(o)}))}),[v,t,n,r,o,l,h,p])},w=function(){var e=(0,c.uk)(),t=(0,s.vf)();return(0,u.Zl)(g({spaceSlug:e,roomSlug:t}))},A=function(){var e=(0,c.uk)(),t=(0,s.vf)();return(0,u.Zl)(b({spaceSlug:e,roomSlug:t}))},k=function(){var e=(0,c.uk)(),t=(0,s.vf)();return(0,u.Zl)(h({spaceSlug:e,roomSlug:t}))},P=function(){var e=(0,c.uk)(),t=(0,s.vf)();return(0,u.Zl)(y({spaceSlug:e,roomSlug:t}))}},18761:function(e,t,n){"use strict";n.d(t,{B3:function(){return O},BC:function(){return v},Fz:function(){return f},RX:function(){return h},Sd:function(){return b},Wy:function(){return d},XG:function(){return p},YZ:function(){return m},_:function(){return w},kq:function(){return g},op:function(){return l},tu:function(){return A},yM:function(){return s}});var r=n(4942),o=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(78710),i=n(66152);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(e){return o.Z.get("/api/v1/agents/".concat(e,"/user_agent_node_access"),{transform:i.k5})},l=function(e,t,n){return o.Z.get("/api/v2/bearer_get_token?node_id=".concat(e,"&claim_id=").concat(n,"&machine_guid=").concat(t),{transform:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{token:e.token,expiration:e.expiration,bearerProtection:e.bearer_protection}}})},f=function(e){return o.Z.get("/api/v1/accounts/".concat(e,"/nodes"))},d=function(e,t){return o.Z.post("/api/v1/accounts/".concat(e,"/nodes/").concat(t,"/touch"))},p=function(e,t){return o.Z.get("/api/v1/accounts/".concat(e,"/nodes/").concat(encodeURIComponent(t)))},v=function(e,t){var n=(0,a.Ly)(t);o.Z.get(n?"/api/v1/info":"/api/v1/nodes/".concat(e,"/info"),{transform:function(t){return c(c({},t),{},{nodeId:e})},baseURL:n?window.envSettings.agentApiUrl:""})},m=function(e){return o.Z.get("/api/v1/agents/".concat(e,"/info"))},g=function(e){return o.Z.get("/api/v1/agents/".concat(e,"/user_access"),{transform:function(e){return e.authorizedNodeIDs}}).catch((function(){return{data:[]}}))},b=function(e,t){return o.Z.delete("/api/v1/accounts/".concat(e,"/nodes"),{params:{node_ids:t.join(",")}})},h=function(e,t,n,r){return o.Z.put("/api/v1/accounts/".concat(e,"/nodes/").concat(t),{name:n,urls:r})},y="*",S=[y],O=function(e,t,n){var r=n.baselineAfter,i=n.baselineBefore,u=n.highlightAfter,c=n.highlightBefore,s=n.method,l=n.options,f=n.group,d=n.nodeIds,p=n.points,v=n.context,m=n.aggregation,g=void 0===m?"avg":m,b=n.groupBy,h=void 0===b?[]:b;return(0,a.Ly)(e)?o.Z.get("".concat(window.envSettings.agentApiUrl,"/api/v2/weights"),{params:{format:"json",options:"".concat(Array.isArray(l)?l.join("|"):l,"|minify|nonzero|unaligned"),contexts:y,scope_contexts:v||y,scope_nodes:d.join("|")||y,nodes:y,instances:y,dimensions:y,labels:y,group_by:h.join("|"),aggregation:g,method:s||"ks2",time_group:f||"average",time_group_options:"",time_resampling:0,after:Math.floor(u/1e3),before:Math.floor(c/1e3),points:p,baseline_after:Math.floor(r/1e3),baseline_before:Math.floor(i/1e3),timeout:18e4}}):o.Z.post("/api/v3/spaces/".concat(e,"/rooms/").concat(t,"/weights"),{selectors:{nodes:S,contexts:S,dimensions:S,labels:S,alerts:S},aggregations:{time:{time_group:f||"average",time_group_options:"",time_resampling:0},metrics:[{group_by:h,aggregation:g}]},window:{after:Math.floor(u/1e3),before:Math.floor(c/1e3),points:p,baseline:{after:Math.floor(r/1e3),before:Math.floor(i/1e3)}},scope:{nodes:d,contexts:v?[v]:S},method:s||"ks2",options:l?Array.isArray(l)?l:[l]:[],timeout:18e4})},w=function(e){return o.Z.get("/api/v3/spaces/".concat(e,"/settings/preferred_nodes"))},A=function(e,t){return o.Z.post("/api/v3/spaces/".concat(e,"/settings/preferred_nodes"),{preferred_node_ids:t})}},48854:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(4480),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{fullyLoaded:!1,loaded:!1,id:(null===e||void 0===e?void 0:e.nd)||(null===e||void 0===e?void 0:e.mg)||null,mg:null,nd:null,isDeleted:!1,name:"",version:"",ni:null,labels:{},labelKeys:[],hw:{architecture:"",cpuFrequency:"",cpus:"",memory:"",diskSpace:"",virtualization:"",container:""},os:{id:"",nm:"",v:"",kernel:{nm:"",v:""}},capabilities:{},state:"",isProtobufCapable:!0,urls:[],accessCount:0,lastAccessTime:"",updateSeverity:"",hasAccessibleData:!1,isLive:!1,nodeStatus:null}};t.Z=(0,r.cn)({key:"nodes",default:{}})},96104:function(e,t,n){"use strict";n.d(t,{Lr:function(){return P},WA:function(){return h},XT:function(){return A},aQ:function(){return k},fX:function(){return w},jo:function(){return O},tN:function(){return S},wT:function(){return Z}});var r=n(4942),o=n(29439),a=(n(26699),n(32023),n(41539),n(64211),n(2490),n(41874),n(47941),n(92222),n(85827),n(25387),n(72608),n(15581),n(34514),n(54747),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(82526),n(38880),n(49337),n(33321),n(69070),n(4480)),i=n(4822),u=n(96929),c=n(37518),s=n(97945);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){return function(t,n){return!Array.isArray(n)||!n.length||"".concat(n).includes(t[e])}},p={nodeStatuses:d("nodeStatus"),nodeLabels:function(e,t){return!((!Array.isArray(t)||t.length)&&t)||Object.keys(e.labels).some((function(n){return!Array.isArray(t)||!t.length||t.includes("".concat(n,"|").concat(e.labels[n]))}))},nodeCapabilities:d("capabilityKeys"),nodeVersions:d("version")},v={excludedNodeIds:d("id")},m=[],g=(0,a.CG)({key:"nodesFilters",get:function(e){var t=e.extraKey,n=e.key,r=e.omit,o=e.merge;return function(e){var a=e.get,u=r&&r.split(":::"),c=t?a(h({key:n,merge:!1})):[],s=!t&&!!u&&!u.includes("selectedNodeIds"),l=u&&u.includes("selectedNodeIds")||t&&o?c:a((0,i.dz)({key:n,extraKey:t,flavour:"arr",param:"selectedNodeIds"}))||[],f=[],d=a((0,i.dz)({key:n,extraKey:t,flavour:"arr",merge:o}));return Object.keys(d).forEach((function(e){var r,c=!!u&&u.includes(e);(p[e]||v[e])&&null!==(r=d[e])&&void 0!==r&&r.length&&(c||f.push([e,c?[]:d[e]]),o&&t&&f.push([e,a((0,i.dz)({key:n,flavour:"arr",param:e}))||[]]))})),[f,l,c,s]}},set:function(e){var t=e.extraKey,n=e.key;return function(e,r){var o=e.get,a=e.set,u=r.param,c=r.removedValue,s=o((0,i.dz)({key:n,extraKey:t,param:u,flavour:"arr"}));a((0,i.dz)({key:n,extraKey:t,param:u,flavour:"arr"}),Array.isArray(c)?c:s.filter((function(e){return e!==c})))}}}),b=(0,a.CG)({key:"nodesFiltered",get:function(e){var t=e.key,n=e.extraKey,r=e.omit,a=e.keepAll,u=void 0!==a&&a,c=e.merge;return function(e){var a=e.get,l=a(g({key:t,extraKey:n,omit:r,merge:c})),d=(0,o.Z)(l,4),m=d[0],b=d[1],h=d[2],y=d[3],S=a((0,s.S6)(t));if(!m.length&&(null===b||void 0===b||!b.length))return S;var O=function(e,t){var n=t.selectedNodeIds,r=t.excludedNodeIds,a=t.globalNodeIds,i=t.omittedNonNodeFilter,u=n.reduce((function(e,t){return e[t]=!r||r.includes(t),e}),{}),c=a.reduce((function(e,t){return e[t]=!r||r.includes(t),e}),{});return function(t){return!(a.length&&!c[t.id])&&(!(!n.length||!u[t.id])||!(!i&&!e.length&&n&&n.length)&&!e.some((function(e){var n=(0,o.Z)(e,2),r=n[0],a=n[1];return v[r]?v[r](t,a):!!p[r]&&!p[r](t,a)})))}}(m,{selectedNodeIds:b,excludedNodeIds:a((0,i.dz)({key:t,extraKey:n,flavour:"arr",param:"excludedNodeIds"})),globalNodeIds:h,omittedNonNodeFilter:y});return u?S.map((function(e){return O(e)?e:f(f({},e),{},{hidden:!0})})):S.filter(O)}}}),h=(0,a.CG)({key:"nodeIdsFiltered",get:function(e){var t=e.key,n=e.extraKey,r=e.omit,o=e.keepAll,a=e.emptyIfAll,i=void 0===a||a,c=e.merge,s=e.scoped;return function(e){var a=e.get,l=a(b({key:t,extraKey:n,omit:r,keepAll:o,merge:c}));return i&&a((0,u.kY)({id:t,key:"ids"})).length===l.length?s?a(h({key:t,extraKey:n,omit:r,keepAll:o,emptyIfAll:!1,merge:!0})):m:l.map((function(e){var t=e.id,n=e.hidden;return o?[t,!n]:t}))}}}),y={Live:0,Stale:1,Offline:2},S={nodeStatuses:function(e,t){return y[e.id]-y[t.id]},selectedNodeIds:function(e,t){return y[e.id]-y[t.id]},nodeVersions:function(e,t){return t.id.localeCompare(e.id,void 0,{sensitivity:"accent",ignorePunctuation:!0})},default:function(e,t){return e.id.localeCompare(t.id,void 0,{sensitivity:"accent",ignorePunctuation:!0})}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=e.omit,o=e.keepAll,i=void 0!==o&&o,u=e.merge,s=void 0===u||u,l=(0,c.UL)();return(0,a.sJ)(b({extraKey:n,key:t||l,omit:r,keepAll:i,merge:s}))},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=e.omit,o=e.keepAll,i=void 0!==o&&o,u=e.emptyIfAll,s=void 0===u||u,l=e.merge,f=void 0!==l&&l,d=e.scoped,p=void 0!==d&&d,v=(0,c.UL)();return(0,a.sJ)(h({extraKey:n,key:t||v,omit:r,keepAll:i,emptyIfAll:s,merge:f,scoped:p}))},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=(0,c.UL)();return(0,i.TQ)("selectedNodeIds",{key:t||r,extraKey:n,flavour:"arr"})},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=e.merge,o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=e.merge,o=void 0===r||r,a=(0,c.UL)();return(0,i.by)("selectedNodeIds",{key:t||a,extraKey:n,flavour:"arr",merge:o,defaultValue:m})}({key:t,extraKey:n,merge:void 0!==r&&r});return[o,A({key:t,extraKey:n})]},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=(0,c.UL)();return(0,i.by)("excludedNodeIds",{key:t||r,extraKey:n,flavour:"arr",defaultValue:m})}({key:t,extraKey:n}),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=(0,c.UL)();return(0,i.TQ)("excludedNodeIds",{key:t||r,extraKey:n,flavour:"arr"})}({key:t,extraKey:n});return[r,o]},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.key,n=e.extraKey,r=e.omit,o=e.merge,i=void 0!==o&&o,u=(0,c.UL)();return(0,a.FV)(g({key:t||u,extraKey:n,omit:r,merge:i}))}},97945:function(e,t,n){"use strict";n.d(t,{$E:function(){return C},HZ:function(){return L},Hg:function(){return Q},Jz:function(){return Y},M2:function(){return H},Mm:function(){return R},Ne:function(){return T},Ng:function(){return W},S6:function(){return I},TQ:function(){return Z},WR:function(){return ee},Xw:function(){return N},Y0:function(){return J},d$:function(){return $},dJ:function(){return P},e5:function(){return B},iy:function(){return j},m3:function(){return q},mf:function(){return F},pG:function(){return te},ul:function(){return k},wU:function(){return x},zP:function(){return E}});var r=n(93433),o=n(4942),a=n(15861),i=(n(41539),n(88674),n(21249),n(57640),n(9924),n(85827),n(25387),n(2490),n(72608),n(92222),n(57327),n(88449),n(59849),n(26699),n(32023),n(66992),n(33948),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(64687)),u=n.n(i),c=n(67294),s=n(4480),l=n(89250),f=n(38609),d=n(41331),p=n(74059),v=n(58502),m=n(91850),g=n(96929),b=n(37518),h=n(48854),y=n(18761);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=(0,s.CG)({key:"nodeInfoState",get:function(e){var t=e.nodeId,n=e.spaceId;return(0,a.Z)(u().mark((function e(){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,y.BC)(t,n);case 3:return r=e.sent,e.abrupt("return",r.data);case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])})))}}),A=(0,s.CG)({key:"preferredNodes",get:function(e){return function(){return e?(0,y._)(e):Promise.resolve()}}}),k=function(){var e,t=(0,p.th)(),n=(0,s.$P)(A(t)),r=(0,s.C)(A(t));return{loaded:"loading"!==n.state,nodes:(null===(e=n.contents)||void 0===e?void 0:e.data)||[],hasError:"hasError"===n.state,refresh:r}},P=function(){var e=(0,p.th)();return function(t){return(0,y.tu)(e,t)}},Z=function(e,t){return(0,s.$P)(w({nodeId:e,spaceId:t}))},E=(0,s.CG)({key:"nodeState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)(h.Z)[t]||(0,h.G)();return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,r){var a=e.set;return n?"function"===typeof r?a(h.Z,(function(e){var a=e[t]||(0,h.G)();return O(O({},e),{},(0,o.Z)({},t,O(O({},a),{},(0,o.Z)({},n,r(a[n])))))})):void a(h.Z,(function(e){var a=e[t]||(0,h.G)();return O(O({},e),{},(0,o.Z)({},t,O(O({},a),{},(0,o.Z)({},n,r))))})):a(h.Z,(function(e){return O(O({},e),{},(0,o.Z)({},t,O(O({},(0,h.G)()),r)))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),j=function(e,t){return(0,s.sJ)(E({id:e,key:t}))},x=function(){return(0,s._8)((function(e){var t=e.snapshot;return function(e){return t.getLoadable(E({id:e})).contents}}),[])},C=(0,s.CG)({key:"nodesState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.map((function(e){return n[e]||(0,h.G)()}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),I=(0,s.CG)({key:"nodesState",get:function(e){return function(t){var n=t.get;if(!e){var r=n(v.$V),o=n((0,v.bo)(r)),a=n(m.IV);e=n((0,m.xh)([o,a]))}var i=n((0,g.kY)({id:e,key:"ids"}));return n(C(i))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),T=function(e){var t=(0,g.zN)();return(0,s.sJ)(C(e||t))},D=(0,s.CG)({key:"cloudNodeIdsSelector",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.reduce((function(e,t){var o;return null!==(o=n[t])&&void 0!==o&&o.nd?[].concat((0,r.Z)(e),[n[t].nd]):e}),[])}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),N=function(e){return(0,s.sJ)(D(e||[]))},M=(0,s.CG)({key:"queryableNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t,r;return(null===(t=n[e])||void 0===t?void 0:t.isLive)||"stale"===(null===(r=n[e])||void 0===r?void 0:r.state)}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),R=function(e){var t=(0,g.zN)();return(0,s.sJ)(M(e||t))},_=(0,s.CG)({key:"liveNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t;return null===(t=n[e])||void 0===t?void 0:t.isLive}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),L=function(e){var t=(0,g.zN)();return(0,s.sJ)(_(e||t))},U=(0,s.CG)({key:"staleNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t;return"stale"===(null===(t=n[e])||void 0===t?void 0:t.state)}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),B=function(e){var t=(0,g.zN)();return(0,s.sJ)(U(e||t))},G=(0,s.CG)({key:"offlineNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t;return null===(t=n[e])||void 0===t?void 0:t.isOffline}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),F=function(e){var t=(0,g.zN)();return(0,s.sJ)(G(e||t))},K=(0,s.CG)({key:"unseenNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t;return null===(t=n[e])||void 0===t?void 0:t.isUnseen}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),J=function(e){var t=(0,g.zN)();return(0,s.sJ)(K(e||t))},z=(0,s.CG)({key:"needUpdateNodeIdsState",get:function(e){var t=e.ids,n=e.severities,r=void 0===n?["warning","critical"]:n;return function(e){var n=(0,e.get)(h.Z);return t.filter((function(e){var t;return r.includes(null===(t=n[e])||void 0===t?void 0:t.updateSeverity)}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ids,n=e.severity,r=L();return(0,s.sJ)(z(O({ids:t||r},n&&{severities:[n]})))},V=(0,s.CG)({key:"fnNodeIdsState",get:function(e){return function(t){var n=(0,t.get)(h.Z);return e.filter((function(e){var t;return null===(t=n[e])||void 0===t||null===(t=t.capabilities.funcs)||void 0===t?void 0:t.enabled}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),H=function(e){var t=(0,g.zN)();return(0,s.sJ)(V(e||t))},Y=(0,s.nZ)({key:"nodesState/initialize",get:function(e){return(0,e.get)(h.Z)},set:function(e,t){var n=e.set,r=t.values,o=t.merge;return n(h.Z,(function(e){var t=o?(0,f.Z)(e,r):r;return(0,d.ZP)(t,e)?e:t}))}}),$=function(){return(0,s.sJ)(Y)},X=function(){var e=(0,b.A3)();return e&&"".concat(e,"/nodes")},q=function(e){var t=X();return"".concat(t,"/").concat(e)},Q=function(){var e=X();return function(t){return"".concat(e,"/").concat(t)}},ee=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).alertId,n=function(){var e=(0,l.s0)(),t=X();return(0,c.useCallback)((function(n,r){e("".concat(t,"/").concat(n),r?{state:r}:"")}),[t,e])}();return(0,c.useCallback)((function(){return n(e,{alertId:t})}),[n])},te=function(){var e;return null===(e=(0,l.bS)("/spaces/:spaceSlug/rooms/:roomSlug/nodes/:nodeId"))||void 0===e||null===(e=e.params)||void 0===e?void 0:e.nodeId}},82902:function(e,t,n){"use strict";n.d(t,{Ly:function(){return s},Ud:function(){return u},V6:function(){return a},XY:function(){return c}});var r=n(29439),o=(n(74916),n(15306),n(21249),n(57640),n(9924),n(9653),n(62200)),a=function(e){return 1===e?"Node":"Nodes"},i=[1,26],u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(!e||"unknown"===e)return!1;var n=function(e){return e.replace(/^v/,"").split(".")}(e).map((function(e){return Number(e)})),o=(0,r.Z)(n,3),a=o[0],u=o[1],c=o[2];return!(a&&!isNaN(a)&&!isNaN(u))||(a<t[0]||!(a>t[0])&&(u<t[1]||!(u>t[1])&&c<t[2]))},c={docker:"https://learn.netdata.cloud/docs/agent/packaging/installer/update#docker",mac:"https://learn.netdata.cloud/docs/agent/packaging/installer/update#macos",binpkg:"https://learn.netdata.cloud/docs/agent/packaging/installer/update#issues-with-older-binpkg-installs",default:"https://learn.netdata.cloud/docs/agent/packaging/installer/update#updates-for-most-systems"},s=function(e){var t=e.container,n=e.os,r=e._install_type,a=e.version,i=u(a,o.OI);return t||n||r?c["docker"===t?"docker":"mac"===n?"mac":"binpkg"===r&&i?"binpkg":"default"]:c.default}},3689:function(e,t,n){"use strict";n.d(t,{Nq:function(){return d},Pj:function(){return s},Ue:function(){return c},XH:function(){return y},XK:function(){return f},YM:function(){return m},aU:function(){return l},k_:function(){return i},mN:function(){return p},q7:function(){return b},rc:function(){return u},uK:function(){return v},yV:function(){return h},zK:function(){return g}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i={label:"All rooms",value:""},u={plan:"Your plan does not support this configuration.",role:"You do not have permission to change Global Notification configurations."},c="You do not have permission to add configurations. Contact a space administrator to add this configuration.",s={"Amazon SNS":"AwsSns"},l={Discord:{name:"integrationDiscordColored"},Webhook:{name:"integrationWebhookColored"},Email:{name:"integrationEmailColored"},MobilePush:{color:"successLite",name:"mobilePushNotifications"},PagerDuty:{name:"integrationPagerdutyColored"},Slack:{name:"integrationSlackColored"},Opsgenie:{name:"integrationOpsgenieColored"},Mattermost:{name:"integrationMattermostColored"},RocketChat:{name:"integrationRocketChatColored"},MobileApp:{name:"integrationMobileAppColored"},AwsSns:{name:"integrationAWSSNSColored"},Telegram:{name:"integrationTelegramColored"}},f={PERSONAL:{icon:"userPress",tooltip:"Notification methods whose destination will be a user-specific attribute, e.g. user's e-mail."},SYSTEM:{icon:"systemOverviewPress",tooltip:"Notification methods that the destination will be a target that usually isn't specific to a single user, e.g. Slack channel."}},d={ALARMS_SETTING_ALL:{value:"ALARMS_SETTING_ALL",label:"All Alerts and unreachable"},ALARMS_SETTING_ALL_BUT_UNREACHABLE:{value:"ALARMS_SETTING_ALL_BUT_UNREACHABLE",label:"All Alerts"},ALARMS_SETTING_CRITICAL:{value:"ALARMS_SETTING_CRITICAL",label:"Critical only"},ALARMS_SETTING_UNREACHABLE:{value:"ALARMS_SETTING_UNREACHABLE",label:"Unreachable only"}},p={label:"User defined",value:"USER_DEFINED"},v=a(a({},d),{},{USER_DEFINED:p}),m=a(a({},d),{},{ALARMS_SETTING_NONE:{value:"ALARMS_SETTING_NONE",label:"No notifications"}}),g={"^.*$":"input"},b={string:"input"},h=/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g,y="607bfd3c-02c1-4da2-b67a-0d01b518ce5d"},93742:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});var r=n(93433),o=(n(69826),n(41539),n(31672),n(2490),n(59461),n(21249),n(57640),n(9924),n(3689)),a=n(95383),i=function(e){var t=(0,a.J7)().find((function(e){return"All nodes"==e.name}));return t?e?t[e]:t:null};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.all,n=e.internal,i=(0,a.J7)().map((function(e){var t=e.id;return{label:e.name,value:t}})),u=[];return n&&u.push(o.mN),t&&u.push(o.k_),u.push.apply(u,(0,r.Z)(i)),u}},4822:function(e,t,n){"use strict";n.d(t,{dz:function(){return R},D0:function(){return F},tk:function(){return B},I0:function(){return U},by:function(){return _},Sf:function(){return G},TQ:function(){return L}});var r={};n.r(r),n.d(r,{global:function(){return O},specific:function(){return j}});var o={};n.r(o),n.d(o,{global:function(){return I},specific:function(){return k}});var a=n(4942),i=n(84506),u=n(29439),c=(n(92222),n(47042),n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),s=n(37518),l={arr:"arr",bool:"bool",int:"int",val:"val",obj:"obj",dec:"dec"},f=n(45987),d=(n(21249),n(57640),n(9924),n(58591)),p=n(14600),v=["after","before","correlation","utc","forcePlay"],m=["correlation","forcePlay"],g=["highlight"];function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y,S,O=function(){return[function(e){(0,e.onSet)((function(e,t){var n=e.after,r=e.before,o=e.correlation,a=e.utc,i=e.forcePlay,u=(0,f.Z)(e,v),c=t.correlation,s=t.forcePlay,l=(0,f.Z)(t,m);r=n<0?0:r;var b,y=(0,p.E)("default",a||l.utc).offset,S=void 0===y?"":y,O=(b=u.modalParams||l.modalParams)?Object.keys(b).map((function(e){return"".concat(e,"=").concat(b[e])})).join(","):"",w=h(h(h({},l),u),{},{after:n,before:r,offset:S,metrics_correlation:"undefined"===typeof o?c:o,force_play:"undefined"===typeof i?s:i,utc:a,modalParams:O}),A=w.highlight,k=(0,f.Z)(w,g);A.after?(0,d.xs)(h({highlight_after:A.after,highlight_before:A.before},k)):((0,d.xs)(k),(0,d.bp)(["highlight_after","highlight_before"]))}))}]},w=n(71002),A=(n(39714),n(91058),n(54678),n(38862),n(23157),n(74916),n(15306),y={default:function(e){return e?e.split(","):[]}},(0,a.Z)(y,l.arr,(function(e){return e?e.split(","):[]})),(0,a.Z)(y,l.bool,(function(e){return"true"===e})),(0,a.Z)(y,l.int,(function(e){return e?parseInt(e,10):0})),(0,a.Z)(y,l.val,(function(e){return e})),(0,a.Z)(y,l.dec,(function(e){return e?parseFloat(e):0})),(0,a.Z)(y,l.obj,(function(e){return encodeURIComponent(JSON.stringify(e||{}))})),y),k=function(e){var t=e.key,n=e.extraKey,r=void 0===n?"":n;if(!t&&!r)return{};var o="".concat(t,"-").concat(r,"-"),a=(0,d.m$)(),i=[],c=Object.keys(a).reduce((function(e,t){if(!t.startsWith(o))return e;if(t.startsWith(o+o))return i.push(t),e;var n=t.replace(o,""),r=n.split("-").reverse(),c=(0,u.Z)(r,1)[0],s=l[c]?A[c]:A[n]||A.default;return e[n]=s(a[t]),e}),{});return(0,d.bp)(i),c},P=function(e){return e.toString()},Z=(S={default:function(e){return Array.isArray(e)?e.join(","):(e||"").toString()}},(0,a.Z)(S,l.arr,(function(e){return Array.isArray(e)?e.join(","):(e||"").toString()})),(0,a.Z)(S,l.bool,P),(0,a.Z)(S,l.int,P),(0,a.Z)(S,l.val,P),(0,a.Z)(S,l.dec,P),(0,a.Z)(S,l.obj,(function(e){try{JSON.parse(decodeURIComponent(e))}catch(t){return{}}})),S),E=function(e){return Array.isArray(e)?l.arr:"boolean"===typeof e?l.bool:"number"===typeof e?e%1===0?l.int:l.dec:e&&"object"===(0,w.Z)(e)?l.obj:l.val},j=function(e){var t=e.key,n=e.extraKey,r=void 0===n?"":n,o="".concat(t,"-").concat(r,"-");return[function(e){var n=e.setSelf,o=e.trigger,a=e.node,i=e.getLoadable;if("get"===o){if(Object.keys(i(a).contents).length)return;var u=(0,d.m$)();if(Object.keys(u).length)return;setTimeout((function(){return n(k({key:t,extraKey:r}))}))}},function(e){(0,e.onSet)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=Object.keys(e).reduce((function(r,a){var i=a.split("-").reverse()[0],u=i;if(l[u]||(l[u]||(u=E(e[a])),l[u]||(u=E(t[a]))),"undefined"===typeof e[a])return n.push(o+a),delete r[a],r;var c=Z[u]||Z[a]||Z.default,s="".concat(o).concat(a).concat(l[i]?"":"-".concat(u));return r[s]=c(e[a]),r[s]||n.push(s),r}),{});(0,d.xs)(r),(0,d.bp)(n)}))}]};n(9653);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=function(){var e,t=(0,d.m$)(),n=t.after,r=void 0===n?-900:n,o=t.before,a=void 0===o?0:o,i=t.utc,c=void 0===i?"default":i,s=t.highlight_after,l=t.highlight_before,f=t.metrics_correlation,v=void 0!==f&&f,m=t.timezoneName,g=t.modal,b=void 0===g?"":g,h=t.modalTab,y=void 0===h?"":h,S=t.modalParams,O=t.force_play,w=(0,p.E)("default",c),A=w.offset,k=void 0===A?0:A,P=w.utc,Z=w.text,E=m&&"undefined"!==m?m:void 0===Z?"":Z,j={after:isNaN(Number(s))?null:Number(s),before:isNaN(Number(l))?null:Number(l)},x=isNaN(Number(r))?-900:Number(r),I={after:x,before:x<0?0:isNaN(Number(a))?x+900:Number(a),utc:P,offset:k,timezoneName:E,modal:b,modalTab:y};return j.after?(0,d.xs)(C({highlight_after:j.after,highlight_before:j.before,metrics_correlation:v},I)):(0,d.xs)(C({metrics_correlation:v},I)),C(C({highlight:j,correlation:"true"===v,forcePlay:"true"===O},I),{},{modalParams:(e=S,e&&e.split(",").reduce((function(e,t){var n=t.split("="),r=(0,u.Z)(n,2),o=r[0],a=r[1];return e[o]=a,e}),{}))})},T=(0,c.xu)({key:"paramsAtom",default:function(e){return(o[e.key||"global"]||k)(e)},effects:function(e){return(r[e.key||"global"]||j)(e)}});function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e,t,n){if("global"===e)return t;var r=t.split("-").reverse(),o=(0,u.Z)(r,1)[0];return l[o]?t:l[n]?"".concat(t,"-").concat(n):t},R=(0,c.CG)({key:"paramsState",get:function(e){var t=e.key,n=void 0===t?"global":t,r=e.extraKey,o=e.param,a=e.flavour,u=e.merge;return function(e){var t=e.get,c=t(T({key:n,extraKey:r}));if(r&&u&&(c=Object.keys(c).reduce((function(e,t){return"undefined"===typeof c[t]||Array.isArray(c[t])&&!c[t].length||null===c[t]||(e[t]=c[t]),e}),N({},t(T({key:n,extraKey:void 0}))))),o){var s=M(n,o,a);return a||"global"===n?s in c?c[s]:c[o]:(console.warn("Will use val as flavour for",o),c[M(n,o,"val")])}return Object.keys(c).reduce((function(e,t){return e[function(e,t,n){if("global"===e)return t;var r=t.split("-").reverse(),o=(0,i.Z)(r),a=o[0],u=o.slice(1);return l[n||a]&&l[a]?u.reverse().join("-"):t}(n,t,a)]=c[t],e}),{})}},set:function(e){var t=e.key,n=void 0===t?"global":t,r=e.extraKey,o=e.param,i=e.flavour;return function(e,t){var u=e.set;o&&(o=M(n,o,i)),u(T({key:n,extraKey:r}),(function(e){return"function"===typeof t?o?N(N({},e),{},(0,a.Z)({},o,t(e[o]))):N(N({},e),t(e)):o?N(N({},e),{},(0,a.Z)({},o,t)):N(N({},e),t)}))}}}),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.key,r=t.extraKey,o=t.flavour,a=t.defaultValue,i=t.merge,u=(0,c.sJ)(R({key:n,param:e,extraKey:r,flavour:o,merge:i}));return"undefined"===typeof u?a:u},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.key,r=t.extraKey,o=t.flavour;return(0,c.Zl)(R({key:n,param:e,extraKey:r,flavour:o}))},U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.key,r=t.extraKey,o=t.flavour,a=t.defaultValue,i=t.merge;return[_(e,{key:n,extraKey:r,flavour:o,defaultValue:a,merge:i}),L(e,{key:n,extraKey:r,flavour:o})]},B=function(e,t){var n=t.extraKey,r=t.defaultValue,o=t.flavour,a=t.merge,i=(0,s.UL)();return _(e,{key:i,extraKey:n,defaultValue:r,flavour:o,merge:a})},G=function(e,t){var n=t.extraKey,r=t.flavour,o=(0,s.UL)();return L(e,{key:o,extraKey:n,flavour:r})},F=function(e,t){var n=t.extraKey,r=t.defaultValue,o=t.flavour,a=t.merge;return[B(e,{extraKey:n,defaultValue:r,flavour:o,merge:a}),G(e,{extraKey:n,flavour:o})]}},8018:function(e,t,n){"use strict";n.d(t,{Bl:function(){return S},GT:function(){return O},O9:function(){return d},R2:function(){return p},RO:function(){return m},ar:function(){return g},og:function(){return y},qn:function(){return b},tn:function(){return v},xj:function(){return h}});var r=n(84506),o=n(29439),a=(n(41539),n(88674),n(47042),n(93017)),i=n(68008),u=n(13477),c=n(74059),s=n(37518),l=n(25819),f=n(1229),d=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).silent,n=void 0!==t&&t,r=(0,s.tE)(e,"spaceId"),f=(0,a.Z)(),d=(0,o.Z)(f,2),p=d[0],v=d[1],m=(0,u.Iy)("isAnonymous"),g=(0,c.Q6)();return(0,i.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(m||g)return Promise.resolve().then((function(){return!n&&p({header:"Rooms",text:"Connect to cloud to be able to save your settings!"})}));var o=(0,l.R$)(r,e,t);return o.then((function(){return!n&&p({header:"Rooms",text:"Room successfully updated!"})})).catch((function(e){return!e.isCancel&&v(e)})),o}),[e,m,g,r])},p=function(e,t){var n=(0,a.Z)(),r=(0,o.Z)(n,2),u=r[0],c=r[1],f=(0,s.tE)(t,"name");return(0,i.Z)((function(){var n=(0,l.GX)(e,t);return n.then((function(){return u({header:"Rooms",text:"Room ".concat(f," was successfully deleted!")})})).catch((function(e){return!e.isCancel&&c(e)})),n}),[t,e])},v=function(e,t){var n=(0,a.Z)(),c=(0,o.Z)(n,2)[1],d=(0,u.jr)(),v=(0,i.Z)((function(){var n=(0,l.EP)(e,t,d);return n.catch((function(e){return!e.isCancel&&c(e)})),n}),[e,t,d]),m=(0,f.IT)(t,"ids"),g=(0,r.Z)(m),b=g[0],h=g.slice(1),y=p(e,t),S=(0,s.tE)(t,"untouchable");return h.length||b!==d||S?v:y},m=function(e){var t=(0,a.Z)(),n=(0,o.Z)(t,2),r=n[0],u=n[1];return(0,i.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,l.dB)(e,t);return n.then((function(){return r({header:"Rooms",text:"Room ".concat(t.name," was successfully created!")})})).catch((function(e){return!e.isCancel&&u(e)})),n}),[e])},g=function(e,t){var n=(0,a.Z)(),r=(0,o.Z)(n,2),u=r[0],c=r[1];return(0,i.Z)((function(n){var r=(0,l.r7)(e,t,n);return r.then((function(){return u({header:"Rooms",text:"Member".concat(n.length>1?"s":""," successfully added!")})})).catch((function(e){return!e.isCancel&&c(e)})),r}),[e])},b=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.onSuccess,c=n.onFail,f=(0,u.jr)(),d=(0,a.Z)(),p=(0,o.Z)(d,2),v=p[0],m=p[1],g=(0,s.s)(t);return(0,i.Z)((function(){var n=(0,l.r7)(e,t,[f]);return n.then((function(){g({isMember:!0}),v({header:"Rooms",text:"Successfully joined the room"}),null===r||void 0===r||r()})).catch((function(e){!e.isCancel&&m(e),null===c||void 0===c||c()})),n}),[t,g,e])},h=function(e,t){var n=(0,a.Z)(),r=(0,o.Z)(n,2),u=r[0],c=r[1];return(0,i.Z)((function(n){var r=(0,l.EP)(e,t,n);return r.then((function(){return u({header:"Rooms",text:"Member".concat(n.length>1?"s":""," successfully removed!")})})).catch((function(e){return!e.isCancel&&c(e)})),r}),[t,e])},y=function(e,t){var n=(0,a.Z)(),r=(0,o.Z)(n,2),u=r[0],c=r[1];return(0,i.Z)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(0,l.Uf)(e,t,n);return r.then((function(){return u({header:"Rooms",text:"Nodes successfully added!"})})).catch((function(e){return!e.isCancel&&c(e)})),r}),[t,e])},S=function(e){var t=(0,a.Z)(),n=(0,o.Z)(t,2),r=n[0],u=n[1];return(0,i.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,l.OE)(e,t);return n.then((function(){return r({header:"Rooms",text:"Node successfully deleted!"})})).catch((function(e){return!e.isCancel&&u(e)})),n}),[e])},O=function(e,t){var n=(0,a.Z)(),r=(0,o.Z)(n,2),u=r[0],c=r[1];return(0,i.Z)((function(n){var r=(0,l.r4)(e,t,n);return r.then((function(){return u({header:"Rooms",text:"Nodes successfully removed!"})})).catch((function(e){return!e.isCancel&&c(e)})),r}),[t,e])}},99322:function(e,t,n){"use strict";n.d(t,{e:function(){return i},u:function(){return u}});var r=n(4480),o=n(37518),a={ids:(0,r.xu)({key:"roomAlertIds",default:[]}),error:(0,r.xu)({key:"roomAlertError",default:null}),updatedAt:(0,r.xu)({key:"roomAlertsUpdatedAt",default:""}),loaded:(0,r.xu)({key:"roomAlertsLoaded",default:!1})},i=(0,r.CG)({key:"roomAlertState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(a[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(a[n](t),r)}}}),u=function(e){return function(e,t){return(0,r.sJ)(i({id:e,key:t}))}((0,o.UL)(),e)}},25819:function(e,t,n){"use strict";n.d(t,{EP:function(){return E},Fz:function(){return b},GX:function(){return P},Mn:function(){return y},OE:function(){return x},R$:function(){return k},Uf:function(){return j},dB:function(){return w},fv:function(){return A},j2:function(){return O},mP:function(){return I},r4:function(){return C},r7:function(){return Z}});var r=n(4942),o=n(45987),a=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(92222),n(69826),n(31672),n(59461),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),i=n(66152),u=n(53338),c=n(62200),s=n(82902),l=n(78710),f=["nm","capabilities","v"],d=["context","chartType"],p=["name"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){return function(t){var n=t.nodes;return(void 0===n?[]:n).map((function(t){var n,r,a=t.nm,l=t.capabilities,d=t.v,p=(0,o.Z)(t,f);return m(m({name:a,version:d,hasAccessibleData:u.ce[p.state],isOffline:p.state===u.AS.offline,isUnseen:p.state===u.AS.unseen,isLive:u.ez[p.state],updateSeverity:(r=d,(0,s.Ud)(r,c.t5)?"critical":(0,s.Ud)(r,c.OI)?"warning":null),capabilities:l.reduce((function(e,t){return e[t.name]=t,e}),{}),capabilityKeys:l.map((function(e){return e.name}))},(0,i.k5)(p)),{},{labels:p.labels||{},labelKeys:Object.keys(p.labels||{}),id:p.nd||p.mg,nodeStatus:(n=p.state,n===u.AS.offline?"Offline":n===u.AS.unseen?"Unseen":n===u.AS.stale?"Stale":u.ez[n]?"Live":"Unknown"),isPreferred:!!e||p.isPreferred})}))}},b=function(e){var t=e.roomId,n=e.spaceId;return(0,l.Ly)(n)?a.Z.get("/api/v2/nodes",{baseURL:window.envSettings.agentApiUrl,transform:g(!0)}):a.Z.post("/api/v3/spaces/".concat(n,"/rooms/").concat(t,"/nodes"),{scope:{nodes:[]}},{transform:g()})},h=function(e){var t=e.context,n=e.chartType;return m({id:t,name:t,context:t,chartType:void 0===n?"":n},(0,o.Z)(e,d))},y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=r.after,u=r.before;return(0,l.Ly)(e)?a.Z.get("/api/v2/contexts?scope_nodes=".concat(n.join("|")||"*"),{baseURL:window.envSettings.agentApiUrl,transform:function(e){var t=e.contexts,n=void 0===t?{}:t,r=e.versions,o=void 0===r?{}:r;return{results:Object.keys(n).map((function(e){return h(m(m({},(0,i.k5)(n[e])),{},{id:e,context:e}))})),versions:(0,i.k5)(o)}}}):a.Z.post("/api/v3/spaces/".concat(e,"/rooms/").concat(t,"/contexts"),{scope:{contexts:["*"],nodes:n},selectors:{contexts:[],nodes:[]},window:{after:o,before:u}},{transform:function(e){var t=e.contexts,n=void 0===t?{}:t,r=e.versions,o=void 0===r?{}:r;return{results:Object.keys(n).map((function(e){return h(m(m({},(0,i.k5)(n[e])),{},{id:e,context:e}))})),versions:(0,i.k5)(o)}}})},S=function(e,t){return function(n){return{results:n.results.map((function(n){return m(m({},n),{},{spaceId:e,roomId:t})}))}}},O=function(e,t){return a.Z.get("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/dashboards"),{transform:S(e,t)})},w=function(e,t){return a.Z.post("/api/v1/spaces/".concat(e,"/rooms"),t)},A=function(e,t){return a.Z.get("/api/v1/spaces/".concat(e,"/rooms/").concat(t))},k=function(e,t,n){return a.Z.patch("/api/v1/spaces/".concat(e,"/rooms/").concat(t),n)},P=function(e,t){return a.Z.delete("/api/v1/spaces/".concat(e,"/rooms/").concat(t))},Z=function(e,t,n){return a.Z.post("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/members"),n)},E=function(e,t,n){return a.Z.delete("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/members?account_ids=").concat(n))},j=function(e,t,n){return a.Z.post("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/claimed-nodes"),n)},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return a.Z.delete("/api/v1/spaces/".concat(e,"/nodes"),{data:{node_ids:t}})},C=function(e,t,n){return a.Z.delete("/api/v1/spaces/".concat(e,"/rooms/").concat(t,"/claimed-nodes?node_ids=").concat(n))},I=function(e,t,n,u){var c,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=function(e){return e.length?{node_ids:e}:{}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]);return e.length?e.reduce((function(e,t){var n=t.name,r=(0,o.Z)(t,p);return e.provider[n]=r,e}),{filter:m({},t),provider:{}}):{filter:m({},t),provider:{nodes:{},charts:{},spaceroom:{},alerts:{},dashboards:{}}}}(n,u);return a.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/overview/stats"),s,{transform:(c=n,function(e){var t=(0,i.k5)(e,{depth:3}),n=t.results,o=t.providers,a=new Date;return c.reduce((function(e,t){var i=t.name,u=t.projections;return m(m({},e),{},(0,r.Z)({},i,m(m(m({},o.find((function(e){return e.provider===i}))),n["".concat(i,"Stats")]),{},{updatedAt:a},u?(0,r.Z)({},"".concat(u,"_updatedAt"),a):{})))}),{})})})}},91850:function(e,t,n){"use strict";n.d(t,{IV:function(){return u},xh:function(){return c}});var r=n(29439),o=n(4480),a=n(78710),i=n(75674),u=(0,o.cn)({key:"currentRoomSlug",default:null}),c=(0,o.xu)({key:"roomIdBySlug",default:"",effects:function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return(0,a.Ly)(n)&&o===a.Fb?[function(e){var t=e.setSelf;"get"===e.trigger&&t(a.Fb)}]:[]}});t.ZP=(0,o.xu)({key:"room",default:i.Z,effects:function(e){return a.ZP&&e===a.Fb?[function(e){var t=e.setSelf;"get"===e.trigger&&t(a.xZ)}]:[]}})},53338:function(e,t,n){"use strict";n.d(t,{AS:function(){return u},TY:function(){return r},ce:function(){return a},ez:function(){return i},i_:function(){return o}});var r="All nodes",o="all-nodes",a={created:!1,reachable:!0,stale:!0,unreachable:!1},i={created:!0,reachable:!0,stale:!1,unreachable:!1},u={offline:"unreachable",unseen:"created",stale:"stale",live:"reachable"}},5934:function(e,t,n){"use strict";n.d(t,{oq:function(){return l},$3:function(){return v},Mg:function(){return m},ie:function(){return d},L:function(){return p}});var r=n(93433),o=(n(2707),n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(4480)),a=n(91966),i=n.n(a),u=n(47133),c=n(37518),s={ids:(0,o.xu)({key:"roomDashboardIds",default:[]}),loaded:(0,o.xu)({key:"roomDashboardsLoaded",default:!1})},l=(0,o.CG)({key:"roomDashboardState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(s[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){return(0,e.set)(s[n](t),r)}}}),f=function(e,t){return(0,o.sJ)(l({id:e,key:t}))},d=function(){var e=(0,c.UL)();return f(e,"ids")},p=function(){var e=(0,c.UL)();return f(e,"loaded")},v=(0,o.CG)({key:"roomDashboardsState/add",set:function(e){return function(t,n){var o=t.set,a=t.get,i=function(e){return a((0,u.Y3)({id:e,key:"name"}))};o(s.ids(e),(function(e){return(0,r.Z)(new Set([].concat((0,r.Z)(e),[n.id]))).sort((function(e,t){return i(e).localeCompare(i(t),void 0,{sensitivity:"accent",ignorePunctuation:!0})}))}))}}}),m=(0,o.CG)({key:"roomDashboardsState/remove",set:function(e){return function(t,n){(0,t.set)(s.ids(e),(function(e){return i()(e,n)}))}}})},75674:function(e,t){"use strict";t.Z={loaded:!1,fullyLoaded:!1,id:null,isMember:!1,name:"",memberCount:null,nodeCount:null,description:"",private:!1,slug:"",spaceId:null,createdAt:"",untouchable:!0}},1229:function(e,t,n){"use strict";n.d(t,{Ci:function(){return f},r3:function(){return g},e1:function(){return p},lA:function(){return v},GA:function(){return h},IT:function(){return d}});var r=n(93433),o=(n(2707),n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(4480)),a=n(91966),i=n.n(a),u=n(34912),c=n(37518),s={ids:(0,o.xu)({key:"roomMemberIds",default:[]}),error:(0,o.xu)({key:"roomMembersError",default:null}),updatedAt:(0,o.xu)({key:"roomMembersUpdatedAt",default:""}),loaded:(0,o.xu)({key:"roomMembersLoaded",default:!1})},l=n(8018),f=(0,o.CG)({key:"roomMemberState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(s[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(s[n](t),r)}}}),d=function(e,t){return(0,o.sJ)(f({id:e,key:t}))},p=function(){var e=(0,c.UL)();return d(e,"ids")},v=function(){var e=p();return(0,u.Vr)(e)},m=(0,o.CG)({key:"roomMembersState/add",set:function(e){return function(t,n){var o=t.set,a=t.get,i=function(e){return a((0,u.mX)({id:e,key:"name"}))};o(s.ids(e),(function(e){return(0,r.Z)(new Set([].concat((0,r.Z)(e),(0,r.Z)(n)))).sort((function(e,t){return i(e).localeCompare(i(t),void 0,{sensitivity:"accent",ignorePunctuation:!0})}))}))}}}),g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.onSuccess,a=n.onFail,i=(0,l.ar)(e,t);return(0,o._8)((function(e){var n=e.set;return function(e){try{i(e),n(m(t),e),r&&r(e)}catch(o){a&&a(e)}}}),[i,e,r,a])},b=(0,o.CG)({key:"roomMembersState/remove",set:function(e){return function(t,n){return(0,t.set)(s.ids(e),(function(e){return i()(e,n)}))}}}),h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.onSuccess,a=n.onFail,i=(0,l.xj)(e,t);return(0,o._8)((function(e){var n=e.set;return function(e){try{i(e),n(b(t),e),r&&r(e)}catch(o){a&&a(e)}}}),[i,e,t,r,a])}},29495:function(e,t,n){"use strict";n.d(t,{gl:function(){return A},c0:function(){return x},jN:function(){return w},xQ:function(){return O},dh:function(){return E},uA:function(){return P},VP:function(){return j},Y6:function(){return Z}});var r=n(93433),o=n(29439),a=n(15861),i=n(4942),u=n(64687),c=n.n(u),s=(n(21249),n(57640),n(9924),n(41539),n(15581),n(2490),n(34514),n(54747),n(57327),n(88449),n(59849),n(92222),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(4480)),l=n(28721),f=n(8018);n(85827);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=[{id:"system.cpu",context:"system.cpu",dimensions:[],enableAllDimensions:!0,hidden:!1,title:"Total CPU",unit:"percentage"},{id:"system.load",context:"system.load",dimensions:[{id:"load15",name:"load15"}],enableAllDimensions:!1,hidden:!1,title:"Load 15",unit:"load"},{id:"mem.available",context:"mem.available",dimensions:[],enableAllDimensions:!0,hidden:!1,title:"Mem Available",unit:"MiB"},{id:"mem.swap",context:"mem.swap",dimensions:[{id:"free",name:"free"}],enableAllDimensions:!1,hidden:!1,title:"Swap Free",unit:"MiB"},{id:"system.io-in",context:"system.io",dimensions:[{id:"in",name:"in"}],enableAllDimensions:!1,hidden:!1,title:"Disk Reads",unit:"KiB/s"},{id:"system.io-out",context:"system.io",dimensions:[{id:"out",name:"out"}],enableAllDimensions:!1,hidden:!1,title:"Disk Writes",unit:"KiB/s"},{id:"system.net-received",context:"system.net",dimensions:[{id:"InOctets",name:"received"}],enableAllDimensions:!1,hidden:!1,title:"Network In",unit:"kilobits/s"},{id:"system.net-sent",context:"system.net",dimensions:[{id:"OutOctets",name:"sent"}],enableAllDimensions:!1,hidden:!1,title:"Network Out",unit:"kilobits/s"}].reduce((function(e,t){return p(p({},e),{},(0,i.Z)({},t.id,t))}),{}),m={id:null,title:"",context:"",unit:"",dimensions:[],enableAllDimensions:!1,hidden:!1},g=(0,s.xu)({key:"roomMetricIds",default:Object.keys(v)}),b=(0,s.xu)({key:"roomMetrics",default:function(e){var t=e.id;return v[t]||{}}});function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S=(0,s.CG)({key:"roomMetricState",get:function(e){var t=e.id,n=e.roomId,r=e.key;return function(e){var o=(0,e.get)(b({id:t,roomId:n}));return r?o[r]:o}},set:function(e){var t=e.id,n=e.roomId,r=e.key;return function(e,o){var a=e.set;return r?"function"===typeof o?a(b({id:t,roomId:n}),(function(e){return y(y({},e),{},(0,i.Z)({},r,o(e[r])))})):void a(b({id:t,roomId:n}),(function(e){return y(y({},e),{},(0,i.Z)({},r,o))})):a(b({id:t,roomId:n}),"function"===typeof o?o:y(y({},m),o))}}}),O=function(e,t,n){return(0,s.sJ)(S({id:t,roomId:e,key:n}))},w=function(e,t){return(0,s.rb)(b({id:t,roomId:e}))},A=(0,s.CG)({key:"roomMetricIdsState",get:function(e){return function(t){return(0,t.get)(g(e))}},set:function(e){return function(t,n){var r=t.set;r(g(e),n.map((function(e){return e.id}))),n.forEach((function(t){return r(b({roomId:e,id:t.id}),t)}))}}}),k=(0,s.CG)({key:"roomMetricsState",get:function(e){return function(t){var n=t.get;return n(A(e)).map((function(t){return n(b({id:t,roomId:e}))}))}}}),P=function(e){return(0,s.sJ)(k(e))},Z=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldPersist,n=void 0===t||t,r=(0,f.O9)(e,{silent:!0});return(0,s._8)((function(t){var i=t.set,u=t.snapshot;return function(){var t=(0,a.Z)(c().mark((function t(a){var s,l,f,d,p,v,m,g,b=arguments;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(s=b.length,l=new Array(s>1?s-1:0),f=1;f<s;f++)l[f-1]=b[f];if(d=1===l.length?[l[0]]:l,p=(0,o.Z)(d,2),v=p[0],m=p[1],i(S({roomId:e,id:a,key:v}),m),n){t.next=5;break}return t.abrupt("return");case 5:return t.prev=5,t.next=8,u.map((function(t){return(0,t.set)(S({roomId:e,id:a,key:v}),m)})).getPromise(k(e));case 8:return g=t.sent,t.next=11,r({metrics:g});case 11:t.next=21;break;case 13:return t.prev=13,t.t0=t.catch(5),t.t1=i,t.t2=S({roomId:e,id:a,key:v}),t.next=19,u.getPromise(S({roomId:e,id:a,key:v}));case 19:t.t3=t.sent,(0,t.t1)(t.t2,t.t3);case 21:case"end":return t.stop()}}),t,null,[[5,13]])})));return function(e){return t.apply(this,arguments)}}()}),[e])},E=function(e){return[P(e),Z(e)]},j=function(e){var t=(0,f.O9)(e);return(0,s._8)((function(n){var o=n.set,i=n.snapshot;return function(){var n=(0,a.Z)(c().mark((function n(a){var u,s,f,d,p;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u="new"===a.id,n.next=3,i.getPromise(k(e));case 3:return s=n.sent,f=s.filter((function(e){return e.id!==a.id})),d=u?y(y({},a),{},{id:(0,l.Z)()}):a,p=[].concat((0,r.Z)(f),[d]),n.next=9,t({metrics:p});case 9:o(S({roomId:e,id:d.id}),d),u&&o(g(e),(function(e){return[].concat((0,r.Z)(e),[d.id])}));case 11:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}),[e])},x=function(e){var t=(0,f.O9)(e,{silent:!0});return(0,s._8)((function(n){var r=n.set,o=n.reset,i=n.snapshot;return function(){var n=(0,a.Z)(c().mark((function n(a){var u,s;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.getPromise(k(e));case 2:return u=n.sent,s=u.filter((function(e){return e.id!==a})),n.next=6,t({metrics:s});case 6:r(g(e),(function(e){return e.filter((function(e){return e!==a}))})),o(b({roomId:e,id:a}));case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}),[e])}},96929:function(e,t,n){"use strict";n.d(t,{kY:function(){return m},Nj:function(){return b},iB:function(){return A},zN:function(){return S},fD:function(){return O},Ww:function(){return Z},nI:function(){return E},X7:function(){return g},IW:function(){return y}});var r=n(15861),o=n(93433),a=n(64687),i=n.n(a),u=(n(85827),n(41539),n(25387),n(2490),n(72608),n(21249),n(57640),n(9924),n(15581),n(34514),n(54747),n(26699),n(32023),n(2707),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(4480)),c=n(91966),s=n.n(c),l=n(97945),f=n(37518),d=n(8018),p={ids:(0,u.xu)({key:"roomNodeIds",default:[]}),error:(0,u.xu)({key:"roomNodesError",default:null}),updatedAt:(0,u.xu)({key:"roomNodesUpdatedAt",default:""}),loaded:(0,u.xu)({key:"roomNodesLoaded",default:!1})},v={nodes:(0,u.xu)({key:"roomNodesOptions",default:[]}),error:(0,u.xu)({key:"roomNodesOptionsError",default:null}),loaded:(0,u.xu)({key:"roomNodesOptionsLoaded",default:!1})},m=(0,u.CG)({key:"roomNodeState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(p[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){return(0,e.set)(p[n](t),r)}}}),g=function(e,t){return(0,u.sJ)(m({id:e,key:t}))},b=(0,u.CG)({key:"roomNodesOptions",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(v[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(v[n](t),r)}}}),h=(0,u.CG)({key:"roomsNodesOptions",get:function(e){return function(t){var n=t.get;return null!==e&&void 0!==e&&e.length?e.reduce((function(e,t){var r=e.map((function(e){return e.value}));return n(b({id:t,key:"nodes"})).forEach((function(t){r.includes(t.value)||e.push(t)})),e}),[]):[]}}}),y=function(e){return(0,u.sJ)(h(e))},S=function(){var e=(0,f.UL)();return g(e,"ids")},O=function(){var e=(0,f.UL)();return g(e,"loaded")},w=(0,u.CG)({key:"roomNodesState/add",get:function(){return function(){return null}},set:function(e){return function(t,n){var r=t.set,a=t.get,i=function(e){return a((0,l.zP)({id:e,key:"name"}))};r(p.ids(e),(function(e){return(0,o.Z)(new Set([].concat((0,o.Z)(e),(0,o.Z)(n)))).sort((function(e,t){return i(e).localeCompare(i(t),void 0,{sensitivity:"accent",ignorePunctuation:!0})}))})),r(p.updatedAt(e),"")}}}),A=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.onSuccess,c=n.onFail,s=(0,d.og)(e,t);return(0,u._8)((function(e){var n=e.set;return function(){var e=(0,r.Z)(i().mark((function e(r){var u,l,f,d=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(d.length>1&&void 0!==d[1]?d[1]:{}).makeCallback,l=void 0===u||u,e.prev=1,e.next=4,s(r);case 4:(f=e.sent)&&r.reduce((function(e,t,n){var r;return null!==(r=f[n])&&void 0!==r&&r.errorCode?e:[].concat((0,o.Z)(e),[t])}),[]),n(w(t),r),l&&a&&a(r),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),l&&c&&c(r);case 13:case"end":return e.stop()}}),e,null,[[1,10]])})));return function(t){return e.apply(this,arguments)}}()}),[s,e,a,c])},k=(0,u.CG)({key:"roomNodesState/obsolete",get:function(){return function(){return null}},set:function(e){var t=e.roomId,n=e.nodeIds;return function(e){var r=e.set;r(p.ids(t),(function(e){return s()(e,n)})),r(p.updatedAt(t),"")}}}),P=(0,u.CG)({key:"roomNodesState/remove",get:function(){return function(){return null}},set:function(e){return function(t,n){var r=t.set;r(p.ids(e),(function(e){return s()(e,n)})),r(p.updatedAt(e),"")}}}),Z=function(e,t){var n=(0,d.Bl)(e);return(0,u._8)((function(e){var o=e.set;return function(){var e=(0,r.Z)(i().mark((function e(r){var a,u,c,s=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(a=s.length>1&&void 0!==s[1]?s[1]:{}).onSuccess,c=a.onFail,e.prev=1,e.next=4,n(r);case 4:r.map((function(e){o((0,l.zP)({id:e,key:"state"}),"deleted")})),t.map((function(e){o(k({roomId:e,nodeIds:r}))})),u&&u(r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),c&&c();case 12:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()}),[n,e])},E=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.onSuccess,a=n.onFail,c=(0,d.GT)(e,t);return(0,u._8)((function(e){var n=e.set;return function(){var e=(0,r.Z)(i().mark((function e(r){var u,s,l,f=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=(u=f.length>1&&void 0!==f[1]?f[1]:{}).onSuccess,l=u.onFail,e.prev=1,e.next=4,c(r);case 4:n(P(t),r),o&&o(r),s&&s(),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(1),a&&a(r),l&&l();case 13:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t){return e.apply(this,arguments)}}()}),[c,e,t,o,a])}},37518:function(e,t,n){"use strict";n.d(t,{ZB:function(){return Z},n2:function(){return j},Dq:function(){return I},jW:function(){return F},UL:function(){return L},A3:function(){return B},vf:function(){return M},Hm:function(){return U},Jb:function(){return G},IX:function(){return N},iC:function(){return D},HM:function(){return _},tE:function(){return x},TF:function(){return R},s:function(){return C}});var r=n(15861),o=n(4942),a=n(45987),i=n(64687),u=n.n(i),c=(n(41539),n(15581),n(2490),n(34514),n(54747),n(57327),n(88449),n(59849),n(92222),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(4480)),s=n(95383),l=n(74059),f=n(53338),d=n(4474),p=n(91850),v=n(75674),m=n(8018),g=n(83338),b=n(29495),h=n(67294),y=n(19368),S=n(23383),O=n(71172),w=function(e){var t="".concat((0,y.P)()).concat((0,S.e)(e));return(0,h.useCallback)((function(e){return(0,O.c)({key:t,handleResults:function(t){return t.results.concat(e)}})}),[t])},A=["settings","metrics"];function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Z=(0,c.CG)({key:"roomInitialize",get:function(e){return function(t){return(0,t.get)((0,p.ZP)(e))}},set:function(e){return function(t,n){var r=t.set,o=n.settings,i=n.metrics,u=(0,a.Z)(n,A);r((0,p.ZP)(e),(function(e){return P(P(P({},v.Z),e),u)})),r((0,p.xh)([u.spaceId,u.slug]),e),o&&r((0,g.Z)(e),(function(e){return P(P({},e),o)})),i&&r((0,b.gl)(e),i)}}}),E=(0,c.CG)({key:"roomsInitialize",get:function(){return function(){return null}},set:function(){return function(e,t){var n=e.set;t.forEach((function(e){n(Z(e.id),e)}))}}}),j=(0,c.CG)({key:"roomState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,p.ZP)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,r){var a=e.set;a((0,p.ZP)(t),n?"function"!==typeof r?function(e){return P(P({},e),{},(0,o.Z)({},n,r))}:function(e){return P(P({},e),{},(0,o.Z)({},n,r(e[n])))}:P(P({},v.Z),r))}},reset:function(e){var t=e.id,n=e.key;return function(e,r){var a=e.reset,i=e.set;n?i((0,p.ZP)(t),"function"!==typeof r?function(e){return P(P({},e),{},(0,o.Z)({},n,r))}:function(e){return P(P({},e),{},(0,o.Z)({},n,r(e[n])))}):a((0,p.ZP)(t))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),x=function(e,t){return(0,c.sJ)(j({id:e,key:t}))},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.key,a=t.shouldPersist,i=t.onSuccess,s=t.onFail,l=(0,c.Zl)(j({id:e,key:n})),f=(0,m.O9)(e);return(0,c._8)((function(t){var c=t.snapshot;return function(){var t=(0,r.Z)(u().mark((function t(r){var d,p;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d=n?(0,o.Z)({},n,r):r,l((function(e){return P(P({},e),d)})),a){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,c.getPromise(j({id:e}));case 6:return p=t.sent,t.prev=7,t.next=10,f(d);case 10:i&&i(r),t.next=17;break;case 13:t.prev=13,t.t0=t.catch(7),l(n?p[n]:p),s&&s(r);case 17:case"end":return t.stop()}}),t,null,[[7,13]])})));return function(e){return t.apply(this,arguments)}}()}),[e,n,a,i,s])},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.onSuccess,o=t.onFail,a=(0,m.RO)(e),i=w(e);return(0,c._8)((function(t){var c=t.set;return function(){var t=(0,r.Z)(u().mark((function t(r){var l,f,d;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a(r);case 3:return l=t.sent,f=l.data,d=P(P(P({},r),{},{spaceId:e},f),{},{loaded:!0}),t.next=8,i(d);case 8:c(E(),[d]),c((0,s.oC)(e),d),n&&n(d),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(0),o&&o(r);case 16:case"end":return t.stop()}}),t,null,[[0,13]])})));return function(e){return t.apply(this,arguments)}}()}),[a,e,n,o,i])},T=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.onSuccess,a=n.onFail,i=(0,c.rb)(j({id:e})),l=x(e,"spaceId");return(0,c._8)((function(n){var c=n.snapshot,f=n.set,v=n.reset;return(0,r.Z)(u().mark((function n(){var r,m,g;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.getPromise(j({id:e}));case 2:return r=n.sent,n.next=5,c.getPromise((0,s.q3)({id:r.spaceId}));case 5:return m=n.sent,g=(0,d.rZ)(m.filter((function(t){return t.id!==e}))),n.prev=7,n.next=10,t();case 10:v((0,p.xh)([l,r.slug])),f(p.IV,g),f((0,s.v0)(l),r.id),i(),o&&o(r),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(7),a&&a(r);case 20:case"end":return n.stop()}}),n,null,[[7,17]])})))}),[t,l,e,o,a])},D=function(e,t){var n=x(e,"spaceId"),r=(0,m.tn)(n,e);return T(e,r,t)},N=function(e,t){var n=x(e,"spaceId"),r=(0,m.R2)(n,e);return T(e,r,t)},M=function(){return(0,c.sJ)(p.IV)},R=function(e){return(0,c.Zl)(p.IV,e)},_=function(e,t){return(0,c.sJ)((0,p.xh)([e,t]))},L=function(e){var t=(0,l.th)(),n=M();return _(t,e||n)},U=function(e){var t=L();return x(t,e)},B=function(){var e=(0,l.uk)(),t=M();return e&&t&&"/spaces/".concat(e,"/rooms/").concat(t)},G=function(){return(0,s.J7)().filter((function(e){return e.slug===f.i_}))[0]||{id:""}},F=function(){var e=G().id,t=void 0===e?"":e;return"member"===(0,l.OS)("roleInSpace")&&!!t}},83338:function(e,t,n){"use strict";var r=n(4480);t.Z=(0,r.xu)({key:"roomSettings",default:{groupMode:""}})},310:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var r=function(e,t){return t.untouchable?1:e.untouchable?-1:e.name.localeCompare(t.name,void 0,{sensitivity:"accent",ignorePunctuation:!0})}},30266:function(e,t,n){"use strict";n.d(t,{$F:function(){return b},A6:function(){return g},NX:function(){return p},Ns:function(){return v},Q0:function(){return y},oq:function(){return d},wh:function(){return m}});var r=n(4942),o=n(45987),a=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),i=n(66152),u=n(62200),c=n(64358),s=["permissions"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(){return a.Z.get(u.MC,{transform:function(e){return e.map((function(e){var t=e.permissions;return f(f({},(0,o.Z)(e,s)),{},{permissions:t.reduce((function(e,t){return f(f({},e),{},(0,r.Z)({},t,t))}),{})})}))}})},p=function(e){return a.Z.get("/api/v3/spaces/slug/".concat(e))},v=function(e){return a.Z.delete("/api/v1/spaces/".concat(e))},m=function(e){return a.Z.post("/api/v1/spaces",{name:e})},g=function(e,t){return a.Z.post("/api/v1/spaces/default",{email:t},{headers:{"Netdata-Account-Id":e}})},b=function(e,t){return a.Z.patch("/api/v1/spaces/".concat(e),t)},h=function(e){return function(t){return t.map((function(t){return f(f({},(0,i.k5)(t)),{},{spaceId:e})}))}},y=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultParam,n=void 0!==t&&t;return a.Z.get((0,c.W)({spaceId:e}),{params:{default:n},transform:h(e)})}},58502:function(e,t,n){"use strict";n.d(t,{$V:function(){return i},E3:function(){return a},bo:function(){return u}});var r=n(4480),o=n(78710),a={createdAt:"",description:"",iconURL:"",id:"",error:null,loaded:!1,name:"",slug:""},i=(0,r.cn)({key:"currentSpaceSlug",default:null}),u=(0,r.xu)({key:"spaceIdBySlug",default:"",effects:function(e){return o.ZP&&e===o.Xh?[function(e){var t=e.setSelf;"get"===e.trigger&&t(o.HM)}]:[]}});t.ZP=(0,r.xu)({key:"space",default:a,effects:function(e){return(0,o.Ly)(e)?[function(e){var t=e.setSelf;"get"===e.trigger&&t(o.aD)}]:[]}})},49489:function(e,t,n){"use strict";n.d(t,{C6:function(){return u},FC:function(){return o},Fi:function(){return i},Hh:function(){return c},Vc:function(){return r},go:function(){return a}});var r={free:{level:0,title:"Community",features:{2023.11:["Max 5 Active Connected Nodes","Max 1 Active Custom Dashboards (per Room)"]}},earlyBird:{level:0,title:"Early Bird",features:{2023.02:['"Member" role available with existing permissions.','"Member" role with access to _All Nodes_ room.']}},pro:{level:10,title:"Pro",features:{2023.02:["7 days of alert history and auditing events.",'Unlock the "Troubleshooter" role and add members to the space without providing management permission.',"Enable webhook alert notification integration."]}},business:{level:20,title:"Business",features:{2023.02:["Up-to 90 days of alert history and topology events. Never miss an important event while troubleshooting.",'Unlock all user roles including "Manager", "Observer" and "Billing". Empower your teams to excel.',"Enable alert notification integrations (Slack, PagerDuty and more)."]}},enterprise:{features:{2023.11:["Host Netdata Cloud and all its components completely on your premises","Ideal for monitoring air gapped facilities and critical infrastructure","Enable the customization that your organization requires"]}}},o=["year","month"],a={year:"yearly",month:"monthly"},i={ErrInvalidPromotionCode:"Promotion code is invalid",ErrInactivePromotionCode:"Promotion code is inactive",ErrInvalidPromotionCodePlan:"Promotion code cannot be applied to this plan"},u="planEnrolmentError",c={free:{2023.11:{maxNodes:5,maxDashboards:1}}}},80699:function(e,t,n){"use strict";var r=n(29439),o=n(67294),a=n(49489);t.Z=function(){var e=(0,o.useState)(localStorage.getItem(a.C6)),t=(0,r.Z)(e,2),n=t[0],i=t[1];return{isFailure:n,setFailure:(0,o.useCallback)((function(){i(!0),localStorage.setItem(a.C6,!0)}),[]),reset:(0,o.useCallback)((function(){i(!1),localStorage.removeItem(a.C6)}),[])}}},46585:function(e,t,n){"use strict";n.d(t,{Eu:function(){return o},Pf:function(){return a},Qy:function(){return i},T$:function(){return u}});var r=n(67294),o="SPACE_NOT_FOUND",a=5,i=20,u={delete:r.createElement(r.Fragment,null,"Cannot delete last space of account.",r.createElement("br",null),"You can delete your account instead."),leave:r.createElement(r.Fragment,null,"Cannot leave last space of account.",r.createElement("br",null),"You can delete your account instead.")}},57079:function(e,t,n){"use strict";var r=(0,n(4480).cn)({key:"publicSpacesAtom",default:[]});t.Z=r},95383:function(e,t,n){"use strict";n.d(t,{r1:function(){return f},q3:function(){return b},Ad:function(){return l},oC:function(){return m},v0:function(){return g},J7:function(){return y},yE:function(){return v},Gn:function(){return p},WY:function(){return h},y3:function(){return d}});var r=n(93433),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(26833),n(2707),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(4480)),a=n(37518),i=n(74059),u=n(78710),c={ids:(0,o.xu)({key:"spaceRoomIds",default:[],effects:function(e){return(0,u.Ly)(e)?[function(e){var t=e.onSet,n=e.trigger,o=e.setSelf;"get"===n&&o([u.Fb]),t((function(e){o([u.Fb].concat((0,r.Z)(e)))}))}]:[]}}),updatedAt:(0,o.xu)({key:"spaceRoomsUpdatedAt",default:""}),loaded:(0,o.xu)({key:"spaceRoomsLoaded",default:!1,effects:function(e){return(0,u.Ly)(e)?[function(e){var t=e.trigger,n=e.setSelf;"get"===t&&n(!0)}]:[]}})},s=n(310),l=(0,o.CG)({key:"spaceRoomState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(c[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(c[n](t),r)}}}),f=function(e,t){Object.values(c).forEach((function(n){return e(n(t))}))},d=function(e,t){return(0,o.sJ)(l({id:e,key:t}))},p=function(e){var t=(0,i.th)();return d(t,e)},v=function(){var e=(0,i.th)();return d(e,"ids")},m=(0,o.CG)({key:"spaceRoomsState/add",get:function(){return function(){return null}},set:function(e){return function(t,n){var o=t.set,i=t.get,u=function(e){return i((0,a.n2)({id:e}))};o(l({id:e,key:"ids"}),(function(e){return(0,r.Z)(new Set([].concat((0,r.Z)(e),[n.id]))).sort((function(e,t){return(0,s.y)(u(e),u(t))}))})),o(l({id:e,key:"loaded"}),!0),o(l({id:e,key:"updatedAt"}),"")}}}),g=(0,o.CG)({key:"spaceRoomsState/remove",get:function(){return function(){return null}},set:function(e){return function(t,n){var r=t.set;r(l({id:e,key:"ids"}),(function(e){return e.filter((function(e){return e!==n}))})),r(l({id:e,key:"loaded"}),!0),r(l({id:e,key:"updatedAt"}),"")}}}),b=(0,o.CG)({key:"spaceFullRooms",get:function(e){var t=e.id,n=e.key;return function(e){var r=e.get;return r(l({id:t,key:"ids"})).map((function(e){return r((0,a.n2)({id:e,key:n}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),h=function(e,t){return(0,o.sJ)(b({id:e,key:t}))},y=function(e){var t=(0,i.th)();return h(t,e)}},74059:function(e,t,n){"use strict";n.d(t,{BN:function(){return b},YH:function(){return g},U7:function(){return m},st:function(){return p},Iw:function(){return O},th:function(){return k},uk:function(){return w},OS:function(){return Z},Zu:function(){return E},$v:function(){return A},VZ:function(){return S},Q6:function(){return P},vu:function(){return h},GM:function(){return y}});var r=n(4942),o=n(93433),a=(n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(15581),n(2490),n(34514),n(54747),n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(4480)),i=n(78710),u=n(49674),c={ids:(0,a.cn)({key:"spaceIds",default:[],effects:i.ZP?[function(e){var t=e.onSet,n=e.trigger,r=e.setSelf;"get"===n&&r([i.HM]),t((function(e){r([i.HM].concat((0,o.Z)(e)))}))}]:[]}),error:(0,a.cn)({key:"spacesError",default:null}),updatedAt:(0,a.cn)({key:"spacesUpdatedAt",default:""}),loaded:(0,a.cn)({key:"spacesLoaded",default:!1,effects:[function(e){var t,n=e.trigger,r=e.setSelf;null!==(t=(0,e.getLoadable)(u.Z).contents)&&void 0!==t&&t.isAnonymous&&"get"===n&&r(!0)}]})},s=n(58502),l=n(57079);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=(0,a.CG)({key:"spacesState",get:function(e){return function(t){return(0,t.get)(c[e])}},set:function(e){return function(t,n){(0,t.set)(c[e],n)}}}),v=(0,a.nZ)({key:"availableSpaceIds",get:function(e){var t=e.get,n=t(p("ids")),r=t(l.Z);return(0,o.Z)(new Set([].concat((0,o.Z)(n),(0,o.Z)(r))))}}),m=(0,a.CG)({key:"spaceState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,s.ZP)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){var a=e.set;a((0,s.ZP)(t),n?"function"!==typeof o?function(e){return d(d({},e),{},(0,r.Z)({},n,o))}:function(e){return d(d({},e),{},(0,r.Z)({},n,o(e[n])))}:d(d({},s.E3),o))}}}),g=(0,a.CG)({key:"spaceIdBySlugState",get:function(e){return function(t){return(0,t.get)((0,s.bo)(e))}},set:function(){return function(e,t){var n=e.set;t.forEach((function(e){n((0,s.bo)(e.slug),e.id)}))}}}),b=(0,a.nZ)({key:"currentSpaceIdState",get:function(e){var t=e.get,n=t(s.$V);return t(g(n))}}),h=function(e,t){return(0,a.sJ)(m({id:e,key:t}))},y=function(e){return(0,a.sJ)(p(e))},S=function(e){return(0,a.sJ)(g(e))},O=function(){return(0,a.sJ)(v)},w=function(){return(0,a.sJ)(s.$V)},A=function(e){return(0,a.Zl)(s.$V,e)},k=function(){return(0,a.sJ)(b)},P=function(){return(0,i.Ly)(k())},Z=function(e){var t=k();return h(t,e)},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,a._8)((function(t){var n=t.snapshot;return function(){return e.map((function(e){return n.getLoadable(m({id:e})).contents}))}}))()}},32950:function(e,t,n){"use strict";var r=n(74059),o=n(94979),a=n(46585),i=n(78710);t.Z=function(){var e=(0,o.V)(),t=(0,r.VZ)(e),n=(0,r.vu)(t||a.Eu),u=(0,r.GM)("error");return(0,i.Ly)(t)?{isFetching:!1,hasAccess:!0}:{isFetching:!!e&&!n.loaded&&!u&&!n.error,hasAccess:n.loaded&&!u&&!n.error}}},94979:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z},V:function(){return P}});var r=n(93433),o=n(4942),a=n(45987),i=n(15861),u=n(29439),c=n(64687),s=n.n(c),l=(n(85827),n(41539),n(25387),n(2490),n(72608),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),f=n(89250),d=n(30266),p=n(67294),v=n(74059),m="/spaces/:spaceSlug/*",g=n(13477),b=n(33335),h=n(57079),y=n(46585),S=n(16634),O=n(78710),w=["id","permissions"];function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=function(){var e;return null===(e=(0,f.bS)(m))||void 0===e||null===(e=e.params)||void 0===e?void 0:e.spaceSlug},Z=function(){var e=function(){var e=(0,f.bS)(m),t=((null===e||void 0===e?void 0:e.params)||{}).spaceSlug,n=(0,v.$v)(),r=(0,v.uk)();return(0,p.useEffect)((function(){r!==t&&n(t)}),[r,t]),t}(),t=(0,p.useState)(null),n=(0,u.Z)(t,2),c=n[0],A=n[1],P=(0,g.Iy)("isAnonymous"),Z=(0,l._8)((function(t){var n=t.set;return(0,i.Z)(s().mark((function t(){var i,u,c,l,f;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,d.NX)(e);case 3:i=t.sent,u=i.data,c=u.id,l=u.permissions,f=(0,a.Z)(u,w),n((0,b.SX)(c),l.reduce((function(e,t){return k(k({},e),{},(0,o.Z)({},t,t))}),{})),n((0,v.U7)({id:c}),(function(e){return k(k(k({},e),f),{},{loaded:!0})})),n((0,v.YH)(),[{id:c,slug:e}]),n(h.Z,(function(e){return(0,r.Z)(new Set([].concat((0,r.Z)(e),[c])))})),P&&n((0,v.st)("loaded"),!0),t.next=17;break;case 13:t.prev=13,t.t0=t.catch(0),n((0,v.U7)({id:y.Eu}),(function(e){return k(k({},e),{},{error:(0,S.Z)(t.t0)})})),A(t.t0);case 17:case"end":return t.stop()}}),t,null,[[0,13]])})))}),[P,e]);return(0,p.useEffect)((function(){O.ZP&&e===O.Xh||e&&Z()}),[Z,e]),c}},23383:function(e,t,n){"use strict";n.d(t,{e:function(){return s}});var r=n(68035),o=n(37518),a=n(30266),i=n(95383),u=n(310),c=n(78710),s=function(e){return"spaces.".concat(e,".rooms")};t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.autorun,l=void 0===n||n,f=t.polling,d=void 0===f||f;return(0,r.Z)((function(){return{key:s(e),autorun:l&&!!e,polling:d,fetch:function(){return(0,a.Q0)(e)},association:{getIds:function(){return(0,i.Ad)({id:e,key:"ids"})},getLoaded:function(){return(0,i.Ad)({id:e,key:"loaded"})},getUpdatedAt:function(){return(0,i.Ad)({id:e,key:"updatedAt"})}},sort:u.y,getResource:o.ZB,pollingOptions:{pollingInterval:69e3},force:!c.ZP}}),[e])}},22648:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(14348),o=function(){return(0,r.Z)("(max-width: 767px)")}},5429:function(e,t,n){"use strict";var r=n(29439),o=(n(41539),n(88674),n(17727),n(67294)),a=function(){};t.Z=function(e,t){var n=(0,o.useMemo)(e,t),i=n.fetch,u=n.enabled,c=void 0===u||u,s=n.initialValue,l=n.onFail,f=void 0===l?a:l,d=n.onSettle,p=void 0===d?a:d,v=n.onSuccess,m=void 0===v?a:v,g=n.isDefaultLoading,b=void 0!==g&&g,h=(0,o.useState)(s),y=(0,r.Z)(h,2),S=y[0],O=y[1],w=(0,o.useState)(b),A=(0,r.Z)(w,2),k=A[0],P=A[1],Z=(0,o.useState)(null),E=(0,r.Z)(Z,2),j=E[0],x=E[1],C=(0,o.useRef)(!0);return(0,o.useEffect)((function(){if(c){O(s),P(!0),x(null);var e=i();return e.then((function(e){var t=e.data;C.current&&(O(t),m(t))})).catch((function(e){C.current&&(e.isCancel||(x(e),f(e)))})).finally((function(){C.current&&(P(!1),p())})),function(){var t;return null===e||void 0===e||null===(t=e.cancel)||void 0===t?void 0:t.call(e)}}}),t),(0,o.useEffect)((function(){return function(){return C.current=!1}}),[]),[S,k,j]}},6308:function(e,t,n){"use strict";n.d(t,{c:function(){return u}});n(74916),n(77601),n(85827),n(41539),n(25387),n(2490),n(72608);var r=n(89250),o=n(74059),a=n(95383),i=n(78710),u=function(){var e=(0,r.TH)().pathname;return{isIntegrationsPath:/integrate-anything$/.test(e)}};t.Z=function(){var e=(0,o.th)(),t=(0,a.WY)(e,"nodeCount").reduce((function(e,t){return t>e?t:e}),0),n=(0,a.Gn)("loaded"),r=(0,i.Ly)(e);return[!r&&n&&0===t,!r&&e&&!n,t]}},68008:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e,t){var n=(0,r.useRef)();return(0,r.useCallback)((function(){var t,r;return n.current&&(null===(t=(r=n.current).cancel)||void 0===t||t.call(r)),n.current=e.apply(void 0,arguments),n.current}),t)}},23109:function(e,t,n){"use strict";var r=n(29439),o=(n(38862),n(47941),n(67294)),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=localStorage.getItem(e);return n?JSON.parse(n):t};t.Z=function(e,t){var n=(0,o.useState)((function(){return a(e,t)})),i=(0,r.Z)(n,2),u=i[0],c=i[1];return(0,o.useEffect)((function(){return localStorage.setItem(e,JSON.stringify(u))}),[u]),[u,c]}},14348:function(e,t,n){"use strict";var r=n(29439),o=n(67294),a=function(e){var t;return"function"===typeof(null===(t=window)||void 0===t?void 0:t.matchMedia)&&window.matchMedia(e).matches};t.Z=function(e){var t=(0,o.useState)((function(){return a(e)})),n=(0,r.Z)(t,2),i=n[0],u=n[1];function c(){u(a(e))}return(0,o.useEffect)((function(){if("function"===typeof window.matchMedia){var t=window.matchMedia(e);return c(),t.addListener?t.addListener(c):t.addEventListener("change",c),function(){t.removeListener?t.removeListener(c):t.removeEventListener("change",c)}}}),[e]),i}},9872:function(e,t,n){"use strict";var r=n(67294);t.Z=function(){var e=(0,r.useRef)(!1);return(0,r.useEffect)((function(){return e.current=!0,function(){return e.current=!1}}),[]),e}},93017:function(e,t,n){"use strict";var r=n(4942),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(67294)),a=n(52631),i=n(74855);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=(0,o.useRef)({}),n=(0,o.useCallback)((function(n){var r=(0,i.sc)(c(c({},n),{},{success:!0}));t.current[e]&&a.Z.dismiss(t.current[e]),t.current[e]=a.Z.success(r)}),[]),r=(0,o.useCallback)((function(n){var r,o=null===n||void 0===n||null===(r=n.response)||void 0===r?void 0:r.data,u=(0,i.t_)(null!==o&&void 0!==o&&o.errorMessage?o:c({errorMessage:n.message,errorMsgKey:n.message},n));t.current[e]&&a.Z.dismiss(t.current[e]),t.current[e]=a.Z.error(u)}),[]),u=(0,o.useCallback)((function(e){return e.forEach(r)}),[]);return[n,r,u]}},76201:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(67294),o=n(89250),a=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.href;null!==(e=window.posthog)&&void 0!==e&&e.__loaded&&window.posthog.capture("$pageview",{$current_url:t})};t.Z=function(){var e=(0,o.TH)().pathname;(0,r.useEffect)((function(){a()}),[e])}},95192:function(e,t,n){"use strict";n.d(t,{Z:function(){return c},$:function(){return u}});var r=n(24678),o=n(50308),a=n.n(o),i=function(e){if(!e)throw new Error("Please pass a name for the idb store");var t=(0,r.MT)(e,"".concat(e,"-cache")),n=function(e,n){return(0,r.t8)(e,function(e){return{value:e,timestamp:Date.now()}}(n),t).catch(a())};return{store:t,set:n,get:function(e){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=i.fetch,c=i.maxAge,s=void 0===c?86400:c,l=(0,r.U2)(e,t).then((function(t){var r=1e3*s;return t&&t.timestamp+r>Date.now()?t.value:u?(o=u()).then((function(t){return n(e,t),t})):null})).catch(a());return l.abort=function(){return o&&o.abort()},l},clear:function(){return(0,r.ZH)(t).catch(a())},del:function(e){return(0,r.IV)(e,t).catch(a())}}}("netdata"),u=86400,c=function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).maxAge,o=function(){if(n){var e=new Error("rejected");throw e.isCancel=!0,e}},a=i.get(e,{maxAge:r}).then((function(e){if(o(),e)return t(e)})).then((function(){return o(),function(t){return i.set(e,t)}}));return a.abort=function(){n=!0},a}},71172:function(e,t,n){"use strict";n.d(t,{c:function(){return u}});var r=n(15861),o=n(64687),a=n.n(o),i=n(95192),u=function(){var e=(0,r.Z)(a().mark((function e(t){var n,r,o,u,c;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.key,r=t.handleResults,u=function(e){return o={updatedAt:"",results:r(e)}},e.next=4,(0,i.Z)(n,u);case 4:return c=e.sent,e.abrupt("return",c(o));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},19368:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var r=n(13477),o=function(){var e=(0,r.jr)();return"user.".concat(e,".")}},68035:function(e,t,n){"use strict";var r=n(45987),o=n(15861),a=n(29439),i=n(93433),u=n(4942),c=n(64687),s=n.n(c),l=(n(85827),n(41539),n(25387),n(2490),n(72608),n(2707),n(57327),n(88449),n(59849),n(26699),n(32023),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(15581),n(34514),n(54747),n(21249),n(57640),n(9924),n(88674),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(67294)),f=n(4480),d=n(41331),p=n(6557),v=n.n(p),m=n(29283),g=n(9058),b=n(16634),h=n(46189),y=n(13477),S=n(95192),O=n(19368),w=n(93017),A=["fetchResources","onReceive","getUpdatedAt","getError","clearRef","onFail"],k=["polling","fetch","association","pollingOptions","keepPolling"],P=["key"];function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){(0,u.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=(0,f.cn)({key:"subscriptionsLatestError",default:0}),x=(0,f.CG)({key:"useSubscribe/updateState",get:function(){return function(){return null}},set:function(){return function(e,t){var n=e.get,r=e.set,o=t.results,a=t.wasDiff,u=t.updatedAt,c=t.getResource,s=t.getResourcesInitializer,l=t.getResourceInitialState,f=t.getUpdatedAt,p=t.getLoaded,m=t.getIds,g=t.getError,b=t.sort,h=t.saveToCache,y=t.restored,S=void 0!==y&&y,O=t.polling,w=void 0===O||O;o=o||[],g&&r(g(),null);var A=function(){r(f(),u),r(p(),!S||"restored")};if(0===o.length&&a)A();else{var k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v();return e.reduce((function(e,n){return n.loaded=!0,"deleted"===n.state||n.isDeleted?e.deleted.push(n.id):(e.byId[n.id]=E(E({},t(n)),n),e.effected.push(n.id)),e}),{deleted:[],effected:[],byId:{}})}(o,l),P=k.effected,Z=k.deleted,j=k.byId,x=function(e){return e in j?j[e]:n(c(e))},C=[];r(m(),(function(e){return!a&&w||!w?(C=P.length?P:C,b&&C.sort((function(e,t){return b(x(e),x(t))})),C):(Z.length&&(C=e.filter((function(e){return!Z.includes(e)}))),a&&P.length&&(C=(0,i.Z)(new Set([].concat((0,i.Z)(e),(0,i.Z)(P)))),b&&C.sort((function(e,t){return b(x(e),x(t))}))),(0,d.ZP)(C,e)?e:C)})),s?r(s(),{values:j,merge:!0}):P.forEach((function(e){return r(c(e),(function(t){return E(E({},t),{},{loaded:!0},j[e])}))})),A(),h&&h({results:C.map(x),updatedAt:u})}}}});t.Z=function(e,t){var n=(0,O.P)(),u=(0,y.Iy)("isAnonymous"),c=(0,l.useMemo)((function(){var t=e(),o=t.key,a=(0,r.Z)(t,P);return E({key:"".concat(n).concat(o)},a)}),[e].concat((0,i.Z)(t),[u])),d=function(e){var t=(0,g.e)(),n=(0,l.useMemo)((function(){return t?t.getRoot():null}),[t]),i=(0,m.Z)(),u=(0,a.Z)(i,2)[1],c=(0,w.Z)(e.key),d=(0,a.Z)(c,2)[1],p=(0,f._8)((function(e){var t=e.snapshot,n=e.set;return function(){var e=(0,o.Z)(s().mark((function e(r,o){var a,i,u,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.getError,i=o.onFail,u=Date.now(),e.next=4,t.getPromise(j);case 4:if(c=e.sent,!(r.isCancel||c+1e4>u)){e.next=7;break}throw r;case 7:throw a&&n(a(),(0,b.Z)(r)),n(j,u),i?i(r):d(r),r;case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}),[e]),v=(0,f._8)((function(e){var t=e.snapshot,n=e.set;return function(){var e=(0,o.Z)(s().mark((function e(a,i){var u,c,l,f,d,m,g,b,h,y;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=i.fetchResources,c=i.onReceive,l=i.getUpdatedAt,f=i.getError,d=i.clearRef,m=i.onFail,g=(0,r.Z)(i,A),e.next=3,t.getPromise(l());case 3:return b=e.sent,h=function(){return d.promise=u(b),d.promise.catch(function(){var e=(0,o.Z)(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",p(t,{onFail:m,getError:f}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},y=function(e){var t=Array.isArray(e),r=t?e:e.results,o=t?"":e.updatedAt;return null===c||void 0===c||c(E(E({},t?{results:r}:E({results:[]},e)),{},{lastUpdated:b})),n(x(),E({fetchResources:u,results:r,wasDiff:!!b,updatedAt:o,getUpdatedAt:l,getError:f,clearRef:d,onFail:m},g)),new Promise((function(e){return setTimeout(e,0)}))},e.abrupt("return",h().then((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data;return y(void 0===e?{}:e)})).catch((function(e){if(e.isCancel||1===a)throw e;return v(--a,E({fetchResources:u,onReceive:c,getUpdatedAt:l,getError:f,clearRef:d,onFail:m},g))})));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}),[e]);return(0,l.useCallback)((function(t){var o=e.polling,a=void 0===o||o,i=e.fetch,c=e.association,s=e.pollingOptions,l=e.keepPolling,f=(0,r.Z)(e,k),d={timeoutId:null,animationFrameId:null,promise:null,killed:!1},p=function(){return v(2,E(E({fetchResources:i,saveToCache:t,polling:a,clearRef:d},c),f))},m=function e(){d.killed||(d.timeoutId=setTimeout((function(){d.animationFrameId=requestAnimationFrame((function(){return!l&&n&&(n.getAttribute("hovering")||n.getAttribute("paused"))?e():l||u.current||n&&n.getAttribute("autofetchOnWindowBlur")?void p().then(e).catch((function(t){return!t.isCancel&&e()})):e()}))}),(null===s||void 0===s?void 0:s.pollingInterval)||h.Z.pollingInterval))};return p().then(a?m:null).catch((function(e){return a&&!e.isCancel&&m()})),function(){var e,t;d.killed=!0,null===(e=d.promise)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),cancelAnimationFrame(d.animationFrameId),clearTimeout(d.timeoutId)}}),[e])}(c),p=(0,f._8)((function(e){var t=e.set;return function(e){var n,r=e.results,o=void 0===r?[]:r,a=e.updatedAt,i=void 0===a?"":a,u=(Array.isArray(o)&&o.length)>0;return null===(n=c.onReceive)||void 0===n||n.call(c,{results:o,lastUpdated:""}),t(x(),E(E(E({results:o,updatedAt:u?i:""},c),c.association),{},{restored:u})),new Promise((function(e){return setTimeout(e,0)}))}}),t),v=(0,f._8)((function(e){var t=e.snapshot;return function(){var e=c.association.getLoaded,n=c.key,r=c.cache,o=void 0===r||r,a=c.maxCacheAge,i=c.skip,u=t.getLoadable(e()).contents;if(!i&&(u||!o))return d();var s,l=(0,S.Z)(n,p,{maxAge:a||S.$});return l.then((function(e){s=d(e)})).catch((function(){})),function(){var e;i||(l.abort(),null===(e=s)||void 0===e||e())}}}),t);return(0,l.useEffect)((function(){var e=c.autorun,t=void 0===e||e,n=c.force,r=void 0!==n&&n,o=c.skip;if((!u||r)&&!(void 0!==o&&o)&&t)return v()}),[u,v]),d}},46667:function(e,t,n){"use strict";var r=n(29439),o=n(67294);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.on,a=t.off,i=t.toggle,u=(0,o.useState)(!!e),c=(0,r.Z)(u,2),s=c[0],l=c[1];return[s,(0,o.useCallback)((function(e){return l((function(t){var r="boolean"===typeof e?e:!t;return i&&i(r),n&&r&&n(),a&&!r&&a(),r}))}),[i,n,a]),(0,o.useCallback)((function(){l(!0),n&&n()}),[n]),(0,o.useCallback)((function(){l(!1),a&&a()}),[a])]}},65565:function(e,t,n){"use strict";var r=n(67294),o=n(9872);t.Z=function(e,t){var n=(0,o.Z)();(0,r.useEffect)((function(){if(n.current)return e()}),t)}},4474:function(e,t,n){"use strict";n.d(t,{Pf:function(){return b},rZ:function(){return O}});var r=n(29439),o=(n(41539),n(64211),n(2490),n(41874),n(67294)),a=n(89250),i=n(12599),u=n(74059),c=n(95383),s=n(32950),l=n(53338),f=n(5934),d=n(37518),p=n(47133),v=n(46189),m=n(33427),g=n(78710),b=function(){var e=(0,a.s0)(),t=(0,a.UO)(),n=(0,d.A3)(),r=(0,p.r0)(t.dashboardSlug),i=(0,f.L)(),u=(0,o.useRef)(!1);(0,o.useEffect)((function(){!0===i&&(r?u.current=!0:(e("".concat(n,"/dashboards")),u.current||(0,m.cH)()))}),[i,r])},h=v.Z.demoSlug,y=v.Z.demoDefaultRoomViews,S=v.Z.defaultRoomView,O=function(e){var t;return e.length?e.some((function(e){return e.slug===l.i_}))?l.i_:null===(t=e[0])||void 0===t?void 0:t.slug:null};t.ZP=function(){(0,a.TH)();var e=(0,a.s0)(),t=(0,a.bS)({path:"/spaces/:spaceSlug/*"}),n=(0,a.bS)({path:"/spaces/:spaceSlug/rooms/:roomSlug/*"}),l=(0,a.bS)({path:"/*"}),f=(null===n||void 0===n?void 0:n.params)||(null===t||void 0===t?void 0:t.params)||(null===l||void 0===l?void 0:l.params),p=!!(0,a.bS)({path:"/spaces/:spaceSlug/settings/*"}),v=(0,u.VZ)(f.spaceSlug),m=(0,u.GM)("loaded"),b=(0,d.HM)(v,f.roomSlug),w=(0,c.Gn)("loaded"),A=(0,u.Iw)(),k=(0,r.Z)(A,1)[0],P=(0,u.vu)(k,"slug"),Z=(0,s.Z)().isFetching,E=(0,c.J7)(),j=(0,u.$v)(),x=(0,u.uk)();(0,o.useEffect)((function(){if(!Z&&(g.ZP||m&&"restored"!==m)&&(!p||!v))if(v&&x!==f.spaceSlug)j(f.spaceSlug);else if((!v||w)&&(!v||!b)){var t=v?f.spaceSlug:P,n=b?null===f||void 0===f?void 0:f.roomSlug:O(E);e(v&&w&&!n?(0,i.Gn)("/spaces/:spaceSlug/no-rooms",{spaceSlug:t}):function(e,t){if(!t)return(0,i.Gn)("/spaces/:spaceSlug/",{spaceSlug:e});var n=h===e?y[t]||y.default:g.ZP&&e===g.Xh&&t===g.Fb?g.vT:S;return(0,i.Gn)("/spaces/:spaceSlug/rooms/:roomSlug/".concat(n),{spaceSlug:e,roomSlug:t})}(t,n),{replace:!0})}}),[p,Z,f.roomSlug,f.spaceSlug,b,w,!!E.length,m,v,P,x])}},29283:function(e,t,n){"use strict";var r=n(29439),o=n(67294);t.Z=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,o.useState)(e),n=(0,r.Z)(t,2),a=n[0],i=n[1],u=(0,o.useRef)(a);return(0,o.useEffect)((function(){var e=function(){u.current=!1,i(!1)};window.addEventListener("blur",e);var t=function(){u.current=!0,i(!0)};return window.addEventListener("focus",t),function(){window.removeEventListener("blur",e),window.removeEventListener("focus",t)}}),[]),[a,u]}},85732:function(e,t,n){"use strict";n(66992),n(41539),n(88674),n(78783),n(33948),n(57327),n(88449),n(2490),n(59849),n(92222),n(74916),n(77601);var r=n(67294),o=n(2145),a=n(20745),i=n(4480),u=n(79655),c=n(89250),s=n(27923),l=n(95659),f=n(9058),d=n(15794),p=n(92501),v=n(22648),m=n(78266),g=n(78710),b=(n(4723),n(82772),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)));function h(e,t){navigator.serviceWorker.register(e).then((function(e){n.g.registration=e,e.onupdatefound=function(){var n=e.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See http://bit.ly/CRA-PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}var y=n(4942),S=(n(64765),n(23157),n(15306),n(47042),n(24603),n(88386),n(39714),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(47323));function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,y.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=function(e,t){return t.search=t.search||e.location.search,t.hash=t.hash||e.location.hash,t};function k(e){if(g.se&&"/"!==g.se&&e.startsWith(g.se)){var t=g.se+e.slice(g.se.length).replace(new RegExp("^".concat(g.se),"g"),"/");e=t}return e=e.replace(/\/+/g,"/")}var P=function(e){return"string"===typeof e?{pathname:k(e)}:w(w({},e),{},{pathname:k(e.pathname)})},Z=(0,S.lX)({window:window}),E=Z.push,j=Z.replace;Z.push=function(e,t){return E.apply(Z,[A(Z,P(e)),t])},Z.replace=function(e,t){j.apply(Z,[A(Z,P(e)),t])};var x=Z,C=JSON.parse('{"u2":"cloud-frontend","i8":"6.66.1"}'),I=(0,o.Z)((function(){return Promise.all([n.e(285),n.e(9360)]).then(n.bind(n,79360))}),"Redirects"),T=(0,o.Z)((function(){return Promise.all([n.e(285),n.e(6502),n.e(9975),n.e(3169)]).then(n.bind(n,83169))}),"SignIn"),D=(0,o.Z)((function(){return n.e(4934).then(n.bind(n,64934))}),"Trust"),N=(0,o.Z)((function(){return n.e(9895).then(n.bind(n,79895))}),"MobileApp"),M=(0,o.Z)((function(){return n.e(6817).then(n.bind(n,76817))}),"AuthTokenCallback"),R=(0,o.Z)((function(){return Promise.all([n.e(6502),n.e(9975),n.e(1178)]).then(n.bind(n,1178))}),"MagicLinkSent"),_=(0,o.Z)((function(){return n.e(8977).then(n.bind(n,98977))}),"SignUpVerification"),L=(0,o.Z)((function(){return n.e(9768).then(n.bind(n,39768))}),"CheckAuth"),U=(0,o.Z)((function(){return n.e(7154).then(n.bind(n,77154))}),"App"),B=(0,o.Z)((function(){return n.e(9510).then(n.bind(n,89510))}),"GlobalStyles"),G=(0,o.Z)((function(){return n.e(6723).then(n.bind(n,76723))}),"Notifications"),F=(0,o.Z)((function(){return Promise.all([n.e(3241),n.e(1193),n.e(4814)]).then(n.bind(n,94814))}),"Assistant"),K=(0,o.Z)((function(){return n.e(4744).then(n.bind(n,34744))}),"Webviews");window.envSettings.tracking?setTimeout((function(){var e,t=[!(null===(e=window)||void 0===e||null===(e=e.posthog)||void 0===e||!e.SentryIntegration)&&new window.posthog.SentryIntegration(window.posthog,"netdata-inc",5210883)].filter(Boolean);s.S({dsn:"https://43a4669badb04eee941ec8b242991df7@o382276.ingest.sentry.io/5210883",maxBreadcrumbs:100,release:"".concat(C.u2,"@").concat(C.i8),debug:!1,integrations:t,tracesSampleRate:.2,environment:window.envSettings.isAgent?"agent":window.envSettings.nodeEnv||"agent",denyUrls:[],autoSessionTracking:!1,beforeSend:function(e,t){var n,r=t.originalException,o=void 0===r?{}:r;if(!/netdata\.cloud/.test(null===e||void 0===e||null===(n=e.request)||void 0===n||null===(n=n.headers)||void 0===n?void 0:n.Referer))return null;if(!o)return e;var a=o.response,i=void 0===a?{}:a,u=o.isCancel;if(void 0!==u&&u)return null;var c=i.status;return 400===c||422===c?e:c>=400&&c<=599?null:e},ignoreErrors:["Non-Error exception captured","Non-Error promise rejection captured","Request aborted",/ResizeObserver/,"timeout exceeded","this.get_config is not a function",/IndexSizeError/,"Invalid time value","not_found",/A mutation operation was attempted on a database that did not allow mutations/,/No data for this period/,/Network Error/]}),window.addEventListener("beforeunload",(function(){try{l.Gd().getClient().getOptions().enabled=!1}catch(e){}}))}),500):console.log("Running in development mode version:",C.u2,C.i8);var J,z=(0,d.k)(p.NY,"light"),W=function(){return null},V=function(){var e=(0,v.m)();return r.createElement(i.Wh,null,r.createElement(r.Suspense,{fallback:""},r.createElement(d.Z,null,r.createElement(f.Z,null,r.createElement(p.ZP,{fallback:z},r.createElement(r.Suspense,{fallback:""},r.createElement(B,{isScreenSmall:e}),r.createElement(G,null),r.createElement(F,null),r.createElement(u.M,{className:"router",history:x,basename:g.ZP?g.se:"/"},r.createElement(c.Z5,null,r.createElement(c.AW,{path:"/webviews/*",element:r.createElement(W,null)}),r.createElement(c.AW,{path:"*",element:r.createElement(L,null)})),r.createElement(r.Suspense,{fallback:r.createElement(m.Z,null)},r.createElement(c.Z5,null,!g.ZP&&r.createElement(r.Fragment,null,r.createElement(c.AW,{path:"/sign-in",element:r.createElement(T,null)}),r.createElement(c.AW,{path:"/trust",element:r.createElement(D,null)}),r.createElement(c.AW,{path:"/sign-up",element:r.createElement(c.Fg,{to:"/sign-in",replace:!0})}),r.createElement(c.AW,{path:"/sign-up/verify",element:r.createElement(_,null)}),r.createElement(c.AW,{path:"/sign-in/magic-link-sent",element:r.createElement(R,null)}),r.createElement(c.AW,{path:"/sign-in/mobile-app",element:r.createElement(N,null)}),r.createElement(c.AW,{path:"/webviews/*",element:r.createElement(K,null)})),r.createElement(c.AW,{path:"/cloud/origin/callback",element:r.createElement(M,null)}),r.createElement(c.AW,{path:"/redirects",element:r.createElement(I,null)}),r.createElement(c.AW,{path:"*",element:r.createElement(U,null)}))))))))))};(0,a.s)(document.getElementById("app")).render(r.createElement(V,null)),"serviceWorker"in navigator&&window.addEventListener("load",(function(){var e="".concat(window.envSettings.webpackPublicPath,"/sw.js");b?(function(e,t){fetch(e).then((function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):h(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(e,J),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit http://bit.ly/CRA-PWA")}))):h(e,J)}))},95482:function(e,t,n){"use strict";n(74916),n(15306);n.p=window.envSettings.isAgent&&!window.envSettings.webpackPublicPath?window.envSettings.agentApiUrl+"/v2/":"".concat(window.envSettings.webpackPublicPath||"","/").replace(/([^:]\/)\/+/g,"$1")},32808:function(e,t,n){"use strict";n(66992),n(41539),n(88674),n(78783),n(33948);window.envSettings.tracking&&(window.posthog={},n.e(9893).then(n.bind(n,99893)).then((function(e){window.posthog=e.default,window.posthog.init(window.envSettings.posthogToken,{api_host:"https://app.posthog.com"})})),function(e,t,n,r,o){e[r]=e[r]||[],e[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n);i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id=GTM-N6CBMJD",a.parentNode.insertBefore(i,a)}(window,document,"script","dataLayer"))},64358:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});n(92222);var r=n(62200),o=function(e){var t=e.spaceId;return"".concat(r.li,"/spaces/").concat(t,"/rooms?show_all=true")}},24654:function(){}},function(e){e.O(0,[2143],(function(){e.E(9768),e.E(7154)}),5);var t=function(t){return e(e.s=t)};e.O(0,[1967,2533,6152,8099,4586,1282,9513,5158,6187,2406],(function(){return t(95482),t(32808),t(85732)}));e.O()}]); \ No newline at end of file