web-interface.assets.07ba022f-5673.1183d7a5f57ced658cc6.js Maven / Gradle / Ivy
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["07ba022f-5673"],{"f+6PzBna":(C,y,e)=>{"use strict";e.d(y,{Z:()=>p});var h=e("pmX897Fv"),m=e.n(h),t=e("DjJvgDaP"),r=e.n(t),c=r()(m());c.push([C.id,`.YlgzIDxuVXzWGUeQ6wZ8 {
margin-top: 8px;
}
`,"",{version:3,sources:["webpack://./src/components/content-packs/ContentPackApplyParameter.css"],names:[],mappings:"AAAA;IACI,eAAe;AACnB",sourcesContent:[`:local(.applyParameter) {
margin-top: 8px;
}
`],sourceRoot:""}]),c.locals={applyParameter:"YlgzIDxuVXzWGUeQ6wZ8"};const p=c},"0XyJNg2J":(C,y,e)=>{"use strict";e.d(y,{Z:()=>p});var h=e("pmX897Fv"),m=e.n(h),t=e("DjJvgDaP"),r=e.n(t),c=r()(m());c.push([C.id,`.uld5gLTpygpD0RWINILd tbody {
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display:block;
}
.uld5gLTpygpD0RWINILd thead, .uld5gLTpygpD0RWINILd tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
.gr8Pw8P44d_POVcuv1Pr {
word-wrap: break-word;
}
.TiPrBe6U6mlJyjsINNY8 {
color: rgba(158, 31, 99, 0.43);
}
`,"",{version:3,sources:["webpack://./src/components/content-packs/ContentPackEntitiesList.css"],names:[],mappings:"AAAA;IACI,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;AACjB;;AAEA;IACI,aAAa;IACb,UAAU;IACV,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;AACzB;;AAEA;IACI,8BAA8B;AAClC",sourcesContent:[`:local(.scrollable) tbody {
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display:block;
}
:local(.scrollable) thead, :local(.scrollable) tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
:local(.bigColumns) {
word-wrap: break-word;
}
:local(.contentPackEntity) {
color: rgba(158, 31, 99, 0.43);
}
`],sourceRoot:""}]),c.locals={scrollable:"uld5gLTpygpD0RWINILd",bigColumns:"gr8Pw8P44d_POVcuv1Pr",contentPackEntity:"TiPrBe6U6mlJyjsINNY8"};const p=c},vyEB9hoZ:(C,y,e)=>{"use strict";e.d(y,{Z:()=>ot});var h=e("ii0bleBb"),m=e.n(h),t=e("Z7aTuO5B"),r=e("uZqmR+ju"),c=e("/GOzvPf6"),p=e("gqVHlIxA"),n=e("lhAGFr4h"),u=e.n(n),f=e("4E3oowBb"),g=e("uoAlNf/n"),a=e("znhYcHoq"),s=e("dFpwyWHg"),l=e.n(s),i=e("C2ikvoS0"),d=e.n(i),v=e("1IntWRSu"),P=e.n(v),L=e("8nGWeFnd"),D=e.n(L),T=e("TeAcaicX"),M=e.n(T),F=e("eE3+5goe"),B=e.n(F),W=e("f+6PzBna"),K={};K.styleTagTransform=B(),K.setAttributes=D(),K.insert=P().bind(null,"head"),K.domAPI=d(),K.insertStyleElement=M();var Et=l()(W.Z,K);const $=W.Z&&W.Z.locals?W.Z.locals:void 0;var q=Object.defineProperty,tt=(_,E,o)=>E in _?q(_,E,{enumerable:!0,configurable:!0,writable:!0,value:o}):_[E]=o,U=(_,E,o)=>(tt(_,typeof E!="symbol"?E+"":E,o),o);class G extends t.Component{constructor(E){super(E),U(this,"_configKeyRowFormatter",o=>{const R=u()(this.props.appliedParameter,{paramName:o.paramName,configKey:o.configKey,readOnly:!0})<0?t.createElement("td",null,t.createElement(r.Button,{bsStyle:"info",bsSize:"small",onClick:()=>{this._parameterClear(o.configKey)}},"Clear")):t.createElement("td",null);return t.createElement("tr",{key:o.configKey},t.createElement("td",null,o.configKey),t.createElement("td",null,o.paramName),R)}),U(this,"_bindValue",o=>{const A={};A[o.target.name]=o.target.value,this.setState(A)}),U(this,"_valuesSelected",()=>this.state.parameter.length>0&&this.state.config_key.length>0),U(this,"_applyParameter",o=>{o.preventDefault(),!(!this._valuesSelected()||this.props.appliedParameter.findIndex(R=>R.configKey===this.state.config_key)>=0)&&(this.props.onParameterApply(this.state.config_key,this.state.parameter),this.setState({config_key:"",parameter:""}))}),U(this,"_parameterClear",o=>{this.props.onParameterClear(o)}),this.state={config_key:"",parameter:""}}render(){const o=new a.Z(this.props.entity.data).getPaths(),A=Object.keys(o).sort(f.S).filter(I=>o[I].isValueRef()).filter(I=>this.props.appliedParameter.findIndex(Z=>I===Z.configKey)<0),R=I=>t.createElement("option",{key:"EMPTY",value:""},I),S=[R("Choose Config Key")].concat(A.map(I=>t.createElement("option",{key:I,value:I},I)));let{parameters:O}=this.props,b=O.length<=0?"Create a parameter first":"Choose...";if(this.state.config_key!==""&&O.length>0){const I=o[this.state.config_key].getValueType();["string","integer","boolean","double"].findIndex(Z=>Z===I)>=0&&(O=O.filter(Z=>Z.type===I)),b=O.length<=0?`No parameter from type ${I}`:"Choose..."}const k=[R(b)].concat(O.map(I=>t.createElement("option",{key:I.name,value:I.name},I.title," (",I.name,")")));return t.createElement("div",null,t.createElement("form",{className:"apply-parameter-form",id:"apply-parameter-form",onSubmit:this._applyParameter},t.createElement(r.Row,{className:$.applyParameter},t.createElement(r.Col,{smOffset:1,sm:5},t.createElement(r.Input,{name:"config_key",id:"config_key",type:"select",value:this.state.config_key,onChange:this._bindValue,label:"Config Key",required:!0},S)),t.createElement(r.Col,{sm:5},t.createElement(r.Input,{name:"parameter",id:"parameter",type:"select",value:this.state.parameter,onChange:this._bindValue,label:"Parameter",required:!0},k)),t.createElement(r.Col,{sm:1})),t.createElement(r.Row,null,t.createElement(r.Col,{smOffset:10,sm:2},t.createElement(r.Button,{bsStyle:"primary",disabled:!this._valuesSelected(),type:"submit"},"Apply")))),t.createElement(r.Row,null,t.createElement(r.Col,{smOffset:1,sm:10},t.createElement(g.Z,{id:"config-key-list",headers:["Config Key","Parameter","Action"],filterKeys:[],rows:this.props.appliedParameter,dataRowFormatter:this._configKeyRowFormatter}))))}}U(G,"propTypes",{onParameterApply:m().func,onParameterClear:m().func,entity:m().object.isRequired,parameters:m().array,appliedParameter:m().array}),U(G,"defaultProps",{onParameterApply:()=>{},onParameterClear:()=>{},parameters:[],appliedParameter:[]});const et=G;var at=Object.defineProperty,nt=(_,E,o)=>E in _?at(_,E,{enumerable:!0,configurable:!0,writable:!0,value:o}):_[E]=o,w=(_,E,o)=>(nt(_,typeof E!="symbol"?E+"":E,o),o);class z extends t.Component{constructor(){super(...arguments),w(this,"_getParameterForConfigKey",E=>{const o=this.props.appliedParameter.findIndex(S=>S.configKey===E);if(o<0)return;const A=this.props.appliedParameter[o],R=this.props.parameters.findIndex(S=>S.name===A.paramName);return this.props.parameters[R]}),w(this,"_configKeyRowFormatter",E=>o=>{const A=E[o],R=this._getParameterForConfigKey(o),S=R?t.createElement("b",null,`parameter (${R.type})`):A.getValueType(),O=R?t.createElement("b",null,R.name):A.getValue();return t.createElement("tr",{key:o},t.createElement("td",null,o),t.createElement("td",null,S),t.createElement("td",null,O))})}render(){const o=new a.Z(this.props.entity.data).getPaths(),A=Object.keys(o).sort(f.S);return t.createElement("div",null,t.createElement(g.Z,{id:"entiy-config-list",headers:["Config Key","Type","Value"],filterKeys:[],rows:A,dataRowFormatter:this._configKeyRowFormatter(o)}))}}w(z,"propTypes",{entity:m().object.isRequired,appliedParameter:m().array,parameters:m().array}),w(z,"defaultProps",{appliedParameter:[],parameters:[]});const st=z;var J=e("0XyJNg2J"),x={};x.styleTagTransform=B(),x.setAttributes=D(),x.insert=P().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=M();var vt=l()(J.Z,x);const j=J.Z&&J.Z.locals?J.Z.locals:void 0;var rt=Object.defineProperty,lt=(_,E,o)=>E in _?rt(_,E,{enumerable:!0,configurable:!0,writable:!0,value:o}):_[E]=o,H=(_,E,o)=>(lt(_,typeof E!="symbol"?E+"":E,o),o);const X=({entity:_})=>_.fromServer?t.createElement("span",null,t.createElement(c.JO,{title:"Server",name:"server"})):t.createElement("span",null,t.createElement(c.JO,{title:"Content Pack",name:"archive",className:j.contentPackEntity}));X.propTypes={entity:m().object.isRequired};class Y extends t.Component{constructor(E){super(E),H(this,"_filterEntities",(o,A)=>{const{contentPack:R}=this.props,S=A||R.entities;if(!o||o.length<=0){this.setState({filteredEntities:S,filter:void 0});return}const O=RegExp(o,"i"),b=S.filter(k=>O.test(k.title)||O.test(k.description));this.setState({filteredEntities:b,filter:o})}),H(this,"_entityRowFormatter",o=>{const{contentPack:A,appliedParameter:R,onParameterApply:S,onParameterClear:O,readOnly:b}=this.props,k=t.createElement(et,{parameters:A.parameters,entity:o,appliedParameter:R[o.id],onParameterApply:(N,ht)=>{S(o.id,N,ht)},onParameterClear:N=>{O(o.id,N)}}),I=()=>{this.setState({showApplyConfigModal:!1})},Z=()=>{this.setState({showApplyConfigModal:!0})},it=t.createElement(p.Z,{showModal:this.state.showApplyConfigModal,onHide:I,bsSize:"large"},t.createElement(r.Modal.Header,{closeButton:!0},t.createElement(r.Modal.Title,null,"Edit")),t.createElement(r.Modal.Body,null,k),t.createElement(r.Modal.Footer,null,t.createElement(r.Button,{onClick:I},"Close"))),ut=t.createElement(st,{appliedParameter:R[o.id],parameters:A.parameters,entity:o}),Q=()=>{this.setState({showConfigModalId:void 0})},ct=N=>{this.setState({showConfigModalId:N})},dt=this.state.showConfigModalId&&t.createElement(p.Z,{showModal:o.id===this.state.showConfigModalId,onHide:Q,bsSize:"large"},t.createElement(r.Modal.Header,{closeButton:!0},t.createElement(r.Modal.Title,null,"Entity Config")),t.createElement(r.Modal.Body,null,ut),t.createElement(r.Modal.Footer,null,t.createElement(r.Button,{onClick:Q},"Close"))),mt=A.parameters.length<=0,pt=(R[o.id]||[]).length;return t.createElement("tr",{key:o.id},t.createElement("td",{className:j.bigColumns},o.title),t.createElement("td",null,o.type.name),t.createElement("td",{className:j.bigColumns},o.description),!b&&t.createElement("td",null,t.createElement(X,{entity:o})),!b&&t.createElement("td",null,pt),t.createElement("td",null,t.createElement(r.ButtonToolbar,null,!b&&t.createElement(r.Button,{bsStyle:"primary",bsSize:"xs",disabled:mt,onClick:()=>{Z()}},"Edit"),t.createElement(r.Button,{bsSize:"xs",onClick:()=>{ct(o.id)}},"Show"))),!b&&it,dt)}),this.state={showApplyConfigModal:!1,showConfigModalId:void 0,filteredEntities:E.contentPack.entities||[],filter:void 0}}UNSAFE_componentWillReceiveProps(E){const{filter:o}=this.state;this._filterEntities(o,E.contentPack.entities)}render(){const{readOnly:E}=this.props,{filteredEntities:o}=this.state,A=E?["Title","Type","Description","Action"]:["Title","Type","Description","Origin","Used Parameters","Action"];return t.createElement("div",null,t.createElement("h2",null,"Entity list"),t.createElement("br",null),t.createElement(c.UI,{onSearch:this._filterEntities,onReset:()=>{this._filterEntities("")}}),t.createElement(c.wQ,{id:"entity-list",headers:A,className:j.scrollable,sortBy:R=>R.type.name,filterKeys:[],rows:o,dataRowFormatter:this._entityRowFormatter}))}}H(Y,"propTypes",{contentPack:m().object.isRequired,appliedParameter:m().object,onParameterApply:m().func,onParameterClear:m().func,readOnly:m().bool}),H(Y,"defaultProps",{appliedParameter:{},onParameterClear:()=>{},onParameterApply:()=>{},readOnly:!1});const ot=Y},"EL/SQmS6":(C,y,e)=>{"use strict";e.d(y,{Z:()=>g});var h=e("ii0bleBb"),m=e.n(h),t=e("Z7aTuO5B"),r=e("J6y4/h8P"),c=e("sUEzN8pX"),p=e("ty2gyrHp"),n=e("d4kzUuQm");const u=(0,r.default)(c.j)(({status:a,theme:s})=>{const{success:l,info:i,warning:d,danger:v}=s.colors.variant.dark,P={installed:l,updatable:i,edited:d,error:v};return(0,r.css)`
margin-left: 4px;
background-color: ${P[a]};
color: ${s.utils.readableColor(P[a])};
`}),f=({contentPackId:a,states:s})=>{const l=s.map(i=>t.createElement(p.r,{key:i,to:n.ZP.SYSTEM.CONTENTPACKS.show(a)},t.createElement(u,{status:i},i)));return t.createElement("span",null,l)};f.propTypes={states:m().arrayOf(m().string),contentPackId:m().string.isRequired},f.defaultProps={states:[]};const g=f},iAkLQLhv:(C,y,e)=>{"use strict";e.d(y,{Z:()=>m});const m={convertToString(t){switch(t.type){case"integer":case"double":return t.default_value.toString();case"boolean":return t.default_value?"true":"false";default:return t.default_value}},convertValue(t,r){switch(t){case"integer":return parseInt(r,10);case"double":return parseFloat(r);case"boolean":return r==="true";default:return r}}}},"rbG+3kLS":(C,y,e)=>{"use strict";e.d(y,{Z:()=>f});var h=e("VPaD/Np4"),m=e.n(h),t=e("u1Q00LVl"),r=e.n(t),c=e("Jb16h681"),p=e.n(c),n=e("iltCXley"),u=e("PAFhOglk");class f{constructor(s,l,i,d,v,P,L,D,T,M){const F=M.map(B=>B instanceof u.Z?B:u.Z.fromJSON(B,!1,T));this._value={v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:F}}get v(){return this._value.v}get id(){return this._value.id}get rev(){return this._value.rev}get name(){return this._value.name}get summary(){return this._value.summary}get description(){return this._value.description}get vendor(){return this._value.vendor}get url(){return this._value.url}get constraints(){return this._value.entities.reduce((s,l)=>l.constraints.reduce((i,d)=>i.add(d),s),(0,h.Set)())}get parameters(){return this._value.parameters}get entities(){return this._value.entities}toBuilder(){const{v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:M}=this._value;return new g((0,h.Map)({v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:M}))}toJSON(){const{v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:M}=this._value,F=M.map(B=>B.toJSON());return{v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:F}}static fromJSON(s){const{v:l,id:i,rev:d,name:v,summary:P,description:L,vendor:D,url:T,parameters:M,entities:F}=s;return new f(l,i,d,v,P,L,D,T,M,F)}static builder(){return new g().v(1).id((0,n.Z)()).rev(1).name("").summary("").description("").vendor("").url("").parameters([]).entities([])}}class g{constructor(s=(0,h.Map)()){this.value=s}v(s){return this.value=this.value.set("v",s),this}id(s){return this.value=this.value.set("id",s),this}rev(s){return this.value=this.value.set("rev",s),this}name(s){return this.value=this.value.set("name",s),this}summary(s){return this.value=this.value.set("summary",s),this}description(s){return this.value=this.value.set("description",s),this}vendor(s){return this.value=this.value.set("vendor",s),this}url(s){return this.value=this.value.set("url",s),this}parameters(s){return this.value=this.value.set("parameters",s),this}removeParameter(s){const l=this.value.get("parameters").slice(0);return p()(l,i=>i.name===s.name),this.value=this.value.set("parameters",l),this}addParameter(s){const l=this.value.get("parameters"),i=r()(l,s);return this.value=this.value.set("parameters",i),this}entities(s){return this.value=this.value.set("entities",s),this}build(){const{v:s,id:l,rev:i,name:d,summary:v,description:P,vendor:L,url:D,parameters:T,entities:M}=this.value.toObject();return new f(s,l,i,d,v,P,L,D,T,M)}}},PAFhOglk:(C,y,e)=>{"use strict";e.d(y,{Z:()=>u});var h=e("VPaD/Np4"),m=e.n(h),t=e("lhAGFr4h"),r=e.n(t),c=e("EHQ1CSeg");class p{constructor(a,s,l="server"){this._value={type:a,plugin:l,version:s}}get type(){return this._value.type}get plugin(){return this._value.plugin}get version(){return this._value.version}toBuilder(){const{type:a,plugin:s,version:l}=this._value;return new n(m().Map({type:a,plugin:s,version:l}))}static create(a,s,l="server"){return new p(a,s,l)}toJSON(){const{type:a,plugin:s,version:l}=this._value;return s==="server"?{type:a,version:l}:{type:a,plugin:s,version:l}}equals(a){return!a.version||!a.plugin||!a.type?!1:a.version===this.version&&a.type===this.type&&a.plugin===this.plugin}static fromJSON(a){const{type:s,version:l,plugin:i}=a;return p.create(s,l,i)}static builder(){return new n().plugin("server")}}class n{constructor(a=m().Map()){this.value=a}type(a){return new n(this.value.set("type",a))}plugin(a){return new n(this.value.set("plugin",a))}version(a){return new n(this.value.set("version",a))}build(){const{type:a,plugin:s,version:l}=this.value.toObject();return new p(a,l,s)}}class u{constructor(a,s,l,i,d=!1,v=[],P=[]){const L=v.map(D=>D instanceof p?D:p.fromJSON(D));this._value={v:a,type:s,id:l,data:i,constraints:L,fromServer:d,parameters:P}}static fromJSON(a,s=!0,l=[]){const{v:i,type:d,id:v,data:P,constraints:L}=a;return new u(i,d,v,P,s,L,l)}get v(){return this._value.v}get type(){return this._value.type}get id(){return this._value.id}get data(){return this._value.data}get fromServer(){return this._value.fromServer}get constraints(){return this._value.constraints}get title(){let a=this.getValueFromData("title");return a||(a=this.getValueFromData("name")),a||""}get description(){return this.getValueFromData("description")||""}get isEntity(){return!0}static[Symbol.hasInstance](a){return!!a.isEntity}getValueFromData(a){const{data:s}=this._value;if(!(!s||!s[a])){if(c.Z.dataIsValueRef(s[a])){const l=(s[a]||{})[c.Z.VALUE_REF_VALUE_FIELD];if(c.Z.dataValueIsParameter(s[a])){const i=r()(this._value.parameters,{name:l});if(i>=0&&this._value.parameters[i].default_value)return this._value.parameters[i].default_value}return l}return s[a]}}toBuilder(){const{v:a,type:s,id:l,data:i,constraints:d,fromServer:v,parameters:P}=this._value;return new f((0,h.Map)({v:a,type:s,id:l,data:i,constraints:d,fromServer:v,parameters:P}))}static builder(){return new f}toJSON(){const{v:a,type:s,id:l,data:i,constraints:d}=this._value;return{v:a,type:s,id:l,data:i,constraints:d}}}class f{constructor(a=(0,h.Map)()){this.value=a}v(a){return this.value=this.value.set("v",a),this}type(a){return this.value=this.value.set("type",a),this}id(a){return this.value=this.value.set("id",a),this}data(a){return this.value=this.value.set("data",a),this}fromServer(a){return this.value=this.value.set("fromServer",a),this}constraints(a){return this.value=this.value.set("constraints",a),this}parameters(a){return this.value=this.value.set("parameters",a),this}build(){const{v:a,type:s,id:l,data:i,constraints:d,fromServer:v,parameters:P}=this.value.toObject();return new u(a,s,l,i,v,d,P)}}},nPaY1a0P:(C,y,e)=>{"use strict";e.d(y,{K:()=>a,V:()=>s});var h=e("JnTtTRmZ"),m=e.n(h),t=e("MdYBRjRJ"),r=e("U1Iufsob"),c=e("eFxcQyPT"),p=e("ZoCQyFC1"),n=e.n(p),u=e("rbG+3kLS");class f{constructor(i){this._value=Object.keys(i).reduce((d,v)=>{const P=i[v];return d[parseInt(v,10)]=u.Z.fromJSON(P),d},{})}get latestRevision(){return n()(this.revisions)}get revisions(){return Object.keys(this._value).map(i=>parseInt(i,10))}get latest(){return this._value[this.latestRevision]}get contentPacks(){return Object.values(this._value)}createNewVersionFromRev(i){return this.contentPack(parseInt(i,10)).toBuilder().rev(this.latestRevision+1).build()}contentPack(i){return this._value[i]}}var g=e("IA3Ku5lS");const a=(0,g.ei)("core.ContentPacks",()=>m().createActions({create:{asyncResult:!0},list:{asyncResult:!0},get:{asyncResult:!0},getRev:{asyncResult:!0},delete:{asyncResult:!0},deleteRev:{asyncResult:!0},install:{asyncResult:!0},installList:{asyncResult:!0},uninstall:{asyncResult:!0},uninstallDetails:{asyncResult:!0}})),s=(0,g.dS)("core.ContentPacks",()=>m().createStore({listenables:[a],getInitialState(){return{contentPack:void 0,contentPackMetadata:void 0,contentPacks:void 0,installations:void 0,uninstallEntities:void 0}},get(l){const i=t.DC(r.Z.ContentPacksController.get(l).url),d=(0,c.ZP)("GET",i).then(v=>{const P=new f(v.content_pack_revisions),L=v.constraints_result,D={contentPackRevisions:P,selectedVersion:P.latestRevision,constraints:L};return this.trigger(D),D});a.get.promise(d)},getRev(l,i){const d=t.DC(r.Z.ContentPacksController.getRev(l,i).url),v=(0,c.ZP)("GET",d).then(P=>(this.trigger({contentPack:P.content_pack}),P));a.getRev.promise(v)},list(){const l=t.DC(r.Z.ContentPacksController.list().url),i=(0,c.ZP)("GET",l).then(d=>(this.trigger({contentPacks:d.content_packs,contentPackMetadata:d.content_packs_metadata}),d));a.list.promise(i)},create(l){const i=(0,c.ZP)("POST",t.DC(r.Z.ContentPacksController.create().url),l);a.create.promise(i)},delete(l){const i=(0,c.ZP)("DELETE",t.DC(r.Z.ContentPacksController.delete(l).url));a.delete.promise(i)},deleteRev(l,i){const d=(0,c.ZP)("DELETE",t.DC(r.Z.ContentPacksController.deleteRev(l,i).url));a.deleteRev.promise(d)},install(l,i,d){const v=(0,c.ZP)("POST",t.DC(r.Z.ContentPacksController.install(l,i).url),d);a.install.promise(v)},installList(l){const i=t.DC(r.Z.ContentPacksController.installList(l).url),d=(0,c.ZP)("GET",i).then(v=>(this.trigger({installations:v.installations}),v));a.installList.promise(d)},uninstall(l,i){const d=(0,c.ZP)("DELETE",t.DC(r.Z.ContentPacksController.uninstall(l,i).url));a.uninstall.promise(d)},uninstallDetails(l,i){const d=t.DC(r.Z.ContentPacksController.uninstallDetails(l,i).url),v=(0,c.ZP)("GET",d).then(P=>(this.trigger({uninstallEntities:P.entities}),P));a.uninstallDetails.promise(v)}}))},EHQ1CSeg:(C,y,e)=>{"use strict";e.d(y,{Z:()=>c});var h=Object.defineProperty,m=(p,n,u)=>n in p?h(p,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[n]=u,t=(p,n,u)=>(m(p,typeof n!="symbol"?n+"":n,u),u);const r=class V{static dataIsValueRef(n){if(!n)return!1;if(typeof n.has=="function")return n.size===2&&n.has(V.VALUE_REF_TYPE_FIELD)&&n.has(V.VALUE_REF_VALUE_FIELD);const u=Object.keys(n);return u.length===2&&u.includes(V.VALUE_REF_TYPE_FIELD)&&u.includes(V.VALUE_REF_VALUE_FIELD)}static dataValueIsParameter(n){return n?typeof n.get=="function"?V.dataIsValueRef(n)&&n.get(V.VALUE_REF_TYPE_FIELD)===V.VALUE_REF_PARAMETER_VALUE:V.dataIsValueRef(n)&&n[V.VALUE_REF_TYPE_FIELD]===V.VALUE_REF_PARAMETER_VALUE:!1}static createValueRef(n,u){return{[this.VALUE_REF_TYPE_FIELD]:n,[this.VALUE_REF_VALUE_FIELD]:u}}};t(r,"VALUE_REF_VALUE_FIELD","@value"),t(r,"VALUE_REF_TYPE_FIELD","@type"),t(r,"VALUE_REF_PARAMETER_VALUE","parameter");let c=r},znhYcHoq:(C,y,e)=>{"use strict";e.d(y,{Z:()=>c});var h=e("VPaD/Np4"),m=e.n(h),t=e("EHQ1CSeg");class r{constructor(n,u,f,g,a,s,l){this.path=n,this.valueIsReference=u,this.valueIsParameter=f,this.getter=g,this.setter=a,this.parameterSetter=s,this.valueTypeGetter=l}getPath(){return this.path}getValue(){return this.getter()}setValue(n){this.setter(n)}setParameter(n){this.parameterSetter(n)}getValueType(){return this.valueTypeGetter()}isValueRef(){return this.valueIsReference}isValueParameter(){return this.valueIsParameter}}class c{constructor(n){this.data=(0,h.Map)(m().fromJS(n)),this.paths=(0,h.Map)(),this.walkPaths()}getPaths(){return this.paths.toJS()}getData(){return this.data.toJS()}walkPaths(n=[]){const u=n.length>0?this.data.getIn(n):this.data;h.Map.isMap(u)?t.Z.dataIsValueRef(u)?this.addPath(n):u.keySeq().toJS().forEach(f=>{this.walkPaths(n.concat([f]))}):h.List.isList(u)?u.toArray().forEach((f,g)=>{this.walkPaths(n.concat([g]))}):this.addPath(n)}addPath(n){const u=n.join("."),f=new r(u,t.Z.dataIsValueRef(this.data.getIn(n)),t.Z.dataValueIsParameter(this.data.getIn(n)),this.pathGetter(n),this.pathSetter(n),this.pathParameterSetter(n),this.pathType(n));this.paths=this.paths.set(u,f)}pathGetter(n){return()=>t.Z.dataIsValueRef(this.data.getIn(n))?this.data.getIn(n.concat(t.Z.VALUE_REF_VALUE_FIELD)):this.data.getIn(n)}pathSetter(n){return u=>{t.Z.dataIsValueRef(this.data.getIn(n))?this.data=this.data.setIn(n.concat(t.Z.VALUE_REF_VALUE_FIELD),u):this.data=this.data.setIn(n,u)}}pathParameterSetter(n){return u=>{if(t.Z.dataIsValueRef(this.data.getIn(n)))this.data=this.data.setIn(n,(0,h.Map)({[t.Z.VALUE_REF_VALUE_FIELD]:u,[t.Z.VALUE_REF_TYPE_FIELD]:t.Z.VALUE_REF_PARAMETER_VALUE}));else throw new Error(`Cannot set parameter on non-value-reference field: ${n.join(".")}`)}}pathType(n){return()=>{const u=this.data.getIn(n);return t.Z.dataIsValueRef(u)?this.data.getIn(n.concat(t.Z.VALUE_REF_TYPE_FIELD)):typeof u}}}},WmH2Flia:(C,y,e)=>{var h=e("+IXEhTRF");function m(t,r,c){for(var p=-1,n=t.length;++p{function y(e,h){return e>h}C.exports=y},ePT4VtO3:(C,y,e)=>{var h=e("OQB6cBJJ"),m=e("9yx8Nmpk"),t=Array.prototype,r=t.splice;function c(p,n){for(var u=p?n.length:0,f=u-1;u--;){var g=n[u];if(u==f||g!==a){var a=g;m(g)?r.call(p,g,1):h(p,g)}}return p}C.exports=c},ZoCQyFC1:(C,y,e)=>{var h=e("WmH2Flia"),m=e("MKVJGHmO"),t=e("Q7kjz6zH");function r(c){return c&&c.length?h(c,t,m):void 0}C.exports=r},Jb16h681:(C,y,e)=>{var h=e("JF7TaIvC"),m=e("ePT4VtO3");function t(r,c){var p=[];if(!(r&&r.length))return p;var n=-1,u=[],f=r.length;for(c=h(c,3);++n
© 2015 - 2024 Weber Informatics LLC | Privacy Policy