/*! 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.dataVisualizer_bundle_jsonpfunction=window.dataVisualizer_bundle_jsonpfunction||[]).push([[2],{103:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(9),r=a(27),i=(a(0),a(3)),o=a(2);const s=({totalCount:e,approximate:t,loading:a})=>Object(o.jsx)(n.EuiFlexItem,{grow:!1,style:{flexDirection:"row"}},Object(o.jsx)(n.EuiText,{size:"s","data-test-subj":"dataVisualizerTotalDocCountHeader",textAlign:"center"},Object(o.jsx)(r.FormattedMessage,{id:"xpack.dataVisualizer.searchPanel.totalDocCountLabel",defaultMessage:"Total documents: {prepend}{strongTotalCount}",values:{prepend:!a&&t?"~":"",strongTotalCount:a?Object(o.jsx)(n.EuiLoadingSpinner,{size:"s"}):Object(o.jsx)("strong",{"data-test-subj":"dataVisualizerTotalDocCount"},Object(o.jsx)(r.FormattedMessage,{id:"xpack.dataVisualizer.searchPanel.totalDocCountNumber",defaultMessage:"{totalCount, plural, one {#} other {#}}",values:{totalCount:t?e.toPrecision(3):e}}))}})),t?Object(o.jsx)(n.EuiIconTip,{content:i.i18n.translate("xpack.dataVisualizer.searchPanel.randomSamplerMessage",{defaultMessage:"Approximate values are shown in the total document count and chart, which use random sampler aggregations."}),position:"right",type:"iInCircle"}):null)},104:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(61),i=a(9),o=a(3),s=a(73),l=a(27),u=a(69),c=a(2);const d=({samplingProbability:e,setSamplingProbability:t})=>{const[a,d]=Object(n.useState)(e),f=!Object(r.a)(a)||isNaN(a)||a.5,m=100*(null!=a?a:u.a);return Object(c.jsx)(i.EuiFlexItem,{grow:!0},Object(c.jsx)(i.EuiSpacer,{size:"m"}),Object(c.jsx)(i.EuiFormRow,{fullWidth:!0,label:o.i18n.translate("xpack.dataVisualizer.randomSamplerSettingsPopUp.randomSamplerPercentageRowLabel",{defaultMessage:"Sampling percentage"}),helpText:o.i18n.translate("xpack.dataVisualizer.randomSamplerSettingsPopUp.randomSamplerPercentageRowHelpText",{defaultMessage:"Choose a value between 0.001% and 50% to randomly sample data."})},Object(c.jsx)(i.EuiRange,{fullWidth:!0,showValue:!0,showRange:!0,showLabels:!0,showInput:"inputWithPopover",min:u.e,max:50,value:m>=1?Object(s.a)(m,0):Object(s.a)(m,3),ticks:u.c.map((e=>({value:e,label:.001===e||e>=5?`${e}`:""}))),isInvalid:f,onChange:e=>{const t=parseFloat(e.target.value),n=a?100*a:t;if(t>0&&t<=1)d(t/100);else{const e=t>n?Math.ceil(t):Math.floor(t);d(e/100)}},step:u.e,"data-test-subj":"dvRandomSamplerProbabilityRange",append:Object(c.jsx)(i.EuiButton,{disabled:f,onClick:()=>{t&&Object(r.a)(a)&&t(a)}},Object(c.jsx)(l.FormattedMessage,{id:"xpack.dataVisualizer.randomSamplerSettingsPopUp.randomSamplerPercentageApply",defaultMessage:"Apply"}))})))}},105:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(61),r=a(9),i=a(27),o=(a(0),a(2));const s=({samplingProbability:e})=>Object(n.a)(e)?Object(o.jsx)("div",{"data-test-subj":"dvRandomSamplerProbabilityUsedMsg"},Object(o.jsx)(r.EuiSpacer,{size:"m"}),Object(o.jsx)(i.FormattedMessage,{id:"xpack.dataVisualizer.randomSamplerSettingsPopUp.probabilityLabel",defaultMessage:"Probability used: {samplingProbability}%",values:{samplingProbability:100*e}})):null},106:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(3),r=a(0),i=a(61),o=a(83),s=a(56),l=a(2);const u=({searchQuery:e,searchString:t,searchQueryLanguage:a,dataView:u,setSearchParams:c})=>{const{services:{uiSettings:d,notifications:{toasts:f},data:{query:m},unifiedSearch:{ui:{SearchBar:g}}}}=Object(s.a)(),[b,p]=Object(r.useState)({query:t||"",language:a});Object(r.useEffect)((()=>{p({query:t||"",language:a})}),[a,t,m.filterManager]);const h=({query:e,filters:t})=>{const a=Object(i.a)(e)?e:b,r=Object(i.a)(t)?t:m.filterManager.getFilters();try{var s;r&&m.filterManager.setFilters(r);const e=Object(o.a)(a,null!==(s=m.filterManager.getFilters())&&void 0!==s?s:[],u,d);c({searchQuery:e,searchString:a.query,queryLanguage:a.language,filters:r})}catch(e){console.log("Invalid syntax",JSON.stringify(e,null,2)),f.addError(e,{title:n.i18n.translate("xpack.dataVisualizer.searchPanel.invalidSyntax",{defaultMessage:"Invalid syntax"})})}};return Object(l.jsx)(g,{dataTestSubj:"dataVisualizerQueryInput",appName:"dataVisualizer",showFilterBar:!0,showDatePicker:!1,showQueryInput:!0,query:b,onQuerySubmit:e=>h({query:e.query}),onFiltersUpdated:e=>h({filters:e}),indexPatterns:[u],placeholder:n.i18n.translate("xpack.dataVisualizer.searchPanel.queryBarPlaceholderText",{defaultMessage:'Search… (e.g. status:200 AND extension:"PHP")'}),displayStyle:"inPage",isClearable:!0,customSubmitButton:Object(l.jsx)("div",null)})}},108:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(3);function r(e,t,a){var r,i;500===a.statusCode?e.addError(a,{title:n.i18n.translate("xpack.dataVisualizer.index.dataLoader.internalServerErrorMessage",{defaultMessage:"Error loading data in index {index}. {message}. The request may have timed out. Try using a smaller sample size or narrowing the time range.",values:{index:t,message:null!==(r=a.error)&&void 0!==r?r:a.message}})}):e.addError(a,{title:n.i18n.translate("xpack.dataVisualizer.index.errorLoadingDataMessage",{defaultMessage:"Error loading data in index {index}. {message}.",values:{index:t,message:null!==(i=a.error)&&void 0!==i?i:a.message}})})}},115:function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(0);const r="histogram:barTarget",i="histogram:maxBars";var o=a(52),s=a(31),l=a(6),u=a(29),c=a.n(u),d=a(33),f=a.n(d);const m=new RegExp("^([0-9]*)\\s*("+f.a.units.join("|")+")$"),g=["ms","s","m","h"],b=["ms","s","m","h","d"],{duration:p}=c.a,h=f.a.unitsDesc,j=h.indexOf("w"),v=function(){const e=[[p(500,"ms"),p(100,"ms")],[p(5,"second"),p(1,"second")],[p(10,"second"),p(5,"second")],[p(15,"second"),p(10,"second")],[p(30,"second"),p(15,"second")],[p(1,"minute"),p(30,"second")],[p(5,"minute"),p(1,"minute")],[p(10,"minute"),p(5,"minute")],[p(15,"minute"),p(10,"minute")],[p(30,"minute"),p(10,"minute")],[p(1,"hour"),p(30,"minute")],[p(2,"hour"),p(1,"hour")],[p(4,"hour"),p(2,"hour")],[p(6,"hour"),p(4,"hour")],[p(8,"hour"),p(6,"hour")],[p(12,"hour"),p(8,"hour")],[p(24,"hour"),p(12,"hour")],[p(2,"d"),p(1,"d")],[p(4,"d"),p(2,"d")],[p(1,"week"),p(4,"d")],[p(1,"month"),p(1,"week")],[p(1,"year"),p(1,"month")],[1/0,p(1,"year")]].slice(0).reverse();function t(e,t,a){return function(n,r){const i=function(n,r){const i=r/n;let o;for(let n=0;na){if(e===1/0)return t;const n=e.asMilliseconds(),r=t.asMilliseconds();return Math.abs(n-a)<=Math.abs(r)?e:t}}),!0),lessThan:t(e,(function(e,t,a){if(t=1&&Math.floor(n)===n){if(t<=j)continue;return{value:n,unit:a,expression:n+a}}}const t=e.as("ms");return{value:t,unit:"ms",expression:t+"ms"}}(e);e.esValue=a.value,e.esUnit=a.unit,e.expression=a.expression,e.overflow=t>e&&c.a.duration(e-t);const n=c.a.normalizeUnits(a.unit);return 1===a.value?e.description=n:e.description=`${a.value} ${n}s`,e}function y(e){return e&&"isValid"in e&&e.isValid()}O.prototype.setBarTarget=function(e){this.barTarget=e},O.prototype.setMaxBars=function(e){this.maxBars=e},O.prototype.setBounds=function(e){if(!e)return this.clearBounds();let t;t=Object(l.isPlainObject)(e)?[e.min,e.max]:Array.isArray(e)?e:[];const a=Object(l.sortBy)(t.map(Object(l.ary)(c.a,1)),Number);if(2!==a.length||!a.every(y))throw this.clearBounds(),new Error("invalid bounds set: "+e);if(this._lb=a.shift(),this._ub=a.pop(),this.getDuration().asSeconds()<0)throw new TypeError("Intervals must be positive")},O.prototype.clearBounds=function(){this._lb=this._ub=null},O.prototype.hasBounds=function(){return y(this._ub)&&y(this._lb)},O.prototype.getBounds=function(){if(this.hasBounds())return{min:this._lb,max:this._ub}},O.prototype.getDuration=function(){if(this.hasBounds())return c.a.duration(this._ub-this._lb,"ms")},O.prototype.setInterval=function(e){this.originalInterval=e;let t=e;if(t&&"auto"!==t){if(Object(l.isString)(t)&&(e=t,t=function(e,t=!1){const a=String(e).trim().match(m);if(!Array.isArray(a)||a.length<3)return null;try{const e=parseInt(a[1],10),n=a[2];return isNaN(e)||e<1&&-1===g.indexOf(n)||!0===t&&-1===b.indexOf(n)?null:Object(u.duration)(e,n)}catch(e){return null}}(t),0==+t&&(t=null)),!c.a.isDuration(t))throw new TypeError('"'+e+'" is not a valid interval.');this._i=t}else this._i="auto"},O.prototype.getInterval=function(){const e=this,t=e.getDuration();return S(function(a){if(!e.hasBounds())return a;const n=e.maxBars;let r;return t/a>n?(r=v.lessThan(n,t),+r==+a?a:(S(a,t),Object(l.assign)(r,{preScaled:a,scale:a/r,scaled:!0}))):a}(function(){const a=e._i;return c.a.isDuration(a)?a:v.near(e.barTarget,t)}()),t)},O.prototype.getIntervalToNearestMultiple=function(e){const t=this.getInterval(),a=t.asSeconds(),n=a%e;if(0===n)return t;let r=n>e/2?a+e-n:a-n;r=0===r?e:r;const i=c.a.duration(r,"seconds");S(i,this.getDuration());const o=t.preScaled;return void 0!==o&&o=0;a--){const n=t[a];if(!n[0]||e>=c.a.duration(n[0]))return n[1]}return this._timeBucketsConfig.dateFormat},O.prototype.getScaledDateFormatter=function(){return new(this._fieldFormats.getType(o.FIELD_FORMAT_IDS.DATE))({pattern:this.getScaledDateFormat()},this._timeBucketsConfig)};var x=a(56);const M=()=>{const{uiSettings:e}=Object(x.a)().services;return Object(n.useMemo)((()=>new O({[i]:e.get(i),[r]:e.get(r),dateFormat:e.get("dateFormat"),"dateFormat:scaled":e.get("dateFormat:scaled")})),[e])}},65:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"f",(function(){return b})),a.d(t,"b",(function(){return V})),a.d(t,"d",(function(){return G})),a.d(t,"e",(function(){return g})),a.d(t,"c",(function(){return Q}));var n=a(0),r=a.n(n),i=a(2);const o=Object(n.createContext)(void 0),s=()=>{const e=Object(n.useContext)(o);if(void 0===e)throw new Error("datePickerContext was used outside of its Provider");return e},l=e=>{const{children:t,...a}=e;return Object(i.jsx)(o.Provider,{value:a},t)};var u=a(62),c=a.n(u),d=a(13),f=a(14),m=a(6);const g=new d.Subject,b=(e={})=>{const{timeRangeSelector:t,autoRefreshSelector:a}=e,{data:{query:{timefilter:{timefilter:r}}}}=s();return Object(n.useEffect)((()=>{!0!==t||r.isTimeRangeSelectorEnabled()?!1===t&&r.isTimeRangeSelectorEnabled()&&r.disableTimeRangeSelector():r.enableTimeRangeSelector(),!0!==a||r.isAutoRefreshSelectorEnabled()?!1===a&&r.isAutoRefreshSelectorEnabled()&&r.disableAutoRefreshSelector():r.enableAutoRefreshSelector()}),[t,a,r]),r};var p=a(9),h=a(3),j=a(27),v=a(15),O=a(38),S=a.n(O),y=a(76),x=a.n(y),M=a(51),E=a.n(M);let R;!function(e){e.preboot="preboot",e.standard="standard"}(R||(R={}));const T="eui-global",k="eui-utilities",P={darkMode:!1},F=E()({key:"css",container:document.querySelector('meta[name="emotion"]')}),w=E()({key:T,container:document.querySelector(`meta[name="${T}"]`)}),I=E()({key:k,container:document.querySelector(`meta[name="${k}"]`)});F.compat=!0,w.compat=!0,I.compat=!0;const _={default:F,global:w,utility:I},C=({theme:{theme$:e},globalStyles:t,colorMode:a,children:r})=>{const o=c()(e,P),s=Object(n.useMemo)((()=>(e=>e.darkMode?p.COLOR_MODES_STANDARD.dark:p.COLOR_MODES_STANDARD.light)(o)),[o]),l=a||s,u=!1!==t&&void 0;return Object(i.jsx)(p.EuiProvider,{cache:_,colorMode:l,globalStyles:u,utilityClasses:u},r)},A=({children:e,i18n:t,...a})=>Object(i.jsx)(C,a,Object(i.jsx)(t.Context,null,e)),D=({children:e,...t})=>Object(i.jsx)(A,x()({globalStyles:!1},t),Object(i.jsx)(p.EuiErrorBoundary,null,e));a(1);class mount_point_portal_MountPointPortalErrorBoundary extends n.Component{constructor(...e){super(...e),definePropertyfrom_dll_reference_kbnSharedDeps_npm_default()(this,"state",{error:void 0})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(){}render(){return this.state.error?Object(i.jsx)("p",null,h.i18n.translate("reactPackages.mountPointPortal.errorMessage",{defaultMessage:"Error rendering portal content"})):this.props.children}}const z=5e3;function B(e){g.next({lastRefresh:Date.now(),...e?{timeRange:e}:{}})}const V=e=>{var t,a,o;const{isAutoRefreshOnly:l,isLoading:u=!1,showRefresh:g,width:O,flexGroup:y=!0}=e,{data:x,notifications:{toasts:M},uiSettings:E,uiSettingsKeys:R,theme:T,i18n:k}=s(),P=Object(p.useIsWithinMaxBreakpoint)("l"),{timefilter:F,history:w}=x.query.timefilter,[I,_]=Object(v.f)("_g"),C=(A=w,function(){var e,t;return null!==(e=null===(t=A.get())||void 0===t?void 0:t.map((({from:e,to:t})=>({start:e,end:t}))))&&void 0!==e?e:[]});var A;const V=(()=>{const e=b(),t=Object(n.useMemo)((()=>e.getRefreshIntervalUpdate$().pipe(Object(f.map)(e.getRefreshInterval))),[e]);return c()(t,e.getRefreshInterval())})(),L=((e=!1)=>{const t=b(),a=Object(n.useMemo)((()=>e?t.getAbsoluteTime.bind(t):t.getTime.bind(t)),[e,t]),r=Object(n.useMemo)((()=>t.getTimeUpdate$().pipe(Object(f.map)(a),Object(f.distinctUntilChanged)(m.isEqual))),[t,a]);return c()(r,a())})();Object(n.useEffect)((function(){void 0!==(null==I?void 0:I.time)&&F.setTime({from:I.time.from,to:I.time.to})}),[null==I||null===(t=I.time)||void 0===t?void 0:t.from,null==I||null===(a=I.time)||void 0===a?void 0:a.to,null==I||null===(o=I.time)||void 0===o?void 0:o.ts]),Object(n.useEffect)((function(){var e,t;void 0!==(null==I?void 0:I.refreshInterval)&&F.setRefreshInterval({pause:!(null==I||null===(e=I.refreshInterval)||void 0===e||!e.pause),value:null==I||null===(t=I.refreshInterval)||void 0===t?void 0:t.value})}),[null==I?void 0:I.refreshInterval]);const N=Object(n.useCallback)(Object(m.debounce)((e=>{_("refreshInterval",e,!0)}),200),[_]),[U,q]=Object(n.useState)(C()),[Q,G]=Object(n.useState)(F.isAutoRefreshSelectorEnabled()),[$,W]=Object(n.useState)(F.isTimeRangeSelectorEnabled()),K=V;Object(n.useEffect)((function(){const e=!(null==I||!I.refreshInterval);var t,a;K.value(S.a.render(Object(i.jsx)(D,a,t),e),()=>S.a.unmountComponentAtNode(e)))},{toastLifeTimeMs:3e4})}),[JSON.stringify(K),JSON.stringify(null==I?void 0:I.refreshInterval),N]);const X=E.get("dateFormat"),H=E.get(R.TIMEPICKER_QUICK_RANGES),J=Object(n.useMemo)((()=>H.map((({from:e,to:t,display:a})=>({start:e,end:t,label:a})))),[H]);Object(n.useEffect)((()=>{const e=new d.Subscription,t=F.getEnabledUpdated$();return void 0!==t&&e.add(t.subscribe((e=>{G(F.isAutoRefreshSelectorEnabled()),W(F.isTimeRangeSelectorEnabled())}))),function(){e.unsubscribe()}}),[]);const Y=Object(n.useCallback)((({start:e,end:t})=>{q(C()),_("time",{from:e,to:t,..."now"===e||"now"===t?{ts:Date.now()}:{}})}),[_]),Z=Object(i.jsx)(r.a.Fragment,null,Object(i.jsx)(p.EuiFlexItem,null,Object(i.jsx)(p.EuiSuperDatePicker,{isLoading:u,start:L.from,end:L.to,isPaused:K.pause,isAutoRefreshOnly:!$||l,refreshInterval:K.value||z,onTimeChange:Y,onRefresh:B,onRefreshChange:function({isPaused:e,refreshInterval:t}){!1===e&&t<=0&&N({pause:e,value:5e3}),N({pause:e,value:t})},recentlyUsedRanges:U,dateFormat:X,commonlyUsedRanges:J,updateButtonProps:{iconOnly:P,fill:!1},width:O})),!0!==g&&$?null:Object(i.jsx)(p.EuiFlexItem,{grow:!1},Object(i.jsx)(p.EuiButton,{fill:!1,color:"primary",iconType:"refresh",onClick:()=>B(),"data-test-subj":"mlDatePickerRefreshPageButton"+(u?" loading":" loaded"),isLoading:u},Object(i.jsx)(j.FormattedMessage,{id:"xpack.ml.datePicker.pageRefreshButton",defaultMessage:"Refresh"})))),ee=y?Object(i.jsx)(p.EuiFlexGroup,{gutterSize:"s",alignItems:"center"},Z):Z;return Q||$?ee:null};var L=a(29),N=a.n(L),U=(a(33),a(12)),q=a(60);const Q={EXCLUDE:"exclude-frozen",INCLUDE:"include-frozen"},G=e=>{const{frozenDataPreference:t,setFrozenDataPreference:a,timefilter:r,dataView:o,query:l,disabled:u,callback:c,apiPath:d}=e,{http:f,notifications:{toasts:m}}=s(),g=Object(n.useCallback)((async()=>{try{const e=await async function(e,t,a,n,r,i,o="/internal/file_upload/time_field_range"){try{const s=t.getRuntimeMappings(),l=await async function(e){const{http:t,path:a,...n}=e;return await t.fetch({path:a,method:"POST",body:JSON.stringify(n),version:"1"})}({index:t.getIndexPattern(),timeFieldName:t.timeFieldName,query:i?Object(q.c)(r):r,...Object(U.a)(s)?{runtimeMappings:s}:{},http:n,path:o});if(l.start.epoch&&l.end.epoch)return e.setTime({from:N()(l.start.epoch).toISOString(),to:N()(l.end.epoch).toISOString()}),l;if("number"==typeof l.start&&"number"==typeof l.end)return e.setTime({from:N()(l.start).toISOString(),to:N()(l.end).toISOString()}),{success:!0,start:{epoch:l.start,string:N()(l.start).toISOString()},end:{epoch:l.end,string:N()(l.end).toISOString()}};a.addWarning({title:h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.noResults",{defaultMessage:"No results match your search criteria"})})}catch(e){a.addDanger(h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.errorSettingTimeRangeNotification",{defaultMessage:"An error occurred setting the time range."}))}}(r,o,m,f,l,t===Q.EXCLUDE,d);"function"==typeof c&&void 0!==e&&c(e)}catch(e){m.addDanger(h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.errorSettingTimeRangeNotification",{defaultMessage:"An error occurred setting the time range."}))}}),[c,o,t,f,l,r,m,d]),[b,v]=Object(n.useState)(!1),O=Object(n.useCallback)((e=>{a(e),S()}),[a]),S=()=>{v(!1)},y=Object(n.useMemo)((()=>[{id:Q.EXCLUDE,label:h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.useFullDataExcludingFrozenMenuLabel",{defaultMessage:"Exclude frozen data tier"})},{id:Q.INCLUDE,label:h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.useFullDataIncludingFrozenMenuLabel",{defaultMessage:"Include frozen data tier"})}]),[]),x=Object(n.useMemo)((()=>Object(i.jsx)(p.EuiPanel,null,Object(i.jsx)(p.EuiRadioGroup,{options:y,idSelected:t,onChange:O,compressed:!0}))),[y,t,O]),M=Object(n.useMemo)((()=>t===Q.EXCLUDE?Object(i.jsx)(j.FormattedMessage,{id:"xpack.ml.datePicker.fullTimeRangeSelector.useFullDataExcludingFrozenButtonTooltip",defaultMessage:"Use full range of data excluding frozen data tier."}):Object(i.jsx)(j.FormattedMessage,{id:"xpack.ml.datePicker.fullTimeRangeSelector.useFullDataIncludingFrozenButtonTooltip",defaultMessage:"Use full range of data including frozen data tier, which might have slower search results."})),[t]);return Object(i.jsx)(p.EuiFlexGroup,{responsive:!1,gutterSize:"xs"},Object(i.jsx)(p.EuiToolTip,{content:M},Object(i.jsx)(p.EuiButton,{isDisabled:u,onClick:()=>g(),"data-test-subj":"mlDatePickerButtonUseFullData"},Object(i.jsx)(j.FormattedMessage,{id:"xpack.ml.datePicker.fullTimeRangeSelector.useFullDataButtonLabel",defaultMessage:"Use full data"}))),Object(i.jsx)(p.EuiFlexItem,{grow:!1},Object(i.jsx)(p.EuiPopover,{id:"mlFullTimeRangeSelectorOption",button:Object(i.jsx)(p.EuiButtonIcon,{display:"base",size:"m",iconType:"boxesVertical","aria-label":h.i18n.translate("xpack.ml.datePicker.fullTimeRangeSelector.moreOptionsButtonAriaLabel",{defaultMessage:"More options"}),onClick:()=>{v(!b)}}),isOpen:b,closePopover:S,panelPaddingSize:"none",anchorPosition:"downRight"},x)))}},69:function(e,t,a){"use strict";a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"e",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"d",(function(){return l}));var n=a(3);const r=[1e-5,5e-5,1e-4,5e-4,.001,.005,.01,.05,.1,.2,.3,.4,.5].map((e=>100*e)),i=1e-5,o=100*i,s={ON_AUTOMATIC:"on_automatic",ON_MANUAL:"on_manual",OFF:"off"},l=[{"data-test-subj":"dvRandomSamplerOptionOnAutomatic",value:s.ON_AUTOMATIC,text:n.i18n.translate("xpack.dataVisualizer.randomSamplerPreference.onAutomaticLabel",{defaultMessage:"On - automatic"})},{"data-test-subj":"dvRandomSamplerOptionOnManual",value:s.ON_MANUAL,text:n.i18n.translate("xpack.dataVisualizer.randomSamplerPreference.onManualLabel",{defaultMessage:"On - manual"})},{"data-test-subj":"dvRandomSamplerOptionOff",value:s.OFF,text:n.i18n.translate("xpack.dataVisualizer.randomSamplerPreference.offLabel",{defaultMessage:"Off"})}]},79:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return o}));const n="dataVisualizer.frozenDataTierPreference",r="dataVisualizer.randomSamplerPreference",i="dataVisualizer.randomSamplerPValue",o=[n,r,i]},82:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return c}));var n=a(0),r=a.n(n),i=a(6),o=a(61),s=a(2);const l=r.a.createContext({value:null,setValue(){throw new Error("MlStorageContext set method is not implemented")},removeValue(){throw new Error("MlStorageContext remove method is not implemented")}});function u({children:e,storage:t,storageKeys:a}){const r=Object(n.useMemo)((()=>a.reduce(((e,a)=>(e[a]=t.get(a),e)),{})),[t,a]),[u,c]=Object(n.useState)(r),d=Object(n.useCallback)(((e,a)=>{t.set(e,a),c((t=>({...t,[e]:a})))}),[t]),f=Object(n.useCallback)((e=>{t.remove(e),c((t=>Object(i.omit)(t,e)))}),[t]);Object(n.useEffect)((function(){const e=e=>{(function(e,t){return t.includes(e)})(e.key,a)&&(Object(o.a)(e.newValue)?c((t=>({...t,[e.key]:"string"==typeof e.newValue?JSON.parse(e.newValue):e.newValue}))):c((t=>Object(i.omit)(t,e.key))))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}),[a]);const m=Object(n.useMemo)((()=>({value:u,setValue:d,removeValue:f})),[u,d,f]);return Object(s.jsx)(l.Provider,{value:m},e)}function c(e,t){const{value:a,setValue:r,removeValue:i}=Object(n.useContext)(l);return[Object(n.useMemo)((()=>{var n;return null!==(n=null==a?void 0:a[e])&&void 0!==n?n:t}),[a,e,t]),Object(n.useCallback)((t=>{Object(o.a)(t)?r(e,t):i(e)}),[r,i,e])]}},83:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return u}));var n=a(6),r=a(39),i=a(31),o=a(36),s=a(60);function l(e,t,a,n){let o=Object(s.e)();if(Object(i.isQuery)(e)&&e.language===s.b.KUERY){const n=Object(r.fromKueryExpression)(e.query);if(""!==e.query&&(o=Object(r.toElasticsearchQuery)(n,a)),void 0!==o.bool){const e=Object(r.buildQueryFromFilters)(t,a);Array.isArray(o.bool.filter)||(o.bool.filter=void 0===o.bool.filter?[]:[o.bool.filter]),Array.isArray(o.bool.must_not)||(o.bool.must_not=void 0===o.bool.must_not?[]:[o.bool.must_not]),o.bool.filter=[...o.bool.filter,...e.filter],o.bool.must_not=[...o.bool.must_not,...e.must_not]}}else o=Object(r.buildEsQuery)(a,e?[e]:[],t||[],n?Object(i.getEsQueryConfig)(n):void 0);return o}function u({dataView:e,uiSettings:t,savedSearch:a,query:r,filters:u,filterManager:c}){if(!e||!a)return;const d=r,f=u,m=function(e){return e&&"searchSource"in e&&(null==e?void 0:e.searchSource)instanceof i.SearchSource?e.searchSource:void 0}(a);if(m&&void 0!==m.getParent()&&d){var g,b,p;const e=null!==(g=Object(n.cloneDeep)(null===(b=a.searchSource.getSearchRequestBody())||void 0===b?void 0:b.query))&&void 0!==g?g:Object(s.e)(),t=null===(p=a.searchSource.getField("index"))||void 0===p?void 0:p.timeFieldName;return Array.isArray(e.bool.filter)&&void 0!==t&&(e.bool.filter=e.bool.filter.filter((e=>{var a;return!(e.hasOwnProperty("range")&&null!==(a=e.range)&&void 0!==a&&a.hasOwnProperty(t))}))),{searchQuery:e,searchString:d.query,queryLanguage:d.language}}if(!a&&d)return c&&f&&c.addFilters(f),{searchQuery:l(d,Array.isArray(f)?f:[],e,t),searchString:d.query,queryLanguage:d.language};if(m){var h,j;const a=null==c?void 0:c.getGlobalFilters(),n=null!=d?d:m.getField("query"),r=null!=f?f:Object(o.mapAndFlattenFilters)(m.getField("filter"));return c&&c.setFilters(r),a&&(null==c||c.addFilters(a)),{searchQuery:l(n,c?null==c?void 0:c.getFilters():r,e,t),searchString:null!==(h=null==n?void 0:n.query)&&void 0!==h?h:"",queryLanguage:null!==(j=null==n?void 0:n.language)&&void 0!==j?j:"kuery",queryOrAggregateQuery:n}}}a(12)},94:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(10),r=a(7);function i(e){var t;let a;return e.type===n.b.STRING?(a=e.aggregatable?r.i.KEYWORD:r.i.TEXT,null!==(t=e.esTypes)&&void 0!==t&&t.includes(r.i.VERSION)&&(a=r.i.VERSION)):a=function(e){var t;return e.timeSeriesMetric||(null!==(t=e.type)&&void 0!==t?t:"string")}(e),a}}}]);