ber-security.graylog.graylog-plugin-alert-wizard.5.2.1.source-code.plugin.com.airbus_cyber_security.graylog.AlertWizardPlugin.16f9b211543540fe1709.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graylog-plugin-alert-wizard Show documentation
Show all versions of graylog-plugin-alert-wizard Show documentation
Graylog ${project.artifactId} plugin.
The newest version!
(()=>{(()=>{var Ia={"2hHqKME2":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("++xxZkkP"),p=i.n(E),t=i("Uj4UqBXp"),c=i.n(t),u=c()(p());u.push([S.id,`.lfPLC37lRjNBE4g_uuoQ {
padding-left: 0;
margin-bottom: 20px;
}
.lfPLC37lRjNBE4g_uuoQ .lfPLC37lRjNBE4g_uuoQ {
margin-bottom: 0;
}
`,"",{version:3,sources:["webpack://./../graylog2-server/graylog2-web-interface/src/components/common/ExpandableList.css"],names:[],mappings:"AAAA;IACI,eAAe;IACf,mBAAmB;AACvB;;AAEA;IACI,gBAAgB;AACpB",sourcesContent:[`:local(.list) {
padding-left: 0;
margin-bottom: 20px;
}
:local(.list) :local(.list) {
margin-bottom: 0;
}
`],sourceRoot:""}]),u.locals={list:"lfPLC37lRjNBE4g_uuoQ"};const b=u},ylPxorvM:(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("++xxZkkP"),p=i.n(E),t=i("Uj4UqBXp"),c=i.n(t),u=c()(p());u.push([S.id,`.PI8DnB8RBH0LotZYEPeK {
padding-left: 0;
padding-right: 0;
}
.PI8DnB8RBH0LotZYEPeK .popover-content {
min-width: 200px;
padding: 0;
}
.PI8DnB8RBH0LotZYEPeK .list-group {
margin-bottom: 0;
}
.PI8DnB8RBH0LotZYEPeK .list-group-item {
border-right: 0;
border-left: 0;
padding: 6px 15px;
}
.PI8DnB8RBH0LotZYEPeK .list-group-item:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.PI8DnB8RBH0LotZYEPeK .list-group-item:last-child {
border-bottom: 0;
}
.pkEYOMhUqNEfX8P0t20_ {
max-height: 340px; /* 10 items */
overflow: auto;
}
.OPxKda_wxHEgR9j3zLr6 {
margin-bottom: 0 !important;
padding: 5px;
}
`,"",{version:3,sources:["webpack://./../graylog2-server/graylog2-web-interface/src/components/common/SelectPopover.css"],names:[],mappings:"AAAA;IACI,eAAe;IACf,gBAAgB;AACpB;;AAEA;IACI,gBAAgB;IAChB,UAAU;AACd;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,eAAe;IACf,cAAc;IACd,iBAAiB;AACrB;;AAEA;IACI,0BAA0B;IAC1B,yBAAyB;AAC7B;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,iBAAiB,EAAE,aAAa;IAChC,cAAc;AAClB;;AAEA;IACI,2BAA2B;IAC3B,YAAY;AAChB",sourcesContent:[`:local(.customPopover) {
padding-left: 0;
padding-right: 0;
}
:local(.customPopover) .popover-content {
min-width: 200px;
padding: 0;
}
:local(.customPopover) .list-group {
margin-bottom: 0;
}
:local(.customPopover) .list-group-item {
border-right: 0;
border-left: 0;
padding: 6px 15px;
}
:local(.customPopover) .list-group-item:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
:local(.customPopover) .list-group-item:last-child {
border-bottom: 0;
}
:local(.scrollableList) {
max-height: 340px; /* 10 items */
overflow: auto;
}
:local(.dataFilterInput) {
margin-bottom: 0 !important;
padding: 5px;
}
`],sourceRoot:""}]),u.locals={customPopover:"PI8DnB8RBH0LotZYEPeK",scrollableList:"pkEYOMhUqNEfX8P0t20_",dataFilterInput:"OPxKda_wxHEgR9j3zLr6"};const b=u},"466uocAC":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("++xxZkkP"),p=i.n(E),t=i("Uj4UqBXp"),c=i.n(t),u=c()(p());u.push([S.id,`#toast-container .toast {
display: grid;
grid-template-columns: 8fr 0.5fr;
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0;
grid-row-gap: 0;
}
#toast-container .toast-title {
grid-area: 1 / 1 / 2 / 1;
}
#toast-container .toast-message {
grid-area: 2 / 2 / 2 / 1;
}
#toast-container button.toast-close-button {
font-size: 0.889rem; /* theme.fonts.size.small */
grid-area: 1 / 2 / 3 / 3;
height: 100%;
top: 0;
right: 0;
font-weight: normal;
}
#toast-container button.toast-close-button:focus,
#toast-container button.toast-close-button:hover {
color: #fff;
}
`,"",{version:3,sources:["webpack://./../graylog2-server/graylog2-web-interface/src/util/UserNotification.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,gCAAgC;EAChC,kCAAkC;EAClC,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,mBAAmB,EAAE,2BAA2B;EAChD,wBAAwB;EACxB,YAAY;EACZ,MAAM;EACN,QAAQ;EACR,mBAAmB;AACrB;;AAEA;;EAEE,WAAW;AACb",sourcesContent:[`#toast-container .toast {
display: grid;
grid-template-columns: 8fr 0.5fr;
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0;
grid-row-gap: 0;
}
#toast-container .toast-title {
grid-area: 1 / 1 / 2 / 1;
}
#toast-container .toast-message {
grid-area: 2 / 2 / 2 / 1;
}
#toast-container button.toast-close-button {
font-size: 0.889rem; /* theme.fonts.size.small */
grid-area: 1 / 2 / 3 / 3;
height: 100%;
top: 0;
right: 0;
font-weight: normal;
}
#toast-container button.toast-close-button:focus,
#toast-container button.toast-close-button:hover {
color: #fff;
}
`],sourceRoot:""}]),u.locals={};const b=u},"871w7tJ9":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("++xxZkkP"),p=i.n(E),t=i("Uj4UqBXp"),c=i.n(t),u=c()(p());u.push([S.id,`/**
* Copyright (C) 2018 Airbus CyberSecurity (SAS)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* .
*/
/* TODO should probably either reuse predefined graylog components or introduce our own components if really necessary */
.W4VDSG9D_CwppjrICZsm {
border-right: #D1D1D1 solid 1px;
}
.JVn4rYi5ZaJ7MjhXjmfN {
border-left: #D1D1D1 solid 1px;
margin-left: -1px;
}
.wmulSSZseoDuMY62htOT {
border-bottom: #D1D1D1 solid 1px;
}
`,"",{version:3,sources:["webpack://./src/web/wizard/components/rules/AlertRuleForm.css"],names:[],mappings:"AAAA;;;;;;;;;;;;;;;EAeE;;AAEF,wHAAwH;AACxH;IACI,+BAA+B;AACnC;;AAEA;IACI,8BAA8B;IAC9B,iBAAiB;AACrB;;AAEA;IACI,gCAAgC;AACpC",sourcesContent:[`/**
* Copyright (C) 2018 Airbus CyberSecurity (SAS)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* .
*/
/* TODO should probably either reuse predefined graylog components or introduce our own components if really necessary */
:local(.subnavigation) {
border-right: #D1D1D1 solid 1px;
}
:local(.contentpane) {
border-left: #D1D1D1 solid 1px;
margin-left: -1px;
}
:local(.divider) {
border-bottom: #D1D1D1 solid 1px;
}
`],sourceRoot:""}]),u.locals={subnavigation:"W4VDSG9D_CwppjrICZsm",contentpane:"JVn4rYi5ZaJ7MjhXjmfN",divider:"wmulSSZseoDuMY62htOT"};const b=u},o7GEe6Qe:(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("Z7aTuO5B"),p=i("J6y4/h8P"),t=i("aKyEWaw1");const c=(0,p.default)(t.Alert).attrs(({bsStyle:a})=>({bsStyle:null,$bsStyle:a||"default"}))(({$bsStyle:a,theme:m})=>{const A=m.colors.variant.lighter[a],I=m.colors.variant.lightest[a];return p.css`
background-color: ${I};
border-color: ${A};
color: ${m.utils.contrastingColor(I)};
a:not(.btn) {
color: ${m.utils.contrastingColor(I,"AA")};
font-weight: bold;
text-decoration: underline;
&:hover,
&:focus,
&:active {
color: ${m.utils.contrastingColor(I)};
}
&:hover,
&:focus {
text-decoration: none;
}
}
&.alert-dismissible {
.close {
top: -9px;
}
}
`}),u=({bsStyle:a,...m})=>E.createElement(c,{bsStyle:a,...m});u.defaultProps={onDismiss:void 0};const b=u},jdU8EhS8:(S,w,i)=>{"use strict";i.d(w,{Z:()=>x});var E=i("KfF0gQb+"),p=i.n(E),t=i("Z7aTuO5B"),c=i("kqAR+wt5"),u=i.n(c),b=i("o8xG4j5J"),a=i("MjKCmu4z"),m=i("1ZqkN7VX"),A=i("+/lOUfGq");const I=({backdrop:N,submitButtonDisabled:L,formProps:F,bsSize:D,show:$,submitButtonText:W,onSubmitForm:K,onCancel:k,title:H,children:V,...Ee})=>{const Re=(0,t.useRef)(null),Ie=Le=>{const ke=Re.current,Ne=u()(ke);if(typeof ke.checkValidity=="function"&&!ke.checkValidity()||typeof Ne.checkValidity=="function"&&!Ne.checkValidity()){Le.preventDefault();return}typeof K=="function"&&(Le.preventDefault(),K(Le))},xe=t.createElement("div",{className:"container-fluid"},V);return t.createElement(A.Z,{bsSize:D,showModal:$,backdrop:N,onHide:k,"data-event-element":Ee["data-telemetry-title"]||a.Z.getRecursiveChildText(H),...Ee},t.createElement(m.Z.Header,{closeButton:!0},t.createElement(m.Z.Title,null,H)),t.createElement("form",{ref:Re,onSubmit:Ie,...F,"data-testid":"modal-form"},t.createElement(m.Z.Body,null,xe),t.createElement(m.Z.Footer,null,t.createElement(b.Z,{disabledSubmit:L,onCancel:k,submitButtonText:W}))))};I.propTypes={backdrop:p().oneOf([!0,!1,"static"]),bsSize:p().oneOf(["lg","large","sm","small"]),title:p().oneOfType([p().string,p().node]).isRequired,children:p().oneOfType([p().arrayOf(p().element),p().element]).isRequired,onSubmitForm:p().func,onCancel:p().func.isRequired,formProps:p().object,submitButtonText:p().oneOfType([p().string,p().node]),submitButtonDisabled:p().bool,show:p().bool.isRequired},I.defaultProps={backdrop:void 0,formProps:{},submitButtonText:"Submit",submitButtonDisabled:!1,onSubmitForm:void 0,bsSize:void 0};const x=I},"+/lOUfGq":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("KfF0gQb+"),p=i.n(E),t=i("Z7aTuO5B"),c=i("1ZqkN7VX");const u=({showModal:a,children:m,onHide:A,bsSize:I,backdrop:x,role:N,...L})=>t.createElement(c.Z,{show:a,onHide:A,bsSize:I,backdrop:x,role:N,...L},m);u.propTypes={showModal:p().bool.isRequired,children:p().oneOfType([p().arrayOf(p().element),p().element]).isRequired,onHide:p().func.isRequired,bsSize:p().oneOf(["large","lg","small","sm"]),backdrop:p().oneOf(["static",!0,!1]),role:p().string},u.defaultProps={bsSize:void 0,backdrop:"static",role:"dialog"};const b=u},GX8KkpAK:(S,w,i)=>{"use strict";i.d(w,{Z:()=>c});var E=i("J6y4/h8P"),p=i("aKyEWaw1");const c=(0,E.default)(p.Button)(({theme:u})=>E.css`
${u.components.button}
`)},qKIMiD1A:(S,w,i)=>{"use strict";i.d(w,{Z:()=>t});var E=i("aKyEWaw1");const t=E.ButtonToolbar},X3hNKcxq:(S,w,i)=>{"use strict";i.d(w,{Z:()=>c});var E=i("J6y4/h8P"),p=i("aKyEWaw1");const c=(0,E.default)(p.ControlLabel)(({theme:u})=>E.css`
color: ${u.colors.global.textDefault};
font-weight: bold;
margin-bottom: 5px;
display: inline-block;
`)},WNxHkvfc:(S,w,i)=>{"use strict";i.d(w,{Z:()=>u});var E=i("aKyEWaw1"),p=i("J6y4/h8P"),t=i("pS0GGJuX");const c=(0,p.default)(E.FormControl)(({theme:b})=>p.css`
&.form-control {
border-radius: ${t.L$};
}
&.form-control:not([type='range']) {
color: ${b.colors.input.color};
background-color: ${b.colors.input.background};
border-color: ${b.colors.input.border};
&::placeholder {
color: ${b.colors.input.placeholder};
}
&:focus {
border-color: ${b.colors.input.borderFocus};
box-shadow: ${b.colors.input.boxShadow};
}
&[disabled],
&[readonly],
fieldset[disabled] & {
background-color: ${b.colors.input.backgroundDisabled};
color: ${b.colors.input.colorDisabled};
}
~ .form-control-feedback.glyphicon {
display: none;
}
}
`);c.Static=E.FormControl.Static,c.Feedback=E.FormControl.Feedback;const u=c},NzGc2uPJ:(S,w,i)=>{"use strict";i.d(w,{Z:()=>L});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("aKyEWaw1"),u=i("J6y4/h8P"),b=i("ww+BtWnX"),a=i.n(b),m=i("V7hwd7tl"),A=i("WNxHkvfc"),I=i("4ts0Ap8A");const x=(0,u.default)(c.FormGroup)(({theme:F,validationState:D})=>{const $=D==="error"?"danger":D;if(!$)return;const W=F.colors.variant.dark[$],K=F.colors.variant.light[$],k=F.colors.variant.lightest[$];return u.css`
&.has-${D} {
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label {
color: ${W};
}
${A.Z}, .${m.K} {
border-color: ${K};
&:focus {
border-color: ${a()(K).darken(.1)};
box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%), 0 0 6px ${a()(K).brighten(.2)};
}
}
${I.b} {
color: ${W};
background-color: ${k};
border-color: ${K};
}
.form-control-feedback {
color: ${W};
}
}
`}),N=(0,E.memo)(({children:F,validationState:D,...$})=>E.createElement(x,{validationState:D,...$},F));N.propTypes={children:t().node.isRequired,validationState:t().oneOf([null,"error","success","warning"])},N.defaultProps={validationState:null};const L=N},A2KAXP9g:(S,w,i)=>{"use strict";i.d(w,{Z:()=>D});var E=i("KfF0gQb+"),p=i.n(E),t=i("Z7aTuO5B"),c=i("Btg6k4SR"),u=i("dfd/aQyz"),b=i("X3hNKcxq"),a=i("WNxHkvfc"),m=i("NzGc2uPJ"),A=i("4ts0Ap8A"),I=i("XgvalpFO"),x=Object.defineProperty,N=($,W,K)=>W in $?x($,W,{enumerable:!0,configurable:!0,writable:!0,value:K}):$[W]=K,L=($,W,K)=>(N($,typeof W!="symbol"?W+"":W,K),K);class F extends t.Component{constructor(){super(...arguments),L(this,"getInputDOMNode",()=>this.input),L(this,"getValue",()=>{const{type:W}=this.props;if(!W)throw new Error("Cannot use getValue without specifying input type.");switch(W){case"checkbox":case"radio":return this.getInputDOMNode().checked;default:return this.getInputDOMNode().value}}),L(this,"getChecked",()=>this.getInputDOMNode().checked),L(this,"_renderFormControl",(W,K,k)=>t.createElement(a.Z,{inputRef:H=>{this.input=H},componentClass:W,...K},k)),L(this,"_renderFormGroup",W=>{const{id:K,bsStyle:k,formGroupClassName:H,wrapperClassName:V,inputDescClassName:Ee,label:Re,labelClassName:Ie,error:xe,help:Le,buttonAfter:ke,addonAfter:Ne}=this.props;let Ke;return Ne||ke?Ke=t.createElement(A.Z,null,W,ke&&t.createElement(A.Z.Button,null,ke),Ne&&t.createElement(A.Z.Addon,null,Ne)):Ke=W,t.createElement(m.Z,{controlId:K,validationState:xe?"error":k,bsClass:H},Re&&t.createElement(b.Z,{className:Ie},Re),t.createElement(I.Z,{className:V},Ke,t.createElement(c.Z,{error:xe,help:Le,className:Ee})))}),L(this,"_renderCheckboxGroup",W=>{const{id:K,bsStyle:k,formGroupClassName:H,inputDescClassName:V,wrapperClassName:Ee,label:Re,error:Ie,help:xe}=this.props;return t.createElement(m.Z,{controlId:K,validationState:Ie?"error":k,bsClass:H},t.createElement(I.Z,{className:Ee},t.createElement(u.XZ,{inputRef:Le=>{this.input=Le},...W},Re),t.createElement(c.Z,{error:Ie,help:xe,className:V})))}),L(this,"_renderRadioGroup",W=>{const{id:K,bsStyle:k,formGroupClassName:H,inputDescClassName:V,wrapperClassName:Ee,label:Re,error:Ie,help:xe}=this.props;return t.createElement(m.Z,{controlId:K,validationState:Ie?"error":k,bsClass:H},t.createElement(I.Z,{className:Ee},t.createElement(u.Y8,{inputRef:Le=>{this.input=Le},...W},Re),t.createElement(c.Z,{error:Ie,help:xe,className:V})))})}render(){const{id:W,type:K,bsStyle:k,formGroupClassName:H,wrapperClassName:V,label:Ee,labelClassName:Re,inputDescClassName:Ie,name:xe,error:Le,help:ke,children:Ne,addonAfter:Ke,buttonAfter:ht,...De}=this.props;if(De.type=K,De.label=Ee,De.name=xe||W,!K)return this._renderFormGroup(Ne);switch(K){case"text":case"password":case"email":case"number":case"file":case"tel":return this._renderFormGroup(this._renderFormControl("input",De));case"textarea":return this._renderFormGroup(this._renderFormControl("textarea",De));case"select":return this._renderFormGroup(this._renderFormControl("select",De,Ne));case"checkbox":return this._renderCheckboxGroup(De);case"radio":return this._renderRadioGroup(De);default:console.warn(`Unsupported input type ${K}`)}return null}}L(F,"propTypes",{id:p().string.isRequired,type:p().string,name:p().string,label:p().oneOfType([p().element,p().string]),labelClassName:p().string,bsStyle:p().oneOf(["success","warning","error"]),formGroupClassName:p().string,inputDescClassName:p().string,value:p().oneOfType([p().string,p().number]),placeholder:p().string,error:p().oneOfType([p().element,p().string]),help:p().oneOfType([p().element,p().string]),wrapperClassName:p().string,addonAfter:p().oneOfType([p().element,p().string]),buttonAfter:p().oneOfType([p().element,p().string]),children:p().oneOfType([p().array,p().element])}),L(F,"defaultProps",{type:void 0,label:"",labelClassName:void 0,name:void 0,formGroupClassName:void 0,inputDescClassName:void 0,bsStyle:null,value:void 0,placeholder:"",error:void 0,help:void 0,wrapperClassName:void 0,addonAfter:null,buttonAfter:null,children:null});const D=F},"4ts0Ap8A":(S,w,i)=>{"use strict";i.d(w,{Z:()=>L,b:()=>A});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("aKyEWaw1"),u=i("J6y4/h8P"),b=i("2Mwm8zh5"),a=i.n(b);const m=({className:F,...D})=>E.createElement(c.InputGroup.Addon,{bsClass:F,...D}),A=(0,u.default)(m)(({theme:F})=>u.css`
color: ${F.colors.input.color};
background-color: ${F.colors.input.background};
border-color: ${F.colors.input.border};
`),I=({bsClass:F,className:D,...$})=>E.createElement(A,{className:a()(F,D),...$}),x=({bsClass:F,className:D,...$})=>E.createElement(c.InputGroup.Button,{bsClass:a()(F,D),...$}),N=({bsClass:F,className:D,...$})=>E.createElement(c.InputGroup,{bsClass:a()(F,D),...$});N.Addon=I,N.Button=x,m.propTypes={className:t().string},m.defaultProps={className:void 0},N.propTypes={bsClass:t().string,className:t().string,children:t().node.isRequired},N.defaultProps={bsClass:"input-group",className:void 0},I.propTypes={bsClass:t().string,className:t().string,children:t().node.isRequired},I.defaultProps={bsClass:"input-group-addon",className:void 0},x.propTypes={bsClass:t().string,className:t().string,children:t().node.isRequired},x.defaultProps={bsClass:"input-group-btn",className:void 0};const L=N},XgvalpFO:(S,w,i)=>{"use strict";i.d(w,{Z:()=>u});var E=i("KfF0gQb+"),p=i.n(E),t=i("Z7aTuO5B");const c=({children:b,className:a})=>a?t.createElement("div",{className:a},b):t.createElement("span",null,b);c.propTypes={className:p().string,children:p().node.isRequired},c.defaultProps={className:void 0};const u=c},MTL7eqpZ:(S,w,i)=>{"use strict";i.d(w,{Z:()=>A});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("aKyEWaw1"),u=i("J6y4/h8P"),b=i("6DSbqO9E");const a=u.default.div`
display: inline-flex;
min-width: 20px;
margin-right: 5px;
justify-content: center;
align-items: center;
`,m=({className:I,children:x,icon:N,...L})=>E.createElement(c.MenuItem,{bsClass:I,...L},x&&E.createElement(E.Fragment,null,N&&E.createElement(a,null,E.createElement(b.Z,{name:N})),x));m.propTypes={className:t().string,icon:t().string},m.defaultProps={className:void 0,icon:void 0};const A=m},"1ZqkN7VX":(S,w,i)=>{"use strict";i.d(w,{Z:()=>D});var E=i("aKyEWaw1"),p=i("J6y4/h8P"),t=i("Z7aTuO5B"),c=i("zowU9TNZ"),u=i.n(c),b=i("nFNIetA+");const m=$=>W=>{const{show:K,"data-event-element":k,"data-app-section":H}=W,V=(0,b.Z)();return(0,t.useEffect)(()=>{const Ee={app_section:u()(H),app_action_value:u()(k)};return K&&k&&V("modal_open",Ee),()=>{K&&k&&V("modal_close",Ee)}},[K,k,H,V]),t.createElement($,{...W})},A=p.css`
margin-top: 55px;
.modal-content {
background-color: ${({theme:$})=>$.colors.global.contentBackground};
border-color: ${({theme:$})=>$.colors.variant.light.default};
height: 100%;
}
`,I=p.css`
border-bottom-color: ${({theme:$})=>$.colors.variant.light.default};
button.close {
color: currentColor;
}
`,x=p.css`
font-size: ${({theme:$})=>$.fonts.size.h3};
`,N=p.css`
border-top-color: ${({theme:$})=>$.colors.variant.light.default};
`,L=p.css`
.form-group {
margin-bottom: 5px;
}
`,F=(0,p.default)(m(E.Modal))`
.modal-backdrop {
height: 100000%; /* yes, really. this fixes the backdrop being cut off when the page is scrolled. */
z-index: 1030;
}
form {
margin-bottom: 0;
}
.modal-dialog {
${A}
}
.modal-header {
${I}
}
.modal-footer {
${N}
}
.modal-title {
${x}
}
.modal-body {
${L}
}
`;F.Dialog=(0,p.default)(E.Modal.Dialog)`
${A}
`,F.Header=(0,p.default)(E.Modal.Header)`
${I}
`,F.Title=(0,p.default)(E.Modal.Title)`
${x}
`,F.Body=(0,p.default)(E.Modal.Body)`
${L}
`,F.Footer=(0,p.default)(E.Modal.Footer)`
${N}
`;const D=F},oNT5KYa6:(S,w,i)=>{"use strict";i.d(w,{Z:()=>F});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("J6y4/h8P"),u=i("aKyEWaw1"),b=i("wKBd6PgB");const a=(0,c.default)(u.Panel.Heading)`
.panel-title {
> a {
display: block;
}
}
`,m=(0,c.default)(u.Panel.Footer)(({theme:D})=>c.css`
background-color: ${D.colors.gray[90]};
border-top-color: ${D.colors.gray[80]};
`),A=(0,c.css)(({bsStyle:D="default",theme:$})=>{const W=$.colors.variant.lighter[D],K=$.colors.variant.dark[D];return c.css`
border-color: ${K};
> ${a} {
color: ${$.utils.readableColor(W)};
background-color: ${W};
border-color: ${K};
+ .panel-collapse > .panel-body {
border-top-color: ${K};
}
.badge {
color: ${W};
background-color: ${$.colors.variant[D]};
}
}
> ${m} {
+ .panel-collapse > .panel-body {
border-bottom-color: ${K};
}
}
`}),I=(0,c.default)(u.Panel)(({theme:D})=>c.css`
background-color: ${D.utils.colorLevel(D.colors.global.background,-4)};
> ${a} {
.panel-title,
.panel-title h3 {
font-size: ${D.fonts.size.large};
}
}
.panel-group {
> ${a} {
+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top-color: ${D.colors.gray[90]};
}
}
> ${m} {
+ .panel-collapse .panel-body {
border-bottom-color: ${D.colors.gray[90]};
}
}
}
${A}
`),x=(0,c.css)(({bsStyle:D="default",theme:$})=>{const W=$.colors.variant.lightest[D],K=$.colors.variant.light[D];return c.css`
/** NOTE: Deprecated & should be removed in 4.0 */
border-color: ${K};
background: ${$.colors.table.background};
& > .panel-heading {
color: ${$.utils.contrastingColor(W)};
background-color: ${W};
border-color: ${K};
> .panel-title,
> .panel-title > * {
font-size: ${$.fonts.size.large};
}
+ .panel-collapse > .panel-body {
border-top-color: ${K};
}
.badge {
color: ${W};
background-color: ${$.colors.variant[D]};
}
}
& > .panel-footer {
+ .panel-collapse > .panel-body {
border-bottom-color: ${K};
}
}
`}),N=(0,c.default)(u.Panel)(({theme:D})=>c.css`
/** NOTE: Deprecated & should be removed in 4.0 */
background-color: ${D.utils.colorLevel(D.colors.global.background,-4)};
.panel-footer {
background-color: ${D.colors.gray[90]};
border-top-color: ${D.colors.gray[80]};
}
.panel-group {
.panel-heading {
+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top-color: ${D.colors.gray[90]};
}
}
.panel-footer {
+ .panel-collapse .panel-body {
border-bottom-color: ${D.colors.gray[90]};
}
}
}
${x}
`),L=({title:D,children:$,collapsible:W,defaultExpanded:K,expanded:k,footer:H,header:V,onToggle:Ee,...Re})=>{const[Ie,xe]=(0,E.useState)(null),Le=(0,E.useRef)(!1);(0,E.useEffect)(()=>{xe(Ke=>K&&k||!K&&k||K&&Ke===k)},[k,K]),(0,E.useEffect)(()=>{Le.current=!0},[]);const ke=Ke=>{xe(Ke),Ee(Ke)},Ne=typeof $=="string"||Array.isArray($)&&typeof $[0]=="string";return V||H||D||W||Ne?(Le.current||(0,b.Z)("You have used a deprecated `Panel` prop, please check the documentation to use the latest `Panel`."),E.createElement(N,{expanded:Ie,onToggle:ke,...Re},(V||D)&&E.createElement(a,null,V,D&&E.createElement(u.Panel.Title,{toggle:W},D)),E.createElement(N.Body,{collapsible:W},$),H&&E.createElement(N.Footer,null,H))):E.createElement(I,{expanded:Ie,onToggle:ke,defaultExpanded:K,...Re},$)};L.propTypes={children:t().any.isRequired,collapsible:t().bool,defaultExpanded:t().bool,expanded:t().bool,onToggle:t().func,footer:t().string,header:t().oneOfType([t().string,t().node]),title:t().string},L.defaultProps={collapsible:!1,defaultExpanded:null,expanded:null,footer:void 0,header:void 0,onToggle:()=>{},title:void 0},L.Body=u.Panel.Body,L.Collapse=u.Panel.Collapse,L.Footer=m,L.Heading=a,L.Title=u.Panel.Title,L.Toggle=u.Panel.Toggle;const F=L},"l5ezlDz+":(S,w,i)=>{"use strict";i.d(w,{M:()=>t,Z:()=>u});var E=i("aKyEWaw1"),p=i("J6y4/h8P");const t=(0,p.css)(({theme:b})=>p.css`
background-color: ${b.colors.global.contentBackground};
border: 1px solid ${b.colors.variant.lighter.default};
margin-bottom: ${b.spacings.xs};
border-radius: 4px;
`),u=(0,p.default)(E.Row)`
&.content {
${t}
}
`},"Tk+7c1Lc":(S,w,i)=>{"use strict";i.d(w,{K:()=>c,Z:()=>b});var E=i("aKyEWaw1"),p=i("J6y4/h8P");const t=(0,p.css)(({theme:a})=>{const{table:m}=a.colors;let A="";const I={active:{background:m.variant.active,hover:m.variantHover.active},success:{background:m.variant.success,hover:m.variantHover.success},info:{background:m.variant.info,hover:m.variantHover.info},warning:{background:m.variant.warning,hover:m.variantHover.warning},danger:{background:m.variant.danger,hover:m.variantHover.danger}};return Object.keys(I).forEach(x=>{const{background:N,hover:L}=I[x];A+=`
&.table > thead > tr,
&.table > tfoot > tr,
&.table > tbody > tr {
> td.${x},
> th.${x},
&.${x} > td,
&.${x} > th {
background-color: ${N};
}
}
&.table-hover > tbody > tr {
> td.${x}:hover,
> th.${x}:hover,
&.${x}:hover > td,
&:hover > .${x},
&.${x}:hover > th {
background-color: ${L};
}
}
`}),p.css`
${A}
`}),c=(0,p.css)(({theme:a})=>p.css`
&.table {
> thead > tr,
> tbody > tr,
> tfoot > tr {
> th,
> td {
border-top-color: ${a.colors.table.backgroundAlt};
}
}
> thead > tr > th {
white-space: nowrap;
border-bottom-color: ${a.colors.table.backgroundAlt};
}
> tbody > tr {
background-color: ${a.colors.table.background};
transition: background-color 150ms ease-in-out;
}
> tbody + tbody {
border-top-color: ${a.colors.table.backgroundAlt};
}
.table {
background-color: ${a.colors.table.background};
}
}
&.table-bordered {
border-color: ${a.colors.table.backgroundAlt};
> thead > tr,
> tfoot > tr,
> tbody > tr {
> td,
> th {
border-color: ${a.colors.table.backgroundAlt};
}
}
}
&.table-striped > tbody > tr:nth-of-type(odd) {
background-color: ${a.colors.table.backgroundAlt};
}
&.table-hover > tbody > tr:hover {
background-color: ${a.colors.table.backgroundHover};
}
${t}
@media print {
&.table > thead > tr > th {
white-space: break-spaces;
word-break: break-all;
}
}
`),b=(0,p.default)(E.Table)`
${c}
`},"dfd/aQyz":(S,w,i)=>{"use strict";i.d(w,{JX:()=>E.Col,Lt:()=>E.Dropdown,XZ:()=>E.Checkbox,Y8:()=>E.Radio,eh:()=>E.PanelGroup,hE:()=>E.ButtonGroup,rj:()=>E.Grid});var E=i("aKyEWaw1")},"3DPl/h85":(S,w,i)=>{"use strict";i.d(w,{Alert:()=>E.Z,BootstrapModalForm:()=>$.Z,Button:()=>W.Z,ButtonGroup:()=>ar.hE,ButtonToolbar:()=>K.Z,Checkbox:()=>ar.XZ,Col:()=>ar.JX,ControlLabel:()=>k.Z,Dropdown:()=>ar.Lt,DropdownButton:()=>Re,FormControl:()=>Ie.Z,FormGroup:()=>xe.Z,Grid:()=>ar.rj,HelpBlock:()=>ke,Input:()=>Ne.Z,InputGroup:()=>Ke.Z,InputWrapper:()=>ht.Z,Jumbotron:()=>Ct,Label:()=>Bt,ListGroup:()=>Ft,ListGroupItem:()=>he,MenuItem:()=>rt.Z,Modal:()=>N.Z,Nav:()=>Tt,NavItem:()=>qe,Popover:()=>ue,Row:()=>Oe.Z,Tab:()=>Ur,Table:()=>yr.Z,Tabs:()=>Ws,Tooltip:()=>Hs,Well:()=>ps});var E=i("o7GEe6Qe"),p=i("Z7aTuO5B"),t=i("J6y4/h8P"),c=i("aKyEWaw1");const u=(0,t.default)(c.Badge)(({bsStyle:_,theme:te})=>{if(!_)return;const Ae=te.colors.variant[_],Ve=te.utils.readableColor(Ae);return t.css`
background-color: ${Ae};
color: ${Ve};
`}),b=(0,p.forwardRef)(({..._},te)=>p.createElement(u,{ref:te,..._})),a=null;var m=i("KfF0gQb+"),A=i.n(m),I=i("o8xG4j5J"),x=i("MjKCmu4z"),N=i("1ZqkN7VX"),L=i("+/lOUfGq");const F=({showModal:_,title:te,children:Ae,cancelButtonDisabled:Ve,confirmButtonDisabled:Rt,confirmButtonText:xt,onCancel:pe,onConfirm:Br,...br})=>p.createElement(L.Z,{showModal:_,onHide:pe,role:"alertdialog","data-event-element":br["data-telemetry-title"]||x.Z.getRecursiveChildText(te),...br},p.createElement(N.Z.Header,{closeButton:!0},p.createElement(N.Z.Title,null,te)),p.createElement(N.Z.Body,null,Ae),p.createElement(N.Z.Footer,null,p.createElement(I.Z,{disabledCancel:Ve,disabledSubmit:Rt,onCancel:pe,onSubmit:Br,submitButtonText:xt,submitButtonType:"button"})));F.propTypes={showModal:A().bool.isRequired,title:A().oneOfType([A().string,A().element]).isRequired,confirmButtonText:A().string,cancelButtonDisabled:A().bool,confirmButtonDisabled:A().bool,onCancel:A().func.isRequired,onConfirm:A().func.isRequired,children:A().oneOfType([A().string,A().element]).isRequired},F.defaultProps={confirmButtonText:"Confirm",cancelButtonDisabled:!1,confirmButtonDisabled:!1};const D=null;var $=i("jdU8EhS8"),W=i("GX8KkpAK"),K=i("qKIMiD1A"),k=i("X3hNKcxq");const V=(0,t.css)(({theme:_})=>t.css`
.dropdown-menu {
background-color: ${_.colors.global.contentBackground};
box-shadow: 0 3px 3px ${_.colors.global.navigationBoxShadow};
.dropdown-header {
padding: 3px 10px;
}
> li > a {
padding: 3px 10px;
display: flex;
color: ${_.colors.global.textDefault};
:hover,
:focus {
color: ${_.colors.variant.darker.default};
background-color: ${_.colors.variant.lightest.default};
}
}
> .active > a {
color: ${_.colors.variant.darker.default};
background-color: ${_.colors.variant.lightest.default};
:hover,
:focus {
color: ${_.colors.variant.darkest.default};
background-color: ${_.colors.variant.lighter.default};
}
}
> .disabled > a {
color: ${_.colors.variant.dark.default};
background-color: ${_.colors.variant.lightest.default};
:hover,
:focus {
color: ${_.colors.variant.dark.default};
background-color: ${_.colors.variant.lightest.default};
}
}
}
`),Re=(0,t.default)(c.DropdownButton)(({theme:_})=>t.css`
${_.components.button}
& ~ {
${V}
}
`);var Ie=i("WNxHkvfc"),xe=i("NzGc2uPJ");const ke=(0,t.default)(c.HelpBlock)(({theme:_})=>t.css`
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: ${_.colors.gray[50]};
`);var Ne=i("A2KAXP9g"),Ke=i("4ts0Ap8A"),ht=i("XgvalpFO");const De=(0,t.default)(c.Jumbotron)(({theme:_})=>t.css`
color: ${_.colors.global.textDefault};
background-color: ${_.colors.global.contentBackground};
h2 {
font-weight: bold;
}
p {
margin-bottom: 9px;
font-size: 20px;
font-weight: normal;
}
`),Ct=(0,p.forwardRef)((_,te)=>p.createElement(De,{ref:te,..._})),He=(_,te)=>{if(!te)return"";const Ae=_.colors.variant[te],Ve=_.utils.contrastingColor(Ae);return t.css`
background-color: ${Ae};
color: ${Ve};
`},ct=(0,t.default)(c.Label)(({bsStyle:_,theme:te})=>t.css`
${He(te,_)}
padding: 0.3em 0.6em;
`),Bt=(0,p.forwardRef)(({..._},te)=>p.createElement(ct,{ref:te,..._})),St=({className:_,...te})=>p.createElement(c.ListGroup,{bsClass:_,...te});St.propTypes={className:A().string},St.defaultProps={className:void 0};const Ft=St,sr=t.default.span(({theme:_})=>`
display: block;
border: 1px solid ${_.colors.variant.lighter.default};
margin-bottom: -1px;
&:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
&:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
`),B=(0,t.css)(({bsStyle:_,theme:te})=>{if(!_)return;const Ae=te.colors.variant.lighter[_],Ve=te.utils.readableColor(Ae);return t.css`
&.list-group-item-${_} {
color: ${Ve};
background-color: ${Ae};
a&,
button& {
color: ${Ve};
.list-group-item-heading {
color: inherit;
font-weight: bold;
}
&:hover,
&:focus {
color: ${Ve};
background-color: ${te.colors.variant.light[_]};
}
&.active,
&.active:hover,
&.active:focus {
color: ${te.utils.readableColor(te.colors.variant.light[_])};
background-color: ${te.colors.variant.light[_]};
border-color: ${te.colors.variant.light[_]};
}
}
}
`}),ne=(0,t.default)(c.ListGroupItem)(({theme:_})=>t.css`
background-color: ${_.colors.global.contentBackground};
border: 0;
padding: 5px 10px;
.list-group-item-heading {
font-size: ${_.fonts.size.h5};
}
.list-group-item-text {
margin-bottom: 5px;
}
a&,
button& {
color: ${_.colors.global.textDefault};
.list-group-item-heading {
color: ${_.colors.variant.darkest.default};
}
&:hover:not(.disabled),
&:focus:not(.disabled) {
background-color: ${_.colors.variant.lightest.default};
&.active {
color: ${_.colors.variant.darkest.default};
background-color: ${_.colors.variant.lightest.default};
border-color: ${_.colors.variant.lightest.default};
}
.list-group-item-heading {
color: ${_.utils.readableColor(_.colors.variant.lightest.default)};
}
}
}
&.disabled,
&.disabled:hover,
&.disabled:focus {
color: ${_.colors.variant.default};
background-color: ${_.colors.variant.lightest.default};
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: ${_.colors.variant.default};
}
}
&.active,
&.active:hover,
&.active:focus {
color: ${_.colors.variant.darker.default};
background-color: ${_.colors.variant.lightest.info};
border-color: ${_.colors.variant.lightest.info};
z-index: auto;
.list-group-item-heading,
.list-group-item-heading > small,
.list-group-item-heading > .small {
color: inherit;
}
.list-group-item-text {
color: ${_.colors.variant.light.primary};
}
}
${B}
`),me=(0,p.forwardRef)(({containerProps:_,...te},Ae)=>p.createElement(sr,{ref:Ae,..._},p.createElement(ne,{...te})));me.propTypes={containerProps:A().object},me.defaultProps={containerProps:{}};const he=me;var rt=i("MTL7eqpZ");const yt=(0,t.css)(({theme:_})=>t.css`
.nav-tabs {
border-bottom-color: ${_.colors.variant.default};
> li {
> a {
transition: background-color 150ms ease-in-out;
color: ${_.colors.global.textDefault};
border-color: ${_.colors.variant.lighter.default} ${_.colors.variant.lighter.default} ${_.colors.variant.default};
&:hover {
background-color: ${_.colors.variant.lightest.default};
color: ${_.colors.global.textDefault};
}
}
&.active > a {
&,
&:hover,
&:focus {
color: ${_.colors.variant.darkest.default};
background-color: ${_.colors.global.contentBackground};
border-color: ${_.colors.variant.default};
border-bottom-color: transparent;
}
}
&.disabled > a {
&,
&:hover,
&:focus {
color: ${_.colors.gray[60]};
background-color: ${_.colors.gray[100]};
border-color: ${_.colors.gray[100]} ${_.colors.gray[100]} ${_.colors.variant.default};
cursor: not-allowed;
}
}
}
}
&.nav-justified {
> .active > a {
&,
&:hover,
&:focus {
border-color: ${_.colors.variant.default};
}
}
@media (min-width: ${_.breakpoints.min.sm}) {
> li > a {
border-bottom-color: ${_.colors.variant.default};
}
> .active > a,
> .active > a:hover,
> .active > a:focus {
border-bottom-color: ${_.colors.gray[100]};
}
}
}
`),Tt=(0,t.default)(c.Nav)(({theme:_})=>t.css`
&.nav {
> li {
> a {
transition: background-color 150ms ease-in-out;
&:hover,
&:focus {
background-color: ${_.colors.variant.lightest.default};
}
}
&.disabled > a {
color: ${_.colors.variant.light.default};
&:hover,
&:focus {
color: ${_.colors.variant.light.default};
}
}
}
.open > a {
&,
&:hover,
&:focus {
background-color: ${_.colors.variant.lightest.default};
border-color: ${_.colors.variant.primary};
}
}
&.nav-pills {
> li {
&.active > a {
&,
&:hover,
&:focus {
color: ${_.utils.contrastingColor(_.colors.global.link)};
background-color: ${_.colors.global.link};
}
}
}
}
&.nav-sm {
> li > a {
padding: 8px 12px;
font-size: ${_.fonts.size.small};
}
};
&.nav-xs {
> li > a {
padding: 2px 6px;
font-size: ${_.fonts.size.small};
}
};
&.nav-lg {
> li > a {
padding: 14px 18px;
font-size: ${_.fonts.size.large};
}
};
&${yt} /* This is a known non-issue that stylelint won't ignore but will hopefully be patched soon https://github.com/stylelint/stylelint/issues/4574 */
}
`),wt="nav-item-state-indicator",nr=":before",Zt=`.${wt}${nr}`,Yt=_=>css`
${Zt} {
border-color: ${_.colors.gray[70]};
}
`,vr=_=>css`
${Zt} {
border-color: ${_.colors.gray[50]};
}
`,G=t.default.div`
display: inline;
position: relative;
${nr} {
content: ' ';
position: absolute;
border-bottom: 1px solid transparent;
left: 0;
width: 100%;
bottom: -4px;
}
`,le=({children:_})=>p.createElement(G,{className:wt},_);class $e extends c.NavDropdown{isActive({props:te},Ae,Ve){return te.active===!1?!1:te.active||Ae!=null&&te.eventKey===Ae||Ve&&te.href===Ve?!0:te.active}}const Pe=(0,t.default)(c.NavDropdown)`
${V}
`,ze=({title:_,inactiveTitle:te,badge:Ae,...Ve})=>{const Rt=te?te!==_:void 0;return p.createElement(Pe,{...Ve,title:p.createElement(le,null,Ae?p.createElement(Ae,{text:_}):_),active:Rt})};ze.propTypes={title:A().oneOfType([A().string,A().object]).isRequired,inactiveTitle:A().string,badge:A().func},ze.defaultProps={inactiveTitle:void 0,badge:void 0};const pt=(0,t.default)($e)`
${V}
`,ye=null,fe=({children:_,...te})=>p.createElement(c.NavItem,{...te},p.createElement(le,null,_));fe.displayName="NavItem";const qe=fe;var Ye=i("ww+BtWnX"),Ue=i.n(Ye);const at=(0,t.default)(c.Navbar)(({theme:_})=>t.css`
position: relative;
min-height: auto;
background-color: ${_.colors.global.navigationBackground};
border: 0;
box-shadow: 0 3px 3px ${_.colors.global.navigationBoxShadow};
margin-bottom: 0;
.navbar-text {
color: ${_.colors.global.textDefault};
}
@media (max-width: ${_.breakpoints.max.md}) {
&& .navbar-collapse {
position: absolute;
background-color: ${_.colors.global.navigationBackground};
width: 100%;
}
}
.navbar-nav {
> li > a,
> li > .btn-link {
color: ${_.colors.global.textDefault};
&:hover,
&:focus {
color: ${_.colors.variant.darker.default};
background-color: transparent;
}
}
> .active > a,
> .active > .btn-link {
color: ${_.colors.global.textDefault};
background-color: transparent;
&:hover,
&:focus {
color: ${_.colors.variant.darkest.default};
background-color: transparent;
}
}
> .disabled > a,
> .disabled > .btn-link {
&,
&:hover,
&:focus {
color: ${_.colors.gray[70]};
background-color: transparent;
}
}
> .open > a,
> .open > .btn-link {
&,
&:hover,
&:focus {
color: ${_.colors.variant.darkest.default};
background-color: transparent;
}
}
@media (max-width: ${_.breakpoints.max.md}) {
padding-left: 50px;
> li > a,
> li > .btn-link {
&:hover,
&:focus {
color: ${_.colors.variant.darker.default};
background-color: transparent;
}
}
.open .dropdown-menu {
> li > a,
> li > .btn-link {
color: ${_.colors.variant.darkest.default};
&:hover,
&:focus {
color: ${_.colors.variant.darker.default};
background-color: ${_.colors.variant.lightest.default};
}
}
> .active > a,
> .active > .btn-link {
color: ${_.colors.variant.darkest.default};
background-color: ${_.colors.gray[90]};
&:hover,
&:focus {
color: ${_.colors.variant.darkest.default};
background-color: ${_.colors.gray[80]};
}
}
> .disabled > a,
> .disabled > .btn-link {
&,
&:hover,
&:focus {
color: ${_.colors.gray[70]};
background-color: transparent;
}
}
}
}
}
.navbar-toggle {
background-color: ${_.colors.global.navigationBackground};
border-color: ${_.colors.variant.dark.default};
transition: background-color 150ms ease-in-out,
border-color 150ms ease-in-out;
position: relative;
:not(.collapsed) {
.icon-bar:nth-last-child(1),
.icon-bar:nth-last-child(3) {
transition: transform 150ms ease-in 150ms,
top 150ms ease-in 0s;
}
.icon-bar:nth-last-child(1) {
transform: rotate(-45deg) translate(4px, -4px);
}
.icon-bar:nth-last-child(3) {
transform: rotate(45deg) translate(4px, 4px);
}
.icon-bar:nth-last-child(2) {
transition: opacity 0s ease 150ms;
opacity: 0;
}
}
.icon-bar {
background-color: ${_.colors.variant.default};
transition: background-color 150ms ease-in-out,
transform 150ms ease-in 0s,
opacity 300ms ease-in 0s;
transform: rotate(0deg);
position: relative;
opacity: 1;
}
&:hover,
&:focus,
:not(.collapsed) {
background-color: ${_.colors.variant.lighter.default};
border-color: ${_.colors.variant.default};
.icon-bar {
background-color: ${_.colors.variant.dark.default};
}
}
}
.navbar-collapse,
.navbar-form {
border-color: ${Ue()(_.colors.gray[90]).darken(.065)};
}
.navbar-link {
color: ${_.colors.variant.default};
&:hover {
color: ${Ue()(_.colors.variant.default).darken(.25)};
}
}
.btn-link {
color: ${_.colors.variant.default};
&:hover,
&:focus {
color: ${_.colors.variant.dark.default};
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: ${_.colors.gray[80]};
}
}
}
.dropdown-header {
margin-top: 4px;
text-transform: uppercase;
padding: 0 15px !important;
font-weight: bold;
}
`),dt=null;var ve=i("oNT5KYa6"),bt=i("zowU9TNZ"),lt=i.n(bt),Er=i("nFNIetA+");const ee=_=>te=>{const{"data-event-element":Ae,"data-app-section":Ve}=te,Rt=(0,Er.Z)();return(0,p.useEffect)(()=>{const xt={app_section:lt()(Ve),app_action_value:lt()(Ae)};return xt.app_action_value&&Rt("popover_open",xt),()=>{xt.app_action_value&&Rt("popover_close",xt)}},[Ae,Ve,Rt]),p.createElement(_,{...te})},ue=(0,t.default)(ee(c.Popover))(({theme:_})=>{const te=_.colors.variant.light.default,Ae=_.colors.variant.lightest.default,Ve=_.colors.global.contentBackground;return t.css`
background-color: ${Ve};
border-color: ${te};
padding: 0;
.popover-title {
background-color: ${Ae};
border-color: ${te};
color: ${_.colors.variant.darkest.default};
}
&.top {
> .arrow {
border-top-color: ${te};
&::after {
border-top-color: ${Ae};
}
}
}
&.right {
> .arrow {
border-right-color: ${te};
&::after {
border-right-color: ${Ae};
z-index: 1;
}
}
}
&.bottom {
> .arrow {
border-bottom-color: ${te};
&::after {
border-bottom-color: ${Ae};
}
}
}
&.left {
> .arrow {
border-left-color: ${te};
&::after {
border-left-color: ${Ae};
}
}
}
`});var Oe=i("l5ezlDz+");const we=(0,t.default)(c.SplitButton)(({theme:_})=>t.css`
${_.components.button}
~ .btn.dropdown-toggle {
${_.components.button}
& ~ {
${V}
}
}
`),Qe=null,Ur=(0,t.default)(c.Tab)(({theme:_})=>t.css`
background-color: ${_.colors.global.contentBackground};
border: 1px solid ${_.colors.variant.default};
border-top: 0;
border-radius: 0 0 4px 4px;
padding: 9px;
`);var yr=i("Tk+7c1Lc");const Ws=(0,t.default)(c.Tabs)`
${yt}
`,et=10,Ks=(0,t.default)(c.Tooltip)(({theme:_})=>t.css`
&.in {
opacity: 1;
filter: drop-shadow(0 0 3px ${_.colors.variant.lighter.default});
}
&.top {
.tooltip-arrow {
border-top-color: ${_.colors.global.contentBackground};
border-width: ${et}px ${et}px 0;
margin-left: -${et}px;
bottom: -${et/2}px;
}
}
&.right {
.tooltip-arrow {
border-right-color: ${_.colors.global.contentBackground};
border-width: ${et}px ${et}px ${et}px 0;
margin-top: -${et}px;
left: -${et/2}px;
}
}
&.bottom {
.tooltip-arrow {
border-bottom-color: ${_.colors.global.contentBackground};
border-width: 0 ${et}px ${et}px;
margin-left: -${et}px;
top: -${et/2}px;
}
}
&.left {
.tooltip-arrow {
border-left-color: ${_.colors.global.contentBackground};
border-width: ${et}px 0 ${et}px ${et}px;
margin-top: -${et}px;
right: -${et/2}px;
}
}
.tooltip-inner {
color: ${_.colors.global.textDefault};
background-color: ${_.colors.global.contentBackground};
max-width: 300px;
opacity: 1;
.datapoint-info {
text-align: left;
.date {
color: ${_.colors.variant.darkest.default};
}
}
}
`),us=({children:_,className:te,id:Ae,placement:Ve,positionTop:Rt,positionLeft:xt,arrowOffsetTop:pe,arrowOffsetLeft:Br,show:br})=>p.createElement(Ks,{className:`${te} ${br?"in":""}`,id:Ae,placement:Ve,positionTop:Rt,positionLeft:xt,arrowOffsetTop:pe,arrowOffsetLeft:Br},_);us.propTypes={className:A().string,children:A().node.isRequired,id:A().oneOfType([A().string,A().number]).isRequired,placement:A().oneOf(["top","right","bottom","left"]),positionTop:A().oneOfType([A().number,A().string]),positionLeft:A().oneOfType([A().number,A().string]),arrowOffsetTop:A().oneOfType([A().number,A().string]),arrowOffsetLeft:A().oneOfType([A().number,A().string]),show:A().bool},us.defaultProps={className:void 0,placement:"right",positionTop:void 0,positionLeft:void 0,arrowOffsetTop:void 0,arrowOffsetLeft:void 0,show:!0};const Hs=us,ps=(0,t.default)(c.Well)(({theme:_})=>t.css`
background-color: ${_.colors.variant.lightest.default};
border-color: ${_.colors.variant.light.default};
color: ${_.colors.variant.darker.default};
`);var ar=i("dfd/aQyz")},twqACzrV:(S,w,i)=>{"use strict";i.d(w,{Z:()=>N});var E=i("KfF0gQb+"),p=i.n(E),t=i("Z7aTuO5B"),c=i("wNbjxLFG"),u=i.n(c),b=i("Tp/aLhHF"),a=i("3DPl/h85"),m=Object.defineProperty,A=(L,F,D)=>F in L?m(L,F,{enumerable:!0,configurable:!0,writable:!0,value:D}):L[F]=D,I=(L,F,D)=>(A(L,typeof F!="symbol"?F+"":F,D),D);class x extends t.Component{constructor(F){super(F),I(this,"_onSuccess",D=>{const{onSuccess:$}=this.props;this.setState({tooltipMessage:"Copied!"}),$(D),D.clearSelection()}),I(this,"_onError",D=>{const $=D.action==="cut"?"K":"C";this.setState({tooltipMessage:t.createElement("span",null,"Press Ctrl+",$,"\u2009/\u2009\u2318",$," to ",D.action)})}),I(this,"_getFilteredProps",()=>{const{className:D,style:$,bsStyle:W,bsSize:K,disabled:k,buttonTitle:H}=this.props;return{className:D,style:$,bsStyle:W,bsSize:K,disabled:k,title:H}}),this.state={tooltipMessage:""}}componentDidMount(){const{container:F}=this.props,D={};F&&(D.container=F),this.clipboard=new(u())("[data-gl-clipboard-button]",D),this.clipboard.on("success",this._onSuccess),this.clipboard.on("error",this._onError)}componentWillUnmount(){this.clipboard&&this.clipboard.destroy()}render(){const{action:F,title:D,text:$,target:W}=this.props,{tooltipMessage:K}=this.state,k=this._getFilteredProps(),H=t.createElement(a.Tooltip,{id:"copy-button-tooltip",show:!0},K);return $?k["data-clipboard-text"]=$:k["data-clipboard-target"]=W,t.createElement(b.Z,{placement:"top",trigger:"click",overlay:H,rootClose:!0},t.createElement(a.Button,{"data-gl-clipboard-button":!0,"data-clipboard-action":F,...k},D))}}I(x,"propTypes",{title:p().oneOfType([p().node,p().string]).isRequired,action:p().oneOf(["copy","cut"]),text:p().string,target:p().string,onSuccess:p().func,className:p().string,style:p().object,bsStyle:p().string,bsSize:p().string,disabled:p().bool,buttonTitle:p().string,container:p().any}),I(x,"defaultProps",{action:"copy",disabled:!1,buttonTitle:void 0,container:void 0,text:void 0,target:void 0,className:void 0,style:void 0,bsStyle:void 0,bsSize:void 0,onSuccess:()=>{}});const N=x},cB3oI9m5:(S,w,i)=>{"use strict";i.d(w,{Z:()=>u});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p);const c=({children:b,delay:a})=>{const[m,A]=(0,E.useState)(a<=0);return(0,E.useEffect)(()=>{if(a<=0)return()=>{};const I=window.setTimeout(()=>A(!0),a);return()=>clearTimeout(I)},[]),m?E.createElement(E.Fragment,null,b):null};c.propTypes={children:t().node.isRequired,delay:t().number.isRequired};const u=c},"6DSbqO9E":(S,w,i)=>{"use strict";i.d(w,{Z:()=>F});var E=i("Z7aTuO5B"),p=i("zz8lN1pr"),t=i.n(p),c=i("wKBd6PgB"),u=i("4nztvAe1");const a=[{v4:"address-book-o",v5:"address-book"},{v4:"address-card-o",v5:"address-card"},{v4:"area-chart",v5:"chart-area"},{v4:"arrow-circle-o-down",v5:"arrow-alt-circle-down"},{v4:"arrow-circle-o-left",v5:"arrow-alt-circle-left"},{v4:"arrow-circle-o-right",v5:"arrow-alt-circle-right"},{v4:"arrow-circle-o-up",v5:"arrow-alt-circle-up"},{v4:"arrows",v5:"arrows-alt"},{v4:"arrows-alt",v5:"expand-arrows-alt"},{v4:"arrows-h",v5:"arrows-alt-h"},{v4:"arrows-v",v5:"arrows-alt-v"},{v4:"asl-interpreting",v5:"american-sign-language-interpreting"},{v4:"automobile",v5:"car"},{v4:"bank",v5:"university"},{v4:"bar-chart",v5:"chart-bar"},{v4:"bar-chart-o",v5:"chart-bar"},{v4:"bathtub",v5:"bath"},{v4:"battery",v5:"battery-full"},{v4:"battery-0",v5:"battery-empty"},{v4:"battery-1",v5:"battery-quarter"},{v4:"battery-2",v5:"battery-half"},{v4:"battery-3",v5:"battery-three-quarters"},{v4:"battery-4",v5:"battery-full"},{v4:"bell-o",v5:"bell"},{v4:"bell-slash-o",v5:"bell-slash"},{v4:"bookmark-o",v5:"bookmark"},{v4:"building-o",v5:"building"},{v4:"cab",v5:"taxi"},{v4:"calendar",v5:"calendar-alt"},{v4:"calendar-check-o",v5:"calendar-check"},{v4:"calendar-minus-o",v5:"calendar-minus"},{v4:"calendar-o",v5:"calendar"},{v4:"calendar-plus-o",v5:"calendar-plus"},{v4:"calendar-times-o",v5:"calendar-times"},{v4:"caret-square-o-down",v5:"caret-square-down"},{v4:"caret-square-o-left",v5:"caret-square-left"},{v4:"caret-square-o-right",v5:"caret-square-right"},{v4:"caret-square-o-up",v5:"caret-square-up"},{v4:"cc",v5:"closed-captioning"},{v4:"chain",v5:"link"},{v4:"chain-broken",v5:"unlink"},{v4:"check-circle-o",v5:"check-circle"},{v4:"check-square-o",v5:"check-square"},{v4:"circle-o",v5:"circle"},{v4:"circle-o-notch",v5:"circle-notch"},{v4:"circle-thin",v5:"circle"},{v4:"clock-o",v5:"clock"},{v4:"close",v5:"times"},{v4:"cloud-download",v5:"cloud-download-alt"},{v4:"cloud-upload",v5:"cloud-upload-alt"},{v4:"cny",v5:"yen-sign"},{v4:"code-fork",v5:"code-branch"},{v4:"comment-o",v5:"comment"},{v4:"commenting",v5:"comment-dots"},{v4:"commenting-o",v5:"comment-dots"},{v4:"comments-o",v5:"comments"},{v4:"credit-card-alt",v5:"credit-card"},{v4:"cutlery",v5:"utensils"},{v4:"dashboard",v5:"tachometer-alt"},{v4:"deafness",v5:"deaf"},{v4:"dedent",v5:"outdent"},{v4:"diamond",v5:"gem"},{v4:"dollar",v5:"dollar-sign"},{v4:"dot-circle-o",v5:"dot-circle"},{v4:"drivers-license",v5:"id-card"},{v4:"drivers-license-o",v5:"id-card"},{v4:"envelope-o",v5:"envelope"},{v4:"envelope-open-o",v5:"envelope-open"},{v4:"eur",v5:"euro-sign"},{v4:"euro",v5:"euro-sign"},{v4:"exchange",v5:"exchange-alt"},{v4:"external-link",v5:"external-link-alt"},{v4:"external-link-square",v5:"external-link-square-alt"},{v4:"eye",v5:"eye"},{v4:"eye-slash",v5:"eye-slash"},{v4:"eyedropper",v5:"eye-dropper"},{v4:"feed",v5:"rss"},{v4:"file-archive-o",v5:"file-archive"},{v4:"file-audio-o",v5:"file-audio"},{v4:"file-code-o",v5:"file-code"},{v4:"file-excel-o",v5:"file-excel"},{v4:"file-image-o",v5:"file-image"},{v4:"file-movie-o",v5:"file-video"},{v4:"file-o",v5:"file"},{v4:"file-pdf-o",v5:"file-pdf"},{v4:"file-photo-o",v5:"file-image"},{v4:"file-picture-o",v5:"file-image"},{v4:"file-powerpoint-o",v5:"file-powerpoint"},{v4:"file-sound-o",v5:"file-audio"},{v4:"file-text",v5:"file-alt"},{v4:"file-text-o",v5:"file-alt"},{v4:"file-video-o",v5:"file-video"},{v4:"file-word-o",v5:"file-word"},{v4:"file-zip-o",v5:"file-archive"},{v4:"files-o",v5:"copy"},{v4:"flag-o",v5:"flag"},{v4:"flash",v5:"bolt"},{v4:"floppy-o",v5:"save"},{v4:"folder-o",v5:"folder"},{v4:"folder-open-o",v5:"folder-open"},{v4:"frown-o",v5:"frown"},{v4:"futbol-o",v5:"futbol"},{v4:"gbp",v5:"pound-sign"},{v4:"gear",v5:"cog"},{v4:"gears",v5:"cogs"},{v4:"glass",v5:"glass-martini"},{v4:"group",v5:"users"},{v4:"hand-grab-o",v5:"hand-rock"},{v4:"hand-lizard-o",v5:"hand-lizard"},{v4:"hand-o-down",v5:"hand-point-down"},{v4:"hand-o-left",v5:"hand-point-left"},{v4:"hand-o-right",v5:"hand-point-right"},{v4:"hand-o-up",v5:"hand-point-up"},{v4:"hand-paper-o",v5:"hand-paper"},{v4:"hand-peace-o",v5:"hand-peace"},{v4:"hand-pointer-o",v5:"hand-pointer"},{v4:"hand-rock-o",v5:"hand-rock"},{v4:"hand-scissors-o",v5:"hand-scissors"},{v4:"hand-spock-o",v5:"hand-spock"},{v4:"hand-stop-o",v5:"hand-paper"},{v4:"handshake-o",v5:"handshake"},{v4:"hard-of-hearing",v5:"deaf"},{v4:"hdd-o",v5:"hdd"},{v4:"header",v5:"heading"},{v4:"heart-o",v5:"heart"},{v4:"hospital-o",v5:"hospital"},{v4:"hotel",v5:"bed"},{v4:"hourglass-1",v5:"hourglass-start"},{v4:"hourglass-2",v5:"hourglass-half"},{v4:"hourglass-3",v5:"hourglass-end"},{v4:"hourglass-o",v5:"hourglass"},{v4:"id-badge",v5:"id-badge"},{v4:"id-card-o",v5:"id-card"},{v4:"ils",v5:"shekel-sign"},{v4:"image",v5:"image"},{v4:"inr",v5:"rupee-sign"},{v4:"institution",v5:"university"},{v4:"intersex",v5:"transgender"},{v4:"jpy",v5:"yen-sign"},{v4:"keyboard-o",v5:"keyboard"},{v4:"krw",v5:"won-sign"},{v4:"legal",v5:"gavel"},{v4:"lemon-o",v5:"lemon"},{v4:"level-down",v5:"level-down-alt"},{v4:"level-up",v5:"level-up-alt"},{v4:"life-bouy",v5:"life-ring"},{v4:"life-buoy",v5:"life-ring"},{v4:"life-ring",v5:"life-ring"},{v4:"life-saver",v5:"life-ring"},{v4:"lightbulb-o",v5:"lightbulb"},{v4:"line-chart",v5:"chart-line"},{v4:"list-alt",v5:"list-alt"},{v4:"long-arrow-down",v5:"long-arrow-alt-down"},{v4:"long-arrow-left",v5:"long-arrow-alt-left"},{v4:"long-arrow-right",v5:"long-arrow-alt-right"},{v4:"long-arrow-up",v5:"long-arrow-alt-up"},{v4:"mail-forward",v5:"share"},{v4:"mail-reply",v5:"reply"},{v4:"mail-reply-all",v5:"reply-all"},{v4:"map-marker",v5:"map-marker-alt"},{v4:"map-o",v5:"map"},{v4:"meh-o",v5:"meh"},{v4:"minus-square-o",v5:"minus-square"},{v4:"mobile",v5:"mobile-alt"},{v4:"mobile-phone",v5:"mobile-alt"},{v4:"money",v5:"money-bill-alt"},{v4:"moon-o",v5:"moon"},{v4:"mortar-board",v5:"graduation-cap"},{v4:"navicon",v5:"bars"},{v4:"newspaper-o",v5:"newspaper"},{v4:"object-group",v5:"object-group"},{v4:"object-ungroup",v5:"object-ungroup"},{v4:"paper-plane-o",v5:"paper-plane"},{v4:"paste",v5:"clipboard"},{v4:"pause-circle-o",v5:"pause-circle"},{v4:"pencil",v5:"pencil-alt"},{v4:"pencil-square",v5:"pen-square"},{v4:"pencil-square-o",v5:"edit"},{v4:"photo",v5:"image"},{v4:"picture-o",v5:"image"},{v4:"pie-chart",v5:"chart-pie"},{v4:"play-circle-o",v5:"play-circle"},{v4:"plus-square-o",v5:"plus-square"},{v4:"question-circle-o",v5:"question-circle"},{v4:"refresh",v5:"sync"},{v4:"registered",v5:"registered"},{v4:"remove",v5:"times"},{v4:"reorder",v5:"bars"},{v4:"repeat",v5:"redo"},{v4:"rmb",v5:"yen-sign"},{v4:"rotate-left",v5:"undo"},{v4:"rotate-right",v5:"redo"},{v4:"rouble",v5:"ruble-sign"},{v4:"rub",v5:"ruble-sign"},{v4:"ruble",v5:"ruble-sign"},{v4:"rupee",v5:"rupee-sign"},{v4:"s15",v5:"bath"},{v4:"scissors",v5:"cut"},{v4:"send",v5:"paper-plane"},{v4:"send-o",v5:"paper-plane"},{v4:"share-square-o",v5:"share-square"},{v4:"shekel",v5:"shekel-sign"},{v4:"sheqel",v5:"shekel-sign"},{v4:"shield",v5:"shield-alt"},{v4:"sign-in",v5:"sign-in-alt"},{v4:"sign-out",v5:"sign-out-alt"},{v4:"signing",v5:"sign-language"},{v4:"sliders",v5:"sliders-h"},{v4:"smile-o",v5:"smile"},{v4:"snowflake-o",v5:"snowflake"},{v4:"soccer-ball-o",v5:"futbol"},{v4:"sort-alpha-asc",v5:"sort-alpha-down"},{v4:"sort-alpha-desc",v5:"sort-alpha-up"},{v4:"sort-amount-asc",v5:"sort-amount-down"},{v4:"sort-amount-desc",v5:"sort-amount-up"},{v4:"sort-asc",v5:"sort-up"},{v4:"sort-desc",v5:"sort-down"},{v4:"sort-numeric-asc",v5:"sort-numeric-down"},{v4:"sort-numeric-desc",v5:"sort-numeric-up"},{v4:"spoon",v5:"utensil-spoon"},{v4:"square-o",v5:"square"},{v4:"star-half-empty",v5:"star-half"},{v4:"star-half-full",v5:"star-half"},{v4:"star-half-o",v5:"star-half"},{v4:"star-o",v5:"star"},{v4:"sticky-note-o",v5:"sticky-note"},{v4:"stop-circle-o",v5:"stop-circle"},{v4:"sun-o",v5:"sun"},{v4:"support",v5:"life-ring"},{v4:"tablet",v5:"tablet-alt"},{v4:"tachometer",v5:"tachometer-alt"},{v4:"television",v5:"tv"},{v4:"thermometer",v5:"thermometer-full"},{v4:"thermometer-0",v5:"thermometer-empty"},{v4:"thermometer-1",v5:"thermometer-quarter"},{v4:"thermometer-2",v5:"thermometer-half"},{v4:"thermometer-3",v5:"thermometer-three-quarters"},{v4:"thermometer-4",v5:"thermometer-full"},{v4:"thumb-tack",v5:"thumbtack"},{v4:"thumbs-o-down",v5:"thumbs-down"},{v4:"thumbs-o-up",v5:"thumbs-up"},{v4:"ticket",v5:"ticket-alt"},{v4:"times-circle-o",v5:"times-circle"},{v4:"times-rectangle",v5:"window-close"},{v4:"times-rectangle-o",v5:"window-close"},{v4:"toggle-down",v5:"caret-square-down"},{v4:"toggle-left",v5:"caret-square-left"},{v4:"toggle-right",v5:"caret-square-right"},{v4:"toggle-up",v5:"caret-square-up"},{v4:"trash",v5:"trash-alt"},{v4:"trash-o",v5:"trash-alt"},{v4:"try",v5:"lira-sign"},{v4:"turkish-lira",v5:"lira-sign"},{v4:"unsorted",v5:"sort"},{v4:"usd",v5:"dollar-sign"},{v4:"user-circle-o",v5:"user-circle"},{v4:"user-o",v5:"user"},{v4:"vcard",v5:"address-card"},{v4:"vcard-o",v5:"address-card"},{v4:"video-camera",v5:"video"},{v4:"volume-control-phone",v5:"phone-volume"},{v4:"warning",v5:"exclamation-triangle"},{v4:"window-close-o",v5:"window-close"},{v4:"window-maximize",v5:"window-maximize"},{v4:"window-restore",v5:"window-restore"},{v4:"won",v5:"won-sign"},{v4:"yen",v5:"yen-sign"}],m=(0,u.Z)(()=>Promise.all([i.e("e642b42f-168"),i.e("e642b42f-794")]).then(i.bind(i,"FeM1feQS"))),A=D=>D.replace(/^fa-/,""),I=D=>{const $=t()(a,{v4:D}),W=$&&$.v5||D;return $&&(0,c.Z)(`You have used a deprecated \`Icon\` name. \`${D}\` should be \`${W}\``),W},x=(D,$)=>{const W=A(D);return $!=="brand"?I(W):W},N=D=>{switch(D){case"brand":return"fab";case"regular":return"far";case"solid":default:return"fas"}},L=({name:D,type:$,size:W,className:K,spin:k,fixedWidth:H,inverse:V,style:Ee,"data-testid":Re,onClick:Ie,onMouseEnter:xe,onMouseLeave:Le,onFocus:ke,tabIndex:Ne,title:Ke})=>{const ht=x(D,$),De=N($);return E.createElement(m,{className:K,"data-testid":Re,fixedWidth:H,icon:{prefix:De,iconName:ht},inverse:V,size:W,spin:k,style:Ee,onClick:Ie,onMouseEnter:xe,onMouseLeave:Le,tabIndex:Ne,title:Ke,onFocus:ke})};L.defaultProps={className:void 0,"data-testid":void 0,fixedWidth:!1,inverse:!1,size:void 0,spin:!1,style:void 0,type:"solid",onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,onFocus:void 0,tabIndex:void 0,title:void 0};const F=L},Btg6k4SR:(S,w,i)=>{"use strict";i.d(w,{Z:()=>A});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("J6y4/h8P"),u=i("3DPl/h85");const b=c.default.span(({theme:I})=>`
color: ${I.colors.variant.danger};
`),a=c.default.span(({theme:I,hasError:x})=>`
color: ${x?I.colors.gray[50]:"inherit"};
`),m=({className:I,error:x,help:N})=>!N&&!x?null:E.createElement(u.HelpBlock,{className:`${I!=null?I:""} input-description`},x&&E.createElement(b,null,x),!!x&&!!N&&E.createElement("br",null),N&&E.createElement(a,{hasError:!!x},N));m.propTypes={className:t().string,error:t().oneOfType([t().element,t().string]),help:t().oneOfType([t().element,t().string])},m.defaultProps={className:void 0,error:void 0,help:void 0};const A=m},o8xG4j5J:(S,w,i)=>{"use strict";i.d(w,{Z:()=>A});var E=i("Z7aTuO5B"),p=i("J6y4/h8P"),t=i("GX8KkpAK"),c=i("qKIMiD1A"),u=i("6DSbqO9E"),b=i("zf+4LgXf");const a=(0,p.default)(c.Z)`
display: flex;
justify-content: flex-end;
align-items: end;
`,m=I=>{const{isAsyncSubmit:x,bsSize:N,className:L,displayCancel:F,disabledSubmit:D,formId:$,leftCol:W,onSubmit:K,submitButtonText:k,submitButtonType:H,submitIcon:V}=I;return E.createElement(a,{className:L},W,F&&E.createElement(t.Z,{type:"button",bsSize:N,onClick:I.onCancel,disabled:I.disabledCancel||x&&I.isSubmitting},"Cancel"),E.createElement(t.Z,{bsStyle:"success",bsSize:N,disabled:D||x&&I.isSubmitting,form:$,title:k,type:H,onClick:K},V&&!(x&&I.isSubmitting)&&E.createElement(E.Fragment,null,E.createElement(u.Z,{name:V})," "),x&&I.isSubmitting?E.createElement(b.Z,{text:I.submitLoadingText,delay:0}):k))};m.defaultProps={bsSize:void 0,className:void 0,disabledSubmit:!1,displayCancel:!0,isAsyncSubmit:!1,formId:void 0,isSubmitting:!1,leftCol:void 0,onSubmit:void 0,submitButtonType:"submit",submitIcon:void 0};const A=m},"Tp/aLhHF":(S,w,i)=>{"use strict";i.d(w,{Z:()=>a});var E=i("Z7aTuO5B"),p=i("8mAVzjyp"),t=i("J6y4/h8P");const c=t.default.span`
display: inline-block;
`,u=t.default.div`
display: inline-block;
`;class b extends E.Component{constructor(A){super(A),this.targetRef=(0,E.createRef)(),this.containerRef=(0,E.createRef)(),this.state={show:!1}}hide(){this.setState({show:!1})}render(){let A;const{children:I,container:x,placement:N,overlay:L,rootClose:F,trigger:D,testId:$,className:W,...K}=this.props,{show:k}=this.state,H=Re=>this.setState({show:Re}),V=()=>H(!k),Ee={click:{onClick:V},hover:{onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1)},focus:{onFocus:()=>H(!0),onBlur:()=>H(!1)}};if(Array.isArray(D)){const Re={};D.forEach(Ie=>{A=Object.assign(Re,Ee[Ie])})}else A=Ee[D];return E.createElement(u,{ref:()=>this.containerRef,"data-testid":$,className:W},E.createElement(c,{ref:this.targetRef,className:I.props.className,role:"button"},E.cloneElement(I,{...A,className:""})),k&&E.createElement(p.aV,{show:k,container:x!=null?x:this.containerRef.current,containerPadding:10,placement:N,shouldUpdatePosition:!0,rootClose:F,target:this.targetRef.current,transition:p.uT,onHide:V,...K},L))}}b.defaultProps={trigger:"click",rootClose:!1,container:null,testId:void 0,className:void 0};const a=b},V7hwd7tl:(S,w,i)=>{"use strict";i.d(w,{K:()=>Ne,Z:()=>vr});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("mRfwq5Kw"),u=i("BTV0187F"),b=i("XA+A/4T+"),a=i("FtmMm3gp"),m=i.n(a),A=i("J6y4/h8P"),I=i("G1loatyd"),x=i("6B2vepvr"),N=i("d8vaRnhg"),L=i("J35SmSEq");const F=1e3,D=300,$=A.default.div`
flex: 1 1 auto;
height: ${G=>(G==null?void 0:G.height)||D}px;
`,W=({data:G,index:Z,setSize:le,style:$e,containerWidth:Pe})=>{const ze=(0,E.useRef)(null);return(0,E.useEffect)(()=>{le(Z,ze.current.getBoundingClientRect().height)},[le,Z,Pe]),E.createElement("div",{ref:ze,"data-testid":"react-window-list-item",style:$e},G[Z])},K=({children:G,listRef:Z,...le})=>{const $e=(0,E.useRef)(null),Pe=(0,E.useRef)(null),ze=(0,E.useRef)({}),pt=(0,L.Z)($e),{width:ye}=pt,fe=(0,E.useCallback)((Ue,at)=>{var dt;ze.current={...ze.current,[Ue]:at},(dt=(Z||Pe).current)==null||dt.resetAfterIndex(Ue)},[Z]),qe=Object.entries(G).reduce((Ue,[at])=>ze.current[at]&&Ueze.current[Ue]||36,[ze]);return E.createElement($,{ref:$e,height:qe,"data-testid":"infinite-loader-container"},E.createElement(N.S_,{ref:Z||Pe,height:qe||300,itemCount:G.length,itemSize:Ye,itemData:G,width:ye,...le},({data:Ue,index:at,style:dt})=>E.createElement(W,{data:Ue,style:dt,index:at,setSize:fe,containerWidth:ye})))};K.defaultProps={listRef:void 0};const k=({children:G,innerProps:Z,...le})=>!(G!=null&&G.length)||G.lengthE.createElement(Ie,{key:"noOptions",className:"menu-notice menu-notice--no-options"},"No Options"),ke=({children:G,selectProps:{loadOptions:Z,total:le}})=>{const $e=G!=null&&G.length?G:[xe()];return E.createElement(Re.Z,{isItemLoaded:Pe=>PeE.createElement(K,{listRef:ze,onItemsRendered:Pe},$e))},Ne="common-select-control",Ke=({children:G,...Z})=>E.createElement(c.c.MultiValueRemove,{...Z},G),ht=()=>null,De=G=>{const{children:Z=E.createElement(V.Z,{name:"caret-down"}),getStyles:le,innerProps:{ref:$e,...Pe}}=G;return E.createElement("div",{style:le("dropdownIndicator",G),ref:$e,...Pe},Z)},ft=({children:G,...Z})=>E.createElement(c.c.Control,{...Z,className:Ne},G),Ct=G=>Z=>{const{data:le}=Z;return E.createElement(c.c.Option,{...Z},G(le))},He=G=>Z=>{const{data:le}=Z;return E.createElement(c.c.SingleValue,{...Z},G(le))},ct=G=>Z=>E.createElement(c.c.Input,{...Z,...G}),vt=(G,Z)=>({...G,padding:"0px",fontSize:"150%",marginRight:"1rem",transform:Z.selectProps.menuIsOpen&&"rotate(180deg)"}),Bt=G=>({...G,padding:"5px"}),St=({theme:G})=>Z=>({...Z,border:`1px solid ${G.colors.variant.lighter.info}`}),Ft=({theme:G})=>Z=>({...Z,padding:"2px 5px",fontSize:G.fonts.size.small}),sr=({theme:G})=>Z=>({...Z,borderLeft:`1px solid ${G.colors.variant.lighter.info}`,paddingLeft:"5px",paddingRight:"5px",borderRadius:"0"}),B={minHeight:"29px",height:"29px"},ne={minHeight:"34px"},me=G=>({...G,zIndex:5}),he=G=>({...G,zIndex:"auto"}),rt=({theme:G})=>Z=>({...Z,lineHeight:"28px",fontFamily:G.fonts.family.body,fontSize:G.fonts.size.body,fontWeight:400}),Et=({theme:G})=>Z=>({...Z,color:G.colors.input.placeholder,lineHeight:"28px",fontFamily:G.fonts.family.body,fontSize:G.fonts.size.body,fontWeight:400,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:"100%",paddingRight:"20px"}),yt=({size:G,theme:Z})=>(le,{isFocused:$e})=>{const Pe=$e?1:le.borderWidth,ze=$e?0:le.outline,pt=$e?Z.colors.input.boxShadow:null;return{...le,...G==="small"?B:ne,borderWidth:Pe,boxShadow:pt,outline:ze,borderRadius:Ee.L$,alignItems:"center"}},qt=({size:G})=>Z=>({...Z,padding:G==="small"?"0 8px":"2px 10px"}),Tt={DropdownIndicator:De,MultiValueRemove:Ke,IndicatorSeparator:ht,Control:ft},wt=({size:G,theme:Z})=>({dropdownIndicator:vt,clearIndicator:Bt,multiValue:St({theme:Z}),multiValueLabel:Ft({theme:Z}),multiValueRemove:sr({theme:Z}),menu:me,menuPortal:he,singleValue:rt({theme:Z}),placeholder:Et({theme:Z}),control:yt({size:G,theme:Z}),valueContainer:qt({size:G})}),nr=(G,Z,le,$e)=>{const Pe={};return G&&(Pe.Input=ct(G)),Z&&(Pe.Option=Ct(Z)),le&&(Pe.SingleValue=He(le)),Pe.MenuList=$e?ke:H,Pe};class Zt extends E.Component{constructor(Z){super(Z),this.getValue=()=>{const{value:ye}=this.state;return ye},this.clearValue=()=>{this.setState({value:void 0})},this._extractOptionValue=ye=>{const{multi:fe,valueKey:qe,delimiter:Ye}=this.props;return ye?fe&&Array.isArray(ye)?ye.map(Ue=>Ue[qe]).join(Ye):ye[qe||""]:""},this._onChange=ye=>{const fe=this._extractOptionValue(ye);this.props.persistSelection&&this.setState({value:fe});const{onChange:qe=()=>{}}=this.props;qe(fe)},this._formatInputValue=ye=>{const{options:fe,displayKey:qe,valueKey:Ye,delimiter:Ue,allowCreate:at,async:dt}=this.props;return ye==null||typeof ye=="string"&&ye===""?[]:(at||dt)&&typeof ye=="string"?ye.split(Ue).map(ve=>{const bt={[Ye]:ve,[qe]:ve};return fe.find(Er=>Er[Ye]===ve)||bt}):(typeof ye=="string"?(ye!=null?ye:"").split(Ue):[ye]).map(ve=>{const bt=fe.find(lt=>lt[Ye||""]===ve);return bt!=null?bt:{[qe]:String(ye),[Ye]:ye}})},this._selectTheme=ye=>{const{theme:fe}=this.props;return{...ye,colors:{...ye.colors,primary:fe.colors.input.borderFocus,primary75:fe.colors.variant.light.default,primary50:fe.colors.variant.lighter.default,primary25:fe.colors.variant.lightest.default,danger:fe.colors.variant.darker.info,dangerLight:fe.colors.variant.lighter.info,neutral0:fe.colors.input.background,neutral5:fe.colors.input.backgroundDisabled,neutral10:fe.colors.variant.lightest.info,neutral20:fe.colors.input.border,neutral30:fe.colors.gray[70],neutral40:fe.colors.gray[60],neutral50:fe.colors.gray[50],neutral60:fe.colors.gray[40],neutral70:fe.colors.gray[30],neutral80:fe.colors.gray[20],neutral90:fe.colors.gray[10]}}},this.createCustomFilter=ye=>{const{matchProp:fe,ignoreAccents:qe}=this.props,Ye={ignoreAccents:qe};return fe==="any"?(0,u.c)(Ye):(0,u.c)({...Ye,stringify:ye})};const{inputProps:le,optionRenderer:$e,value:Pe,valueRenderer:ze,async:pt}=Z;this.state={customComponents:nr(le,$e,ze,pt),value:Pe}}UNSAFE_componentWillReceiveProps(Z){const{inputProps:le,optionRenderer:$e,value:Pe,valueRenderer:ze,async:pt}=this.props;Pe!==Z.value&&this.setState({value:Z.value}),(!m()(le,Z.inputProps)||$e!==Z.optionRenderer||ze!==Z.valueRenderer)&&this.setState({customComponents:nr(le,$e,ze,pt)})}render(){const{allowCreate:Z=!1,displayKey:le,components:$e,valueKey:Pe,onReactSelectChange:ze,size:pt,theme:ye}=this.props,{customComponents:fe,value:qe}=this.state,Ye=this._formatInputValue(qe),{multi:Ue,disabled:at,clearable:dt,inputProps:ve,matchProp:bt,optionRenderer:lt,valueRenderer:Er,menuPortalTarget:kt,async:ee,total:j,onInputChange:ue,loadOptions:Oe,...we}=this.props,Qe=At=>At[bt],Ge=this.createCustomFilter(Qe),Ur={...Tt,...$e,...fe},yr={...we,onChange:ze||this._onChange,onInputChange:ue,async:ee,isMulti:Ue,isDisabled:at,isClearable:dt,loadOptions:Oe,getOptionLabel:At=>At[le]||At.label,getOptionValue:At=>At[Pe],filterOption:Ge,components:Ur,menuPortalTarget:kt,isOptionDisabled:At=>!!At.disabled,styles:wt({size:pt,theme:ye}),theme:this._selectTheme,total:j,value:Ye};return Z?E.createElement(I.ZP,{ref:we.forwardedRef,...yr}):E.createElement(b.ZP,{ref:we.forwardedRef,...yr})}}Zt.propTypes={allowCreate:t().bool,className:t().string,clearable:t().bool,components:t().objectOf(t().elementType),delimiter:t().string,disabled:t().bool,displayKey:t().string,id:t().string,inputId:t().string,ignoreAccents:t().bool,inputProps:t().object,matchProp:t().oneOf(["any","label","value"]),multi:t().bool,name:t().string,onBlur:t().func,onChange:t().func.isRequired,onInputChange:t().func,options:t().array.isRequired,optionRenderer:t().func,required:t().bool,size:t().oneOf(["normal","small"]),theme:x.rG.isRequired,value:t().oneOfType([t().string,t().number,t().object,t().arrayOf(t().object)]),valueKey:t().string,valueRenderer:t().func,addLabelText:t().string,autoFocus:t().bool,onReactSelectChange:t().func,placeholder:t().string,persistSelection:t().bool,menuPlacement:t().oneOf(["top","bottom","auto"]),maxMenuHeight:t().number,async:t().bool,total:t().number,loadOptions:t().func},Zt.defaultProps={addLabelText:void 0,allowCreate:!1,autoFocus:!1,className:void 0,clearable:!0,components:null,delimiter:",",disabled:!1,displayKey:"label",persistSelection:!0,id:void 0,ignoreAccents:!0,inputId:void 0,onBlur:void 0,inputProps:void 0,matchProp:"any",multi:!1,name:void 0,openMenuOnFocus:void 0,onReactSelectChange:void 0,onMenuClose:void 0,optionRenderer:void 0,placeholder:void 0,required:!1,size:"normal",value:void 0,valueKey:"value",valueRenderer:void 0,menuPlacement:"auto",maxMenuHeight:300,async:!1,total:0,onInputChange:void 0,loadOptions:void 0,menuPortalTarget:void 0,forwardedRef:void 0};const vr=(0,A.withTheme)(Zt)},"zf+4LgXf":(S,w,i)=>{"use strict";i.d(w,{Z:()=>A});var E=i("Z7aTuO5B"),p=i("KfF0gQb+"),t=i.n(p),c=i("J6y4/h8P"),u=i("6DSbqO9E"),b=i("cB3oI9m5");const a=(0,c.default)(u.Z)(({$displayMargin:I})=>I?"margin-right: 6px;":""),m=({name:I,text:x,delay:N,...L})=>E.createElement(b.Z,{delay:N},E.createElement(a,{...L,name:I,$displayMargin:!!(x!=null&&x.trim()),spin:!0}),x);m.propTypes={delay:t().number,name:t().string,text:t().string},m.defaultProps={name:"spinner",text:"Loading...",delay:200};const A=m},J35SmSEq:(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("Z7aTuO5B"),p=i("c6cF5anj"),t=i("+V9FPWJ/"),c=i.n(t);const b=(a,m=200)=>{const[A,I]=(0,E.useState)({width:0,height:0}),x=c()(N=>I(N),m);return(0,E.useLayoutEffect)(()=>{if(a!=null&&a.current){const{width:N,height:L}=a.current.getBoundingClientRect();I({width:N,height:L})}},[a]),(0,p.Z)(a,({contentRect:{width:N,height:L}})=>{x({width:N,height:L})}),A}},"9QUCfm+a":(S,w,i)=>{"use strict";i.d(w,{Ib:()=>ct,ZP:()=>Bt,vl:()=>Ft});var E=i("2fG0j4rQ"),p=i.n(E),t=i("yviUsp+Y"),c=i.n(t);class u extends Error{constructor(ne,me,he){var rt,Et;super(ne),this.name="FetchError";const yt=c()(he)?he:(rt=he==null?void 0:he.message)!=null?rt:"Not available";this.message=`There was an error fetching a resource: ${ne}. Additional information: ${yt}`,this.responseMessage=(Et=he==null?void 0:he.message)!=null?Et:void 0,this.additional={body:he,status:me,res:{text:c()(he)&&he}},this.status=me}}var b=i("JnTtTRmZ"),a=i.n(b),m=i("oNXBLaYg");const I=(0,m.ei)("Errors",()=>a().createActions(["report"])),x="ReactError",N="NotFoundError",L="UnauthorizedError",F="StreamPermissionError",D=(B,ne)=>({error:B,info:ne,type:x}),$=B=>({error:B,type:N}),W=B=>({error:B,type:L}),K=B=>({error:B,type:F}),k=B=>{var ne,me;switch(B.status){case 403:return((me=(ne=B==null?void 0:B.additional)==null?void 0:ne.body)==null?void 0:me.type)==="MissingStreamPermission"?K(B):W(B);case 404:return $(B);default:throw Error(`Provided FetchError is not a valid ReportedError because status code ${B.status} is not supported`)}},H=class{constructor(B,ne=!1){this._promise=B,this._isCanceled=ne}then(B,ne){return new H(this._promise.then(B,ne),this._isCanceled)}catch(B){return new H(this._promise.catch(B),this._isCanceled)}finally(B){return new H(this._promise.finally(B),this._isCanceled)}static of(B){return new H(B)}cancel(){return this._isCanceled=!0,this}isCancelled(){return this._isCanceled}},Ee=H;var Re=i("ekPuBHq5"),Ie=i("NhE/kDWp");const xe=(0,m.ei)("core.ServerAvailability",()=>a().createActions(["reportError","reportSuccess"])),Le=B=>window.fetch(B,{method:"GET",headers:{Accept:"application/json","X-Graylog-No-Session-Extension":"true"}}),ke=(0,m.dS)("core.ServerAvailability",()=>a().createStore({listenables:[xe],server:{up:!0},init(){this.ping()},getInitialState(){return{server:this.server}},ping(){return Le(Re.DC(Ie.Z.ping().url)).then(()=>xe.reportSuccess(),B=>xe.reportError(B))},reportError(B){this.server.up&&(this.server={up:!1,error:B},this.trigger({server:this.server}))},reportSuccess(){this.server.up||(this.server={up:!0},this.trigger({server:this.server}))}})),Ne=p()(()=>i("86K41z9a")),Ke=()=>{xe.reportSuccess()},ht=B=>I.report(k(B)),De=B=>B&&B!==""?B:void 0,ft=async(B,ne=ht)=>{var me,he;const rt=(me=B.headers)==null?void 0:me.get("Content-Type"),Et=await(rt!=null&&rt.startsWith("application/json")?B.json().then(wt=>wt):(he=B==null?void 0:B.text)==null?void 0:he.call(B)),{SessionStore:yt,SessionActions:qt}=Ne(),Tt=new u(B.statusText,B.status,De(Et));throw yt.isLoggedIn()&&B.status===401&&qt.logout(),yt.isLoggedIn()&&B.status===403&&ne(Tt),B&&!B.status&&xe.reportError(Tt),Tt},Ct=B=>B&&typeof B!="string"?JSON.stringify(B):B,He=B=>{if(B.ok){const{status:ne}=B,me=Number.parseInt(B.headers.get("Content-Length"),10),he=ne===204||me===0;return Ke(),he?null:B.json()}throw B};class ct{constructor(ne,me){this.options={},this.method=ne,this.url=me.replace(/([^:])\/\//,"$1/"),this.options={"X-Requested-With":"XMLHttpRequest","X-Requested-By":"XMLHttpRequest"},this.responseHandler=he=>he,this.errorHandler=void 0}setHeader(ne,me){return this.options={...this.options,[ne]:me},this}json(ne){return this.body={body:Ct(ne),mimeType:"application/json"},this.accept="application/json",this.responseHandler=He,this.errorHandler=me=>ft(me),this}formData(ne,me="application/json"){return this.body={body:ne},this.accept=me,this.responseHandler=He,this.errorHandler=he=>ft(he),this}file(ne,me){return this.body={body:Ct(ne),mimeType:"application/json"},this.accept=me,this.responseHandler=he=>{if(he.ok)return Ke(),he.text();throw he},this.errorHandler=he=>ft(he),this}plaintext(ne){return this.body={body:ne,mimeType:"text/plain"},this.accept="application/json",this.responseHandler=He,this.errorHandler=me=>ft(me),this}ignoreUnauthorized(){return this.errorHandler=ne=>ft(ne,()=>{}),this}noSessionExtension(){return this.options={...this.options,"X-Graylog-No-Session-Extension":"true"},this}build(){const ne=this.body&&this.body.mimeType?{...this.options,"Content-Type":this.body.mimeType}:this.options;return this.accept&&(ne.Accept=this.accept),Ee.of(window.fetch(this.url,{method:this.method,headers:ne,body:this.body?this.body.body:void 0})).then(this.responseHandler,this.errorHandler).catch(this.errorHandler)}}function vt(B){const{SessionStore:ne,SessionActions:me}=Ne();return ne.isLoggedIn()?B:()=>Ee.of(new Promise((he,rt)=>{me.login.completed.listen(()=>{B().then(he,rt)})}))}function Bt(B,ne,me,he=!0){const rt=()=>new ct(B,ne).json(me).build();return he?vt(rt)():rt()}function St(B,ne,me){return vt(()=>new ct(B,ne).plaintext(me).build())()}function Ft(B,ne,me){return vt(()=>new ct(B,ne).noSessionExtension().json(me).build())()}function sr(B,ne,me,he="text/csv"){return vt(()=>new ct(B,ne).file(me,he).build())()}},oNXBLaYg:(S,w,i)=>{"use strict";i.d(w,{dS:()=>t,ei:()=>p,ri:()=>E});const E=(c,u)=>(window.singletons[c]||(window.singletons[c]=u()),window.singletons[c]),p=(c,u)=>E(`${c}Actions`,u),t=(c,u)=>E(`${c}Store`,u);typeof window.singletons>"u"&&(window.singletons={})},"nFNIetA+":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("Z7aTuO5B"),p=i("oNXBLaYg");const t=E.createContext({sendTelemetry:()=>{}}),c=(0,p.ri)("contexts.TelemetryContext",()=>t),b=()=>{const{sendTelemetry:a}=(0,E.useContext)(c);return a}},"NhE/kDWp":(S,w,i)=>{"use strict";i.d(w,{Z:()=>c});var E=i("bcEkMz+H"),p=i.n(E);const c={AlarmCallbacksApiController:{available:()=>({url:"/alerts/callbacks/types"}),create:u=>({url:`/streams/${u}/alarmcallbacks`}),delete:(u,b)=>({url:`/streams/${u}/alarmcallbacks/${b}`}),listAll:()=>({url:"/alerts/callbacks"}),list:u=>({url:`/streams/${u}/alarmcallbacks`}),testAlert:u=>({url:`/alerts/callbacks/${u}/test`}),update:(u,b)=>({url:`/streams/${u}/alarmcallbacks/${b}`})},AlarmCallbackHistoryApiController:{list:(u,b)=>({url:`/streams/${u}/alerts/${b}/history`})},AuthenticationController:{create:()=>({url:"/system/authentication/services/backends"}),delete:u=>({url:`/system/authentication/services/backends/${u}`}),disableUser:u=>({url:`/system/authentication/users/${u}/disable`}),enableUser:u=>({url:`/system/authentication/users/${u}/enable`}),load:u=>({url:`/system/authentication/services/backends/${u}`}),loadActive:()=>({url:"/system/authentication/services/active-backend"}),loadUsersPaginated:u=>({url:`/system/authentication/services/backends/${u}/users`}),loadActiveBackendType:()=>({url:"/system/authentication/services/backends/active-backend/type"}),servicesPaginated:()=>({url:"/system/authentication/services/backends"}),testConnection:()=>({url:"/system/authentication/services/test/backend/connection"}),testLogin:()=>({url:"/system/authentication/services/test/backend/login"}),update:u=>({url:`/system/authentication/services/backends/${u}`}),updateConfiguration:()=>({url:"/system/authentication/services/configuration"})},AuthzRolesController:{load:u=>({url:`/authz/roles/${u}`}),delete:u=>({url:`/authz/roles/${u}`}),list:()=>({url:"/authz/roles"}),removeMember:(u,b)=>({url:`/authz/roles/${u}/assignee/${b}`}),addMembers:u=>({url:`/authz/roles/${u}/assignees`}),loadRolesForUser:u=>({url:`/authz/roles/user/${u}`}),loadUsersForRole:u=>({url:`/authz/roles/${u}/assignees`})},CatalogsController:{showEntityIndex:()=>({url:"/system/catalog"}),queryEntities:()=>({url:"/system/catalog"})},CodecTypesController:{list:()=>({url:"/system/codecs/types/all"})},ContentPacksController:{list:()=>({url:"/system/content_packs/latest"}),get:u=>({url:`/system/content_packs/${u}`}),getRev:(u,b)=>({url:`/system/content_packs/${u}/${b}`}),downloadRev:(u,b)=>({url:`/system/content_packs/${u}/${b}/download`}),create:()=>({url:"/system/content_packs"}),delete:u=>({url:`/system/content_packs/${u}`}),deleteRev:(u,b)=>({url:`/system/content_packs/${u}/${b}`}),install:(u,b)=>({url:`/system/content_packs/${u}/${b}/installations`}),installList:u=>({url:`/system/content_packs/${u}/installations`}),uninstall:(u,b)=>({url:`/system/content_packs/${u}/installations/${b}`}),uninstallDetails:(u,b)=>({url:`/system/content_packs/${u}/installations/${b}/uninstall_details`})},CountsApiController:{total:()=>({url:"/count/total"}),indexSetTotal:u=>({url:`/count/${u}/total`})},ClusterApiResource:{list:()=>({url:"/system/cluster/nodes"}),node:()=>({url:"/system/cluster/node"}),elasticsearchStats:()=>({url:"/system/cluster/stats/elasticsearch"})},ClusterConfigResource:{config:()=>({url:"/system/cluster_config"})},GrokPatternsController:{test:()=>({url:"/system/grok/test"}),paginated:()=>({url:"/system/grok/paginated"})},DashboardsApiController:{create:()=>({url:"/dashboards"}),index:()=>({url:"/dashboards"}),get:u=>({url:`/dashboards/${u}`}),delete:u=>({url:`/dashboards/${u}`}),update:u=>({url:`/dashboards/${u}`}),addWidget:u=>({url:`/dashboards/${u}/widgets`}),removeWidget:(u,b)=>({url:`/dashboards/${u}/widgets/${b}`}),widget:(u,b)=>({url:`/dashboards/${u}/widgets/${b}`}),updateWidget:(u,b)=>({url:`/dashboards/${u}/widgets/${b}`}),widgetValue:(u,b)=>({url:`/dashboards/${u}/widgets/${b}/value`}),updatePositions:u=>({url:`/dashboards/${u}/positions`})},DecoratorsResource:{available:()=>({url:"/search/decorators/available"}),create:()=>({url:"/search/decorators"}),get:()=>({url:"/search/decorators"}),remove:u=>({url:`/search/decorators/${u}`}),update:u=>({url:`/search/decorators/${u}`})},DeflectorApiController:{cycle:u=>({url:`/cluster/deflector/${u}/cycle`}),list:u=>({url:`/system/deflector/${u}`})},EntityScopeController:{getScope:()=>({url:"/entity_scopes"})},EntityShareController:{prepare:u=>({url:`/authz/shares/entities/${u}/prepare`}),update:u=>({url:`/authz/shares/entities/${u}`}),userSharesPaginated:u=>({url:`/authz/shares/user/${u}`}),entityScopes:()=>({url:"/entity_scopes"})},EventDefinitionsApiController:{list:()=>({url:"/events/definitions"}),paginated:()=>({url:"/events/definitions/paginated"}),get:u=>({url:`/events/definitions/${u}`}),create:()=>({url:"/events/definitions"}),bulkDelete:()=>({url:"/events/definitions/bulk_delete"}),bulkSchedule:()=>({url:"/events/definitions/bulk_schedule"}),bulkUnschedule:()=>({url:"/events/definitions/bulk_unschedule"}),update:u=>({url:`/events/definitions/${u}`}),delete:u=>({url:`/events/definitions/${u}`})},EventNotificationsApiController:{list:()=>({url:"/events/notifications"}),paginated:()=>({url:"/events/notifications/paginated"}),get:u=>({url:`/events/notifications/${u}`}),create:()=>({url:"/events/notifications"}),bulkDelete:()=>({url:"/events/notifications/bulk_delete"}),bulkSchedule:()=>({url:"/events/notifications/bulk_schedule"}),bulkUnschedule:()=>({url:"/events/notifications/bulk_unschedule"}),update:u=>({url:`/events/notifications/${u}`}),delete:u=>({url:`/events/notifications/${u}`})},HTTPHeaderAuthConfigController:{load:()=>({url:"/system/authentication/http-header-auth-config"}),update:()=>({url:"/system/authentication/http-header-auth-config"})},IndexerClusterApiController:{health:()=>({url:"/system/indexer/cluster/health"}),name:()=>({url:"/system/indexer/cluster/name"})},IndexerFailuresApiController:{count:u=>({url:`/system/indexer/failures/count?since=${u}`}),list:(u,b)=>({url:`/system/indexer/failures?limit=${u}&offset=${b}`})},IndexerOverviewApiResource:{list:u=>({url:`/system/indexer/overview/${u}`})},IndexRangesApiController:{list:()=>({url:"/system/indices/ranges"}),rebuild:u=>({url:`/system/indices/ranges/index_set/${u}/rebuild`}),rebuildSingle:u=>({url:`/system/indices/ranges/${u}/rebuild`})},IndexSetsApiController:{list:u=>({url:`/system/indices/index_sets?stats=${u}`}),listPaginated:(u,b,a)=>({url:`/system/indices/index_sets?skip=${u}&limit=${b}&stats=${a}`}),get:u=>({url:`/system/indices/index_sets/${u}`}),create:()=>({url:"/system/indices/index_sets"}),delete:(u,b)=>({url:`/system/indices/index_sets/${u}?delete_indices=${b}`}),setDefault:u=>({url:`/system/indices/index_sets/${u}/default`}),stats:()=>({url:"/system/indices/index_sets/stats"})},IndicesApiController:{close:u=>({url:`/system/indexer/indices/${u}/close`}),delete:u=>({url:`/system/indexer/indices/${u}`}),list:u=>({url:`/system/indexer/indices/${u}/list`}),listAll:()=>({url:"/system/indexer/indices"}),listClosed:u=>({url:`/system/indexer/indices/${u}/closed`}),multiple:()=>({url:"/system/indexer/indices/multiple"}),reopen:u=>({url:`/system/indexer/indices/${u}/reopen`})},InputsApiController:{list:()=>({url:"/system/inputs"}),get:u=>({url:`/system/inputs/${u}`}),globalRecentMessage:u=>({url:`/${u}`})},InputStatesController:{start:u=>({url:`/system/inputstates/${u}`}),stop:u=>({url:`/system/inputstates/${u}`})},ClusterInputStatesController:{list:()=>({url:"/cluster/inputstates"}),start:u=>({url:`/cluster/inputstates/${u}`}),stop:u=>({url:`/cluster/inputstates/${u}`})},ClusterLoggersResource:{loggers:()=>({url:"/cluster/system/loggers"}),subsystems:()=>({url:"/cluster/system/loggers/subsystems"}),setSubsystemLoggerLevel:(u,b,a)=>({url:`/cluster/system/loggers/${u}/subsystems/${b}/level/${a}`})},ClusterSupportBundleController:{delete:u=>({url:`/cluster/debug/support/bundle/${u}`}),download:u=>({url:`/cluster/debug/support/bundle/download/${u}`}),list:()=>({url:"/cluster/debug/support/bundle/list"}),create:()=>({url:"/cluster/debug/support/bundle/build"})},MessageFieldsApiController:{list:()=>({url:"/system/fields"}),types:()=>({url:"views/fields"})},MetricsApiController:{multiple:()=>({url:"/system/metrics/multiple"}),byNamespace:u=>({url:`/system/metrics/namespace/${u}`})},ClusterMetricsApiController:{multiple:u=>({url:`/cluster/${u}/metrics/multiple`}),multipleAllNodes:()=>({url:"/cluster/metrics/multiple"}),byNamespace:(u,b)=>({url:`/cluster/${u}/metrics/namespace/${b}`})},NotificationsApiController:{delete:u=>({url:`/system/notifications/${u}`}),deleteWithKey:(u,b)=>({url:`/system/notifications/${u}/${b}`}),list:()=>({url:"/system/notifications"}),getHtmlMessage:u=>({url:`/system/notification/message/html/${u.toLocaleUpperCase()}`}),getHtmlMessageWithKey:(u,b)=>({url:`/system/notification/message/html/${u.toLocaleUpperCase()}/${b}`})},OutputsApiController:{index:()=>({url:"/system/outputs"}),create:()=>({url:"/system/outputs"}),delete:u=>({url:`/system/outputs/${u}`}),update:u=>({url:`/system/outputs/${u}`}),availableType:u=>({url:`/system/outputs/available/${u}`}),availableTypes:()=>({url:"/system/outputs/available"})},RolesApiController:{listRoles:()=>({url:"/roles"}),createRole:()=>({url:"/roles"}),updateRole:u=>({url:`/roles/${u}`}),deleteRole:u=>({url:`/roles/${u}`}),loadMembers:u=>({url:`/roles/${u}/members`})},SavedSearchesApiController:{create:()=>({url:"/search/saved"}),delete:u=>({url:`/search/saved/${u}`}),update:u=>({url:`/search/saved/${u}`})},SessionsApiController:{validate:()=>({url:"/system/sessions"})},StreamsApiController:{index:()=>({url:"/streams"}),paginated:()=>({url:"/streams/paginated"}),get:u=>({url:`/streams/${u}`}),bulk_delete:()=>({url:"/streams/bulk_delete"}),bulk_resume:()=>({url:"/streams/bulk_resume"}),bulk_pause:()=>({url:"/streams/bulk_pause"}),create:()=>({url:"/streams"}),update:u=>({url:`/streams/${u}`}),cloneStream:u=>({url:`/streams/${u}/clone`}),delete:u=>({url:`/streams/${u}`}),pause:u=>({url:`/streams/${u}/pause`}),resume:u=>({url:`/streams/${u}/resume`}),testMatch:u=>({url:`/streams/${u}/testMatch`})},StreamOutputsApiController:{add:u=>({url:`/streams/${u}/outputs`}),index:u=>({url:`/streams/${u}/outputs`}),delete:(u,b)=>({url:`/streams/${u}/outputs/${b}`})},StreamRulesApiController:{delete:(u,b)=>({url:`/streams/${u}/rules/${b}`}),update:(u,b)=>({url:`/streams/${u}/rules/${b}`}),create:u=>({url:`/streams/${u}/rules`})},SystemApiController:{info:()=>({url:"/system"}),jvm:()=>({url:"/system/jvm"}),fields:()=>({url:"/system/fields"}),locales:()=>({url:"/system/locales"})},SystemJobsApiController:{list:()=>({url:"/cluster/jobs"}),getJob:u=>({url:`/cluster/jobs/${u}`}),acknowledgeJob:u=>({url:`/system/jobs/acknowledge/${u}`}),cancelJob:u=>({url:`/cluster/jobs/${u}`})},SystemMessagesApiController:{all:u=>({url:`/system/messages?page=${u}`})},SystemSearchVersionApiController:{satisfiesVersion:(u,b)=>({url:`/system/searchVersion/satisfiesVersion/${u}${b?`?version=${b}`:""}`})},ToolsApiController:{grokTest:()=>({url:"/tools/grok_tester"}),jsonTest:()=>({url:"/tools/json_tester"}),naturalDateTest:(u,b)=>({url:`/tools/natural_date_tester?string=${u}&timezone=${b}`}),regexTest:()=>({url:"/tools/regex_tester"}),regexValidate:u=>({url:`/tools/regex_tester/validate?regex=${u}`}),regexReplaceTest:()=>({url:"/tools/regex_replace_tester"}),splitAndIndexTest:()=>({url:"/tools/split_and_index_tester"}),substringTest:()=>({url:"/tools/substring_tester"}),containsStringTest:()=>({url:"/tools/contains_string_tester"}),lookupTableTest:()=>({url:"/tools/lookup_table_tester"}),urlWhitelistCheck:()=>({url:"/system/urlwhitelist/check"}),urlWhitelistGenerateRegex:()=>({url:"/system/urlwhitelist/generate_regex"})},TelemetryApiController:{info:()=>({url:"/telemetry"}),setting:()=>({url:"/telemetry/user/settings"})},UniversalSearchApiController:{_streamFilter(u){return u?{filter:`streams:${u}`}:{}},_buildBaseQueryString(u,b,a){const m={},A=this._streamFilter(a);return m.query=u,Object.keys(b).forEach(I=>{m[I]=b[I]}),Object.keys(A).forEach(I=>{m[I]=A[I]}),m},_buildUrl(u,b){return`${u}?${p().stringify(b)}`},search(u,b,a,m,A,I,x,N,L){const F=`/search/universal/${u}`,D=this._buildBaseQueryString(b,a,m);return A&&(D.limit=A),I&&(D.offset=I),x&&N&&(D.sort=`${x}:${N}`),L!==void 0&&(D.decorate=L),{url:this._buildUrl(F,D)}},export(u,b,a,m,A,I,x){const N=`/search/universal/${u}/export`,L=this._buildBaseQueryString(b,a,m);return A&&(L.limit=A),I&&(L.offset=I),x&&(L.fields=x.join(",")),{url:this._buildUrl(N,L)}}},UsersApiController:{changePassword:u=>({url:`/users/${u}/password`}),create:()=>({url:"/users"}),list:()=>({url:"/users"}),paginated:()=>({url:"/users/paginated"}),load:u=>({url:`/users/id/${u}`}),loadByUsername:u=>({url:`/users/${u}`}),delete:u=>({url:`/users/id/${u}`}),update:u=>({url:`/users/${u}`}),create_token:(u,b)=>({url:`/users/${u}/tokens/${b}`}),delete_token:(u,b)=>({url:`/users/${u}/tokens/${b}`}),list_tokens:u=>({url:`/users/${u}/tokens`}),setStatus:(u,b)=>({url:`/users/${u}/status/${b}`})},DashboardsController:{show:u=>({url:`/dashboards/${u}`})},ExtractorsController:{create:u=>({url:`/system/inputs/${u}/extractors`}),delete:(u,b)=>({url:`/system/inputs/${u}/extractors/${b}`}),order:u=>({url:`/system/inputs/${u}/extractors/order`}),update:(u,b)=>({url:`/system/inputs/${u}/extractors/${b}`})},MessagesController:{analyze:(u,b)=>({url:`/messages/${u}/analyze?string=${b}`}),parse:()=>({url:"/messages/parse"}),single:(u,b)=>({url:`/messages/${u}/${b}`}),exportSearch:u=>({url:`/views/search/messages/${u}`}),exportSearchType:(u,b)=>({url:`/views/search/messages/${u}/${b}`}),jobResults:(u,b)=>({url:`/views/search/messages/job/${u}/${b}`})},ExportJobsController:{exportSearch:u=>({url:`/views/export/${u}`}),exportSearchType:(u,b)=>({url:`/views/export/${u}/${b}`})},MapDataController:{search:()=>({url:"/search/mapdata"})},PipelinesController:{list:()=>({url:"/system/pipelines/pipeline"}),paginatedList:()=>({url:"/system/pipelines/pipeline/paginated"}),create:()=>({url:"/system/pipelines/pipeline"}),get:u=>({url:`/system/pipelines/pipeline/${u}`}),update:u=>({url:`/system/pipelines/pipeline/${u}`}),delete:u=>({url:`/system/pipelines/pipeline/${u}`}),parse:()=>({url:"/system/pipelines/pipeline/parse"})},RulesController:{list:()=>({url:"/system/pipelines/rule"}),paginatedList:()=>({url:"/system/pipelines/rule/paginated"}),create:()=>({url:"/system/pipelines/rule"}),get:u=>({url:`/system/pipelines/rule/${u}`}),update:u=>({url:`/system/pipelines/rule/${u}`}),delete:u=>({url:`/system/pipelines/rule/${u}`}),multiple:()=>({url:"/system/pipelines/rule/multiple"}),functions:()=>({url:"/system/pipelines/rule/functions"}),parse:()=>({url:"/system/pipelines/rule/parse"}),simulate:()=>({url:"/system/pipelines/rule/simulate"}),metricsConfig:()=>({url:"/system/pipelines/rule/config/metrics"})},ConnectionsController:{list:()=>({url:"/system/pipelines/connections"}),to_stream:()=>({url:"/system/pipelines/connections/to_stream"}),to_pipeline:()=>({url:"/system/pipelines/connections/to_pipeline"})},SimulatorController:{simulate:()=>({url:"/system/pipelines/simulate"})},ping:()=>({url:"/"})}},"4nztvAe1":(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("Z7aTuO5B"),p=i("EbCZ3hb/");const t=({error:a})=>((0,E.useEffect)(()=>{console.error(a)},[a]),E.createElement("div",null,"Loading component failed: ",a.message)),c=E.createElement(E.Fragment,null),b=a=>{const m=E.lazy(a);return A=>E.createElement(p.SV,{FallbackComponent:t},E.createElement(E.Suspense,{fallback:c},E.createElement(m,{...A})))}},"86K41z9a":(S,w,i)=>{"use strict";i.r(w),i.d(w,{SessionActions:()=>A,SessionStore:()=>I});var E=i("JnTtTRmZ"),p=i.n(E);const t={set(x,N,L=window.localStorage){L.setItem(x,JSON.stringify(N))},get(x,N=window.localStorage){const L=N.getItem(x);if(L!=null)try{return JSON.parse(L)}catch{return L}},delete(x,N=window.localStorage){N.removeItem(x)},sessionSet(x,N){return t.set(x,N,window.sessionStorage)},sessionGet(x){return t.get(x,window.sessionStorage)},sessionDelete(x){return t.delete(x,window.sessionStorage)}},c=t;var u=i("ekPuBHq5"),b=i("NhE/kDWp"),a=i("9QUCfm+a"),m=i("oNXBLaYg");const A=(0,m.ei)("core.Session",()=>p().createActions({login:{asyncResult:!0},logout:{asyncResult:!0},validate:{asyncResult:!0}})),I=(0,m.dS)("core.Session",()=>p().createStore({listenables:[A],sourceUrl:"/system/sessions",username:void 0,validatingSession:!1,init(){this.validate()},getInitialState(){return this.getSessionInfo()},login(x,N,L){const D=new a.Ib("POST",(0,u.DC)(this.sourceUrl)).json({username:x,password:N,host:L}).build().then($=>({username:$==null?void 0:$.username}));A.login.promise(D)},logout(){const x=new a.Ib("DELETE",(0,u.DC)(`${this.sourceUrl}/`)).build().then(N=>{(N.ok||N.status===401)&&this._removeSession()},this._removeSession);A.logout.promise(x)},validate(){const x=c.get("username");this.validatingSession=!0,this._propagateState();const N=this._validateSession().then(L=>{var F;return L.is_valid?A.login.completed({username:(F=L.username)!=null?F:x}):(x&&this._removeSession(),L)}).finally(()=>{this.validatingSession=!1,this._propagateState()});A.validate.promise(N)},_validateSession(){return new a.Ib("GET",(0,u.DC)(b.Z.SessionsApiController.validate().url)).json().build()},_removeSession(){c.delete("username"),this.username=void 0,this._propagateState()},_propagateState(){this.trigger(this.getSessionInfo())},loginCompleted(x){const{username:N}=x;c.set("username",N),this.username=N,this._propagateState()},isLoggedIn(){return!!this.username},getSessionInfo(){return{username:this.username,validatingSession:this.validatingSession}}}))},pS0GGJuX:(S,w,i)=>{"use strict";i.d(w,{L$:()=>m,Un:()=>c,dr:()=>t,rf:()=>u});const E=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,p="themeMode",t=16,c="teint",u="noir",b=null,a=[c,u],m=0,A="50px"},"6B2vepvr":(S,w,i)=>{"use strict";i.d(w,{rG:()=>kt});var E=i("KfF0gQb+"),p=i.n(E);const c=Object.entries({xs:480,sm:768,md:992,lg:1200}).reduce((ee,[j,ue])=>{const Oe=ue,we=ue-1;return{min:{...ee.min,[j]:`${Oe}px`},max:{...ee.max,[j]:`${we}px`},px:{min:{...ee.px.min,[j]:Oe},max:{...ee.px.max,[j]:we}}}},{min:{},max:{},px:{min:{},max:{}}}),u=p().shape({xs:p().string,sm:p().string,md:p().string,lg:p().string}),b=p().shape({xs:p().number,sm:p().number,md:p().number,lg:p().number}),a=p().shape({min:u,max:u,px:p().shape({min:b,max:b})}),m=null;var A=i("ww+BtWnX"),I=i.n(A),x=i("pS0GGJuX");const N=["0.22","0.55","0.88"],L=["0.15","0.55","0.95"];function F(ee,j){return I().mix(ee,"#fff",j).hex()}function D(ee,j){return I().mix(ee,"#000",j).hex()}const $=(ee,j)=>{const ue={10:"",20:"",30:"",40:"",50:"",60:"",70:"",80:"",90:"",100:""};return I().scale([ee,j]).colors(10).forEach((we,Qe)=>{const Ge=(Qe+1)*10;ue[Ge]=we}),ue},W=(ee,j)=>{if(![x.rf,x.Un].includes(ee))throw new Error(`Requires "${x.rf}" or "${x.Un}" mode option.`);const ue=ee===x.rf?D:F;return{background:ue(j.default,.95),backgroundAlt:ue(j.default,.85),backgroundHover:ue(j.default,.9),variant:{danger:ue(j.danger,.75),active:ue(j.default,.75),info:ue(j.info,.75),primary:ue(j.primary,.75),success:ue(j.success,.75),warning:ue(j.warning,.75)},variantHover:{danger:j.lighter.danger,active:j.lighter.default,info:j.lighter.info,primary:j.lighter.primary,success:j.lighter.success,warning:j.lighter.warning}}},K=(ee,j)=>{if(![x.rf,x.Un].includes(ee))throw new Error(`Requires "${x.rf}" or "${x.Un}" mode option.`);const ue=ee===x.rf?D:F,Oe=ee===x.rf?F:D,we=ee===x.rf?L:N,Qe={lightest:{danger:"",default:"",info:"",primary:"",success:"",warning:""},lighter:{danger:"",default:"",info:"",primary:"",success:"",warning:""},light:{danger:"",default:"",info:"",primary:"",success:"",warning:""},dark:{danger:"",default:"",info:"",primary:"",success:"",warning:""},darker:{danger:"",default:"",info:"",primary:"",success:"",warning:""},darkest:{danger:"",default:"",info:"",primary:"",success:"",warning:""}};return Object.keys(j).forEach(Ge=>{typeof j[Ge]=="string"&&(Qe.light[Ge]=ue(j[Ge],we[0]),Qe.lighter[Ge]=ue(j[Ge],we[1]),Qe.lightest[Ge]=ue(j[Ge],we[2]),Qe.dark[Ge]=Oe(j[Ge],we[0]),Qe.darker[Ge]=Oe(j[Ge],we[1]),Qe.darkest[Ge]=Oe(j[Ge],we[2]))}),Qe},k=(ee,j,ue,Oe)=>({background:j.contentBackground,backgroundDisabled:D(j.contentBackground,.25),border:Oe.light.default,borderFocus:Oe.light.info,boxShadow:`inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px ${I()(Oe.light.info).alpha(.4).css()}`,color:j.textDefault,colorDisabled:ue[60],placeholder:ue[60]}),H=(ee,j,ue,Oe)=>({linkHover:I()(ue.link)[ee===x.rf?"brighten":"darken"](1).hex(),navigationBackground:ue.contentBackground,navigationBoxShadow:I()(Oe.lightest.default).alpha(.5).css(),textAlt:j.secondary,textDefault:j.tertiary}),V={primary:"#ff3633",secondary:"#fff",tertiary:"#3e434c",logo:"#6C7585"},Ee={background:"#eeeff2",contentBackground:"#fff",link:"#578dcc",textAlt:"",textDefault:"",linkHover:"",navigationBackground:"",navigationBoxShadow:""},Re={danger:"#eb5454",default:"#9aa8bd",info:"#578dcc",primary:"#697586",success:"#7eb356",warning:"#eedf64"},Ie={...Re,...K(x.Un,Re)},xe={...Ee,...H(x.Un,V,Ee,Ie)},Le=$(V.tertiary,V.secondary),ke=W(x.Un,Ie),Ne=k(x.Un,xe,Le,Ie),ht={brand:V,global:xe,gray:Le,input:Ne,table:ke,variant:Ie},De={primary:"#ff3633",secondary:"#888",tertiary:"#fff",logo:"#fff"},ft={background:"#222",contentBackground:"#303030",link:"#629de2",textAlt:"",textDefault:"",linkHover:"",navigationBackground:"",navigationBoxShadow:""},Ct={danger:"#e74c3c",default:"#595959",info:"#578dcc",primary:"#697586",success:"#709e4c",warning:"#E3D45F"},He={...Ct,...K(x.rf,Ct)},ct={...ft,...H(x.rf,De,ft,He)},vt=$(De.tertiary,De.secondary),Bt=W(x.rf,He),St=k(x.rf,ct,vt,He),sr={brand:De,global:ct,gray:vt,input:St,table:Bt,variant:He},B=null,ne=p().shape({brand:p().shape({primary:p().string,secondary:p().string,tertiary:p().string,logo:p().string}),global:p().shape({background:p().string,contentBackground:p().string,inputBackground:p().string,link:p().string,linkHover:p().string,navigationBackground:p().string,navigationBoxShadow:p().string,textAlt:p().string,textDefault:p().string}),gray:p().shape({10:p().string,20:p().string,30:p().string,40:p().string,50:p().string,60:p().string,70:p().string,80:p().string,90:p().string,100:p().string}),input:p().shape({background:p().string,backgroundDisabled:p().string,border:p().string,borderFocus:p().string,boxShadow:p().string,color:p().string,colorDisabled:p().string}),table:p().shape({background:p().string,backgroundAlt:p().string,backgroundHover:p().string,variant:p().shape({active:p().string,danger:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),variantHover:p().shape({active:p().string,danger:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string})}),variant:p().shape({danger:p().string,dark:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),darker:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),darkest:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),default:p().string,info:p().string,light:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),lighter:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),lightest:p().shape({danger:p().string,default:p().string,info:p().string,primary:p().string,success:p().string,warning:p().string}),primary:p().string,success:p().string,warning:p().string})}),me={teint:ht,noir:sr},he=null;var rt=i("PWzyEpRt"),Et=i("KmE708VB"),yt=i("BWBZkIIZ");const qt=p().shape({family:p().shape({body:p().string,monospace:p().string}),size:p().shape({root:p().string,body:p().string,huge:p().string,extraLarge:p().string,large:p().string,small:p().string,tiny:p().string,h1:p().string,h2:p().string,h3:p().string,h4:p().string,h5:p().string,h6:p().string}),lineHeight:p().shape({body:p().number})}),Tt={body:'"Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif',monospace:'"Ubuntu Mono", Menlo, Monaco, Consolas, "Courier New", monospace',navigation:'"DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'},wt={root:`${x.dr}px`,body:"1rem",huge:"2.479rem",extraLarge:"1.383rem",large:"1.067rem",small:"0.878rem",tiny:"0.823rem",navigation:"0.937rem",h1:"1.575rem",h2:"1.296rem",h3:"1.215rem",h4:"1.138rem",h5:"1.067rem",h6:"1rem"},Zt={family:Tt,size:wt,lineHeight:{body:1.24}},Yt=null,G=ee=>(j,ue=0)=>{const Oe=ue>0?ee.global.textDefault:ee.global.textAlt,we=Math.abs(ue)*.08,Qe=we>1?1:we,Ge=we<0?0:Qe;return I().mix(Oe,j,Ge).css()},Z={AA:4.5,AALarge:3,AAA:7,AAALarge:4.5},$e=(ee,j="AAA")=>{const Oe=I()(ee).luminance()<.5?"#fff":"#000";let we=0,Qe=I().mix(ee,Oe,we).css();for(;we<=1&&(Qe=I().mix(ee,Oe,we).css(),!(I().contrast(ee,Qe)>=Z[j]));)we+=.05;return Qe},ze=(ee,j)=>{if(ee==="transparent")return ee;const Oe=(I()(ee).alpha()*100-j*100)/100;return I()(ee).alpha(Oe).css()},ye=ee=>(j,ue=ee.global.textDefault,Oe=ee.global.textAlt)=>I()(j).luminance()<.179?Oe:ue,fe=p().shape({colorLevel:p().func,contrastingColor:p().func,opacify:p().func,readableColor:p().func}),qe={colorLevel:G,contrastingColor:$e,opacify:ze,readableColor:ye},Ye=null,Ue=.08,at=["0","1","xxs","xs","sm","md","lg","xl","xxl"],dt=[0,1,3,5,8,13,21,34,55,89,144],ve=at.reduce((ee,j)=>({...ee,[j]:p().string}),{px:p().shape(at.reduce((ee,j)=>({...ee,[j]:p().number}),{}))}),bt=p().shape(ve),lt={px:{}};at.forEach((ee,j)=>{if(ee==="0")lt[ee]="0px",lt.px[ee]=0;else if(ee==="1")lt[ee]="1px",lt.px[ee]=1;else{const ue=Ue*dt[j];lt[ee]=`${ue.toFixed(2)}rem`,lt.px[ee]=Math.round(ue*x.dr)}});const Er=null,kt=p().shape({breakpoints:a,colors:ne,fonts:qt,utils:fe,spacings:bt})},DBsovJTc:(S,w,i)=>{"use strict";i.d(w,{Z:()=>b});var E=i("H/eHg5XM"),p=i.n(E);const t=()=>window.appConfig||{},b={features:(()=>E.Map(t().featureFlags).filter(a=>a.trim().toLowerCase()==="on").keySeq().toList().filter(a=>typeof a=="string"))(),gl2ServerUrl(){return t().gl2ServerUrl},gl2AppPathPrefix(){return t().gl2AppPathPrefix},gl2DevMode(){return typeof DEVELOPMENT<"u"&&DEVELOPMENT},isFeatureEnabled(a){return this.features&&this.features.map(m=>m.trim().toLowerCase()).includes(a.toLowerCase())},rootTimeZone(){return t().rootTimeZone},isCloud(){return typeof IS_CLOUD<"u"?IS_CLOUD:t().isCloud},customThemeColors(){var a,m,A;return(A=(m=(a=t())==null?void 0:a.pluginUISettings)==null?void 0:m["org.graylog.plugins.customization.theme"])!=null?A:{}},telemetry(){var a;return(a=t())==null?void 0:a.telemetry},publicNotifications(){var a,m,A;return(A=(m=(a=t())==null?void 0:a.pluginUISettings)==null?void 0:m["org.graylog.plugins.customization.notifications"])!=null?A:{}}}},MjKCmu4z:(S,w,i)=>{"use strict";i.d(w,{Z:()=>p});const E={tempDocument:document.createElement("textarea"),capitalizeFirstLetter(t){return t.charAt(0).toUpperCase()+t.slice(1)},escapeHTML(t){return this.tempDocument.textContent=t,this.tempDocument.innerHTML},unescapeHTML(t){return this.tempDocument.innerHTML=t,this.tempDocument.textContent},pluralize(t,c,u){return t===1||t==="1"?c:u},stringify(t){return(typeof t=="object"?JSON.stringify(t):String(t))||""},replaceSpaces(t,c="-"){return t.replace(/\s/g,c)},toTitleCase(t,c=" "){return t.toLowerCase().split(c).map(u=>`${u.charAt(0).toUpperCase()}${u.slice(1)}`).join(" ")},truncateWithEllipses(t="",c=10,u="..."){return t.length>c?`${t.substring(0,c)}${u}`:t},getRecursiveChildText(t){if(typeof t=="string")return t;const{children:c}=(t==null?void 0:t.props)||{};if(Array.isArray(t)){const u=[];return t.forEach(b=>{typeof b=="object"?u.push(E.getRecursiveChildText(b)):typeof b=="string"&&u.push(b)}),u.join(" ")}return typeof c=="object"?E.getRecursiveChildText(c):typeof c=="string"?c:""}},p=E},ekPuBHq5:(S,w,i)=>{"use strict";i.d(w,{DC:()=>F,K2:()=>W,ZP:()=>A});var E=i("bcEkMz+H"),p=i.n(E),t=i("HM+Bgqj5"),c=i.n(t),u=i("DBsovJTc");const b=["http:","https:"],a=k=>{const H=new(c())(k);if(!H.hostname()||!H.scheme()){const V=new(c())(window.location);return H.absoluteTo(V).toString()}return k},m={qualifyUrl(k){var H;if(new(c())(k).is("absolute"))return k;const Ee=a((H=u.Z.gl2ServerUrl())!=null?H:"");return new(c())(Ee+k).normalizePathname().toString()},appPrefixed(k){return m.concatURLPath(u.Z.gl2AppPathPrefix(),k)},getParsedSearch(k){let H={},V=k.search;return V&&V.indexOf("?")===0&&V.length>1&&(V=V.substr(1,V.length-1),H=p().parse(V)),H},getParsedHash(k){let H={},{hash:V}=k;return V&&V.indexOf("#")===0&&V.length>1&&(V=V.substr(1,V.length-1),H=p().parse(V)),H},replaceHashParam(k,H){const V=this.getParsedHash(window.location);V[k]=H,window.location.replace(`#${p().stringify(V)}`)},concatURLPath(...k){const H=Array(k.length);for(let Ee=0;Ee{"use strict";i.d(w,{Z:()=>c});var E=i("DBsovJTc");const p="Graylog Deprecation Notice:",c=u=>E.Z.gl2DevMode()&&console.warn(p,u)},"G/c9Iv8A":(S,w,i)=>{"use strict";const E=JSON.parse('{"name":"AlertWizard","version":"5.2.1","description":"Graylog plugin AlertWizard Web Interface","repository":{"type":"git","url":"https://github.com/airbus-cyber/graylog-plugin-alert-wizard"},"scripts":{"build":"webpack --bail","test":"jest"},"keywords":["graylog"],"author":"Airbus CyberSecurity","license":"SSPL-1.0","dependencies":{},"devDependencies":{"graylog-web-plugin":"file:../graylog2-server/graylog2-web-interface/packages/graylog-web-plugin","react-intl":"^6.4.2","typeahead.js":"^0.11.1"},"private":true}');var p=i("2HTbuIYx"),t=i("Z7aTuO5B"),c=i("3DPl/h85"),u=i("4nztvAe1"),b=i("KfF0gQb+"),a=i.n(b),m=i("J6y4/h8P"),A=i("dfd/aQyz");const I=(0,m.default)(A.eh)`
margin-bottom: 0;
`,x=({activeKey:e,children:r,id:s,onSelect:n,...o})=>{const l=e==null?void 0:e.replace(/[^0-9a-zA-Z-]/g,"-").toLowerCase();return t.createElement(I,{...o,activeKey:l,id:s,onSelect:n,accordion:!0},r)};x.propTypes={activeKey:a().string,children:a().node.isRequired,id:a().string.isRequired,onSelect:a().func},x.defaultProps={activeKey:void 0,defaultActiveKey:void 0,onSelect:()=>{}};const N=null;var L=i("oNT5KYa6");const F=(0,m.default)(L.Z)`
border: 0;
border-radius: 0;
box-shadow: none;
`,D=(0,m.default)(L.Z.Heading)(({theme:e})=>m.css`
&& {
padding: 0;
border-radius: 0;
background-color: ${e.colors.variant.lightest.default};
}
`),$=(0,m.default)(L.Z.Title)(({theme:e})=>m.css`
font-size: ${e.fonts.size.small};
color: ${e.colors.global.link};
> a {
padding: 3px 9px;
display: block;
}
`),W=(0,m.default)(L.Z.Body)(({theme:e})=>m.css`
${F} > ${D} + .panel-collapse > & {
background-color: ${e.colors.global.contentBackground};
border-top-color: ${e.colors.variant.lighter.default};
border-bottom-width: 0;
color: ${e.colors.variant.darkest.default};
}
`),K=({children:e,name:r,id:s,...n})=>{const o=s!=null?s:r.replace(/[^0-9a-zA-Z]/g,"-").toLowerCase();return t.createElement(F,{...n,id:s,eventKey:o},t.createElement(D,null,t.createElement($,{toggle:!0},r)),t.createElement(L.Z.Collapse,null,t.createElement(W,null,e)))};K.propTypes={name:a().node.isRequired,id:a().string,children:a().node.isRequired},K.defaultProps={id:void 0};const k=null;var H=i("UiXZqrDE");const V=m.default.label`
font-weight: bold;
margin-bottom: 5px;
display: inline-block;
font-size: 14px;
background: none;
`,Ee=m.default.span`
color: ${e=>e.theme.colors.gray[50]};
`,Re=({fieldName:e,label:r,clearable:s,required:n,helpText:o,options:l})=>t.createElement(H.Field,{name:e,help:o},({field:{name:d,value:g,onChange:h}})=>t.createElement(t.Fragment,null,t.createElement(V,null,r),t.createElement(We.Z,{id:e,name:d,clearable:s,required:n,allowCreate:!0,onChange:v=>h({target:{value:v,name:d}}),options:l,value:g}),o&&t.createElement("span",{className:"help-block"},t.createElement(Ee,null,o))));Re.defaultProps={clearable:!1,required:!1,helpText:"",options:[]};const Ie=null;var xe=i("ASBo/Til"),Le=i.n(xe);const ke={default:"YYYY-MM-DD HH:mm:ss",complete:"YYYY-MM-DD HH:mm:ss.SSS",withTz:"YYYY-MM-DD HH:mm:ss Z",readable:"dddd D MMMM YYYY, HH:mm ZZ",internal:"YYYY-MM-DDTHH:mm:ss.SSSZ",internalIndexer:"YYYY-MM-DDTHH:mm:ss.SSS[Z]",date:"YYYY-MM-DD",hourAndMinute:"HH:mm"},Ne="UTC",Ke=(e,r,s)=>{if(!e.isValid()){let n=`Date time ${r} is not valid.`;s&&(n=`${n} ${s}`),console.error(n)}return e},ht=e=>e==null?void 0:e.map(r=>{const s=ke[r];if(!s)throw new Error(`Provided date time format "${r}" is not supported.`);return s}),De=(e,r,s=Ne)=>{const n=ht(r),o=Le().utc(e,n,!0).tz(s),l=r!=null&&r.length?`Expected formats: ${n.join(", ")}.`:void 0;return Ke(o,e,l)},ft=(e,r=Ne)=>De(e,["internal"],r),Ct=()=>Le().tz.guess(),He=(e,r="default",s=Ne)=>De(e,void 0,s).format(ke[r]),ct=(e,r="default")=>He(e,r,Ct()),vt=e=>{const r=De(e);return Ke(r,e).fromNow()},Bt=e=>Le()(e,Object.values(ke),!0).isValid(),St=(e,r)=>{if(!r)throw new Error("It is required to define the time zone of the date time provided for internalUTCTime.");return Le().tz(e,r)},Ft=({dateTime:e,format:r})=>{const s=e!=null?e:new Date,n=He(s,"internal"),o=ct(s,r);return t.createElement("time",{dateTime:n,title:n},o)};Ft.propTypes={dateTime:a().oneOfType([a().string,a().object,a().number]),format:a().string},Ft.defaultProps={format:"default",dateTime:void 0};const sr=null,B=m.default.div(({$fullHeight:e})=>`
display: flex;
height: ${e?"100%":"auto"};
justify-content: center;
align-items: center;
`),ne=({children:e,fullHeight:r})=>t.createElement(B,{$fullHeight:r},e);ne.defaultProps={fullHeight:!0};const me=null;var he=i("twqACzrV"),rt=i("ybot7P0S");const Et=({onChange:e,...r})=>{const s=(0,t.useCallback)((n,o)=>{e(n.hex,o)},[e]);return t.createElement(rt.FJ,{...r,onChange:s})};Et.propTypes={color:a().string,colors:a().array,height:a().number,width:a().number,onChange:a().func.isRequired},Et.defaultProps={color:void 0,colors:void 0,height:310,width:250};const yt=Et;var qt=i("8mAVzjyp");const Tt=(0,m.default)(c.Popover)`
.popover-content {
padding: 0;
}
`,wt=({id:e,placement:r,title:s,triggerNode:n,onChange:o,...l})=>{const[d,g]=(0,t.useState)(!1),h=(0,t.useRef)(),v=()=>{g(!d)},y=(C,R)=>{o(C,R,v)};return t.createElement(t.Fragment,null,(0,t.cloneElement)(n,{onClick:v,ref:h}),d&&t.createElement(qt.aV,{show:d,containerPadding:10,placement:r,shouldUpdatePosition:!0,target:h.current,rootClose:!0,onHide:v},t.createElement(Tt,{id:e,title:s},t.createElement(yt,{onChange:y,...l}))))};wt.propTypes={id:a().string.isRequired,placement:a().oneOf(["top","right","bottom","left"]),title:a().string,triggerNode:a().node.isRequired,onChange:a().func.isRequired},wt.defaultProps={placement:"bottom",title:"Pick a color",colors:void 0};const nr=null;var Zt=i("o8xG4j5J"),Yt=i("MjKCmu4z");const vr=({show:e,title:r,children:s,onCancel:n,onConfirm:o,btnConfirmDisabled:l,btnConfirmText:d,hideCancelButton:g,...h})=>{const v=g?o:n;return t.createElement(c.Modal,{show:e,onHide:v,"data-event-element":h["data-telemetry-title"]||Yt.Z.getRecursiveChildText(r)},t.createElement(c.Modal.Header,{closeButton:!0},t.createElement(c.Modal.Title,null,r)),t.createElement(c.Modal.Body,null,s),t.createElement(c.Modal.Footer,null,t.createElement(Zt.Z,{onCancel:n,onSubmit:o,submitButtonType:"button",disabledSubmit:l,submitButtonText:d,displayCancel:g})))};vr.propTypes={show:a().bool,hideCancelButton:a().bool,title:a().oneOfType([a().string,a().element]).isRequired,btnConfirmText:a().oneOfType([a().string,a().element]),btnConfirmDisabled:a().bool,onCancel:a().func,onConfirm:a().func.isRequired,children:a().oneOfType([a().string,a().element]).isRequired},vr.defaultProps={btnConfirmText:"Confirm",btnConfirmDisabled:!1,show:!1,hideCancelButton:!1,onCancel:()=>{}};const G=null;var Z=i("yAXMqwrl"),le=i("DBsovJTc");const $e=(e,r,s)=>r.pathname!==e.pathname?!window.confirm(s):!1,Pe=({question:e})=>{const r=(0,t.useCallback)(s=>le.Z.gl2DevMode()?null:(s.returnValue=e,e),[e]);return(0,t.useEffect)(()=>(window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r)}),[r]),(0,Z.unstable_useBlocker)(s=>!le.Z.gl2DevMode()&&$e(s.currentLocation,s.nextLocation,e)),null};Pe.propTypes={question:a().string},Pe.defaultProps={question:"Are you sure?"};const ze=null;var pt=i("C19pcrjQ"),ye=i.n(pt);const fe=e=>e.indexOf("*")>-1,qe=(e,r)=>{if(e.indexOf(r)>-1||e.indexOf("*")>-1)return!0;const s=r.split(":");if(s.length>=2){const n=s[0],o=`${s[0]}:${s[1]}`;return e.indexOf(n)>-1||e.indexOf(`${n}:*`)>-1||e.indexOf(o)>-1||e.indexOf(`${o}:*`)>-1}return e.indexOf(`${r}:*`)>-1},Ye=(e,r)=>!r||r.length===0?!0:e?fe(e)?!0:r.every?r.every(s=>qe(e,s)):qe(e,r):!1,Ue=(e,r)=>!r||r.length===0?!0:e?fe(e)?!0:r.some(s=>qe(e,s)):!1,dt={isPermitted:Ye,isAnyPermitted:Ue};var ve=i("oNXBLaYg");const bt=t.createContext(void 0),lt=(0,ve.ri)("contexts.CurrentUserContext",()=>bt),kt=()=>{const e=(0,t.useContext)(lt);if(!e)throw new Error("useCurrentUser hook needs to be used inside CurrentUserContext.Provider");return e},ee=m.default.div`
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`,j=({children:e,titleOverride:r,className:s})=>t.createElement(ee,{title:r||e,className:s},e);j.defaultProps={className:void 0,titleOverride:void 0};const ue=j,we=((e={})=>new Intl.Collator(void 0,e).compare)();var Qe=i("MTL7eqpZ");const Ge=(0,m.default)(c.DropdownButton)`
~ .dropdown-menu {
min-width: auto;
max-width: 180px;
}
`,Ur=(0,m.default)(c.Checkbox)`
&.checkbox {
margin: 0 5px 0 0;
label {
display: flex;
align-items: center;
padding: 0;
input {
margin: 0;
position: relative;
}
}
}
`,yr=(0,m.default)(Qe.Z)`
padding: 3px 0;
cursor: pointer;
display: flex;
`,At=(0,m.default)(ue)`
display: inline;
`,Ws=({allColumns:e,column:r,onClick:s,selectedColumns:n})=>{const o=n.includes(r.id),l=()=>{const d=e.reduce((g,h)=>{const v=r.id===h.id;return v&&!o||!v&&n.includes(h.id)?[...g,h.id]:g},[]);s(d)};return t.createElement(yr,{onSelect:l,title:`${o?"Hide":"Show"} ${r.title}`},t.createElement(Ur,{checked:o,onChange:l}),t.createElement(At,null,r.title))},Ks=({onChange:e,selectedColumns:r,allColumns:s})=>{const n=(0,t.useMemo)(()=>s.sort((o,l)=>we(o.title,l.title)),[s]);return t.createElement(Ge,{title:"Columns",bsSize:"small",pullRight:!0,"aria-label":"Configure visible columns",id:"columns-visibility-select",bsStyle:"default"},n.map(o=>t.createElement(Ws,{column:o,onClick:e,key:o.id,allColumns:s,selectedColumns:r})))},Hs={types:{DATE:{renderCell:e=>t.createElement(Ir,{dateTime:e}),staticWidth:160},STRING:{renderCell:e=>t.createElement(ue,null,e)}},attributes:{description:{width:2},summary:{width:1.5},owner:{staticWidth:120},favorite:{renderHeader:()=>"",staticWidth:30}}},Gs=5,ps=20,ar=150,_=1,te=({tableWidth:e,actionsColWidth:r,bulkSelectColWidth:s,columnsIds:n,columnRenderersByAttribute:o})=>{const l=n.reduce((d,g)=>{var h,v;return d+((v=(h=o[g])==null?void 0:h.staticWidth)!=null?v:0)},0);return e-s-r-l},Ae=({assignableWidth:e,columnsIds:r,columnRenderersByAttribute:s})=>{const n=r.reduce((l,d)=>{var g;const{staticWidth:h,width:v=_}=(g=s[d])!=null?g:{};return h?l:l+v},0),o=e/n;return Object.fromEntries(r.map(l=>{var d;const{staticWidth:g,width:h=_,minWidth:v=ar}=(d=s[l])!=null?d:{},y=g!=null?g:o*h;return[l,!g&&y{const[l,d]=(0,t.useState)({});return(0,t.useLayoutEffect)(()=>{if(!o)return;const g=te({actionsColWidth:e,columnRenderersByAttribute:s,columnsIds:n,bulkSelectColWidth:r,tableWidth:o});d(Ae({assignableWidth:g,columnsIds:n,columnRenderersByAttribute:s}))},[e,r,s,n,o]),l};var xt=i("J35SmSEq"),pe=i("6DSbqO9E");const Br=m.default.button(({theme:e,disabled:r})=>m.css`
display: inline-flex;
justify-content: center;
align-items: center;
height: 25px;
width: 25px;
border: 0;
background-color: transparent;
cursor: pointer;
color: ${r?e.colors.gray[90]:e.colors.gray[60]};
font-size: ${e.fonts.size.large};
:hover {
background-color: ${e.colors.gray[80]};
}
:active {
background-color: ${e.colors.gray[70]};
}
`),br=e=>{typeof e=="function"&&e()},Vs=({title:e,onClick:r,focusable:s,className:n,disabled:o,...l})=>t.createElement(Br,{tabIndex:s?0:-1,title:e,onClick:()=>br(r),className:n,type:"button",disabled:o},t.createElement(pe.Z,{...l}));Vs.propTypes={className:a().string,title:a().string,onClick:a().func,name:a().string},Vs.defaultProps={className:void 0,focusable:!0,onClick:void 0,title:void 0,name:void 0,disabled:!1};const js=Vs,Ti=t.createContext(void 0),La=(0,ve.ri)("contexts.ExpandedSectionsContext",()=>Ti),wi=m.default.tr(({theme:e})=>m.css`
&&&& {
background-color: ${e.colors.global.contentBackground};
}
`),Ai=m.default.div`
display: flex;
justify-content: space-between;
margin-bottom: 5px;
`,Ri=(0,m.default)(c.ButtonToolbar)`
display: flex;
align-items: center;
`,xi=(0,m.default)(js)`
margin-left: 5px;
`,Pi=({expandedSectionsRenderer:e,entity:r})=>{const{expandedSections:s,toggleSection:n}=(0,t.useContext)(La),o=s==null?void 0:s[r.id];return o!=null&&o.length?t.createElement(wi,null,t.createElement("td",{colSpan:1e3},Object.entries(e!=null?e:{}).map(([l,d])=>{var g;if(!o.includes(l))return null;const h=()=>n(r.id,l),v=(g=d.actions)==null?void 0:g.call(d,r);return t.createElement("div",{key:`${l}-${r.id}`},t.createElement(Ai,null,t.createElement("h3",null,d.title),t.createElement(Ri,null,v,t.createElement(xi,{name:"times",onClick:h,title:"Hide section"}))),d.content(r))}))):null},Ii=m.default.div`
display: flex;
align-items: center;
`,Di=m.default.div`
margin-left: 5px;
`,Mi=({selectedEntities:e,setSelectedEntities:r,bulkActions:s})=>t.createElement(Ii,null,s(e,r),!!e.length&&t.createElement(Di,null,e.length," ",Yt.Z.pluralize(e.length,"item","items")," selected")),Li=m.default.button(({theme:e})=>m.css`
border: 0;
background: transparent;
padding: 5px;
cursor: pointer;
position: relative;
color: ${e.colors.gray[70]};
&.active {
color: ${e.colors.gray[20]};
}
`),Oi=m.default.span(({theme:e})=>m.css`
position: absolute;
top: 0;
right: 0;
font-size: ${e.fonts.size.small};
font-weight: 600;
`),Oa=({activeDirection:e,onChange:r,title:s,order:n,ascId:o,descId:l,className:d})=>{const g=(0,t.useCallback)(()=>r(e),[e,r]),h=e===o&&e!==l?"arrow-up-short-wide":"arrow-down-wide-short",v=!!e;return t.createElement(Li,{className:`${d} ${v?"active":""}`,title:s,type:"button","aria-label":s,onClick:g},t.createElement(pe.Z,{name:h,"data-testid":"sort-icon-svg"}),n&&t.createElement(Oi,null,n))};Oa.defaultProps={title:"Sort",order:void 0,ascId:"Ascending",descId:"Descending",className:""};const Ni=Oa,$i=(0,m.default)(Ni)`
display: inline-block;
margin-left: 6px;
padding: 0;
cursor: pointer;
`,Fr={ASC:"asc",DESC:"desc"},zi={asc:"ascending",desc:"descending"},Ui=({onChange:e,activeSort:r,column:s})=>{const n=(r==null?void 0:r.attributeId)===s.id,o=!n||r.direction===Fr.DESC?Fr.ASC:Fr.DESC,l=`Sort ${s.title.toLowerCase()} ${zi[o]}`,d=()=>{e({attributeId:s.id,direction:o})};return t.createElement($i,{activeDirection:n?r.direction:void 0,onChange:d,title:l,ascId:Fr.ASC,descId:Fr.DESC})};var Bi=i("KhtSIDKH"),Na=i.n(Bi);const $a=(0,m.default)(c.Checkbox)`
&.checkbox {
margin: 0;
label {
display: flex;
align-items: center;
padding: 0;
input {
width: 14px;
height: 14px;
cursor: pointer;
margin: 0;
position: relative;
}
}
}
`,Fi=(e,r)=>{const s=(0,t.useRef)(),n=(0,t.useMemo)(()=>{const o=e.filter(({id:l})=>r.includes(l));return o.length===0?"UNCHECKED":o.length===e.length?"CHECKED":"PARTIAL"},[e,r]);return(0,t.useEffect)(()=>{if(s.current){if(n==="PARTIAL"){s.current.indeterminate=!0;return}s.current.indeterminate=!1}},[n]),{checkboxRef:s,checkboxStatus:n}},Zi=({data:e,setSelectedEntities:r,selectedEntities:s})=>{const{checkboxRef:n,checkboxStatus:o}=Fi(e,s),l=`${o==="CHECKED"?"Deselect":"Select"} all visible entities`,d=()=>{r(g=>{const h=e.map(({id:v})=>v);return o==="CHECKED"?g.filter(v=>!h.includes(v)):Na()([...g,...h])})};return t.createElement("td",{style:{width:`${ps}px`}},t.createElement($a,{inputRef:g=>{n.current=g},onChange:d,checked:o==="CHECKED",title:l,disabled:!(e!=null&&e.length)}))},ki=m.default.th(({$width:e})=>m.css`
width: ${e?`${e}px`:"auto"};
`),Wi=({activeSort:e,column:r,columnRenderer:s,onSortChange:n,colWidth:o})=>{const l=(0,t.useMemo)(()=>typeof(s==null?void 0:s.renderHeader)=="function"?s.renderHeader(r):r.title,[r,s]);return t.createElement(ki,{$width:o},l,r.sortable&&t.createElement(Ui,{onChange:n,column:r,activeSort:e}))},Ki=m.default.th(({$width:e})=>m.css`
text-align: right;
width: ${e?`${e}px`:"auto"};
`),Hi=({actionsColWidth:e,activeSort:r,columns:s,columnsOrder:n,columnRenderersByAttribute:o,columnsWidths:l,data:d,displayActionsCol:g,displayBulkSelectCol:h,onSortChange:v,selectedEntities:y,setSelectedEntities:C})=>{const R=(0,t.useMemo)(()=>s.sort((T,P)=>n.indexOf(T.id)-n.indexOf(P.id)),[s,n]);return t.createElement("thead",null,t.createElement("tr",null,h&&t.createElement(Zi,{data:d,selectedEntities:y,setSelectedEntities:C}),R.map(T=>{const P=o[T.id];return t.createElement(Wi,{columnRenderer:P,column:T,colWidth:l[T.id],onSortChange:v,activeSort:r,key:T.title})}),g?t.createElement(Ki,{$width:e},"Actions"):null))};var za=i("qKIMiD1A"),Gi=i("OZcvNQmv"),Vi=i.n(Gi);const ji=m.default.td`
word-break: break-word;
`,qi=({column:e,columnRenderer:r,entity:s,entityAttributesAreCamelCase:n})=>{const o=n?Vi()(e.id):e.id,l=s[o],d=typeof(r==null?void 0:r.renderCell)=="function"?r.renderCell(l,s,e):l;return t.createElement(ji,null,d)},Yi=m.default.th`
text-align: right;
.btn-toolbar {
display: inline-flex;
}
`,Ji=m.default.div`
display: inline-flex;
`,Ua=({columns:e,columnRenderersByAttribute:r,displaySelect:s,displayActions:n,entity:o,isSelected:l,onToggleEntitySelect:d,rowActions:g,index:h,actionsRef:v,entityAttributesAreCamelCase:y})=>{const C=(0,t.useCallback)(()=>d(o.id),[o.id,d]),R=n?t.createElement(za.Z,null,g(o)):null;return t.createElement("tr",null,s&&t.createElement("td",null,t.createElement($a,{onChange:C,title:`${l?"Deselect":"Select"} entity`,checked:l})),e.map(T=>{const P=r[T.id];return t.createElement(qi,{columnRenderer:P,entityAttributesAreCamelCase:y,entity:o,column:T,key:`${o.id}-${T.id}`})}),n?t.createElement(Yi,null,h===0?t.createElement(Ji,{ref:v},R):R):null)};Ua.defaultProps={rowActions:void 0};const Xi=t.memo(Ua),Ba=({children:e})=>{const[r,s]=(0,t.useState)(),n=(0,t.useCallback)((l,d)=>s(g=>{var h,v;const y={...g!=null?g:{}};if((h=y[l])!=null&&h.includes("rules")){const C=y[l].filter(R=>R!==d);return C.length===0?(delete y[l],y):{...y,[l]:C}}return{...y,[l]:[...(v=y[l])!=null?v:[],d]}}),[]),o=(0,t.useMemo)(()=>({expandedSections:r,toggleSection:n}),[r,n]);return t.createElement(La.Provider,{value:o},e)};Ba.propTypes={children:a().node.isRequired};const Qi=Ba,ec=m.default.div`
width: 100%;
overflow-x: auto;
`,tc=(0,m.default)(c.Table)(({theme:e})=>m.css`
table-layout: fixed;
thead > tr > th,
tbody > tr > td {
padding: ${Gs}px;
}
&& {
> tbody:nth-of-type(even) > tr {
background-color: ${e.colors.table.background};
}
> tbody:nth-of-type(odd) > tr {
background-color: ${e.colors.table.backgroundAlt};
}
}
`),rc=m.default.div`
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
min-height: 22px;
`,sc=m.default.div`
display: flex;
align-items: center;
gap: 5px;
`,nc=(e,r)=>e.filter(({permissions:s,anyPermissions:n,hidden:o})=>o?!1:s!=null&&s.length?n?Ue(r,s):Ye(r,s):!0),ac=(e,r)=>r.map(s=>e.find(({id:n})=>n===s)).filter(s=>!!s),oc=({columns:e,columnRenderersByAttribute:r,displayBulkSelectCol:s,fixedActionsCellWidth:n})=>{var o,l;const d=(0,t.useRef)(),g=(0,t.useRef)(),{width:h}=(0,xt.Z)(d),v=(0,t.useMemo)(()=>e.map(({id:T})=>T),[e]),y=n!=null?n:(l=(o=g.current)==null?void 0:o.offsetWidth)!=null?l:0,C=y?y+Gs*2:0,R=Rt({actionsColWidth:C,bulkSelectColWidth:s?ps:0,columnRenderersByAttribute:r,columnsIds:v,tableWidth:h});return{tableRef:d,actionsRef:g,columnsWidths:R,actionsColWidth:C}},lc=(e,r)=>{const s=ye()({},Hs,r);return Object.fromEntries(e.map(({id:o,type:l})=>{var d,g;const h=(d=s.types)==null?void 0:d[l],v=(g=s.attributes)==null?void 0:g[o],y=ye()({},h,v);return[o,y]}))},ic=({actionsCellWidth:e,activeSort:r,entityAttributesAreCamelCase:s,bulkActions:n,columnDefinitions:o,columnRenderers:l,columnsOrder:d,data:g,expandedSectionsRenderer:h,onColumnsChange:v,onPageSizeChange:y,onSortChange:C,pageSize:R,rowActions:T,visibleColumns:P})=>{const z=kt(),[X,se]=(0,t.useState)([]),oe=typeof T=="function",Y=typeof n=="function",ge=typeof y=="function",ae=(0,t.useMemo)(()=>nc(o,z.permissions),[o,z.permissions]),_e=(0,t.useMemo)(()=>ac(ae,P),[ae,P]),q=(0,t.useMemo)(()=>lc(_e,l),[_e,l]),{tableRef:J,actionsRef:Q,actionsColWidth:be,columnsWidths:re}=oc({columns:_e,columnRenderersByAttribute:q,displayBulkSelectCol:Y,fixedActionsCellWidth:e}),ce=(0,t.useCallback)(Te=>{se(nt=>nt.includes(Te)?nt.filter(Vt=>Vt!==Te):[...nt,Te])},[]);return t.createElement(Qi,null,t.createElement(rc,null,t.createElement("div",null,Y&&t.createElement(Mi,{bulkActions:n,selectedEntities:X,setSelectedEntities:se})),t.createElement(sc,null,"Show",t.createElement(c.ButtonGroup,null,ge&&t.createElement(jo,{pageSize:R,showLabel:!1,onChange:y}),t.createElement(Ks,{allColumns:ae,selectedColumns:P,onChange:v})))),t.createElement(ec,{id:"scroll-container",ref:J},t.createElement(tc,{striped:!0,condensed:!0,hover:!0},t.createElement(Hi,{columns:_e,columnsOrder:d,actionsColWidth:be,columnsWidths:re,selectedEntities:X,setSelectedEntities:se,data:g,columnRenderersByAttribute:q,onSortChange:C,displayBulkSelectCol:Y,activeSort:r,displayActionsCol:oe}),g.map((Te,nt)=>t.createElement("tbody",{key:`table-row-${Te.id}`,"data-testid":`table-row-${Te.id}`},t.createElement(Xi,{entity:Te,index:nt,entityAttributesAreCamelCase:s,actionsRef:Q,onToggleEntitySelect:ce,columnRenderersByAttribute:q,isSelected:!!(X!=null&&X.includes(Te.id)),rowActions:T,displaySelect:Y,displayActions:oe,columns:_e}),t.createElement(Pi,{key:`expanded-sections-${Te.id}`,expandedSectionsRenderer:h,entity:Te}))))))};ic.defaultProps={actionsCellWidth:void 0,activeSort:void 0,bulkActions:void 0,columnRenderers:void 0,columnsOrder:[],expandedSectionsRenderer:void 0,onPageSizeChange:void 0,pageSize:void 0,rowActions:void 0,entityAttributesAreCamelCase:!0};const nE=null,aE=null;var cc=i("2Mwm8zh5"),dc=i.n(cc);const uc=(0,m.default)(c.Row)(({theme:e})=>m.css`
padding-bottom: 0;
p {
margin-top: 15px;
}
.actions-lg {
float: right;
}
.actions-sm {
padding-bottom: 15px;
}
.btn-lg {
font-size: ${e.fonts.size.large};
}
`),qs=({children:e,className:r,...s})=>t.createElement(uc,{className:dc()("content-head",r),...s},e);qs.propTypes={children:a().node.isRequired,className:a().string},qs.defaultProps={className:void 0};const pc=qs,mc=(0,m.default)(c.ListGroupItem)(({theme:e})=>m.css`
background-color: ${e.colors.variant.lightest.default};
font-size: ${e.fonts.size.body};
color: ${e.utils.contrastingColor(e.colors.variant.lightest.default)};
padding: 0 15px;
.form-group {
margin: 0;
}
`),gc=m.default.div`
padding: 10px 0;
min-height: 40px;
`,Ys=({children:e})=>{const s=typeof e=="string"?(n=>t.createElement(gc,null,n))(e):e;return t.createElement(mc,null,s)};Ys.propTypes={children:a().node},Ys.defaultProps={children:""};const hc=Ys,Js=({className:e,children:r})=>t.createElement(c.ListGroupItem,{className:e},r);Js.propTypes={children:a().node.isRequired,className:a().string},Js.defaultProps={className:void 0};const Fa=Js,ms=({children:e})=>{let r;return e.length===0?r=t.createElement(Fa,null,"No items to display"):r=e,t.createElement("div",null,t.createElement(c.ListGroup,null,r))};ms.Header=hc,ms.Item=Fa,ms.propTypes={children:a().node.isRequired};const Xs=ms,fc=t.forwardRef(({formatSelection:e,children:r,className:s},n)=>{const o=l=>{const d=e(document.getSelection());l.clipboardData.setData("text/plain",d),l.preventDefault()};return t.createElement("div",{className:s,ref:n,onCopy:o},r)});fc.defaultProps={className:void 0};const oE=null,vc=m.default.span(({theme:e})=>`
background-color: ${e.colors.variant.light.info};
`),Ec=(0,t.forwardRef)(({children:e,onClick:r,className:s,title:n},o)=>t.createElement(vc,{className:`badge ${s}`,onClick:r,ref:o,title:n},e));Ec.defaultProps={onClick:void 0,className:"",title:void 0};const lE=null;var yc=i("FtmMm3gp"),_r=i.n(yc),bc=i("Tk+7c1Lc"),Wt=i("H/eHg5XM"),Jt=i.n(Wt),Cr=i("zKLlqmvB"),_c=i("zwqkL7eo"),Qs=i.n(_c),Cc=i("kqAR+wt5"),Je=i.n(Cc),iE=i("yjdIzlkZ");let Za=!1;const en={init(){Za||(Je()("#scroll-to-search-hint, #scroll-to-search-hint i").on("click",()=>{Je()("html, body").animate({scrollTop:0},"fast")}),Za=!0)},escape(e){return e.replace(/(&&|\|\||[:\\\/\+\-!\(\)\{\}\[\]\^"~*\?])/g,"\\$&")},_query(){return Je()("#universalsearch-query")},setQuery(e){const r=this._query();r.val(e),r.effect("bounce"),this.scrollToSearchbarHint()},getQuery(){return this._query().val()},submit(){Je()("#universalsearch form").submit()},createSourceQuery(e){return`source:${this.escape(e)}`},queryContainsSegment(e){return this.getQuery().split(" ").some(n=>n===e)},addSegment(e,r){let s=this.getQuery();if(this.queryContainsSegment(e))return;s==="*"&&(s="");let n="";typeof r<"u"&&s!==""&&(n=`${s} ${r} `),n+=e,this.setQuery(n)},andOperator(){return"AND"},orOperator(){return"OR"},notOperator(){return"NOT"},scrollToSearchbarHint(){Je()(document).scrollTop()>50&&Je()("#scroll-to-search-hint").fadeIn("fast").delay(1500).fadeOut("fast")},substringMatcher(e,r,s){return function(o,l){const d=[];e.forEach(g=>{if(d.length{if(d.lengthr in e?Sc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Sr=(e,r,s)=>(Tc(e,typeof r!="symbol"?r+"":r,s),s);const wc=(0,m.default)(c.Input)`
input&.tt-hint {
background-color: transparent !important;
}
`;class tn extends t.Component{constructor(){super(...arguments),Sr(this,"getValue",()=>Je()(this.fieldInput).typeahead("val")),Sr(this,"clear",()=>{Je()(this.fieldInput).typeahead("val","")}),Sr(this,"_destroyTypeahead",()=>{Je()(this.fieldInput).typeahead("destroy"),Je()(this.fieldFormGroup).off("typeahead:select typeahead:autocomplete")}),Sr(this,"_updateTypeahead",({suggestions:r,displayKey:s,suggestionText:n,onTypeaheadLoaded:o,onSuggestionSelected:l})=>{this.fieldInput=this.fieldInputElem.getInputDOMNode(),this.fieldFormGroup=Cr.findDOMNode(this.fieldInputElem);const d=Je()(this.fieldInput);d.typeahead({hint:!0,highlight:!0,minLength:1},{name:"dataset-name",displayKey:s,source:en.substringMatcher(r,s,6),templates:{suggestion:g=>n?`${Qs()(n)} ${Qs()(g[s])}`:`${Qs()(g[s])}`}}),typeof o=="function"&&(o(),d.typeahead("close")),Je()(this.fieldFormGroup).on("typeahead:select typeahead:autocomplete",(g,h)=>{l&&l(g,h)})})}componentDidMount(){const{suggestions:r,displayKey:s,suggestionText:n,onTypeaheadLoaded:o,onSuggestionSelected:l}=this.props;this._updateTypeahead({suggestions:r,displayKey:s,suggestionText:n,onTypeaheadLoaded:o,onSuggestionSelected:l})}UNSAFE_componentWillReceiveProps(r){this._destroyTypeahead(),this._updateTypeahead(r)}componentWillUnmount(){this._destroyTypeahead()}render(){const{id:r,label:s,onKeyPress:n,formGroupClassName:o}=this.props;return t.createElement(wc,{id:r,type:"text",ref:l=>{this.fieldInputElem=l},wrapperClassName:"typeahead-wrapper",formGroupClassName:o,label:s,onKeyPress:n})}}Sr(tn,"propTypes",{id:a().string.isRequired,label:a().string.isRequired,onKeyPress:a().func,displayKey:a().string,formGroupClassName:a().string,suggestions:a().array,suggestionText:a().string,onTypeaheadLoaded:a().func,onSuggestionSelected:a().func}),Sr(tn,"defaultProps",{displayKey:"suggestion",formGroupClassName:void 0,onKeyPress:()=>{},onTypeaheadLoaded:()=>{},onSuggestionSelected:()=>{},suggestions:[],suggestionText:void 0});const Ac=tn;var Rc=Object.defineProperty,xc=(e,r,s)=>r in e?Rc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Kt=(e,r,s)=>(xc(e,typeof r!="symbol"?r+"":r,s),s);class rn extends t.Component{constructor(r){super(r),Kt(this,"_onSearchTextChanged",n=>{n.preventDefault(),n.stopPropagation(),this.setState({filterText:this.typeAheadInput.getValue()},this.filterData)}),Kt(this,"_onFilterAdded",(n,o)=>{const{filters:l}=this.state,{displayKey:d}=this.props;this.setState({filters:l.add(o[d]),filterText:""},this.filterData),this.typeAheadInput.clear()}),Kt(this,"_onFilterRemoved",n=>{const{filters:o}=this.state;n.preventDefault(),this.setState({filters:o.delete(n.target.getAttribute("data-target"))},this.filterData)}),Kt(this,"_matchFilters",n=>{const{filters:o,filterByKey:l}=this.state,{filterSuggestionAccessor:d}=this.props;return o.every(g=>{let h=n[l];return d?h=h.map(v=>v[d].toLocaleLowerCase()):h=h.map(v=>v.toLocaleLowerCase()),h.indexOf(g.toLocaleLowerCase())!==-1},this)}),Kt(this,"_matchStringSearch",n=>{const{filterText:o}=this.state,{searchInKeys:l}=this.props;return l.some(d=>{const g=n[d],h=o;if(g===null)return!1;const v=(y,C)=>typeof y>"u"?!1:y.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())!==-1;return typeof g=="object"?g.some(y=>v(y,h)):v(g,h)},this)}),Kt(this,"_resetFilters",()=>{this.typeAheadInput.clear(),this.setState({filterText:"",filters:Jt().OrderedSet()},this.filterData)}),Kt(this,"filterData",()=>{const{filterData:n,data:o,onDataFiltered:l}=this.props,{filterText:d}=this.state;if(typeof n=="function")return n(o);const g=o.filter(h=>this._matchFilters(h)&&this._matchStringSearch(h),this);return l(g,d),!0});const{filterBy:s}=this.props;this.state={filterText:"",filters:Jt().OrderedSet(),filterByKey:`${s}s`}}componentDidUpdate(r){const{data:s}=this.props;_r()(r.data,s)||this.filterData()}render(){const{filters:r,filterText:s}=this.state,{id:n,label:o,displayKey:l,filterBy:d,filterSuggestionAccessor:g,filterSuggestions:h}=this.props,v=r.map(C=>t.createElement("li",{key:`li-${C}`},t.createElement("span",{className:"pill label label-default"},d,": ",C,t.createElement("button",{type:"button",className:"tag-remove","data-target":C,onClick:this._onFilterRemoved,"aria-label":`Remove filter ${C}`}))));let y;return g?y=h.map(C=>C[g].toLocaleLowerCase()):y=h.map(C=>C.toLocaleLowerCase()),y.filter(C=>!r.includes(C)),t.createElement("div",{className:"filter"},t.createElement("form",{className:"form-inline",onSubmit:this._onSearchTextChanged,style:{display:"inline-flex",alignItems:"flex-end"}},t.createElement(Ac,{id:n,ref:C=>{this.typeAheadInput=C},onSuggestionSelected:this._onFilterAdded,formGroupClassName:"",suggestionText:`Filter by ${d}: `,suggestions:y,label:o,displayKey:l}),t.createElement(c.Button,{type:"submit",style:{marginLeft:5}},"Filter"),t.createElement(c.Button,{type:"button",style:{marginLeft:5},onClick:this._resetFilters,disabled:r.count()===0&&s===""},"Reset")),t.createElement("ul",{className:"pill-list"},v))}}Kt(rn,"propTypes",{id:a().string,data:a().array,displayKey:a().string,filterBy:a().string,filterData:a().func,filterSuggestionAccessor:a().string,filterSuggestions:a().array,label:a().string,onDataFiltered:a().func,searchInKeys:a().array}),Kt(rn,"defaultProps",{id:"",data:[],displayKey:"",filterBy:"",filterData:void 0,filterSuggestionAccessor:"",filterSuggestions:[],label:"",onDataFiltered:void 0,searchInKeys:[]});const Pc=rn,Ic=m.default.div`
.control-label {
padding-top: 0;
}
`,sn=({children:e,displayKey:r,filterBy:s,filterKeys:n,filterSuggestions:o,id:l,label:d,onDataFiltered:g,rows:h})=>n.length!==0?t.createElement(Ic,{className:"row"},t.createElement("div",{className:"col-md-8"},t.createElement(Pc,{id:`${l}-data-filter`,label:d,data:h,displayKey:r,filterBy:s,filterSuggestions:o,searchInKeys:n,onDataFiltered:g})),e&&t.createElement("div",{className:"col-md-4"},e)):null;sn.propTypes={children:a().node,displayKey:a().string,filterBy:a().string,filterKeys:a().array,filterSuggestions:a().array,id:a().string.isRequired,label:a().string,onDataFiltered:a().func.isRequired,rows:a().array.isRequired},sn.defaultProps={children:void 0,displayKey:void 0,filterBy:void 0,filterKeys:void 0,filterSuggestions:void 0,label:void 0};const ka=sn;var Dc=Object.defineProperty,Mc=(e,r,s)=>r in e?Dc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Wa=(e,r,s)=>(Mc(e,typeof r!="symbol"?r+"":r,s),s);class nn extends t.Component{render(){const{formatter:r,element:s,index:n}=this.props;return r(s,n)}}Wa(nn,"propTypes",{element:a().any,formatter:a().func.isRequired,index:a().number}),Wa(nn,"defaultProps",{element:void 0,index:void 0});const Ka=nn,Lc=(0,m.default)(pe.Z)`
margin-right: 5px;
`,an=({children:e,className:r})=>t.createElement(c.Alert,{className:`${r!=null?r:""} no-bm`},t.createElement(Lc,{name:"info-circle"}),e);an.propTypes={children:a().oneOfType([a().node]),className:a().string},an.defaultProps={children:"No entities exist.",className:void 0};const Oc=an;var Nc=Object.defineProperty,$c=(e,r,s)=>r in e?Nc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Tr=(e,r,s)=>($c(e,typeof r!="symbol"?r+"":r,s),s);const zc=m.default.table`
${bc.K}
`,Uc=({noDataText:e})=>typeof e=="string"?t.createElement(Oc,null,e):e;class on extends t.Component{constructor(r){super(r),Tr(this,"getFormattedHeaders",()=>{let n=0;const{headerCellFormatter:o,headers:l}=this.props,d=l.map(g=>{const h=t.createElement(Ka,{key:`header-${n}`,element:g,index:n,formatter:o});return n+=1,h});return t.createElement("tr",null,d)}),Tr(this,"getFormattedDataRows",()=>{let n=0;const{sortByKey:o,sortBy:l,dataRowFormatter:d,useNumericSort:g}=this.props;let h=this._getEffectiveRows();return o?h=h.sort((y,C)=>y[o].localeCompare(C[o],void 0,{numeric:g})):l&&(h=h.sort((y,C)=>l(y).localeCompare(l(C),void 0,{numeric:g}))),h.map(y=>{const C=t.createElement(Ka,{key:`row-${n}`,element:y,index:n,formatter:d});return n+=1,C})}),Tr(this,"filterDataRows",n=>{this.setState({filteredRows:n})}),Tr(this,"_getEffectiveRows",()=>{const{filteredRows:n}=this.state,{filterKeys:o,rows:l}=this.props;return o.length===0?l:n.filter(d=>l.some(g=>_r()(g,d)))});const{rows:s}=this.props;this.state={filteredRows:s}}render(){const{customFilter:r,filterKeys:s,id:n,filterLabel:o,filterBy:l,displayKey:d,filterSuggestions:g,children:h,noDataText:v,className:y,rowClassName:C,useResponsiveTable:R,rows:T}=this.props,P=this._getEffectiveRows();let z;return T.length===0?z=t.createElement(Uc,{noDataText:v}):P.length===0?z=t.createElement("p",null,"Filter does not match any data."):z=t.createElement(zc,{className:`table ${y}`},t.createElement("thead",null,this.getFormattedHeaders()),t.createElement("tbody",null,this.getFormattedDataRows())),t.createElement("div",null,r||t.createElement(ka,{label:o,rows:T,id:n,displayKey:d,filterBy:l,filterSuggestions:g,filterKeys:s,onDataFiltered:this.filterDataRows},h),t.createElement("div",{className:`row ${C}`},t.createElement("div",{className:"col-md-12"},t.createElement("div",{id:n,className:`data-table ${R?"table-responsive":""}`},z))))}}Tr(on,"propTypes",{children:a().node,className:a().string,customFilter:a().node,rowClassName:a().string,displayKey:a().string,dataRowFormatter:a().func.isRequired,filterBy:a().string,filterLabel:a().string,filterKeys:a().array,filterSuggestions:a().array,headerCellFormatter:a().func,headers:a().array.isRequired,id:a().string.isRequired,noDataText:a().oneOfType([a().string,a().node]),rows:a().array.isRequired,sortByKey:a().string,sortBy:a().func,useResponsiveTable:a().bool,useNumericSort:a().bool}),Tr(on,"defaultProps",{customFilter:void 0,children:void 0,className:"",filterBy:"",filterSuggestions:[],filterKeys:[],filterLabel:"Filter",displayKey:"value",noDataText:"No data available.",rowClassName:"",useResponsiveTable:!0,headerCellFormatter:e=>t.createElement("th",null,e),sortByKey:void 0,sortBy:void 0,useNumericSort:!1});const ln=on;var Bc=i("jlUcZkDc"),uE=i("aC7Ajf8V");const Fc=t.createContext(void 0),Zc=(0,ve.ri)("contexts.UserDateTimeContext",()=>Fc),gs=()=>{const e=(0,t.useContext)(Zc);if(!e)throw new Error("useUserDateTime hook needs to be used inside UserDateTimeContext.Provider");return e},kc=(0,m.default)(Bc.ZP)(({theme:e})=>m.css`
width: 100%;
.DayPicker-Day {
min-width: 34px;
max-width: 34px;
min-height: 34px;
max-height: 34px;
&--selected:not(.DayPicker-Day--disabled, .DayPicker-Day--outside) {
background-color: ${e.colors.variant.lighter.primary};
color: ${e.colors.variant.darkest.primary};
}
&--today {
color: ${e.colors.variant.info};
}
&:focus {
outline-color: ${e.colors.variant.primary};
}
}
&:not(.DayPicker--interactionDisabled) .DayPicker-Day:not(.DayPicker-Day--disabled, .DayPicker-Day--selected, .DayPicker-Day--outside) {
&:focus {
outline-color: ${e.colors.variant.primary};
}
&:hover {
background-color: ${e.colors.variant.lightest.primary};
color: ${e.colors.variant.darker.primary};
}
}
`),Wc=e=>{const{toUserTimezone:r}=gs();if(Bt(e))return r(e)},Ha=({date:e,fromDate:r,onChange:s,showOutsideDays:n})=>{const{formatTime:o}=gs(),l=Wc(e),d=(0,t.useMemo)(()=>({selected:g=>l?o(l,"date")===o(g,"date"):!1,disabled:{before:new Date(r)}}),[o,r,l]);return t.createElement(kc,{initialMonth:l?l.toDate():void 0,onDayClick:s,modifiers:d,showOutsideDays:n})};Ha.propTypes={date:a().oneOfType([a().object,a().string]),onChange:a().func.isRequired,fromDate:a().instanceOf(Date),showOutsideDays:a().bool},Ha.defaultProps={date:void 0,fromDate:void 0,showOutsideDays:!1};const mE=null,Ga=({children:e,title:r})=>{const s="Graylog";return(0,t.useEffect)(()=>(document.title=`${document.title} - ${r}`,()=>{document.title=s}),[r]),t.createElement(t.Fragment,null,e)};Ga.propTypes={title:a().string.isRequired,children:a().oneOfType([a().arrayOf(a().element),a().element]).isRequired};const Pt=Ga,Kc=m.default.ul.attrs(()=>({className:"dropdown-menu"}))(({$show:e,theme:r,$zIndex:s,$minWidth:n})=>m.css`
display: ${e?"block":"none"};
color: ${r.colors.variant.dark.default};
background-color: ${r.colors.variant.lightest.default};
box-shadow: 0 3px 3px ${r.colors.global.navigationBoxShadow};
z-index: ${s};
min-width: ${n?`${n}px`:"max-content"};
.dropdown-header {
color: ${r.colors.variant.dark.default};
padding: 3px 10px;
}
> li {
> a {
padding: 3px 10px;
color: ${r.colors.variant.darker.default};
display: flex;
align-items: center;
&:hover {
color: ${r.colors.variant.darkest.default};
background-color: ${r.colors.variant.lighter.default};
}
}
&.disabled {
> a {
color: ${r.colors.variant.light.default};
}
}
}
`);function Hc(e,r,s){var n,o;return(n=e.props)!=null&&n.onSelect?{onSelect:(l,d)=>{e.props.onSelect(),s(d)}}:(o=e.props)!=null&&o.children?{children:Va(e.props.children,r+1,s)}:{}}function Va(e,r,s){return r>2?e:t.Children.map(e,o=>o!=null&&o.props?t.cloneElement(o,{...o.props,...Hc(o,r+1,s)}):o)}const ja=({show:e,children:r,zIndex:s,onMenuItemSelect:n,minWidth:o,...l})=>{const d=Va(r,0,n);return t.createElement(Kc,{...l,$show:e,$zIndex:s,$minWidth:o},d)};ja.propTypes={children:a().node.isRequired,zIndex:a().number,show:a().bool,minWidth:a().number},ja.defaultProps={show:!1,zIndex:1050,minWidth:void 0,onMenuItemSelect:()=>{}};const gE=null,qa=m.default.a.attrs({href:"#"})(({theme:e})=>m.css`
&::after {
display: block;
content: ' ';
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: ${e.colors.gray[80]};
margin-top: 5px;
margin-right: -10px;
}
`),Gc=(0,m.default)(c.Dropdown)(({left:e,theme:r})=>m.css`
position: relative;
> .dropdown-menu {
top: 0;
left: ${e?"auto":"100%"};
right: ${e?"98%":"auto"};
margin-top: -6px;
margin-left: ${e?"10px":"-1px"};
border-radius: ${e?"6px 0 6px 6px":"0 6px 6px 6px"};
}
&:hover > .dropdown-menu {
display: block;
}
&:hover > ${String(qa)}::after {
border-left-color: ${r.colors.gray[100]};
}
`),Ya=({children:e,left:r,title:s})=>t.createElement(Gc,{left:r,as:"li"},s&&t.createElement(qa,null,s),t.createElement(c.Dropdown.Menu,null,e));Ya.propTypes={children:a().node.isRequired,left:a().bool,title:a().string},Ya.defaultProps={left:!1,title:void 0};const hE=null,Vc=({children:e,className:r,resizeDelay:s})=>{const n=(0,t.useRef)(null),o=(0,xt.Z)(n,s);return t.createElement("div",{ref:n,className:r},e(o))};Vc.defaultProps={className:void 0,resizeDelay:void 0};const fE=null,jc=m.default.div`
display: flex;
flex-direction: column;
align-items: center;
p {
text-align: center;
}
`,qc=m.default.h2`
margin-top: 5px;
margin-bottom: 10px;
text-align: center;
`,Ja=({children:e,title:r})=>t.createElement(jc,null,t.createElement(qc,null,r),e);Ja.propTypes={title:a().oneOfType([a().string,a().node]),children:a().node.isRequired},Ja.defaultProps={title:"Looks like there is nothing here, yet!"};const vE=null,Yc=(0,m.default)(pe.Z)`
margin-right: 5px;
`,Xa=({children:e,className:r})=>t.createElement(c.Alert,{className:`${r!=null?r:""} no-bm`},t.createElement(Yc,{name:"info-circle"}),e||"No data available.");Xa.defaultProps={className:void 0};const Jc=Xa;var Xc=Object.defineProperty,Qc=(e,r,s)=>r in e?Xc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Qa=(e,r,s)=>(Qc(e,typeof r!="symbol"?r+"":r,s),s);class ed{constructor(){Qa(this,"PAGES",{ALERTS:"alerts",AUDIT_LOG:"auditlog",AUTHENTICATORS:"permission-management#authentication",CHANGELOG:"changelog",CLUSTER_STATUS_EXPLAINED:"elasticsearch#cluster-status-explained",COLLECTOR:"sidecar",COLLECTOR_SIDECAR:"sidecar",COLLECTOR_STATUS:"sidecar#sidecar-status",CONFIGURING_ES:"elasticsearch",DASHBOARDS:"dashboards",DECORATORS:"decorators",ENTERPRISE_SETUP:"setup",ES_CLUSTER_STATUS_RED:"elasticsearch#cluster-status-explained",ES_CLUSTER_UNAVAILABLE:"elasticsearch#configuration",ES_OPEN_FILE_LIMITS:"elasticsearch#configuration",EXTRACTORS:"extractors",INDEXER_FAILURES:"indexer-failures",INDEX_MODEL:"index-model",LICENSE:"license",LOAD_BALANCERS:"load-balancers",LOOKUPTABLES:"lookuptables",OPERATIONS_CHANGELOG:"changelog-graylog",PAGE_FLEXIBLE_DATE_CONVERTER:"extractors#normalization",PAGE_STANDARD_DATE_CONVERTER:"extractors#normalization",PERMISSIONS:"permission-management",PIPELINE_FUNCTIONS:"functions",PIPELINE_RULES:"rules",PIPELINES:"pipelines",REPORTING:"reporting",ROLLING_ES_UPGRADE:"rolling-es-upgrade",SEARCH_QUERY_ERRORS:{UNKNOWN_FIELD:"query-language#unknown-field",QUERY_PARSING_ERROR:"query-language#parse-exception",INVALID_OPERATOR:"query-language#invalid-operator",UNDECLARED_PARAMETER:"query-language#undeclared-parameter"},SEARCH_QUERY_LANGUAGE:"query-language",STREAMS:"streams",STREAM_PROCESSING_RUNTIME_LIMITS:"streams#stream-processing-runtime-limits",TIME_FRAME_SELECTOR:"time-frame-selector",UPGRADE_GUIDE:"upgrading-graylog",USERS_ROLES:"permission-management",WELCOME:""}),Qa(this,"DOCS_URL","https://docs.graylog.org/docs")}toString(r){const s=this.DOCS_URL;return r===""?s:`${s}/${r}`}toLink(r,s){return`${s}`}versionedDocsHomePage(){return this.toString("")}}const eo=new ed,td=m.default.a`
display: inline-flex;
align-items: center;
`,rd=(0,m.default)(pe.Z)`
margin-left: 5px;
`,to=({page:e,title:r="",text:s,displayIcon:n})=>t.createElement(td,{href:eo.toString(e),title:r,target:"_blank"},s,n&&t.createElement(rd,{name:"lightbulb",type:"regular",size:"lg"}));to.defaultProps={title:"",displayIcon:!1};const ro=to,sd=(0,m.default)(L.Z.Title)`
display: flex;
align-items: center;
`,nd=(0,m.default)(pe.Z)`
margin-right: 5px;
margin-top: -1px;
`,so=({featureName:e,wrapperClassName:r})=>t.createElement(L.Z,{bsStyle:"info",className:r},t.createElement(L.Z.Heading,null,t.createElement(sd,null,t.createElement(nd,{name:"crown"}),"Enterprise Feature")),t.createElement(L.Z.Body,null,"To use the ",t.createElement("b",null,e)," functionality you need the ",t.createElement("a",{href:"https://www.graylog.org/products/enterprise",rel:"noopener noreferrer",target:"_blank"},"Graylog Enterprise license")," and the ",t.createElement(ro,{page:eo.PAGES.ENTERPRISE_SETUP,text:"Graylog Enterprise plugin"}),"."));so.propTypes={featureName:a().string.isRequired,wrapperClassName:a().string},so.defaultProps={wrapperClassName:"no-bm"};const yE=null,ad=m.default.ul`
padding: 0;
margin: 0;
`,no=({bsNoItemsStyle:e,items:r,noItemsText:s})=>r.length===0?t.createElement(c.Alert,{bsStyle:e},t.createElement(pe.Z,{name:"info-circle"}),"\xA0",s):t.createElement(ad,null,r);no.defaultProps={bsNoItemsStyle:"info",noItemsText:"No items available"},no.propTypes={bsNoItemsStyle:a().oneOf(["info","success","warning"]),noItemsText:a().oneOfType([a().string,a().element]),items:a().array.isRequired};const bE=null,od=m.default.li(({theme:e})=>m.css`
display: block;
padding: 15px 0;
h2 {
font-family: ${e.fonts.family.body};
}
h2 .label {
margin-left: 5px;
line-height: 1;
vertical-align: baseline;
}
.item-description {
min-height: 17px;
margin: 5px 0;
}
.item-actions > .btn,
.item-actions > .btn-group,
.item-actions > span > .btn {
margin-left: 5px;
margin-bottom: 5px;
}
&:not(:last-child) {
border-bottom: 1px solid ${e.colors.gray[90]};
}
`),ao=({actions:e,contentRow:r,description:s,title:n,titleSuffix:o})=>{const l=o?t.createElement("small",null,o):null,d=t.createElement("div",{className:"item-actions text-right"},e);return t.createElement(od,null,t.createElement(c.Row,{className:"row-sm"},t.createElement(c.Col,{md:12},t.createElement("div",{className:"pull-right hidden-xs"},d),t.createElement("h2",null,n," ",l),s&&t.createElement("div",{className:"item-description"},t.createElement("span",null,s))),t.createElement(c.Col,{sm:12,lgHidden:!0,mdHidden:!0,smHidden:!0},d)),r&&t.createElement(c.Row,{className:"row-sm"},r))};ao.propTypes={title:a().oneOfType([a().string,a().node]).isRequired,titleSuffix:a().any,description:a().any,actions:a().oneOfType([a().array,a().node]),contentRow:a().node},ao.defaultProps={actions:void 0,contentRow:void 0,description:void 0,titleSuffix:void 0};const _E=null,ld=(0,m.default)(c.Row)`
margin-bottom: 0 !important;
`,id=m.default.div(({margin:e})=>`
margin-top: ${e}px;
margin-bottom: ${e}px;
`),oo=({children:e,onClose:r,bsStyle:s="warning",marginTopBottom:n=15,runtimeError:o})=>{const l=o?"danger":s;return e?t.createElement(id,{margin:n},t.createElement(c.Alert,{bsStyle:l},t.createElement(ld,null,t.createElement(c.Col,{md:11},o&&t.createElement("h4",null,"Runtime Error"),e),t.createElement(c.Col,{md:1},t.createElement(c.Button,{bsSize:"xsmall",bsStyle:l,className:"pull-right",onClick:()=>r(void 0)},t.createElement(pe.Z,{name:"times"})))))):null};oo.propTypes={bsStyle:a().string,runtimeError:a().bool,marginTopBottom:a().number,children:a().oneOfType([a().arrayOf(a().element),a().element,a().string]),onClose:a().func},oo.defaultProps={bsStyle:"warning",runtimeError:!1,marginTopBottom:15,children:null,onClose:()=>{}};const CE=null;var cd=i("AimHCGGx"),hs=i.n(cd),dd=i("VoGK8g1T"),fs=i.n(dd),ud=i("NQ0AKqSy"),vs=i.n(ud),pd=i("tai1YJ/e"),Es=i.n(pd),md=i("UnmjMsA0"),ys=i.n(md),gd=i("9kicK936"),bs=i.n(gd),_s=i("2hHqKME2"),wr={};wr.styleTagTransform=bs(),wr.setAttributes=Es(),wr.insert=vs().bind(null,"head"),wr.domAPI=fs(),wr.insertStyleElement=ys();var SE=hs()(_s.Z,wr);const lo=_s.Z&&_s.Z.locals?_s.Z.locals:void 0,io=({children:e,className:r})=>t.createElement("ul",{className:r?`${lo.list} ${r}`:lo.list},e);io.defaultProps={className:void 0},io.propTypes={className:a().string};const TE=null,hd=m.default.li(({padded:e})=>m.css`
padding: ${e?"10px 5px":""};
`),fd=m.default.div(({theme:e})=>m.css`
display: flex;
font-size: ${e.fonts.size.body};
line-height: 20px;
label {
min-height: 20px;
margin-bottom: 2px;
margin-right: 5px;
* {
cursor: pointer;
}
}
`),vd=m.default.div`
display: inline-block;
width: 20px;
margin-right: 5px;
`,Ed=m.default.div(({theme:e})=>m.css`
&.fa-stack {
cursor: pointer;
font-size: ${e.fonts.size.large};
line-height: 20px;
width: 1em;
height: 1em;
vertical-align: text-top;
&:hover [class*='fa-'] {
color: ${e.colors.variant.primary};
opacity: 1;
}
}
[class*='fa-']:first-child {
opacity: 0;
~ [class*='fa-']:hover {
color: ${e.colors.global.contentBackground};
}
}
`),yd=m.default.span(({theme:e})=>m.css`
font-size: ${e.fonts.size.large};
`),bd=m.default.button`
display: flex;
border: 0;
padding: 0;
text-align: left;
background: transparent;
`,_d=m.default.span(({theme:e})=>m.css`
font-size: ${e.fonts.size.body};
margin-left: 0.5em;
color: ${e.colors.gray[70]};
`),Cd=m.default.div(({theme:e})=>m.css`
border-left: 1px ${e.colors.gray[90]} solid;
margin-left: 35px;
margin-top: 10px;
padding-left: 5px;
`),Sd=e=>{const{expanded:r,indetermined:s,stayExpanded:n,padded:o,...l}=e;return l};class co extends t.Component{constructor(r){super(r),this._toggleExpand=()=>{const{stayExpanded:s}=this.props,{expanded:n}=this.state;s?this.setState({expanded:!0}):this.setState({expanded:!n})},this._clickOnHeader=()=>{this._checkbox&&this._checkbox.click()},this.state={expanded:r.expanded}}componentDidMount(){const{indetermined:r}=this.props;r&&this._checkbox&&(this._checkbox.indeterminate=r)}componentDidUpdate(r){const{expanded:s,indetermined:n}=this.props;r.expanded!==s&&this._toggleExpand(),this._checkbox&&(this._checkbox.indeterminate=n)}render(){const{expanded:r}=this.state,{padded:s}=this.props,{checked:n,expandable:o,selectable:l,header:d,subheader:g,children:h,...v}=this.props,y=l?t.createElement(bd,{type:"button",tabIndex:0,onClick:this._clickOnHeader},d):d,C=Sd(v);return t.createElement(hd,{padded:s},t.createElement(fd,null,l&&t.createElement(c.Checkbox,{inputRef:R=>{this._checkbox=R},inline:!0,checked:n,...C}),o&&t.createElement(vd,null,t.createElement(Ed,{className:"fa-stack",tabIndex:0,onClick:this._toggleExpand},t.createElement(pe.Z,{name:"circle",className:"fa-stack-1x"}),t.createElement(pe.Z,{name:`angle-${r?"down":"up"}`,className:"fa-stack-1x"}))),t.createElement(yd,{className:"header"},y,g&&t.createElement(_d,null,g))),t.createElement(Cd,null,r&&h))}}co.propTypes={checked:a().bool,indetermined:a().bool,selectable:a().bool,expandable:a().bool,expanded:a().bool,stayExpanded:a().bool,header:a().oneOfType([a().string,a().element]).isRequired,subheader:a().oneOfType([a().string,a().element]),children:a().oneOfType([a().element,a().arrayOf(a().element)]),padded:a().bool,readOnly:a().bool,onChange:a().func},co.defaultProps={checked:!1,indetermined:!1,expandable:!0,expanded:!1,selectable:!0,children:[],subheader:void 0,stayExpanded:!1,padded:!0,readOnly:!1,onChange:()=>{}};const wE=null;var Td=i("eh/hLw98"),Zr=i.n(Td);const cn=({children:e,className:r,href:s,iconClass:n,target:o})=>{const l=t.createElement("span",null,e,"\xA0",t.createElement(pe.Z,{name:n}));return Zr()(s)===""?l:t.createElement("a",{href:s,target:o,className:r,rel:"noopener noreferrer"},l)};cn.defaultProps={href:"",target:"_blank",iconClass:"external-link-alt",className:""},cn.propTypes={href:a().string,children:a().node.isRequired,target:a().string,iconClass:a().string,className:a().string};const wd=cn,uo=({iconClass:e,children:r,...s})=>t.createElement(c.Button,{...s},t.createElement(wd,{iconClass:e},r));uo.propTypes={href:a().string.isRequired,children:a().node.isRequired,bsStyle:a().string,bsSize:a().string,target:a().string,iconClass:a().string,className:a().string,disabled:a().bool},uo.defaultProps={bsStyle:"default",bsSize:void 0,target:"_blank",iconClass:"external-link-alt",className:"",disabled:!1};const AE=null;var Ad=i("l5ezlDz+");const RE=m.default.div`
${Ad.M}
padding: 9px;
margin-left: -15px;
margin-right: -15px;
`,xE=null,Rd=e=>({defaultChecked:e!=null?e:!1}),xd=e=>({value:e!=null?e:""}),dn=({name:e,type:r,help:s,validate:n,onChange:o,error:l,...d})=>{const{validateOnChange:g}=(0,H.useFormikContext)();return t.createElement(H.Field,{name:e,validate:n},({field:{value:h,onChange:v,onBlur:y},meta:{error:C,touched:R}})=>{const T=r==="checkbox"?Rd(h):xd(h),z=(g?!!(C&&R):!!C)?C:l,X=se=>{typeof o=="function"&&o(se),v(se)};return t.createElement(c.Input,{...d,...T,onBlur:y,help:s,id:e,error:z,onChange:X,type:r})})};dn.propTypes={autoComplete:a().string,bsSize:a().string,buttonAfter:a().oneOfType([a().string,a().element]),disabled:a().bool,error:a().oneOfType([a().string,a().element]),formGroupClassName:a().string,help:a().oneOfType([a().string,a().element]),label:a().oneOfType([a().string,a().element]),labelClassName:a().string,maxLength:a().number,minLength:a().number,name:a().string.isRequired,onChange:a().func,placeholder:a().string,required:a().bool,type:a().string,validate:a().func,wrapperClassName:a().string,autoFocus:a().bool},dn.defaultProps={autoComplete:void 0,bsSize:void 0,buttonAfter:void 0,disabled:!1,error:void 0,formGroupClassName:void 0,help:void 0,label:void 0,labelClassName:void 0,maxLength:void 0,minLength:void 0,onChange:void 0,placeholder:void 0,required:!1,type:"text",validate:()=>{},wrapperClassName:void 0,autoFocus:!1};const Pd=dn,Id=({labelClassName:e,wrapperClassName:r,label:s,name:n,onChange:o,...l})=>t.createElement(Pd,{...l,label:s,id:n,onChange:o,name:n,labelClassName:e,wrapperClassName:r});Id.defaultProps={autoComplete:void 0,bsSize:void 0,buttonAfter:void 0,disabled:!1,onChange:void 0,labelClassName:"col-sm-3",wrapperClassName:"col-sm-9",formGroupClassName:void 0,type:void 0,error:void 0,placeholder:void 0,help:void 0,minLength:void 0,maxLength:void 0,required:!1,validate:()=>{},rows:void 0,autoFocus:!1};const PE=null;var Cs=i("GX8KkpAK"),st=i("zf+4LgXf");const Dd=(0,m.default)(pe.Z)`
margin-right: 0.2em;
`,po=e=>{const{bsSize:r,className:s,centerCol:n,displayCancel:o,disabledSubmit:l,formId:d,isAsyncSubmit:g,onSubmit:h,submitButtonText:v,submitButtonType:y,submitIcon:C}=e;return t.createElement(za.Z,{className:s},t.createElement(Cs.Z,{bsStyle:"success",bsSize:r,disabled:l||g&&e.isSubmitting,form:d,title:v,type:y,onClick:h},C&&!(g&&e.isSubmitting)&&t.createElement(Dd,{name:C}),g&&e.isSubmitting?t.createElement(st.Z,{text:e.submitLoadingText,delay:0}):v),n,o===!0&&t.createElement(Cs.Z,{type:"button",bsSize:r,onClick:e.onCancel,disabled:e.disabledCancel||g&&e.isSubmitting},"Cancel"))};po.defaultProps={bsSize:void 0,centerCol:void 0,className:void 0,disabledSubmit:!1,displayCancel:!0,formId:void 0,isAsyncSubmit:!1,onSubmit:void 0,submitButtonType:"submit",submitIcon:void 0};const mo=po;var Md=i("HM+Bgqj5"),Dt=i.n(Md),un=i("ww+BtWnX"),Ar=i.n(un),Ld=i("zvpIoheO");const Od=e=>{const r=e.map(([n])=>n),s=e.map(([,n])=>n);return un.scale(s).domain(r)},Nd=e=>{switch(e){case"Blackbody":case"Bluered":case"Cividis":case"Earth":case"Electric":case"Hot":case"Jet":case"Picnic":case"Portland":case"Rainbow":return Od(Ld.scales[e]);default:return un.scale(e)}};class go{static fromJSON(r){switch(r.type){case"gradient":return or.fromJSON(r);case"static":return kr.fromJSON(r);default:throw new Error(`Invalid highlighting color type: ${r.type}`)}}isStatic(){return this.type==="static"}isGradient(){return this.type==="gradient"}}class kr extends go{constructor(r){super(),this._color=r}get type(){return"static"}get color(){return this._color}colorFor(){return this.color}static fromJSON({color:r}){return new kr(r)}static create(r){return new kr(r)}toJSON(){const{color:r}=this;return{type:"static",color:r}}}const $d=(e,r=0)=>{if(typeof e=="number")return e;try{return Number.parseFloat(e)}catch{return r}};class or extends go{constructor(r,s,n){super(),this._lower=s,this._upper=n,this._gradient=r,this._scale=Nd(r)}get type(){return"gradient"}get gradient(){return this._gradient}get lower(){return this._lower}get upper(){return this._upper}get scale(){return this._scale}colorFor(r){const s=$d(r,this.lower),n=this.upper-this.lower,o=Math.max(this.lower,Math.min(this.upper,s));return this._scale((o-this.lower)/n)}static fromJSON({gradient:r,lower:s,upper:n}){return new or(r,s,n)}static create(r,s,n){return new or(r,s,n)}withGradient(r){return or.create(r,this.lower,this.upper)}withLower(r){return or.create(this.gradient,r,this.upper)}withUpper(r){return or.create(this.gradient,this.lower,r)}toJSON(){const{gradient:r,lower:s,upper:n}=this;return{type:"gradient",gradient:r,lower:s,upper:n}}}const DE=null,ho="full_message",zd="timestamp",fo="message",vo="source",ME="(Empty Value)",LE=15,OE={type:"auto",scaling:1},NE=[zd,vo],Ud={type:"relative",range:0},zE={DEFAULT_LIMIT:150},Bd="relative",Eo=300,UE=Eo-60,Fd={type:Bd,from:Eo},BE=kr.create("#ffec3d"),FE=Ar().scale(["lightyellow","lightgreen","lightblue","red"]).mode("lch").colors(40),ZE="linear",kE=null,WE={seconds:"Seconds",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Weeks",months:"Months"},KE=[{type:"seconds",label:"Seconds"},{type:"minutes",label:"Minutes"},{type:"hours",label:"Hours"},{type:"days",label:"Days"}],pn="/views",HE=`${pn}/:viewId`,yo="/search",GE=`${yo}/new`,VE=`${yo}/:viewId`,mn="/dashboards",jE=`${mn}/new`,qE=`${mn}/tv/:viewId`,YE=`${mn}/:viewId`,Zd="/extendedsearch",JE=[{type:"relative",name:"Relative"},{type:"absolute",name:"Absolute"},{type:"keyword",name:"Keyword"}],XE=28,ut={STARTPAGE:"/",NOTFOUND:"/notfound",SEARCH:"/search",STREAMS:"/streams",ALERTS:{LIST:"/alerts",replay_search:e=>`/alerts/${e}/replay-search`,DEFINITIONS:{LIST:"/alerts/definitions",CREATE:"/alerts/definitions/new",edit:e=>`/alerts/definitions/${e}/edit`,show:e=>`/alerts/definitions/${e}`,replay_search:e=>`/alerts/definitions/${e}/replay-search`},NOTIFICATIONS:{LIST:"/alerts/notifications",CREATE:"/alerts/notifications/new",edit:e=>`/alerts/notifications/${e}/edit`,show:e=>`/alerts/notifications/${e}`}},SECURITY:"/security",SOURCES:"/sources",DASHBOARDS:"/dashboards",WELCOME:"/welcome",GLOBAL_API_BROWSER_URL:"/api/api-browser/global/index.html",SYSTEM:{CONFIGURATIONS:"/system/configurations",CONTENTPACKS:{LIST:"/system/contentpacks",EXPORT:"/system/contentpacks/export",CREATE:"/system/contentpacks/create",edit:(e,r)=>`/system/contentpacks/${e}/${r}/edit`,show:e=>`/system/contentpacks/${e}`},GROKPATTERNS:"/system/grokpatterns",INDICES:{LIST:"/system/indices",FAILURES:"/system/indices/failures"},INDEX_SETS:{CONFIGURATION:(e,r)=>r?`/system/index_sets/${e}/configuration?from=${r}`:`/system/index_sets/${e}/configuration`,SHOW:e=>`/system/index_sets/${e}`,CREATE:"/system/index_sets/create"},INPUTS:"/system/inputs",LOGGING:"/system/logging",METRICS:e=>`/system/metrics/node/${e}`,NODES:{LIST:"/system/nodes",SHOW:e=>`/system/nodes/${e}`},THREADDUMP:e=>`/system/threaddump/${e}`,OUTPUTS:"/system/outputs",OVERVIEW:"/system/overview",PROCESSBUFFERDUMP:e=>`/system/processbufferdump/${e}`,AUTHENTICATION:{BACKENDS:{OVERVIEW:"/system/authentication/services",ACTIVE:"/system/authentication/services/active",CREATE:"/system/authentication/services/create",createBackend:e=>`/system/authentication/services/create/${e}`,show:e=>`/system/authentication/services/${e}`,edit:(e,r)=>{const s=`/system/authentication/services/edit/${e}`;return r?`${s}?initialStepKey=${r}`:s}},AUTHENTICATORS:{SHOW:"/system/authentication/authenticator",EDIT:"/system/authentication/authenticator/edit"}},USERS:{CREATE:"/system/users/new",edit:e=>`/system/users/edit/${e}`,TOKENS:{edit:e=>`/system/users/tokens/${e}`},OVERVIEW:"/system/users",show:e=>`/system/users/${e}`},AUTHZROLES:{OVERVIEW:"/system/roles",show:e=>`/system/roles/${e}`,edit:e=>`/system/roles/edit/${e}`},LOOKUPTABLES:{OVERVIEW:"/system/lookuptables",CREATE:"/system/lookuptables/create",show:e=>`/system/lookuptables/table/${e}`,edit:e=>`/system/lookuptables/table/${e}/edit`,CACHES:{OVERVIEW:"/system/lookuptables/caches",CREATE:"/system/lookuptables/caches/create",show:e=>`/system/lookuptables/caches/${e}`,edit:e=>`/system/lookuptables/caches/${e}/edit`},DATA_ADAPTERS:{OVERVIEW:"/system/lookuptables/data_adapters",CREATE:"/system/lookuptables/data_adapters/create",show:e=>`/system/lookuptables/data_adapter/${e}`,edit:e=>`/system/lookuptables/data_adapter/${e}/edit`}},PIPELINES:{OVERVIEW:"/system/pipelines",PIPELINE:e=>`/system/pipelines/${e}`,RULES:"/system/pipelines/rules",RULE:e=>`/system/pipelines/rules/${e}`,SIMULATOR:"/system/pipelines/simulate"},ENTERPRISE:"/system/enterprise",SIDECARS:{OVERVIEW:"/system/sidecars",STATUS:e=>`/system/sidecars/${e}/status`,ADMINISTRATION:"/system/sidecars/administration",CONFIGURATION:"/system/sidecars/configuration",FAILURE_TRACKING:"/system/sidecars/failuretracking",NEW_CONFIGURATION:"/system/sidecars/configuration/new",EDIT_CONFIGURATION:e=>`/system/sidecars/configuration/edit/${e}`,NEW_COLLECTOR:"/system/sidecars/collector/new",EDIT_COLLECTOR:e=>`/system/sidecars/collector/edit/${e}`}},VIEWS:{LIST:pn,VIEWID:e=>`${pn}/${e}`},EXTENDEDSEARCH:Zd,search_with_query:(e,r,s,n)=>{const o=new(Dt())(ut.SEARCH),l={q:e};if(r&&s)switch(l.rangetype=r,r){case"relative":l.relative=s.relative;break;case"absolute":l.from=s.from,l.to=s.to;break;case"keyword":l.keyword=s.keyword;break;default:throw new Error(`Invalid range type: ${r}.`)}return n&&(l.streams=n.join(",")),o.query(l),o.resource()},_common_search_url:(e,r,s,n)=>{const o=new(Dt())(e),l={q:r,interval:n};return s&&Object.keys(s).forEach(d=>{l[d]=s[d]}),o.setQuery(l),o.resource()},search:(e,r,s)=>ut._common_search_url(ut.SEARCH,e,r,s),message_show:(e,r)=>`/messages/${e}/${r}`,stream_edit:e=>`/streams/${e}/edit`,stream_edit_example:(e,r,s)=>`${ut.stream_edit(e)}?index=${r}&message_id=${s}`,stream_outputs:e=>`/streams/${e}/outputs`,stream_search:(e,r,s,n)=>ut._common_search_url(`${ut.STREAMS}/${e}/search`,r,s,n),stream_alerts:e=>`/alerts/?stream_id=${e}`,legacy_stream_search:e=>`/streams/${e}/messages`,dashboard_show:e=>`/dashboards/${e}`,show_saved_search:e=>`/search/${e}`,node:e=>`/system/nodes/${e}`,node_inputs:e=>`${ut.SYSTEM.INPUTS}/${e}`,global_input_extractors:e=>`/system/inputs/${e}/extractors`,local_input_extractors:(e,r)=>`/system/inputs/${e}/${r}/extractors`,export_extractors:(e,r)=>`${ut.local_input_extractors(e,r)}/export`,import_extractors:(e,r)=>`${ut.local_input_extractors(e,r)}/import`,new_extractor:(e,r,s,n,o,l)=>{const d=new(Dt())(`/system/inputs/${e}/${r}/extractors/new`),g={extractor_type:s,field:n,example_index:o,example_id:l};return d.search(g),d.resource()},edit_extractor:(e,r,s)=>`/system/inputs/${e}/${r}/extractors/${s}/edit`,edit_input_extractor:(e,r,s)=>`/system/inputs/${e}/${r}/extractors/${s}/edit`,filtered_metrics:(e,r)=>`${ut.SYSTEM.METRICS(e)}?filter=${r}`,global_api_browser:()=>ut.GLOBAL_API_BROWSER_URL},bo=(e,r)=>{const s=new(Dt())(e);return s.directory(`${r}/${s.directory()}`).normalizePath().resource()},kd=e=>typeof e=="string",Wd=e=>typeof e=="function",gn=(e,r)=>r==="/"?e:Object.fromEntries(Object.entries(e).map(([s,n])=>kd(n)?[s,bo(n,r)]:Wd(n)?[s,(...o)=>{const l=n(...o);return bo(l,r)}]:[s,gn(n,r)])),Kd=le.Z.gl2AppPathPrefix()?gn(ut,le.Z.gl2AppPathPrefix()):ut,Hd=ut,_o=(e,r=!0)=>{const s={};p.G.exports("routes").forEach(o=>{const l=new(Dt())(o.path),d=l.segment(),g=d.map(v=>v.replace(":","")).join("_").toUpperCase(),h=d.filter(v=>v.startsWith(":"));if(h.length>0){s[g]=(...v)=>(h.forEach((y,C)=>{const R=String(v[C]);l.segment(d.indexOf(y),R)}),l.pathname());return}s[g]=o.path});const n=(le.Z.gl2AppPathPrefix()?gn(s,le.Z.gl2AppPathPrefix()):s)[e];if(!n&&r)throw new Error(`Could not find plugin route '${e}'.`);return n},Gd=e=>_o(e,!1),QE="Enterprise",ey="Security",Ze=Object.assign(Kd,{pluginRoute:_o,getPluginRoute:Gd,unqualified:Hd}),Vd=e=>{throw new Error(`Can't find route for type: ${e!=null?e:"(undefined)"}`)},ry=(e,r)=>{switch(r==null?void 0:r.toLowerCase()){case"user":return Routes.SYSTEM.USERS.show(e);case"team":return Routes.getPluginRoute("SYSTEM_TEAMS_TEAMID")(e);case"dashboard":return Routes.dashboard_show(e);case"event_definition":return Routes.ALERTS.DEFINITIONS.show(e);case"notification":return Routes.ALERTS.NOTIFICATIONS.show(e);case"search":return Routes.getPluginRoute("SEARCH_VIEWID")(e);case"stream":return Routes.stream_search(e);case"search_filter":return Routes.getPluginRoute("MY-FILTERS_DETAILS_FILTERID")(e);case"report":return Routes.getPluginRoute("REPORTS_REPORTID_CONFIGURATION")(e);case"role":return Routes.SYSTEM.AUTHZROLES.show(e);case"output":return Routes.SYSTEM.OUTPUTS;default:return Vd(r)}},sy=null,jd=e=>e===""?void 0:e,qd=(e,r)=>`grn::::${e}:${r}`,Yd=e=>{const r=e.split(":"),[s,n,o,l,d,g]=r.map(jd);return{resourceNameType:s,cluster:n,tenant:o,scope:l,type:d,id:g}},ny=e=>{const{id:r,type:s}=Yd(e);return getShowRouteForEntity(r,s)},hn=({children:e,id:r,type:s,hideChildren:n})=>{const o=kt(),d=`entity:own:${qd(s,r)}`,g="*";if(o){const{grnPermissions:h=[],permissions:v}=o,y=v.includes(g);if(h.includes(d)||y)return!n&&typeof e=="function"?t.createElement(t.Fragment,null,e({disabled:!1})," "):t.createElement(t.Fragment,null,"children")}return!n&&typeof e=="function"?t.createElement(t.Fragment,null,e({disabled:!0})," "):null};hn.propTypes={children:a().oneOfType([a().node,a().func]).isRequired,id:a().string,type:a().string.isRequired,hideChildren:a().bool},hn.defaultProps={hideChildren:!1,id:void 0};const Jd=hn,Xd=(0,m.default)(c.Popover)(({theme:e})=>m.css`
ul {
padding-left: 0;
}
li {
margin-bottom: 5px;
:last-child {
margin-bottom: 0;
}
}
h4 {
font-size: ${e.fonts.size.large};
}
`),Qd=(0,m.default)(pe.Z)(({theme:e,$type:r,$displayLeftMargin:s})=>m.css`
color: ${r==="error"?e.colors.variant.danger:"inherit"};
margin-left: ${s?"0.3em":0};
`),eu=e=>{switch(e){case"error":return"circle-exclamation";case"info":default:return"question-circle"}},fn=({children:e,className:r,displayLeftMargin:s,title:n,id:o,pullRight:l,placement:d,testId:g,type:h,iconSize:v,trigger:y})=>t.createElement(Hr.Z,{trigger:y,placement:d,overlay:t.createElement(Xd,{title:n,id:o},e),testId:g},t.createElement(Qd,{className:`${r} ${l?"pull-right":""}`,name:eu(h),$type:h,$displayLeftMargin:s,size:v}));fn.propTypes={displayLeftMargin:a().bool,children:a().any.isRequired,className:a().string,id:a().string,placement:a().oneOf(["top","right","bottom","left"]),pullRight:a().bool,title:a().string,testId:a().string,trigger:a().arrayOf(a().oneOf(["click","focus","hover"]))||a().oneOf(["click","focus","hover"])},fn.defaultProps={id:"help-popover",className:"",pullRight:!0,placement:"bottom",testId:void 0,title:void 0,type:"info",iconSize:void 0,trigger:["hover","focus"],displayLeftMargin:!1};const tu=fn;var ru=i("9oVghaOd"),lr=i.n(ru),ay=i("jswCRRRc");const vn={isValidDuration(e,r){return r(lr().duration(e).asMilliseconds(),e)},durationStyle(e,r,s){let n=s;return n||(n="error"),this.isValidDuration(e,r)?null:n},formatDuration(e,r,s){let n=s;return n||(n="error"),this.isValidDuration(e,r)?lr().duration(e).format():n},humanizeDuration(e,r,s){let n=s;return n||(n="error"),this.isValidDuration(e,r)?lr().duration(e).humanize():n}};var su=Object.defineProperty,nu=(e,r,s)=>r in e?su(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,En=(e,r,s)=>(nu(e,typeof r!="symbol"?r+"":r,s),s);class Co extends t.Component{constructor(r){super(r),En(this,"_onUpdate",()=>{let s=this.isoDuration.getValue().toUpperCase();s.startsWith("P")||(s=`P${s}`),this.setState({duration:s}),vn.isValidDuration(s,this.props.validator)&&this.props.update(s)}),this.state={duration:this.props.duration}}render(){return t.createElement(c.Input,{id:this.props.id,type:"text",ref:r=>{this.isoDuration=r},label:this.props.label,onChange:this._onUpdate,value:this.state.duration,help:this.props.help,addonAfter:vn.humanizeDuration(this.state.duration,this.props.validator,this.props.errorText),bsStyle:vn.durationStyle(this.state.duration,this.props.validator),autoFocus:this.props.autoFocus,required:this.props.required,disabled:this.props.disabled})}}En(Co,"propTypes",{id:a().string.isRequired,duration:a().string.isRequired,update:a().func.isRequired,label:a().string,help:a().string,validator:a().func,errorText:a().string,autoFocus:a().bool,required:a().bool,disabled:a().bool}),En(Co,"defaultProps",{label:"Duration",help:"as ISO8601 Duration",validator:()=>!0,errorText:"invalid",autoFocus:!1,required:!1,disabled:!1});const ly=null,au=(e,r,s)=>r?Ue(s.permissions,e):Ye(s.permissions,e),yn=({children:e,permissions:r,anyPermissions:s,...n})=>{const o=kt();return!r||r.length===0||o&&au(r,s,o)?t.createElement(t.Fragment,null,t.Children.map(e,l=>{if(t.isValidElement(l)){const d=l&&l.props?Object.keys(l.props):[],g=Object.entries(n).filter(h=>!d.includes(h[0])).reduce((h,[v,y])=>({...h,[v]:y}),{});return t.cloneElement(l,g)}return l})):null};yn.propTypes={children:a().node.isRequired,permissions:a().oneOfType([a().string,a().arrayOf(a().string)]).isRequired,anyPermissions:a().bool},yn.defaultProps={anyPermissions:!1};const ir=yn;var ou=i("Btg6k4SR");const lu=m.default.span(({theme:e})=>`
color: ${e.colors.gray[60]};
font-weight: normal;
`),iy=()=>React.createElement(lu,null,"(Opt.)"),cy=null;var iu=i("G1loatyd"),cu=i("pS0GGJuX");const du=e=>{const r=(0,m.useTheme)(),s={...r,colors:{...r.colors,primary:r.colors.input.borderFocus,primary75:r.colors.variant.light.default,primary50:r.colors.variant.lighter.default,primary25:r.colors.variant.lightest.default,danger:r.colors.variant.darker.info,dangerLight:r.colors.variant.lighter.info,neutral0:r.colors.input.background,neutral5:r.colors.input.backgroundDisabled,neutral10:r.colors.variant.lightest.info,neutral20:r.colors.input.border,neutral30:r.colors.gray[70],neutral40:r.colors.gray[60],neutral50:r.colors.gray[50],neutral60:r.colors.gray[40],neutral70:r.colors.gray[30],neutral80:r.colors.gray[20],neutral90:r.colors.gray[10]}};return{inputListTheme:s,styles:o=>({valueContainer:l=>({...l,padding:e==="small"?"0 8px":"2px 12px"}),control:(l,{isFocused:d})=>({...l,borderWidth:d?1:l.borderWidth,outline:d?0:l.outline,boxShadow:d?s.colors.input.boxShadow:null,...e==="small"?{minHeight:29,height:29}:{minHeight:34},borderRadius:cu.L$,alignItems:"center",borderColor:o?l.borderColor:s.colors.brand.primary}),placeHolder:l=>({...l,color:s.colors.input.placeholder,lineHeight:"28px",fontFamily:s.fonts.family.body,fontSize:s.fonts.size.body,fontWeight:400,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",maxWidth:"100%",paddingRight:"20px"}),multiValue:l=>({...l,border:`1px solid ${s.colors.variant.lighter.info}`}),multiValueLabel:l=>({...l,color:o?l.color:s.colors.brand.primary,padding:"2px 5px",fontSize:s.fonts.size.small}),multiValueRemove:l=>({...l,borderLeft:`1px solid ${s.colors.variant.lighter.info}`,paddingLeft:"5px",paddingRight:"5px",borderRadius:"0"})})}};class uu extends Event{set target(r){this._target=r}get target(){return this._target}set currentTarget(r){this._target=r}get currentTarget(){return this._target}preventDefault(){super.preventDefault(),this._defaultPrevented=!0}isDefaultPrevented(){return this._defaultPrevented}stopPropagation(){super.stopPropagation(),this._propagationStopped=!0}isPropagationStopped(){return this._propagationStopped}persist(){this._persisted=!0}}const bn=e=>({label:e,value:e}),pu=({name:e,values:r,onChange:s,label:n,size:o,bsStyle:l,error:d,help:g,...h})=>{const{inputListTheme:v,styles:y}=du(o),C=t.useRef(null),[R,T]=t.useState(""),[P,z]=t.useState(r.map(Y=>bn(Y)));t.useLayoutEffect(()=>z(r.map(Y=>bn(Y))),[r]);const X=Y=>{const ge=Y.map(_e=>_e.value),ae=new uu("change");C.current.value=ge,C.current.name=e,ae.target=C.current,s(ae)},se=Y=>{if(R&&(Y.key==="Enter"||Y.key==="Tab")){const ge=[...P,bn(R)];z(ge),X(ge),T(""),Y.preventDefault()}},oe=Y=>{z(Y),X(Y)};return t.createElement(c.FormGroup,{controlId:h.id?h.id:e,validationState:d?"error":l},n&&t.createElement(c.ControlLabel,null,n),t.createElement(iu.ZP,{ref:C,components:{DropdownIndicator:null},inputValue:R,isMulti:!0,menuIsOpen:!1,onChange:oe,onInputChange:Y=>T(Y),onKeyDown:se,value:P,styles:y(!d),theme:v,...h}),t.createElement(ou.Z,{error:d,help:g}))};pu.defaultProps={label:null,size:"normal",bsStyle:null,error:null,help:null};const uy=null,py=null;var mu=i("A028iK/c"),gu=i("+V9FPWJ/"),_n=i.n(gu);const Wr={width:450,height:400},hu=Math.ceil(window.innerWidth/2-Wr.width/2),So=Math.ceil(window.innerHeight/2-Wr.height/2),fu=So<0?55:So,vu={x:hu,y:fu},Eu=m.default.div`
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1030;
pointer-events: none;
`,yu=(0,m.default)(mu.s)(({theme:e})=>m.css`
box-shadow: 0 0 9px ${e.colors.global.navigationBoxShadow},
0 0 6px ${e.colors.global.navigationBoxShadow},
0 0 3px ${e.colors.global.navigationBoxShadow};
background-color: ${e.colors.global.contentBackground};
border: 1px solid ${e.colors.variant.lightest.default};
border-radius: 3px;
flex-direction: column;
display: flex !important;
pointer-events: auto;
`),bu=m.default.div`
flex: 1;
padding: 0 15px;
`,_u=m.default.header(({theme:e})=>m.css`
padding: 6px 12px 9px;
display: flex;
align-items: center;
background-color: ${e.colors.variant.lightest.default};
border-bottom: 1px solid ${e.colors.variant.lighter.default};
border-top-left-radius: 3px;
border-top-right-radius: 3px;
cursor: move;
`),Cu=m.default.h3(({theme:e})=>m.css`
color: ${e.colors.global.textDefault};
flex: 1;
`),Su=(0,m.default)(pe.Z)(({theme:e})=>m.css`
color: ${e.colors.variant.darker.default};
margin-right: 9px;
`),Tu=(0,m.default)(c.Button)(({theme:e})=>m.css`
&& {
color: ${e.colors.variant.light.default};
:hover {
color: ${e.colors.variant.default};
}
}
`),To=({children:e,className:r,minHeight:s,minWidth:n,onClose:o,onDrag:l,onResize:d,position:g,size:h,title:v,wrapperClassName:y})=>{const C=(0,t.useRef)(null),[R,T]=(0,t.useState)(null),[P,z]=(0,t.useState)(g),[X,se]=(0,t.useState)(h),oe=(ae,{x:_e,y:q})=>{z({x:_e,y:q}),l({x:_e,y:q})},Y=(ae,_e,q)=>{const J={width:q.style.width,height:q.style.height};let Q={...P};switch(_e){case"left":case"topLeft":case"top":Q={x:P.x-(parseFloat(q.style.width)-parseFloat(X.width)),y:P.y-(parseFloat(q.style.height)-parseFloat(X.height))};break;case"bottomLeft":Q={x:P.x-(parseFloat(q.style.width)-parseFloat(X.width)),y:P.y};break;case"topRight":Q={x:P.x,y:P.y-(parseFloat(q.style.height)-parseFloat(X.height))};break;default:break}se(J),d(J),oe(null,Q)},ge=_n()(()=>{const{x:ae,y:_e}=P,{width:q,height:J}=X,{innerWidth:Q,innerHeight:be}=window,re={top:0,bottom:parseFloat(J),left:0,right:parseFloat(q)},ce={},Te=Q-re.right,nt=be-re.bottom;ce.x=Math.max(Math.min(Te,ae),re.left),ce.y=Math.max(Math.min(nt,_e),re.top),oe(null,ce)},150);return(0,t.useEffect)(()=>{T(C.current.classList[0])},[]),(0,t.useEffect)(()=>(window.addEventListener("resize",ge,!1),()=>{window.removeEventListener("resize",ge)}),[P,ge]),t.createElement(Eu,{className:y,role:"dialog"},t.createElement(yu,{default:{...g,...h},minHeight:s,minWidth:n,maxHeight:window.innerHeight,maxWidth:window.innerWidth,dragHandleClassName:R,onDragStop:oe,onResizeStop:Y,position:P,size:X,className:r,bounds:"window"},t.createElement(_u,{ref:C},t.createElement(Cu,null,t.createElement(Su,{name:"bars"}),v),t.createElement(Tu,{bsStyle:"link",onClick:o,bsSize:"small",title:"Close"},t.createElement(pe.Z,{name:"times",size:"lg"}))),t.createElement(bu,null,e)))};To.propTypes={className:a().string,children:a().node.isRequired,minHeight:a().number,minWidth:a().number,onClose:a().func,onDrag:a().func,onResize:a().func,position:a().shape({x:a().number,y:a().number}),size:a().shape({height:a().oneOfType([a().string,a().number]),width:a().oneOfType([a().string,a().number])}),title:a().string,wrapperClassName:a().string},To.defaultProps={className:void 0,minHeight:Wr.height,minWidth:Wr.width,onClose:()=>{},onDrag:()=>{},onResize:()=>{},position:vu,size:Wr,title:"",wrapperClassName:void 0};const my=null;var wu=Object.defineProperty,Au=(e,r,s)=>r in e?wu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Ss=(e,r,s)=>(Au(e,typeof r!="symbol"?r+"":r,s),s);const Kr=[{value:"STRING",label:"string"},{value:"NUMBER",label:"number"},{value:"OBJECT",label:"object"},{value:"ARRAY",label:"array"},{value:"BOOLEAN",label:"boolean"},{value:"NULL",label:"null"}];class wo extends t.Component{constructor(r){super(r),Ss(this,"_computeInitialState",()=>({value:this.props.value,valueType:this.props.valueType})),Ss(this,"_propagateState",()=>{this.props.update(this.state.value,this.state.valueType)}),Ss(this,"_onUpdate",s=>{const{value:n}=s.target;this.setState({value:n},this._propagateState)}),Ss(this,"_onValueTypeSelect",s=>{this.setState({valueType:s},this._propagateState)}),this.state=this._computeInitialState()}UNSAFE_componentWillReceiveProps(){this.setState(this._computeInitialState())}render(){const r=Kr.filter(s=>this.props.allowedTypes.indexOf(s.value)>-1).map(s=>t.createElement(c.MenuItem,{key:s.value,onSelect:()=>this._onValueTypeSelect(s.value)},s.label));return t.createElement(c.FormGroup,{validationState:this.props.validationState},this.props.label&&t.createElement(c.ControlLabel,{className:this.props.labelClassName},this.props.label),t.createElement(c.InputWrapper,{className:this.props.wrapperClassName},t.createElement(c.InputGroup,null,t.createElement(c.FormControl,{type:"text",onChange:this._onUpdate,onBlur:this.props.onBlur,value:this.state.value,required:this.props.required}),t.createElement(c.DropdownButton,{componentClass:c.InputGroup.Button,id:"input-dropdown-addon",bsStyle:this.props.validationState==="error"?"danger":"default",title:Kr.filter(s=>s.value===this.props.valueType)[0].label},r)),this.props.help&&t.createElement(c.HelpBlock,null,this.props.help)))}}wo.propTypes={update:a().func.isRequired,onBlur:a().func,label:a().string,help:a().oneOfType([a().string,a().object]),required:a().bool,validationState:a().string,value:a().string,valueType:a().oneOf(Kr.map(e=>e.value)),allowedTypes:(e,r,s)=>{const n=Kr.map(l=>l.value),o=[];return e[r]instanceof Array?(e[r].forEach(l=>{n.indexOf(l)<0&&o.push(l)}),o.length>0?new Error(`Invalid prop ${r} supplied to ${s}. Expected array of ${n} but got invalid ${o}`):null):new Error(`Invalid prop ${r} supplied to ${s}. Expected an array but got ${e[r]}`)},labelClassName:a().string,wrapperClassName:a().string},wo.defaultProps={value:"",valueType:"STRING",allowedTypes:Kr.map(e=>e.value),label:"",help:"",required:!1,validationState:null,labelClassName:void 0,wrapperClassName:void 0,onBlur:void 0};const gy=null;var hy=i("lK/ETmc5");const Ao=(e,r)=>Object.entries(e).forEach(([s,n])=>r(s,n)),fy=({children:e,shortcuts:r})=>(useEffect(()=>(Ao(r,(s,n)=>Mousetrap.bind(s,n)),()=>{Ao(r,s=>Mousetrap.unbind(s))}),[r]),e||null),vy=null,Se={clone(e){return JSON.parse(JSON.stringify(e))},isEmpty(e){const r=Object.keys(e);return r&&r.length===0},trimObjectFields(e,r){const s={...e};return r.length>0&&r.forEach(n=>{n in e&&typeof e[n]=="string"&&(s[n]=e[n].trim())}),s}};var Ru=Object.defineProperty,xu=(e,r,s)=>r in e?Ru(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Xt=(e,r,s)=>(xu(e,typeof r!="symbol"?r+"":r,s),s);const Ro=m.default.div`
.form-group {
margin-left: 0;
margin-right: 0;
}
`;class xo extends t.Component{constructor(r){super(r),Xt(this,"_onPairsChange",s=>{this.props.onChange&&this.props.onChange(s)}),Xt(this,"_bindValue",s=>{const n={};n[s.target.name]=s.target.value,this.setState(n)}),Xt(this,"_addRow",()=>{const s=Se.clone(this.props.pairs);s[this.state.newKey]=this.state.newValue,this._onPairsChange(s),this.setState({newKey:"",newValue:""})}),Xt(this,"_deleteRow",s=>()=>{if(window.confirm(`Are you sure you want to delete property '${s}'?`)){const n=Se.clone(this.props.pairs);delete n[s],this._onPairsChange(n)}}),Xt(this,"_formattedHeaders",s=>t.createElement("tr",null,s.map((n,o)=>{const l={};if(o===s.length-1){if(!this.props.editable)return null;l.width=75}return t.createElement("th",{key:n,style:l},n)}))),Xt(this,"_formattedRows",s=>Object.keys(s).sort().map(n=>{let o;if(this.props.editable){const l=[];l.push(t.createElement(c.Button,{key:`delete-${n}`,bsStyle:"danger",bsSize:this.props.actionsSize,onClick:this._deleteRow(n)},"Delete")),o=t.createElement("td",null,l)}return t.createElement("tr",{key:n},t.createElement("td",null,n),t.createElement("td",null,s[n]),o)})),Xt(this,"_newRow",()=>{if(!this.props.editable)return null;const s=!this.state.newKey||!this.state.newValue;return t.createElement("tr",null,t.createElement("td",null,t.createElement(Ro,null,t.createElement(c.Input,{type:"text",name:"newKey",id:"newKey","data-testid":"newKey",bsSize:"small",placeholder:this.props.headers[0],value:this.state.newKey,onChange:this._bindValue}))),t.createElement("td",null,t.createElement(Ro,null,t.createElement(c.Input,{type:"text",name:"newValue",id:"newValue","data-testid":"newValue",bsSize:"small",placeholder:this.props.headers[1],value:this.state.newValue,onChange:this._bindValue}))),t.createElement("td",null,t.createElement(c.Button,{bsStyle:"success",bsSize:"small",onClick:this._addRow,disabled:s},"Add")))}),this.state={newKey:"",newValue:""}}render(){return t.createElement("div",{className:"key-value-table-component"},t.createElement("div",{className:`table-responsive ${this.props.containerClassName}`},t.createElement(c.Table,{className:`table table-striped ${this.props.className}`},t.createElement("thead",null,this._formattedHeaders(this.props.headers)),t.createElement("tbody",null,this._formattedRows(this.props.pairs),this._newRow()))))}}Xt(xo,"propTypes",{pairs:a().object.isRequired,headers:a().array,editable:a().bool,onChange:a().func,className:a().string,containerClassName:a().string,actionsSize:a().oneOf(["large","medium","small","xsmall"])}),xo.defaultProps={headers:["Name","Value","Actions"],editable:!1,actionsSize:"xsmall",className:"",containerClassName:"",onChange:()=>{}};const yy=null,Pu=({to:e,target:r,onClick:s,...n})=>{const o=(0,Z.useNavigate)(),l=(0,t.useCallback)(d=>{r==="_self"?o(e):window.open(e,r),s&&s(d)},[r,s,o,e]);return t.createElement(c.Button,{onClick:l,...n})};Pu.defaultProps={target:"_self"};const by=null;var Ts=i("KtULIsGV");const Iu=["Button","NavItem"],Du=e=>String(e).split(/[?#]/)[0],Mu=(e,r,s,n,o)=>{const l=Du(r),d=o?e.startsWith(l):l===e;return Iu.includes(n)&&d?`active ${s!=null?s:""}`:s},Lu=e=>e.button===0,Ou=e=>!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey),Po=({children:e,onClick:r,to:s,relativeActive:n,...o})=>{const{pathname:l}=(0,Z.useLocation)(),{props:{onClick:d,className:g,disabled:h},type:{displayName:v}}=t.Children.only(e),y=typeof s=="object"&&"pathname"in s?s.pathname:s,C=(0,t.useMemo)(()=>Mu(l,y,g,v,n),[l,y,g,v,n]),R=(0,Ts.gs)(y),T=(0,t.useCallback)(P=>{!Lu(P)||Ou(P)||h||(P.preventDefault(),P.stopPropagation(),d&&d(),r&&r(),h||R(P))},[h,d,r,R]);return t.cloneElement(t.Children.only(e),{...o,className:C,onClick:T,disabled:!!h,href:h?void 0:y})};Po.defaultProps={relativeActive:!1};const Nu=({children:e,...r})=>le.Z.isCloud()?t.createElement(t.Fragment,null):t.Children.map(e,s=>t.isValidElement(s)?t.cloneElement(s,r):s);var $u=i("JnTtTRmZ"),Ce=i.n($u),U=i("ekPuBHq5"),O=i("9QUCfm+a"),ie=i("NhE/kDWp"),Cn=i("86K41z9a");const Sn=(0,ve.ei)("core.Nodes",()=>Ce().createActions({list:{asyncResult:!0}})),zu=(0,ve.dS)("core.Nodes",()=>Ce().createStore({listenables:[Sn],nodes:void 0,clusterId:void 0,nodeCount:0,INTERVAL:5e3,promises:{},init(){this.nodes===void 0&&(this._triggerList(),setInterval(this._triggerList,this.INTERVAL))},_triggerList(){Cn.SessionStore.isLoggedIn()&&Sn.list()},getInitialState(){return this.getNodesInfo()},getNodesInfo(){return{nodes:this.nodes,clusterId:this.clusterId,nodeCount:this.nodeCount}},list(){const e=this.promises.list||(0,O.vl)("GET",(0,U.DC)(ie.Z.ClusterApiResource.list().url)).then(r=>(this.nodes={},r.nodes&&(this.nodes=r.nodes.map(s=>[s.node_id,s]).reduce((s,[n,o])=>({...s,[n]:o}),{}),this.clusterId=this._clusterId(),this.nodeCount=this._nodeCount(),this._propagateState()),r)).finally(()=>delete this.promises.list);this.promises.list=e,Sn.list.promise(e)},getNode(e){var r;return(r=this.nodes)==null?void 0:r[e]},_clusterId(){const e=Object.keys(this.nodes).map(r=>this.nodes[r]).find(r=>r.cluster_id);return e?e.cluster_id.toUpperCase():void 0},_nodeCount(){return Object.keys(this.nodes).length},_propagateState(){this.trigger(this.getNodesInfo())}}));var Uu=i("oDdu0vts"),Tn=i.n(Uu),Bu=i("ZtpRma/a"),Io=i.n(Bu),Fu=i("LLNBJPkI"),Zu=i.n(Fu);const Do=(e,r)=>e&&e[r]&&Tn()(e[r]),ku=e=>Do(e,"equals"),Mo=e=>Do(e,"toJS"),Lo=(e,r)=>{if(Mo(e)&&Mo(r))return Io()(e.toJS(),r.toJS(),Lo);if(ku(e))return e.equals(r);if((0,t.isValidElement)(e)||(0,t.isValidElement)(r))return Zu()(e,r)},wn=(e,r)=>Io()(e,r,Lo),Wu=e=>e;function Ku(e,r=Wu){const[s,n]=(0,t.useState)(()=>e.getInitialState()),o=(0,t.useRef)(s),l=(0,t.useMemo)(()=>r(s),[r,s]);return(0,t.useEffect)(()=>{const d=e.listen(g=>{wn(g,o.current)||(n(g),o.current=g)});return n(e.getInitialState()),d},[e]),l}function Hu(e,r,s=n=>n){const n=e.displayName||e.name||"Unknown/Anonymous";class o extends t.Component{constructor(d){super(d),this._genProps=h=>{const v={};return Object.keys(r).forEach(y=>{v[y]=h[y]}),s(v)};const g=Object.keys(r).map(h=>{const v=r[h];if(v===void 0||!Tn()(v.getInitialState))return console.error(`Error: The store passed for the \`${h}\` property is not defined or invalid. Check the connect()-call wrapping your \`${n}\` component.`),[h,void 0];const y=v.getInitialState();return[h,y]}).reduce((h,[v,y])=>({...h,[v]:y}),{});this.state={...this.state,...g}}componentDidMount(){this.unsubscribes=Object.keys(r).map(d=>{const g=r[d];return g===void 0||!Tn()(g.listen)?(console.error(`Error: The store passed for the \`${d}\` property is not defined or invalid. Check the connect()-call wrapping your \`${n}\` component.`),()=>{}):g.listen(h=>this.setState(v=>({...v,[d]:h})))})}shouldComponentUpdate(d,g){const h=this._genProps(this.state),v=this._genProps(g);return!(wn(h,v)&&wn(this.props,d))}componentWillUnmount(){this.unsubscribes.forEach(d=>d())}render(){const d=this._genProps(this.state),{ref:g,...h}=this.props;return t.createElement(e,{...d,...h})}}return o.displayName=`ConnectStoresWrapper[${n}] stores=${Object.keys(r).join(",")}`,o}const ws=Hu;var Gu=Object.defineProperty,Vu=(e,r,s)=>r in e?Gu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,ju=(e,r,s)=>(Vu(e,typeof r!="symbol"?r+"":r,s),s);class An extends t.PureComponent{render(){const{nodes:r}=this.props;if(!r)return t.createElement(st.Z,null);const s=r[this.props.nodeId];if(s){const n=s.is_leader?"star":"code-branch",o=s.is_leader?"leader-node":"",l=s.is_leader?"This is the leader node in the cluster":"",d=t.createElement(t.Fragment,null,t.createElement(pe.Z,{name:n,className:o,title:l})," ",s.short_node_id,t.createElement(Nu,null," / ",s.hostname));return le.Z.isCloud()?d:t.createElement(Ts.rU,{to:Ze.SYSTEM.NODES.SHOW(this.props.nodeId)},d)}return t.createElement("i",null,"Unknown Node")}}ju(An,"propTypes",{nodeId:a().string.isRequired,nodes:a().object}),An.defaultProps={nodes:void 0};const Sy=ws(An,{nodeStore:zu},({nodeStore:e,...r})=>({...r,nodes:e.nodes})),qu=m.default.div`
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
`,Ty=({count:e,listing:r})=>React.createElement(qu,{title:String(r)},React.createElement(CountBadge,null,e)," ",r),wy=null;var Yu=i("cB3oI9m5");const Ju=(0,m.default)(c.Alert)`
position: fixed;
height: 32px;
min-width: 200px;
top: 60px;
left: 50%;
transform: translateX(-50%);
padding: 5px 20px;
text-align: center;
box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
z-index: 2000;
`,Oo=({text:e})=>t.createElement(Yu.Z,{delay:500},t.createElement(Ju,{bsStyle:"info"},t.createElement(st.Z,{delay:0,text:e})));Oo.propTypes={text:a().string},Oo.defaultProps={text:"Loading..."};const Ay=null;var Xu=i("D4SbLiE/"),Be=i.n(Xu),We=i("V7hwd7tl");const Rn=(0,ve.dS)("core.System",()=>Ce().createStore({system:void 0,locales:void 0,init(){this.info().then(e=>{this.trigger({system:e}),this.system=e}),this.systemLocales().then(e=>{this.trigger({locales:e}),this.locales=e.locales})},getInitialState(){return{system:this.system,locales:this.locales}},info(){const e=U.DC(ie.Z.SystemApiController.info().url);return(0,O.ZP)("GET",e)},jvm(){const e=U.DC(ie.Z.SystemApiController.jvm().url);return(0,O.ZP)("GET",e)},systemLocales(){const e=U.DC(ie.Z.SystemApiController.locales().url);return(0,O.ZP)("GET",e)},elasticsearchVersion(){const e=U.DC(ie.Z.ClusterApiResource.elasticsearchStats().url);return new Promise((s,n)=>{(0,O.ZP)("GET",e).then(o=>{const l=o.cluster_version.split(".");s({major:l[0],minor:l[1],patch:l[2]})}).catch(n)})}})),Ry=Be()({displayName:"LocaleSelect",mixins:[Ce().connect(Rn)],propTypes:{onChange:a().func},getValue(){return this.locale.getValue()},_formatLocales(e){const r=Object.values(e).filter(s=>s.language_tag!=="und").map(s=>({value:s.language_tag,label:s.display_name})).sort((s,n)=>{const o=s.label.toUpperCase(),l=n.label.toUpperCase();return ol?1:0});return[{value:"und",label:"Default locale"}].concat(r)},_renderOption(e){return t.createElement("span",{key:e.value,title:"{option.value} [{option.value}]"},e.label," [",e.value,"]")},render(){if(!this.state.locales)return t.createElement(Spinner,null);const e=this._formatLocales(this.state.locales);return t.createElement(We.Z,{ref:r=>{this.locale=r},...this.props,placeholder:"Pick a locale",options:e,optionRenderer:this._renderOption})}}),xy=null;var Py=i("OMslc0Et"),Iy=i("R8P0WRGn");const Dy=({text:e})=>{const r=useMemo(()=>DOMPurify.sanitize(marked(e!=null?e:"")),[e]);return React.createElement("div",{dangerouslySetInnerHTML:{__html:r}})},My=null,No=m.default.dl(({theme:e})=>m.css`
margin-top: 10px;
margin-bottom: 0;
dt {
font-weight: bold;
margin-left: 1px;
}
dd {
margin-bottom: 5px;
padding-bottom: 5px;
margin-left: 1px; /* Ensures that italic text is not cut */
&.stream-list ul {
list-style-type: disc;
padding-left: 25px;
li {
margin-top: 3px;
}
}
div.message-field-actions {
padding-left: 10px;
position: relative;
top: -10px;
}
}
&.message-details-fields span:not(:last-child) dd {
border-bottom: 1px solid ${e.colors.gray[90]};
}
&.message-details-fields dd {
white-space: pre-wrap;
}
&.message-details-fields .field-value {
font-family: ${e.fonts.family.monospace};
}
&.message-details-fields dd.message-field .field-value {
max-height: 500px;
overflow: auto;
}
`);class $o extends t.Component{constructor(){super(...arguments),this._select=void 0,this.getValue=()=>this._select.getValue()}render(){return t.createElement(We.Z,{ref:r=>{this._select=r},multi:!0,...this.props})}}$o.propTypes=We.Z.propTypes;const zo=$o;var Hr=i("Tp/aLhHF"),Qu=Object.defineProperty,ep=(e,r,s)=>r in e?Qu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Uo=(e,r,s)=>(ep(e,typeof r!="symbol"?r+"":r,s),s);class xn extends t.Component{render(){const{overlay:r,useOverlay:s,placement:n,trigger:o,className:l,children:d}=this.props;return r&&s?t.createElement(Hr.Z,{placement:n,trigger:o,overlay:r,rootClose:!0,className:l},t.createElement("span",null,d)):this.props.children}}Uo(xn,"propTypes",{overlay:a().element,placement:a().oneOf(["top","bottom","right","left"]),trigger:a().oneOfType([a().oneOf(["click","hover","focus"]),a().arrayOf(a().oneOf(["click","hover","focus"]))]),useOverlay:a().bool,children:a().oneOfType([a().arrayOf(a().element),a().element]).isRequired,className:a().string}),Uo(xn,"defaultProps",{overlay:void 0,placement:void 0,trigger:void 0,useOverlay:void 0,className:void 0});const Gr=xn,tp=i.p+"a991861284654f43baeb.jpg",rp=e=>(0,t.useMemo)(()=>p.G.exports(e),[e]);var sp=i("o7GEe6Qe");const np=m.default.div`
display: flex;
align-items: center;
`,ap=m.default.p`
flex: 1;
margin: 0;
font-weight: bold;
`,op=m.default.div(({$visible:e})=>m.css`
white-space: pre-wrap;
display: ${e?"block":"none"};
padding-top: 12px;
`),lp=(0,m.default)(sp.Z)`
margin-bottom: 6px;
padding-right: 9px;
&.alert-dismissable .close {
right: 12px;
}
`,ip=m.default.div`
width: 90%;
margin: 0 auto 15px;
`,cp={usePublicNotifications:()=>({notifications:void 0,dismissedNotifications:void 0,onDismissPublicNotification:void 0})},Pn=({readFromConfig:e})=>{var r;const s=rp("customization.publicNotifications"),{usePublicNotifications:n}=((r=s[0])==null?void 0:r.hooks)||cp,[o,l]=(0,t.useState)(void 0),{notifications:d,dismissedNotifications:g,onDismissPublicNotification:h}=n(),v=e?le.Z.publicNotifications():d;if(!v&&!g&&!h)return null;const y=Object.keys(v).map(C=>{if(g!=null&&g.has(C))return null;const R=()=>{l(o?void 0:C)},T=v[C],{variant:P,hiddenTitle:z,isActive:X,isDismissible:se,title:oe,shortMessage:Y,longMessage:ge}=T;if(!X)return null;const ae=()=>h(C);return t.createElement(lp,{bsStyle:P,onDismiss:se?ae:void 0,key:oe},!z&&t.createElement("h3",null,oe),t.createElement(np,null,t.createElement(ap,null,Y),ge&&t.createElement(Cs.Z,{bsStyle:"link",onClick:R},"Read ",o===C?"Less":"More")),ge&&t.createElement(op,{$visible:o===C},ge))}).filter(C=>C);return y.length?t.createElement(ip,null,y):null};Pn.propTypes={readFromConfig:a().bool},Pn.defaultProps={readFromConfig:!1};const dp=Pn,up=()=>{const e=p.G.exports("globalNotifications").map(r=>{if(!r.component)return console.error('Missing "component" for globalNotification plugin:',r),null;const s=r.component;return r.key||console.warn('Missing "key" for globalNotification plugin:',r),t.createElement(s,{key:r.key})}).filter(r=>!!r);return t.createElement(t.Fragment,null,e)},Bo=({children:e})=>t.createElement(t.Fragment,null,t.createElement(up,null),t.createElement(dp,null),e);Bo.propTypes={children:a().oneOfType([a().arrayOf(a().element),a().element]).isRequired};const pp=Bo,mp={i8:"5.1.9"},gp=/(?\d+)\.(?\d+)\.(?\d+)(-(?[\w.\d]+))?(\+(?\w+))?/,Fo=mp.i8,Zo=(e=Fo)=>{const r=gp.exec(e);if(!r||!r.groups){console.error("Failed to parse version",e);return}const s=r.groups;return{major:s==null?void 0:s.major,minor:s==null?void 0:s.minor,patch:s==null?void 0:s.patch,preRelease:s==null?void 0:s.preRelease,buildMetadata:s==null?void 0:s.buildMetadata}},In=()=>Fo,zy={parseVersion:Zo,getMajorAndMinorVersion:()=>{const e=Zo();if(!e)return In();const{major:r,minor:s}=e;return`${r}.${s}`},getFullVersion:In},Dn=({system:e})=>{const[r,s]=(0,t.useState)();return(0,t.useEffect)(()=>{let n=!0;return Rn.jvm().then(o=>{n&&s(o)}),()=>{n=!1}},[]),e&&r?t.createElement(t.Fragment,null,"Graylog ",e.version," on ",e.hostname," (",r.info,")"):t.createElement(t.Fragment,null,"Graylog ",In())};Dn.propTypes={system:a().shape({version:a().string,hostname:a().string})},Dn.defaultProps={system:void 0};const hp=ws(Dn,{system:Rn},({system:{system:e}={system:void 0}})=>({system:e})),ko=m.default.footer(({theme:e})=>m.css`
text-align: center;
font-size: ${e.fonts.size.small};
color: ${e.colors.gray[70]};
height: 20px;
/* This combination of padding and box-sizing is required to fix a firefox flexbox bug */
box-sizing: content-box;
padding-bottom: ${e.spacings.sm};
@media print {
display: none;
}
`),Wo=()=>{const e=p.G.exports("pageFooter");if(e.length===1){const r=e[0].component;return t.createElement(ko,null,t.createElement(r,null))}return t.createElement(ko,null,t.createElement(hp,null))};Wo.propTypes={};const fp=Wo,vp=m.default.div(({theme:e})=>`
display: flex;
flex-direction: column;
overflow: auto;
height: 100%;
width: 100%;
/* Bottom gap is defined by the footer */
padding: ${e.spacings.sm} ${e.spacings.sm} 0 ${e.spacings.sm};
`),Ep=(0,m.default)(c.Grid)`
width: 100%;
flex: 1;
margin-bottom: 10px;
`,Mn=({children:e,className:r})=>t.createElement(vp,{className:r},t.createElement(pp,null,t.createElement(Ep,{fluid:!0,className:"page-content-grid"},e||t.createElement(Z.Outlet,null)),t.createElement(fp,null)));Mn.propTypes={children:a().node,className:a().string},Mn.defaultProps={children:void 0,className:void 0};const yp=Mn,bp=m.default.h1(({theme:e})=>m.css`
font-size: ${e.fonts.size.extraLarge};
margin-bottom: 15px;
`),_p=(0,m.default)(c.Row)`
height: 82vh;
`,Cp=(0,m.default)(c.Jumbotron)(({theme:e})=>m.css`
background-color: ${Ar()(e.colors.global.contentBackground).alpha(.8).css()};
text-align: center;
`),Ko=({children:e,title:r})=>t.createElement(_p,null,t.createElement(c.Col,{mdOffset:2,md:8},t.createElement(Cp,null,t.createElement(bp,null,r),e)));Ko.propTypes={children:a().node.isRequired,title:a().string.isRequired};const Sp=Ko,Tp=()=>m.css`
body {
background: url(${({backgroundImage:e})=>e}) no-repeat center center fixed;
background-size: cover;
}
`,wp=m.default.div(({theme:e})=>m.css`
margin-left: auto;
margin-right: auto;
text-align: left;
dt {
font-size: ${e.fonts.size.body};
font-weight: normal;
overflow: auto;
}
p {
font-size: inherit;
}
`),Ap=m.createGlobalStyle`
${Tp()}
`,Ln=({children:e,title:r,description:s,backgroundImage:n,displayPageLayout:o})=>{const l=o?yp:t.Fragment;return t.createElement(Pt,{title:r},t.createElement(l,null,t.createElement(Ap,{backgroundImage:n}),t.createElement(Sp,{title:r},s,e&&t.createElement(wp,null,e))))};Ln.propTypes={children:a().node,description:a().node.isRequired,displayPageLayout:a().bool,title:a().string.isRequired,backgroundImage:a().string},Ln.defaultProps={children:void 0,displayPageLayout:!0,backgroundImage:tp};const Rp=Ln,xp=({errors:e})=>{const r=e?e.map(n=>t.createElement("li",{key:`key-${n.toString()}`},n.toString())):[],s=t.createElement("p",null,"We had trouble fetching some data required to build this page, so here is a picture instead.");return t.createElement(Rp,{title:"Error getting data",description:s,displayPageLayout:!1},t.createElement("ul",null,r,t.createElement("li",null,"Check your Graylog logs for more information.")))};xp.propTypes={errors:a().array.isRequired};const Uy=null;var Pp=i("VYuQb9st"),Ip=i.n(Pp);const Dp=m.default.div`
display: flex;
gap: 3px;
flex-direction: column;
`,Ho=m.default.div(({theme:e})=>m.css`
display: flex;
justify-content: space-between;
gap: 5px;
@media (max-width: ${e.breakpoints.max.md}) {
flex-wrap: wrap;
}
`),Mp=m.default.span(({theme:e})=>m.css`
cursor: help;
margin-left: 5px;
font-size: ${e.fonts.size.body};
line-height: 20px;
vertical-align: text-top;
`),Lp=m.default.div(({$hasMultipleChildren:e})=>m.css`
display: flex;
gap: 10px;
align-items: ${e?"center":"flex-start"};
`),Op=m.default.div`
display: flex !important;
align-items: flex-end;
.btn-toolbar {
display: flex;
}
`,Np=m.default.p`
&&&& {
margin-top: 0;
}
`,Go={experimental:"This Graylog feature is new and should be considered experimental.",legacy:"This feature has been discontinued and will be removed in a future Graylog version."},$p=({lifecycle:e,lifecycleMessage:r})=>{if(e===void 0)return null;const s=Ip()(e),n=e==="experimental"?Go.experimental:Go.legacy,o=t.createElement(c.Tooltip,{id:e},r||n);return t.createElement(Mp,null,t.createElement(Hr.Z,{placement:"bottom",overlay:o},t.createElement(c.Label,{bsStyle:"primary"},s)))},On=({children:e,subpage:r,title:s,actions:n,topActions:o,lifecycle:l,lifecycleMessage:d,documentationLink:g})=>{const h=r?"":"content";return t.createElement(pc,{className:h},t.createElement(c.Col,{sm:12},t.createElement(Dp,null,t.createElement(Ho,null,t.createElement("h1",null,s," ",t.createElement("small",null,t.createElement($p,{lifecycle:l,lifecycleMessage:d}))),(g||o)&&t.createElement(Lp,{$hasMultipleChildren:!!g&&!!o},g&&t.createElement(ro,{text:g.title,page:g.path,displayIcon:!0}),o)),t.createElement(Ho,null,e&&t.createElement(Np,{className:"description no-bm"},e),n&&t.createElement(Op,null,n)))))};On.propTypes={title:a().node.isRequired,children:a().node,actions:a().node,lifecycle:a().oneOf(["experimental","legacy"]),lifecycleMessage:a().node,subpage:a().bool,documentationLink:a().object},On.defaultProps={children:[],lifecycle:void 0,lifecycleMessage:void 0,topActions:void 0,actions:void 0,subpage:!1,documentationLink:void 0};const Mt=On;var zp=i("bcEkMz+H"),Up=i.n(zp);const Bp=()=>{const{search:e}=(0,Z.useLocation)();return(0,t.useMemo)(()=>Up().parse(e,{ignoreQueryPrefix:!0}),[e])},Vo=1,Vr=[10,20,50,100],Fp=(e=Vr,r=Vr[0],s=!0)=>{const{page:n,pageSize:o}=Bp(),l=(0,Z.useNavigate)(),{search:d,pathname:g}=(0,Z.useLocation)(),h=g+d,v=Number(n),y=Number.isInteger(v)&&v>0?v:Vo,C=Number(o),T=(()=>s&&Number.isInteger(C)&&e!=null&&e.includes(C)?C:r)(),P=(0,t.useCallback)(({page:X=y,pageSize:se=T})=>{const oe=new(Dt())(h).setSearch({page:X,pageSize:s?String(se):void 0});l(oe.toString())},[l,y,T,h,s]),z=(0,t.useCallback)(()=>{P({page:Vo})},[P]);return{page:y,resetPage:z,pageSize:T,setPagination:P}},Zp=(0,m.default)(c.DropdownButton)`
~ .dropdown-menu {
min-width: auto;
}
`,kp=m.default.div`
display: flex;
align-items: center;
gap: 3px;
`,Nn=({pageSizes:e,pageSize:r,onChange:s,className:n,showLabel:o})=>{const l=t.createElement(Zp,{className:n,id:"page-size-select",title:`${r} Rows`,"aria-label":"Configure page size",pullRight:!0,bsSize:"small",bsStyle:"default"},e.map(d=>t.createElement(c.MenuItem,{key:`option-${d}`,onSelect:()=>s(d)},d)));return o?t.createElement(kp,{className:n},"Show",l):l};Nn.propTypes={className:a().string,onChange:a().func.isRequired,pageSize:a().number.isRequired,pageSizes:a().arrayOf(a().number),showLabel:a().bool},Nn.defaultProps={className:"",pageSizes:Vr,showLabel:!0};const jo=Nn,Wp=t.createContext(!0),Kp=(0,ve.ri)("views.components.contexts.InteractiveContext",()=>Wp),Hp=({children:e})=>t.createElement(Kp.Consumer,null,r=>r?e:null);var cr=i("aKyEWaw1"),dr=i("7QYyHavS");const Gp=(0,m.default)(cr.Pagination)(({theme:e})=>m.css`
&.pagination {
font-size: ${e.fonts.size.small};
margin-top: 10px;
margin-bottom: 0;
> li {
> a,
> span {
color: ${e.utils.contrastingColor(e.colors.global.contentBackground)};
background-color: ${e.colors.global.contentBackground};
border-color: ${e.colors.variant.light.default};
border-radius: 0;
&:hover,
&:focus {
color: ${e.utils.contrastingColor(e.colors.variant.lighter.default)};
background-color: ${e.colors.variant.lighter.default};
border-color: ${e.colors.variant.light.default};
}
}
&.active > a,
&.active > span {
&,
&:hover,
&:focus {
color: ${e.utils.contrastingColor(e.colors.variant.lightest.info)};
background-color: ${e.colors.variant.lightest.info};
border-color: ${e.colors.variant.lighter.info};
z-index: 1;
}
}
&.disabled {
> a,
> a:hover,
> a:focus,
> span,
> span:hover,
> span:focus {
color: ${e.colors.variant.light.default};
background-color: ${e.colors.global.contentBackground};
border-color: ${e.colors.variant.lighter.default};
}
}
}
}
`),Vp=(0,dr.YM)({WrapperComponent:Gp,itemTypeToComponent:{[dr.iB.PAGE]:({value:e,isActive:r,onClick:s})=>t.createElement(cr.Pagination.Item,{active:r,onClick:s},e),[dr.iB.ELLIPSIS]:({isActive:e,onClick:r})=>t.createElement(cr.Pagination.Ellipsis,{disabled:e,onClick:r},t.createElement(pe.Z,{name:"ellipsis-h"})),[dr.iB.FIRST_PAGE_LINK]:({isActive:e,onClick:r})=>t.createElement(cr.Pagination.First,{disabled:e,onClick:r},t.createElement(pe.Z,{name:"angle-double-left"})),[dr.iB.PREVIOUS_PAGE_LINK]:({isActive:e,onClick:r})=>t.createElement(cr.Pagination.Prev,{disabled:e,onClick:r},t.createElement(pe.Z,{name:"angle-left"})),[dr.iB.NEXT_PAGE_LINK]:({isActive:e,onClick:r})=>t.createElement(cr.Pagination.Next,{disabled:e,onClick:r},t.createElement(pe.Z,{name:"angle-right"})),[dr.iB.LAST_PAGE_LINK]:({isActive:e,onClick:r})=>t.createElement(cr.Pagination.Last,{disabled:e,onClick:r},t.createElement(pe.Z,{name:"angle-double-right"}))}}),$n=({currentPage:e,totalPages:r,boundaryPagesRange:s,siblingPagesRange:n,hideEllipsis:o,hidePreviousAndNextPageLinks:l,hideFirstAndLastPageLinks:d,disabled:g,onChange:h})=>r<=1?null:e>r?(console.warn("Graylog Pagination: `currentPage` prop should not be larger than `totalPages` prop."),null):t.createElement(Vp,{currentPage:e,totalPages:r,boundaryPagesRange:s,siblingPagesRange:n,hideEllipsis:o,hidePreviousAndNextPageLinks:l,hideFirstAndLastPageLinks:d,disabled:g,onChange:h,"data-testid":"graylog-pagination"});$n.propTypes={currentPage:a().number.isRequired,totalPages:a().number.isRequired,boundaryPagesRange:a().number,siblingPagesRange:a().number,hideEllipsis:a().bool,hidePreviousAndNextPageLinks:a().bool,hideFirstAndLastPageLinks:a().bool,disabled:a().bool,onChange:a().func},$n.defaultProps={boundaryPagesRange:1,siblingPagesRange:1,hideEllipsis:!1,hidePreviousAndNextPageLinks:!1,hideFirstAndLastPageLinks:!1,disabled:!1,onChange:()=>{}};const jp=$n,jr=1,qo=({children:e,className:r,currentPage:s,currentPageSize:n,hideFirstAndLastPageLinks:o,hidePreviousAndNextPageLinks:l,onChange:d,pageSizes:g,setPagination:h,showPageSizeSelect:v,totalItems:y})=>{const C=(0,t.useMemo)(()=>n>0?Math.ceil(y/n):0,[n,y]),R=(0,t.useCallback)(P=>{h({page:jr,pageSize:P}),d&&d(jr,P)},[d,h]),T=(0,t.useCallback)(P=>{h({page:P,pageSize:n}),d&&d(P,n)},[h,n,d]);return(0,t.useEffect)(()=>{C>0&&s>C&&T(C)},[s,C,T]),t.createElement(t.Fragment,null,v&&t.createElement(jo,{pageSizes:g,pageSize:n,showLabel:!0,onChange:R,className:"pull-right"}),e,t.createElement(Hp,null,t.createElement("div",{className:`text-center pagination-wrapper ${r!=null?r:""}`},t.createElement(jp,{totalPages:C,currentPage:s,hidePreviousAndNextPageLinks:l,hideFirstAndLastPageLinks:o,onChange:T}))))},qp=({pageSizes:e,...r})=>{const{page:s,pageSize:n,setPagination:o}=Fp(e,r.pageSize,r.showPageSizeSelect);return t.createElement(qo,{...r,currentPage:s,currentPageSize:n,setPagination:o,pageSizes:e})},Yp=({activePage:e,pageSize:r,...s})=>{const[n,o]=(0,t.useState)(Math.max(e,jr)),[l,d]=(0,t.useState)(r);(0,t.useEffect)(()=>{e>0&&o(e)},[e]),(0,t.useEffect)(()=>{d(r)},[r]);const g=(0,t.useCallback)(({page:h,pageSize:v})=>{d(v),o(h)},[]);return t.createElement(qo,{...s,currentPage:n,currentPageSize:l,setPagination:g})},Yo=({activePage:e,children:r,className:s,hideFirstAndLastPageLinks:n,hidePreviousAndNextPageLinks:o,onChange:l,pageSize:d,pageSizes:g,showPageSizeSelect:h,totalItems:v,useQueryParameter:y})=>y?t.createElement(qp,{className:s,hideFirstAndLastPageLinks:n,hidePreviousAndNextPageLinks:o,onChange:l,pageSizes:g,pageSize:d,showPageSizeSelect:h,totalItems:v},r):t.createElement(Yp,{className:s,hideFirstAndLastPageLinks:n,hidePreviousAndNextPageLinks:o,onChange:l,pageSizes:g,pageSize:d,showPageSizeSelect:h,totalItems:v,activePage:e},r);Yo.defaultProps={activePage:1,className:void 0,hideFirstAndLastPageLinks:!1,hidePreviousAndNextPageLinks:!1,pageSizes:Vr,pageSize:Vr[0],showPageSizeSelect:!0,onChange:void 0,useQueryParameter:!0};const Jo=Yo,Xo=({setFilteredRows:e,resetPagination:r,rows:s,...n})=>{const o=(l,d)=>{e(d&&d!==""?l:s),r()};return t.createElement(ka,{...n,rows:s,onDataFiltered:o})};Xo.defaultProps={id:void 0,filterKeys:void 0,displayKey:void 0,filterBy:void 0,filterLabel:void 0};const Jp=Xo,Xp={page:1,perPage:10,query:""},Qp=(e,r,s)=>{const n=r*(s-1),o=n+r;return e.slice(n,o)},Qo=({rows:e=[],pagination:r,filterKeys:s,filterLabel:n,displayKey:o,filterBy:l,id:d,...g})=>{const[{perPage:h,page:v},y]=(0,t.useState)(r),[C,R]=(0,t.useState)(e),T=Qp(C,h,v);(0,t.useEffect)(()=>{R(e),y(r)},[e,r]);const P=(X,se)=>{y({page:X,perPage:se})},z=()=>{y({perPage:h,page:r.page})};return t.createElement(Jo,{totalItems:C.length,pageSize:h,activePage:v,onChange:P,showPageSizeSelect:!0,useQueryParameter:!1},t.createElement(ln,{...g,id:d,customFilter:t.createElement(Jp,{id:d,filterKeys:s,setFilteredRows:R,rows:e,resetPagination:z,displayKey:o,filterBy:l,filterLabel:n}),rows:T}))};Qo.defaultProps={className:void 0,displayKey:void 0,filterBy:void 0,filterKeys:void 0,filterLabel:"Filter",headerCellFormatter:void 0,noDataText:void 0,pagination:Xp,rowClassName:void 0,useResponsiveTable:!1},Qo.propTypes={pagination:a().object};const ky=null,Wy=null,em=300,tm=m.default.div(({$buttonLeftMargin:e})=>m.css`
> :not(:last-child) {
margin-right: ${e}px;
}
> * {
display: inline-block;
vertical-align: top;
margin-bottom: 5px;
}
`),rm=m.default.div`
position: absolute;
right: 0;
top: 0;
display: flex;
align-items: center;
min-height: 34px;
padding-right: 3px;
`,sm=m.default.div(({$topMargin:e})=>m.css`
margin-top: ${e}px;
`),nm=m.default.input(({$queryWidth:e,$feedbackContainerWidth:r})=>m.css`
width: ${e}px;
padding-right: ${r!=null?r:12}px;
`),am=m.default.label`
margin-right: 5px;
`,om=m.default.div`
display: inline-block;
position: relative;
`,lm=_n()(({query:e,onSearch:r,useLoadingState:s,setLoadingState:n,resetLoadingState:o})=>{s?n().then(()=>{r(e,o)}):r(e)},em),zn=({useLoadingState:e,queryHelpComponent:r,queryWidth:s,focusAfterMount:n,children:o,className:l,placeholder:d,buttonLeftMargin:g,label:h,onReset:v,onSearch:y,wrapperClass:C,topMargin:R,onQueryChange:T,query:P})=>{var z;const[X,se]=(0,t.useState)(P),[oe,Y]=(0,t.useState)(!1),ge=(0,t.useRef)(void 0);(0,t.useEffect)(()=>{se(P)},[P]);const ae=()=>new Promise(Q=>{e&&Y(!0),Q()}),_e=()=>{e&&Y(!1)},q=()=>{_e(),se(P),typeof T=="function"&&T(P),typeof v=="function"&&v()},J=Q=>{Q.preventDefault(),Q.stopPropagation();const be=Q.target.value;se(be),typeof T=="function"&&T(be),typeof y=="function"&&lm({query:be,onSearch:y,useLoadingState:e,setLoadingState:ae,resetLoadingState:_e})};return t.createElement(sm,{className:`${C} ${l}`,$topMargin:R},t.createElement(tm,{$buttonLeftMargin:g},t.createElement("div",{className:"form-group"},h&&t.createElement(am,{htmlFor:"common-search-form-query-input",className:"control-label"},h),t.createElement(om,null,t.createElement(nm,{id:"common-search-form-query-input",autoFocus:n,onChange:J,value:X,placeholder:d,type:"text",$queryWidth:s,className:"query form-control",autoComplete:"off",spellCheck:"false",$feedbackContainerWidth:(z=ge.current)==null?void 0:z.scrollWidth}),t.createElement(rm,{ref:ge},oe&&t.createElement(st.Z,{text:""}),X&&typeof v=="function"&&t.createElement(js,{name:"xmark",title:"Reset search",onClick:q}),r))),o))};zn.propTypes={query:a().string,onQueryChange:a().func,onSearch:a().func,onReset:a().func,label:a().string,className:a().string,placeholder:a().string,wrapperClass:a().string,queryWidth:a().any,topMargin:a().number,buttonLeftMargin:a().number,useLoadingState:a().bool,queryHelpComponent:a().element,children:a().oneOfType([a().arrayOf(a().element),a().element]),focusAfterMount:a().bool},zn.defaultProps={query:"",className:"",onQueryChange:void 0,onSearch:null,onReset:null,label:null,placeholder:"Enter search query...",wrapperClass:"search",queryWidth:400,topMargin:0,buttonLeftMargin:5,useLoadingState:!1,queryHelpComponent:null,children:null,focusAfterMount:!1};const el=zn,im=m.default.span(({theme:e})=>m.css`
display: flex;
padding: 10px;
background-color: ${e.colors.table.background};
:nth-of-type(even) {
background-color: ${e.colors.table.backgroundAlt};
}
`),cm=m.default.div`
flex: 1;
margin-right: 5px;
`,dm=m.default.span`
flex: 2;
`,um=(0,m.default)(js)`
flex: 0;
`,Un=({item:{name:e,description:r},onDeleteItem:s,item:n})=>{const o=typeof s=="function"?t.createElement(um,{onClick:()=>s(n),name:"times",title:`Remove ${e}`}):null;return t.createElement(im,null,t.createElement(cm,null,e),t.createElement(dm,null,r),o)};Un.defaultProps={onDeleteItem:void 0},Un.propTypes={onDeleteItem:a().func};const pm=Un,tl=[5,10,30],mm={page:jr,perPage:tl[0],query:""},gm=({onLoad:e,overrideList:r,onDeleteItem:s,queryHelper:n,noDataText:o,resultsWrapperComponent:l,overrideItemComponent:d})=>{var g,h;const[v,y]=(0,t.useState)(),[C,R]=(0,t.useState)(mm);if((0,t.useEffect)(()=>r&&y(r),[r]),(0,t.useEffect)(()=>{let z=!0;return e(C,z).then(X=>{z&&y(X)}),()=>{z=!1}},[C,e]),!v)return t.createElement(st.Z,null);const T=t.createElement(Jc,null,o);let P;return v.list&&v.list.size>=1&&(P=v.list.toArray().map(z=>d?t.createElement(d,{key:z.id,onDeleteItem:s,item:z}):t.createElement(pm,{key:z.id,onDeleteItem:s,item:z}))),t.createElement(Jo,{onChange:(z,X)=>R({...C,page:z,perPage:X}),pageSize:C.perPage,totalItems:(h=(g=v==null?void 0:v.pagination)==null?void 0:g.total)!=null?h:0,pageSizes:tl,activePage:C.page,useQueryParameter:!1},t.createElement(el,{onSearch:z=>R({...C,page:jr,query:z}),label:"Filter",queryWidth:300,wrapperClass:"has-bm",placeholder:"Enter query to filter",queryHelpComponent:n}),t.createElement(l,{isEmptyResult:!P},P!=null?P:T))};gm.defaultProps={onDeleteItem:void 0,overrideList:void 0,noDataText:"No items found to display.",queryHelper:void 0,resultsWrapperComponent:({children:e})=>t.createElement("div",null,e),overrideItemComponent:void 0};const Ky=null;var hm=Object.defineProperty,fm=(e,r,s)=>r in e?hm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,vm=(e,r,s)=>(fm(e,typeof r!="symbol"?r+"":r,s),s);class Em extends t.Component{render(){return t.createElement("span",null,Yt.Z.pluralize(this.props.value,this.props.singular,this.props.plural))}}vm(Em,"propTypes",{singular:a().string.isRequired,plural:a().string.isRequired,value:a().oneOfType([a().number,a().string]).isRequired});const Hy=null,rl={animated:!1,bsStyle:"info",label:void 0,striped:!1,value:0},sl=e=>m.css`
box-shadow: ${e} ${({theme:r})=>Ar()(r.colors.brand.secondary).alpha(.1).css()};
`,ym=m.keyframes`
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
`,bm=(0,m.css)(({bsStyle:e,theme:r})=>{if(e)return`
background-color: ${r.colors.variant[e]};
color: ${r.utils.readableColor(r.colors.variant[e])};
`}),_m=m.default.div(({theme:e})=>m.css`
height: 20px;
margin-bottom: 20px;
overflow: hidden;
background-color: ${e.colors.gray[90]};
border-radius: 4px;
${sl("inset 0 1px 2px")}
display: flex;
align-items: center;
`),Cm=m.default.div(({animated:e,striped:r,theme:s,value:n})=>{const o=Ar()(s.colors.global.contentBackground).alpha(.25).css();return m.css`
height: 100%;
font-size: ${s.fonts.size.small};
text-align: center;
${sl("inset 0 -1px 0")}
transition: width 500ms ease-in-out;
width: ${n}%;
max-width: 100%;
text-shadow: 0 1px 2px ${Ar()(s.colors.gray[10]).alpha(.4).css()}, 2px -1px 3px ${Ar()(s.colors.gray[100]).alpha(.5).css()};
${(e||r)&&m.css`
background-image: linear-gradient(
45deg,
${o} 25%,
transparent 25%,
transparent 50%,
${o} 50%,
${o} 75%,
transparent 75%,
transparent
);
background-size: 40px 40px;
`}
${e&&m.css`
animation: ${ym} 2s linear infinite;
`}
${bm}
`}),nl=({bars:e,className:r})=>t.createElement(_m,{className:r},e.map((s,n)=>{const{label:o,animated:l,bsStyle:d,striped:g,value:h}={...rl,...s};return t.createElement(Cm,{role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":o,key:`bar-${n}`,animated:l,bsStyle:d,striped:g,value:h},o)}));nl.propTypes={bars:a().arrayOf(a().shape({animated:a().bool,bsStyle:a().string,label:a().string,striped:a().bool,value:a().number})),className:a().string},nl.defaultProps={bars:[rl],className:void 0};const Gy=null,al=({children:e,container:r})=>(0,Cr.createPortal)(e,r);al.defaultProps={container:document.body};const Sm=al,Tm={id:e=>`Id of the ${e}, which is a unique reference.`,title:e=>`Title of the ${e}.`,name:e=>`Name of the ${e}.`,description:e=>`Short description of the ${e}.`,summary:e=>`Long summary of the ${e}.`},wm=(0,m.default)(c.Popover)`
max-width: 500px;
`,Am=(0,m.default)(c.Button)`
padding: 6px 8px;
`,ol=(e,r)=>t.createElement("tr",{key:`row-field-${e}`},t.createElement("td",null,e),t.createElement("td",null,r)),Rm=t.createElement(t.Fragment,null,t.createElement("p",null,"Find entities with a description containing security:",t.createElement("br",null),t.createElement("code",null,"description:security"),t.createElement("br",null)),t.createElement("p",null,"Find a entities with the id 5f4dfb9c69be46153b9a9a7b:",t.createElement("br",null),t.createElement("code",null,"id:5f4dfb9c69be46153b9a9a7b"),t.createElement("br",null))),xm=(e,r,s,n)=>t.createElement(wm,{id:"team-search-query-help",title:"Search Syntax Help"},t.createElement("p",null,t.createElement("strong",null,"Available search fields")),t.createElement(c.Table,{condensed:!0},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,"Field"),t.createElement("th",null,"Description"))),t.createElement("tbody",null,e.map(o=>ol(o,Tm[o](n))),Object.keys(r).map(o=>ol(o,r[o])))),t.createElement("p",null,t.createElement("strong",null,"Examples")),s||Rm),Pm=({commonFields:e,fieldMap:r,example:s,entityName:n})=>t.createElement(Hr.Z,{trigger:"click",rootClose:!0,placement:"right",overlay:xm(e,r,s,n)},t.createElement(Am,{bsStyle:"link"},t.createElement(pe.Z,{name:"question-circle"})));Pm.defaultProps={commonFields:["id","title","description"],fieldMap:{},example:void 0,entityName:"entity"};const Vy=null;var Bn=i("ApKkJKuH"),Im=i("6B2vepvr"),jy=i("3QlCa1ps"),qy=i("NOzOyt6M");const Dm=(0,Bn.WidthProvider)(Bn.Responsive),Fn=e=>{const{width:r}=e;return r?t.createElement(Bn.Responsive,{...e}):t.createElement(Dm,{...e})};Fn.propTypes={width:a().number},Fn.defaultProps={width:void 0};const Mm=(0,m.default)(Fn)(({theme:e})=>m.css`
&.locked {
.widget-drag-handle {
display: none;
}
}
&.unlocked {
.react-draggable {
cursor: move;
}
}
.react-grid-item.react-grid-placeholder {
background: ${e.colors.variant.info};
}
.actions {
cursor: default;
}
`),Rr=175,Lm=100,ur={xxl:12,xl:10,lg:8,md:6,sm:4,xs:2},Om={xxl:Rr*ur.xxl,xl:Rr*ur.xl,lg:Rr*ur.lg,md:Rr*ur.md,sm:Rr*ur.sm,xs:Rr*ur.xs},Nm=(e,r,s,n)=>{const o=`${n}`;return e||!r?`${o} locked`:s?o:`${o} unlocked`},ll=(e,r)=>{const s=[];return e.filter(({i:n})=>!n.startsWith("gap")).forEach(n=>{s.push({id:n.i,col:n.x+1,row:n.y+1,height:n.h,width:n.w})}),r(s)},$m=(e={})=>Object.keys(e).map(r=>{const{col:s,row:n,height:o,width:l}=e[r];return{i:r,x:s?Math.max(s-1,0):0,y:n===void 0||n<=0?1/0:n-1,h:o||1,w:l||1}}),il=e=>{const r=[];e.forEach((s,n)=>{s.i.startsWith("gap")&&r.push(n)}),r.reverse().forEach(s=>e.splice(s,1))},Zn=({children:e,className:r,columns:s,draggableHandle:n,isResizable:o,locked:l,measureBeforeMount:d,onPositionsChange:g,onSyncLayout:h,positions:v,rowHeight:y,theme:C,width:R})=>{const T=C.spacings.px.xs,P=(0,t.useCallback)(oe=>ll(oe,g),[g]),z=(0,t.useCallback)(oe=>ll(oe,h),[h]),X=Nm(l,o,n,r),se=(0,t.useMemo)(()=>$m(v),[v]);return t.createElement(Mm,{className:X,width:R,breakpoints:Om,cols:s,layouts:{xxl:se,xl:se,lg:se,md:se,sm:se,xs:se},rowHeight:y,containerPadding:[0,0],margin:[T,T],isResizable:!l&&o,isDraggable:!l,measureBeforeMount:d,draggableCancel:".actions",onDragStart:il,onDragStop:P,onResizeStart:il,onResizeStop:P,onLayoutChange:z,useCSSTransforms:!1,draggableHandle:l?"":n},e)};Zn.propTypes={children:a().node.isRequired,className:a().string,onPositionsChange:a().func.isRequired,positions:a().object.isRequired,locked:a().bool,isResizable:a().bool,rowHeight:a().number,columns:a().object,draggableHandle:a().string,measureBeforeMount:a().bool,width:a().number,theme:Im.rG.isRequired},Zn.defaultProps={className:void 0,columns:ur,isResizable:!0,locked:!1,measureBeforeMount:!1,rowHeight:Lm,draggableHandle:void 0,width:void 0,onSyncLayout:()=>{}};const Yy=(0,m.withTheme)(Zn),zm=(0,m.default)(c.Row)`
:not(:last-child) {
margin-bottom: 7px;
}
`,Um=(0,m.default)(c.Col)(({theme:e})=>m.css`
font-weight: bold;
@media (min-width: ${e.breakpoints.min.md}) {
text-align: right;
}
`),Bm=(0,m.default)(pe.Z)(({theme:e,value:r})=>`
color: ${r?e.colors.variant.success:e.colors.variant.danger};
`),Fm=({value:e})=>t.createElement(t.Fragment,null,t.createElement(Bm,{name:e?"check-circle":"times-circle",value:e})," ",e?"yes":"no"),Zm=e=>typeof e=="boolean"?t.createElement(Fm,{value:e}):e||"-",km=({label:e,value:r,help:s,className:n})=>t.createElement(zm,{className:n},t.createElement(Um,{sm:3},e),t.createElement(c.Col,{sm:9,className:"read-only-value-col"},Zm(r),s&&t.createElement(c.HelpBlock,null,s)));km.defaultProps={help:void 0,className:void 0};const Jy=null,cl=({dateTime:e})=>{const r=e!=null?e:new Date,s=vt(r),n=He(r,"internal");return t.createElement("time",{dateTime:n,title:n},s)};cl.propTypes={dateTime:a().oneOfType([a().string,a().object,a().number])},cl.defaultProps={dateTime:void 0};const Xy=null;var Wm=Object.defineProperty,Km=(e,r,s)=>r in e?Wm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,qr=(e,r,s)=>(Km(e,typeof r!="symbol"?r+"":r,s),s);const Hm=m.default.button(({theme:e})=>m.css`
opacity: 0.3;
background-color: ${e.colors.variant.primary};
width: 40px;
height: 40px;
position: fixed;
bottom: 60px;
right: 20px;
border-radius: 5px;
border: none;
&:hover {
opacity: 1;
}
&.middle {
right: 35%;
}
`),Gm=(0,m.default)(pe.Z)(({theme:e})=>m.css`
color: ${e.utils.readableColor(e.colors.variant.primary)};
position: absolute;
top: 50%;
left: 50%;
margin-top: -9px;
margin-left: -5px;
`);class dl extends t.Component{constructor(){super(),qr(this,"showButton",()=>{this.setState({hideButton:window.scrollY===0})}),qr(this,"scrollStep",()=>{const{intervalId:r}=this.state,{scrollSteps:s}=this.props;window.pageYOffset===0&&clearInterval(r),window.scroll(0,window.pageYOffset-s)}),qr(this,"scrollToTop",()=>{const{delay:r}=this.props,s=setInterval(this.scrollStep.bind(this),r);this.setState({intervalId:s})}),this.state={intervalId:0,hideButton:!0}}componentDidMount(){window.addEventListener("scroll",this.showButton)}componentWillUnmount(){window.removeEventListener("scroll",this.showButton)}render(){const{position:r}=this.props,{hideButton:s}=this.state;return s?t.createElement("span",null):t.createElement(Hm,{title:"Back to top",type:"button",className:r,onClick:this.scrollToTop},t.createElement(Gm,{name:"chevron-up"}))}}qr(dl,"propTypes",{delay:a().number,scrollSteps:a().number,position:a().string}),qr(dl,"defaultProps",{delay:5,scrollSteps:50,position:""});const Qy=null;var Vm=i("EeemBwNM"),ul=i.n(Vm),jm=i("YHdXwNS6"),qm=i.n(jm),Ym=i("c59+uKGP"),Jm=i.n(Ym),As=i("ylPxorvM"),xr={};xr.styleTagTransform=bs(),xr.setAttributes=Es(),xr.insert=vs().bind(null,"head"),xr.domAPI=fs(),xr.insertStyleElement=ys();var eb=hs()(As.Z,xr);const kn=As.Z&&As.Z.locals?As.Z.locals:void 0;var Xm=Object.defineProperty,Qm=(e,r,s)=>r in e?Xm(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Ht=(e,r,s)=>(Qm(e,typeof r!="symbol"?r+"":r,s),s);class pl extends t.Component{constructor(r){super(r),Ht(this,"handleSelectionChange",s=>{const{onItemSelect:n}=this.props;this.setState({selectedItems:s}),n(s,()=>this.overlay.hide())}),Ht(this,"clearItemSelection",()=>{this.handleSelectionChange([])}),Ht(this,"handleItemSelection",s=>()=>{const{multiple:n}=this.props,{selectedItems:o}=this.state;let l;n?l=o.includes(s)?qm()(o,s):ul()(o,s):l=[s],this.handleSelectionChange(l)}),Ht(this,"filterData",(s,n)=>{const o=n.filter(l=>l.match(new RegExp(s,"i")));this.setState({filterText:s,filteredItems:o})}),Ht(this,"handleFilterChange",s=>n=>{const o=n.target.value.trim();this.filterData(o,s)}),Ht(this,"renderDataFilter",s=>{const{filterPlaceholder:n}=this.props,{filterText:o}=this.state;return t.createElement(c.FormGroup,{controlId:"dataFilterInput",className:kn.dataFilterInput},t.createElement(c.FormControl,{type:"text",placeholder:n,value:o,onChange:this.handleFilterChange(s)}))}),Ht(this,"renderClearSelectionItem",()=>{const{clearSelectionText:s}=this.props;return t.createElement(c.ListGroupItem,{onClick:this.clearItemSelection},t.createElement(pe.Z,{name:"times",fixedWidth:!0,className:"text-danger"})," ",s)}),this.state={filterText:"",filteredItems:r.items,selectedItems:r.selectedItems}}UNSAFE_componentWillReceiveProps(r){const{items:s,selectedItems:n}=this.props,{filterText:o}=this.state;_r()(n,r.selectedItems)||this.setState({selectedItems:r.selectedItems}),s!==r.items&&this.filterData(o,r.items)}render(){const{displayDataFilter:r,itemFormatter:s,items:n,placement:o,triggerAction:l,triggerNode:d,disabled:g,id:h,title:v}=this.props,{filteredItems:y,selectedItems:C}=this.state,R=t.createElement(c.Popover,{id:h,title:v,placement:o,className:kn.customPopover,"data-event-element":v},r&&this.renderDataFilter(n),C.length>0&&this.renderClearSelectionItem(),t.createElement(Jm(),{className:kn.scrollableList},t.createElement(c.ListGroup,null,y.map(T=>t.createElement(c.ListGroupItem,{key:T,onClick:g?()=>{}:this.handleItemSelection(T),active:C.includes(T),disabled:g},s(T))))));return t.createElement(Hr.Z,{ref:T=>{this.overlay=T},trigger:l,placement:o,overlay:R,rootClose:!0},d)}}Ht(pl,"propTypes",{id:a().string.isRequired,placement:a().oneOf(["top","right","bottom","left"]),title:a().string.isRequired,triggerNode:a().node.isRequired,triggerAction:a().oneOf(["click","hover","focus"]),items:a().arrayOf(a().string),itemFormatter:a().func,multiple:a().bool,selectedItems:a().arrayOf(a().string),onItemSelect:a().func.isRequired,displayDataFilter:a().bool,filterPlaceholder:a().string,clearSelectionText:a().string,disabled:a().bool}),Ht(pl,"defaultProps",{placement:"bottom",triggerAction:"click",items:[],itemFormatter:e=>e,multiple:!1,selectedItems:[],displayDataFilter:!0,filterPlaceholder:"Type to filter",clearSelectionText:"Clear selection",disabled:!1});const tb=null;var eg=Object.defineProperty,tg=(e,r,s)=>r in e?eg(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Pr=(e,r,s)=>(tg(e,typeof r!="symbol"?r+"":r,s),s);const rg=(0,m.default)(c.ListGroupItem)`
display: flex;
justify-content: space-between;
`;class ml extends t.Component{constructor(){super(...arguments),Pr(this,"_getOptionId",r=>typeof r=="string"?r:r[this.props.idKey]),Pr(this,"_getOptionDisplayValue",r=>typeof r=="string"?r:r[this.props.displayKey]),Pr(this,"_onAddOption",r=>{if(r==="")return;const s=this.props.selectedOptions.slice();this.props.selectedOptionsType==="string"?s.push(r):s.push(this.props.options.filter(n=>this._getOptionId(n)===r)[0]),typeof this.props.onChange=="function"&&this.props.onChange(s)}),Pr(this,"_onRemoveOption",r=>()=>{const s=this.props.selectedOptions.filter((n,o)=>o!==r);typeof this.props.onChange=="function"&&this.props.onChange(s)})}UNSAFE_componentWillReceiveProps(r){this.props.selectedOptions!==r.selectedOptions&&this.select.clearValue()}render(){const r=this.props.selectedOptions.map((s,n)=>t.createElement(rg,{key:`${this._getOptionId(s)}-${n}`},t.createElement("div",null,this._getOptionDisplayValue(s)),t.createElement(c.Button,{bsStyle:"danger",bsSize:"xsmall",onClick:this._onRemoveOption(n)},"Remove")));return t.createElement("div",null,t.createElement(We.Z,{ref:s=>{this.select=s},autoFocus:this.props.autoFocus,options:this.props.options,onChange:this._onAddOption,clearable:!1}),r.length>0&&t.createElement(c.ListGroup,{style:{marginTop:10}},r))}}Pr(ml,"propTypes",{options:a().array,selectedOptionsType:a().oneOf(["string","object"]),selectedOptions:a().arrayOf(a().oneOfType([a().string,a().object])),displayKey:a().string,idKey:a().string,onChange:a().func,autoFocus:a().bool}),Pr(ml,"defaultProps",{autoFocus:void 0,displayKey:"label",idKey:"value",onChange:void 0,options:void 0,selectedOptions:void 0,selectedOptionsType:"string"});const rb=null,sg=(0,m.default)(e=>t.createElement(tu,{...e}))`
margin-left: 8px;
`,gl=({type:e,description:r})=>{const s=n=>n.replaceAll("_"," ");return t.createElement(sg,{title:"Sharing not possible",pullRight:!1},r||`Only owners of this ${s(e)} are allowed to share it.`)};gl.defaultProps={description:void 0};const ng=gl,ag=({bsStyle:e,bsSize:r,entityId:s,entityType:n,onClick:o,disabledInfo:l})=>t.createElement(Jd,{id:s,type:n},({disabled:d})=>t.createElement(Cs.Z,{bsStyle:e,bsSize:r,onClick:o,disabled:!!l||d,title:"Share"},t.createElement(pe.Z,{name:"user-plus"})," Share ",(!!l||d)&&t.createElement(ng,{type:n,description:l})));ag.defaultProps={bsStyle:"default",disabledInfo:void 0,bsSize:void 0};const sb=null;var Wn=i("Nr7WAlY+");const og=(0,m.default)(c.ListGroupItem)(({$alignItemContent:e})=>m.css`
display: flex;
align-items: ${e};
`),lg=m.default.div`
margin-right: 5px;
`,hl=(0,t.forwardRef)(({alignItemContent:e,item:r,index:s,className:n,customListItemRender:o,customContentRender:l,disableDragging:d,draggableProps:g,dragHandleProps:h},v)=>{const y=l?l({item:r,index:s}):r.title;return o?t.createElement(t.Fragment,null,o({className:n,disableDragging:d,draggableProps:g,dragHandleProps:h,index:s,item:r,ref:v})):t.createElement(og,{$alignItemContent:e,ref:v,className:n,containerProps:{...g}},!d&&t.createElement(lg,{...h,"data-testid":`sortable-item-${r.id}`},t.createElement(pe.Z,{name:"bars"})),y)});hl.defaultProps={alignItemContent:"flex-start",className:void 0,disableDragging:!1,customListItemRender:void 0,customContentRender:void 0};const ig=hl,cg=(0,m.default)(ig)(({$isDragging:e})=>`
box-shadow: ${e?"rgba(0, 0, 0, 0.24) 0px 3px 8px":"none"};
`),fl=({alignItemContent:e,className:r,customContentRender:s,customListItemRender:n,disableDragging:o,displayOverlayInPortal:l,index:d,item:g})=>t.createElement(Wn._l,{draggableId:g.id,index:d},({draggableProps:h,dragHandleProps:v,innerRef:y},{isDragging:C})=>{const R=t.createElement(cg,{alignItemContent:e,item:g,index:d,className:r,ref:y,customContentRender:s,customListItemRender:n,disableDragging:o,displayOverlayInPortal:l,draggableProps:h,dragHandleProps:v,$isDragging:C});return l&&C?t.createElement(Sm,null,R):R});fl.defaultProps={alignItemContent:void 0,className:void 0,customContentRender:void 0,customListItemRender:void 0,disableDragging:!1};const dg=fl,vl=({alignItemContent:e,customContentRender:r,customListItemRender:s,disableDragging:n,displayOverlayInPortal:o,items:l=[]})=>t.createElement(t.Fragment,null,l.map((d,g)=>t.createElement(dg,{alignItemContent:e,item:d,index:g,key:d.id,customContentRender:r,customListItemRender:s,disableDragging:n,displayOverlayInPortal:o})));vl.defaultProps={displayOverlayInPortal:!1,alignItemContent:void 0,disableDragging:!1,customContentRender:void 0,customListItemRender:void 0};const ug=t.memo(vl),pg=(e,r,s)=>{const n=Array.from(e),[o]=n.splice(r,1);return n.splice(s,0,o),n},Kn=({alignItemContent:e,customContentRender:r,customListItemRender:s,disableDragging:n,displayOverlayInPortal:o,items:l,onMoveItem:d})=>{const g=(0,t.useCallback)(h=>{if(h.destination&&h.source.index!==h.destination.index){const v=pg(l,h.source.index,h.destination.index);d(v,h.source.index,h.destination.index)}},[l,d]);return t.createElement(Wn.Z5,{onDragEnd:g},t.createElement(Wn.bK,{droppableId:"droppable"},({droppableProps:h,innerRef:v,placeholder:y})=>t.createElement("div",{...h,ref:v},t.createElement(ug,{alignItemContent:e,items:l,disableDragging:n,displayOverlayInPortal:o,customContentRender:r,customListItemRender:s}),y)))};Kn.propTypes={disableDragging:a().bool,items:a().arrayOf(a().object),onMoveItem:a().func.isRequired,customContentRender:a().func,customListItemRender:a().func},Kn.defaultProps={alignItemContent:void 0,items:[],disableDragging:!1,displayOverlayInPortal:!1,customContentRender:void 0,customListItemRender:void 0};const mg=Kn,ab=Be()({displayName:"TimeUnit",propTypes:{value:a().number.isRequired,unit:a().oneOf(["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"]).isRequired,zeroIsNever:a().bool},getDefaultProps(){return{zeroIsNever:!0}},UNITS:{NANOSECONDS:"nanoseconds",MICROSECONDS:"microseconds",MILLISECONDS:"milliseconds",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days"},render(){return this.props.value===0&&this.props.zeroIsNever?t.createElement("span",null,"Never"):t.createElement("span",null,this.props.value,"\xA0",this.UNITS[this.props.unit])}}),ob=null;var gg=i("M09juI6U"),Yr=i.n(gg),lb=i("p60vwpDe"),ib=i("FWpQ+Wjd"),hg=i("Ept3tno1"),Jr=i.n(hg);const fg={JAVA_INTEGER_MIN_VALUE:2**31*-1,JAVA_INTEGER_MAX_VALUE:2**31-1,normalizeNumber(e){switch(e){case"NaN":return NaN;case"Infinity":return Number.MAX_VALUE;case"-Infinity":return Number.MIN_VALUE;default:return e}},normalizeGraphNumber(e){switch(e){case"NaN":case"Infinity":case"-Infinity":return 0;default:return e}},formatNumber(e){try{return Jr()(this.normalizeNumber(e)).format("0,0.[00]")}catch{return e}},formatPercentage(e){try{return Jr()(this.normalizeNumber(e)).format("0.00%")}catch{return e}},formatBytes(e){Jr().zeroFormat("0B");let r;try{r=Jr()(this.normalizeNumber(e)).format("0.0ib")}catch{r=e}return Jr().zeroFormat(null),r},isNumber(e){return e!==""&&!Number.isNaN(Number(e))}},vg=e=>{const r={bubbles:!0,cancelable:!0};if(typeof Event=="function")return new Event(e,r);const s=document.createEvent("Event");return s.initEvent(e,r.bubbles,r.cancelable),s},Gt=e=>{switch(e.type){case"radio":return e.value==="true"||e.value==="false"?e.value==="true":e.value;case"checkbox":return e.checked;case"number":return e.value===""||!fg.isNumber(e.value)?void 0:Number(e.value);default:return e.value}},El=e=>{const r=e._valueTracker,s=vg("change");s.simulated=!0,r&&r.setValue(""),e.dispatchEvent(s)},Eg=(e={})=>Object.keys(e).length>0,yg=(e,r,s)=>{switch(r){case"required":if(!e||(e==null?void 0:e.size)===0)return"Field is required.";break;case"min":if(eNumber(s))return`Must be smaller than ${s}.`;break;default:return}},yl={getValueFromInput:Gt,triggerInput:El,formHasErrors:Eg,validateField:(e={})=>r=>{let s;return Object.entries(e).some(([n,o])=>{const l=yg(r,n,o);return l?(s=l,!0):!1}),s}},Hn=["NANOSECONDS","MICROSECONDS","MILLISECONDS","SECONDS","MINUTES","HOURS","DAYS"],bl=a().oneOf(Hn),pb=(e,r)=>{if(e===void 0)return{duration:1,unit:last(r)};const s=moment.duration(e),n=r.find(l=>{const d=s.as(l);return isInteger(d)&&d!==0})||last(r);return{duration:s.as(n),unit:n}},mb=Be()({displayName:"TimeUnitInput",propTypes:{update:a().func.isRequired,label:a().string,help:a().string,required:a().bool,enabled:a().bool,defaultEnabled:a().bool,value:a().number,defaultValue:a().number,unit:bl,units:a().arrayOf(bl),labelClassName:a().string,wrapperClassName:a().string,hideCheckbox:a().bool,pullRight:a().bool,clearable:a().bool,name:a().string,unitName:a().string},getDefaultProps(){return{defaultValue:1,value:void 0,unit:"SECONDS",units:Hn,label:"",help:"",name:null,unitName:null,required:!1,enabled:void 0,defaultEnabled:!1,labelClassName:void 0,wrapperClassName:void 0,hideCheckbox:!1,pullRight:!1,clearable:!1}},getInitialState(){const{defaultEnabled:e,enabled:r,units:s}=this.props;return{enabled:Yr()(r,e),unitOptions:this._getUnitOptions(s)}},UNSAFE_componentWillReceiveProps(e){const{units:r}=this.props;_r()(r,e.units)||this.setState({unitOptions:this._getUnitOptions(e.units)})},_getEffectiveValue(){const{defaultValue:e,value:r,clearable:s}=this.props;return s?r:Yr()(r,e)},_getUnitOptions(e){return Hn.filter(r=>e.includes(r)).map(r=>({value:r,label:r.toLowerCase()}))},_isChecked(){const{required:e,enabled:r}=this.props;if(e)return e;const{enabled:s}=this.state;return Yr()(r,s)},_propagateInput(e){const{update:r,unit:s}=this.props,o={...{value:this._getEffectiveValue(),unit:s,checked:this._isChecked()},...e};r(o.value,o.unit,o.checked)},_onToggleEnable(e){const r=e.target.checked;this.setState({enabled:r}),this._propagateInput({checked:r})},_onUpdate(e){const{defaultValue:r,clearable:s}=this.props;let n;s?n=Gt(e.target):n=Yr()(Gt(e.target),r),this._propagateInput({value:n})},_onUnitSelect(e){this._propagateInput({unit:e})},render(){const{unitOptions:e}=this.state,{label:r,wrapperClassName:s,help:n,labelClassName:o,unit:l,required:d,hideCheckbox:g,pullRight:h}=this.props,v=e.map(C=>t.createElement(c.MenuItem,{key:C.value,onSelect:()=>this._onUnitSelect(C.value),active:l===C.value},C.label)),y=t.createElement(c.InputGroup.Addon,null,t.createElement("input",{type:"checkbox",checked:this._isChecked(),onChange:this._onToggleEnable}));return t.createElement(c.FormGroup,null,r&&t.createElement(c.ControlLabel,{className:o},r),t.createElement(c.InputWrapper,{className:s},t.createElement(c.InputGroup,null,!d&&!g&&y,t.createElement(c.FormControl,{type:"number",name:this.props.name,disabled:!this._isChecked(),onChange:this._onUpdate,value:Yr()(this._getEffectiveValue(),"")}),t.createElement(c.DropdownButton,{componentClass:c.InputGroup.Button,id:"input-dropdown-addon",name:this.props.unitName,pullRight:h,title:e.filter(C=>C.value===l)[0].label,disabled:!this._isChecked()},v)),n&&t.createElement(c.HelpBlock,null,n)))}}),gb=null,Gn=({dateTime:e,field:r,format:s,render:n,tz:o,className:l})=>{const{formatTime:d}=gs(),g=e!=null?e:new Date,h=o?He(g,s,o):d(g,s),v=He(g,"internal");return t.createElement("time",{dateTime:v,title:v,className:l},t.createElement(n,{value:h,field:r}))};Gn.propTypes={dateTime:a().oneOfType([a().string,a().object,a().number]),format:a().string,field:a().string,tz:a().string,render:a().func},Gn.defaultProps={dateTime:void 0,field:void 0,format:"default",render:({value:e})=>e,tz:void 0,className:void 0};const Ir=Gn;var bg=Object.defineProperty,_g=(e,r,s)=>r in e?bg(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Dr=(e,r,s)=>(_g(e,typeof r!="symbol"?r+"":r,s),s);class _l extends t.Component{constructor(){super(...arguments),Dr(this,"_UNCLASSIFIED_AREA","Unclassified"),Dr(this,"getValue",()=>this.timezone.getValue()),Dr(this,"_formatTimezones",()=>{const r={};Le().tz.names().forEach(n=>{const o=n.split("/"),l=o.length>1?o[0]:this._UNCLASSIFIED_AREA,d=o.length>1?o[1]:o[0];r[l]||(r[l]=[]),r[l].push(d)});const s=[];return Object.keys(r).sort().forEach(n=>{s.push({label:n,disabled:!0,value:n});const l=Na()(r[n]).sort().map(d=>({value:n===this._UNCLASSIFIED_AREA?d:`${n}/${d}`,label:d.replace("_"," ")}));s.push(...l)}),s}),Dr(this,"_renderOption",r=>r.disabled?t.createElement("span",{key:r.value,title:r.value},r.label):t.createElement("span",{key:r.value,title:r.value},"\xA0 ",r.label))}render(){const r=this._formatTimezones(),{onChange:s,...n}=this.props;return t.createElement(We.Z,{ref:o=>{this.timezone=o},...n,inputId:"timezone-select",onChange:s,placeholder:"Pick a time zone",options:r,optionRenderer:this._renderOption})}}Dr(_l,"propTypes",{onChange:a().func}),Dr(_l,"defaultProps",{onChange:()=>{}});const hb=null;var Cg=Object.defineProperty,Sg=(e,r,s)=>r in e?Cg(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Vn=(e,r,s)=>(Sg(e,typeof r!="symbol"?r+"":r,s),s);class Cl extends t.Component{constructor(){super(...arguments),Vn(this,"_getFilteredProps",()=>{let r=Jt().fromJS(this.props);return["valueLink","onChange"].forEach(s=>{r.has(s)&&(r=r.delete(s))}),r.toJS()})}componentDidMount(){if(this.fieldInput){const{autoFocus:r,valueLink:s,onChange:n}=this.props,o=Je()(this.fieldInput.getInputDOMNode());(0,O.ZP)("GET",(0,U.DC)(ie.Z.SystemApiController.fields().url)).then(d=>{o.typeahead({hint:!0,highlight:!0,minLength:1},{name:"fields",displayKey:"value",source:en.substringMatcher(d.fields,"value",6)}),r&&(o.focus(),o.typeahead("close"))});const l=Cr.findDOMNode(this.fieldInput);Je()(l).on("typeahead:change typeahead:selected",d=>{n&&n(d),s&&s.requestChange(d.target.value)})}}componentWillUnmount(){if(this.fieldInput){Je()(this.fieldInput.getInputDOMNode()).typeahead("destroy");const s=Cr.findDOMNode(this.fieldInput);Je()(s).off("typeahead:change typeahead:selected")}}render(){const{id:r,label:s,valueLink:n,error:o,onBlur:l}=this.props;return t.createElement(c.Input,{id:r,ref:d=>{this.fieldInput=d},label:s,onBlur:l,error:o,wrapperClassName:"typeahead-wrapper",defaultValue:n?n.value:null,...this._getFilteredProps()})}}Vn(Cl,"propTypes",{id:a().string.isRequired,valueLink:a().object,label:a().string,autoFocus:a().bool,onChange:a().func,onBlur:a().func,error:a().string}),Vn(Cl,"defaultProps",{valueLink:void 0,autoFocus:!1,label:void 0,onChange:()=>{},onBlur:()=>{},error:void 0});const fb=null;var jn=i("jdU8EhS8"),Tg=i("iG1AjSQm"),Rs=i.n(Tg),wg=i("PHWUskn4"),Ag=i.n(wg),Xr=i("A2KAXP9g"),Rg=i("EJi6viJm"),qn=i.n(Rg),xs=i("466uocAC"),Mr={};Mr.styleTagTransform=bs(),Mr.setAttributes=Es(),Mr.insert=vs().bind(null,"head"),Mr.domAPI=fs(),Mr.insertStyleElement=ys();var vb=hs()(xs.Z,Mr);const Eb=xs.Z&&xs.Z.locals?xs.Z.locals:void 0,Yn={debug:!1,positionClass:"toast-bottom-full-width",onclick:null,showDuration:300,hideDuration:1e3,timeOut:7e3,extendedTimeOut:1e3,escapeHtml:!0,closeButton:!0,closeHtml:"",progressBar:!0,preventDuplicates:!0},M={error(e,r){qn().error(e,r||"Error",{...Yn,timeOut:1e4})},warning(e,r){qn().warning(e,r||"Attention",Yn)},success(e,r){qn().success(e,r||"Information",Yn)}},Jn={testNaturalDate(e,r){const{url:s}=ie.Z.ToolsApiController.naturalDateTest(encodeURIComponent(e),encodeURIComponent(r)),n=(0,O.ZP)("GET",(0,U.DC)(s));return n.catch(o=>{o.additional.status!==422&&M.error(`Loading keyword preview failed with status: ${o}`,"Could not load keyword preview")}),n},testGrok(e,r,s){const{url:n}=ie.Z.ToolsApiController.grokTest(),o=(0,O.ZP)("POST",(0,U.DC)(n),{pattern:e,string:s,named_captures_only:r});return o.catch(l=>{M.error(`Details: ${l}`,"We were not able to run the grok extraction. Please check your parameters.")}),o},testJSON(e,r,s,n,o,l,d,g){const{url:h}=ie.Z.ToolsApiController.jsonTest(),v={flatten:e,list_separator:r,key_separator:s,kv_separator:n,replace_key_whitespace:o,key_whitespace_replacement:l,key_prefix:d,string:g},y=(0,O.ZP)("POST",(0,U.DC)(h),v);return y.catch(C=>{M.error(`Details: ${C}`,"We were not able to run the JSON extraction. Please check your parameters.")}),y},testRegexValidity(e){const r=Dt().encode(e),{url:s}=ie.Z.ToolsApiController.regexValidate(r),n=(0,O.ZP)("GET",(0,U.DC)(s));return n.catch(o=>{M.error(`Details: ${o}`,"Could not validate regular expression. Make sure that it is valid.")}),n},urlWhiteListCheck(e){const{url:r}=ie.Z.ToolsApiController.urlWhitelistCheck(),s=(0,O.ZP)("POST",(0,U.DC)(r),{url:e});return s.catch(n=>{M.error(`Details: ${n}`,"Could not verify if the url is in the whitelist.")}),s},urlWhiteListGenerateRegex(e,r){const{url:s}=ie.Z.ToolsApiController.urlWhitelistGenerateRegex(),n=(0,O.ZP)("POST",(0,U.DC)(s),{url_template:e,placeholder:r});return n.catch(o=>{M.error(`Details: ${o}`,"Could not generate regex.")}),n},testRegex(e,r){const{url:s}=ie.Z.ToolsApiController.regexTest(),n=(0,O.ZP)("POST",(0,U.DC)(s),{regex:e,string:r});return n.catch(o=>{M.error(`Details: ${o}`,"Could not try regular expression. Make sure that it is valid.")}),n},testRegexReplace(e,r,s,n){const{url:o}=ie.Z.ToolsApiController.regexReplaceTest(),l={regex:e,replacement:r,replace_all:s,string:n},d=(0,O.ZP)("POST",(0,U.DC)(o),l);return d.catch(g=>{M.error(`Details: ${g}`,"Could not try regular expression. Make sure that it is valid.")}),d},testSplitAndIndex(e,r,s){const{url:n}=ie.Z.ToolsApiController.splitAndIndexTest(),o={split_by:e,index:r,string:s},l=(0,O.ZP)("POST",(0,U.DC)(n),o);return l.catch(d=>{M.error(`Details: ${d}`,"We were not able to run the split and index extraction. Please check your parameters.")}),l},testSubstring(e,r,s){const{url:n}=ie.Z.ToolsApiController.substringTest(),o={start:e,end:r,string:s},l=(0,O.ZP)("POST",(0,U.DC)(n),o);return l.catch(d=>{M.error(`Details: ${d}`,"We were not able to run the substring extraction. Please check index boundaries.")}),l},testContainsString(e,r){const{url:s}=ie.Z.ToolsApiController.containsStringTest(),n=(0,O.ZP)("POST",(0,U.DC)(s),{search_string:e,string:r});return n.catch(o=>{M.error(`Details: ${o}`,"Could not check if field contains the string")}),n},testLookupTable(e,r){const{url:s}=ie.Z.ToolsApiController.lookupTableTest(),n=(0,O.ZP)("POST",(0,U.DC)(s),{lookup_table_name:e,string:r});return n.catch(o=>{M.error(`Details: ${o}`,"Could not check if lookup table translates the string")}),n}};var xg=i("0miigXwP");const Sl=()=>(0,xg.Z)(),Pg=(0,m.default)(c.Table)`
margin-top: 10px;
`,Tl=async(e,r,s)=>{const n={title:{valid:!1},value:{valid:!1}};n.title=r.title.trim().length<=0?{valid:!1}:{valid:!0};let o={valid:!1};return r.type==="literal"?o=(0,U.K2)(r.value)?{valid:!0}:{valid:!1}:r.type==="regex"&&r.value.trim().length>0&&(o=(await Jn.testRegexValidity(r.value)).is_valid?{valid:!0}:{valid:!1}),n.value=o,typeof s=="function"&&s(e,r,n),n},Ig=_n()(Tl,200),Xn=({urls:e,onUpdate:r,disabled:s,newEntryId:n})=>{const o="literal",l="regex",d=[{value:o,label:"Exact match"},{value:l,label:"Regex"}];let g={};const[h,v]=(0,t.useState)({entries:e,disabled:s}),[y,C]=(0,t.useState)({errors:[]}),R=(0,t.useRef)(!1),T=q=>{q.preventDefault(),v({...h,entries:[...h.entries,{id:Sl(),title:"",value:"",type:o}]})},P=(q,J)=>{q.preventDefault();let Q=Rs()(h);const be=Rs()(y);be.errors[J]=null,C(be),Q.entries.splice(J,1),v(Q)},z=(0,t.useCallback)(()=>{let q=!0;return y.errors.length>0&&y.errors.find(J=>(J&&J.title&&J.title.valid)===!1||J&&J.value&&J.value.valid===!1)&&(q=!1),q},[y]),X=(q,J)=>{const Q=Rs()(h);Q.entries[q]=J,v(Q)},se=(q,J,Q)=>{C(be=>{const re=Rs()(be);return re.errors[q]=Q,re}),X(q,J)},oe=async(q,J,Q)=>{const be={...h.entries[J],[q]:Q};await Ig(J,be,se)},Y=(q,J)=>{oe(q.target.name,J,Gt(q.target))},ge=(q,J)=>{oe("type",q,J)},ae=q=>q===l?"Not a valid Java regular expression":"Not a valid URL",_e=()=>h.entries.map((q,J)=>t.createElement("tr",{key:q.id},t.createElement("td",{style:{verticalAlign:"middle",textAlign:"center"}},J+1),t.createElement("td",null,t.createElement(Xr.Z,{type:"text",id:`title-input${J}`,ref:Q=>{g[`title${J}`]=Q},help:y.errors[J]&&y.errors[J].title&&!y.errors[J].title.valid?"Required field":null,name:"title",bsStyle:y.errors[J]&&y.errors[J].title&&!y.errors[J].title.valid?"error":null,onChange:Q=>Y(Q,J),defaultValue:q.title,required:!0})),t.createElement("td",null,t.createElement(Xr.Z,{type:"text",id:`value-input${J}`,ref:Q=>{g[`value${J}`]=Q},help:y.errors[J]&&y.errors[J].value&&!y.errors[J].value.valid?ae(q.type):null,name:"value",bsStyle:y.errors[J]&&y.errors[J].value&&!y.errors[J].value.valid?"error":null,onChange:Q=>Y(Q,J),defaultValue:q.value,required:!0})),t.createElement("td",null,t.createElement(Xr.Z,{id:`url-input-type-${J}`,required:!0,autoFocus:!0},t.createElement(We.Z,{clearable:!1,options:d,matchProp:"label",placeholder:"Select url type",onChange:Q=>ge(J,Q),value:q.type}))),t.createElement("td",null,t.createElement(c.Button,{onClick:Q=>P(Q,J)},t.createElement(pe.Z,{name:"trash-alt"}),t.createElement("span",{className:"sr-only"},"Delete entry")))));return(0,t.useEffect)(()=>{const q=async()=>{const Q=h.entries.findIndex(ce=>ce.id===n);if(Q<0)return!1;const be=h.entries[Q],re=await Tl(Q,be,se);return Ag()(re,"valid").some(ce=>!!ce)};(async Q=>{const be=Q&&n?await q():z();r(h,be)})(!R.current),R.current||(R.current=!0)},[h]),t.createElement(t.Fragment,null,t.createElement(Xr.Z,{type:"checkbox",id:"whitelist-disabled",label:"Disable Whitelist",checked:h.disabled,onChange:()=>v({...h,disabled:!h.disabled}),help:"Disable the whitelist functionality. Warning: Disabling this option will allow users to enter any URL in Graylog entities, which may pose a security risk."}),t.createElement(c.Button,{bsSize:"sm",onClick:q=>T(q)},"Add Url"),t.createElement(Pg,{striped:!0,bordered:!0},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,"#"),t.createElement("th",null,"Title"),t.createElement("th",null,"URL"),t.createElement("th",null,"Type"),t.createElement("th",null,"Actions"))),t.createElement("tbody",null,_e())),t.createElement(c.Button,{bsSize:"sm",onClick:q=>T(q)},"Add Url"))};Xn.propTypes={urls:a().array,disabled:a().bool,onUpdate:a().func,newEntryId:a().string},Xn.defaultProps={urls:[],disabled:!1,onUpdate:()=>{},newEntryId:void 0};const Dg=Xn,it=(0,ve.ei)("core.Configuration",()=>Ce().createActions({list:{asyncResult:!0},listSearchesClusterConfig:{asyncResult:!0},listMessageProcessorsConfig:{asyncResult:!0},listEventsClusterConfig:{asyncResult:!0},listIndexSetsDefaultsClusterConfig:{asyncResult:!0},listWhiteListConfig:{asyncResult:!0},listPermissionsConfig:{asyncResult:!0},listUserConfig:{asyncResult:!0},update:{asyncResult:!0},updateWhitelist:{asyncResult:!0},updateIndexSetDefaults:{asyncResult:!0},updateMessageProcessorsConfig:{asyncResult:!0}})),Mg=ie.Z.ClusterConfigResource.config().url,Lg=(0,ve.dS)("core.Configuration",()=>Ce().createStore({listenables:[it],configuration:{},searchesClusterConfig:{},eventsClusterConfig:{},indexSetsDefaultConfig:{},getInitialState(){return this.getState()},getState(){return{configuration:this.configuration,searchesClusterConfig:this.searchesClusterConfig,eventsClusterConfig:this.eventsClusterConfig,indexSetsDefaultConfig:this.indexSetsDefaultConfig}},propagateChanges(){this.trigger(this.getState())},_url(e){return(0,U.DC)(Mg+e)},list(e){const r=(0,O.ZP)("GET",this._url(`/${e}`));r.then(s=>(this.configuration={...this.configuration,[e]:s},this.propagateChanges(),s)),it.list.promise(r)},listSearchesClusterConfig(){const e=(0,O.ZP)("GET",this._url("/org.graylog2.indexer.searches.SearchesClusterConfig")).then(r=>(this.searchesClusterConfig=r,this.propagateChanges(),r));it.listSearchesClusterConfig.promise(e)},listMessageProcessorsConfig(e){const r=(0,O.ZP)("GET",(0,U.DC)("/system/messageprocessors/config")).then(s=>(this.configuration={...this.configuration,[e]:s},this.propagateChanges(),s));it.listMessageProcessorsConfig.promise(r)},listWhiteListConfig(e){const r=(0,O.ZP)("GET",(0,U.DC)("/system/urlwhitelist")).then(s=>(this.configuration={...this.configuration,[e]:s},this.propagateChanges(),s));it.listWhiteListConfig.promise(r)},listPermissionsConfig(e){const r=(0,O.ZP)("GET",this._url(`/${e}`)).then(s=>(this.configuration={...this.configuration,[e]:s||{allow_sharing_with_everyone:!0,allow_sharing_with_users:!0}},this.propagateChanges(),s));it.listPermissionsConfig.promise(r)},listUserConfig(e){const r=(0,O.ZP)("GET",this._url(`/${e}`)).then(s=>(this.configuration={...this.configuration,[e]:s||{enable_global_session_timeout:!1,global_session_timeout_interval:"PT1H"}},this.propagateChanges(),s));it.listUserConfig.promise(r)},listEventsClusterConfig(){const e=(0,O.ZP)("GET",this._url("/org.graylog.events.configuration.EventsConfiguration")).then(r=>(this.eventsClusterConfig=r,this.propagateChanges(),r));it.listEventsClusterConfig.promise(e)},listIndexSetsDefaultsClusterConfig(){const e=(0,O.ZP)("GET",this._url("/org.graylog2.configuration.IndexSetsDefaultConfiguration")).then(r=>(this.indexSetsDefaultConfig=r,this.propagateChanges(),r));it.listIndexSetsDefaultsClusterConfig.promise(e)},updateIndexSetDefaults(e,r){const s=(0,O.ZP)("PUT",(0,U.DC)("/system/indices/index_set_defaults"),r);s.then(()=>(this.configuration={...this.configuration,[e]:r},this.propagateChanges(),M.success("Index defaults configuration updated successfully"),r),n=>{M.error(n.additional.body.message,"Index defaults configuration update failed")}),it.updateIndexSetDefaults.promise(s)},update(e,r){const s=(0,O.ZP)("PUT",this._url(`/${e}`),r);s.then(n=>(this.configuration={...this.configuration,[e]:n},this.propagateChanges(),M.success("Configuration updated successfully"),n),n=>{M.error(`Search config update failed: ${n}`,`Could not update search config: ${e}`)}),it.update.promise(s)},updateWhitelist(e,r){const s=(0,O.ZP)("PUT",(0,U.DC)("/system/urlwhitelist"),r);s.then(()=>(this.configuration={...this.configuration,[e]:r},this.propagateChanges(),M.success("Url Whitelist Configuration updated successfully"),r),n=>{M.error(`Url Whitelist config update failed: ${n}`,`Could not update Url Whitelist: ${e}`)}),it.updateWhitelist.promise(s)},updateMessageProcessorsConfig(e,r){const s=(0,O.ZP)("PUT",(0,U.DC)("/system/messageprocessors/config"),r);s.then(n=>(this.configuration={...this.configuration,[e]:n},this.propagateChanges(),M.success("Configuration updated successfully"),n),n=>{M.error(`Message processors config update failed: ${n}`,`Could not update config: ${e}`)}),it.updateMessageProcessorsConfig.promise(s)}}));var Og=i("nFNIetA+");const Qn="org.graylog2.system.urlwhitelist.UrlWhitelist",ea=({newUrlEntry:e,urlType:r,onUpdate:s})=>{const n=(0,t.useRef)(),[o,l]=(0,t.useState)({entries:[],disabled:!1}),[d,g]=(0,t.useState)(!1),[h,v]=(0,t.useState)(),[y,C]=(0,t.useState)(!1),{configuration:R}=Ku(Lg),T=R[Qn],P=kt(),z=(0,Og.Z)();(0,t.useEffect)(()=>{Ye(P.permissions,["urlwhitelist:read"])&&it.listWhiteListConfig(Qn)},[P]);const X=(0,t.useCallback)(ae=>{const _e=Sl(),q={entries:[...ae.entries,{id:_e,title:"",value:e,type:r!=null?r:"literal"}],disabled:ae.disabled};v(_e),l(q)},[e,r]);(0,t.useEffect)(()=>{const{entries:ae}=o;T&&(ae.length===0||n.current!==e)&&X(T),n.current=e},[X,T,o,e,r]);const se=()=>{C(!0)},oe=()=>{C(!1),X(T)},Y=(ae,_e)=>{l(ae),g(_e)},ge=ae=>{ae&&(ae.preventDefault(),ae.stopPropagation()),z("form_submit",{app_section:"urlwhitelist",app_action_value:"configuration-update"}),d&&it.updateWhitelist(Qn,o).then(()=>{s(),oe()})};if(T){const{entries:ae,disabled:_e}=o;return t.createElement(t.Fragment,null,t.createElement(ir,{permissions:"urlwhitelist:write"},t.createElement(c.Button,{bsStyle:"info",bsSize:"xs",onClick:se},"Add to URL Whitelist")),t.createElement(jn.Z,{show:y,bsSize:"lg",title:"Update Whitelist Configuration",onCancel:oe,onSubmitForm:ge,submitButtonDisabled:!d,submitButtonText:"Update configuration"},t.createElement("h3",null,"Whitelist URLs"),t.createElement(Dg,{key:h,urls:ae,disabled:_e,onUpdate:Y,newEntryId:h})))}return null};ea.propTypes={newUrlEntry:a().string,onUpdate:a().func,urlType:a().oneOf(["regex","literal"])},ea.defaultProps={newUrlEntry:"",onUpdate:()=>{},urlType:void 0};const Ng=ea,wl=({label:e,onChange:r,validationMessage:s,validationState:n,url:o,onValidationChange:l,labelClassName:d,wrapperClassName:g,urlType:h,autofocus:v})=>{const[y,C]=(0,t.useState)(!1),[R,T]=(0,t.useState)(n),[P,z]=(0,t.useState)(s),X=(be,re)=>{const ce="${key}";return re&&re==="regex"&&(0,U.K2)(be)?Jn.urlWhiteListGenerateRegex(be,ce):be},[se,oe]=(0,t.useState)(o),Y=()=>R==="error"&&(0,U.K2)(o),ge=(0,t.useRef)(),ae=(0,t.useCallback)(()=>{o&&Jn.urlWhiteListCheck(o).then(re=>{if(!re.is_whitelisted&&n===null){T("error"),l("error");const ce=(0,U.K2)(o)?`URL ${o} is not whitelisted`:`URL ${o} is not a valid URL.`;z(ce)}else z(s),T(n),l(n);C(re.is_whitelisted)})},[o,s,n,l]),_e=()=>{El(ge.current.getInputDOMNode()),ae()};(0,t.useEffect)(()=>{const be=()=>{if(o){const ce=X(o,h);typeof ce=="object"?ce.then(Te=>{oe(Te.regex)}):oe(o)}},re=setTimeout(()=>be(),250);return()=>clearTimeout(re)},[o,h]),(0,t.useEffect)(()=>{const be=setTimeout(()=>ae(),250);return()=>clearTimeout(be)},[o,n,ae]);const q=Y()&&!y?t.createElement(Ng,{newUrlEntry:se,onUpdate:_e,urlType:h}):"",J=t.createElement(t.Fragment,null,n===null?P:s," ",q),Q=R===""?null:R;return t.createElement(c.Input,{type:"text",id:"url",name:"url",label:e,ref:ge,autoFocus:v,required:!0,onChange:r,help:J,bsStyle:Q,value:o,labelClassName:d,wrapperClassName:g})};wl.propTypes={autofocus:a().bool,label:a().string.isRequired,onChange:a().func.isRequired,validationState:a().string,validationMessage:a().oneOfType([a().object,a().string]),url:a().string,onValidationChange:a().func,labelClassName:a().string,wrapperClassName:a().string,urlType:a().oneOf(["regex","literal"])},wl.defaultProps={autofocus:!0,url:"",validationState:"",validationMessage:"",labelClassName:"",wrapperClassName:"",urlType:"literal",onValidationChange:()=>{}};const Cb=null;var $g=i("zz8lN1pr"),zg=i.n($g);const Ug=(0,m.default)(c.Col)(({theme:e})=>m.css`
border-right: ${e.colors.gray[80]} solid 1px;
`),Bg=(0,m.default)(c.Col)`
margin-bottom: 15px;
`,Fg=(0,m.default)(c.Nav)(({theme:e})=>m.css`
&.nav {
> li {
border: 1px solid ${e.colors.variant.lighter.default};
border-left: 0;
&:first-child {
border-left: 1px solid ${e.colors.variant.lighter.default};
border-radius: 4px 0 0 4px;
> a {
border-radius: 4px 0 0 4px;
}
}
&:last-child {
border-radius: 0 4px 4px 0;
> a {
border-radius: 0 4px 4px 0;
}
}
&:not(:last-child) > a {
::after {
transition: background-color 150ms ease-in-out;
background-color: ${e.colors.global.contentBackground};
border-color: ${e.colors.variant.lighter.default};
border-style: solid;
border-width: 0 1px 1px 0;
content: '';
display: block;
height: 15px;
position: absolute;
right: -1px;
top: 50%;
transform: translateY(-50%) translateX(50%) rotate(-45deg);
width: 15px;
z-index: 2;
}
:hover::after {
background-color: ${e.colors.variant.lightest.default};
}
}
&.active a {
&,
&:hover,
&::after,
&:hover::after {
background-color: ${e.colors.global.link};
}
}
> a {
border-radius: 0;
}
}
}
@media (max-width: ${e.breakpoints.max.md}) {
&.nav {
> li {
border-right: 0;
border-left: 0;
&:last-child a,
&:first-child a {
border-radius: 0;
}
&:not(:last-child) {
border-bottom: 0;
}
&:not(:last-child) > a {
::after {
bottom: 0;
left: 50%;
top: auto;
width: 10px;
height: 10px;
transform: translateY(50%) translateX(-50%) rotate(45deg);
}
}
}
&.nav-justified > li > a {
margin-bottom: 0;
}
}
}
`),Zg=(0,m.default)(c.ButtonToolbar)`
padding: 7px;
`;class Al extends t.Component{constructor(r){super(r),this._warnOnInvalidActiveStep=(s,n)=>{s!=null&&(this._isValidActiveStep(s,n)||console.warn(`activeStep ${s} is not a key in any element of the 'steps' prop!`))},this._isValidActiveStep=(s,n)=>s==null?!1:zg()(n,{key:s}),this._getSelectedStep=()=>{const{activeStep:s,steps:n}=this.props,{selectedStep:o}=this.state;return this._isValidActiveStep(s,n)?s:o},this._wizardChanged=s=>{const{activeStep:n,onStepChange:o}=this.props;o(s),n||this.setState({selectedStep:s})},this._disableButton=s=>{const{steps:n}=this.props,o=this._getSelectedStep(),l=n.length,d=s==="next"?l-1:0,g=n.findIndex(y=>y.key===this._getSelectedStep()),h=s==="next"?g+1:g-1,v=n[h];return n[d].key===o||(v==null?void 0:v.disabled)},this._onNext=()=>{const{steps:s}=this.props;this._wizardChanged(s[this._getSelectedIndex()+1].key)},this._onPrevious=()=>{const{steps:s}=this.props;this._wizardChanged(s[this._getSelectedIndex()-1].key)},this._getSelectedIndex=()=>{const{steps:s}=this.props,n=this._getSelectedStep();return s.map(o=>o.key).indexOf(n)},this._renderVerticalStepNav=()=>{const{justified:s,steps:n,hidePreviousNextButtons:o}=this.props,l=this._getSelectedStep();return t.createElement(Ug,{md:2},t.createElement(c.Nav,{stacked:!0,bsStyle:"pills",activeKey:l,onSelect:this._wizardChanged,justified:s},n.map(d=>t.createElement(c.NavItem,{key:d.key,eventKey:d.key,disabled:d.disabled},d.title))),!o&&t.createElement(t.Fragment,null,t.createElement("br",null),t.createElement(c.Row,null,t.createElement(c.Col,{xs:6},t.createElement(c.Button,{onClick:this._onPrevious,bsSize:"small",bsStyle:"info",disabled:this._disableButton("previous")},"Previous")),t.createElement(c.Col,{className:"text-right",xs:6},t.createElement(c.Button,{onClick:this._onNext,bsSize:"small",bsStyle:"info",disabled:this._disableButton("next")},"Next")))))},this._renderHorizontalStepNav=()=>{const s=this._getSelectedStep(),{justified:n,steps:o,hidePreviousNextButtons:l}=this.props;return t.createElement(Bg,{sm:12},!l&&t.createElement("div",{className:"pull-right"},t.createElement(Zg,null,t.createElement(c.Button,{onClick:this._onPrevious,bsSize:"xsmall",bsStyle:"info",disabled:this._disableButton("previous")},t.createElement(pe.Z,{name:"caret-left"})),t.createElement(c.Button,{onClick:this._onNext,bsSize:"xsmall",bsStyle:"info",disabled:this._disableButton("next")},t.createElement(pe.Z,{name:"caret-right"})))),t.createElement(Fg,{bsStyle:"pills",activeKey:s,onSelect:this._wizardChanged,justified:n},o.map(d=>t.createElement(c.NavItem,{key:d.key,eventKey:d.key,disabled:d.disabled},d.title))))},this._warnOnInvalidActiveStep(r.activeStep,r.steps),this.state={selectedStep:r.steps[0].key}}componentDidUpdate(){const{activeStep:r,steps:s}=this.props;this._warnOnInvalidActiveStep(r,s)}render(){const{steps:r,horizontal:s,containerClassName:n,children:o}=this.props;let l;o?l=7:l=s?12:10;const d=s?5:3;return t.createElement(c.Row,{className:n},s?this._renderHorizontalStepNav():this._renderVerticalStepNav(),t.createElement(c.Col,{md:l},r[this._getSelectedIndex()].component),o&&t.createElement(c.Col,{md:d},o))}}Al.propTypes={steps:a().arrayOf(a().object).isRequired,activeStep:a().oneOfType([a().string,a().number]),onStepChange:a().func,children:a().element,horizontal:a().bool,justified:a().bool,containerClassName:a().string,hidePreviousNextButtons:a().bool},Al.defaultProps={children:void 0,activeStep:void 0,onStepChange:()=>{},horizontal:!1,justified:!1,containerClassName:"content",hidePreviousNextButtons:!1};const Sb=null,Tb=(0,u.Z)(()=>Promise.all([i.e("e642b42f-735"),i.e("e642b42f-91")]).then(i.bind(i,"ZfHyuL7m")));var f=i("MdP8ATgg"),Lr=i("qH/4q9IH"),Xe=i("Azl/g5BR"),kg=i("3VgbVypm"),Wg=i.n(kg);const Rl=(e,r,s,n,o={})=>{let l=new(Dt())(e).addSearch("page",r).addSearch("per_page",s);return o&&Object.keys(o).forEach(d=>{const g=o[d],h=v=>typeof v.toString=="function"?v.toString():v;if(g!==void 0){if(Array.isArray(g)){g.forEach(v=>{l=l.addSearch(d,h(v))});return}l=l.addSearch(d,h(g))}}),n&&l.addSearch("query",encodeURIComponent(n)),l.toString()},_t=(0,ve.ei)("Streams",()=>Ce().createActions({searchPaginated:{asyncResult:!0},listStreams:{asyncResult:!0},load:{asyncResult:!0},get:{asyncResult:!0},remove:{asyncResult:!0},pause:{asyncResult:!0},resume:{asyncResult:!0},cloneStream:{asyncResult:!0},update:{asyncResult:!0},save:{asyncResult:!0},removeOutput:{asyncResult:!0},addOutput:{asyncResult:!0},testMatch:{asyncResult:!0}})),Ps=(0,ve.ei)("core.Preferences",()=>Ce().createActions({loadUserPreferences:{asyncResult:!0},saveUserPreferences:{asyncResult:!0}})),Kg=e=>{const r={};return Object.entries(e).forEach(([s,n])=>{n==="true"?r[s]=!0:n==="false"?r[s]=!1:r[s]=n}),r},Ab=(0,ve.dS)("core.Preferences",()=>Ce().createStore({listenables:[Ps],URL:(0,U.DC)("/users/"),saveUserPreferences(e,r,s=()=>{},n=!0){const o=Kg(r),l=`${this.URL+encodeURIComponent(e)}/preferences`,d=(0,O.ZP)("PUT",l,{preferences:o}).then(()=>{n&&M.success("User preferences successfully saved"),s(r)},g=>{M.error(`Saving of preferences for "${e}" failed with status: ${g}`,"Could not save user preferences")});return Ps.saveUserPreferences.promise(d),d},loadUserPreferences(e,r=()=>{}){const s=this.URL+encodeURIComponent(e),n=l=>{M.error(`Loading of user preferences for "${e}" failed with status: ${l}. Try reloading the page`,"Could not retrieve user preferences from server")},o=(0,O.ZP)("GET",s).then(l=>r(l==null?void 0:l.preferences),n);return Ps.loadUserPreferences.promise(o),o}})),Hg=(0,ve.dS)("core.Startpage",()=>Ce().createStore({listenables:[],set(e,r,s){const n=(0,U.DC)(ie.Z.UsersApiController.update(e).url),o={};return r&&s&&(o.type=r,o.id=s),(0,O.ZP)("PUT",n,{startpage:o}).then(l=>(this.trigger(),M.success("Your start page was changed successfully"),l),l=>M.error(`Changing your start page failed with error: ${l}`,"Could not change your start page"))}})),Qr=(0,ve.dS)("core.CurrentUser",()=>Ce().createStore({listenables:[Cn.SessionActions],currentUser:void 0,init(){this.listenTo(Cn.SessionStore,this.sessionUpdate,this.sessionUpdate),this.listenTo(Hg,this.reload,this.reload),Ps.saveUserPreferences.completed.listen(this.reload)},getInitialState(){return{currentUser:this.currentUser}},get(){return this.currentUser},sessionUpdate(e){if(e.username){const{username:r}=e;this.update(r)}else this.currentUser=void 0,this.trigger({currentUser:this.currentUser})},reload(){return this.currentUser!==void 0?this.update(this.currentUser.username):Promise.resolve()},update(e){return(0,O.ZP)("GET",(0,U.DC)(ie.Z.UsersApiController.loadByUsername(encodeURIComponent(e)).url)).then(r=>(this.currentUser=r,this.trigger({currentUser:this.currentUser}),r))}})),Lt=(0,ve.dS)("Streams",()=>Ce().createStore({listenables:[_t],callbacks:[],searchPaginated(e,r,s,n){const o=Rl(ie.Z.StreamsApiController.paginated().url,e,r,s,n),l=(0,O.ZP)("GET",(0,U.DC)(o)).then(d=>{const{elements:g,query:h,attributes:v,pagination:{count:y,total:C,page:R,per_page:T}}=d;return{elements:g,attributes:v,pagination:{count:y,total:C,page:R,perPage:T,query:h}}});return _t.searchPaginated.promise(l),l},listStreams(){const e="/streams",r=(0,O.ZP)("GET",(0,U.DC)(e)).then(s=>s.streams).catch(s=>{M.error(`Loading streams failed with status: ${s}`,"Could not load streams")});return _t.listStreams.promise(r),r},load(e){this.listStreams().then(r=>{e(r)})},remove(e){const r=(0,U.DC)(ie.Z.StreamsApiController.delete(e).url),s=(0,O.ZP)("DELETE",r).then(()=>Qr.reload().then(this._emitChange.bind(this)));return _t.remove.promise(s),s},pause(e,r){const s=l=>{M.error(`Pausing Stream failed with status: ${l}`,"Could not pause Stream")},n=(0,U.DC)(ie.Z.StreamsApiController.pause(e).url),o=(0,O.ZP)("POST",n).then(r,s).then(l=>(this._emitChange(),l));return _t.pause.promise(o),o},resume(e,r){const s=l=>{M.error(`Resuming Stream failed with status: ${l}`,"Could not resume Stream")},n=(0,U.DC)(ie.Z.StreamsApiController.resume(e).url),o=(0,O.ZP)("POST",n).then(r,s).then(l=>(this._emitChange(),l));return _t.resume.promise(o),o},save(e,r){const s=l=>{M.error(`Saving Stream failed with status: ${l}`,"Could not save Stream")},n=(0,U.DC)(ie.Z.StreamsApiController.create().url),o=(0,O.ZP)("POST",n,e).then(r,s).then(()=>Qr.reload().then(this._emitChange.bind(this)));return _t.save.promise(o),o},update(e,r,s){const n=d=>{M.error(`Updating Stream failed with status: ${d}`,"Could not update Stream")},o=(0,U.DC)(ie.Z.StreamsApiController.update(e).url),l=(0,O.ZP)("PUT",o,r).then(s,n).then(this._emitChange.bind(this));return _t.update.promise(l),l},cloneStream(e,r,s){const n=d=>{M.error(`Cloning Stream failed with status: ${d}`,"Could not clone Stream")},o=(0,U.DC)(ie.Z.StreamsApiController.cloneStream(e).url),l=(0,O.ZP)("POST",o,r).then(s,n).then(()=>Qr.reload().then(this._emitChange.bind(this)));return _t.cloneStream.promise(l),l},removeOutput(e,r,s){const n=(0,U.DC)(ie.Z.StreamOutputsApiController.delete(e,r).url),o=(0,O.ZP)("DELETE",n).then(s,l=>{M.error(`Removing output from stream failed with status: ${l}`,"Could not remove output from stream")}).then(this._emitChange.bind(this));return _t.removeOutput.promise(o),o},addOutput(e,r,s){const n=(0,U.DC)(ie.Z.StreamOutputsApiController.add(e).url),o=(0,O.ZP)("POST",n,{outputs:[r]}).then(s,l=>{M.error(`Adding output to stream failed with status: ${l}`,"Could not add output to stream")}).then(this._emitChange.bind(this));return _t.addOutput.promise(o),o},testMatch(e,r,s){const n=(0,U.DC)(ie.Z.StreamsApiController.testMatch(e).url),o=(0,O.ZP)("POST",n,r).then(s,l=>{M.error(`Testing stream rules of stream failed with status: ${l.message}`,"Could not test stream rules of stream")});return _t.testMatch.promise(o),o},onChange(e){this.callbacks.push(e)},_emitChange(){this.callbacks.forEach(e=>e())},unregister(e){Wg()(this.callbacks,e)}})),ot=Ce().createActions({list:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},deleteByName:{asyncResult:!0},update:{asyncResult:!0}}),Is={buildSourceURL(e){return`/plugins/com.airbus_cyber_security.graylog.wizard/${e}`}},es=Is.buildSourceURL("alerts"),Gg=Ce().createStore({listenables:[ot],alerts:void 0,init(){this.trigger({alerts:this.alerts})},list(){const e=(0,O.ZP)("GET",U.ZP.qualifyUrl(es)).then(r=>r,r=>{M.error(`Fetching alert rules failed with status: ${r}`,"Could not retrieve alert rules")});ot.list.promise(e)},get(e){const r=(0,O.ZP)("GET",U.ZP.qualifyUrl(es+"/"+encodeURIComponent(e))).then(s=>(this.trigger({alert:s}),s),s=>{M.error(`Fetching alert rule failed with status: ${s}`,"Could not retrieve alert rule")});ot.get.promise(r)},create(e){const r=U.ZP.qualifyUrl(es),s={title:e.title,severity:e.severity,description:e.description,condition_type:e.condition_type,condition_parameters:e.condition_parameters,stream:e.stream,second_stream:e.second_stream},n=(0,O.ZP)("POST",r,s).then(()=>(M.success("Stream successfully created, Alert condition successfully created, Alert notification successfully created"),!0),o=>{M.error(`Creating alert rule failed with status: ${o.message}`,"Could not create alert rule")});ot.create.promise(n)},update(e,r){const s=U.ZP.qualifyUrl(es+"/"+encodeURIComponent(e)),n="PUT",o={title:r.title,severity:r.severity,description:r.description,condition_type:r.condition_type,condition_parameters:r.condition_parameters,stream:r.stream,second_stream:r.second_stream},l=(0,O.ZP)(n,s,o).then(()=>(M.success("Alert rule successfully updated"),!0),d=>{M.error(`Updating alert rule failed with status: ${d.message}`,"Could not update alert rule")});ot.update.promise(l)},deleteByName(e){const r=U.ZP.qualifyUrl(es+"/"+encodeURIComponent(e)),s="DELETE",n=(0,O.ZP)(s,r).then(()=>(M.success("Alert rule successfully deleted"),null),o=>{M.error(`Deleting alert rule failed with status: ${o.message}`,"Could not delete alert rule")});ot.deleteByName.promise(n)}}),xl="/events/definitions";function Vg(e){const r=U.ZP.qualifyUrl(`${xl}/${e}/schedule`);return(0,O.ZP)("PUT",r).catch(s=>{M.error(`Enabling Event Definition "${e}" failed with status: ${s}`,"Could not enable Event Definition")})}function jg(e){const r=U.ZP.qualifyUrl(`${xl}/${e}/unschedule`);return(0,O.ZP)("PUT",r).catch(s=>{M.error(`Disabling Event Definition "${e}" failed with status: ${s}`,"Could not disable Event Definition")})}const Ds={enable:Vg,disable:jg};var pr=i("PC0+CT2t");const Pl=({target:e,disabled:r})=>{const n=(0,pr.Z)().formatMessage({id:"wizard.tooltipEventDefinition",defaultMessage:"Edit event definition for this alert rule"});return t.createElement(Xe.LinkContainer,{disabled:r,to:Ze.ALERTS.DEFINITIONS.edit(e)},t.createElement(c.Button,{bsStyle:"info",title:n},t.createElement(f.Z,{id:"wizard.eventDefinition",defaultMessage:"Event definition"})))};Pl.propTypes={target:a().string.isRequired,disabled:a().bool};const Il=Pl,qg=Be()({propTypes:{target:a().string.isRequired,disabled:a().bool},componentWillMount(){const{intl:e}=this.props,r=e.formatMessage({id:"wizard.tooltipNotification",defaultMessage:"Edit notification for this alert rule"});this.setState({tooltip:r})},render(){return t.createElement(Xe.LinkContainer,{disabled:this.props.disabled,to:Ze.ALERTS.NOTIFICATIONS.edit(this.props.target)},t.createElement(c.Button,{bsStyle:"info",title:this.state.tooltip},t.createElement(f.Z,{id:"wizard.notification",defaultMessage:"Notification"})))}}),Dl=(0,Lr.ZP)(qg),Ml=({title:e,disabled:r=!1,onSubmit:s,messages:n})=>{const[o,l]=(0,t.useState)({title:"",description:""}),[d,g]=(0,t.useState)(!1),h=()=>{g(!0)},v=()=>{g(!1)},y=()=>{s(e,o.title,o.description),v()},C=R=>{const T={...o,[R.target.name]:R.target.value};l(T)};return t.createElement(t.Fragment,null,t.createElement(c.Button,{type:"button",bsStyle:"info",onClick:h,disabled:r,title:n.infoClone},t.createElement(f.Z,{id:"wizard.clone",defaultMessage:"Clone"})),t.createElement(jn.Z,{show:d,title:n.modalTitle,onCancel:v,onSubmitForm:y,cancelButtonText:t.createElement(f.Z,{id:"wizard.cancel",defaultMessage:"Cancel"}),submitButtonText:t.createElement(f.Z,{id:"wizard.save",defaultMessage:"Save"})},t.createElement(c.Input,{id:"title",type:"text",required:!0,label:t.createElement(f.Z,{id:"wizard.title",defaultMessage:"Title"}),name:"title",placeholder:n.placeholderTitle,onChange:C,autoFocus:!0}),t.createElement(c.Input,{id:"description",type:"text",label:t.createElement(f.Z,{id:"wizard.fieldDescription",defaultMessage:"Description"}),name:"description",onChange:C})))},Yg=({alertTitle:e,disabled:r=!1,onSubmit:s})=>{const n=(0,pr.Z)(),o={infoClone:n.formatMessage({id:"wizard.buttonInfoClone",defaultMessage:"Clone this alert rule"}),placeholderTitle:n.formatMessage({id:"wizard.placeholderCloneTitle",defaultMessage:"A descriptive name of the new alert rule"}),modalTitle:t.createElement(f.Z,{id:"wizard.cloneAlertRule",defaultMessage:'Cloning Alert Rule "{title}"',values:{title:e}})};return t.createElement(Ml,{title:e,disabled:r,onSubmit:s,messages:o})};var Jg=i("NV2C8ebe"),Xg=i.n(Jg),Qg=i("DUKaTDO2");const je={Compound:"compound",Enumerable:"enumerable",FullTextSearch:"full-text-search",Numeric:"numeric",Decorated:"decorated"},ts=class{constructor(e,r,s){this.value=Wt.Map({type:e,properties:Wt.Set(r),indexNames:Wt.Set(s)})}get type(){return this.value.get("type")}get properties(){return this.value.get("properties")}get indexNames(){return this.value.get("indexNames")}isNumeric(){return this.properties.has(je.Numeric)}isEnumerable(){return this.properties.has(je.Enumerable)}isCompound(){return this.properties.has(je.Compound)}isDecorated(){return this.properties.has(je.Decorated)}static fromJSON(e){const{type:r,properties:s,index_names:n}=e;return new ts(r,s,n)}static create(e,r=[],s=[]){return new ts(e,r,s)}};let Ms=ts;Ms.Unknown=new ts("unknown",[],[]),Ms.Decorated=new ts("decorated field",[je.Decorated],[]);const eh=Ms,mt=(e,r=[])=>(s=[])=>Ms.create(e,r,s),Lb={STRING:mt("string",[je.Enumerable]),STRING_FTS:mt("string",[je.FullTextSearch]),LONG:mt("long",[je.Numeric,je.Enumerable]),INT:mt("int",[je.Numeric,je.Enumerable]),SHORT:mt("short",[je.Numeric,je.Enumerable]),BYTE:mt("byte",[je.Numeric,je.Enumerable]),DOUBLE:mt("double",[je.Numeric,je.Enumerable]),FLOAT:mt("float",[je.Numeric,je.Enumerable]),DATE:mt("date",[je.Enumerable]),BOOLEAN:mt("boolean",[je.Enumerable]),BINARY:mt("binary",[]),GEO_POINT:mt("geo-point",[]),IP:mt("ip",[je.Enumerable])};class Ls{constructor(r,s){this.value={name:r,type:s}}get name(){return this.value.name}get type(){return this.value.type}static fromJSON(r){const{name:s,type:n}=r;return new Ls(s,eh.fromJSON(n))}static create(r,s){return new Ls(r,s)}}const th=Ls,rh=(0,U.DC)("/views/fields"),sh=e=>e.map(r=>th.fromJSON(r)),nh=(e,r)=>{let s={};return e&&e.length>0&&(s={streams:e}),r&&(s={...s,timerange:r}),s},ah=(e,r)=>(0,O.ZP)("POST",rh,nh(e,r)).then(sh),oh=(e,r)=>{switch(e==null?void 0:e.type){case"absolute":return{type:"absolute",from:He(St(e.from,r),"internal"),to:He(St(e.to,r),"internal")};default:return e}},lh=(e,r)=>{const{userTimezone:s}=gs(),n=(0,t.useMemo)(()=>oh(r,s),[r,s]);return(0,Qg.useQuery)(["fieldTypes",e,n],()=>ah(e,n),{staleTime:3e4,refetchOnWindowFocus:!1,cacheTime:0})},ih=(0,ve.ri)("hooks.useFieldTypes",()=>lh),ch=Xg().memoize(e=>e.sort((r,s)=>we(r.name,s.name)).map(r=>({label:`${r.name} \u2013 ${r.value.type.type}`,value:r.name})),e=>e.map(r=>r.name).join("-"));function ta(e){return s=>{const{data:n}=ih([],Ud);if(!n)return t.createElement(st.Z,{text:"Loading, please wait..."});const l=ch(n);return t.createElement(e,{formattedFields:l,...s})}}const Ll=[{value:"AVG",label:t.createElement(f.Z,{id:"wizard.meanValue",defaultMessage:"average value"})},{value:"STDDEV",label:t.createElement(f.Z,{id:"wizard.standardDeviation",defaultMessage:"standard deviation"})},{value:"MIN",label:t.createElement(f.Z,{id:"wizard.minValue",defaultMessage:"min value"})},{value:"MAX",label:t.createElement(f.Z,{id:"wizard.maxValue",defaultMessage:"max value"})},{value:"SUM",label:t.createElement(f.Z,{id:"wizard.sum",defaultMessage:"sum"})},{value:"CARD",label:t.createElement(f.Z,{id:"wizard.card",defaultMessage:"cardinality"})},{value:"COUNT",label:t.createElement(f.Z,{id:"wizard.count",defaultMessage:"count"})},{value:"SUMOFSQUARES",label:t.createElement(f.Z,{id:"wizard.sumOfSquares",defaultMessage:"sum of squares"})},{value:"VARIANCE",label:t.createElement(f.Z,{id:"wizard.variance",defaultMessage:"variance"})}],dh=[{value:">",label:t.createElement(f.Z,{id:"wizard.higher",defaultMessage:"higher than"})},{value:">=",label:t.createElement(f.Z,{id:"wizard.higherEqual",defaultMessage:"higher or equal than"})},{value:"<",label:t.createElement(f.Z,{id:"wizard.lower",defaultMessage:"lower than"})},{value:"<=",label:t.createElement(f.Z,{id:"wizard.lowerEqual",defaultMessage:"lower or equal than"})},{value:"==",label:t.createElement(f.Z,{id:"wizard.equal",defaultMessage:"equal"})}],Ol=({type:e,field:r,thresholdType:s,threshold:n,formattedFields:o,onUpdate:l})=>{const[d,g]=(0,t.useState)(n),h=R=>{l("type",R)},v=R=>{l("field",R)},y=R=>{const T=R.target.value;g(T),l("threshold",T)},C=R=>{l("threshold_type",R)};return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.statisticalInput",defaultMessage:"Statistical Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.the",defaultMessage:"The"})),t.createElement(c.Input,{id:"type",name:"type",required:!0},t.createElement("div",{style:{width:"200px"}},t.createElement(We.Z,{required:!0,clearable:!1,value:e,options:Ll,matchProp:"value",onChange:h,placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."})}))),t.createElement("label",null,"\xA0 "),t.createElement("label",null,t.createElement(f.Z,{id:"wizard.of",defaultMessage:"of"})),t.createElement(c.Input,{id:"field",name:"field"},t.createElement("div",{style:{width:"200px"}},t.createElement(We.Z,{required:!0,value:r,options:o,matchProp:"value",onChange:v,allowCreate:!0,placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."})}))),t.createElement("label",null,"\xA0"),t.createElement("label",null,t.createElement(f.Z,{id:"wizard.mustBe",defaultMessage:"must be"})),t.createElement(c.Input,{id:"threshold_type",name:"threshold_type",required:!0},t.createElement("div",{style:{width:"200px"}},t.createElement(We.Z,{required:!0,clearable:!1,value:s,options:dh,matchProp:"value",onChange:C,placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."})}))),t.createElement(c.Input,{id:"threshold",name:"threshold",type:"number",min:"0",onChange:y,value:d,style:{borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",height:"36px",width:"100px"}})))};Ol.propTypes={onUpdate:a().func.isRequired,formattedFields:a().array.isRequired};const uh=ta(Ol),ph=Be()({displayName:"AlertRuleText",propTypes:{alert:a().object},_isLoading(){return!this.props.alert},_availableMatchingTypes(){return[{value:"AND",label:t.createElement(f.Z,{id:"wizard.all",defaultMessage:"all"})},{value:"OR",label:t.createElement(f.Z,{id:"wizard.atLeastOne",defaultMessage:"at least one"})}]},_getMatchingType(e){return this._availableMatchingTypes().filter(r=>r.value===e)[0].label},_availableThresholdTypes(){return[{value:">",label:t.createElement(f.Z,{id:"wizard.more",defaultMessage:"more than"})},{value:"<",label:t.createElement(f.Z,{id:"wizard.less",defaultMessage:"less than"})},{value:">",label:t.createElement(f.Z,{id:"wizard.higher",defaultMessage:"higher than"})},{value:">=",label:t.createElement(f.Z,{id:"wizard.higherEqual",defaultMessage:"higher or equal than"})},{value:"<",label:t.createElement(f.Z,{id:"wizard.lower",defaultMessage:"lower than"})},{value:"<=",label:t.createElement(f.Z,{id:"wizard.lowerEqual",defaultMessage:"lower or equal than"})},{value:"==",label:t.createElement(f.Z,{id:"wizard.equal",defaultMessage:"equal"})}]},_getThresholdType(e){return this._availableThresholdTypes().filter(r=>r.value===e)[0].label},_getAggregationType(e){return Ll.filter(r=>r.value===e)[0].label},_availableRuleType(){return[{value:1,label:t.createElement(f.Z,{id:"wizard.matchesExactly",defaultMessage:"matches exactly"})},{value:-1,label:t.createElement(f.Z,{id:"wizard.notMatchesExactly",defaultMessage:"does not match exactly"})},{value:2,label:t.createElement(f.Z,{id:"wizard.matchesRegularExpression",defaultMessage:"matches regular expression"})},{value:-2,label:t.createElement(f.Z,{id:"wizard.notMatchRegularExpression",defaultMessage:"does not match regular expression"})},{value:3,label:t.createElement(f.Z,{id:"wizard.greaterThan",defaultMessage:"is greater than"})},{value:-3,label:t.createElement(f.Z,{id:"wizard.notGreaterThan",defaultMessage:"is not greater than"})},{value:4,label:t.createElement(f.Z,{id:"wizard.smallerThan",defaultMessage:"is smaller than"})},{value:-4,label:t.createElement(f.Z,{id:"wizard.notSmallerThan",defaultMessage:"is not smaller than"})},{value:5,label:t.createElement(f.Z,{id:"wizard.present",defaultMessage:"is present"})},{value:-5,label:t.createElement(f.Z,{id:"wizard.notPresent",defaultMessage:"is not present"})},{value:6,label:t.createElement(f.Z,{id:"wizard.contains",defaultMessage:"contains"})},{value:-6,label:t.createElement(f.Z,{id:"wizard.notContain",defaultMessage:"does not contain"})},{value:7,label:t.createElement(f.Z,{id:"wizard.listpresent",defaultMessage:"is present in list"})},{value:-7,label:t.createElement(f.Z,{id:"wizard.listnotpresent",defaultMessage:"is not present in list"})}]},_getRuleType(e){return this._availableRuleType().filter(r=>r.value===e)[0].label},_getTextFieldRule(e){let r=[];if(e!==null)for(let s=0;s0&&e.push(this._getGroupByRule()),this.props.alert.condition_parameters.distinct_by!==""&&e.push(this._getDistinctByRule()),e.push(this._getMatchRule(this.props.alert.stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.stream))):this.props.alert.condition_type==="THEN"?(e.push(this._getTriggerRule()),this.props.alert.condition_parameters.grouping_fields&&this.props.alert.condition_parameters.grouping_fields.length>0&&e.push(this._getGroupByRule()),e.push(this._getMatchRule(this.props.alert.stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.stream)),e.push(t.createElement(f.Z,{id:"wizard.ThenRule",defaultMessage:"followed by {threshold_type} {threshold} messages ",values:{threshold_type:t.createElement("strong",null,this._getThresholdType(this.props.alert.condition_parameters.additional_threshold_type)),threshold:t.createElement("strong",null,this.props.alert.condition_parameters.additional_threshold)}})),this.props.alert.condition_parameters.grouping_fields&&this.props.alert.condition_parameters.grouping_fields.length>0&&e.push(this._getGroupByRule()),e.push(this._getMatchRule(this.props.alert.second_stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.second_stream))):this.props.alert.condition_type==="AND"?(e.push(this._getTriggerRule()),this.props.alert.condition_parameters.grouping_fields&&this.props.alert.condition_parameters.grouping_fields.length>0&&e.push(this._getGroupByRule()),e.push(this._getMatchRule(this.props.alert.stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.stream)),e.push(t.createElement(f.Z,{id:"wizard.AndRule",defaultMessage:"AND when there are {threshold_type} {threshold} messages ",values:{threshold_type:t.createElement("strong",null,this._getThresholdType(this.props.alert.condition_parameters.additional_threshold_type)),threshold:t.createElement("strong",null,this.props.alert.condition_parameters.additional_threshold)}})),this.props.alert.condition_parameters.grouping_fields&&this.props.alert.condition_parameters.grouping_fields.length>0&&e.push(this._getGroupByRule()),e.push(this._getMatchRule(this.props.alert.second_stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.second_stream))):this.props.alert.condition_type==="OR"?(e.push(this._getTriggerRule()),e.push(this._getMatchRule(this.props.alert.stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.stream)),e.push(t.createElement(f.Z,{id:"wizard.or",defaultMessage:"OR "})),e.push(this._getMatchRule(this.props.alert.second_stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.second_stream))):(e.push(this._getTriggerRule()),e.push(this._getMatchRule(this.props.alert.stream.matching_type)),e.push(this._getTextFieldRule(this.props.alert.stream)))),t.createElement("span",{style:{whiteSpace:"pre-line"}},e)}catch{return t.createElement("span",null)}}}),mh=Be()({displayName:"AlertRuleList",mixins:[Ce().connect(Gg),dt],propTypes:{field_order:a().array.isRequired},getInitialState(){const{intl:e}=this.props,r={title:e.formatMessage({id:"wizard.title",defaultMessage:"Title"}),severity:e.formatMessage({id:"wizard.severity",defaultMessage:"Severity"}),description:e.formatMessage({id:"wizard.fieldDescription",defaultMessage:"Description"}),created:e.formatMessage({id:"wizard.created",defaultMessage:"Created"}),lastModified:e.formatMessage({id:"wizard.lastModified",defaultMessage:"Last Modified"}),user:e.formatMessage({id:"wizard.user",defaultMessage:"User"}),status:e.formatMessage({id:"wizard.status",defaultMessage:"Status"}),actions:e.formatMessage({id:"wizard.actions",defaultMessage:"Actions"}),rule:e.formatMessage({id:"wizard.rule",defaultMessage:"Rule"})},s={infoDelete:e.formatMessage({id:"wizard.buttonInfoDelete",defaultMessage:"Delete this alert rule"}),infoUpdate:e.formatMessage({id:"wizard.buttonInfoUpdate",defaultMessage:"Edit this alert rule"}),infoEnable:e.formatMessage({id:"wizard.buttonInfoEnable",defaultMessage:"Enable this alert rule"}),infoDisable:e.formatMessage({id:"wizard.buttonInfoDisable",defaultMessage:"Disable this alert rule"}),createAlert:e.formatMessage({id:"wizard.createAlert",defaultMessage:"Create alert rule"}),importAlert:e.formatMessage({id:"wizard.importAlert",defaultMessage:"Import alert rules"}),exportAlert:e.formatMessage({id:"wizard.exportAlert",defaultMessage:"Export alert rules"}),confirmDeletion:e.formatMessage({id:"wizard.confirmDeletion",defaultMessage:"Do you really want to delete the alert rule"}),confirmDisable:e.formatMessage({id:"wizard.confirmDisable",defaultMessage:"Do you really want to disable the alert rule"})};return{fieldsTitle:r,messages:s}},componentDidMount(){this.list()},list(){ot.list().then(e=>{this.setState({alerts:e})})},_deleteAlert(e){window.confirm(`${this.state.messages.confirmDeletion} "${e}" ?`)&&ot.deleteByName(e).then(()=>this.list())},_onResume(e,r,s,n){return async()=>{const o=[];o.push(Ds.enable(e)),Lt.resume(r,l=>l).finally(()=>this.list()),s!==null&&o.push(Ds.enable(s)),n!==null&&Lt.resume(n,l=>l).finally(()=>this.list()),await Promise.all(o)}},_onPause(e,r,s,n,o){return async()=>{if(!window.confirm(`${this.state.messages.confirmDisable} "${e}" ?`))return;const l=[];l.push(Ds.disable(r)),Lt.pause(s,d=>d).finally(()=>this.list()),n&&l.push(Ds.disable(n)),o!==null&&Lt.pause(o,d=>d),await Promise.all(l)}},_headerCellFormatter(e){return e==this.state.fieldsTitle.actions?t.createElement("th",{className:"actions"},e):t.createElement("th",null,e)},_onCloneSubmit(e,r,s){ot.get(e).then(n=>{const o={title:r,description:s,severity:n.severity,condition_type:n.condition_type,condition_parameters:n.condition_parameters,stream:n.stream,second_stream:n.second_stream};ot.create(o).finally(()=>this.list())})},_availableSeverityTypes(){return[{value:"info",label:t.createElement(f.Z,{id:"wizard.info",defaultMessage:"Info"})},{value:"low",label:t.createElement(f.Z,{id:"wizard.low",defaultMessage:"Low"})},{value:"medium",label:t.createElement(f.Z,{id:"wizard.medium",defaultMessage:"Medium"})},{value:"high",label:t.createElement(f.Z,{id:"wizard.high",defaultMessage:"High"})}]},_getSeverityType(e){return this._availableSeverityTypes().filter(r=>r.value===e)[0].label},_availableFieldName(){const e=t.createElement(c.Tooltip,{id:"default-user-tooltip"},t.createElement(f.Z,{id:"wizard.tooltipUser",defaultMessage:"The last user who modified the alert rule"})),r=t.createElement(Gr,{overlay:e,placement:"top",useOverlay:!0,trigger:["hover","focus"]},this.state.fieldsTitle.user);return[{value:"Severity",label:this.state.fieldsTitle.severity},{value:"Description",label:this.state.fieldsTitle.description},{value:"Created",label:this.state.fieldsTitle.created},{value:"Last Modified",label:this.state.fieldsTitle.lastModified},{value:"User",label:r},{value:"Status",label:this.state.fieldsTitle.status},{value:"Rule",label:this.state.fieldsTitle.rule}]},_getFieldName(e){return this._availableFieldName().filter(r=>r.value===e)[0].label},_alertInfoFormatter(e){let r=!0,s="";e.condition===null||e.condition_parameters===null||e.stream===null||e.notification===null?(r=!1,s="text-danger"):e.disabled&&(s="text-muted");let n="";e.stream&&(n=e.stream.id);let o=null;e.second_stream&&(o=e.second_stream.id);const l=t.createElement(ir,{permissions:"wizard_alerts_rules:delete"},t.createElement("button",{id:"delete-alert",type:"button",className:"btn btn-primary",title:this.state.messages.infoDelete,onClick:()=>this._deleteAlert(e.title)},t.createElement(f.Z,{id:"wizard.delete",defaultMessage:"Delete"}))),d=t.createElement(ir,{permissions:"wizard_alerts_rules:read"},t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_UPDATEALERT_ALERTRULETITLE")(e.title.replace(/\//g,"%2F")),disabled:!r},t.createElement(c.Button,{bsStyle:"info",type:"submit",title:this.state.messages.infoUpdate},t.createElement(f.Z,{id:"wizard.edit",defaultMessage:"Edit"}))));let g;e.disabled?g=t.createElement(c.Button,{bsStyle:"success",onClick:this._onResume(e.condition,n,e.second_event_definition,o),disabled:!r,title:this.state.messages.infoEnable,style:{whiteSpace:"pre"}},t.createElement(f.Z,{id:"wizard.enable",defaultMessage:"Enable "})):g=t.createElement(c.Button,{bsStyle:"primary",onClick:this._onPause(e.title,e.condition,n,e.second_event_definition,o),disabled:!r,title:this.state.messages.infoDisable},t.createElement(f.Z,{id:"wizard.disable",defaultMessage:"Disable"}));const h=t.createElement(Yg,{alertTitle:e.title,disabled:!r,onSubmit:this._onCloneSubmit}),v=t.createElement("div",{className:"pull-left"},d," ",t.createElement(Il,{target:e.condition,disabled:!r})," ",t.createElement(Dl,{target:e.notification,disabled:!r})," ",h," ",l," ",g," ");let y=[t.createElement("td",{className:"limited"},e.title)];return this.props.field_order.map(C=>{if(C.enabled)switch(C.name){case"Severity":y.push(t.createElement("td",{className:"limited"},e.severity?this._getSeverityType(e.severity):""));break;case"Description":y.push(t.createElement("td",{className:"limited"},t.createElement("span",{style:{whiteSpace:"pre-line"}},e.description)));break;case"Created":y.push(t.createElement("td",{className:"limited"},t.createElement(Ir,{dateTime:De(e.created_at),relative:!0})));break;case"Last Modified":y.push(t.createElement("td",{className:"limited"},t.createElement(Ir,{dateTime:De(e.last_modified),relative:!0})));break;case"User":y.push(t.createElement("td",{className:"limited"},e.creator_user_id));break;case"Status":r?y.push(t.createElement("td",{className:"limited"},e.disabled?t.createElement("span",{style:{backgroundColor:"orange",color:"white"}},t.createElement(f.Z,{id:"wizard.disabled",defaultMessage:"Disabled"})):t.createElement(f.Z,{id:"wizard.enabled",defaultMessage:"Enabled"}))):y.push(t.createElement("td",{className:"limited"},t.createElement(f.Z,{id:"wizard.corrupted",defaultMessage:"Corrupted"})));break;case"Rule":y.push(t.createElement("td",{className:"limited"},t.createElement(ph,{alert:e})));break;default:break}}),t.createElement("tr",{key:e.title,className:s},y,t.createElement("td",{style:{whiteSpace:"nowrap"}},v))},render(){const e=["title","severity","created_at","last_modified","creator_user_id"];let r=[this.state.fieldsTitle.title];if(this.props.field_order.map(s=>{s.enabled&&r.push(this._getFieldName(s.name))}),r.push(this.state.fieldsTitle.actions),this.state.alerts){const s=this.props.intl.formatMessage({id:"wizard.filter",defaultMessage:"Filter alert rules"});return t.createElement("div",null,t.createElement("div",{className:"pull-right has-bm"},t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_NEWALERT")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.createAlert},t.createElement(f.Z,{id:"wizard.create",defaultMessage:"Create"})))," ",t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_IMPORTALERT")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.importAlert},t.createElement(f.Z,{id:"wizard.import",defaultMessage:"Import"})))," ",t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_EXPORTALERT")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.exportAlert},t.createElement(f.Z,{id:"wizard.export",defaultMessage:"Export"})))),t.createElement(ln,{id:"alert-list",className:"table-hover",headers:r,headerCellFormatter:this._headerCellFormatter,sortByKey:"title",rows:this.state.alerts,filterBy:"title",dataRowFormatter:this._alertInfoFormatter,filterLabel:s,filterKeys:e}))}return t.createElement(st.Z,null)}}),gh=(0,Lr.ZP)(mh),hh=Be()({displayName:"ManageSettings",propTypes:{onSave:a().func.isRequired,config:a().object.isRequired},getInitialState(){return{config:{field_order:this.props.config.field_order,default_values:this.props.config.default_values,import_policy:this.props.config.import_policy},showModal:!1}},componentDidMount(){this.setState({config:this.props.config})},_openModal(){this.setState({showModal:!0})},_closeModal(){this.setState({showModal:!1})},_saveConfig(){this.props.onSave(this.state.config),this._closeModal()},_resetConfig(){this.setState(this.getInitialState())},_availableFieldName(){return[{value:"Severity",label:t.createElement(f.Z,{id:"wizard.severity",defaultMessage:"Severity"})},{value:"Description",label:t.createElement(f.Z,{id:"wizard.fieldDescription",defaultMessage:"Description"})},{value:"Created",label:t.createElement(f.Z,{id:"wizard.created",defaultMessage:"Created"})},{value:"Last Modified",label:t.createElement(f.Z,{id:"wizard.lastModified",defaultMessage:"Last Modified"})},{value:"User",label:t.createElement(f.Z,{id:"wizard.user",defaultMessage:"User"})},{value:"Status",label:t.createElement(f.Z,{id:"wizard.status",defaultMessage:"Status"})},{value:"Rule",label:t.createElement(f.Z,{id:"wizard.rule",defaultMessage:"Rule"})}]},_getFieldName(e){return this._availableFieldName().filter(r=>r.value===e)[0].label},_updateSorting(e){const r=Se.clone(this.state.config);r.field_order=e.map(s=>({name:s.id,enabled:s.enabled})),this.setState({config:r})},_sortableItems(){return this.state.config.field_order.map(e=>({id:e.name,title:this._getFieldName(e.name),enabled:e.enabled}))},_toggleStatus(e){return()=>{let r=Se.clone(this.state.config);r.field_order[e].enabled=this.refs[e].checked,this.setState({config:r})}},_statusForm(){return Se.clone(this.state.config.field_order).map((e,r)=>t.createElement("tr",{key:r},t.createElement("td",null,this._getFieldName(e.name)),t.createElement("td",null,t.createElement("input",{ref:r,type:"checkbox",checked:e.enabled,onChange:this._toggleStatus(r)}))))},_isLoading(){return!this.state.config},_availableSeverityTypes(){return[{value:"info",label:t.createElement(f.Z,{id:"wizard.info",defaultMessage:"Info"})},{value:"low",label:t.createElement(f.Z,{id:"wizard.low",defaultMessage:"Low"})},{value:"medium",label:t.createElement(f.Z,{id:"wizard.medium",defaultMessage:"Medium"})},{value:"high",label:t.createElement(f.Z,{id:"wizard.high",defaultMessage:"High"})}]},_availableMatchingType(){return[{value:"AND",label:t.createElement(f.Z,{id:"wizard.all",defaultMessage:"all"})},{value:"OR",label:t.createElement(f.Z,{id:"wizard.atLeastOne",defaultMessage:"at least one"})}]},_availableThresholdTypes(){return[{value:">",label:t.createElement(f.Z,{id:"wizard.more",defaultMessage:"more than"})},{value:"<",label:t.createElement(f.Z,{id:"wizard.less",defaultMessage:"less than"})}]},_availableTimeTypes(){return[{value:"1",label:t.createElement(f.Z,{id:"wizard.minutes",defaultMessage:"minutes"})},{value:"60",label:t.createElement(f.Z,{id:"wizard.hours",defaultMessage:"hours"})},{value:"1440",label:t.createElement(f.Z,{id:"wizard.days",defaultMessage:"days"})}]},_updateConfig(e,r){const s=Se.clone(this.state.config);s.default_values[e]=r,this.setState({config:s})},_onValueChanged(e){return r=>{this._updateConfig(e,r.target.value)}},_onSeverityTypeSelect(e){this._updateConfig("severity",e)},_onMatchingTypeSelect(e){this._updateConfig("matching_type",e)},_onThresholdTypeSelect(e){this._updateConfig("threshold_type",e)},_onTimeTypeSelect(e){this._updateConfig("time_type",parseInt(e))},_onCheckboxClick(e){this._updateConfig(e.target.name,e.target.checked)},_onRadioChange(e){const r=Se.clone(this.state.config);r.import_policy=yl.getValueFromInput(e.target),this.setState({config:r})},render(){if(this._isLoading())return t.createElement(st.Z,null);const e=t.createElement(c.Tooltip,{id:"doNothing-tooltip"},t.createElement(f.Z,{id:"wizard.tooltipReplace",defaultMessage:"Replace the alert rule with the one you are importing"})),r=t.createElement(c.Tooltip,{id:"doNothing-tooltip"},t.createElement(f.Z,{id:"wizard.tooltipDoNothing",defaultMessage:"No alert rules will be changed"})),s=t.createElement(c.Tooltip,{id:"doNothing-tooltip"},t.createElement(f.Z,{id:"wizard.tooltipRename",defaultMessage:"The alert rule you are importing will be renamed "}));return t.createElement("span",null,t.createElement(c.Button,{bsStyle:"info",onClick:this._openModal},t.createElement(f.Z,{id:"wizard.manageSettings",defaultMessage:"Manage settings"})),t.createElement(c.BootstrapModalForm,{show:this.state.showModal,title:t.createElement(f.Z,{id:"wizard.manageWizardSettings",defaultMessage:"Manage Wizard settings"}),onSubmitForm:this._saveConfig,onCancel:this._resetConfig,cancelButtonText:t.createElement(f.Z,{id:"wizard.cancel",defaultMessage:"Cancel"}),submitButtonText:t.createElement(f.Z,{id:"wizard.save",defaultMessage:"Save"})},t.createElement("div",null,t.createElement(c.Col,{md:6},t.createElement("h3",null,t.createElement(f.Z,{id:"wizard.order",defaultMessage:"Order"})),t.createElement("p",null,t.createElement(f.Z,{id:"wizard.descriptionOrder",defaultMessage:"Use drag and drop to change the order."})),t.createElement(mg,{items:this._sortableItems(),onMoveItem:this._updateSorting}),t.createElement("h3",null,t.createElement(f.Z,{id:"wizard.status",defaultMessage:"Status"})),t.createElement("p",null,t.createElement(f.Z,{id:"wizard.checkboxesStatus",defaultMessage:"Change the checkboxes to change the status."})),t.createElement(c.Table,{striped:!0,bordered:!0,condensed:!0},t.createElement("thead",null,t.createElement("tr",null,t.createElement("th",null,t.createElement(f.Z,{id:"wizard.field",defaultMessage:"Field"})),t.createElement("th",null,t.createElement(f.Z,{id:"wizard.enabled",defaultMessage:"Enabled"})))),t.createElement("tbody",null,this._statusForm())),t.createElement("h3",null,t.createElement(f.Z,{id:"wizard.importPolicy",defaultMessage:"Import strategy"})),t.createElement("p",null,t.createElement(f.Z,{id:"wizard.descriptionImportPolicy",defaultMessage:"Choose the action when the alert rule already exists."})),t.createElement(c.FormGroup,null,t.createElement(Gr,{overlay:r,placement:"top",useOverlay:!0,trigger:["hover","focus"]},t.createElement("div",{className:"radio"},t.createElement("label",null,t.createElement("input",{type:"radio",value:"DONOTHING",checked:this.state.config.import_policy==="DONOTHING",onChange:this._onRadioChange}),t.createElement(f.Z,{id:"wizard.doNothing",defaultMessage:"Don't import"})))),t.createElement(Gr,{overlay:e,placement:"top",useOverlay:!0,trigger:["hover","focus"]},t.createElement("div",{className:"radio"},t.createElement("label",null,t.createElement("input",{type:"radio",value:"REPLACE",checked:this.state.config.import_policy==="REPLACE",onChange:this._onRadioChange}),t.createElement(f.Z,{id:"wizard.replace",defaultMessage:"Import and Replace"})))),t.createElement(Gr,{overlay:s,placement:"top",useOverlay:!0,trigger:["hover","focus"]},t.createElement("div",{className:"radio"},t.createElement("label",null,t.createElement("input",{type:"radio",value:"RENAME",checked:this.state.config.import_policy==="RENAME",onChange:this._onRadioChange}),t.createElement(f.Z,{id:"wizard.rename",defaultMessage:"Import, but keep both alert rules"})))))),t.createElement(c.Col,{md:6},t.createElement("h3",null,t.createElement(f.Z,{id:"wizard.defaultValues",defaultMessage:"Default values of the alert rule"})),t.createElement("p",null,t.createElement(f.Z,{id:"wizard.changeDefaultValues",defaultMessage:"Change the default values."})),t.createElement("fieldset",{style:{marginBottom:"15px"}},t.createElement(c.Input,{ref:"title",id:"title",name:"title",type:"text",label:t.createElement(f.Z,{id:"wizard.title",defaultMessage:"Title"}),value:this.state.config.default_values.title,onChange:this._onValueChanged("title")}),t.createElement(c.Input,{id:"severity",label:t.createElement(f.Z,{id:"wizard.alertSeverity",defaultMessage:"Alert Severity"}),help:t.createElement(f.Z,{id:"wizard.descriptionAlertSeverity",defaultMessage:"The default severity of logged alerts when adding a new notification"}),name:"severity"},t.createElement(We.Z,{placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."}),options:this._availableSeverityTypes(),matchProp:"value",value:this.state.config.default_values.severity,onChange:this._onSeverityTypeSelect,clearable:!1})),t.createElement(c.Input,{ref:"matching_type",id:"matching_type",name:"matching_type",label:t.createElement(f.Z,{id:"wizard.matchingType",defaultMessage:"Matching type"})},t.createElement(We.Z,{placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."}),autosize:!1,value:this.state.config.default_values.matching_type,options:this._availableMatchingType(),matchProp:"value",onChange:this._onMatchingTypeSelect,clearable:!1})),t.createElement(c.Input,{ref:"threshold_type",id:"threshold_type",name:"threshold_type",label:t.createElement(f.Z,{id:"wizard.thresholdType",defaultMessage:"Threshold type"})},t.createElement(We.Z,{placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."}),autosize:!1,value:this.state.config.default_values.threshold_type,options:this._availableThresholdTypes(),matchProp:"value",onChange:this._onThresholdTypeSelect,clearable:!1})),t.createElement(c.Input,{ref:"threshold",id:"threshold",name:"threshold",type:"number",min:"0",label:t.createElement(f.Z,{id:"wizard.threshold",defaultMessage:"Threshold"}),onChange:this._onValueChanged("threshold"),value:this.state.config.default_values.threshold}),t.createElement(c.Input,{ref:"time",id:"time",name:"time",type:"number",min:"1",label:t.createElement(f.Z,{id:"wizard.time",defaultMessage:"Time Range"}),onChange:this._onValueChanged("time"),value:this.state.config.default_values.time}),t.createElement(c.Input,{ref:"time_type",id:"time_type",name:"time_type",label:t.createElement(f.Z,{id:"wizard.timeType",defaultMessage:"Time Range unit"})},t.createElement(We.Z,{placeholder:t.createElement(f.Z,{id:"wizard.select",defaultMessage:"Select..."}),autosize:!1,value:this.state.config.default_values.time_type?this.state.config.default_values.time_type.toString():"",options:this._availableTimeTypes(),matchProp:"value",onChange:this._onTimeTypeSelect,clearable:!1}))),t.createElement("h3",null,t.createElement(f.Z,{id:"wizard.conditionDefaultValues",defaultMessage:"Default values of the event"})),t.createElement("p",null,t.createElement(f.Z,{id:"wizard.changeDefaultValues",defaultMessage:"Change the default values."})),t.createElement("fieldset",null,t.createElement(c.Input,{ref:"backlog",id:"backlog",name:"backlog",type:"number",min:"0",label:t.createElement(f.Z,{id:"wizard.msgBacklog",defaultMessage:"Message Backlog"}),onChange:this._onValueChanged("backlog"),value:this.state.config.default_values.backlog}),t.createElement(c.Input,{ref:"grace",id:"grace",name:"grace",type:"number",min:"1",label:t.createElement(f.Z,{id:"wizard.gracePeriod",defaultMessage:"Execute search every (minutes)"}),onChange:this._onValueChanged("grace"),value:this.state.config.default_values.grace}))))))}});var Ot=i("g3TJS7W7");const Nt=JSON.parse(`{"wizard.listpresent":"est pr\xE9sente dans la liste","wizard.listnotpresent":"n'est pas pr\xE9sente dans la liste","wizard.lists":"Listes","wizard.version":" (version du wizard : {version}).","wizard.description":"Avec le wizard, vous pouvez configurer les r\xE8gles d'alerte. Une r\xE8gle d'alerte consiste en une ou plusieurs streams avec des r\xE8gles, une condition d'alerte et une notification d'alerte.","wizard.documentation":"Plus d'information au sujet des r\xE8gles d'alerte du wizard dans la documentation","wizard.documentationlist":"Plus d'information au sujet des listes du wizard dans la documentation","wizard.define":"Vous pouvez d\xE9finir une r\xE8gle d'alerte.","wizard.definelist":"Vous pouvez d\xE9finir une liste.","wizard.back":"Retour aux r\xE8gles d'alerte","wizard.backlist":"Retour aux listes","wizard.loadMessage":"Charger un message pour tester les r\xE8gles de champs","wizard.newAlertRule":"Wizard : Nouvelle r\xE8gle d'alerte","wizard.newList":"Wizard : Nouvelle liste","wizard.updateAlertRule":"Wizard : Edition de la r\xE8gle d'alerte \\"{title}\\"","wizard.updateList":"Wizard : Edition de la liste \\"{title}\\"","wizard.create":"Cr\xE9er","wizard.title":"Titre","wizard.filterlists":"Filtrer les listes","wizard.filter":"Filtrer les r\xE8gles d'alerte","wizard.cancel":"Annuler","wizard.save":"Sauvegarder","wizard.titleParameters":"Param\xE8tres de la r\xE8gle d'alerte","wizard.descripionParameters":"D\xE9finir les param\xE8tres de la r\xE8gle d'alerte","wizard.titleAdvancedParameters":"Param\xE8tres avanc\xE9s (optionnel)","wizard.titleDescription":"Description (optionnel)","wizard.descriptionAlert":"D\xE9finir la description de la r\xE8gle d'alerte","wizard.titleSeverity":"Titre et s\xE9v\xE9rit\xE9 de l'alerte","wizard.fieldsCondition":"Condition sur les champs","wizard.messagesMatch":"Les messages doivent correspondre \xE0","wizard.followingRules":"r\xE8gles suivantes :","wizard.timeRangeInput":"Condition d'intervalle de temps","wizard.messagesCome":"Les messages doivent apparaitre dans les","wizard.countCondition":"Comptage","wizard.NumberInput":"Condition sur le nombre","wizard.thereMustBe":"Il doit y avoir","wizard.mustBe":"doit \xEAtre","wizard.messages":"messages","wizard.advancedSettings":"Param\xE8tres avanc\xE9s","wizard.more":"plus de","wizard.less":"moins de","wizard.minutes":"derni\xE8res minutes","wizard.hours":"derni\xE8res heures","wizard.days":"derniers jours","wizard.all":"toutes les","wizard.atLeastOne":"au moins une des","wizard.info":"Info","wizard.low":"Faible","wizard.medium":"Moyenne","wizard.high":"Haute","wizard.matchesExactly":"correspond exactement \xE0","wizard.notMatchesExactly":"ne correspond pas exactement \xE0","wizard.matchesRegularExpression":"correspond \xE0 l'expression r\xE9guli\xE8re","wizard.notMatchRegularExpression":"ne correspond pas \xE0 l'expression r\xE9guli\xE8re","wizard.greaterThan":"est sup\xE9rieur \xE0","wizard.notGreaterThan":"n'est pas sup\xE9rieur \xE0","wizard.smallerThan":"est inf\xE9rieur \xE0","wizard.notSmallerThan":"n'est pas inf\xE9rieur \xE0","wizard.present":"est pr\xE9sent","wizard.notPresent":"n'est pas pr\xE9sent","wizard.contains":"contient","wizard.notContain":"ne contient pas","wizard.delete":"Supprimer","wizard.groupDistinctCondition":"Regroupement / Diff\xE9renciation","wizard.statisticalInput":"Condition Statistiques","wizard.thenCondition":"ENSUITE","wizard.andCondition":"ET","wizard.orCondition":"OU","wizard.groupBy":"Condition de regroupement","wizard.distinctBy":"Condition de diff\xE9renciation","wizard.groupByLabel":"Les messages doivent \xEAtre group\xE9s par","wizard.distinctByLabel":"Les messages doivent \xEAtre distincts par","wizard.the":"La","wizard.of":"de","wizard.meanValue":"valeur moyenne","wizard.standardDeviation":"d\xE9viation standard (\xE9cart-type)","wizard.minValue":"valeur min","wizard.maxValue":"valeur max","wizard.sum":"somme","wizard.titlePopup":"R\xE8gle d'alerte sauvegard\xE9e","wizard.titleListPopup":"Liste sauvegard\xE9e","wizard.messagePopup":"Aller aux param\xE8tres avanc\xE9s ?","wizard.messagePopupList":"Retour aux listes ?","wizard.done":"J'ai fini !","wizard.edit":"Modifier","wizard.clone":"Dupliquer","wizard.enable":" Activer ","wizard.disable":"D\xE9sactiver","wizard.enabled":"Activ\xE9","wizard.disabled":"D\xE9sactiv\xE9","wizard.corrupted":"Alt\xE9r\xE9","wizard.manualCount":"{alertDay} alertes/jour ({alertCount} total)","wizard.placeholderTitle":"Titre de la r\xE8gle d'alerte ","wizard.severity":"S\xE9v\xE9rit\xE9","wizard.fieldDescription":"Description","wizard.fieldList":"Liste","wizard.fieldListwithexemple":"Liste (exemple : 172.10.0.1; 192.168.1.4; ...)","wizard.created":"Cr\xE9ation","wizard.lastModified":"Derni\xE8re modification","wizard.user":"Utilisateur","wizard.status":"Statut","wizard.actions":"Actions","wizard.order":"Ordre","wizard.field":"Champ","wizard.descriptionOrder":"Utiliser le glisser-d\xE9poser pour changer l'ordre.","wizard.checkboxesStatus":"Changer les cases \xE0 cocher pour changer le statut.","wizard.defaultValues":"Valeurs par d\xE9faut du Wizard","wizard.conditionDefaultValues":"Valeurs par d\xE9faut de l'alerte","wizard.changeDefaultValues":"Changer les valeur par d\xE9faut.","wizard.alertSeverity":"S\xE9v\xE9rit\xE9 d'alerte","wizard.descriptionAlertSeverity":"La s\xE9v\xE9rit\xE9 par d\xE9faut des alertes quand on ajoute une nouvelle notification de type log","wizard.matchingType":"Type de correspondance","wizard.thresholdType":"Type de seuil","wizard.threshold":"Seuil","wizard.time":"Intervalle de temps","wizard.timeType":"Unit\xE9 de temps","wizard.select":"S\xE9lectionner...","wizard.manageSettings":"Configuration","wizard.manageWizardSettings":"Configuration du Wizard","wizard.buttonInfoDeleteList":"Supprimer la liste","wizard.buttonInfoUpdateList":"Modifier la liste","wizard.buttonInfoCloneList":"Cloner la liste","wizard.buttonInfoDelete":"Supprimer la r\xE8gle d'alerte","wizard.buttonInfoUpdate":"Modifier la r\xE8gle d'alerte","wizard.buttonInfoEnable":"Activer la r\xE8gle d'alerte","wizard.buttonInfoDisable":"D\xE9sactiver la r\xE8gle d'alerte","wizard.buttonInfoClone":"Cloner la r\xE8gle d'alerte","wizard.alertsRule":"R\xE8gles d'alerte","wizard.alertsList":"Listes","wizard.noAlertRulesToExport":"Il n'y a pas de r\xE8gle d'alerte \xE0 exporter.","wizard.noListsToExport":"Il n'y a pas de liste \xE0 exporter.","wizard.selectAll":"Tout s\xE9lectionner","wizard.selected":"{ruleCount, plural, =0 {Tout s\xE9lectionner} =1 {Une r\xE8gle s\xE9lectionn\xE9e} other {# r\xE8gles s\xE9lectionn\xE9es}}","wizard.exportWizardAlertRule":"Wizard : Exporter des r\xE8gles d'alerte","wizard.exportAlertRule":"Vous pouvez exporter une r\xE8gle d'alerte.","wizard.export":"Exporter","wizard.importWizardList":"Wizard : Importer des listes","wizard.importLists":"Vous pouvez importer une liste.","wizard.importWizardAlertRule":"Wizard : Importer des r\xE8gles d'alerte","wizard.importAlertRule":"Vous pouvez importer une r\xE8gle d'alerte.","wizard.import":"Importer","wizard.downloadContentPack":"T\xE9l\xE9charger le pack de contenu","wizard.upload":"Charger","wizard.applyAlertRules":"Appliquer les r\xE8gles d'alerte","wizard.applyLists":"Appliquer les listes","wizard.noAlertRulesToImport":"Il n'y a pas de r\xE8gle d'alerte \xE0 importer","wizard.noListsToImport":"Il n'y a pas de listes \xE0 importer","wizard.higher":"sup\xE9rieure \xE0","wizard.higherEqual":"sup\xE9rieure ou \xE9gale \xE0","wizard.lower":"inf\xE9rieure \xE0","wizard.lowerEqual":"inf\xE9rieure ou \xE9gale \xE0","wizard.equal":"\xE9gale \xE0","wizard.tooltipUser":"Dernier utilisateur qui a modifi\xE9 la r\xE8gle d'alerte","wizard.tooltipUserList":"Dernier utilisateur qui a modifi\xE9 la liste","wizard.add":"Ajouter","wizard.exportList":"Exporter les listes","wizard.importList":"Importer les listes","wizard.createList":"Cr\xE9er une liste","wizard.exportAlert":"Exporter les r\xE8gles d'alerte","wizard.importAlert":"Importer les r\xE8gles d'alerte","wizard.createAlert":"Cr\xE9er une r\xE8gle d'alerte","wizard.StatisticsCondition":"Statistiques","wizard.or":"OU ","wizard.then":"ENSUITE ","wizard.and":"ET ","wizard.msgBacklog":"Pile de messages","wizard.gracePeriod":"Ex\xE9cuter la recherche tous les (minutes)","wizard.rule":"R\xE8gle","wizard.StatisticalRule":"D\xE9clenche une alerte quand la {type} de {field} est {threshold_type} {threshold} dans les {time} derni\xE8res minutes ","wizard.TriggerRule":"D\xE9clenche une alerte quand il y a {threshold_type} {threshold} messages dans les {time} derni\xE8res minutes ","wizard.MatchRule":"correspondant \xE0 {matching_type} r\xE8gles suivantes : \\n","wizard.GroupByRule":"avec les m\xEAme valeurs de {groupBy}, ","wizard.DistinctByRule":"avec des valeurs diff\xE9rentes de {distinctBy}, ","wizard.AndRule":"ET quand il y a {threshold_type} {threshold} messages ","wizard.ThenRule":"suivi par {threshold_type} {threshold} messages ","wizard.try":"Test","wizard.tryFieldsCondition":"Tester les conditions de champs","wizard.importPolicy":"Politique d'import","wizard.descriptionImportPolicy":"Choisir l'action lorsque la r\xE8gle d'alerte existe d\xE9j\xE0.","wizard.doNothing":"Ne pas importer","wizard.replace":"Importer et remplacer","wizard.rename":"Importer, mais conserver les deux r\xE8gles d'alerte","wizard.tooltipReplace":"Remplacer la r\xE8gle d'alerte par celle en cours d'import","wizard.tooltipDoNothing":"Aucune r\xE8gle d'alerte ne sera modifi\xE9e","wizard.tooltipRename":"La r\xE8gle d'alerte en cours d'import sera renomm\xE9e ","wizard.confirmDeletionList":"Souhaitez-vous vraiment supprimer la liste","wizard.confirmDeletion":"Souhaitez-vous vraiment supprimer la r\xE8gle d'alerte","wizard.confirmDisable":"Souhaitez-vous vraiment d\xE9sactiver la r\xE8gle d'alerte","wizard.ruleType":"Type de r\xE8gle","wizard.tooltipCountCondition":"Condition de comptage","wizard.tooltipGroupDistinctCondition":"Condition de type Group / Distinct","wizard.tooltipStatisticalCondition":"Condition statistique","wizard.tooltipThenCondition":"Condition de type ENSUITE","wizard.tooltipAndCondition":"Condition de type ET","wizard.tooltipOrCondition":"Condition de type OU","wizard.placeholderCloneTitle":"Un nom descriptif de la nouvelle r\xE8gle d'alerte","wizard.placeholderCloneTitleList":"Un nom descriptif de la nouvelle liste","wizard.cloneAlertRule":"Duplication de la r\xE8gle d'alerte \\"{title}\\"","wizard.cloneList":"Duplication de la liste \\"{title}\\"","wizard.fieldOptionalDescription":"Description (optionnel)","wizard.buttonInfoNoDeleteList":"Liste utilis\xE9 dans les r\xE8gles d'alerte","wizard.card":"cardinalit\xE9","wizard.count":"condition de comptage","wizard.sumOfSquares":"somme des carr\xE9s","wizard.variance":"variance","wizard.eventDefinition":"D\xE9finition de l'\xE9v\xE8nement","wizard.notification":"Notification","wizard.tooltipEventDefinition":"Modifier la d\xE9fintiion de l'\xE9v\xE8nement associ\xE9e \xE0 la r\xE8gle d'alerte","wizard.tooltipNotification":"Modifier la notification associ\xE9e \xE0 la r\xE8gle d'alerte"}`),Nl=U.ZP.qualifyUrl(Is.buildSourceURL("config"));function fh(){return(0,O.ZP)("GET",Nl).catch(e=>{M.error(`Fetching wizard configurations failed with status: ${e}`,"Could not retrieve configurations")})}function vh(e){const r={field_order:e.field_order,default_values:e.default_values,import_policy:e.import_policy};return(0,O.ZP)("PUT",Nl,r).then(s=>(M.success("Wizard configurations successfully updated"),s)).catch(s=>{M.error(`Updating wizard configurations failed with status: ${s.message}`,"Could not update configurations")})}const ra={get:fh,update:vh},$l=navigator.language.split(/[-_]/)[0],Eh={fr:Nt},yh=()=>{const[e,r]=(0,t.useState)(null),s=n=>{ra.update(n).then(()=>r(n))};return(0,t.useEffect)(()=>{ra.get().then(n=>{r(n)})},[]),e?t.createElement(Ot.Z,{locale:$l,messages:Eh[$l]},t.createElement(Pt,{title:"Alert Rules"},t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.alertsRule",defaultMessage:"Alert Rules"}),actions:t.createElement(ir,{permissions:"wizard_alerts_rules:read"},t.createElement(hh,{config:e,onSave:s}))},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.description",defaultMessage:"With the wizard, you can manage the alert rules. An alert rule consists of one or more streams with rules, an alert condition and an alert notification."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentation",defaultMessage:"Read more about Wizard alert rules in the documentation"}),t.createElement(f.Z,{id:"wizard.version",defaultMessage:" (wizard version : {version}).",values:{version:E.version}}))),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(ir,{permissions:"wizard_alerts_rules:read"},t.createElement(gh,{field_order:e.field_order})))))):t.createElement(st.Z,{text:"Loading, please wait..."})},Os=()=>{const e=(0,Z.useNavigate)();return(0,t.useMemo)(()=>({goBack:()=>e(-1),push:r=>e(r),pushWithState:(r,s)=>e(r,{state:s}),replace:r=>e(r,{replace:!0})}),[e])};class bh extends t.Component{render(){const{stream:r}=this.props,s=Ze.stream_search(r.id);return t.createElement(Ts.rU,{to:s},r.title)}}const zl=bh;var _h=Object.defineProperty,Ch=(e,r,s)=>r in e?_h(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,rs=(e,r,s)=>(Ch(e,typeof r!="symbol"?r+"":r,s),s);const Sh=m.default.span(({theme:e})=>m.css`
margin-right: 8px;
font-family: ${e.fonts.family.monospace};
`);class sa extends t.Component{constructor(r){super(r),rs(this,"_shouldShowTerms",()=>{const{messageTerms:s}=this.state;return s.size!==0}),rs(this,"_getFormattedTerms",()=>{const{messageTerms:s}=this.state;return s.map(n=>t.createElement(Sh,{key:n},n))}),rs(this,"_getFormattedFieldActions",()=>{const{customFieldActions:s,fieldName:n,message:o}=this.props;return s?t.cloneElement(s,{fieldName:n,message:o}):null}),this.state={messageTerms:Jt().List()}}render(){const{fieldName:r,renderForDisplay:s}=this.props,n=r===fo||r===ho?"message-field":"";return t.createElement("dd",{className:n,key:`${r}dd`},this._getFormattedFieldActions(),t.createElement("div",{className:"field-value"},s(r)),this._shouldShowTerms()&&t.createElement(c.Alert,{bsStyle:"info",onDismiss:()=>this.setState({messageTerms:Jt().Map()})},"Field terms: \xA0",this._getFormattedTerms()))}}rs(sa,"propTypes",{message:a().object.isRequired,fieldName:a().string.isRequired,renderForDisplay:a().func.isRequired,customFieldActions:a().node}),rs(sa,"defaultProps",{customFieldActions:void 0});const Th=sa,$t=Object.freeze({COPY_INPUT:"copy_input",GROK:"grok",JSON:"json",REGEX:"regex",REGEX_REPLACE:"regex_replace",SPLIT_AND_INDEX:"split_and_index",SUBSTRING:"substring",LOOKUP_TABLE:"lookup_table"}),na={ConverterTypes:Object.freeze({NUMERIC:"numeric",DATE:"date",HASH:"hash",SPLIT_AND_COUNT:"split_and_count",IP_ANONYMIZER:"ip_anonymizer",SYSLOG_PRI_LEVEL:"syslog_pri_level",SYSLOG_PRI_FACILITY:"syslog_pri_facility",TOKENIZER:"tokenizer",CSV:"csv",LOWERCASE:"lowercase",UPPERCASE:"uppercase",FLEXDATE:"flexdate",LOOKUP_TABLE:"lookup_table"}),ExtractorTypes:$t,EXTRACTOR_TYPES:Object.keys($t).map(e=>e.toLocaleLowerCase()),getNewExtractorRoutes(e,r,s,n,o){const l={};return this.EXTRACTOR_TYPES.forEach(d=>{l[d]=Ze.new_extractor(e,r,d,s,n,o)}),l},getReadableExtractorTypeName(e){switch(e){case $t.COPY_INPUT:return"Copy input";case $t.GROK:return"Grok pattern";case $t.JSON:return"JSON";case $t.REGEX:return"Regular expression";case $t.REGEX_REPLACE:return"Replace with regular expression";case $t.SPLIT_AND_INDEX:return"Split & Index";case $t.SUBSTRING:return"Substring";case $t.LOOKUP_TABLE:return"Lookup Table";default:return e}},getReadableConverterTypeName(e){switch(e){case this.ConverterTypes.NUMERIC:return"Numeric";case this.ConverterTypes.DATE:return"Date";case this.ConverterTypes.FLEXDATE:return"Flexible Date";case this.ConverterTypes.HASH:return"Hash";case this.ConverterTypes.LOWERCASE:return"Lowercase";case this.ConverterTypes.UPPERCASE:return"Uppercase";case this.ConverterTypes.TOKENIZER:return"Key = Value Pairs To Fields";case this.ConverterTypes.CSV:return"CSV To Fields";case this.ConverterTypes.SPLIT_AND_COUNT:return"Split & Count";case this.ConverterTypes.IP_ANONYMIZER:return"Anonymize IPv4 Addresses";case this.ConverterTypes.SYSLOG_PRI_LEVEL:return"Syslog Level From PRI";case this.ConverterTypes.SYSLOG_PRI_FACILITY:return"Syslog Facility From PRI";case this.ConverterTypes.LOOKUP_TABLE:return"Lookup Table";default:return e}},getEffectiveConfiguration(e,r){const s={};for(const n in e)e.hasOwnProperty(n)&&(s[n]=e[n]);for(const n in r)r.hasOwnProperty(n)&&(s[n]=r[n]);return s}};var wh=Object.defineProperty,Ah=(e,r,s)=>r in e?wh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,aa=(e,r,s)=>(Ah(e,typeof r!="symbol"?r+"":r,s),s);class Rh extends t.Component{constructor(){super(...arguments),aa(this,"_refreshExtractorRoutes",r=>{this.newExtractorRoutes=na.getNewExtractorRoutes(r.message.source_node_id,r.message.source_input_id,r.fieldName,r.message.index,r.message.id)}),aa(this,"_formatExtractorMenuItem",r=>t.createElement(Po,{key:`menu-item-${r}`,to:this.newExtractorRoutes[r]},t.createElement(c.MenuItem,null,na.getReadableExtractorTypeName(r))))}UNSAFE_componentWillMount(){this._refreshExtractorRoutes(this.props)}UNSAFE_componentWillReceiveProps(r){this._refreshExtractorRoutes(r)}render(){const{fieldName:r,message:s}=this.props;return typeof s.fields[r]=="string"?t.createElement("div",{className:"message-field-actions pull-right"},t.createElement(c.DropdownButton,{pullRight:!0,bsSize:"xsmall",title:"Select extractor type",key:1,id:`select-extractor-type-dropdown-field-${r}`},na.EXTRACTOR_TYPES.map(o=>this._formatExtractorMenuItem(o)))):t.createElement("div",{className:"message-field-actions pull-right"},t.createElement(c.DropdownButton,{pullRight:!0,bsSize:"xsmall",title:"Select extractor type",key:1,id:`select-extractor-type-dropdown-field-${r}`},t.createElement(c.MenuItem,{key:"select-extractor-type-disabled",disabled:!0},"Extractors can only be used with string fields.")))}}aa(Rh,"propTypes",{fieldName:a().string.isRequired,message:a().object.isRequired});const Bb=null,xh=[ho,"level"],oa=({message:e,value:r,fieldName:s,customFieldActions:n,renderForDisplay:o})=>{const l=xh.indexOf(s)!==-1?e.fields[s]:r;return t.createElement("span",null,t.createElement("dt",{key:`${s}Title`},s),t.createElement(Th,{key:`${s}Description`,message:e,fieldName:s,fieldValue:l,renderForDisplay:o,customFieldActions:n}))};oa.propTypes={customFieldActions:a().node,fieldName:a().string.isRequired,message:a().object.isRequired,renderForDisplay:a().func.isRequired,value:a().any.isRequired},oa.defaultProps={customFieldActions:void 0};const Ph=oa,Ih=(e="")=>({type:"elasticsearch",query_string:e}),Dh=e=>Immutable.List(e.map(r=>Immutable.Map({type:"stream",id:r}))),Fb=e=>{if(!e||e.length===0)return null;const r=Dh(e);return Immutable.Map({type:"or",filters:r})},Mh=e=>e?e.get("type")==="stream"?Immutable.Set([e.get("id")]):e.get("filters",Immutable.List()).map(Mh).reduce((n,o)=>n.merge(o),Immutable.Set()):Immutable.Set(),Ns=e=>e==null;class ss{constructor(r,s,n,o,l,d){this._value={id:r,query:s,timerange:n,filter:o,filters:d,searchTypes:l}}get id(){return this._value.id}get query(){return this._value.query}get timerange(){return this._value.timerange}get filter(){return this._value.filter}get filters(){return this._value.filters}get searchTypes(){return this._value.searchTypes}toBuilder(){const{id:r,query:s,timerange:n,filter:o,filters:l,searchTypes:d}=this._value,g=ss.builder().id(r).query(s).timerange(n).filter(o).filters(l).searchTypes(d);return o?g.filter(o):g}equals(r){return!(r===void 0||!(r instanceof ss)||this.id!==r.id||!isDeepEqual(this.query,r.query)||!isDeepEqual(this.timerange,r.timerange)||!(Ns(this.filter)&&Ns(r.filter)||isDeepEqual(this.filter,r.filter))||!(Ns(this.filters)&&Ns(r.filters)||isDeepEqual(this.filters,r.filters))||!isDeepEqual(this.searchTypes,r.searchTypes))}toJSON(){const{id:r,query:s,timerange:n,filter:o,filters:l,searchTypes:d}=this._value;return{id:r,query:s,timerange:n,filter:o,filters:l,search_types:d}}static builder(){return new Qt().searchTypes([])}static fromJSON(r){const{id:s,query:n,timerange:o,filter:l,filters:d,search_types:g}=r;return new ss(s,n,o,Immutable.fromJS(l),g,d&&Immutable.List(d))}}class Qt{constructor(r=Immutable.Map()){this.value=r}id(r){return new Qt(this.value.set("id",r))}newId(){return this.id(generateId())}query(r){return new Qt(this.value.set("query",r))}timerange(r){return new Qt(this.value.set("timerange",r))}filter(r){return new Qt(this.value.set("filter",Immutable.fromJS(r)))}filters(r){return new Qt(this.value.set("filters",r&&Immutable.List(r)))}searchTypes(r){return new Qt(this.value.set("searchTypes",r))}build(){const{id:r,query:s,timerange:n,filter:o,filters:l,searchTypes:d}=this.value.toObject();return new ss(r,s,n,o,d,l)}}const Lh={query:Ih(""),streams:[],timerange:Fd},Oh=t.createContext(Lh),kb=e=>"type"in e&&e.type==="absolute",Ul=e=>"type"in e&&e.type==="relative",Nh=e=>Ul(e)&&"range"in e,$h=e=>Ul(e)&&"from"in e,Wb=e=>"type"in e&&e.type==="keyword",Kb=e=>e!==void 0&&isEqual(e,{}),zh=e=>JSON.stringify(e,null,2),Bl=(e,r)=>{throw new Error(`${r}: ${zh(e)}`)},Uh=e=>{switch(e.type){case"relative":return Nh(e)?{rangetype:"relative",relative:String(e.range)}:$h(e)?"to"in e?{rangetype:"relative",from:String(e.from),to:String(e.to)}:{rangetype:"relative",from:String(e.from)}:Bl(e,"Unexpected time range: ");case"keyword":return{rangetype:"keyword",keyword:e.keyword};case"absolute":return{rangetype:"absolute",from:e.from,to:e.to};default:return Bl(e,"Unexpected time range type: ")}},Bh=e=>{const r=s=>parseInt(s,10);if("relative"in e)return{type:"relative",range:r(e.relative)};if("from"in e){const s={type:"relative",from:r(e.from)};return"to"in e?{...s,to:r(e.to)}:s}return assertUnreachable(e,"Invalid relative range specified: ")},Gb=e=>{switch(e==null?void 0:e.rangetype){case"relative":return Bh(e);case"absolute":return"from"in e&&"to"in e?{type:e.rangetype,from:e.from,to:e.to}:assertUnreachable(e,"Invalid absolute range specified: ");case"keyword":return"keyword"in e?{type:e.rangetype,keyword:e.keyword,timezone:e.timezone}:assertUnreachable(e,"Invalid keyword range specified: ");default:return assertUnreachable(e,"Unsupported range type in range: ")}},Fh=e=>String(e).indexOf(" ")!==-1,Zh=e=>{let r=String(e);return r=r.replace(/\r\n/g," "),r=r.replace(/\n/g," "),r=r.replace(/
/g," "),Fh(r)?(r=String(r).replace(/(["\\])/g,"\\$&"),r=`"${r}"`):r=String(r).replace(/(&&|\|\||[:\\/+\-!(){}[\]^"~*?$])/g,"\\$&"),r},kh=(e,r,s="AND")=>Zr()(e)==="*"||Zr()(e)===""?r:Zr()(r)==="*"||Zr()(r)===""?e:`${e} ${s} ${r}`,Vb=(e,{operator:r="AND",withBrackets:s=!0}={})=>{const n=e.filter(l=>!!(l!=null&&l.trim())),o=s&&n.length>1;return n.map(l=>o?`(${l})`:l).join(` ${r} `)},Wh=(e,r={})=>Object.keys(r).filter(s=>r[s]!==null&&r[s]!==void 0).map(s=>`${s}:"${Zh(String(r[s]))}"`).reduce((s,n)=>kh(s,n),e?e.query_string:"");class Fl{constructor(r,s,n,o,l,d){this._value={id:r,timerange:s,query:n,streams:o,highlightedMessage:l,filterFields:d}}get id(){return this._value.id}get timerange(){return this._value.timerange}get query(){return this._value.query}get streams(){return this._value.streams}get highlightedMessage(){return this._value.highlightedMessage}get filterFields(){return this._value.filterFields}static builder(){return new er}toURL(){const{id:r,query:s,highlightedMessage:n,streams:o,filterFields:l,timerange:d}=this._value,g=Wh(s,l),v={...d?Uh(d):{},q:g===""?void 0:g,highlightMessage:n},y=o&&o.length>0?{...v,streams:o.join(",")}:v,C=r?`${Ze.SEARCH}/${r}`:Ze.SEARCH;return new(Dt())(C).setSearch(y).toString()}}class er{constructor(r=Wt.Map()){this.value=r}id(r){return new er(this.value.set("id",r))}timerange(r){return new er(this.value.set("timerange",r))}query(r){return new er(this.value.set("query",r))}streams(r){return new er(this.value.set("streams",r))}highlightedMessage(r){return new er(this.value.set("highlightedMessage",r))}filterFields(r){return new er(this.value.set("filterFields",r))}build(){const{id:r,timerange:s,query:n,streams:o,highlightedMessage:l,filterFields:d}=this.value.toObject();return new Fl(r,s,n,o,l,d)}}const Kh=({surrounding_timerange_options:e={}})=>Object.fromEntries(Object.entries(e).map(([r,s])=>[lr().duration(r).asSeconds(),s])),Hh=(e,r)=>{const{surrounding_filter_fields:s=[]}=r;return Object.fromEntries(s.map(n=>[n,e[n]]))},Gh=(e,r,s,n,o)=>Fl.builder().timerange({type:"absolute",from:r,to:s}).streams(o).filterFields(n).highlightedMessage(e).build().toURL(),Vh=(e,r,s,n,o,l)=>{const d=lr()(r).subtract(Number(e),"seconds").toISOString(),g=lr()(r).add(Number(e),"seconds").toISOString(),h=Hh(n,o);return Gh(s,d,g,h,l)},jh=({searchConfig:e,timestamp:r,id:s,messageFields:n})=>{const{streams:o}=(0,t.useContext)(Oh),l=Kh(e),d=Object.keys(l).sort((g,h)=>we(g,h)).map(g=>t.createElement(c.MenuItem,{key:g,href:Vh(g,r,s,n,e,o),target:"_blank",rel:"noopener noreferrer"},l[g]));return t.createElement(c.DropdownButton,{title:"Show surrounding messages",bsSize:"small",id:"surrounding-search-dropdown"},d)};jh.propTypes={id:a().string.isRequired,timestamp:a().string.isRequired,searchConfig:a().object.isRequired,messageFields:a().object.isRequired};const jb=null;var qh=Object.defineProperty,Yh=(e,r,s)=>r in e?qh(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,la=(e,r,s)=>(Yh(e,typeof r!="symbol"?r+"":r,s),s);class ia extends t.Component{constructor(){super(...arguments),la(this,"_formatFields",r=>Object.keys(r).sort().map(s=>t.createElement(Ph,{key:s,...this.props,fieldName:s,value:r[s]})))}render(){const{message:r}=this.props,{_id:s,...n}=r.fields,o=r.formatted_fields||n,l=this._formatFields(o);return t.createElement(No,{className:"message-details-fields"},l)}}la(ia,"propTypes",{customFieldActions:a().node,message:a().object.isRequired,renderForDisplay:a().func.isRequired}),la(ia,"defaultProps",{customFieldActions:void 0});const Jh=ia,Xh=m.default.h3(({theme:e})=>m.css`
a {
color: ${e.colors.global.textDefault};
}
.label {
font-size: ${e.fonts.size.tiny};
line-height: 200%;
margin-left: 5px;
vertical-align: bottom;
}
`),Qh=e=>t.createElement(Xh,{...e});var ef=Object.defineProperty,tf=(e,r,s)=>r in e?ef(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,Or=(e,r,s)=>(tf(e,typeof r!="symbol"?r+"":r,s),s);class ca extends t.Component{constructor(){super(...arguments),Or(this,"_inputName",r=>{const{inputs:s}=this.props,n=s.get(r);return n?t.createElement("span",{style:{wordBreak:"break-word"}},n.title):"deleted input"}),Or(this,"_nodeName",r=>{const{nodes:s}=this.props,n=s.get(r);let o;if(n){const l=Ze.node(r),d=t.createElement(t.Fragment,null,t.createElement(pe.Z,{name:"code-branch"}),"\xA0",t.createElement("span",{style:{wordBreak:"break-word"}},n.short_node_id),"\xA0/\xA0",t.createElement("span",{style:{wordBreak:"break-word"}},n.hostname));o=le.Z.isCloud()?d:t.createElement("a",{href:l},d)}else o=t.createElement("span",{style:{wordBreak:"break-word"}},"stopped node");return o}),Or(this,"_formatMessageActions",()=>{const{message:r,customFieldActions:s}=this.props;if(!s)return t.createElement(c.ButtonGroup,{className:"pull-right",bsSize:"small"});const n=r.index?Ze.message_show(r.index,r.id):"#";return t.createElement(c.ButtonGroup,{className:"pull-right",bsSize:"small"},t.createElement(c.Button,{href:n},"Permalink"),t.createElement(he.Z,{title:"Copy ID",bsSize:"small",text:r.id}))}),Or(this,"_getStreamLinks",r=>{const{streams:s,message:n}=this.props;return n.streams?n.streams.map(l=>t.createElement("li",{key:l.id},t.createElement(zl,{stream:l}))):r.map(l=>{const d=s.get(l);return d!==void 0?t.createElement("li",{key:d.id},t.createElement(zl,{stream:d})):null})})}render(){const{renderForDisplay:r,nodes:s,message:n,customFieldActions:o}=this.props,l=Jt().Set(n.stream_ids),d=this._getStreamLinks(l),g=n.source_radio_id?t.createElement("span",null,"via ",t.createElement("em",null,this._inputName(n.source_radio_input_id))," on radio ",this._nodeName(n.source_radio_id)):null,h=n.fields.timestamp,v=[t.createElement("dt",{key:`dt-${h}`},"Timestamp"),t.createElement("dd",{key:`dd-${h}`},t.createElement(Ir,{dateTime:h}))],y=n.source_input_id&&n.source_node_id&&s?t.createElement("div",null,t.createElement("dt",null,"Received by"),t.createElement("dd",null,t.createElement("em",null,this._inputName(n.source_input_id))," ","on ",this._nodeName(n.source_node_id),g&&t.createElement("br",null),g)):null,C=n.index?t.createElement(Ts.rU,{to:Ze.message_show(n.index,n.id)},n.id):t.createElement("span",null,n.id," ",t.createElement(c.Label,{bsStyle:"warning"},"Not stored"));return t.createElement("div",null,t.createElement(c.Row,{className:"row-sm"},t.createElement(c.Col,{md:12},this._formatMessageActions(),t.createElement(Qh,null,t.createElement(pe.Z,{name:"envelope"}),"\xA0",C))),t.createElement(c.Row,null,t.createElement(c.Col,{md:3},t.createElement(No,null,v,y,t.createElement("dt",null,"Stored in index"),t.createElement("dd",null,n.index?n.index:"Message is not stored"),l.size>0&&t.createElement("dt",null,"Routed into streams"),l.size>0&&t.createElement("dd",{className:"stream-list"},t.createElement("ul",null,d)))),t.createElement(c.Col,{md:9},t.createElement("div",null,t.createElement(Jh,{message:n,renderForDisplay:r,customFieldActions:o})))))}}Or(ca,"propTypes",{renderForDisplay:a().func.isRequired,inputs:a().object,nodes:a().object,message:a().object.isRequired,streams:a().object,customFieldActions:a().node}),Or(ca,"defaultProps",{inputs:void 0,nodes:void 0,streams:void 0,customFieldActions:void 0});const rf=ca;var sf=Object.defineProperty,nf=(e,r,s)=>r in e?sf(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,$s=(e,r,s)=>(nf(e,typeof r!="symbol"?r+"":r,s),s);class da extends t.Component{constructor(r){super(r),$s(this,"_getImmutableProps",s=>({streams:s.streams?Jt().Map(s.streams):s.streams,nodes:s.nodes?Jt().Map(s.nodes):s.nodes})),$s(this,"renderForDisplay",s=>{const{message:n}=this.props;return Yt.Z.stringify(n.fields[s])}),this.state=this._getImmutableProps(r)}UNSAFE_componentWillReceiveProps(r){this.setState(this._getImmutableProps(r))}render(){const{inputs:r,message:s}=this.props,{streams:n,nodes:o}=this.state;return t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(rf,{...this.props,message:s,inputs:r,streams:n,nodes:o,renderForDisplay:this.renderForDisplay,showTimestamp:!0})))}}$s(da,"propTypes",{message:a().object.isRequired,inputs:a().object,streams:a().object,nodes:a().object}),$s(da,"defaultProps",{inputs:void 0,nodes:void 0,streams:void 0});const af=da,of={FILTERED_FIELDS:["_id","_ttl","_source","_all","_index","_type","_score","gl2_accounted_message_size","gl2_message_id","gl2_source_node","gl2_source_input","gl2_source_collector","gl2_source_collector_input","gl2_remote_ip","gl2_remote_port","gl2_remote_hostname","streams","gl2_source_radio","gl2_source_radio_input"],filterFields(e){const r={};return Object.keys(e).forEach(s=>{this.FILTERED_FIELDS.indexOf(s)<0&&(r[s]=e[s])}),r}},ua={formatMessageSummary(e){const{message:r}=e;return this.formatMessage(r._id,e.index,r,r,e.highlight_ranges,e.decoration_stats)},formatResultMessage(e){const{message:r}=e;return this.formatMessage(r.id,e.index,r,r.fields,e.highlight_ranges,e.decoration_stats)},formatMessage(e,r,s,n,o,l){const d=of.filterFields(n);return{id:e,timestamp:lr()(s.timestamp).unix(),filtered_fields:d,formatted_fields:d,fields:n,index:r,source_node_id:n.gl2_source_node,source_input_id:n.gl2_source_input,stream_ids:s.streams,highlight_ranges:o,decoration_stats:l}}},Nr=(0,ve.ei)("core.Messages",()=>Ce().createActions({loadMessage:{asyncResult:!0},fieldTerms:{asyncResult:!0},loadRawMessage:{asyncResult:!0}})),Xb=(0,ve.dS)("core.Messages",()=>Ce().createStore({listenables:[Nr],sourceUrl:"",getInitialState(){return{}},loadMessage(e,r){const{url:s}=ie.Z.MessagesController.single(e.trim(),r.trim()),n=(0,O.ZP)("GET",U.DC(s)).then(o=>ua.formatResultMessage(o),o=>{M.error(`Loading message information failed with status: ${o}`,"Could not load message information")});Nr.loadMessage.promise(n)},fieldTerms(e,r){const{url:s}=ie.Z.MessagesController.analyze(e,encodeURIComponent(Yt.Z.stringify(r))),n=(0,O.ZP)("GET",U.DC(s)).then(o=>o.tokens,o=>{M.error(`Loading field terms failed with status: ${o}`,"Could not load field terms.")});Nr.fieldTerms.promise(n)},loadRawMessage(e,r,s,n){const{url:o}=ie.Z.MessagesController.parse(),l={message:e,remote_address:r,codec:s,configuration:n},d=(0,O.ZP)("POST",U.DC(o),l).then(g=>ua.formatResultMessage(g),g=>{if(g.additional&&g.additional.status===400){M.error("Please ensure the selected codec and its configuration are right. Check your server logs for more information.","Could not load raw message");return}M.error(`Loading raw message failed with status: ${g}`,"Could not load raw message")});Nr.loadRawMessage.promise(d)}})),lf=(0,m.default)(mo)`
margin-top: 10px;
`,cf=({loadMessage:e,children:r,loading:s})=>{const n=Os();return t.createElement("div",null,t.createElement("form",{className:"form-inline message-loader-form",onSubmit:e},r,t.createElement(lf,{submitButtonText:"Load message",isSubmitting:s,submitLoadingText:"Loading message...",isAsyncSubmit:!0,onCancel:()=>n.goBack()})))},df=(e,r,s)=>{const[n,o]=(0,t.useState)(!1),l=(0,t.useCallback)((d,g)=>{if(d===""||g==="")return;o(!0);const h=Nr.loadMessage(g,d);h.then(v=>s(v)),h.finally(()=>o(!1))},[s]);return(0,t.useEffect)(()=>{e&&r&&l(e,r)},[e,r,l]),[n,l]},pa=({hidden:e,hideText:r,onMessageLoaded:s,messageId:n,index:o})=>{const[l,d]=(0,t.useState)(e),[g,h]=(0,t.useState)(n),v=(0,t.useCallback)(oe=>h(oe.target.value),[]),y=(0,t.useRef)(),[C,R]=(0,t.useState)(o),T=(0,t.useCallback)(oe=>R(oe.target.value),[]),[P,z]=df(n,o,s),X=(0,t.useCallback)(oe=>{oe!=null&&oe.preventDefault&&oe.preventDefault(),z(g,C)},[C,z,g]),se=(0,t.useCallback)(()=>{d(!l)},[l]);return(0,t.useEffect)(()=>{!l&&y.current&&y.current.focus()},[l]),t.createElement("div",{className:"message-loader"},r||t.createElement("p",null,"Wrong example? ",t.createElement(c.Button,{bsSize:"sm",onClick:se},"Load another message")),l||t.createElement(cf,{loading:P,loadMessage:X},t.createElement("input",{ref:y,type:"text",className:"form-control message-id-input",placeholder:"Message ID",required:!0,value:g,onChange:v}),t.createElement("input",{type:"text",className:"form-control",placeholder:"Index",required:!0,value:C,onChange:T})))};pa.propTypes={hidden:a().bool,hideText:a().bool,onMessageLoaded:a().func.isRequired,messageId:a().string,index:a().string},pa.defaultProps={hidden:!0,hideText:!1,messageId:"",index:""};const uf=pa,pf=(0,ve.dS)("core.InputStaticFields",()=>Ce().createStore({listenables:[],sourceUrl:e=>`/system/inputs/${e}/staticfields`,create(e,r,s){const n=U.DC(this.sourceUrl(e.id)),o=(0,O.ZP)("POST",n,{key:r,value:s});return o.then(l=>(this.trigger({}),M.success(`Static field '${r}' added to '${e.title}' successfully`),l),l=>{M.error(`Adding static field to input failed with: ${l}`,`Could not add static field to input '${e.title}'`)}),o},destroy(e,r){const s=U.DC(`${this.sourceUrl(e.id)}/${r}`),n=(0,O.ZP)("DELETE",s);return n.then(o=>(this.trigger({}),M.success(`Static field '${r}' removed from '${e.title}' successfully`),o),o=>{M.error(`Removing static field from input failed with: ${o}`,`Could not remove static field '${r} from input '${e.title}'`)}),n}})),It=(0,ve.ei)("core.Inputs",()=>Ce().createActions({list:{asyncResult:!0},get:{asyncResult:!0},getOptional:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},update:{asyncResult:!0}})),ns=(0,ve.dS)("core.Inputs",()=>Ce().createStore({listenables:[It],sourceUrl:"/system/inputs",inputs:void 0,input:void 0,init(){this.trigger(this._state()),this.listenTo(pf,this.list)},getInitialState(){return this._state()},_state(){return{inputs:this.inputs,input:this.input}},list(){const e=(0,O.ZP)("GET",U.DC(this.sourceUrl));e.then(r=>(this.inputs=r.inputs,this.trigger(this._state()),this.inputs),r=>{M.error(`Fetching Inputs failed with status: ${r}`,"Could not retrieve Inputs")}),It.list.promise(e)},get(e){return this.getOptional(e,!0)},getOptional(e,r){const s=(0,O.ZP)("GET",U.DC(`${this.sourceUrl}/${e}`));s.then(n=>(this.input=n,this.trigger(this._state()),this.input),n=>{r?M.error(`Fetching input ${e} failed with status: ${n}`,"Could not retrieve input"):this.trigger(this._state())}),It.get.promise(s)},create(e){const r=(0,O.ZP)("POST",U.DC(this.sourceUrl),e);r.then(()=>{M.success(`Input '${e.title}' launched successfully`),It.list()},s=>{M.error(`Launching input '${e.title}' failed with status: ${s}`,"Could not launch input")}),It.create.promise(r)},delete(e){const r=e.id,s=e.title,n=(0,O.ZP)("DELETE",U.DC(`${this.sourceUrl}/${r}`));n.then(()=>{M.success(`Input '${s}' deleted successfully`),It.list()},o=>{M.error(`Deleting input '${s}' failed with status: ${o}`,"Could not delete input")}),It.delete.promise(n)},update(e,r){const s=(0,O.ZP)("PUT",U.DC(`${this.sourceUrl}/${e}`),r);s.then(()=>{M.success(`Input '${r.title}' updated successfully`),It.list()},n=>{M.error(`Updating input '${r.title}' failed with status: ${n}`,"Could not update input")}),It.update.promise(s)}}));ns.inputsAsMap=e=>{const r={};return e.forEach(s=>{r[s.id]=s}),r};const ma=({autoFocus:e,field:r,onChange:s,title:n,typeName:o,value:l})=>{const d=g=>{const h=Gt(g.target);s(n,h)};return t.createElement(c.Input,{id:`${o}-${n}`,name:`configuration[${n}]`,type:"checkbox",label:r.human_name,checked:l,help:r.description,onChange:d,autoFocus:e})};ma.propTypes={autoFocus:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().bool},ma.defaultProps={autoFocus:!1,value:!1};const Zl=ma,mf=["text","inline_binary"],kl=(0,t.forwardRef)(({cancelAction:e,configFields:r,children:s,titleHelpText:n,includeTitleField:o,submitAction:l,title:d,titleValue:g,typeName:h,values:v,wrapperComponent:y,submitButtonText:C},R)=>{const[T,P]=(0,t.useState)(!1),[z,X]=(0,t.useState)(void 0),[se,oe]=(0,t.useState)(void 0),[Y,ge]=(0,t.useState)({});(0,t.useEffect)(()=>{const Me={};r&&Object.keys(r).forEach(Fe=>{Me[Fe]=r[Fe].default_value}),oe({...Me,...v}),ge({})},[T,r,v]),(0,t.useEffect)(()=>{X(g)},[g,T]);const ae=()=>{const Me={type:h,configuration:{}};return o&&(Me.title=z),Object.keys(r).forEach(Fe=>{Me.configuration[Fe]=se[Fe]===void 0?null:se[Fe]}),Me},_e=(Me,Fe)=>{const tr=r[Me.name].position||100,ds=r[Fe.name].position||100;let rr=tr-ds;if(!rr){const Si=Yv=>Yv?1:0;rr=Si(r[Me.name].is_optional)-Si(r[Fe.name].is_optional)}return rr||(rr=Me.pos-Fe.pos),rr},q=Me=>mf.includes(Me.type)?Me.is_encrypted:!1,J=Me=>{const Fe=Object.entries(Me.configuration).map(([jt,tr])=>{const ds=r[jt],rr=Y[jt];return q(ds)&&!(rr!=null&&rr.dirty)&&tr&&tr.is_set!==void 0?[jt,{keep_value:!0}]:[jt,tr]});return{...Me,configuration:Object.fromEntries(Fe)}},Q=()=>{P(!1),e&&e()},be=()=>{const Me=ae();l(J(Me)),P(!1)};(0,t.useImperativeHandle)(R,()=>({open(){P(!0)},getValue(){return ae()}}));const re=(Me,Fe)=>{X(Fe)},ce=(Me,Fe,jt=!0)=>{oe({...se,[Me]:Fe}),ge({...Y,[Me]:{dirty:jt}})},Te=(Me,Fe,jt)=>{var tr;if(!se)return null;const ds=se[Fe];return t.createElement(gf,{key:Fe,typeName:h,configField:Me,configKey:Fe,configValue:ds,autoFocus:jt,dirty:(tr=Y[Fe])==null?void 0:tr.dirty,onChange:ce})};let nt=!0,Vt;o&&(Vt=t.createElement(bf,{key:`${h}-title`,typeName:h,value:z,onChange:re,helpText:n}),nt=!1);const qv=Object.keys(r).map((Me,Fe)=>({name:Me,pos:Fe})).sort(_e).map(Me=>{const Fe=Te(r[Me.name],Me.name,nt);return nt&&(nt=!1),Fe});return t.createElement(y,{show:T,title:d,onCancel:Q,onSubmitForm:be,submitButtonText:C},t.createElement("fieldset",null,t.createElement("input",{type:"hidden",name:"type",value:h}),s,Vt,qv))});kl.propTypes={cancelAction:a().func,configFields:a().object,children:a().node,titleHelpText:a().string,includeTitleField:a().bool,submitAction:a().func.isRequired,title:a().node,titleValue:a().string,typeName:a().string,values:a().object,wrapperComponent:a().elementType,submitButtonText:a().string.isRequired},kl.defaultProps={cancelAction:()=>{},configFields:{},children:null,titleHelpText:"",title:null,includeTitleField:!0,titleValue:"",typeName:void 0,values:{},wrapperComponent:jn.Z};const Qb=null,ga=({typeName:e,configField:r,configKey:s,configValue:n,dirty:o,autoFocus:l,onChange:d})=>{const g=`${e}-${s}`;switch(r.type){case"text":return t.createElement(ba,{key:g,typeName:e,title:s,field:r,value:n,dirty:o,onChange:d,autoFocus:l});case"number":return t.createElement(Hl,{key:g,typeName:e,title:s,field:r,value:n,onChange:d,autoFocus:l});case"boolean":return t.createElement(Zl,{key:g,typeName:e,title:s,field:r,value:n,onChange:d,autoFocus:l});case"dropdown":return t.createElement(Kl,{key:g,typeName:e,title:s,field:r,value:n,onChange:d,autoFocus:l,addPlaceholder:!0});case"list":return t.createElement(yf,{key:g,typeName:e,title:s,field:r,value:n,onChange:d,autoFocus:l});case"inline_binary":return r.is_encrypted?t.createElement(Ef,{key:g,typeName:e,title:s,field:r,value:n,dirty:o,onChange:d,autoFocus:l}):null;default:return null}};ga.propTypes={typeName:a().string.isRequired,configField:a().object.isRequired,configKey:a().string.isRequired,configValue:a().any,autoFocus:a().bool,onChange:a().func.isRequired,dirty:a().bool},ga.defaultProps={configValue:void 0,autoFocus:!1,dirty:!1};const gf=ga;var hf=Object.defineProperty,ff=(e,r,s)=>r in e?hf(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,mr=(e,r,s)=>(ff(e,typeof r!="symbol"?r+"":r,s),s);class Wl extends t.Component{constructor(){super(...arguments),mr(this,"PASSWORD_PLACEHOLDER","********"),mr(this,"_formatRegularField",(r,s)=>{const{id:n}=this.props;let o;return r==null||r===""||Array.isArray(r)&&r.length===0?o=t.createElement("i",null,""):o=Array.isArray(r)?r.join(", "):String(r),t.createElement("li",{key:`${n}-${s}`},t.createElement("div",{className:"key"},s,":")," ",t.createElement("div",{className:"value"},o))}),mr(this,"_formatEncryptedField",(r,s)=>{const{id:n}=this.props;let o;return r.is_set?o=this.PASSWORD_PLACEHOLDER:o=t.createElement("i",null,""),t.createElement("li",{key:`${n}-${s}`},t.createElement("div",{className:"key"},s,":")," ",t.createElement("div",{className:"value"},o))}),mr(this,"_formatPasswordField",(r,s)=>{const{id:n}=this.props;return t.createElement("li",{key:`${n}-${s}`},t.createElement("div",{className:"key"},s,":"),t.createElement("div",{className:"value"},this.PASSWORD_PLACEHOLDER))}),mr(this,"_formatConfiguration",(r,s,n)=>{if(!s)return"";const o=Object.keys(s).sort().map(l=>{const d=s[l],g=n&&n.requested_configuration?n.requested_configuration[l]:void 0;return g&&(g.attributes.indexOf("is_password")>-1||g.attributes.indexOf("is_sensitive")>-1)?this._formatPasswordField(d,l):g&&g.is_encrypted?this._formatEncryptedField(d,l):this._formatRegularField(d,l)});return o.length<1&&o.push(t.createElement("li",{key:"placeholder"},"-- no configuration --")),t.createElement("ul",null,o)})}render(){const{id:r,configuration:s,typeDefinition:n}=this.props;return t.createElement(c.Well,{bsSize:"small",className:"configuration-well react-configuration-well"},this._formatConfiguration(r,s,n))}}mr(Wl,"propTypes",{id:a().string.isRequired,configuration:a().any,typeDefinition:a().object}),mr(Wl,"defaultProps",{configuration:void 0,typeDefinition:{}});const e_=null,zs=(e,r)=>e.find(s=>s.toLowerCase()===r.toLowerCase())!==void 0,$r=e=>e.is_optional&&e.type!=="boolean"?t.createElement("span",{className:"configuration-field-optional"},"(optional)"):null,t_={hasAttribute:zs,optionalMarker:$r},ha=({autoFocus:e,field:r,onChange:s,title:n,typeName:o,value:l,addPlaceholder:d})=>{const g=(C,R,T=!1)=>t.createElement("option",{key:`${o}-${n}-${C}`,value:C,id:C,disabled:T},R),h=C=>{s(n,C.target.value)},v=Object.entries(r.additional_info.values).map(([C,R])=>g(C,R));d&&v.unshift(g("",`Select ${r.human_name||n}`,!0));const y=t.createElement(t.Fragment,null,r.human_name," ",$r(r));return t.createElement(c.Input,{id:`${o}-${n}`,name:`configuration[${n}]`,label:y,type:"select",value:l,help:r.description,onChange:h,autoFocus:e,required:!r.is_optional},v)};ha.propTypes={autoFocus:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().string,addPlaceholder:a().bool},ha.defaultProps={autoFocus:!1,addPlaceholder:!1,value:""};const Kl=ha,vf=m.default.span`
vertical-align: middle;
`,fa=({field:e,title:r,typeName:s,dirty:n,onChange:o,value:l,autoFocus:d})=>{const[g,h]=(0,t.useState)(void 0),[v,y]=(0,t.useState)(!1),C=l.is_set,R=!e.is_optional,T=!n&&C,P=`${s}-${r}`,z=t.createElement(t.Fragment,null,e.human_name," ",$r(e)),X=(Q,be)=>{const re=Q.result;if(re&&typeof re=="string"){const ce=re.replace(/^data:[\s\S]+\/[\s\S]+;base64,/,"");h(be.name),e.is_encrypted?o(r,{set_value:ce}):o(r,ce)}},se=()=>{y(!0),o(r,{delete_value:!0})},oe=()=>{y(!1),h(void 0),o(r,{is_set:!0},!1)},Y=()=>C?t.createElement(c.Button,{type:"button",onClick:se},"Reset"):null,ge=()=>v?t.createElement(c.Button,{type:"button",onClick:oe},"Undo Reset"):null,ae=()=>g?t.createElement(c.Button,{type:"button",onClick:()=>{h(void 0),o(r,"")}},"Remove"):null,_e=Q=>{const be=new FileReader;be.onloadend=re=>X(be,Q),Q&&be.readAsDataURL(Q)};return T?(()=>t.createElement(c.Input,{id:P,type:"password",name:`configuration[${r}]`,label:z,required:R,readOnly:!0,help:e.description,value:"encrypted value",buttonAfter:Y(),autoFocus:d}))():(()=>g?t.createElement(c.Input,{id:P,name:`configuration[${r}]`,label:z,required:R,help:e.description,autoFocus:d,buttonAfter:t.createElement(t.Fragment,null,ae(),ge())},t.createElement(vf,null,g)):t.createElement(c.Input,{id:P,type:"file",name:`configuration[${r}]`,label:z,required:R,help:e.description,buttonAfter:ge(),onChange:Q=>_e(Q.target.files[0]),autoFocus:d}))()};fa.propTypes={autoFocus:a().bool,dirty:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().object},fa.defaultProps={autoFocus:!1,dirty:!1,value:{}};const Ef=fa,va=({autoFocus:e,field:r,onChange:s,title:n,typeName:o,value:l})=>{var d;const g=P=>{const z=P===""?[]:P.split(",");s(n,z)},h=!r.is_optional,v=r.attributes.includes("allow_create"),y=((d=r.additional_info)==null?void 0:d.values)||{},C=Object.entries(y).map(([P,z])=>({value:z,label:P})),R=t.createElement(t.Fragment,null,r.human_name," ",$r(r)),T=Array.isArray(l)?l.join(","):l;return t.createElement(c.Input,{id:`${o}-${n}`,label:R,help:r.description},t.createElement(zo,{inputId:`${o}-${n}`,name:`configuration[${n}]`,required:h,autoFocus:e,options:C,value:T,placeholder:`${v?"Add":"Select"} ${r.human_name}`,onChange:g,allowCreate:v}))};va.propTypes={autoFocus:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().oneOfType([a().array,a().string])},va.defaultProps={autoFocus:!1,value:void 0};const yf=va,Ea=({autoFocus:e,field:r,onChange:s,title:n,typeName:o,value:l})=>{const d=()=>({min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER}),g=T=>{const{min:P,max:z}=d();switch(T.toUpperCase()){case"ONLY_NEGATIVE":return{min:P,max:-1};case"ONLY_POSITIVE":return{min:0,max:z};case"IS_PORT_NUMBER":return{min:0,max:65535};default:return{min:P,max:z}}},h=()=>{const T=r.attributes.map(g);return T.length>0?T[0]:d()},v=({target:T})=>{const P=Gt(T);s(n,P)},y=!r.is_optional,C=h(),R=t.createElement(t.Fragment,null,r.human_name," ",$r(r));return t.createElement(Xr.Z,{id:`${o}-${n}`,label:R,type:"number",name:`configuration[${n}]`,required:y,onChange:v,value:l||0,help:r.description,...C,autoFocus:e})};Ea.propTypes={autoFocus:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().number},Ea.defaultProps={autoFocus:!1,value:0};const Hl=Ea,ya=({field:e,title:r,typeName:s,dirty:n,onChange:o,value:l,autoFocus:d})=>{const g=!e.is_optional,h=e.is_encrypted&&!n&&typeof l!="string"&&l.is_set,v=!zs(e.attributes,"textarea")&&(zs(e.attributes,"is_password")||h)?"password":"text",y=`${s}-${r}`,[C,R]=(0,t.useState)(!1),T=t.createElement(t.Fragment,null,e.human_name," ",$r(e)),P=()=>h?"encrypted placeholder":typeof l=="string"?l:l&&l.set_value?l.set_value:"",z=({target:Y})=>{const ge=Gt(Y);e.is_encrypted?o(r,{set_value:ge}):o(r,ge)},X=()=>{R(!0),o(r,{delete_value:!0})},se=()=>{R(!1),o(r,{is_set:!0},!1)},oe=()=>C?t.createElement(c.Button,{type:"button",onClick:se},"Undo Reset"):h?t.createElement(c.Button,{type:"button",onClick:X},"Reset"):null;return zs(e.attributes,"textarea")?t.createElement(c.Input,{id:y,type:"textarea",rows:10,label:T,name:`configuration[${r}]`,required:g,help:e.description,value:P(),onChange:z,autoFocus:d}):t.createElement(c.Input,{id:y,type:v,name:`configuration[${r}]`,label:T,required:g,help:e.description,value:P(),readOnly:h,onChange:z,buttonAfter:oe(),autoFocus:d})};ya.propTypes={autoFocus:a().bool,dirty:a().bool,field:a().object.isRequired,onChange:a().func.isRequired,title:a().string.isRequired,typeName:a().string.isRequired,value:a().oneOfType([a().string,a().object])},ya.defaultProps={autoFocus:!1,dirty:!1,value:""};const ba=ya,_a=({typeName:e,helpText:r,value:s,onChange:n})=>{const o={is_optional:!1,attributes:[],human_name:"Title",description:r,is_encrypted:!1,additional_info:{},default_value:"",position:0,type:"text"};return t.createElement(ba,{key:`${e}-title`,typeName:e,title:"title",field:o,value:s,onChange:n,autoFocus:!0})};_a.propTypes={helpText:a().string,onChange:a().func,typeName:a().string.isRequired,value:a().string},_a.defaultProps={helpText:"",onChange:()=>{},value:""};const bf=_a,Us=()=>{var e,r;return((r=(e=p.G.exports("forwarder"))==null?void 0:e[0])==null?void 0:r.messageLoaders)||{ForwarderInputDropdown:void 0}},Ca=(0,ve.ei)("core.CodecTypes",()=>Ce().createActions({list:{asyncResult:!0}})),_f=(0,ve.dS)("core.CodecTypes",()=>Ce().createStore({listenables:[Ca],codecTypes:void 0,getInitialState(){return{codecTypes:this.codecTypes}},list(){const e=(0,O.ZP)("GET",U.DC(ie.Z.CodecTypesController.list().url));e.then(r=>{this.codecTypes=r,this.trigger(this.getInitialState())},r=>{M.error(`Fetching codec types failed with status: ${r}`,"Could not retrieve codec types")}),Ca.list.promise(e)}})),Gl="127.0.0.1",Vl=({inputs:e,selectedInputId:r,onInputSelect:s})=>{const n=()=>{if(!e)return[{value:"none",label:"Loading inputs...",disabled:!0}];if(e.size===0)return[{value:"none",label:"No inputs available"}];const o=[];return e.sort((l,d)=>l.title.toLowerCase().localeCompare(d.title.toLowerCase())).forEach((l,d)=>{const g=`${d} / ${l.title} / ${l.name}`;o.push({value:d,label:g})}),o};return t.createElement(c.Input,{id:"inputSelect",name:"inputSelect",label:t.createElement(t.Fragment,null,"Message input ",t.createElement("small",null,"(optional)")),help:"Select the message input ID that should be assigned to the parsed message."},t.createElement(We.Z,{inputId:"inputSelect",name:"inputSelect","aria-label":"Message input",placeholder:"Select input",options:n(),matchProp:"label",onChange:s,value:r}))},jl=({onInputSelect:e})=>{const{ForwarderInputDropdown:r}=Us();return t.createElement(t.Fragment,null,t.createElement(r,{onLoadMessage:e,label:"Forwarder Input selection (optional)",autoLoadMessage:!0}),t.createElement("p",{className:"description"},"Select an Input profile from the list below then select an then select an Input."))},Cf=({inputs:e,selectedInputId:r,onInputSelect:s,show:n})=>{const{ForwarderInputDropdown:o}=Us(),[l,d]=(0,t.useState)();return n?le.Z.isCloud()?t.createElement(jl,{onInputSelect:s}):o?t.createElement("fieldset",null,t.createElement("legend",null,"Input selection (optional)"),t.createElement(c.Input,{id:"inputTypeSelect",type:"select",label:"Select an Input type (optional)",help:"Select the Input type you want to load the message from.",value:l!=null?l:"placeholder",onChange:g=>d(g.target.value)},t.createElement("option",{value:"placeholder",disabled:!0},"Select an Input type"),t.createElement("option",{value:"server"},"Server Input"),t.createElement("option",{value:"forwarder"},"Forwarder Input")),l==="server"&&t.createElement(Vl,{inputs:e,selectedInputId:r,onInputSelect:s}),l==="forwarder"&&t.createElement(jl,{onInputSelect:s})):t.createElement(Vl,{inputs:e,selectedInputId:r,onInputSelect:s}):null},Sa=({onMessageLoaded:e,inputIdSelector:r,codecTypes:s,inputs:n})=>{const[o,l]=(0,t.useState)(!1),[d,g]=(0,t.useState)(""),[h,v]=(0,t.useState)(Gl),[y,C]=(0,t.useState)(""),[R,T]=(0,t.useState)({}),[P,z]=(0,t.useState)(),X=Os();(0,t.useEffect)(()=>{Ca.list()},[]),(0,t.useEffect)(()=>{r&&It.list()},[r]);const se=re=>{re.preventDefault(),l(!0);const ce=Nr.loadRawMessage(d,h,y,R);ce.then(Te=>{e(Te,{message:d,remoteAddress:h,codec:y,codecConfiguration:R,inputId:P})}),ce.finally(()=>l(!1))},oe=()=>{if(!s)return[{value:"none",label:"Loading codec types...",disabled:!0}];const re=Object.keys(s);return re.length===0?[{value:"none",label:"No codecs available"}]:re.filter(ce=>ce!=="random-http-msg").map(ce=>{const{name:Te}=s[ce];return{value:ce,label:Te===""?ce:Te}}).sort((ce,Te)=>ce.label.toLowerCase().localeCompare(Te.label.toLowerCase()))},Y=re=>{C(re),T({})},ge=re=>{z(re)},ae=re=>{g(Gt(re.target))},_e=re=>{v(Gt(re.target))},q=(re,ce)=>{const Te={...R,[re]:ce};T(Te)},J=(re,ce)=>{const Te=R[re],nt="RawMessageLoader",Vt=`${nt}-${re}`;switch(ce.type){case"text":return t.createElement(ba,{key:Vt,typeName:nt,title:re,field:ce,value:Te,onChange:q});case"number":return t.createElement(Hl,{key:Vt,typeName:nt,title:re,field:ce,value:Te,onChange:q});case"boolean":return t.createElement(Zl,{key:Vt,typeName:nt,title:re,field:ce,value:Te,onChange:q});case"dropdown":return t.createElement(Kl,{key:Vt,typeName:nt,title:re,field:ce,value:Te,onChange:q});default:return null}},Q=!d||!y||o;let be;if(s&&y){const re=s[y].requested_configuration;be=Object.keys(re).sort((ce,Te)=>re[ce].is_optional-re[Te].is_optional).map(ce=>J(ce,re[ce]))}return t.createElement(c.Row,null,t.createElement(c.Col,{md:7},t.createElement("form",{onSubmit:se},t.createElement("fieldset",null,t.createElement(c.Input,{id:"message",name:"message",type:"textarea",label:"Raw message",value:d,onChange:ae,rows:3,required:!0}),t.createElement(c.Input,{id:"remoteAddress",name:"remoteAddress",type:"text",label:t.createElement("span",null,"Source IP address ",t.createElement("small",null,"(optional)")),help:`Remote IP address to use as message source. Graylog will use ${Gl} by default.`,value:h,onChange:_e})),t.createElement(Cf,{inputs:n,selectedInputId:P,onInputSelect:ge,show:r}),t.createElement("fieldset",null,t.createElement("legend",null,"Codec configuration"),t.createElement(c.Input,{id:"codec",name:"codec",label:"Message codec",help:"Select the codec that should be used to decode the message.",required:!0},t.createElement(We.Z,{id:"codec","aria-label":"Message codec",placeholder:"Select codec",options:oe(),matchProp:"label",onChange:Y,value:y})),be),t.createElement(mo,{submitButtonText:"Load message",submitLoadingText:"Loading message...",isSubmitting:o,isAsyncSubmit:!0,disabledSubmit:Q,onCancel:()=>X.goBack()}))))};Sa.propTypes={onMessageLoaded:a().func.isRequired,inputIdSelector:a().bool,codecTypes:a().object,inputs:a().object},Sa.defaultProps={inputIdSelector:!1,codecTypes:void 0,inputs:void 0};const Sf=ws(Sa,{inputs:ns,codecTypes:_f},({inputs:{inputs:e},codecTypes:{codecTypes:r}})=>({inputs:e?Wt.Map(ns.inputsAsMap(e)):void 0,codecTypes:r})),ql=m.default.div`
display: flex;
flex-wrap: wrap;
.form-group {
margin: 0 15px 0 0;
}
`,Yl=(0,m.default)(c.Input)`
min-width: 400px;
`,as="placeholder",Tf=({id:e,title:r,type:s})=>t.createElement("option",{key:e,value:e},r," (",s,")"),wf=(e,r)=>e.title.localeCompare(r.title),Af=({input:{type:e,title:r}})=>t.createElement(Yl,{id:`${e}-select`,type:"select",disabled:!0},t.createElement("option",null,`${r} (${e})`)),Ta=({disabled:e,inputs:r,onLoadMessage:s,preselectedInputId:n,title:o})=>{const[l,d]=(0,t.useState)(n||as),g=(0,t.useCallback)(y=>d(y.target.value),[]),h=(0,t.useCallback)(()=>s(l),[s,l]),v=(0,t.useMemo)(()=>r==null?void 0:r.get(n),[r,n]);if(v)return t.createElement(ql,null,t.createElement(Af,{input:v}),t.createElement(c.Button,{bsStyle:"info",disabled:l===as,onClick:h},o));if(r){const y=r.sort(wf).map(Tf);return t.createElement(ql,null,t.createElement(Yl,{id:"placeholder-select",type:"select","aria-label":"server input select",value:l,onChange:g,placeholder:as},t.createElement("option",{value:as},"Select an Input"),y.toArray()),t.createElement(c.Button,{bsStyle:"info",disabled:e||l===as,onClick:h},o))}return t.createElement(st.Z,null)};Ta.propTypes={inputs:b.object,title:b.string.isRequired,preselectedInputId:b.string,onLoadMessage:b.func,disabled:b.bool},Ta.defaultProps={inputs:Wt.Map(),onLoadMessage:()=>{},preselectedInputId:void 0,disabled:!1};const Rf=Ta;var xf=i("AexTD6lP"),Pf=i.n(xf);const wa=(0,ve.dS)("core.UniversalSearch",()=>Ce().createStore({DEFAULT_LIMIT:150,listenables:[],search(e,r,s,n,o,l,d,g,h){const v=wa.extractTimeRange(e,s),y=o||this.DEFAULT_LIMIT,C=(l-1)*y,R=U.DC(ie.Z.UniversalSearchApiController.search(e,r,v,n,y,C,d,g,h).url);return(0,O.ZP)("GET",R).then(T=>{const P=Je().extend({},T);return P.fields=T.fields.map(z=>({hash:Pf()(z),name:z,standard_selected:z===fo||z===vo})),P.messages=P.messages.map(z=>ua.formatMessageSummary(z)),P})}}));wa.extractTimeRange=(e,r)=>e==="relative"?{range:r.range||r.relative}:r;const Jl=m.default.div`
margin-top: 5px;
`,Aa=m.default.p`
margin-bottom: 0.5em;
`,If=(0,m.default)(c.Input)`
width: 200px;
`,Xl=({selectedInputId:e,inputs:r,onChange:s,isLoading:n})=>t.createElement("fieldset",null,t.createElement(Aa,null,e?'Click on "Load Message" to load the most recent message received by this input within the last hour.':'Select an Input from the list below and click "Load Message" to load the most recent message received by this input within the last hour.'),t.createElement(Rf,{inputs:r,preselectedInputId:e,onLoadMessage:s,title:n?"Loading message...":"Load Message",disabled:n})),Ql=({selectedInputId:e,onChange:r,isLoading:s})=>{const{ForwarderInputDropdown:n}=Us();return t.createElement("fieldset",null,t.createElement(Aa,null,'Select an Input profile from the list below then select an then select an Input and click on "Load message" to load most recent message received by this input within the last hour.'),t.createElement(c.Row,null,t.createElement(c.Col,{md:8},t.createElement(n,{onLoadMessage:r,title:s?"Loading message...":"Load Message",preselectedInputId:e,loadButtonDisabled:s}))))},Ra=({inputs:e,onMessageLoaded:r,selectedInputId:s})=>{const[n,o]=(0,t.useState)(!1),{ForwarderInputDropdown:l}=Us(),[d,g]=(0,t.useState)(l?void 0:"server"),h=le.Z.isCloud();(0,t.useEffect)(()=>{s&&e&&g(e!=null&&e.get(s)?"server":"forwarder")},[e,s]);const v=y=>{const C=e&&e.get(y);if(d==="server"&&!C){M.error(`Invalid input selected: ${y}`,`Could not load message from invalid Input ${y}`);return}o(!0);const R=wa.search("relative",`gl2_source_input:${y} OR gl2_source_radio_input:${y}`,{range:3600},void 0,1,void 0,void 0,void 0,!1);R.then(T=>{T.total_results>0?r(T.messages[0]):(M.error("Input did not return a recent message."),r(void 0))}),R.finally(()=>o(!1))};return h?t.createElement(Jl,null,t.createElement(Ql,{selectedInputId:s,onChange:v,isLoading:n})):t.createElement(Jl,null,l?t.createElement(t.Fragment,null,t.createElement("fieldset",null,t.createElement(Aa,null,"Select the Input type you want to load the message from."),t.createElement(If,{id:"inputTypeSelect","aria-label":"input type select",type:"select",value:d!=null?d:"placeholder",disabled:!!s,onChange:y=>g(y.target.value)},t.createElement("option",{value:"placeholder",disabled:!0},"Select an Input type"),t.createElement("option",{value:"server"},"Server Input"),t.createElement("option",{value:"forwarder"},"Forwarder Input"))),d==="server"&&t.createElement(Xl,{selectedInputId:s,inputs:e,onChange:v,isLoading:n}),d==="forwarder"&&t.createElement(Ql,{selectedInputId:s,onChange:v,isLoading:n})):t.createElement(Xl,{selectedInputId:s,inputs:e,onChange:v,isLoading:n}))};Ra.propTypes={inputs:a().object,onMessageLoaded:a().func.isRequired,selectedInputId:a().string},Ra.defaultProps={inputs:void 0,selectedInputId:void 0};const Df=Ra;var Mf=Object.defineProperty,Lf=(e,r,s)=>r in e?Mf(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,gr=(e,r,s)=>(Lf(e,typeof r!="symbol"?r+"":r,s),s);class xa extends t.Component{constructor(r){super(r),gr(this,"TAB_KEYS",{recent:1,messageId:2,raw:3}),gr(this,"onMessageLoaded",s=>{this.setState({message:s});const{onMessageLoaded:n}=this.props;n&&n(s)}),gr(this,"loadData",()=>{It.list(),Lt.listStreams().then(s=>{const n={};s.forEach(o=>{n[o.id]=o}),this.setState({streams:Wt.Map(n)})})}),gr(this,"_isTabVisible",s=>{const{tabs:n}=this.props;return n===s||n.indexOf(s)!==-1}),gr(this,"_getActiveTab",()=>{const{activeTab:s}=this.state;if(s)return s;const{messageId:n,index:o}=this.props;return this._isTabVisible("messageId")&&n&&o?this.TAB_KEYS.messageId:this._isTabVisible("recent")?this.TAB_KEYS.recent:this._isTabVisible("messageId")?this.TAB_KEYS.messageId:this.TAB_KEYS.raw}),gr(this,"_changeActiveTab",s=>{const{activeTab:n}=this.state;n!==s&&this.setState({activeTab:s,message:void 0})}),gr(this,"_formatMessageLoaders",()=>{const s=[];if(this._isTabVisible("recent")){const{inputs:n,selectedInputId:o}=this.props;s.push(t.createElement(c.Tab,{key:"recent",eventKey:this.TAB_KEYS.recent,title:"Recent Message",style:{marginBottom:10}},t.createElement(Df,{inputs:n,selectedInputId:o,onMessageLoaded:this.onMessageLoaded})))}if(this._isTabVisible("messageId")){const{messageId:n,index:o}=this.props;s.push(t.createElement(c.Tab,{key:"messageId",eventKey:this.TAB_KEYS.messageId,title:"Message ID",style:{marginBottom:10}},t.createElement("div",{style:{marginTop:5,marginBottom:15}},"Please provide the id and index of the message that you want to load in this form:"),t.createElement(uf,{messageId:n,index:o,onMessageLoaded:this.onMessageLoaded,hidden:!1,hideText:!0})))}return this._isTabVisible("raw")&&s.push(t.createElement(c.Tab,{key:"raw",eventKey:this.TAB_KEYS.raw,title:"Raw Message",style:{marginBottom:10}},t.createElement("div",{style:{marginTop:5,marginBottom:15}},"Load a message from text, as if it was sent by a log source."),t.createElement(Sf,{onMessageLoaded:this.onMessageLoaded}))),s}),this.state={activeTab:void 0,message:void 0}}componentDidMount(){this.loadData()}render(){const{streams:r,message:s}=this.state,{customFieldActions:n,inputs:o}=this.props,l=s&&o?t.createElement(c.Col,{md:12},t.createElement(af,{message:s,inputs:o,streams:r,customFieldActions:n})):null;return t.createElement("div",null,t.createElement(c.Tabs,{id:"loaderTabs",activeKey:this._getActiveTab(),onSelect:this._changeActiveTab,animation:!1},this._formatMessageLoaders()),l)}}xa.propTypes={tabs:a().oneOfType([a().oneOf(["recent","messageId","raw"]),a().arrayOf(a().oneOf(["recent","messageId","raw"]))]),messageId:a().string,index:a().string,onMessageLoaded:a().func,selectedInputId:a().string,customFieldActions:a().node,inputs:a().object},xa.defaultProps={tabs:["recent","messageId"],index:void 0,messageId:void 0,onMessageLoaded:void 0,selectedInputId:void 0,customFieldActions:void 0,inputs:void 0};const Of=ws(xa,{inputs:ns},({inputs:{inputs:e}})=>({inputs:e?Wt.Map(ns.inputsAsMap(e)):void 0}));function Nf(){return Ze.pluginRoute("WIZARD_ALERTRULES")}const hr={getWizardRoute:Nf},$f=[{value:"info",label:t.createElement(f.Z,{id:"wizard.info",defaultMessage:"Info"})},{value:"low",label:t.createElement(f.Z,{id:"wizard.low",defaultMessage:"Low"})},{value:"medium",label:t.createElement(f.Z,{id:"wizard.medium",defaultMessage:"Medium"})},{value:"high",label:t.createElement(f.Z,{id:"wizard.high",defaultMessage:"High"})}],ei=({title:e,severity:r,onUpdate:s})=>{const n=(0,pr.Z)(),o=d=>{s("title",d)},l=d=>{s("severity",d)};return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:10,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.titleSeverity",defaultMessage:"Alert Title and Severity"}))),t.createElement(c.Col,{md:10},t.createElement(c.Input,{style:{borderTopRightRadius:"0px",borderBottomRightRadius:"0px",height:"36px",width:"450px"},id:"title",name:"title",type:"text",onChange:d=>o(d.target.value),defaultValue:e}),t.createElement(c.Input,{id:"severity",name:"severity"},t.createElement("div",{style:{width:"150px"}},t.createElement(We.Z,{value:r,options:$f,matchProp:"value",onChange:l,clearable:!1,placeholder:n.formatMessage({id:"wizard.select",defaultMessage:"Select..."})})))))};ei.propTypes={onUpdate:a().func};const zf=ei;var Uf=i("Ai8uwR4r"),Bf=i.n(Uf);const n_=a().exact({max_index_retention_period:a().string}),Ff=a().exact({type:a().string,max_size:a().number}),Zf=a().exact({type:a().string,max_docs_per_index:a().number}),kf=a().exact({type:a().string,rotation_period:a().string,max_rotation_period:a().string,rotate_empty_index_set:a().bool}),Wf=a().exact({type:a().string,index_lifetime_max:a().string,index_lifetime_min:a().string}),ti=a().oneOfType([Ff,Zf,kf,Wf]),a_=a().string,ri=a().shape({type:a().string.isRequired,max_number_of_indices:a().number,index_action:a().string}),zt=a().exact({type:a().string.isRequired}),Kf=a().exact({type:a().string.isRequired,enum:a().arrayOf(a().string).isRequired}),Hf=a().exact({rotation_period:zt,max_rotation_period:zt,type:zt.isRequired,max_size:zt,max_docs_per_index:zt,rotate_empty_index_set:zt,index_lifetime_max:zt,index_lifetime_min:zt}),Gf=a().exact({type:a().string.isRequired,id:a().string,properties:Hf.isRequired}),Vf=a().exact({max_number_of_indices:zt.isRequired,type:zt.isRequired,index_action:Kf}),jf=a().exact({type:a().string.isRequired,id:a().string,properties:Vf}),o_=a().exact({type:a().string.isRequired,default_config:ti.isRequired,json_schema:Gf.isRequired}),l_=a().exact({type:a().string.isRequired,default_config:ri.isRequired,json_schema:jf.isRequired}),i_=a().shape({can_be_default:a().bool,id:a().string,title:a().string,description:a().string.isRequired,index_prefix:a().string.isRequired,shards:a().number.isRequired,replicas:a().number.isRequired,rotation_strategy_class:a().string.isRequired,rotation_strategy:ti.isRequired,retention_strategy_class:a().string.isRequired,retention_strategy:ri.isRequired,creation_date:a().string,index_analyzer:a().string.isRequired,index_optimization_max_num_segments:a().number.isRequired,index_optimization_disabled:a().bool.isRequired,field_type_refresh_interval:a().number.isRequired,index_template_type:a().string,writable:a().bool.isRequired,default:a().bool.isRequired}),Ut=(0,ve.ei)("core.IndexSets",()=>Ce().createActions({list:{asyncResult:!0},listPaginated:{asyncResult:!0},get:{asyncResult:!0},update:{asyncResult:!0},create:{asyncResult:!0},delete:{asyncResult:!0},setDefault:{asyncResult:!0},stats:{asyncResult:!0}})),qf=(0,ve.dS)("core.IndexSets",()=>Ce().createStore({listenables:[Ut],indexSetsCount:void 0,indexSets:void 0,indexSetStats:void 0,indexSet:void 0,getInitialState(){return{indexSetsCount:this.indexSetsCount,indexSets:this.indexSets,indexSetStats:this.indexSetStats}},list(e){const r=(0,U.DC)(ie.Z.IndexSetsApiController.list(e).url),s=(0,O.ZP)("GET",r);s.then(n=>this.trigger({indexSetsCount:n.total,indexSets:n.index_sets,indexSetStats:n.stats}),n=>{M.error(`Fetching index sets list failed: ${n.message}`,"Could not retrieve index sets.")}),Ut.list.promise(s)},listPaginated(e,r,s){const n=(0,U.DC)(ie.Z.IndexSetsApiController.listPaginated(e,r,s).url),o=(0,O.ZP)("GET",n);o.then(l=>this.trigger({indexSetsCount:l.total,indexSets:l.index_sets,indexSetStats:l.stats}),l=>{M.error(`Fetching index sets list failed: ${this._errorMessage(l)}`,"Could not retrieve index sets.")}),Ut.listPaginated.promise(o)},get(e){const r=(0,U.DC)(ie.Z.IndexSetsApiController.get(e).url),s=(0,O.ZP)("GET",r);s.then(n=>(this.trigger({indexSet:n}),n),n=>{M.error(`Fetching index set '${e}' failed with status: ${this._errorMessage(n)}`,"Could not retrieve index set.")}),Ut.get.promise(s)},update(e){const r=(0,U.DC)(ie.Z.IndexSetsApiController.get(e.id).url),s=(0,O.ZP)("PUT",r,e);s.then(n=>(M.success(`Successfully updated index set '${e.title}'`,"Success"),this.trigger({indexSet:n}),n),n=>{M.error(`Updating index set '${e.title}' failed with status: ${this._errorMessage(n)}`,"Could not update index set.")}),Ut.update.promise(s)},create(e){const r=(0,U.DC)(ie.Z.IndexSetsApiController.create().url),s=(0,O.ZP)("POST",r,e);s.then(n=>(M.success(`Successfully created index set '${e.title}'`,"Success"),this.trigger({indexSet:n}),n),n=>{M.error(`Creating index set '${e.title}' failed with status: ${this._errorMessage(n)}`,"Could not create index set.")}),Ut.create.promise(s)},delete(e,r){const s=(0,U.DC)(ie.Z.IndexSetsApiController.delete(e.id,r).url),n=(0,O.ZP)("DELETE",s);n.then(()=>{M.success(`Successfully deleted index set '${e.title}'`,"Success")},o=>{M.error(`Deleting index set '${e.title}' failed with status: ${this._errorMessage(o)}`,"Could not delete index set.")}),Ut.delete.promise(n)},setDefault(e){const r=(0,U.DC)(ie.Z.IndexSetsApiController.setDefault(e.id).url),s=(0,O.ZP)("PUT",r);s.then(()=>{M.success(`Successfully set index set '${e.title}' as default`,"Success")},n=>{M.error(`Setting index set '${e.title}' as default failed with status: ${this._errorMessage(n)}`,"Could not set default index set.")}),Ut.setDefault.promise(s)},stats(){const e=(0,U.DC)(ie.Z.IndexSetsApiController.stats().url),r=(0,O.ZP)("GET",e);r.then(s=>this.trigger({globalIndexSetStats:{indices:s.indices,documents:s.documents,size:s.size}}),s=>{M.error(`Fetching global index stats failed: ${s.message}`,"Could not retrieve global index stats.")}),Ut.stats.promise(r)},_errorMessage(e){try{return Bf()(e.additional.body)?e.additional.body.map(({message:r,path:s})=>`${s!=null?s:""} ${r}.`).join(" "):e.additional.body.message}catch{return e.message}}}));let Yf=0;const os=()=>Yf++,Jf=()=>t.createElement(pe.Z,{name:"plus-circle"}),tt=Ce().createActions({list:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},deleteByName:{asyncResult:!0},update:{asyncResult:!0},exportAlertLists:{asyncResult:!0},importAlertLists:{asyncResult:!0}}),Xf=()=>t.createElement(pe.Z,{name:"trash"}),Qf=({defaultValue:e,onChange:r})=>{const s=(0,m.useTheme)(),n=(0,t.useRef)(null),[o,l]=(0,t.useState)();return(0,t.useEffect)(()=>{o!==void 0&&r(o)},[o]),(0,t.useEffect)(()=>{(0,O.ZP)("GET",(0,U.DC)(ie.Z.SystemApiController.fields().url)).then(g=>{Je()(n.current.getInputDOMNode()).typeahead({hint:!0,highlight:!0,minLength:1},{name:"fields",displayKey:"value",source:en.substringMatcher(g.fields,"value",6)})});const d=Cr.findDOMNode(n.current);return Je()(d).on("typeahead:change typeahead:selected",g=>{l(g)}),()=>{Je()(n.current.getInputDOMNode()).typeahead("destroy");const g=Cr.findDOMNode(n.current);Je()(g).off("typeahead:change typeahead:selected")}},[s]),t.createElement(c.Input,{id:"field-input",type:"text",required:!0,name:"field",ref:n,wrapperClassName:"typeahead-wrapper",defaultValue:e})},ev=()=>[{value:"1",label:t.createElement(f.Z,{id:"wizard.matchesExactly",defaultMessage:"matches exactly"})},{value:"-1",label:t.createElement(f.Z,{id:"wizard.notMatchesExactly",defaultMessage:"does not match exactly"})},{value:"2",label:t.createElement(f.Z,{id:"wizard.matchesRegularExpression",defaultMessage:"matches regular expression"})},{value:"-2",label:t.createElement(f.Z,{id:"wizard.notMatchRegularExpression",defaultMessage:"does not match regular expression"})},{value:"3",label:t.createElement(f.Z,{id:"wizard.greaterThan",defaultMessage:"is greater than"})},{value:"-3",label:t.createElement(f.Z,{id:"wizard.notGreaterThan",defaultMessage:"is not greater than"})},{value:"4",label:t.createElement(f.Z,{id:"wizard.smallerThan",defaultMessage:"is smaller than"})},{value:"-4",label:t.createElement(f.Z,{id:"wizard.notSmallerThan",defaultMessage:"is not smaller than"})},{value:"5",label:t.createElement(f.Z,{id:"wizard.present",defaultMessage:"is present"})},{value:"-5",label:t.createElement(f.Z,{id:"wizard.notPresent",defaultMessage:"is not present"})},{value:"6",label:t.createElement(f.Z,{id:"wizard.contains",defaultMessage:"contains"})},{value:"-6",label:t.createElement(f.Z,{id:"wizard.notContain",defaultMessage:"does not contain"})},{value:"7",label:t.createElement(f.Z,{id:"wizard.listpresent",defaultMessage:"is present in list"})},{value:"-7",label:t.createElement(f.Z,{id:"wizard.listnotpresent",defaultMessage:"is not present in list"})}],si=({matchData:e,rule:r,onUpdate:s,onDelete:n})=>{const[o,l]=(0,t.useState)(null);(0,t.useEffect)(()=>{tt.list().then(l)},[]);const d=()=>e.rules[r.id]?"#dff0d8":"#f2dede",g=(Y,ge,ae)=>{s({field:Y,type:ge,value:ae})},h=Y=>{g(yl.getValueFromInput(Y.target),r.type,r.value)},v=Y=>{g(r.field,parseInt(Y),r.value)},y=Y=>{g(r.field,r.type,Y)},C=Y=>{let ge=[];if(Y!==null)for(let ae=0;aer.type!==5&&r.type!==-5&&r.type!==7&&r.type!==-7?t.createElement(c.Input,{style:{backgroundColor:X,borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",height:"36px"},id:"value",name:"value",type:"text",onChange:Y=>y(Y.target.value),value:r.value}):r.type===7||r.type===-7?t.createElement(c.Input,{id:"alertLists",name:"alertLists"},t.createElement("div",{style:{width:"150px"}},t.createElement(We.Z,{style:{backgroundColor:X,borderRadius:"0px"},autosize:!1,required:!0,clearable:!1,value:r.value,options:C(o),matchProp:"value",onChange:y,placeholder:P.select}))):t.createElement("span",{style:{marginRight:199}}),T=(0,pr.Z)(),P={delete:T.formatMessage({id:"wizard.delete",defaultMessage:"Delete"}),select:T.formatMessage({id:"wizard.select",defaultMessage:"Select..."})},X=e&&e.rules.hasOwnProperty(r.id)?d():"",se=t.createElement("button",{id:"delete-alert",type:"button",className:"btn btn-primary",title:P.delete,style:{marginRight:"0.5em"},onClick:n},t.createElement(Xf,null)),oe=R();return o?t.createElement("div",{className:"form-inline"},se,t.createElement(c.Input,{id:"field",name:"field"},t.createElement("div",{style:{width:"200px"}},t.createElement(Qf,{defaultValue:r.field,onChange:h}))),t.createElement(c.Input,{id:"type",name:"type"},t.createElement("div",{style:{width:"200px"}},t.createElement(We.Z,{style:{backgroundColor:X},required:!0,clearable:!1,value:r.type.toString(),options:ev(),matchProp:"value",onChange:v,placeholder:P.select}))),oe):t.createElement(st.Z,null)};si.propTypes={rule:a().object.isRequired,onUpdate:a().func.isRequired,onDelete:a().func.isRequired,matchData:a().array};const tv=si,rv=({fieldRules:e,matchData:r,onSaveStream:s})=>{const o={add:(0,pr.Z)().formatMessage({id:"wizard.add",defaultMessage:"Add"})},[l,d]=(0,t.useState)(e),g=R=>{d(R),s(R)},h=()=>{const R={field:"",type:"",value:"",identifier:os()},T=[...l,R];g(T)},v=(R,T)=>{const P=[...l];P[R]={...T,identifier:l[R].identifier},g(P)},y=R=>{const T=[...l];T.splice(R,1),g(T)},C=l.map((R,T)=>t.createElement("div",{key:R.identifier},t.createElement(tv,{rule:R,matchData:r,onUpdate:P=>v(T,P),onDelete:()=>y(T)}),t.createElement("br",null)));return t.createElement(t.Fragment,null,C,t.createElement(c.Button,{onClick:h,bsStyle:"info",title:o.add},t.createElement(Jf,null)))},sv=Be()({displayName:"FieldsInput",mixins:[Ce().connect(qf)],propTypes:{stream:a().object.isRequired,onSaveStream:a().func.isRequired,message:a().object,matchData:a().object},componentDidMount(){Ut.list(!1)},componentDidUpdate(e){_r()(this.props.matchData,e.matchData)||this.setState({matchData:this.props.matchData}),!_r()(this.props.stream,e.stream)&&this.props.stream!==null&&(this.setState({stream:this.props.stream}),this.setState({matchData:void 0}))},getInitialState(){return{stream:Se.clone(this.props.stream),indexSets:void 0}},_availableMatchingType(){return[{value:"AND",label:t.createElement(f.Z,{id:"wizard.all",defaultMessage:"all"})},{value:"OR",label:t.createElement(f.Z,{id:"wizard.atLeastOne",defaultMessage:"at least one"})}]},_onMatchingTypeSelect(e){this._updateStreamField("matching_type",e)},_updateStreamField(e,r){const s=Se.clone(this.state.stream);s[e]=r,this.setState({stream:s}),this.props.onSaveStream(e,r)},_onSaveStream(e){const r={...this.state.stream,field_rule:e};this.setState({stream:r}),this.props.onSaveStream("field_rule",e)},_isRuleValid(e){return e.field!==""&&(e.type===5||e.type===-5)||e.field!==""&&e.value!==""&&(e.type===1||e.type===-1||e.type===2||e.type===-2||e.type===3||e.type===-3||e.type===4||e.type===-4||e.type===6||e.type===-6)},_isFieldRulesValid(){for(let e=0;e{this.setState({tempStreamID:s.stream_id}),Lt.get(s.stream_id,n=>{let o=[];for(let d=0;d{this.setState({matchData:d}),Lt.remove(this.state.tempStreamID)})})})}else this.setState({matchData:void 0})},_getMatchDataColor(){return this.state.matchData.matches?"#dff0d8":"#f2dede"},_isLoading(){return!this.state.stream},render(){if(this._isLoading())return t.createElement("div",{style:{marginLeft:10}},t.createElement(st.Z,null));const e=this.state.matchData?this._getMatchDataColor():"#FFFFFF",{intl:r}=this.props,s={tryFieldsCondition:r.formatMessage({id:"wizard.tryFieldsCondition",defaultMessage:"Try the fields condition"}),select:r.formatMessage({id:"wizard.select",defaultMessage:"Select..."})};return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.fieldsCondition",defaultMessage:"Fields Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.messagesMatch",defaultMessage:"Messages must match"})),t.createElement(c.Input,{ref:"matching_type",id:"matching_type",name:"matching_type",required:!0},t.createElement("div",{style:{width:"150px"}},t.createElement(We.Z,{style:{backgroundColor:e},autosize:!1,required:!0,clearable:!1,value:this.state.stream.matching_type,options:this._availableMatchingType(),matchProp:"value",onChange:this._onMatchingTypeSelect,placeholder:s.select}))),t.createElement("label",null,"\xA0 "),t.createElement("label",null,t.createElement(f.Z,{id:"wizard.followingRules",defaultMessage:"of the following rules:"}))," ",t.createElement(c.Button,{disabled:!this.props.message,onClick:this._checkFieldsCondition,bsStyle:"info",title:s.tryFieldsCondition,style:{marginLeft:"10em"}},t.createElement(f.Z,{id:"wizard.try",defaultMessage:"Try"})),t.createElement("br",null),t.createElement("br",null),t.createElement(rv,{fieldRules:this.state.stream.field_rule,matchData:this.state.matchData,onSaveStream:this._onSaveStream})))}}),fr=(0,Lr.ZP)(sv),nv=[{value:"1",label:t.createElement(f.Z,{id:"wizard.minutes",defaultMessage:"minutes"})},{value:"60",label:t.createElement(f.Z,{id:"wizard.hours",defaultMessage:"hours"})},{value:"1440",label:t.createElement(f.Z,{id:"wizard.days",defaultMessage:"days"})}],ni=({time:e,time_type:r,onUpdate:s})=>{const n=(0,pr.Z)(),o=d=>{s("time",d*r)},l=d=>{s("time",parseInt(d)*e)};return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.timeRangeInput",defaultMessage:"Time Range Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.messagesCome",defaultMessage:"Messages must come in the last"})),t.createElement(c.Input,{id:"time",name:"time",type:"number",min:"1",value:e,onChange:d=>o(d.target.value),style:{borderTopRightRadius:"0px",borderBottomRightRadius:"0px",height:"36px",width:"100px"}}),t.createElement(c.Input,{id:"time_type",name:"time_type",required:!0,className:"form-control"},t.createElement("div",{style:{width:"150px"}},t.createElement(We.Z,{required:!0,clearable:!1,value:r,options:nv,matchProp:"value",onChange:l,placeholder:n.formatMessage({id:"wizard.select",defaultMessage:"Select..."})})))))};ni.propTypes={onUpdate:a().func};const ls=ni,is=Be()({displayName:"Description",propTypes:{onUpdate:a().func},getDefaultProps(){return{description:""}},getInitialState(){return{description:this.props.description}},_onValueChanged(e){return r=>{this.props.onUpdate(e,r.target.value)}},render(){return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.titleDescription",defaultMessage:"Description (optional)"}))),t.createElement(c.Col,{md:10},t.createElement(c.Input,{style:{minWidth:600},ref:"description",id:"description",name:"description",type:"textarea",onChange:this._onValueChanged("description"),defaultValue:this.state.description})))}}),av=Be()({displayName:"StatisticsCondition",propTypes:{onUpdate:a().func},getInitialState(){return{alert:Se.clone(this.props.alert)}},_handleChangeCondition(e,r){let s=Se.clone(this.state.alert);e==="threshold"||e==="additional_threshold"||e==="time"?s.condition_parameters[e]=parseInt(r):s.condition_parameters[e]=r,this.setState({alert:s}),this.props.onUpdate("condition_parameters",s.condition_parameters)},_handleChangeStream(e,r){let s=Se.clone(this.state.alert);s.stream[e]=r,this.setState({alert:s}),this.props.onUpdate("stream",s.stream)},render(){let e,r;return this.props.alert.condition_parameters.time>=1440?(e=this.props.alert.condition_parameters.time/1440,r=1440):this.props.alert.condition_parameters.time>=60?(e=this.props.alert.condition_parameters.time/60,r=60):(e=this.props.alert.condition_parameters.time,r=1),t.createElement(t.Fragment,null,t.createElement(fr,{stream:this.props.alert.stream,onSaveStream:this._handleChangeStream,message:this.props.message,matchData:this.props.matchData}),t.createElement("br",null),t.createElement(ls,{onUpdate:this._handleChangeCondition,time:e.toString(),time_type:r.toString()}),t.createElement("br",null),t.createElement(uh,{onUpdate:this._handleChangeCondition,type:this.props.alert.condition_parameters.type,field:this.props.alert.condition_parameters.field,threshold:this.props.alert.condition_parameters.threshold,thresholdType:this.props.alert.condition_parameters.threshold_type}),t.createElement("br",null),t.createElement(is,{onUpdate:this.props.onUpdate,description:this.props.alert.description}),t.createElement("br",null))}}),ov=Be()({displayName:"NumberInput",propTypes:{onUpdate:a().func},getDefaultProps(){return{threshold_type:"",threshold:""}},getInitialState(){return{threshold_type:this.props.threshold_type,threshold:this.props.threshold}},_availableThresholdTypes(){return[{value:">",label:t.createElement(f.Z,{id:"wizard.more",defaultMessage:"more than"})},{value:"<",label:t.createElement(f.Z,{id:"wizard.less",defaultMessage:"less than"})}]},_onThresholdTypeSelect(e){this.setState({threshold_type:e}),this.props.onUpdate("threshold_type",e)},_onThresholdChanged(){return e=>{this.setState({threshold:e.target.value}),this.props.onUpdate("threshold",e.target.value)}},render(){const{intl:e}=this.props;return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.NumberInput",defaultMessage:"Count Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.thereMustBe",defaultMessage:"There must be "})),t.createElement(c.Input,{ref:"threshold_type",id:"threshold_type",name:"threshold_type",required:!0},t.createElement("div",{style:{width:"150px"}},t.createElement(We.Z,{required:!0,clearable:!1,value:this.state.threshold_type,options:this._availableThresholdTypes(),matchProp:"value",onChange:this._onThresholdTypeSelect,placeholder:e.formatMessage({id:"wizard.select",defaultMessage:"Select..."})}))),t.createElement(c.Input,{ref:"threshold",id:"threshold",name:"threshold",type:"number",min:"0",onChange:this._onThresholdChanged(),value:this.state.threshold,style:{borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",height:"36px",width:"100px"}}),t.createElement("label",null,"\xA0 "),t.createElement("label",null,t.createElement(f.Z,{id:"wizard.messages",defaultMessage:"messages"}))))}}),cs=(0,Lr.ZP)(ov),lv=Be()({displayName:"GroupByInput",propTypes:{onUpdate:a().func,formattedFields:a().array.isRequired},getInitialState(){return{grouping_fields:this.props.grouping_fields}},_onGroupingFieldsChange(e){const r=e===""?[]:e.split(",");this.setState({grouping_fields:r}),this.props.onUpdate("grouping_fields",r)},render(){const{formattedFields:e}=this.props;return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.groupBy",defaultMessage:"Group by Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.groupByLabel",defaultMessage:"Messages must be grouped by"})),t.createElement(c.Input,{ref:"grouping_fields",id:"grouping_fields",name:"grouping_fields"},t.createElement("div",{style:{minWidth:"300px"}},t.createElement(zo,{autoFocus:!1,options:e,value:this.state.grouping_fields?Array.isArray(this.state.grouping_fields)?this.state.grouping_fields.join(","):this.state.grouping_fields:void 0,onChange:this._onGroupingFieldsChange,allowCreate:!0})))))}}),ai=ta(lv),iv=Be()({displayName:"DistinctInput",propTypes:{onUpdate:a().func,formattedFields:a().array.isRequired},getInitialState(){return{distinct_by:this.props.distinct_by}},_onDistinctionFieldsChange(e){this.setState({distinct_by:e}),this.props.onUpdate("distinct_by",e)},render(){const{formattedFields:e}=this.props;return t.createElement(c.Row,null,t.createElement(c.Col,{md:2,style:{marginTop:5,marginBottom:0}},t.createElement("label",{className:"pull-right"},t.createElement(f.Z,{id:"wizard.distinctBy",defaultMessage:"Distinct by Condition"}))),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.distinctByLabel",defaultMessage:"Messages must be distincted by"})),t.createElement(c.Input,{ref:"distinct_by",id:"distinct_by",name:"distinct_by"},t.createElement("div",{style:{minWidth:"300px"}},t.createElement(We.Z,{options:e,value:this.state.distinct_by,onChange:this._onDistinctionFieldsChange,allowCreate:!0}),t.createElement(c.Input,null)))))}}),cv=ta(iv),dv=Be()({displayName:"GroupDistinctCondition",propTypes:{onUpdate:a().func},getInitialState(){return{alert:Se.clone(this.props.alert)}},_handleChangeCondition(e,r){let s=Se.clone(this.state.alert);e==="threshold"||e==="additional_threshold"||e==="time"?s.condition_parameters[e]=parseInt(r):s.condition_parameters[e]=r,this.setState({alert:s}),this.props.onUpdate("condition_parameters",s.condition_parameters)},_handleChangeStream(e,r){let s=Se.clone(this.state.alert);s.stream[e]=r,this.setState({alert:s}),this.props.onUpdate("stream",s.stream)},render(){let e,r;return this.props.alert.condition_parameters.time>=1440?(e=this.props.alert.condition_parameters.time/1440,r=1440):this.props.alert.condition_parameters.time>=60?(e=this.props.alert.condition_parameters.time/60,r=60):(e=this.props.alert.condition_parameters.time,r=1),t.createElement(t.Fragment,null,t.createElement(fr,{stream:this.props.alert.stream,onSaveStream:this._handleChangeStream,message:this.props.message,matchData:this.props.matchData}),t.createElement("br",null),t.createElement(cs,{onUpdate:this._handleChangeCondition,threshold:this.props.alert.condition_parameters.threshold,threshold_type:this.props.alert.condition_parameters.threshold_type}),t.createElement("br",null),t.createElement(ls,{onUpdate:this._handleChangeCondition,time:e.toString(),time_type:r.toString()}),t.createElement("br",null),t.createElement(ai,{onUpdate:this._handleChangeCondition,grouping_fields:this.props.alert.condition_parameters.grouping_fields}),t.createElement("br",null),t.createElement(cv,{onUpdate:this._handleChangeCondition,distinct_by:this.props.alert.condition_parameters.distinct_by}),t.createElement("br",null),t.createElement(is,{onUpdate:this.props.onUpdate,description:this.props.alert.description}),t.createElement("br",null))}}),uv=()=>t.createElement(pe.Z,{name:"arrows-v"}),Bs=m.default.div(({theme:e})=>m.css`
margin-bottom: 10px;
margin-top: 10px;
margin-left: 5px;
display: inline-block;
border-style: solid;
border-color: ${e.colors.gray[80]};
border-radius: 5px;
border-width: 1px;
padding: 10px;
background: ${e.colors.global.background};
`),Fs={matching_type:"",field_rule:[{field:"",type:"",value:""}]},pv=Be()({displayName:"CorrelationCondition",propTypes:{onUpdate:a().func,onUpdateAlert:a().func},getInitialState(){return{alert:Se.clone(this.props.alert)}},componentWillReceiveProps(e){e.alert!==this.props.alert&&this.setState({alert:e.alert})},_handleChangeCondition(e,r){let s=Se.clone(this.state.alert);e==="threshold"||e==="additional_threshold"||e==="time"?s.condition_parameters[e]=parseInt(r):s.condition_parameters[e]=r,this.setState({alert:s}),this.props.onUpdate("condition_parameters",s.condition_parameters)},_handleChangeStream(e,r){let s=Se.clone(this.state.alert);s.stream===null&&(s.stream=Fs),s.stream[e]=r,this.setState({alert:s}),this.props.onUpdate("stream",s.stream)},_handleChangeSecondStream(e,r){let s=Se.clone(this.state.alert);s.second_stream===null&&(s.second_stream=Fs),s.second_stream[e]=r,this.setState({alert:s}),this.props.onUpdate("second_stream",s.second_stream)},_handleChangeAdditionalNbrCond(e,r){e==="threshold"?this._handleChangeCondition("additional_threshold",r):e==="threshold_type"?this._handleChangeCondition("additional_threshold_type",r):this._handleChangeCondition(e,r)},_switchStreamNumberCondition(){let e=Se.clone(this.state.alert);e.stream=this.state.alert.second_stream?this.state.alert.second_stream:Fs,e.second_stream=this.state.alert.stream?this.state.alert.stream:Fs,e.condition_parameters.threshold=this.state.alert.condition_parameters.additional_threshold,e.condition_parameters.threshold_type=this.state.alert.condition_parameters.additional_threshold_type,e.condition_parameters.additional_threshold=this.state.alert.condition_parameters.threshold,e.condition_parameters.additional_threshold_type=this.state.alert.condition_parameters.threshold_type,this.setState({alert:e}),this.props.onUpdateAlert(e)},render(){let e,r;this.state.alert.condition_parameters.time>=1440?(e=this.state.alert.condition_parameters.time/1440,r=1440):this.state.alert.condition_parameters.time>=60?(e=this.state.alert.condition_parameters.time/60,r=60):(e=this.state.alert.condition_parameters.time,r=1);const s=t.createElement(c.Button,{onClick:this._switchStreamNumberCondition,title:"Switch",bsStyle:"info",style:{fontSize:"18px"}},t.createElement(uv,null));let n;return this.props.alert.condition_type==="THEN"?n=t.createElement(c.Row,{style:{marginBottom:"0px"}},t.createElement(c.Col,{md:2}),t.createElement(c.Col,{md:2},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.then",defaultMessage:"THEN"}))),t.createElement(c.Col,{md:8},s)):this.props.alert.condition_type==="AND"&&(n=t.createElement(c.Row,{style:{marginBottom:"0px"}},t.createElement(c.Col,{md:2}),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.and",defaultMessage:"AND"}))))),t.createElement(t.Fragment,null,t.createElement(Bs,null,t.createElement(fr,{stream:this.state.alert.stream,onSaveStream:this._handleChangeStream,message:this.props.message,matchData:this.props.matchData}),t.createElement("br",null),t.createElement(cs,{onUpdate:this._handleChangeCondition,threshold:this.state.alert.condition_parameters.threshold,threshold_type:this.state.alert.condition_parameters.threshold_type})),t.createElement("br",null),n,t.createElement("br",null),t.createElement(Bs,null,t.createElement(fr,{stream:this.state.alert.second_stream,onSaveStream:this._handleChangeSecondStream,message:this.props.message}),t.createElement("br",null),t.createElement(cs,{onUpdate:this._handleChangeAdditionalNbrCond,threshold:this.state.alert.condition_parameters.additional_threshold,threshold_type:this.state.alert.condition_parameters.additional_threshold_type})),t.createElement("br",null),t.createElement(ls,{onUpdate:this._handleChangeCondition,time:e.toString(),time_type:r.toString()}),t.createElement("br",null),t.createElement(ai,{onUpdate:this._handleChangeCondition,grouping_fields:this.state.alert.condition_parameters.grouping_fields}),t.createElement("br",null),t.createElement(is,{onUpdate:this.props.onUpdate,description:this.state.alert.description}),t.createElement("br",null))}}),mv={matching_type:"",field_rule:[{field:"",type:"",value:""}]},gv=Be()({displayName:"OrCondition",propTypes:{onUpdate:a().func},getInitialState(){return{alert:Se.clone(this.props.alert)}},_handleChangeCondition(e,r){let s=Se.clone(this.state.alert);e==="threshold"||e==="additional_threshold"||e==="time"?s.condition_parameters[e]=parseInt(r):s.condition_parameters[e]=r,this.setState({alert:s}),this.props.onUpdate("condition_parameters",s.condition_parameters)},_handleChangeStream(e,r){let s=Se.clone(this.state.alert);s.stream[e]=r,this.setState({alert:s}),this.props.onUpdate("stream",s.stream)},_handleChangeSecondStream(e,r){let s=Se.clone(this.state.alert);s.second_stream===null&&(s.second_stream=mv),s.second_stream[e]=r,this.setState({alert:s}),this.props.onUpdate("second_stream",s.second_stream)},render(){let e,r;return this.props.alert.condition_parameters.time>=1440?(e=this.props.alert.condition_parameters.time/1440,r=1440):this.props.alert.condition_parameters.time>=60?(e=this.props.alert.condition_parameters.time/60,r=60):(e=this.props.alert.condition_parameters.time,r=1),t.createElement(t.Fragment,null,t.createElement(Bs,null,t.createElement(fr,{stream:this.props.alert.stream,onSaveStream:this._handleChangeStream,message:this.props.message,matchData:this.props.matchData})),t.createElement("br",null),t.createElement(c.Row,{style:{marginBottom:"0px"}},t.createElement(c.Col,{md:2}),t.createElement(c.Col,{md:10},t.createElement("label",null,t.createElement(f.Z,{id:"wizard.or",defaultMessage:"OR"})))),t.createElement("br",null),t.createElement(Bs,null,t.createElement(fr,{stream:this.props.alert.second_stream,onSaveStream:this._handleChangeSecondStream,message:this.props.message})),t.createElement("br",null),t.createElement(cs,{onUpdate:this._handleChangeCondition,threshold:this.props.alert.condition_parameters.threshold,threshold_type:this.props.alert.condition_parameters.threshold_type}),t.createElement("br",null),t.createElement(ls,{onUpdate:this._handleChangeCondition,time:e.toString(),time_type:r.toString()}),t.createElement("br",null),t.createElement(is,{onUpdate:this.props.onUpdate,description:this.props.alert.description}),t.createElement("br",null))}}),hv=Be()({displayName:"CountCondition",propTypes:{alert:a().object.isRequired,onUpdate:a().func},getInitialState(){return{alert:Se.clone(this.props.alert)}},_handleChangeCondition(e,r){let s=Se.clone(this.state.alert);e==="threshold"||e==="additional_threshold"||e==="time"?s.condition_parameters[e]=parseInt(r):s.condition_parameters[e]=r,this.setState({alert:s}),this.props.onUpdate("condition_parameters",s.condition_parameters)},_handleChangeStream(e,r){let s=Se.clone(this.state.alert);s.stream[e]=r,this.setState({alert:s}),this.props.onUpdate("stream",s.stream)},render(){let e,r;return this.props.alert.condition_parameters.time>=1440?(e=this.props.alert.condition_parameters.time/1440,r=1440):this.props.alert.condition_parameters.time>=60?(e=this.props.alert.condition_parameters.time/60,r=60):(e=this.props.alert.condition_parameters.time,r=1),t.createElement(t.Fragment,null,t.createElement(fr,{stream:this.props.alert.stream,onSaveStream:this._handleChangeStream,message:this.props.message,matchData:this.props.matchData}),t.createElement("br",null),t.createElement(cs,{onUpdate:this._handleChangeCondition,threshold:this.props.alert.condition_parameters.threshold,threshold_type:this.props.alert.condition_parameters.threshold_type}),t.createElement("br",null),t.createElement(ls,{onUpdate:this._handleChangeCondition,time:e.toString(),time_type:r.toString()}),t.createElement("br",null),t.createElement(is,{onUpdate:this.props.onUpdate,description:this.props.alert.description}),t.createElement("br",null))}});function fv(e){return!(e.field===""||e.type===""||e.value===""&&e.type!==5&&e.type!==-5)}function Zs(e){if(e.length<=0)return!1;for(let r=0;r=1440?{time:e/1440,time_type:1440}:e>=60?{time:e/60,time_type:60}:{time:e,time_type:1}},_updateAlertField(e,r){const s=Se.clone(this.state.alert);s[e]=r,this.setState({alert:s,isModified:!0}),r===""?this.setState({isValid:!1}):this._checkAlert(s)},_updateAlert(e){this.setState({alert:e}),this.setState({isModified:!0})},_checkAlert(e){let r=vv.isAlertValid(e);this.state.isValid!==r&&this.setState({isValid:r})},_onMessageLoaded(e){this.setState({message:e}),e!==void 0&&this.state.alert.stream.id?Lt.testMatch(this.state.alert.stream.id,{message:e.fields},r=>{this.setState({matchData:r}),this._handleSelect(this.state.alert.condition_type)}):this.setState({matchData:void 0})},_selectContentComponent(){switch(this.state.alert.condition_type){case"COUNT":return t.createElement(hv,{onUpdate:this._updateAlertField,alert:this.state.alert,message:this.state.message,matchData:this.state.matchData});case"GROUP_DISTINCT":return t.createElement(dv,{onUpdate:this._updateAlertField,alert:this.state.alert,message:this.state.message,matchData:this.state.matchData});case"STATISTICAL":return t.createElement(av,{onUpdate:this._updateAlertField,alert:this.state.alert,message:this.state.message,matchData:this.state.matchData});case"THEN":case"AND":return t.createElement(pv,{onUpdate:this._updateAlertField,onUpdateAlert:this._updateAlert,alert:this.state.alert,message:this.state.message,matchData:this.state.matchData});case"OR":return t.createElement(gv,{onUpdate:this._updateAlertField,alert:this.state.alert,message:this.state.message,matchData:this.state.matchData});default:return t.createElement("div",null)}},_handleSelect(e){this.state.alert.condition_type!==e&&this._updateAlertField("condition_type",e)},render(){const{intl:e}=this.props,r={titlePopup:e.formatMessage({id:"wizard.titlePopup",defaultMessage:"Alert rule is saved"}),messagePopup:e.formatMessage({id:"wizard.messagePopup",defaultMessage:"Go to Advanced settings?"}),advancedSettings:e.formatMessage({id:"wizard.advancedSettings",defaultMessage:"Advanced settings"}),done:e.formatMessage({id:"wizard.done",defaultMessage:"I'm done!"}),placeholderTitle:e.formatMessage({id:"wizard.placeholderTitle",defaultMessage:"Title of the alert rule "}),add:e.formatMessage({id:"wizard.add",defaultMessage:"Add"}),ruleType:e.formatMessage({id:"wizard.ruleType",defaultMessage:"Rule Type"}),tooltipCountCondition:e.formatMessage({id:"wizard.tooltipCountCondition",defaultMessage:"Count Condition"}),tooltipGroupDistinctCondition:e.formatMessage({id:"wizard.tooltipGroupDistinctCondition",defaultMessage:"Group / Distinct Condition"}),tooltipStatisticalCondition:e.formatMessage({id:"wizard.tooltipStatisticalCondition",defaultMessage:"Statistical Condition"}),tooltipThenCondition:e.formatMessage({id:"wizard.tooltipThenCondition",defaultMessage:"THEN Condition"}),tooltipAndCondition:e.formatMessage({id:"wizard.tooltipAndCondition",defaultMessage:"AND Condition"}),tooltipOrCondition:e.formatMessage({id:"wizard.tooltipOrCondition",defaultMessage:"OR Condition"})},s=t.createElement(Xe.LinkContainer,{to:hr.getWizardRoute()},t.createElement(c.Button,null,t.createElement(f.Z,{id:"wizard.cancel",defaultMessage:"Cancel"}))),n=t.createElement(c.Button,{onClick:()=>this.props.onSave(this.state.alert),disabled:!(this.state.isModified&&this.state.isValid),bsStyle:"primary",className:"btn btn-primary"},t.createElement(f.Z,{id:"wizard.save",defaultMessage:"Save"})),o=t.createElement("div",{className:"pull-left"},s," ",n," "),l=t.createElement(c.Nav,{stacked:!0,bsStyle:"pills",activeKey:this.state.alert.condition_type,onSelect:g=>this._handleSelect(g)},t.createElement(c.NavItem,{key:"divider",disabled:!0,title:"Rule Type",className:Pa.divider},r.ruleType),t.createElement(c.NavItem,{eventKey:"COUNT",title:r.tooltipCountCondition},t.createElement(f.Z,{id:"wizard.countCondition",defaultMessage:"Count"})),t.createElement(c.NavItem,{eventKey:"GROUP_DISTINCT",title:r.tooltipGroupDistinctCondition},t.createElement(f.Z,{id:"wizard.groupDistinctCondition",defaultMessage:"Group / Distinct"})),t.createElement(c.NavItem,{eventKey:"STATISTICAL",title:r.tooltipStatisticalCondition},t.createElement(f.Z,{id:"wizard.StatisticsCondition",defaultMessage:"Statistics"})),t.createElement(c.NavItem,{eventKey:"THEN",title:r.tooltipThenCondition},t.createElement(f.Z,{id:"wizard.thenCondition",defaultMessage:"THEN"})),t.createElement(c.NavItem,{eventKey:"AND",title:r.tooltipAndCondition},t.createElement(f.Z,{id:"wizard.andCondition",defaultMessage:"AND"})),t.createElement(c.NavItem,{eventKey:"OR",title:r.tooltipOrCondition},t.createElement(f.Z,{id:"wizard.orCondition",defaultMessage:"OR"}))),d=this._selectContentComponent();return t.createElement("div",null,t.createElement(c.Row,null,t.createElement(c.Col,{md:2,className:Pa.subnavigation},l),t.createElement(c.Col,{md:10,className:Pa.contentpane},t.createElement("h2",null,t.createElement(f.Z,{id:"wizard.loadMessage",defaultMessage:"Load a message to test fields conditions"})),t.createElement("div",{className:"stream-loader"},t.createElement(Of,{messageId:this.props.messageId,index:this.props.index,onMessageLoaded:this._onMessageLoaded})),t.createElement("hr",null),t.createElement("h2",null,t.createElement(f.Z,{id:"wizard.titleParameters",defaultMessage:"Alert rule parameters"})),this.props.navigationToRuleComponents,t.createElement("p",{className:"description"},t.createElement(f.Z,{id:"wizard.descripionParameters",defaultMessage:"Define the parameters of the alert rule."})),t.createElement("form",{className:"form-inline"},t.createElement(zf,{onUpdate:this._updateAlertField,title:this.state.alert.title,severity:this.state.alert.severity}),t.createElement("br",null),d),o)))}}),oi=(0,Lr.ZP)(Ev),yv=Is.buildSourceURL("alerts");function bv(e){const r=U.ZP.qualifyUrl(yv),s={title:e.title,severity:e.severity,description:e.description,condition_type:e.condition_type,condition_parameters:e.condition_parameters,stream:e.stream,second_stream:e.second_stream};return(0,O.ZP)("POST",r,s).then(()=>(M.success("Stream successfully created, Alert condition successfully created, Alert notification successfully created"),!0)).catch(n=>{M.error(`Creating alert rule failed with status: ${n.message}`,"Could not create alert rule")})}const _v={create:bv},li=navigator.language.split(/[-_]/)[0],Cv={fr:Nt},Sv=()=>{const[e,r]=(0,t.useState)(null),s=Os();(0,t.useEffect)(()=>{ra.get().then(l=>{r(l)})},[]);const n=l=>{_v.create(l).then(d=>{d===!0&&s.push(hr.getWizardRoute())})};let o;if(e){const l=e.default_values,d=l.time,g=l.time_type,h={title:l.title,description:"",severity:l.severity,condition_type:"COUNT",condition_parameters:{threshold_type:l.threshold_type,additional_threshold_type:l.threshold_type,threshold:l.threshold,additional_threshold:0,time:d*g,repeat_notifications:l.repeat_notifications,grace:l.grace,backlog:l.backlog,grouping_fields:[],distinct_by:"",field:"",type:""},stream:{matching_type:l.matching_type,field_rule:[{field:"",type:"",value:"",identifier:os()}]},second_stream:{matching_type:l.matching_type,field_rule:[{field:"",type:"",value:"",identifier:os()}]}};o=t.createElement(oi,{alert:h,onSave:n})}else o=t.createElement(st.Z,null);return t.createElement(Ot.Z,{locale:li,messages:Cv[li]},t.createElement(Pt,{title:"New alert rule"},t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.newAlertRule",defaultMessage:"Wizard: New alert rule"}),actions:t.createElement(Xe.LinkContainer,{to:hr.getWizardRoute()},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.back",defaultMessage:"Back to alert rules"})))},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.define",defaultMessage:"You can define an alert rule."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentation",defaultMessage:"Read more about Wizard alert rules in the documentation."}))),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},o))))},ii=e=>r=>{const s=(0,Z.useParams)();return t.createElement(e,{...r,params:s})},ci=navigator.language.split(/[-_]/)[0],Tv={fr:Nt},wv=ii(({params:e})=>{const[r,s]=(0,t.useState)(null),n=Os();(0,t.useEffect)(()=>{ot.get(e.alertRuleTitle).then(d=>{d.stream.field_rule.forEach(g=>g.identifier=os()),d.second_stream&&d.second_stream.field_rule.forEach(g=>g.identifier=os()),s(d)})},[]);const o=d=>{ot.update(d.title,d).then(g=>{g===!0&&n.push(hr.getWizardRoute())})};if(!r)return t.createElement(st.Z,null);let l=t.createElement("div",{className:"pull-right"},t.createElement(Il,{target:r.condition})," ",t.createElement(Dl,{target:r.notification}));return t.createElement(Ot.Z,{locale:ci,messages:Tv[ci]},t.createElement(Pt,{title:"Edit alert rule"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.updateAlertRule",defaultMessage:'Wizard: Editing alert rule "{title}"',values:{title:r.title}})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.define",defaultMessage:"You can define an alert rule."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentation",defaultMessage:"Read more about Wizard alert rules in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:hr.getWizardRoute()},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.back",defaultMessage:"Back to alert rules"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(oi,{alert:r,navigationToRuleComponents:l,onSave:o}))))))}),di={save(e,r,s,n){const o=document.createElement("a"),l=n?`;charset=${n}`:"",d=n?`${s}${l}`:s;if(o.download!==void 0){o.download=r,o.href=`data:${d},${encodeURIComponent(e)}`,document.body.appendChild(o),o.click(),document.body.removeChild(o);return}if(window.navigator&&typeof window.navigator.msSaveOrOpenBlob=="function"){const g=new Blob([e],{type:d});window.navigator.msSaveOrOpenBlob(g,r);return}try{location.href=`data:application/attachment${l},${encodeURIComponent(e)}`}catch{location.href=`data:text/plain${l},${encodeURIComponent(e)}`}}},ui=()=>t.createElement(pe.Z,{name:"cloud-download"}),pi=({alertRules:e,emptyMessage:r,onRuleSelectionChanged:s})=>{const[n,o]=(0,t.useState)(""),[l,d]=(0,t.useState)(new Set);(0,t.useEffect)(()=>{d(new Set)},[e]);const g=T=>{o(T)},h=()=>{o("")},v=(T,P)=>{let z=l;T.target.checked?z.add(P):z.delete(P),d(z),s(z)},y=T=>t.createElement(Xs.Item,{key:`alertRule_${T.title}`},t.createElement(c.Input,{id:`alertRule_${T.title}`,type:"checkbox",checked:l.has(T.title),onChange:P=>v(P,T.title),label:T.title}),t.createElement("p",{className:"description",style:{"margin-left":"20px"}},T.description)),C=T=>{let P=new Set;T.target.checked&&e.forEach(z=>P.add(z.title)),d(P),s(P)};let R;if(e&&e.length!==0){const T=e.sort((X,se)=>X.title.localeCompare(se.title)).filter(X=>X.title.includes(n)).map(y),P=l.size,z=t.createElement(f.Z,{id:"wizard.selected",defaultMessage:"{ruleCount, plural, =0 {Select all} =1 {One rule selected} other {# rules selected}}",values:{ruleCount:P}});R=t.createElement(Xs,null,t.createElement(Xs.Header,null,t.createElement(c.Input,{id:"select-all-checkbox",type:"checkbox",label:z,checked:P===e.length,onChange:C,wrapperClassName:"form-group-inline"})),T)}else R=t.createElement("span",{className:"help-block help-standalone"},r);return t.createElement(t.Fragment,null,t.createElement(el,{onSearch:g,onReset:h,searchButtonLabel:"Filter",placeholder:"Filter alert rules by title...",queryWidth:400,resetButtonLabel:"Reset",searchBsStyle:"info",topMargin:0}),R)};function mi(e){return e==="HIGHER"||e==="MORE"?">":e==="LOWER"||e==="LESS"?"<":e}function Av(e,r){let s={...e};e.type==="MEAN"&&(s.type="AVG"),s.threshold_type=mi(e.threshold_type);const n=e.additional_threshold_type;n&&(s.additional_threshold_type=mi(n));const o=e.distinction_fields;return o!==void 0&&(o.length===0?s.distinct_by="":(s.distinct_by=e.distinction_fields[0],M.warning("The rule "+r+' has multiple distinction_fields, only the first one will be kept ("'+s.distinct_by+'")'))),s}function Rv(e){let r=Av(e.condition_parameters,e.title),s=e.notification_parameters.severity;return{...e,severity:s,condition_parameters:r}}const gi={normalizeImportedRules(e){return e.version===void 0?e.map(Rv):e.rules},createExportDataFromRules(e){return{version:"1.0.0",rules:e}}},gt=(0,ve.ei)("core.EventNotifications",()=>Ce().createActions({listAll:{asyncResult:!0},listAllLegacyTypes:{asyncResult:!0},listPaginated:{asyncResult:!0},searchPaginated:{asyncResult:!0},get:{asyncResult:!0},create:{asyncResult:!0},update:{asyncResult:!0},delete:{asyncResult:!0},test:{asyncResult:!0},testPersisted:{asyncResult:!0}})),I_=(0,ve.dS)("core.EventNotifications",()=>Ce().createStore({listenables:[gt],sourceUrl:"/events/notifications",all:void 0,allLegacyTypes:void 0,notifications:void 0,query:void 0,pagination:{count:void 0,page:void 0,pageSize:void 0,total:void 0,grandTotal:void 0},getInitialState(){return this.getState()},propagateChanges(){this.trigger(this.getState())},getState(){return{all:this.all,allLegacyTypes:this.allLegacyTypes,notifications:this.notifications,query:this.query,pagination:this.pagination}},eventNotificationsUrl({segments:e=[],query:r={}}){const s=new(Dt())(this.sourceUrl),n=ul()(s.segment(),e);return s.segmentCoded(n),s.query(r),U.DC(s.resource())},refresh(){this.all&&this.listAll(),this.pagination.page&&this.listPaginated({query:this.query,page:this.pagination.page,pageSize:this.pagination.pageSize})},listAll(){const e=(0,O.ZP)("GET",this.eventNotificationsUrl({query:{per_page:0}}));e.then(r=>(this.all=r.notifications,this.propagateChanges(),r)),gt.listAll.promise(e)},listPaginated({query:e="",page:r=1,pageSize:s=10}){const n=(0,O.ZP)("GET",this.eventNotificationsUrl({query:{query:e,page:r,per_page:s}}));n.then(o=>(this.notifications=o.notifications,this.query=o.query,this.pagination={count:o.count,page:o.page,pageSize:o.per_page,total:o.total,grandTotal:o.grand_total},this.propagateChanges(),o)),gt.listPaginated.promise(n)},searchPaginated(e,r,s,n){const o=Rl(`${this.sourceUrl}/paginated`,e,r,s,n),l=(0,O.ZP)("GET",U.DC(o)).then(d=>{const{elements:g,query:h,attributes:v,pagination:{count:y,total:C,page:R,per_page:T}}=d;return{elements:g,attributes:v,pagination:{count:y,total:C,page:R,perPage:T,query:h}}});return gt.searchPaginated.promise(l),l},get(e){const r=(0,O.ZP)("GET",this.eventNotificationsUrl({segments:[e]}));r.catch(s=>{s.status===404&&M.error(`Unable to find Event Notification with id <${e}>, please ensure it wasn't deleted.`,"Could not retrieve Event Notification")}),gt.get.promise(r)},create(e){const r=(0,O.ZP)("POST",this.eventNotificationsUrl({}),e);r.then(s=>(M.success("Notification created successfully",`Notification "${e.title}" was created successfully.`),this.refresh(),s),s=>{(s.status!==400||!s.additional.body||!s.additional.body.failed)&&M.error(`Creating Notification "${e.title}" failed with status: ${s}`,"Could not save Notification")}),gt.create.promise(r)},update(e,r){const s=(0,O.ZP)("PUT",this.eventNotificationsUrl({segments:[e]}),r);s.then(n=>(M.success("Notification updated successfully",`Notification "${r.title}" was updated successfully.`),this.refresh(),n),n=>{(n.status!==400||!n.additional.body||!n.additional.body.failed)&&M.error(`Updating Notification "${r.title}" failed with status: ${n}`,"Could not update Notification")}),gt.update.promise(s)},delete(e){const r=(0,O.ZP)("DELETE",this.eventNotificationsUrl({segments:[e.id]}));r.then(()=>{M.success("Notification deleted successfully",`Notification "${e.title}" was deleted successfully.`),this.refresh()},s=>{M.error(`Deleting Notification "${e.title}" failed with status: ${s}`,"Could not delete Notification")}),gt.delete.promise(r)},test(e){const r=(0,O.ZP)("POST",this.eventNotificationsUrl({segments:["test"]}),e);gt.test.promise(r)},testPersisted(e){const r=(0,O.ZP)("POST",this.eventNotificationsUrl({segments:[e.id,"test"]}));gt.testPersisted.promise(r)},listAllLegacyTypes(){const e=(0,O.ZP)("GET",this.eventNotificationsUrl({segments:["legacy","types"]}));e.then(r=>(this.allLegacyTypes=r.types,this.propagateChanges(),r)),gt.listAllLegacyTypes.promise(e)}})),hi=navigator.language.split(/[-_]/)[0],xv={fr:Nt},Pv=Be()({displayName:"ExportAlertPage",getInitialState(){return{selectedAlertTitles:[]}},componentDidMount(){ot.list().then(e=>{this.setState({alertRules:e})})},handleRuleSelectionChanged(e){this.setState({selectedAlertTitles:Array.from(e)})},async onSubmit(e){e.preventDefault();const r=[];for(const o of this.state.selectedAlertTitles){const l=await ot.get(o),d=await gt.get(l.notification);l.notification_parameters=d.config,r.push(l)}M.success("Successfully export alert rules. Starting download...","Success!");let s=gi.createExportDataFromRules(r),n=He(new Date).replace(/:/g,"").replace(/ /g,"_");di.save(JSON.stringify(s),n+"_alert_rules.json","application/json","utf-8")},render(){const e=t.createElement(f.Z,{id:"wizard.noAlertRulesToExport",defaultMessage:"There are no alert rules to export."});return t.createElement(Ot.Z,{locale:hi,messages:xv[hi]},t.createElement(Pt,{title:"Export alert rule"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.exportWizardAlertRule",defaultMessage:"Wizard: Export alert rules"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.exportAlertRule",defaultMessage:"You can export an alert rule."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentation",defaultMessage:"Read more about Wizard alert rules in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:hr.getWizardRoute()},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.back",defaultMessage:"Back to alert rules"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(pi,{emptyMessage:e,alertRules:this.state.alertRules,onRuleSelectionChanged:this.handleRuleSelectionChanged}),t.createElement(c.Button,{bsStyle:"success",onClick:this.onSubmit},t.createElement(ui,null),t.createElement(f.Z,{id:"wizard.downloadContentPack",defaultMessage:"Download my content pack"})))))))}}),fi=navigator.language.split(/[-_]/)[0],Iv={fr:Nt},Dv=Be()({displayName:"ImportAlertPage",getInitialState(){return{selectedAlertTitles:new Set}},onSelectUploadFile(e){this.setState({selectedFile:e.target.files[0]})},onSubmitUploadFile(e){if(e.preventDefault(),!this.state.selectedFile)return;const r=new FileReader;r.onload=s=>{const n=JSON.parse(s.target.result),o=gi.normalizeImportedRules(n);this.setState({alertRules:o})},r.readAsText(this.state.selectedFile)},handleRuleSelectionChanged(e){this.setState({selectedAlertTitles:e})},async onSubmitApplyAlertRules(e){e.preventDefault();const{alertRules:r,selectedAlertTitles:s}=this.state,n=r.filter(o=>s.has(o.title));for(const o of n){await ot.create(o);const l=await ot.get(o.title),d={config:{...o.notification_parameters,type:"logging-alert-notification"},description:"",id:l.notification,title:o.title};gt.update(l.notification,d)}},render(){const e=t.createElement(f.Z,{id:"wizard.noAlertRulesToImport",defaultMessage:"There are no alert rules to import."});return t.createElement(Ot.Z,{locale:fi,messages:Iv[fi]},t.createElement(Pt,{title:"Import alert rule"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.importWizardAlertRule",defaultMessage:"Wizard: Import alert rules"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.importAlertRule",defaultMessage:"You can import an alert rule."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentation",defaultMessage:"Read more about Wizard alert rules in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:hr.getWizardRoute()},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.back",defaultMessage:"Back to alert rules"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement("form",{onSubmit:this.onSubmitUploadFile,className:"upload",encType:"multipart/form-data"},t.createElement("div",{className:"form-group"},t.createElement(c.Input,{type:"file",name:"bundle",onChange:this.onSelectUploadFile})),t.createElement("button",{type:"submit",className:"btn btn-success"},t.createElement(f.Z,{id:"wizard.upload",defaultMessage:"Upload"}))))),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(pi,{emptyMessage:e,alertRules:this.state.alertRules,onRuleSelectionChanged:this.handleRuleSelectionChanged}),t.createElement(c.Button,{bsStyle:"success",onClick:this.onSubmitApplyAlertRules},t.createElement(f.Z,{id:"wizard.applyAlertRules",defaultMessage:"Apply alert rules"})))))))}}),Mv=Ce().createStore({listenables:[tt],sourceUrl:Is.buildSourceURL("lists"),lists:void 0,init(){this.trigger({lists:this.lists})},list(){const e=(0,O.ZP)("GET",U.ZP.qualifyUrl(this.sourceUrl)).then(r=>(this.lists=r.lists,this.trigger({lists:this.lists}),this.lists),r=>{M.error(`Fetching alert lists failed with status: ${r}`,"Could not retrieve alerts lists")});tt.list.promise(e)},get(e){const r=(0,O.ZP)("GET",U.ZP.qualifyUrl(this.sourceUrl+"/"+encodeURIComponent(e))).then(s=>(this.lists=s.lists,this.lists),s=>{M.error(`Fetching alert list failed with status: ${s}`,"Could not retrieve alert list")});tt.get.promise(r)},create(e){const r=U.ZP.qualifyUrl(this.sourceUrl),s="POST",n={title:e.title,description:e.description,lists:e.lists},o=(0,O.ZP)(s,r,n).then(()=>(M.success("Alert list successfully created"),this.list(),!0),l=>{M.error(`Creating alert list failed with status: ${l.message}`,"Could not create alert list")});tt.create.promise(o)},update(e,r){const s=U.ZP.qualifyUrl(this.sourceUrl+"/"+encodeURIComponent(e)),n="PUT",o={title:r.title,description:r.description,usage:r.usage,lists:r.lists},l=(0,O.ZP)(n,s,o).then(()=>(M.success("Alert list successfully updated"),this.list(),!0),d=>{M.error(`Updating alert list failed with status: ${d.message}`,"Could not update alert list")});tt.update.promise(l)},deleteByName(e){const r=U.ZP.qualifyUrl(this.sourceUrl+"/"+encodeURIComponent(e)),s="DELETE",n=(0,O.ZP)(s,r).then(()=>(M.success("Alert list successfully deleted"),this.list(),null),o=>{M.error(`Deleting alert list failed with status: ${o.message}`,"Could not delete alert list")});tt.deleteByName.promise(n)},exportAlertLists(e){const r=U.ZP.qualifyUrl(this.sourceUrl+"/export"),s="POST",n=(0,O.ZP)(s,r,e).then(o=>(this.exportAlertLists=JSON.stringify(o),this.trigger({exportAlertLists:this.exportAlertLists}),this.exportAlertLists),o=>{M.error(`Export alert lists failed with status: ${o}`,"Could not export alert lists")});tt.exportAlertLists.promise(n)},importAlertLists(e){const r=U.ZP.qualifyUrl(this.sourceUrl+"/import"),s="PUT",n=(0,O.ZP)(s,r,e).then(()=>(M.success("Alert lists successfully imported"),!0),o=>{M.error(`Importing alert lists failed with status: ${o.message}`,"Could not import alert lists")});tt.importAlertLists.promise(n)}}),Lv=({listTitle:e,onSubmit:r})=>{const s=(0,pr.Z)(),n={infoClone:s.formatMessage({id:"wizard.buttonInfoCloneList",defaultMessage:"Clone this alert list"}),placeholderTitle:s.formatMessage({id:"wizard.placeholderCloneTitleList",defaultMessage:"A descriptive name of the new alert list"}),modalTitle:t.createElement(f.Z,{id:"wizard.cloneList",defaultMessage:'Cloning List "{title}"',values:{title:e}})};return t.createElement(Ml,{title:e,onSubmit:r,messages:n})},Ov=Be()({displayName:"AlertListDisplay",mixins:[Ce().connect(Qr),Ce().connect(Mv),dt],propTypes:{config:a().object.isRequired},componentWillMount(){const{intl:e}=this.props,r={title:e.formatMessage({id:"wizard.title",defaultMessage:"Title"}),description:e.formatMessage({id:"wizard.fieldDescription",defaultMessage:"Description"}),created:e.formatMessage({id:"wizard.created",defaultMessage:"Created"}),lastModified:e.formatMessage({id:"wizard.lastModified",defaultMessage:"Last Modified"}),user:e.formatMessage({id:"wizard.user",defaultMessage:"User"}),usage:e.formatMessage({id:"wizard.usage",defaultMessage:"Usage"}),lists:e.formatMessage({id:"wizard.lists",defaultMessage:"Lists"}),actions:e.formatMessage({id:"wizard.actions",defaultMessage:"Actions"})},s={infoDelete:e.formatMessage({id:"wizard.buttonInfoDeleteList",defaultMessage:"Delete this alert list"}),infoNoDelete:e.formatMessage({id:"wizard.buttonInfoNoDeleteList",defaultMessage:"List used in alert rules"}),infoUpdate:e.formatMessage({id:"wizard.buttonInfoUpdateList",defaultMessage:"Edit this alert list"}),createAlertList:e.formatMessage({id:"wizard.createAlertList",defaultMessage:"Create alert list"}),importAlertList:e.formatMessage({id:"wizard.importAlertList",defaultMessage:"Import alert list"}),exportAlertList:e.formatMessage({id:"wizard.exportAlertList",defaultMessage:"Export alert list"}),confirmDeletion:e.formatMessage({id:"wizard.confirmDeletionList",defaultMessage:"Do you really want to delete the alert list"})};this.setState({fieldsTitle:r}),this.setState({messages:s}),this.list()},list(){tt.list().then(e=>{this.setState({lists:e})})},deleteAlertList(e){tt.deleteByName(e)},_deleteAlertListFunction(e){return()=>{window.confirm(`${this.state.messages.confirmDeletion} "${e}" ?`)&&this.deleteAlertList(e)}},_headerCellFormatter(e){let r;switch(e.toLocaleLowerCase()){case"actions":r=t.createElement("th",{className:"actions"},e);break;default:r=t.createElement("th",null,e)}return r},_onCloneSubmit(e,r,s){tt.get(e).then(n=>{const o={title:r,description:s,lists:n.lists};tt.create(o).finally(()=>this.list())})},_availableFieldName(){return[{value:"Description",label:this.state.fieldsTitle.description},{value:"Created",label:this.state.fieldsTitle.created},{value:"Last Modified",label:this.state.fieldsTitle.lastModified},{value:"User",label:this.state.fieldsTitle.user},{value:"Usage",label:this.state.fieldsTitle.usage},{value:"Lists",label:this.state.fieldsTitle.lists}]},_getFieldName(e){return this._availableFieldName().filter(r=>r.value===e)[0].label},_listInfoFormatter(e){const r=t.createElement(ir,{permissions:"wizard_alerts_rules:delete"},t.createElement("button",{id:"delete-list",type:"button",className:"btn btn-primary",disabled:e.usage>0,title:e.usage?this.state.messages.infoNoDelete:this.state.messages.infoDelete,onClick:this._deleteAlertListFunction(e.title)},t.createElement(f.Z,{id:"wizard.delete",defaultMessage:"Delete"}))),s=t.createElement(ir,{permissions:"wizard_alerts_rules:read"},t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_UPDATELIST_ALERTLISTTITLE")(e.title.replace(/\//g,"%2F"))},t.createElement(c.Button,{bsStyle:"info",type:"submit",title:this.state.messages.infoUpdate},t.createElement(f.Z,{id:"wizard.edit",defaultMessage:"Edit"})))),n=t.createElement(Lv,{listTitle:e.title,onSubmit:this._onCloneSubmit}),o=t.createElement("div",{className:"pull-left"},s," ",n," ",r," "),l=t.createElement(c.Tooltip,{id:"default-user-tooltip"},t.createElement(f.Z,{id:"wizard.tooltipUserList",defaultMessage:"The last user who modified the list"}));let d=[t.createElement("td",{className:"limited"},e.title)];return this.props.config.field_order.map(g=>{if(g.enabled)switch(g.name){case"Description":d.push(t.createElement("td",{className:"limited"},t.createElement("span",{style:{whiteSpace:"pre-line"}},e.description)));break;case"Created":d.push(t.createElement("td",{className:"limited"},t.createElement(Ir,{dateTime:De(e.created_at),relative:!0})));break;case"Last Modified":d.push(t.createElement("td",{className:"limited"},t.createElement(Ir,{dateTime:De(e.last_modified),relative:!0})));break;case"User":d.push(t.createElement("td",{className:"limited"},t.createElement(Gr,{overlay:l,placement:"top",useOverlay:!0,trigger:["hover","focus"]},e.creator_user_id)));break;case"Usage":d.push(t.createElement("td",{className:"limited"},t.createElement("span",{style:{whiteSpace:"pre-line"}},e.usage)));break;case"Lists":d.push(t.createElement("td",{className:"limited"},t.createElement("span",{style:{whiteSpace:"pre-line"}},e.lists)));break}}),t.createElement("tr",{key:e.title},d,t.createElement("td",{style:{whiteSpace:"nowrap"}},o))},render(){const e=["title","created_at","last_modified","creator_user_id","lists"];let r=[this.state.fieldsTitle.title];return this.props.config.field_order.map(s=>{s.enabled&&r.push(this._getFieldName(s.name))}),r.push(this.state.fieldsTitle.actions),this.state.lists?t.createElement("div",null,t.createElement("div",{className:"pull-right has-bm"},t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_NEWLIST")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.createAlertList},t.createElement(f.Z,{id:"wizard.create",defaultMessage:"Create"})))," ",t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_IMPORTLIST")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.importAlertList},t.createElement(f.Z,{id:"wizard.import",defaultMessage:"Import"})))," ",t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_EXPORTLIST")},t.createElement(c.Button,{bsStyle:"success",type:"submit",title:this.state.messages.exportAlertList},t.createElement(f.Z,{id:"wizard.export",defaultMessage:"Export"})))),t.createElement(ln,{id:"alert-list",className:"table-hover",headers:r,headerCellFormatter:this._headerCellFormatter,sortByKey:"title",rows:this.state.lists,filterBy:"title",dataRowFormatter:this._listInfoFormatter,filterLabel:t.createElement(f.Z,{id:"wizard.filterlists",defaultMessage:"Filter lists"}),filterKeys:e})):t.createElement(st.Z,null)}}),Nv=(0,Lr.ZP)(Ov),vi=navigator.language.split(/[-_]/)[0],$v={fr:Nt},zv=Be()({displayName:"WizardListsPage",_getConfig(){return{field_order:[{name:"Description",enabled:!0},{name:"Created",enabled:!0},{name:"Last Modified",enabled:!0},{name:"User",enabled:!0},{name:"Usage",enabled:!0},{name:"Lists",enabled:!0}],default_values:{},import_policy:"DONOTHING"}},render(){const e=this._getConfig();return t.createElement(Ot.Z,{locale:vi,messages:$v[vi]},t.createElement(Pt,{title:"Lists"},t.createElement("div",null,t.createElement("span",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.lists",defaultMessage:"Lists"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentationlist",defaultMessage:"Read more about Wizard lists in the documentation."})))),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(Nv,{config:e}))))))}}),Uv={title:"",description:"",lists:""},Ei=Be()({displayName:"CreateListFormInput",propTypes:{list:a().object,onSave:a().func.isRequired},getDefaultProps(){return{list:Uv}},getInitialState(){return{list:Se.clone(this.props.list),contentComponent:t.createElement(st.Z,null)}},_updateConfigField(e,r){const s=Se.clone(this.state.list);s[e]=r,this.setState({list:s})},_onUpdate(e){return r=>{this._updateConfigField(e,r.target.value)}},render:function(){const e=t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,null,t.createElement(f.Z,{id:"wizard.cancel",defaultMessage:"Cancel"}))),r=t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,{onClick:()=>this.props.onSave(this.state.list),disabled:this.state.list.title===""||this.state.list.lists==="",className:"btn btn-primary"},t.createElement(f.Z,{id:"wizard.save",defaultMessage:"Save"}))),s=t.createElement("div",{className:"pull-left"},e," ",r," "),n={display:"flex",alignItems:"center"};return t.createElement("div",null,t.createElement(c.Row,null,t.createElement(c.Col,{md:4},t.createElement(c.Input,{id:"title",type:"text",required:!0,label:t.createElement(f.Z,{id:"wizard.title",defaultMessage:"Title"}),onChange:this._onUpdate("title"),defaultValue:this.state.list.title,name:"title",disabled:this.state.list.usage}),t.createElement(c.Input,{id:"description",type:"text",label:t.createElement(f.Z,{id:"wizard.fieldOptionalDescription",defaultMessage:"Description (optional)"}),onChange:this._onUpdate("description"),defaultValue:this.state.list.description,name:"description"}))),t.createElement(c.Row,{style:n},t.createElement(c.Col,{md:5},t.createElement(c.Input,{style:{minWidth:600},ref:"lists",id:"lists",name:"lists",type:"textarea",rows:"10",label:t.createElement(f.Z,{id:"wizard.fieldListwithexemple",defaultMessage:"List (example : 172.10.0.1; 192.168.1.4; ...)"}),onChange:this._onUpdate("lists"),defaultValue:this.state.list.lists}),s)))}}),yi=navigator.language.split(/[-_]/)[0],Bv={fr:Nt};function Fv(e){tt.create(e)}const Zv=()=>t.createElement(Ot.Z,{locale:yi,messages:Bv[yi]},t.createElement(Pt,{title:"New list"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.newList",defaultMessage:"Wizard: New list"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.definelist",defaultMessage:"You can define a list."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentationlist",defaultMessage:"Read more about Wizard list in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.backlist",defaultMessage:"Back to lists"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(Ei,{onSave:Fv})))))),bi=navigator.language.split(/[-_]/)[0],kv={fr:Nt},Wv=Be()({displayName:"UpdateListPage",mixins:[Ce().connect(Qr)],propTypes:{params:a().object.isRequired},componentDidMount(){tt.get(this.props.params.alertListTitle).then(e=>{this.setState({list:e})})},_isLoading(){return!this.state.list},_update(e){tt.update(this.state.list.title,e)},render(){return this._isLoading()?t.createElement(st.Z,null):t.createElement(Ot.Z,{locale:bi,messages:kv[bi]},t.createElement(Pt,{title:"Edit list"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.updateList",defaultMessage:'Wizard: Editing list "{title}"',values:{title:this.state.list.title}})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.definelist",defaultMessage:"You can define a list."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentationlist",defaultMessage:"Read more about Wizard lists in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.backlist",defaultMessage:"Back to lists"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement(Ei,{list:this.state.list,onSave:this._update}))))))}}),Kv=ii(Wv),_i=navigator.language.split(/[-_]/)[0],Hv={fr:Nt},Gv=Be()({displayName:"ImportListPage",getInitialState(){return{}},onSubmitUploadFile(e){if(e.preventDefault(),!this.refs.uploadedFile.files||!this.refs.uploadedFile.files[0])return;const r=new FileReader;r.onload=s=>{this.setState({alertLists:JSON.parse(s.target.result)})},r.readAsText(this.refs.uploadedFile.files[0])},isEmpty(e){return e===void 0||(typeof e.count=="function"?e.count()===0:e.length===0)},selectAllAlertLists(){Object.keys(this.refs).forEach(e=>{e.indexOf("alertLists")===0&&(this.refs[e].checked=!0)})},formatAlertList(e){return t.createElement("div",{className:"checkbox",key:`alertList_checkbox-${e.title}`},t.createElement("label",{className:"checkbox"},t.createElement("input",{ref:`alertLists.${e.title}`,type:"checkbox",name:"alertLists",id:`alertList_${e.title}`,value:JSON.stringify(e)}),e.title),t.createElement("span",{className:"help-inline"},t.createElement(f.Z,{id:"wizard.fieldDescription",defaultMessage:"Description"}),": ",t.createElement("tt",null,e.description)),t.createElement("span",{className:"help-inline"},t.createElement(f.Z,{id:"wizard.fieldLists",defaultMessage:"Lists"}),": ",t.createElement("tt",null,e.lists)))},onSubmitApplyAlertLists(e){e.preventDefault();const r=[];Object.keys(this.refs).forEach((s,n)=>{s.indexOf("alertLists")===0&&this.refs[s].checked===!0&&r.push(JSON.parse(this.refs[s].value))}),tt.importAlertLists(r)},render(){return t.createElement(Ot.Z,{locale:_i,messages:Hv[_i]},t.createElement(Pt,{title:"Import list"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.importWizardList",defaultMessage:"Wizard: Import lists"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.importLists",defaultMessage:"You can import a list."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentationlist",defaultMessage:"Read more about Wizard lists in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.backlist",defaultMessage:"Back to lists"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:12},t.createElement("form",{onSubmit:this.onSubmitUploadFile,className:"upload",encType:"multipart/form-data"},t.createElement("div",{className:"form-group"},t.createElement("input",{ref:"uploadedFile",type:"file",name:"bundle"})),t.createElement("button",{type:"submit",className:"btn btn-success"},t.createElement(f.Z,{id:"wizard.upload",defaultMessage:"Upload"}))))),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:6},t.createElement("form",{className:"form-horizontal build-content-pack",onSubmit:this.onSubmitApplyAlertLists},t.createElement("div",{className:"form-group"},t.createElement(c.Col,{sm:2},t.createElement("label",{className:"control-label",htmlFor:"name"},t.createElement(f.Z,{id:"wizard.alertsList",defaultMessage:"Lists"}))),t.createElement(c.Col,{sm:10},this.isEmpty(this.state.alertLists)?t.createElement("span",{className:"help-block help-standalone"},t.createElement(f.Z,{id:"wizard.noAlertListsToExport",defaultMessage:"There is no list to import."})):t.createElement("span",null,t.createElement(c.Button,{className:"btn btn-sm btn-link select-all",onClick:this.selectAllAlertLists},t.createElement(f.Z,{id:"wizard.selectAll",defaultMessage:"Select all"})),this.state.alertLists.map(this.formatAlertList)))),t.createElement("div",{className:"form-group"},t.createElement(c.Col,{smOffset:2,sm:10},t.createElement(c.Button,{bsStyle:"success",type:"submit"},t.createElement(f.Z,{id:"wizard.applyLists",defaultMessage:"Apply lists"}))))))))))}}),Ci=navigator.language.split(/[-_]/)[0],Vv={fr:Nt},jv=Be()({displayName:"ExportListPage",getInitialState(){return{}},componentDidMount(){tt.list().then(e=>{this.setState({alertLists:e})})},isEmpty(e){return e===void 0||(typeof e.count=="function"?e.count()===0:e.length===0)},selectAllAlertLists(){Object.keys(this.refs).forEach(e=>{e.indexOf("alertLists")===0&&(this.refs[e].checked=!0)})},formatAlertList(e){return t.createElement("div",{className:"checkbox",key:`alertList_checkbox-${e.title}`},t.createElement("label",{className:"checkbox"},t.createElement("input",{ref:`alertLists.${e.title}`,type:"checkbox",name:"alertLists",id:`alertList_${e.title}`,value:e.title}),e.title),t.createElement("span",{className:"help-inline"},t.createElement(f.Z,{id:"wizard.fieldDescription",defaultMessage:"Description"}),": ",t.createElement("tt",null,e.description)),t.createElement("span",{className:"help-inline"},t.createElement(f.Z,{id:"wizard.fieldLists",defaultMessage:"Lists"}),": ",t.createElement("tt",null,e.lists)))},onSubmit(e){e.preventDefault();const r={titles:[]};Object.keys(this.refs).forEach(s=>{s.indexOf("alertLists")===0&&this.refs[s].checked===!0&&r.titles.push(this.refs[s].value)}),tt.exportAlertLists(r).then(s=>{M.success("Successfully export alert lists. Starting download...","Success!");let n=He(new Date).replace(/:/g,"").replace(/ /g,"_");di.save(s,n+"_alert_lists.json","application/json","utf-8")})},render(){return t.createElement(Ot.Z,{locale:Ci,messages:Vv[Ci]},t.createElement(Pt,{title:"Export list"},t.createElement("div",null,t.createElement(Mt,{title:t.createElement(f.Z,{id:"wizard.exportWizardList",defaultMessage:"Wizard: Export lists"})},t.createElement("span",null,t.createElement(f.Z,{id:"wizard.exportAlertList",defaultMessage:"You can export a list."})),t.createElement("span",null,t.createElement(f.Z,{id:"wizard.documentationlist",defaultMessage:"Read more about Wizard lists in the documentation."})),t.createElement("span",null,t.createElement(Xe.LinkContainer,{to:Ze.pluginRoute("WIZARD_LISTS")},t.createElement(c.Button,{bsStyle:"info"},t.createElement(f.Z,{id:"wizard.backlist",defaultMessage:"Back to lists"}))),"\xA0")),t.createElement(c.Row,{className:"content"},t.createElement(c.Col,{md:6},t.createElement("form",{className:"form-horizontal build-content-pack",onSubmit:this.onSubmit},t.createElement("div",{className:"form-group"},t.createElement(c.Col,{sm:2},t.createElement("label",{className:"control-label",htmlFor:"name"},t.createElement(f.Z,{id:"wizard.alertsLists",defaultMessage:"Lists"}))),t.createElement(c.Col,{sm:10},this.isEmpty(this.state.alertLists)?t.createElement("span",{className:"help-block help-standalone"},t.createElement(f.Z,{id:"wizard.noListsToExport",defaultMessage:"There is no lists to export."})):t.createElement("span",null,t.createElement(c.Button,{className:"btn btn-sm btn-link select-all",onClick:this.selectAllAlertLists},t.createElement(f.Z,{id:"wizard.selectAll",defaultMessage:"Select all"})),this.state.alertLists.sort((e,r)=>e.title.localeCompare(r.title)).map(this.formatAlertList)))),t.createElement("div",{className:"form-group"},t.createElement(c.Col,{smOffset:2,sm:10},t.createElement(c.Button,{bsStyle:"success",type:"submit"},t.createElement(ui,null),t.createElement(f.Z,{id:"wizard.downloadContentPack",defaultMessage:"Download my content pack"}))))))))))}});p.G.register(new p.h(E,{routes:[{path:"/wizard/AlertRules",component:yh,permissions:"WIZARD_ALERTS_RULES_READ"},{path:"/wizard/NewAlert",component:Sv,permissions:"WIZARD_ALERTS_RULES_CREATE"},{path:"/wizard/UpdateAlert/:alertRuleTitle",component:wv,permissions:"WIZARD_ALERTS_RULES_UPDATE"},{path:"/wizard/ExportAlert",component:Pv,permissions:"WIZARD_ALERTS_RULES_READ"},{path:"/wizard/ImportAlert",component:Dv,permissions:"WIZARD_ALERTS_RULES_READ"},{path:"/wizard/Lists",component:zv},{path:"/wizard/NewList",component:Zv},{path:"/wizard/UpdateList/:alertListTitle",component:Kv},{path:"/wizard/ImportList",component:Gv},{path:"/wizard/ExportList",component:jv}],navigation:[{description:"Wizard",children:[{path:"/wizard/AlertRules",description:"Alert Rules"},{path:"/wizard/Lists",description:"Lists"}]}]}))},"WN+LQtRW":S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAVVJREFUWAnN2G0KgjAYwPHpGfRkaZeqvgQaK+hY3SUHrk1YzNLay/OiEFp92I+/Mp2F2Mh2lLISWnflFjzH263RQjzMZ19wgs73ez0o1WmtW+dgA01VxrE3p6l2GLsnBy1VYQOtVSEH/atCCgqpQgKKqYIOiq2CBkqtggLKqQIKgqgCBjpJ2Y5CdJ+zrT9A7HHSTA1dxUdHgzCqJIEwq0SDsKsEg6iqBIEoq/wEcVRZBXFV+QJxV5mBtlDFB5VjYTaGZ2sf4R9PM7U9ZU+lLuaetPP/5Die3ToO1+u+MKtHs06qODB2zBnI/jBd4MPQm1VkY79Tb18gB+C62FdBFsZR6yeIo1YQiLJWMIiqVjQIu1YSCLNWFgijVjYIuhYYCKoWKAiiFgoopxYaKLUWOii2FgkophYp6F3r42W5A9s9OcgNvva8xQaysKXlFytoqdYmQH6tF3toSUo0INq9AAAAAElFTkSuQmCC"},glNHDCWm:S=>{"use strict";S.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAXRJREFUWAnN119ugjAcwPHWzJ1gnmxzB/BBE0n24m4xfNkTaOL7wOtsl3AXMMb+Vjaa1BG00N8fSEibPpAP3xAKKs2yjzTPH9RAjhEo9WzPr/Vm8zgE0+gXATAxxuxtqeJ9t5tIwv5AtQAApsfT6TPdbp+kUBcgVwvO51KqVhMkXKsVJFXrOkigVhCIs1Y4iKlWZxB1rX4gwlpRIIpa8SDkWmggrFq4IIRaJKCYWnSgnrXIQV1r8YD+1Vrn+bReagysIFfLABRt31v8oBu1xEBttfRbltmfjgEcWh9snUS2kNdBK6WN1vrOWxObWsz+fjxevsxmB1GQDfINWiev83nhaoiB/CoOU438oPrhXS0WpQ9xc1ZQWxWHqUYe0I0qrKCQKjygDlXIQV2r0IF6ViEBxVTBBSFUQQNhVYkHIVeJAtkNsbQ7c1LtzP6FsObhb2rCKv7NBIGoq4SDmKoEgTirXAcJVGkFSVVpgoSrXICGUMUH/QBZNSUy5XWUhwAAAABJRU5ErkJggg=="},OUOTPsAr:S=>{"use strict";S.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"},"J6y4/h8P":(S,w,i)=>{S.exports=i("5knLEQW+")(1893)},"D4SbLiE/":(S,w,i)=>{S.exports=i("5knLEQW+")(2555)},UiXZqrDE:(S,w,i)=>{S.exports=i("5knLEQW+")(2598)},JnTtTRmZ:(S,w,i)=>{S.exports=i("5knLEQW+")(3001)},DUKaTDO2:(S,w,i)=>{S.exports=i("5knLEQW+")(3109)},yAXMqwrl:(S,w,i)=>{S.exports=i("5knLEQW+")(335)},"9oVghaOd":(S,w,i)=>{S.exports=i("5knLEQW+")(381)},zKLlqmvB:(S,w,i)=>{S.exports=i("5knLEQW+")(3935)},JuypItPU:(S,w,i)=>{S.exports=i("5knLEQW+")(4890)},lCPkTODq:(S,w,i)=>{S.exports=i("5knLEQW+")(533)},Z7aTuO5B:(S,w,i)=>{S.exports=i("5knLEQW+")(7294)},aKyEWaw1:(S,w,i)=>{S.exports=i("5knLEQW+")(7588)},"ASBo/Til":(S,w,i)=>{S.exports=i("5knLEQW+")(8)},"Azl/g5BR":(S,w,i)=>{S.exports=i("5knLEQW+")(860)},rDmUG0Dk:(S,w,i)=>{S.exports=i("5knLEQW+")(917)},"ww+BtWnX":(S,w,i)=>{S.exports=i("5knLEQW+")(947)},"kqAR+wt5":(S,w,i)=>{S.exports=i("5knLEQW+")(9755)},"5knLEQW+":S=>{"use strict";S.exports=__vendor},"/Gr37E0h":()=>{}},Da={};function de(S){var w=Da[S];if(w!==void 0)return w.exports;var i=Da[S]={id:S,loaded:!1,exports:{}};return Ia[S].call(i.exports,i,i.exports,de),i.loaded=!0,i.exports}de.m=Ia,de.amdD=function(){throw new Error("define cannot be used indirect")},(()=>{var S=[];de.O=(w,i,E,p)=>{if(i){p=p||0;for(var t=S.length;t>0&&S[t-1][2]>p;t--)S[t]=S[t-1];S[t]=[i,E,p];return}for(var c=1/0,t=0;t=p)&&Object.keys(de.O).every(N=>de.O[N](i[b]))?i.splice(b--,1):(u=!1,p{var w=S&&S.__esModule?()=>S.default:()=>S;return de.d(w,{a:w}),w},de.d=(S,w)=>{for(var i in w)de.o(w,i)&&!de.o(S,i)&&Object.defineProperty(S,i,{enumerable:!0,get:w[i]})},de.f={},de.e=S=>Promise.all(Object.keys(de.f).reduce((w,i)=>(de.f[i](S,w),w),[])),de.u=S=>""+S+"."+{"e642b42f-168":"6d521aa00d2993529e4f","e642b42f-794":"433334bc2becf017948e","e642b42f-735":"936aee662b99f3fc0759","e642b42f-91":"311e2c23e941d53f046d"}[S]+".js",de.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),de.o=(S,w)=>Object.prototype.hasOwnProperty.call(S,w),(()=>{var S={},w="AlertWizard:";de.l=(i,E,p,t)=>{if(S[i]){S[i].push(E);return}var c,u;if(p!==void 0)for(var b=document.getElementsByTagName("script"),a=0;a{c.onerror=c.onload=null,clearTimeout(I);var L=S[i];if(delete S[i],c.parentNode&&c.parentNode.removeChild(c),L&&L.forEach(F=>F(N)),x)return x(N)},I=setTimeout(A.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=A.bind(null,c.onerror),c.onload=A.bind(null,c.onload),u&&document.head.appendChild(c)}})(),de.r=S=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},de.nmd=S=>(S.paths=[],S.children||(S.children=[]),S),(()=>{var S;de.g.importScripts&&(S=de.g.location+"");var w=de.g.document;if(!S&&w&&(w.currentScript&&(S=w.currentScript.src),!S)){var i=w.getElementsByTagName("script");i.length&&(S=i[i.length-1].src)}if(!S)throw new Error("Automatic publicPath is not supported in this browser");S=S.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),de.p=S})(),(()=>{de.b=document.baseURI||self.location.href;var S={"e642b42f-45":0};de.f.j=(E,p)=>{var t=de.o(S,E)?S[E]:void 0;if(t!==0)if(t)p.push(t[2]);else{var c=new Promise((m,A)=>t=S[E]=[m,A]);p.push(t[2]=c);var u=de.p+de.u(E),b=new Error,a=m=>{if(de.o(S,E)&&(t=S[E],t!==0&&(S[E]=void 0),t)){var A=m&&(m.type==="load"?"missing":m.type),I=m&&m.target&&m.target.src;b.message="Loading chunk "+E+` failed.
(`+A+": "+I+")",b.name="ChunkLoadError",b.type=A,b.request=I,t[1](b)}};de.l(u,a,"chunk-"+E,E)}},de.O.j=E=>S[E]===0;var w=(E,p)=>{var[t,c,u]=p,b,a,m=0;if(t.some(I=>S[I]!==0)){for(b in c)de.o(c,b)&&(de.m[b]=c[b]);if(u)var A=u(de)}for(E&&E(p);mde("G/c9Iv8A"));Ma=de.O(Ma)})();})();
//# sourceMappingURL=plugin.com.airbus_cyber_security.graylog.AlertWizardPlugin.16f9b211543540fe1709.js.map