!function(e){function t(t){for(var n,o,a=t[0],i=t[1],s=0,c=[];s{const e=s;return Object(i.jsx)("div",{css:e},Object(i.jsx)(a.EuiLoadingSpinner,null))};var c=n(7),l=n.n(c);const d=(e,t=Object(i.jsx)(u,null))=>o.a.forwardRef(((n,o)=>Object(i.jsx)(a.EuiErrorBoundary,null,Object(i.jsx)(r.Suspense,{fallback:t},Object(i.jsx)(e,l()({},n,{ref:o}))))))},function(e,t,n){e.exports=n(24)(1465)},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t){e.exports=__kbnSharedDeps__.KbnI18n},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"f",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return c}));var r=n(8);const[o,a]=Object(r.createGetterSetter)("IndexPatterns"),[i,s]=Object(r.createGetterSetter)("Theme"),[u,c]=Object(r.createGetterSetter)("Overlays")},function(e,t,n){e.exports=n(24)(1466)},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaUtils/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.Rxjs},function(e,t){e.exports=__kbnSharedDeps__.KbnAnalytics},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/data/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return d}));var r=n(0),o=n.n(r),a=n(2);const i=o.a.lazy((()=>n.e(17).then(n.bind(null,40)))),s=Object(a.a)(i),u=o.a.lazy((()=>n.e(10).then(n.bind(null,45)))),c=Object(a.a)(u),l=o.a.lazy((()=>n.e(8).then(n.bind(null,53)))),d=Object(a.a)(l)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(0),o=n.n(r),a=n(1);const i=()=>Object(a.jsx)("div",null),s=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(13)]).then(n.bind(null,54)))),u=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(i,null)},Object(a.jsx)(s,e)),c=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(20)]).then(n.bind(null,43)))),l=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(i,null)},Object(a.jsx)(c,e)),d=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(2)]).then(n.bind(null,41)))),p=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(i,null)},Object(a.jsx)(d,e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),o=n.n(r),a=n(2);const i=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(12)]).then(n.bind(null,51)))),s=Object(a.a)(i)},function(e,t){e.exports=__kbnSharedDeps__.KbnDatemath},function(e,t){e.exports=__kbnSharedDeps__.Moment},function(e,t,n){"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function i(e){for(var t=-1,n=0;nPromise.all([n.e(0),n.e(11)]).then(n.bind(null,50)))),u=Object(a.a)(s),c=o.a.lazy((()=>n.e(0).then(n.bind(null,44)))),l=Object(a.a)(c)},function(e,t){e.exports=__kbnSharedDeps_npm__},function(e,t,n){"use strict";n.d(t,"a",(function(){return autocomplete_service_AutocompleteService}));var r=n(3),o=n.n(r),a=n(18),i=n.n(a),s=n(17),u=n.n(s),c=n(4),l=n(13);const d=()=>Promise.resolve([]);var p=n(26),b=n(10);let g;!function(e){e.CALL="autocomplete:call",e.REQUEST="autocomplete:req",e.RESULT="autocomplete:res",e.ERROR="autocomplete:err"}(g||(g={}));const f="@kuery-cursor@";class autocomplete_service_AutocompleteService{constructor(e){o()(this,"autocompleteConfig",void 0),o()(this,"querySuggestionProviders",new Map),o()(this,"getValueSuggestions",void 0),o()(this,"getQuerySuggestions",(e=>{const{language:t}=e,n=this.querySuggestionProviders.get(t);if(n)return n(e)})),o()(this,"hasQuerySuggestions",(e=>this.querySuggestionProviders.has(e))),this.initializerContext=e;const{autocomplete:t}=e.config.get();this.autocompleteConfig=t}setup(e,{timefilter:t,usageCollection:r}){const{autocomplete:o}=this.initializerContext.config.get(),{terminateAfter:a,timeout:s}=o.valueSuggestions,h=((e,t)=>{const n=async()=>{const[{application:t}]=await e();return t.currentAppId$.pipe(Object(p.first)()).toPromise()};return{trackCall:async()=>{const e=await n();return null==t?void 0:t.reportUiCounter(e,b.METRIC_TYPE.LOADED,g.CALL)},trackRequest:async()=>{const e=await n();return null==t?void 0:t.reportUiCounter(e,b.METRIC_TYPE.LOADED,g.REQUEST)},trackResult:async()=>{const e=await n();return null==t?void 0:t.reportUiCounter(e,b.METRIC_TYPE.LOADED,g.RESULT)},trackError:async()=>{const e=await n();return null==t?void 0:t.reportUiCounter(e,b.METRIC_TYPE.LOADED,g.ERROR)}}})(e.getStartServices,r);return this.getValueSuggestions=this.autocompleteConfig.valueSuggestions.enabled?((e,{timefilter:t,usageCollector:r})=>{function o(e,t,n,r){return[Math.floor(Date.now()/1e3/60),n,e,t.name,JSON.stringify(r)].join("|")}const a=Object(c.memoize)(((t,n,o,a=[],i,s=e.uiSettings.get(l.UI_SETTINGS.AUTOCOMPLETE_VALUE_SUGGESTION_METHOD),u)=>{var c,d;null==r||r.trackRequest();let p=`/internal/kibana/suggestions/values/${t}`;return u&&(p=`/internal/${u}/suggestions/values`),e.http.fetch(p,{method:"POST",body:JSON.stringify({query:o,field:n.name,fieldMeta:null!==(c=null===(d=n.toSpec)||void 0===d?void 0:d.call(n))&&void 0!==c?c:n,filters:a,...void 0===u?{method:s}:{}}),signal:i,version:"1"}).then((e=>(null==r||r.trackResult(),e)))}),o);return async({indexPattern:i,field:s,query:c,useTimeRange:d,boolFilter:p,signal:b,method:g,querySuggestionKey:f})=>{var h,y;const _=e.uiSettings.get(l.UI_SETTINGS.FILTERS_EDITOR_SUGGEST_VALUES);d=null!==(h=d)&&void 0!==h?h:e.uiSettings.get(l.UI_SETTINGS.AUTOCOMPLETE_USE_TIMERANGE);const{title:m}=i,v="string"===s.type&&(null===(y=s.esTypes)||void 0===y?void 0:y.includes("version"));if("boolean"===s.type)return[!0,!1];if(!_||!s.aggregatable||"string"!==s.type&&"ip"!==s.type||v)return[];const k=d?(({timefilter:e},t)=>{const n=e.getTime(),r={from:u.a.parse(n.from).startOf("minute").toISOString(),to:u.a.parse(n.to,{roundUp:!0}).endOf("minute").toISOString()};return e.createFilter(t,r)})(t,i):void 0,{buildQueryFromFilters:S}=await Promise.resolve().then(n.t.bind(null,37,7)),x=[...p||[],...k?S([k],i).filter:[]];try{return null==r||r.trackCall(),await a(m,s,c,x,b,g,f)}catch(e){return null!=b&&b.aborted||null==r||r.trackError(),a.cache.delete(o(m,s,c,x)),[]}}})(e,{timefilter:t,usageCollector:h}):d,this.autocompleteConfig.querySuggestions.enabled&&this.querySuggestionProviders.set("kuery",(e=>{let t;return async r=>{const{query:o,selectionStart:a,selectionEnd:i}=r,s=`${o.substr(0,a)}${f}${o.substr(i)}`,u=await(async()=>{if(t)return t;const{setupGetFieldSuggestions:r,setupGetValueSuggestions:o,setupGetOperatorSuggestions:a,setupGetConjunctionSuggestions:i}=await n.e(16).then(n.bind(null,142)),{fromKueryExpression:s}=await Promise.resolve().then(n.t.bind(null,37,7)),u={field:r(e),value:o(e),operator:a(e),conjunction:i(e)};return t=async(e,t)=>{try{const{suggestionsAbstraction:l}=t;let d=s(e,{cursorSymbol:f,parseCursor:!0});const p=d.nestedPath&&d.nestedPath.length>0,b=p?`${d.nestedPath}.${d.fieldName}`:d.fieldName;var n,r,o,a,i,c;return l&&null!=l&&l.fields[b]&&(d=p?{...d,fieldName:null!==(n=null==l||null===(r=l.fields[b])||void 0===r?void 0:r.nestedField)&&void 0!==n?n:b,nestedPath:null!==(o=null==l||null===(a=l.fields[b])||void 0===a?void 0:a.nestedPath)&&void 0!==o?o:b}:{...d,fieldName:null!==(i=null==l||null===(c=l.fields[b])||void 0===c?void 0:c.field)&&void 0!==i?i:b}),d.suggestionTypes.map((e=>u[e](t,d)))}catch(e){return[]}}})();return Promise.all(await u(s,r)).then((e=>{return t=Object(c.flatten)(e),Object(c.uniqBy)(t,(({type:e,text:t,start:n,end:r})=>[e,t,n,r].join("|")));var t}))}})(e)),{getQuerySuggestions:this.getQuerySuggestions,getAutocompleteSettings:()=>({terminateAfter:i.a.duration(a).asMilliseconds(),timeout:i.a.duration(s).asMilliseconds()})}}start(){return{getQuerySuggestions:this.getQuerySuggestions,hasQuerySuggestions:this.hasQuerySuggestions,getValueSuggestions:this.getValueSuggestions}}clearProviders(){this.querySuggestionProviders.clear()}}},function(e,t){e.exports=__kbnSharedDeps__.RxjsOperators},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n(0),o=n.n(r),a=n(2);const i=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(6)]).then(n.bind(null,52)))),s=Object(a.a)(i)},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/uiActions/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t,n){n(30),__kbnBundles__.define("plugin/unifiedSearch/public",n,36)},function(e,t,n){n.p=window.__kbnPublicPath__.unifiedSearch},function(e,t,n){switch(window.__kbnThemeTag__){case"v8dark":return n(32);case"v8light":return n(34)}},function(e,t,n){var r=n(19),o=n(33);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},function(e,t,n){(t=n(20)(!1)).push([e.i,".kbnTypeahead.kbnTypeahead--small{max-height:20vh}.kbnTypeahead__popover--top{border-top-left-radius:6px;border-top-right-radius:6px;box-shadow:0 0 .8px #00000026,0 0 2px #0000001a,0 0 5px #0000001a,0 0 17px rgba(0,0,0,.075);-webkit-clip-path:polygon(-50px -50px,calc(100% + 50px) -50px,calc(100% + 50px) 100%,-50px 100%);clip-path:polygon(-50px -50px,calc(100% + 50px) -50px,calc(100% + 50px) 100%,-50px 100%)}.kbnTypeahead__popover--bottom{border-bottom-left-radius:6px;border-bottom-right-radius:6px;box-shadow:0 1px 5px #00000040,0 3.6px 13px rgba(0,0,0,.175),0 8.4px 23px #00000026,0 23px 35px rgba(0,0,0,.125);-webkit-clip-path:polygon(-50px 1px,calc(100% + 50px) 1px,calc(100% + 50px) calc(100% + 50px),-50px calc(100% + 50px));clip-path:polygon(-50px 1px,calc(100% + 50px) 1px,calc(100% + 50px) calc(100% + 50px),-50px calc(100% + 50px))}.kbnTypeahead{max-height:60vh}.kbnTypeahead .kbnTypeahead__popover{background-color:#1d1e24;border:1px solid #343741;color:#dfe5ef;max-height:inherit;overflow-y:auto;position:relative;scrollbar-color:#98a2b380 #0000;scrollbar-width:thin;width:100%;z-index:2000}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar{height:16px;width:16px}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#98a2b380;border:6px solid #0000;border-radius:16px}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-corner,.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-track{background-color:#0000}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item{border-bottom:none;font-size:12px;height:32px;line-height:normal;padding:0;vertical-align:middle;white-space:nowrap}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:hover{cursor:pointer}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:last-child{border-bottom:none;border-radius:0 0 6px 6px}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:first-child{border-bottom:none}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active{background-color:#25262e}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__callout{background:#1d1e24}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__text,.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__type{color:#fff}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--field .kbnSuggestionItem__type{background-color:#61542d}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--value .kbnSuggestionItem__type{background-color:#325956}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--operator .kbnSuggestionItem__type{background-color:#164160}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--conjunction .kbnSuggestionItem__type{background-color:#3a2d4a}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--recentSearch .kbnSuggestionItem__type{background-color:#212429}.kbnSuggestionItem{align-items:center;display:inline-flex;font-size:12px;white-space:nowrap;width:100%}.kbnSuggestionItem.kbnSuggestionItem--field .kbnSuggestionItem__type{background-color:#7a6a39;color:#f6edc6}.kbnSuggestionItem.kbnSuggestionItem--value .kbnSuggestionItem__type{background-color:#3f6f6c;color:#c0eeeb}.kbnSuggestionItem.kbnSuggestionItem--operator .kbnSuggestionItem__type{background-color:#1b5178;color:#87c7f6}.kbnSuggestionItem.kbnSuggestionItem--conjunction .kbnSuggestionItem__type{background-color:#49385c;color:#baa5d2}.kbnSuggestionItem.kbnSuggestionItem--recentSearch .kbnSuggestionItem__type{background-color:#2a2d33;color:#93979f}.kbnSuggestionItem__description,.kbnSuggestionItem__text,.kbnSuggestionItem__type{padding-right:16px}.kbnSuggestionItem__type{align-items:center;display:flex;flex-basis:auto;flex-direction:column;flex-grow:0;flex-shrink:0;height:32px;justify-content:center;overflow:hidden;padding:4px;text-align:center;width:32px}.kbnSuggestionItem__text{color:#dfe5ef;font-family:Roboto Mono,Consolas,Menlo,Courier,monospace;min-width:250px;overflow:hidden;padding-left:8px;text-overflow:ellipsis}.kbnSuggestionItem__description{color:#98a2b3;flex-shrink:1}.kbnSuggestionItem__description,.kbnSuggestionItem__description>p{overflow:hidden;text-overflow:ellipsis}.kbnSuggestionItem__description:empty{width:0}.kbnSuggestionItem__callout{background:#25262e;color:#fff;display:inline-block;font-family:Roboto Mono,Consolas,Menlo,Courier,monospace;padding:0 4px}",""]),e.exports=t},function(e,t,n){var r=n(19),o=n(35);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},function(e,t,n){(t=n(20)(!1)).push([e.i,".kbnTypeahead.kbnTypeahead--small{max-height:20vh}.kbnTypeahead__popover--top{border-top-left-radius:6px;border-top-right-radius:6px;box-shadow:0 0 .8px #0000000f,0 0 2px #0000000a,0 0 5px #0000000a,0 0 17px #00000008;-webkit-clip-path:polygon(-50px -50px,calc(100% + 50px) -50px,calc(100% + 50px) 100%,-50px 100%);clip-path:polygon(-50px -50px,calc(100% + 50px) -50px,calc(100% + 50px) 100%,-50px 100%)}.kbnTypeahead__popover--bottom{border-bottom-left-radius:6px;border-bottom-right-radius:6px;box-shadow:0 1px 5px #0000001a,0 3.6px 13px #00000012,0 8.4px 23px #0000000f,0 23px 35px #0000000d;-webkit-clip-path:polygon(-50px 1px,calc(100% + 50px) 1px,calc(100% + 50px) calc(100% + 50px),-50px calc(100% + 50px));clip-path:polygon(-50px 1px,calc(100% + 50px) 1px,calc(100% + 50px) calc(100% + 50px),-50px calc(100% + 50px))}.kbnTypeahead{max-height:60vh}.kbnTypeahead .kbnTypeahead__popover{background-color:#fff;border:1px solid #d3dae6;color:#343741;max-height:inherit;overflow-y:auto;position:relative;scrollbar-color:#69707d80 #0000;scrollbar-width:thin;width:100%;z-index:2000}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar{height:16px;width:16px}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-thumb{background-clip:content-box;background-color:#69707d80;border:6px solid #0000;border-radius:16px}.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-corner,.kbnTypeahead .kbnTypeahead__popover::-webkit-scrollbar-track{background-color:#0000}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item{border-bottom:none;font-size:12px;height:32px;line-height:normal;padding:0;vertical-align:middle;white-space:nowrap}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:hover{cursor:pointer}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:last-child{border-bottom:none;border-radius:0 0 6px 6px}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item:first-child{border-bottom:none}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active{background-color:#f5f7fa}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__callout{background:#fff}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__text,.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem__type{color:#000}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--field .kbnSuggestionItem__type{background-color:#fff3d0}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--value .kbnSuggestionItem__type{background-color:#ccf2f0}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--operator .kbnSuggestionItem__type{background-color:#cce4f5}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--conjunction .kbnSuggestionItem__type{background-color:#e9e2f1}.kbnTypeahead .kbnTypeahead__popover .kbnTypeahead__item.active .kbnSuggestionItem--recentSearch .kbnSuggestionItem__type{background-color:#eaecf0}.kbnSuggestionItem{align-items:center;display:inline-flex;font-size:12px;white-space:nowrap;width:100%}.kbnSuggestionItem.kbnSuggestionItem--field .kbnSuggestionItem__type{background-color:#fff9e8;color:#8a6a0a}.kbnSuggestionItem.kbnSuggestionItem--value .kbnSuggestionItem__type{background-color:#e6f9f7;color:#007e77}.kbnSuggestionItem.kbnSuggestionItem--operator .kbnSuggestionItem__type{background-color:#e6f1fa;color:#006bb8}.kbnSuggestionItem.kbnSuggestionItem--conjunction .kbnSuggestionItem__type{background-color:#f4f1f8;color:#7c609e}.kbnSuggestionItem.kbnSuggestionItem--recentSearch .kbnSuggestionItem__type{background-color:#f5f6f7;color:#6a717d}.kbnSuggestionItem__description,.kbnSuggestionItem__text,.kbnSuggestionItem__type{padding-right:16px}.kbnSuggestionItem__type{align-items:center;display:flex;flex-basis:auto;flex-direction:column;flex-grow:0;flex-shrink:0;height:32px;justify-content:center;overflow:hidden;padding:4px;text-align:center;width:32px}.kbnSuggestionItem__text{color:#343741;font-family:Roboto Mono,Consolas,Menlo,Courier,monospace;min-width:250px;overflow:hidden;padding-left:8px;text-overflow:ellipsis}.kbnSuggestionItem__description{color:#69707d;flex-shrink:1}.kbnSuggestionItem__description,.kbnSuggestionItem__description>p{overflow:hidden;text-overflow:ellipsis}.kbnSuggestionItem__description:empty{width:0}.kbnSuggestionItem__callout{background:#f5f7fa;color:#000;display:inline-block;font-family:Roboto Mono,Consolas,Menlo,Courier,monospace;padding:0 4px}",""]),e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryStringInput",(function(){return u})),n.d(t,"SearchBar",(function(){return d})),n.d(t,"FilterItem",(function(){return p.b})),n.d(t,"FilterItems",(function(){return p.c})),n.d(t,"FilterBadgeGroup",(function(){return b.b})),n.d(t,"DataViewPicker",(function(){return g.a})),n.d(t,"DataViewSelector",(function(){return g.b})),n.d(t,"DataViewsList",(function(){return g.c})),n.d(t,"ACTION_GLOBAL_APPLY_FILTER",(function(){return S})),n.d(t,"UPDATE_FILTER_REFERENCES_ACTION",(function(){return T})),n.d(t,"UPDATE_FILTER_REFERENCES_TRIGGER",(function(){return j})),n.d(t,"createSearchBar",(function(){return G})),n.d(t,"QuerySuggestionTypes",(function(){return z.a})),n.d(t,"plugin",(function(){return ee}));var r=n(0),o=n.n(r),a=n(1);const i=()=>Object(a.jsx)("div",null),s=o.a.lazy((()=>Promise.all([n.e(3),n.e(14)]).then(n.bind(null,135)))),u=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(i,null)},Object(a.jsx)(s,e)),c=()=>Object(a.jsx)("div",null),l=o.a.lazy((()=>Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(4),n.e(7)]).then(n.bind(null,141)))),d=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(c,null)},Object(a.jsx)(l,e));var p=n(15),b=n(23),g=n(14),f=n(5),h=n(12),y=n(28),_=n(6);const m=()=>Object(a.jsx)("div",null),v=o.a.lazy((()=>n.e(15).then(n.bind(null,137)))),k=(e,t,n,r)=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(m,null)},Object(a.jsx)(v,{indexPatterns:t,filters:e,onCancel:n,onSubmit:r})),S="ACTION_GLOBAL_APPLY_FILTER";async function x(e){return void 0!==e.filters}const T="UPDATE_FILTER_REFERENCES_ACTION",j="UPDATE_FILTER_REFERENCES_TRIGGER",I={id:j,title:f.i18n.translate("unifiedSearch.triggers.updateFilterReferencesTrigger",{defaultMessage:"Update filter references"}),description:f.i18n.translate("unifiedSearch.triggers.updateFilterReferencesTriggerDescription",{defaultMessage:"Update filter references"})};var w=n(7),O=n.n(w),E=n(4),P=n(9);const R=e=>{const[t,n]=Object(r.useState)(e.filters||e.filterManager.getFilters());return Object(r.useEffect)((()=>{const t=new P.Subscription;return t.add(e.filterManager.getUpdates$().subscribe({next:()=>{const t=e.filterManager.getFilters();n(t)}})),()=>{t.unsubscribe()}}),[e.filterManager]),{filters:t}},C=e=>{const t={from:e.dateRangeFrom||e.timefilter.getTime().from,to:e.dateRangeTo||e.timefilter.getTime().to},n={value:e.refreshInterval||e.timefilter.getRefreshInterval().value,pause:e.isRefreshPaused||e.timefilter.getRefreshInterval().pause},[o,a]=Object(r.useState)(t),[i,s]=Object(r.useState)(n);return Object(r.useEffect)((()=>{const t=new P.Subscription;return t.add(e.timefilter.getRefreshIntervalUpdate$().subscribe({next:()=>{const t=e.timefilter.getRefreshInterval();s(t)}})),t.add(e.timefilter.getTimeUpdate$().subscribe({next:()=>{a(e.timefilter.getTime())}})),()=>{t.unsubscribe()}}),[e.timefilter]),{refreshInterval:i,timeRange:o}},M=(e,t)=>{const{timefilter:{timefilter:n},filterManager:r,queryString:o}=e;t.attributes.timefilter&&(n.setTime({from:t.attributes.timefilter.from,to:t.attributes.timefilter.to}),t.attributes.timefilter.refreshInterval&&n.setRefreshInterval(t.attributes.timefilter.refreshInterval)),o.setQuery(t.attributes.query);const a=t.attributes.filters||[],i=r.getGlobalFilters();r.setFilters([...i,...a])},q=e=>{e.filterManager.removeAll(),e.queryString.clearQuery()},D=e=>{const[t,n]=Object(r.useState)();return Object(r.useEffect)((()=>{e.savedQueryId?(async t=>{try{const r=await e.queryService.savedQueries.getSavedQuery(t);r&&r.id===t&&(n(r),M(e.queryService,r))}catch(r){n(void 0),q(e.queryService),e.notifications.toasts.addWarning({title:f.i18n.translate("unifiedSearch.search.unableToGetSavedQueryToastTitle",{defaultMessage:"Unable to load query {savedQueryId}",values:{savedQueryId:t}}),text:`${r.message}`})}})(e.savedQueryId):n(void 0)}),[e.notifications.toasts,e.queryService,e.queryService.savedQueries,e.savedQueryId]),{savedQuery:t,setSavedQuery:t=>{n(t),M(e.queryService,t)},clearSavedQuery:()=>{n(void 0),q(e.queryService)}}},Q=e=>{const[t,n]=Object(r.useState)(e.query||e.queryStringManager.getQuery());Object(r.useEffect)((()=>{const t=new P.Subscription;return t.add(e.queryStringManager.getUpdates$().subscribe({next:()=>{const t=e.queryStringManager.getQuery();n(t)}})),()=>{t.unsubscribe()}}),[e.queryStringManager]);const o=(a=t,Boolean(a&&"query"in a));var a;return{query:Object(r.useMemo)((()=>o?{language:t.language,query:t.query}:t),[o,t])}},F=(e,t)=>n=>{t?t(n):e.filterManager.setFilters(n)},A=(e,t)=>{const{timefilter:n}=e.timefilter;return e=>{n.setRefreshInterval({value:e.refreshInterval,pause:e.isPaused}),t&&t({refreshInterval:e.refreshInterval,isPaused:e.isPaused})}},B=(e,t,n)=>{if(!e.useDefaultBehaviors)return e.onQuerySubmit;const{timefilter:r}=t.timefilter;return o=>{Object(E.isEqual)(r.getTime(),o.dateRange)&&Object(E.isEqual)(o.query,n)?e.onQuerySubmit&&e.onQuerySubmit({dateRange:r.getTime(),query:n},!1):(r.setTime(o.dateRange),o.query?t.queryString.setQuery(o.query):t.queryString.clearQuery())}},L=(e,t)=>e.useDefaultBehaviors?()=>{t(),e.onSavedQueryIdChange&&e.onSavedQueryIdChange()}:e.onClearSavedQuery,U=(e,t)=>e.useDefaultBehaviors?n=>{t(n),e.onSavedQueryIdChange&&e.onSavedQueryIdChange(n.id)}:e.onSavedQueryUpdated,N=e=>e.useDefaultBehaviors?{}:e;function G({core:e,storage:t,data:n,usageCollection:o,isScreenshotMode:i=!1,unifiedSearch:s}){return u=>{const{useDefaultBehaviors:c}=u,l=Object(r.useRef)(u.onQuerySubmit);Object(r.useEffect)((()=>{l.current=u.onQuerySubmit}),[u.onQuerySubmit]);const{filters:p}=R({filters:u.filters,filterManager:n.query.filterManager}),{query:b}=Q({query:u.query,queryStringManager:n.query.queryString}),{timeRange:g,refreshInterval:f}=C({dateRangeFrom:u.dateRangeFrom,dateRangeTo:u.dateRangeTo,refreshInterval:u.refreshInterval,isRefreshPaused:u.isRefreshPaused,timefilter:n.query.timefilter.timefilter}),{savedQuery:y,setSavedQuery:_,clearSavedQuery:m}=D({queryService:n.query,savedQueryId:u.savedQueryId,notifications:e.notifications});return Object(r.useEffect)((()=>{c&&l.current&&l.current({dateRange:g,query:b},!0)}),[b,g,c]),Object(a.jsx)(h.KibanaContextProvider,{services:{appName:u.appName,data:n,storage:t,usageCollection:o,unifiedSearch:s,...e}},Object(a.jsx)(e.i18n.Context,null,Object(a.jsx)(d,O()({showAutoRefreshOnly:u.showAutoRefreshOnly,showDatePicker:u.showDatePicker,showFilterBar:u.showFilterBar,showQueryMenu:u.showQueryMenu,showQueryInput:u.showQueryInput,showSaveQuery:u.showSaveQuery,showSubmitButton:u.showSubmitButton,submitButtonStyle:u.submitButtonStyle,isDisabled:u.isDisabled,screenTitle:u.screenTitle,indexPatterns:u.indexPatterns,indicateNoData:u.indicateNoData,timeHistory:n.query.timefilter.history,dateRangeFrom:g.from,dateRangeTo:g.to,refreshInterval:f.value,isRefreshPaused:f.pause,filters:p,query:b,onFiltersUpdated:F(n.query,u.onFiltersUpdated),onRefreshChange:u.isAutoRefreshDisabled?void 0:A(n.query,u.onRefreshChange),savedQuery:y,onQuerySubmit:B(u,n.query,b),onRefresh:u.onRefresh,onClearSavedQuery:L(u,m),onSavedQueryUpdated:U(u,_),onSaved:U(u,_),iconType:u.iconType,nonKqlMode:u.nonKqlMode,customSubmitButton:u.customSubmitButton,dataViewPickerOverride:u.dataViewPickerOverride,isClearable:u.isClearable,placeholder:u.placeholder},N(u),{dataViewPickerComponentProps:u.dataViewPickerComponentProps,textBasedLanguageModeErrors:u.textBasedLanguageModeErrors,onTextBasedSavedAndExit:u.onTextBasedSavedAndExit,displayStyle:u.displayStyle,isScreenshotMode:i,dataTestSubj:u.dataTestSubj,filtersForSuggestions:u.filtersForSuggestions,prependFilterBar:u.prependFilterBar}))))}}var z=n(22),V=n(3),$=n.n(V),K=n(8),Y=n(21),H=n(25);const J=()=>Object(a.jsx)("div",null),W=o.a.lazy((()=>n.e(21).then(n.bind(null,138)))),X=e=>Object(a.jsx)(o.a.Suspense,{fallback:Object(a.jsx)(J,null)},Object(a.jsx)(W,e));var Z=n(27);n(31);class plugin_UnifiedSearchPublicPlugin{constructor(e){$()(this,"storage",void 0),$()(this,"autocomplete",void 0),$()(this,"usageCollection",void 0),this.storage=new K.Storage(window.localStorage),this.autocomplete=new H.a(e)}setup(e,{uiActions:t,data:r,usageCollection:o}){const{query:a}=r;var i;return t.registerTrigger(I),t.registerAction(function(e,t,r){return{type:S,id:S,order:100,getIconType:()=>"filter",getDisplayName:()=>f.i18n.translate("unifiedSearch.filter.applyFilterActionTitle",{defaultMessage:"Apply filter to current view"}),isCompatible:x,execute:async({filters:o,timeFieldName:a,controlledBy:i})=>{if(!o)throw new Error("Applying a filter requires a filter");if(!await x({filters:o}))throw new y.IncompatibleActionError;let s=o;if(s.length>1){const e=await Promise.all(o.map((e=>Object(_.a)().get(e.meta.index)))),t=new Promise((t=>{const n=Object(_.b)().openModal(Object(h.toMountPoint)(k(o,e,(()=>{n.close(),t([])}),(e=>{n.close(),t(e)})),{theme$:r.theme$}),{"data-test-subj":"test"})}));s=await t}if(i&&e.getFilters().forEach((t=>{t.meta.controlledBy===i&&e.removeFilter(t)})),a){const{extractTimeFilter:r}=await Promise.resolve().then(n.t.bind(null,37,7)),{timeRangeFilter:o,restOfFilters:i}=r(a,s);e.addFilters(i),o&&async function(e,t){const{convertRangeFilterToTimeRange:r}=await Promise.resolve().then(n.t.bind(null,37,7));e.setTime(r(t))}(t,o)}else e.addFilters(s)}}}(a.filterManager,a.timefilter.timefilter,e.theme)),t.registerAction((i=a.filterManager,{type:T,id:T,execute:async({fromDataView:e,toDataView:t,usedDataViews:n,defaultDataView:r})=>{const o=n.filter((t=>t===e)).length,a=i.getFilters();o>1||!a.length||!e||(e&&!t&&(n.length>1&&(t=n.filter((t=>t!==e))[0]),!t&&r&&(t=r)),t&&i.setFilters(a.map((n=>n.meta.index===e?{...n,meta:{...n.meta,index:t}}:n))))}})),this.usageCollection=o,{autocomplete:this.autocomplete.setup(e,{timefilter:a.timefilter,usageCollection:o})}}start(e,{data:t,dataViews:n,uiActions:r,screenshotMode:o}){Object(_.f)(e.theme),Object(_.e)(e.overlays),Object(_.d)(n);const i=this.autocomplete.start(),s=n=>G({core:e,data:null!=n?n:t,storage:this.storage,usageCollection:this.usageCollection,isScreenshotMode:Boolean(null==o?void 0:o.isScreenshotMode()),unifiedSearch:{autocomplete:i}}),u=s();return r.attachAction(Y.APPLY_FILTER_TRIGGER,S),r.attachAction(j,T),{ui:{IndexPatternSelect:(c=n,e=>Object(a.jsx)(X,O()({},e,{indexPatternService:c}))),SearchBar:u,getCustomSearchBar:s,AggregateQuerySearchBar:u,FiltersBuilderLazy:Z.b},autocomplete:i};var c}stop(){this.autocomplete.clearProviders()}}function ee(e){return new plugin_UnifiedSearchPublicPlugin(e)}},function(e,t){e.exports=__kbnSharedDeps__.KbnEsQuery},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t){e.exports=__kbnSharedDeps__.Classnames},,,function(e,t){e.exports=__kbnSharedDeps__.TsLib},,,,function(e,t){e.exports=__kbnSharedDeps__.EmotionCache},function(e,t,n){n.r(t);var r=__kbnBundles__.get("plugin/textBasedLanguages/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(r))},function(e,t){e.exports=__kbnSharedDeps__.KbnMonaco},function(e,t){e.exports=__kbnSharedDeps__.KbnUiTheme}]);