(window.dataViewEditor_bundle_jsonpfunction=window.dataViewEditor_bundle_jsonpfunction||[]).push([[1],{35:function(e,t,a){"use strict";a.r(t);var i=a(1),s=a.n(i),n=a(11),l=a(7),d=a(2),o=a(41),r=a.n(o),c=a(12),u=a.n(c),p=a(30),m=a(8),h=a.n(m),g=a(31),x=a.n(g),b=(a(36),a(0));let j=0;const f=Object(i.createContext)({addPanel:()=>()=>{}}),P=Object(i.createContext)({registerFooter:()=>{},registerContent:()=>{}}),E=({maxWidth:e,flyoutClassName:t,...a})=>{const s=Object(i.useMemo)((()=>{const e=document.getElementsByClassName(t);return 0===e.length?null:e.item(0)}),[t]),[n,l]=Object(i.useState)({}),o=Object(i.useCallback)((e=>{l((t=>{const{[e]:a,...i}=t;return i}))}),[]),r=Object(i.useCallback)((e=>{const t=j++;return l((a=>({...a,[t]:e}))),o.bind(null,t)}),[o]),c=Object(i.useMemo)((()=>({addPanel:r})),[r]);return Object(i.useLayoutEffect)((()=>{if(!s)return;const t=Math.min(100,Object.values(n).reduce(((e,{width:t=0})=>e+t),0)),a=e*t/100;s.style.maxWidth=`${a}px`}),[n,e,t,s]),Object(b.jsx)(f.Provider,{value:c},Object(b.jsx)(d.EuiFlexGroup,h()({className:"fieldEditor__flyoutPanels",gutterSize:"none"},a)))},O=({children:e,width:t,className:a="",backgroundColor:s,border:n,...l})=>{const[o,r]=Object(i.useState)({hasContent:!1,hasFooter:!1}),c=x()("fieldEditor__flyoutPanel","eui-scrollBar",a,{"fieldEditor__flyoutPanel--pageBackground":"euiPageBackground"===s,"fieldEditor__flyoutPanel--emptyShade":"euiEmptyShade"===s,"fieldEditor__flyoutPanel--leftBorder":"left"===n,"fieldEditor__flyoutPanel--rightBorder":"right"===n,"fieldEditor__flyoutPanel--withContent":o.hasContent}),{addPanel:u}=(()=>{const e=Object(i.useContext)(f);if(void 0===e)throw new Error(" must be used within a wrapper");return e})(),p=Object(i.useCallback)((()=>{r((e=>({...e,hasContent:!0})))}),[]),m=Object(i.useCallback)((()=>{r((e=>{if(!e.hasContent)throw new Error("You need to add a when you add a ");return{...e,hasFooter:!0}}))}),[]);Object(i.useLayoutEffect)((()=>u({width:t})),[t,u]);const g={};return t&&(g.flexBasis=`${t}%`),Object(b.jsx)(d.EuiFlexItem,{style:g},Object(b.jsx)(P.Provider,{value:{registerContent:p,registerFooter:m}},Object(b.jsx)("div",h()({className:c},l),e)))},v=300;async function I(e,t=v){let a;const i=t+5,s=(new Date).getTime();a=Array.isArray(e)?await Promise.all(e):await e;const n=(new Date).getTime();if(n-ssetTimeout(t,e)))}return a}const y=100;function w(e){return!!e.startsWith(".")||!!e.includes(":")&&e.split(":").reduce(((e,t)=>e||w(t)),!1)}function M(e,t){return(t?e:e.filter((e=>!w(e.name)))).slice(0,y)}const F=e=>e.replace(/,\s+/g,",");a(16);const T={title:{label:n.i18n.translate("indexPatternEditor.editor.form.titleLabel",{defaultMessage:"Index pattern"}),defaultValue:"",validations:[{validator:l.f.emptyField(n.i18n.translate("indexPatternEditor.validations.titleIsRequiredErrorMessage",{defaultMessage:"An index pattern is required."}))},{validator:(...e)=>{const[{value:t,path:a}]=e,i=n.i18n.translate("indexPatternEditor.validations.noSingleAstriskPattern",{defaultMessage:"A single '*' is not an allowed index pattern"});return"*"===t?{code:"ERR_FIELD_MISSING",path:a,message:i}:void 0}}]},name:{label:n.i18n.translate("indexPatternEditor.editor.form.nameLabel",{defaultMessage:"Name"}),defaultValue:"",validations:[]},timestampField:{label:n.i18n.translate("indexPatternEditor.editor.form.timeFieldLabel",{defaultMessage:"Timestamp field"}),helpText:n.i18n.translate("indexPatternEditor.editor.form.timestampFieldHelp",{defaultMessage:"Select a timestamp field for use with the global time filter."}),validations:[]},allowHidden:{label:n.i18n.translate("indexPatternEditor.editor.form.allowHiddenLabel",{defaultMessage:"Allow hidden and system indices"}),defaultValue:!1},id:{label:n.i18n.translate("indexPatternEditor.editor.form.customIdLabel",{defaultMessage:"Custom data view ID"}),helpText:n.i18n.translate("indexPatternEditor.editor.form.customIdHelp",{defaultMessage:"Kibana provides a unique identifier for each data view, or you can create your own."})},type:{label:n.i18n.translate("indexPatternEditor.editor.form.TypeLabel",{defaultMessage:"Data view type"}),defaultValue:p.INDEX_PATTERN_TYPE.DEFAULT},isAdHoc:{label:n.i18n.translate("indexPatternEditor.editor.form.IsAdHocLabel",{defaultMessage:"Create AdHoc DataView"}),defaultValue:!1,type:"hidden"}},_=e=>({validator:({value:t})=>{if(e.includes(t))return{message:n.i18n.translate("indexPatternEditor.dataViewExists.ValidationErrorMessage",{defaultMessage:"A data view with this name already exists."})}}}),S=({namesNotAllowed:e})=>{const t=Object(i.useMemo)((()=>(({namesNotAllowed:e})=>{const t=T.name,a=[...t.validations,_(e)];return{...t,validations:a}})({namesNotAllowed:e})),[e]);return Object(b.jsx)(l.d,{path:"name",config:t,componentProps:{euiFieldProps:{"aria-label":n.i18n.translate("indexPatternEditor.form.nameAriaLabel",{defaultMessage:"Name field optional"})}}},(e=>{const{isInvalid:t,errorMessage:a}=Object(l.g)(e);return Object(b.jsx)(d.EuiFormRow,{label:e.label,fullWidth:!0,error:a,isInvalid:t},Object(b.jsx)(d.EuiFieldText,{value:e.value,onChange:t=>{e.setValue(t.target.value)},fullWidth:!0,"data-test-subj":"createIndexPatternNameInput"}))}))};var C=a(15),L=a.n(C),D=a(32);const N={allIndices:[],exactMatchedIndices:[],partialMatchedIndices:[],visibleIndices:[]},A={matchedIndices:{...N},rollupIndicesCaps:{},isLoadingSourcesInternal:!1,loadingTimestampFields:!1,timestampFieldOptions:[],rollupIndexName:void 0};class data_view_editor_service_DataViewEditorService{constructor({services:{http:e,dataViews:t},initialValues:{type:a=p.INDEX_PATTERN_TYPE.DEFAULT,indexPattern:i="",name:s=""},requireTimestampField:l=!1}){L()(this,"http",void 0),L()(this,"dataViews",void 0),L()(this,"requireTimestampField",void 0),L()(this,"type",p.INDEX_PATTERN_TYPE.DEFAULT),L()(this,"indexPattern",""),L()(this,"allowHidden",!1),L()(this,"dataViewNames$",void 0),L()(this,"loadTimestampFieldsSub",void 0),L()(this,"matchedIndicesForProviderSub",void 0),L()(this,"rollupIndexForProviderSub",void 0),L()(this,"state$",void 0),L()(this,"rollupIndicesCaps$",void 0),L()(this,"isLoadingSources$",void 0),L()(this,"loadingTimestampFields$",void 0),L()(this,"timestampFieldOptions$",void 0),L()(this,"rollupIndex$",void 0),L()(this,"rollupIndexForProvider$",new D.Subject),L()(this,"matchedIndices$",void 0),L()(this,"matchedIndicesForProvider$",new D.Subject),L()(this,"rollupCapsResponse",void 0),L()(this,"currentLoadingTimestampFields",0),L()(this,"currentLoadingMatchedIndices",0),L()(this,"updateState",(e=>{this.state$.next({...this.state$.getValue(),...e})})),L()(this,"getRollupIndexCaps",(async()=>{let e={};try{e=await this.http.get("/api/rollup/indices")}catch(e){}return this.updateState({rollupIndicesCaps:e}),e})),L()(this,"getIsRollupIndex",(async()=>{const e=await this.rollupCapsResponse,t=Object.keys(e);return e=>t.includes(e)})),L()(this,"loadMatchedIndices",(async(e,t,a,i)=>{const s=++this.currentLoadingMatchedIndices,n=await this.getIsRollupIndex(),l=[];let d;if(this.updateState({loadingTimestampFields:!0}),null!=e&&e.endsWith("*")){const a=this.getIndicesCached({pattern:e,showAllIndices:t});l.push(a),l.push(Promise.resolve([]))}else{const a=this.getIndicesCached({pattern:e,showAllIndices:t}),i=this.getIndicesCached({pattern:`${e}*`,showAllIndices:t});l.push(a),l.push(i)}const[o,r]=await I(l),c=function(e,t,a,i=!1){const s=M(e,i),n=M(t,i),l=M(a,i);let d;return d=l.length?l:n.length?n:s,{allIndices:s,exactMatchedIndices:l,partialMatchedIndices:n,visibleIndices:d}}(a,r,o,t);if(s===this.currentLoadingMatchedIndices){if(i===p.INDEX_PATTERN_TYPE.ROLLUP){const e=o.filter((e=>n(e.name)));d=1===e.length?e[0].name:null,this.updateState({rollupIndexName:d})}else this.updateState({rollupIndexName:null});this.updateState({matchedIndices:c})}})),L()(this,"setIndexPattern",(e=>{this.indexPattern=F(e),this.loadIndices()})),L()(this,"setAllowHidden",(e=>{this.allowHidden=e,this.loadIndices()})),L()(this,"setType",(e=>{this.type=e,this.loadIndices()})),L()(this,"loadIndices",(async()=>{const e=await this.getIndicesCached({pattern:"*",showAllIndices:this.allowHidden});await this.loadMatchedIndices(this.indexPattern,this.allowHidden,e,this.type),this.updateState({isLoadingSourcesInternal:!1})})),L()(this,"loadDataViewNames",(async e=>{const t=(await this.dataViews.getIdsWithTitle(!0)).map((e=>e.name||e.title));return e?t.filter((t=>t!==e)):t})),L()(this,"getIndicesMemory",{}),L()(this,"getIndicesCached",(async e=>{const t=JSON.stringify(e);return this.getIndicesMemory[t]=this.getIndicesMemory[t]||this.getIsRollupIndex().then((t=>this.dataViews.getIndices({...e,isRollupIndex:t}))),this.getIndicesMemory[t].catch((()=>{delete this.getIndicesMemory[t]})),await this.getIndicesMemory[t]})),L()(this,"timestampOptionsMemory",{}),L()(this,"getTimestampOptionsForWildcard",(async(e,t)=>function(e,t=!1){const a=e.filter((e=>"date"===e.type));if(0===a.length)return[];const i={display:n.i18n.translate("indexPatternEditor.createIndexPattern.stepTime.noTimeFieldOptionLabel",{defaultMessage:"--- I don't want to use the time filter ---"}),fieldName:""},s=a.map((e=>({display:e.name,fieldName:e.name})));return t||s.push(i),s}(await I(this.dataViews.getFieldsForWildcard(e)),t))),L()(this,"getTimestampOptionsForWildcardCached",(async(e,t)=>{const a=JSON.stringify(e)+t,i=this.getTimestampOptionsForWildcard(e,t);return this.timestampOptionsMemory[a]=this.timestampOptionsMemory[a]||i,i.catch((()=>{delete this.timestampOptionsMemory[a]})),await i})),L()(this,"loadTimestampFields",(async()=>{const e=this.state$.getValue();if(0===e.matchedIndices.exactMatchedIndices.length)return void this.updateState({timestampFieldOptions:[],loadingTimestampFields:!1});const t=++this.currentLoadingTimestampFields,a={pattern:this.indexPattern};this.type===p.INDEX_PATTERN_TYPE.ROLLUP&&(a.type=p.INDEX_PATTERN_TYPE.ROLLUP,a.rollupIndex=e.rollupIndexName||"",a.allowNoIndex=!0);let i=[];try{i=await this.getTimestampOptionsForWildcardCached(a,this.requireTimestampField)}finally{t===this.currentLoadingTimestampFields&&this.updateState({timestampFieldOptions:i,loadingTimestampFields:!1})}})),L()(this,"indexPatternValidationProvider",(async()=>{const e=Object(D.firstValueFrom)(this.rollupIndex$.pipe(Object(D.first)((e=>void 0!==e)))),t=Object(D.firstValueFrom)(this.matchedIndicesForProvider$.pipe(Object(D.first)((e=>void 0!==e))));this.loadIndices();const[a,i]=await Promise.all([e,t]);return{rollupIndex:a,matchedIndices:i||N}})),L()(this,"destroy",(()=>{this.loadTimestampFieldsSub.unsubscribe(),this.matchedIndicesForProviderSub.unsubscribe(),this.rollupIndexForProviderSub.unsubscribe()})),this.http=e,this.dataViews=t,this.requireTimestampField=l,this.type=a,this.indexPattern=F(i),this.rollupCapsResponse=this.getRollupIndexCaps(),this.dataViewNames$=Object(D.from)(this.loadDataViewNames(s)),this.state$=new D.BehaviorSubject({...A});const d=(o=this.state$,(e,t)=>o.pipe(Object(D.map)(e),Object(D.distinctUntilChanged)(t)));var o;this.matchedIndices$=d((e=>e.matchedIndices)),this.rollupIndicesCaps$=d((e=>e.rollupIndicesCaps)),this.isLoadingSources$=d((e=>e.isLoadingSourcesInternal)),this.loadingTimestampFields$=d((e=>e.loadingTimestampFields)),this.timestampFieldOptions$=d((e=>e.timestampFieldOptions)),this.rollupIndex$=d((e=>e.rollupIndexName)),this.loadTimestampFieldsSub=this.matchedIndices$.subscribe((()=>this.loadTimestampFields())),this.matchedIndicesForProviderSub=this.matchedIndices$.subscribe((e=>{this.matchedIndicesForProvider$.next(e),this.matchedIndicesForProvider$.next(void 0)})),this.rollupIndexForProviderSub=this.rollupIndex$.subscribe((e=>{this.rollupIndexForProvider$.next(e),this.rollupIndexForProvider$.next(void 0)}))}}const V=e=>({validator:async({value:t})=>{const a=!!e.length,i=e.find((e=>e.fieldName===(null==t?void 0:t.value)));if(a&&(!t||!i))return{message:n.i18n.translate("indexPatternEditor.requireTimestampOption.ValidationErrorMessage",{defaultMessage:"Select a timestamp field."})}}}),R=n.i18n.translate("indexPatternEditor.editor.form.noTimeFieldsLabel",{defaultMessage:"No matching data stream, index, or index alias has a timestamp field."}),$=n.i18n.translate("indexPatternEditor.editor.form.timeFieldHelp",{defaultMessage:"Select a timestamp field for use with the global time filter."}),B=({options$:e,isLoadingOptions$:t,matchedIndices$:a})=>{const o=u()(e,[]),r=u()(t,!1),c=!!u()(a,N).exactMatchedIndices.length,p=o.map((({display:e,fieldName:t})=>({label:e,value:t}))),m=Object(i.useMemo)((()=>(e=>{const t=T.timestampField,a=[...t.validations,V(e)];return{...t,validations:a}})(o)),[o]),h=o.length?$:"",g=0===o.length&&!r&&c?R:"";return Object(b.jsx)(l.d,{config:m,path:"timestampField"},(e=>{const{label:t,value:a,setValue:i}=e;if(void 0===a)return null;const{isInvalid:o,errorMessage:c}=Object(l.g)(e),u=!p.length||r,m=!!p.find((e=>e.value===a.value));if(!(a&&m||u)){const e=p.filter((e=>"@timestamp"===e.value));e.length&&i(e[0])}return Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(d.EuiFormRow,{label:t,error:u?null:c,isInvalid:!u&&o,fullWidth:!0},Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(d.EuiComboBox,{placeholder:n.i18n.translate("indexPatternEditor.editor.form.runtimeType.placeholderLabel",{defaultMessage:"Select a timestamp field"}),singleSelection:{asPlainText:!0},options:p,selectedOptions:a&&m?[a]:void 0,onChange:e=>{0!==e.length&&i(e[0])},isClearable:!1,isDisabled:u,"data-test-subj":"timestampField","aria-label":n.i18n.translate("indexPatternEditor.editor.form.timestampSelectAriaLabel",{defaultMessage:"Timestamp field"}),isLoading:r,fullWidth:!0}),Object(b.jsx)(d.EuiFormHelpText,null,g||h||Object(b.jsx)(s.a.Fragment,null," ")))))}))};var k=a(33),H=a(29);const W=Object(b.jsx)(d.EuiDescriptionList,{style:{whiteSpace:"nowrap"},"data-test-subj":"standardType"},Object(b.jsx)(d.EuiDescriptionListTitle,null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.typeSelect.standardTitle",defaultMessage:"Standard data view"})),Object(b.jsx)(d.EuiDescriptionListDescription,null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.typeSelect.standardDescription",defaultMessage:"Perform full aggregations against any data"}))),U=Object(b.jsx)(d.EuiDescriptionList,{style:{whiteSpace:"nowrap"},"data-test-subj":"rollupType"},Object(b.jsx)(d.EuiDescriptionListTitle,null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.typeSelect.rollupTitle",defaultMessage:"Rollup data view"})," ",Object(b.jsx)(d.EuiBadge,{color:k.euiLightVars.euiColorAccent},Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.typeSelect.betaLabel",defaultMessage:"Beta"}))),Object(b.jsx)(d.EuiDescriptionListDescription,null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.typeSelect.rollupDescription",defaultMessage:"Perform limited aggregations against summarized data"}))),Y=({onChange:e})=>Object(b.jsx)(l.d,{path:"type"},(({label:t,value:a,setValue:i})=>void 0===a?null:Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(d.EuiFormRow,{label:t,fullWidth:!0},Object(b.jsx)(d.EuiSuperSelect,{"data-test-subj":"typeField",options:[{value:p.INDEX_PATTERN_TYPE.DEFAULT,inputDisplay:n.i18n.translate("indexPatternEditor.typeSelect.standard",{defaultMessage:"Standard"}),dropdownDisplay:W},{value:p.INDEX_PATTERN_TYPE.ROLLUP,inputDisplay:n.i18n.translate("indexPatternEditor.typeSelect.rollup",{defaultMessage:"Rollup"}),dropdownDisplay:U}],valueOfSelected:a,onChange:t=>{i(t),e(t)},"aria-label":n.i18n.translate("indexPatternEditor.editor.form.typeSelectAriaLabel",{defaultMessage:"Type field"}),fullWidth:!0})))));var z={name:"3crdpc",styles:"max-height:50vh;max-width:500px"};const X=()=>{const[e,t]=Object(i.useState)(!1),a=Object(b.jsx)(d.EuiButtonIcon,{onClick:()=>t((e=>!e)),iconType:"documentation","data-test-subj":"indexPatternDocsButton","aria-label":n.i18n.translate("indexPatternEditor.titleDocsPopover.ariaLabel",{defaultMessage:"Index pattern examples"})});return Object(b.jsx)(d.EuiPopover,{button:a,isOpen:e,display:"inlineBlock",panelPaddingSize:"none",anchorPosition:"upRight",closePopover:()=>t(!1)},Object(b.jsx)(d.EuiPopoverTitle,{paddingSize:"s"},n.i18n.translate("indexPatternEditor.titleDocsPopover.title",{defaultMessage:"Index pattern"})),Object(b.jsx)(d.EuiPanel,{className:"eui-yScroll",css:z,color:"transparent",paddingSize:"m"},Object(b.jsx)(d.EuiText,{size:"s","data-test-subj":"indexPatternDocsPopoverContent"},Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.titleDocsPopover.indexPatternDescription",defaultMessage:"An index pattern is a string that you use to match one or more data streams, indices, or aliases."})),Object(b.jsx)("ul",null,Object(b.jsx)("li",null,Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.titleDocsPopover.useWildcardDescription",defaultMessage:"Match multiple sources with a wildcard (*)."})),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"filebeat-*"))),Object(b.jsx)("li",null,Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.titleDocsPopover.useCommasDescription",defaultMessage:"Separate multiple single sources with a comma (,)."})),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"filebeat-a,filebeat-b"))),Object(b.jsx)("li",null,Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.titleDocsPopover.useMinusDescription",defaultMessage:"Exclude a source by preceding it with a minus sign (-)."})),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"filebeat-*,-filebeat-c"))),Object(b.jsx)("li",null,Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.titleDocsPopover.useCrossClusterSearchDescription",defaultMessage:"For cross-cluster search, precede with the cluster name followed by a colon (:)."})),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"cluster1:filebeat-*")),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"cluster1:filebeat-*,cluster2:filebeat-*")),Object(b.jsx)("p",null,Object(b.jsx)(d.EuiCode,null,"cluster*:filebeat-*,filebeat-*"))),Object(b.jsx)("li",null,Object(b.jsx)("p",null,n.i18n.translate("indexPatternEditor.titleDocsPopover.dontUseSpecialCharactersDescription",{defaultMessage:'Spaces and the characters /?"<>| are not allowed.'})))))))},G={message:n.i18n.translate("indexPatternEditor.rollupDataView.createIndex.noMatchError",{defaultMessage:"Rollup data view error: must match one rollup index"})},q={message:n.i18n.translate("indexPatternEditor.rollupDataView.createIndex.tooManyMatchesError",{defaultMessage:"Rollup data view error: can only match one rollup index"})},K={message:n.i18n.translate("indexPatternEditor.createIndex.noMatch",{defaultMessage:"Name must match one or more data streams, indices, or index aliases."})},J=({rollupIndicesCapabilities:e,isRollup:t})=>({validator:async({customData:{provider:a}})=>{const{matchedIndices:i,rollupIndex:s}=await a(),l=Object.keys(e);if(0===i.exactMatchedIndices.length)return K;if(!t||!l||!l.length)return;const d=i.exactMatchedIndices.filter((e=>l.includes(e.name)));if(!d.length)return G;if(d.length>1)return q;const o=s&&e[s].error;return o?{message:n.i18n.translate("indexPatternEditor.rollup.uncaughtError",{defaultMessage:"Rollup data view error: {error}",values:{error:o}})}:void 0}}),Q=({isRollup:e,matchedIndices$:t,rollupIndicesCapabilities:a,indexPatternValidationProvider:s})=>{const[o,r]=Object(i.useState)(!1),c=u()(t,N).exactMatchedIndices,p=Object(i.useMemo)((()=>(({isRollup:e,rollupIndicesCapabilities:t})=>{const a=T.title,i=[...a.validations,J({rollupIndicesCapabilities:t,isRollup:e})];return{...a,validations:i}})({isRollup:e,matchedIndices:c,rollupIndicesCapabilities:a})),[e,c,a]);return Object(b.jsx)(l.d,{path:"title",config:p,validationDataProvider:s,componentProps:{euiFieldProps:{"aria-label":n.i18n.translate("indexPatternEditor.form.titleAriaLabel",{defaultMessage:"Index pattern field"})}}},(e=>{const{isInvalid:t,errorMessage:a}=Object(l.g)(e);return Object(b.jsx)(d.EuiFormRow,{label:e.label,labelAppend:e.labelAppend,helpText:"function"==typeof e.helpText?e.helpText():e.helpText,error:a,isInvalid:t,fullWidth:!0},Object(b.jsx)(d.EuiFieldText,{isInvalid:t,value:e.value,onChange:t=>{let a=t.target.value;var i;1===a.length&&!o&&(i=a)&&/[a-z0-9]/i.test(i)&&1===i.length?(a+="*",r(!0),setTimeout((()=>t.target.setSelectionRange(1,1)))):["","*"].includes(a)&&o&&(a="",r(!1)),e.setValue(a)},isLoading:e.isValidating,fullWidth:!0,"data-test-subj":"createIndexPatternTitleInput",append:Object(b.jsx)(X,null),placeholder:"example-*"}))}))},Z=({matchedIndices:{allIndices:e=[],exactMatchedIndices:t=[],partialMatchedIndices:a=[]},isIncludingSystemIndices:i,query:s,showSystemIndices:n})=>{let l,o,r;const c=e.length;return 0===s.length?(l=void 0,r="primary",o=c>=1?Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.matchAnyLabel.matchAnyDetail",defaultMessage:"Your index pattern can match {sourceCount, plural, one {# source} other {# sources} }.",values:{sourceCount:c}})):!i&&n?Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.noSystemIndicesWithPromptLabel",defaultMessage:"No data streams, indices, or index aliases match your index pattern."})):Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.noSystemIndicesLabel",defaultMessage:"No data streams, indices, or index aliases match your index pattern."}))):t.length?(l="check",r="success",o=Object(b.jsx)("span",null," ",Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.successLabel.successDetail",defaultMessage:"Your index pattern matches {sourceCount} {sourceCount, plural, one {source} other {sources} }.",values:{sourceCount:t.length}}))):a.length?(l=void 0,r="primary",o=Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.partialMatchLabel.partialMatchDetail",defaultMessage:"Your index pattern doesn't match any data streams, indices, or index aliases, but {strongIndices} {matchedIndicesLength, plural, one {is} other {are} } similar.",values:{matchedIndicesLength:a.length,strongIndices:Object(b.jsx)("strong",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.partialMatchLabel.strongIndicesLabel",defaultMessage:"{matchedIndicesLength, plural, one {source} other {# sources} }",values:{matchedIndicesLength:a.length}}))}}))):(l=void 0,r="warning",o=c?(e=>Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.notMatchLabel.notMatchDetail",defaultMessage:"The index pattern you entered doesn't match any data streams, indices, or index aliases. You can match {strongIndices}.",values:{strongIndices:Object(b.jsx)("strong",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.notMatchLabel.allIndicesLabel",defaultMessage:"{indicesLength, plural, one {# source} other {# sources} }",values:{indicesLength:e}}))}})))(c):Object(b.jsx)("span",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.status.notMatchLabel.notMatchNoIndicesDetail",defaultMessage:"The index pattern you entered doesn't match any data streams, indices, or index aliases."}))),Object(b.jsx)(d.EuiCallOut,{size:"s",color:r,"data-test-subj":"createIndexPatternStatusMessage",iconType:l,title:o})};var ee=a(34);const te=[5,10,20,50],ae="dataViews.previewPanel.indicesPerPage";class indices_list_IndicesList extends s.a.Component{constructor(e){super(e),L()(this,"pager",void 0),L()(this,"storage",void 0),L()(this,"resetPageTo0",(()=>this.onChangePage(0))),L()(this,"onChangePage",(e=>{this.pager.goToPageIndex(e),this.setState({page:e})})),L()(this,"onChangePerPage",(e=>{this.pager.setItemsPerPage(e),this.setState({perPage:e}),this.resetPageTo0(),this.closePerPageControl(),this.storage.set(ae,e)})),L()(this,"openPerPageControl",(()=>{this.setState({isPerPageControlOpen:!0})})),L()(this,"closePerPageControl",(()=>{this.setState({isPerPageControlOpen:!1})})),this.storage=new ee.Storage(localStorage),this.state={page:0,perPage:this.storage.get(ae)||te[1],isPerPageControlOpen:!1},this.pager=new d.Pager(e.indices.length,this.state.perPage,this.state.page)}UNSAFE_componentWillReceiveProps(e){e.indices.length!==this.props.indices.length&&(this.pager.setTotalItems(e.indices.length),this.resetPageTo0())}renderPagination(){const{perPage:e,page:t,isPerPageControlOpen:a}=this.state,i=Object(b.jsx)(d.EuiButtonEmpty,{size:"s",color:"text",iconType:"arrowDown",iconSide:"right",onClick:this.openPerPageControl},Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.pagingLabel",defaultMessage:"Rows per page: {perPage}",values:{perPage:e}})),s=te.map((e=>Object(b.jsx)(d.EuiContextMenuItem,{key:e,icon:"empty",onClick:()=>this.onChangePerPage(e)},e))),n=this.pager.getTotalPages(),l=n>1?Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiPagination,{pageCount:n,activePage:t,onPageClick:this.onChangePage})):null;return Object(b.jsx)(d.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiPopover,{id:"customizablePagination",button:i,isOpen:a,closePopover:this.closePerPageControl,panelPaddingSize:"none"},Object(b.jsx)(d.EuiContextMenuPanel,{items:s}))),l)}highlightIndexName(e,t){const{isExactMatch:a}=this.props;if(!t)return e;if(a(e))return Object(b.jsx)("strong",null,e);const i=t.split(",").map((e=>e.trim())).filter(Boolean);let s=-1,n="";for(let t=0;tObject(b.jsx)(d.EuiTableRow,{key:a},Object(b.jsx)(d.EuiTableRowCell,null,this.highlightIndexName(e.name,t)),Object(b.jsx)(d.EuiTableRowCell,null,e.tags.map((e=>Object(b.jsx)(d.EuiBadge,{key:`index_${a}_tag_${e.key}`,color:e.color},e.name)))))));return Object(b.jsx)("div",i,Object(b.jsx)(d.EuiTable,{responsive:!1,tableLayout:"auto"},Object(b.jsx)(d.EuiTableBody,null,s)),Object(b.jsx)(d.EuiSpacer,{size:"m"}),this.renderPagination())}}var ie;!function(e){e.allIndices="allIndices",e.onlyMatchingIndices="onlyMatchingIndices"}(ie||(ie={}));const se=[{id:ie.allIndices,label:n.i18n.translate("indexPatternEditor.previewPanel.viewModeGroup.allSourcesButton",{defaultMessage:"All sources"})},{id:ie.onlyMatchingIndices,label:n.i18n.translate("indexPatternEditor.previewPanel.viewModeGroup.matchingSourcesButton",{defaultMessage:"Matching sources"})}],ne=({type:e,allowHidden:t,title:a="",matchedIndices$:l})=>{const[o,r]=Object(i.useState)(),c=u()(l,N);let m,h;a.length&&!a.trimEnd().endsWith(",")&&o!==ie.allIndices||o===ie.onlyMatchingIndices?(m=c.visibleIndices,h=ie.onlyMatchingIndices):(m=c.allIndices,h=ie.allIndices);const g=m.length?Object(b.jsx)(indices_list_IndicesList,{"data-test-subj":"createIndexPatternStep1IndicesList",query:a,indices:m,isExactMatch:e=>a.length>0&&c.exactMatchedIndices.some((t=>t.name===e))}):Object(b.jsx)(s.a.Fragment,null);return Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(Z,{matchedIndices:c,showSystemIndices:e!==p.INDEX_PATTERN_TYPE.ROLLUP,isIncludingSystemIndices:t,query:a}),Object(b.jsx)(d.EuiSpacer,{size:"m"}),Boolean(a)&&m.length>0&&Object(b.jsx)(d.EuiButtonGroup,{isFullWidth:!0,legend:n.i18n.translate("indexPatternEditor.previewPanel.viewModeGroup.legend",{defaultMessage:"Visible sources"}),options:se,idSelected:h,onChange:e=>r(e)}),g)};let le;!function(e){e.savingAsAdHoc="savingAsAdHoc",e.persisting="persisting"}(le||(le={}));const de=n.i18n.translate("indexPatternEditor.editor.flyoutCloseButtonLabel",{defaultMessage:"Close"}),oe=n.i18n.translate("indexPatternEditor.editor.flyoutSaveButtonLabel",{defaultMessage:"Save data view to Kibana"}),re=n.i18n.translate("indexPatternEditor.editor.flyoutEditButtonLabel",{defaultMessage:"Save"}),ce=n.i18n.translate("indexPatternEditor.editor.flyoutEditUnpersistedButtonLabel",{defaultMessage:"Continue to use without saving"}),ue=n.i18n.translate("indexPatternEditor.editor.flyoutExploreButtonLabel",{defaultMessage:"Use without saving"}),pe=({onCancel:e,onSubmit:t,submittingType:a,submitDisabled:i,isEdit:s,allowAdHoc:l,isPersisted:o,canSave:r})=>{const c=s&&!o;return Object(b.jsx)(d.EuiFlyoutFooter,{className:"indexPatternEditor__footer"},Object(b.jsx)(d.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiButtonEmpty,{iconType:"cross",flush:"left",onClick:e,"data-test-subj":"closeFlyoutButton"},de)),Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiFlexGroup,{justifyContent:"spaceBetween",alignItems:"center"},l&&Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiButton,{color:"primary",onClick:()=>{t(!0)},"data-test-subj":"exploreIndexPatternButton",disabled:i,isLoading:a===le.savingAsAdHoc,title:n.i18n.translate("indexPatternEditor.editor.flyoutExploreButtonTitle",{defaultMessage:"Use this data view without creating a saved object"})},ue)),(r||c)&&Object(b.jsx)(d.EuiFlexItem,{grow:!1},Object(b.jsx)(d.EuiButton,{color:"primary",onClick:()=>{t(!1)},"data-test-subj":"saveIndexPatternButton",fill:!0,disabled:i,isLoading:a===le.persisting||a===le.savingAsAdHoc&&c},s?o?re:ce:oe))))))},me=({children:e})=>{const[t,a]=Object(i.useState)(!1),l=Object(i.useCallback)((()=>{a(!t)}),[t]);return Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(d.EuiButtonEmpty,{onClick:l,flush:"left","data-test-subj":"toggleAdvancedSetting"},t?n.i18n.translate("indexPatternEditor.editor.form.advancedSettings.hideButtonLabel",{defaultMessage:"Hide advanced settings"}):n.i18n.translate("indexPatternEditor.editor.form.advancedSettings.showButtonLabel",{defaultMessage:"Show advanced settings"})),Object(b.jsx)("div",{style:{display:t?"block":"none"},"data-test-subj":"advancedSettings"},Object(b.jsx)(d.EuiSpacer,{size:"m"}),Object(b.jsx)("div",null,e)))},he=n.i18n.translate("indexPatternEditor.form.allowHiddenAriaLabel",{defaultMessage:"Allow hidden and system indices"}),ge=n.i18n.translate("indexPatternEditor.form.customIndexPatternIdLabel",{defaultMessage:"Custom data view ID"}),xe=({disableAllowHidden:e,disableId:t,onAllowHiddenChange:a})=>Object(b.jsx)(me,null,Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(l.d,{path:"allowHidden",component:l.c,"data-test-subj":"allowHiddenField",componentProps:{euiFieldProps:{"aria-label":he,disabled:e}},onChange:a}))),Object(b.jsx)(d.EuiSpacer,{size:"m"}),Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(l.d,{path:"id",component:l.b,"data-test-subj":"savedObjectIdField",componentProps:{euiFieldProps:{"aria-label":ge,disabled:t}}})))),be=n.i18n.translate("indexPatternEditor.rollupIndexPattern.warning.title",{defaultMessage:"Beta feature"}),je=()=>Object(b.jsx)(d.EuiCallOut,{title:be,color:"warning",iconType:"help"},Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.rollupDataView.warning.textParagraphOne",defaultMessage:"Kibana has beta support for data views based on rollups. You might encounter\nissues using these in saved searches, visualizations, and dashboards. They\nare not supported in some advanced features, such as Timelion, and Machine Learning."})),Object(b.jsx)("p",null,Object(b.jsx)(H.FormattedMessage,{id:"indexPatternEditor.rollupDataView.warning.textParagraphTwo",defaultMessage:"You can match a rollup data view against one rollup index and zero or more\nregular indices. A rollup data view has limited metrics, fields, intervals, and\naggregations. A rollup index is limited to indices that have one job configuration,\nor multiple jobs with compatible configurations."}))),fe=n.i18n.translate("indexPatternEditor.title",{defaultMessage:"Create data view"}),Pe=n.i18n.translate("indexPatternEditor.titleEditMode",{defaultMessage:"Edit data view"}),Ee=({onSave:e,onCancel:t,defaultTypeIsRollup:a,editData:o,allowAdHoc:c,showManagementLink:m,dataViewEditorService:h})=>{var g;const{services:{application:x,dataViews:j,uiSettings:f,overlays:P}}=Object(l.j)(),v=j.getCanSaveSync(),{form:I}=Object(l.h)({defaultValue:{type:a?p.INDEX_PATTERN_TYPE.ROLLUP:p.INDEX_PATTERN_TYPE.DEFAULT,isAdHoc:!1,...o?{title:o.getIndexPattern(),id:o.id,name:o.name,...o.timeFieldName?{timestampField:{label:o.timeFieldName,value:o.timeFieldName}}:{}}:{}},schema:T,onSubmit:async(t,a)=>{var i;if(!a)return;const s={title:F(t.title),timeFieldName:null===(i=t.timestampField)||void 0===i?void 0:i.value,id:t.id,name:t.name};M===p.INDEX_PATTERN_TYPE.ROLLUP&&L&&(s.type=p.INDEX_PATTERN_TYPE.ROLLUP,s.typeMeta={params:{rollup_index:L},aggs:D[L].aggs}),o&&o.getIndexPattern()!==t.title?await(({dataViewName:e,overlays:t,onEdit:a})=>t?t.openConfirm(n.i18n.translate("indexPatternEditor.editDataView.editConfirmationModal.modalDescription",{defaultMessage:"Changing this data view can break other objects that depend on it."}),{confirmButtonText:n.i18n.translate("indexPatternEditor.editDataView.editConfirmationModal.confirmButton",{defaultMessage:"Confirm"}),title:n.i18n.translate("indexPatternEditor.editDataView.editConfirmationModal.editHeader",{defaultMessage:"Edit '{name}'",values:{name:e}}),buttonColor:"danger"}).then((async e=>{e&&await a()})):Promise.resolve())({dataViewName:t.name||t.title,overlays:P,onEdit:async()=>{await e(s,!t.isAdHoc)}}):await e(s,!t.isAdHoc)}}),[{title:y=T.title.defaultValue,allowHidden:w=T.allowHidden.defaultValue,type:M=T.type.defaultValue}]=Object(l.i)({form:I}),_=u()(h.isLoadingSources$,!0),C=u()(h.dataViewNames$),L=u()(h.rollupIndex$),D=u()(h.rollupIndicesCaps$,{});r()((()=>{h.setIndexPattern(y)}),250,[h,y]),Object(i.useEffect)((()=>{h.setAllowHidden(w)}),[h,w]),Object(i.useEffect)((()=>{h.setType(M)}),[h,M]);const N=Object(i.useCallback)((e=>{I.setFieldValue("title",""),I.setFieldValue("name",""),I.setFieldValue("timestampField",""),e===p.INDEX_PATTERN_TYPE.ROLLUP&&I.setFieldValue("allowHidden",!1)}),[I]);if(_||!C)return Object(b.jsx)(d.EuiLoadingSpinner,{size:"xl"});const A=f.isDeclared("rollups:enableIndexPatterns")&&f.get("rollups:enableIndexPatterns")&&(V=D,Object.keys(V)).length?Object(b.jsx)(s.a.Fragment,null,Object(b.jsx)(d.EuiSpacer,{size:"l"}),Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(Y,{onChange:N}))),M===p.INDEX_PATTERN_TYPE.ROLLUP?Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(je,null))):Object(b.jsx)(s.a.Fragment,null)):Object(b.jsx)(s.a.Fragment,null);var V;return Object(b.jsx)(E,{flyoutClassName:"indexPatternEditorFlyout",maxWidth:1180},Object(b.jsx)(O,{className:"fieldEditor__mainFlyoutPanel",border:"right"},Object(b.jsx)(d.EuiTitle,{"data-test-subj":"flyoutTitle"},Object(b.jsx)("h2",null,o?Pe:fe)),m&&o&&o.id&&Object(b.jsx)(d.EuiLink,{href:x.getUrlForApp("management",{path:`/kibana/dataViews/dataView/${o.id}`})},n.i18n.translate("indexPatternEditor.goToManagementPage",{defaultMessage:"Manage settings and view field details"})),Object(b.jsx)(l.a,{form:I,className:"indexPatternEditor__form",error:I.getErrors(),isInvalid:I.isSubmitted&&!I.isValid&&I.getErrors().length},Object(b.jsx)(l.d,{path:"isAdHoc"}),A,Object(b.jsx)(d.EuiSpacer,{size:"l"}),Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(S,{namesNotAllowed:C||[]}))),Object(b.jsx)(d.EuiSpacer,{size:"l"}),Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(Q,{isRollup:(null===(g=I.getFields().type)||void 0===g?void 0:g.value)===p.INDEX_PATTERN_TYPE.ROLLUP,matchedIndices$:h.matchedIndices$,rollupIndicesCapabilities:D,indexPatternValidationProvider:h.indexPatternValidationProvider}))),Object(b.jsx)(d.EuiSpacer,{size:"l"}),Object(b.jsx)(d.EuiFlexGroup,null,Object(b.jsx)(d.EuiFlexItem,null,Object(b.jsx)(B,{options$:h.timestampFieldOptions$,isLoadingOptions$:h.loadingTimestampFields$,matchedIndices$:h.matchedIndices$}))),Object(b.jsx)(xe,{disableAllowHidden:M===p.INDEX_PATTERN_TYPE.ROLLUP,disableId:!!o,onAllowHiddenChange:()=>{I.getFields().title.validate()}})),Object(b.jsx)(pe,{onCancel:t,onSubmit:async e=>{const t=I.getFormData();t.name||(I.updateFieldValues({name:t.title}),await I.getFields().name.validate()),I.validateFields(["timestampField"]),I.setFieldValue("isAdHoc",e||!1),I.submit()},submitDisabled:I.isSubmitted&&!I.isValid||I.isSubmitting,submittingType:I.isSubmitting?I.getFormData().isAdHoc?le.savingAsAdHoc:le.persisting:void 0,isEdit:!!o,isPersisted:Boolean(o&&o.isPersisted()),allowAdHoc:c,canSave:v})),Object(b.jsx)(O,null,_?Object(b.jsx)(s.a.Fragment,null):Object(b.jsx)(ne,{type:M,allowHidden:w,title:y,matchedIndices$:h.matchedIndices$})))},Oe=s.a.memo(Ee);t.default=({onSave:e,onCancel:t=(()=>{}),defaultTypeIsRollup:a,requireTimestampField:s=!1,editData:d,allowAdHocDataView:o,showManagementLink:r})=>{const{services:{dataViews:c,notifications:u,http:p}}=Object(l.j)(),[m]=Object(i.useState)((()=>new data_view_editor_service_DataViewEditorService({services:{http:p,dataViews:c},initialValues:{name:null==d?void 0:d.name,type:null==d?void 0:d.type,indexPattern:null==d?void 0:d.getIndexPattern()},requireTimestampField:s})));return Object(i.useEffect)((()=>m.destroy),[m]),Object(b.jsx)(Oe,{onSave:async(t,a=!0)=>{try{let i;if(d){const{name:e="",timeFieldName:a,title:s=""}=t;d.setIndexPattern(s),d.name=e,d.timeFieldName=a,i=d.isPersisted()?await c.updateSavedObject(d):d}else i=a?await c.createAndSave(t):await c.create(t);if(i&&!(i instanceof Error)){if(await c.refreshFields(i),a){const e=n.i18n.translate("indexPatternEditor.saved",{defaultMessage:"Saved '{indexPatternName}'",values:{indexPatternName:i.getName()}});u.toasts.addSuccess(e)}await e(i)}}catch(e){const t=n.i18n.translate("indexPatternEditor.dataView.unableSaveLabel",{defaultMessage:"Failed to save data view."});u.toasts.addDanger({title:t})}},onCancel:t,defaultTypeIsRollup:a,editData:d,showManagementLink:r,allowAdHoc:o||!1,dataViewEditorService:m})}},36:function(e,t,a){switch(window.__kbnThemeTag__){case"v8dark":return a(37);case"v8light":return a(39)}},37:function(e,t,a){var i=a(13),s=a(38);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);i(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},38:function(e,t,a){(t=a(14)(!1)).push([e.i,".fieldEditor__flyoutPanels{height:100%}.fieldEditor__flyoutPanel{height:100%;overflow-y:auto;padding:24px 24px 0}.fieldEditor__flyoutPanel--pageBackground{background-color:#141519}.fieldEditor__flyoutPanel--emptyShade{background-color:#1d1e24}.fieldEditor__flyoutPanel--leftBorder{border-left:1px solid #343741}.fieldEditor__flyoutPanel--rightBorder{border-right:1px solid #343741}.fieldEditor__flyoutPanel--withContent{display:flex;flex-direction:column;overflow-y:hidden;padding:0}.fieldEditor__flyoutPanel__header{padding:0!important}.fieldEditor__flyoutPanel__content{flex:1;overflow-y:auto;padding:24px}.fieldEditor__flyoutPanel__footer{flex:0}",""]),e.exports=t},39:function(e,t,a){var i=a(13),s=a(40);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);i(s,{insert:"head",singleton:!1}),e.exports=s.locals||{}},40:function(e,t,a){(t=a(14)(!1)).push([e.i,".fieldEditor__flyoutPanels{height:100%}.fieldEditor__flyoutPanel{height:100%;overflow-y:auto;padding:24px 24px 0}.fieldEditor__flyoutPanel--pageBackground{background-color:#fafbfd}.fieldEditor__flyoutPanel--emptyShade{background-color:#fff}.fieldEditor__flyoutPanel--leftBorder{border-left:1px solid #d3dae6}.fieldEditor__flyoutPanel--rightBorder{border-right:1px solid #d3dae6}.fieldEditor__flyoutPanel--withContent{display:flex;flex-direction:column;overflow-y:hidden;padding:0}.fieldEditor__flyoutPanel__header{padding:0!important}.fieldEditor__flyoutPanel__content{flex:1;overflow-y:auto;padding:24px}.fieldEditor__flyoutPanel__footer{flex:0}",""]),e.exports=t},41:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(19),s=a(1),n=i.__importDefault(a(42));t.default=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=[]);var i=n.default(e,t),l=i[0],d=i[1],o=i[2];return s.useEffect(o,a),[l,d]}},42:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a(1);t.default=function(e,t){void 0===t&&(t=0);var a=i.useRef(!1),s=i.useRef(),n=i.useRef(e),l=i.useCallback((function(){return a.current}),[]),d=i.useCallback((function(){a.current=!1,s.current&&clearTimeout(s.current),s.current=setTimeout((function(){a.current=!0,n.current()}),t)}),[t]),o=i.useCallback((function(){a.current=null,s.current&&clearTimeout(s.current)}),[]);return i.useEffect((function(){n.current=e}),[e]),i.useEffect((function(){return d(),o}),[t]),[l,o,d]}}}]);