/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.triggersActionsUi_bundle_jsonpfunction=window.triggersActionsUi_bundle_jsonpfunction||[]).push([[27],{131:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84),o=n(1),u=r.__importDefault(n(141));t.default=function(e,t){var n=o.useState(t),r=n[0],c=n[1];return u.default((function(){var t=e.subscribe(c);return function(){return t.unsubscribe()}}),[e]),r}},141:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;t.default=o},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return x}));var r=n(13),o=n.n(r),u=n(1),c=n.n(u),s=n(83);const i={services:{}},l=Object(u.createContext)(i);var a=n(166),j=n.n(a),f=n(0);const p=({children:e,component:t,render:n,...r})=>{const i=Object(u.useMemo)((()=>{if(t)return e=>Object(f.jsx)(c.a.Fragment,null,Object(f.jsx)(d,null),Object(f.jsx)(t,e))}),[t]);if(i)return Object(f.jsx)(s.Route,o()({},r,{component:i}));if(n||"function"==typeof e){const t="function"==typeof e?e:n;return Object(f.jsx)(s.Route,o()({},r,{render:e=>Object(f.jsx)(c.a.Fragment,null,Object(f.jsx)(d,null),t(e))}))}return Object(f.jsx)(s.Route,r,Object(f.jsx)(d,null),e)},d=()=>{const{executionContext:e}=Object(u.useContext)(l).services,t=Object(s.useRouteMatch)();return function(e,t){j()((()=>(null==e||e.set(t),()=>{null==e||e.clear()})),[t])}(e,{type:"application",page:t.path,id:Object.keys(t.params).length>0?JSON.stringify(t.params):void 0}),null};var b=n(88);const O=({children:e,...t})=>Object(f.jsx)(s.Router,t,Object(f.jsx)(b.CompatRouter,null,e));var v=n(9);const x=({legacySwitch:e=!0,children:t})=>{const n=Object(s.useRouteMatch)();return e?Object(f.jsx)(s.Switch,null,t):Object(f.jsx)(b.Routes,null,u.Children.map(t,(e=>{if(c.a.isValidElement(e)&&e.type===p){var r;const o=Object(v.replace)(null==e?void 0:e.props.path,n.url+"/",""),u="function"==typeof(null==e?void 0:e.props.children)?null==e?void 0:e.props.children:null==e?void 0:e.props.render;return Object(f.jsx)(b.Route,{path:o,element:Object(f.jsx)(c.a.Fragment,null,Object(f.jsx)(d,null),(null==e||null===(r=e.props)||void 0===r?void 0:r.component)&&Object(f.jsx)(e.props.component,null)||u&&u()||t)})}return e})))}},166:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(84),o=n(167),u=r.__importDefault(n(169));t.default=function(e,t){u.default(e,t,o.isDeepEqual)}},167:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeepEqual=t.off=t.on=t.isClient=void 0;var r=n(84).__importDefault(n(168));t.isClient="object"==typeof window,t.on=function(e){for(var t=[],n=1;nPromise.all([n.e(1),n.e(31)]).then(n.bind(null,275)))),g=Object(r.lazy)((()=>Promise.all([n.e(0),n.e(2),n.e(7),n.e(20)]).then(n.bind(null,299)))),_=new p.QueryClient,R=e=>{const{element:t}=e;return Object(c.render)(Object(m.jsx)(w,{deps:e}),t),()=>{Object(c.unmountComponentAtNode)(t)}},w=({deps:e})=>{const{dataViews:t,uiSettings:n,theme$:r}=e,o=l()(n.get$("theme:darkMode")),c=["rules","logs","alerts"].join("|");return Object(O.d)(t),Object(m.jsx)(s.I18nProvider,null,Object(m.jsx)(j.EuiThemeProvider,{darkMode:o},Object(m.jsx)(a.KibanaThemeProvider,{theme$:r},Object(m.jsx)(v.a,{services:{...e,theme:{theme$:r}}},Object(m.jsx)(u.b,{history:e.history},Object(m.jsx)(p.QueryClientProvider,{client:_},Object(m.jsx)(E,{sectionsRegex:c})))))))},E=({sectionsRegex:e})=>{const{actions:{validateEmailAddresses:t},application:{navigateToApp:n}}=Object(v.b)().services;return Object(m.jsx)(x.b,{value:{services:{validateEmailAddresses:t}}},Object(m.jsx)(u.c,null,Object(m.jsx)(u.a,{path:`/:section(${e})`,component:Object(d.a)(y,"xl")}),Object(m.jsx)(u.a,{path:f.rb,component:Object(d.a)(g,"xl")}),Object(m.jsx)(u.a,{exact:!0,path:b.p,render:({match:e})=>Object(m.jsx)(o.Redirect,{to:`/rule/${e.params.alertId}`})}),Object(m.jsx)(u.a,{exact:!0,path:b.r,render:()=>(n(`management/insightsAndAlerting/${h.CONNECTORS_PLUGIN_ID}`),null)}),Object(m.jsx)(o.Redirect,{from:"/",to:"rules"}),Object(m.jsx)(o.Redirect,{from:"/alerts",to:"rules"})))}}}]);