/*! 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.ml_bundle_jsonpfunction=window.ml_bundle_jsonpfunction||[]).push([[7],{259:function(e,t,o){"use strict";o.d(t,"a",(function(){return d}));var n=o(39),s=o.n(n),i=o(11),c=o(10),l=(o(2),o(21)),a=o(135),r=o(191),u=o(190),b=o(251),j=o(4);async function d(e,t){const{http:o,uiSettings:n,theme:d,i18n:p,application:{currentAppId$:m}}=e;return new Promise((async(O,h)=>{try{const v={groupsMap:Object(r.b)([]),jobsMap:{}},y=n.get("dateFormat:tz"),w="Browser"!==y?y:s.a.tz.guess(),f=()=>{S.close(),h()},g=async({jobIds:e,groups:t})=>{await S.close(),O({jobIds:e,groups:t})},S=e.overlays.openFlyout(Object(a.a)(Object(j.jsx)(l.KibanaContextProvider,{services:{...e,mlServices:Object(u.getMlGlobalServices)(o)}},Object(j.jsx)(b.a,{selectedIds:t,withTimeRangeSelector:!1,dateFormatTz:w,singleSelection:!1,timeseriesOnly:!0,onFlyoutClose:f,onSelectionConfirmed:g,maps:v})),{theme:d,i18n:p}),{"data-test-subj":"mlFlyoutJobSelector",ownFocus:!0,closeButtonProps:{"aria-label":"jobSelectorFlyout"}});m.pipe(Object(i.skip)(1),Object(i.takeUntil)(Object(c.from)(S.onClose)),Object(i.distinctUntilChanged)()).subscribe((()=>{S.close()}))}catch(e){h(e)}}))}},669:function(e,t,o){"use strict";o.r(t),o.d(t,"resolveEmbeddableAnomalyChartsUserInput",(function(){return j})),o(2);var n=o(135),s=o(106),i=o(117),c=o(274),l=o(25),a=o(259),r=o(346),u=o(12),b=o(4);async function j(e,t){const{http:o,overlays:j,theme:d,i18n:p}=e,{getJobs:m}=Object(u.mlApiServicesProvider)(new l.a(o));return new Promise((async(o,l)=>{try{var u;const{jobIds:O}=await Object(a.a)(e,null==t?void 0:t.jobIds),h=null!==(u=null==t?void 0:t.title)&&void 0!==u?u:Object(c.getDefaultExplorerChartsPanelTitle)(O),{jobs:v}=await m({jobId:O.join(",")});Object(s.h)(v).push(i.j);const y=j.openModal(Object(n.a)(Object(b.jsx)(r.a,{defaultTitle:h,initialInput:t,onCreate:({panelTitle:e,maxSeriesToPlot:t})=>{y.close(),o({jobIds:O,title:e,maxSeriesToPlot:t})},onCancel:()=>{y.close(),l()}}),{theme:d,i18n:p}))}catch(e){l(e)}}))}}}]);