Commit f696d9fde29739dcf3c9cbaa065a92ba38a9038b

Authored by Igor Kulikov
1 parent 6a54d4dc

Fix rule node config UI

1   -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@ngx-translate/core"),require("@shared/public-api"),require("@ngrx/store"),require("@angular/forms"),require("@core/public-api"),require("@angular/cdk/keycodes"),require("@home/components/public-api"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("rulenode-core-config",["exports","@angular/core","@angular/common","@ngx-translate/core","@shared/public-api","@ngrx/store","@angular/forms","@core/public-api","@angular/cdk/keycodes","@home/components/public-api","@angular/cdk/coercion","rxjs","rxjs/operators"],t):t((e=e||self)["rulenode-core-config"]={},e.ng.core,e.ng.common,e["ngx-translate"],e.shared,e["ngrx-store"],e.ng.forms,e.core,e.ng.cdk.keycodes,e.publicApi$2,e.ng.cdk.coercion,e.rxjs,e.rxjs.operators)}(this,(function(e,t,r,n,a,o,i,l,s,m,u,d,p){"use strict";
  1 +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@ngx-translate/core"),require("@shared/public-api"),require("@ngrx/store"),require("@angular/forms"),require("@core/public-api"),require("@angular/cdk/keycodes"),require("@home/components/public-api"),require("@angular/cdk/coercion"),require("@angular/material/chips"),require("@angular/material/autocomplete"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("rulenode-core-config",["exports","@angular/core","@angular/common","@ngx-translate/core","@shared/public-api","@ngrx/store","@angular/forms","@core/public-api","@angular/cdk/keycodes","@home/components/public-api","@angular/cdk/coercion","@angular/material/chips","@angular/material/autocomplete","rxjs","rxjs/operators"],t):t((e=e||self)["rulenode-core-config"]={},e.ng.core,e.ng.common,e["ngx-translate"],e.shared,e["ngrx-store"],e.ng.forms,e.core,e.ng.cdk.keycodes,e.publicApi$2,e.ng.cdk.coercion,e.ng.material.chips,e.ng.material.autocomplete,e.rxjs,e.rxjs.operators)}(this,(function(e,t,r,n,a,o,i,l,s,m,u,d,p,c,f){"use strict";
2 2 /*! *****************************************************************************
3 3 Copyright (c) Microsoft Corporation.
4 4
... ... @@ -12,6 +12,5 @@
12 12 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 13 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 14 PERFORMANCE OF THIS SOFTWARE.
15   - ***************************************************************************** */
16   -var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function f(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;function g(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var y=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.emptyConfigForm},t.prototype.onConfigurationSet=function(e){this.emptyConfigForm=this.fb.group({})},t}(a.RuleNodeConfigurationComponent);y.decorators=[{type:t.Component,args:[{selector:"tb-node-empty-config",template:"<div></div>"}]}],y.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var b=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.attributeScopes=Object.keys(a.AttributeScope),n.telemetryTypeTranslationsMap=a.telemetryTypeTranslations,n}return f(t,e),t.prototype.configForm=function(){return this.attributesConfigForm},t.prototype.onConfigurationSet=function(e){this.attributesConfigForm=this.fb.group({scope:[e?e.scope:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);b.decorators=[{type:t.Component,args:[{selector:"tb-action-node-attributes-config",template:'<section [formGroup]="attributesConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>attribute.attributes-scope</mat-label>\n <mat-select formControlName="scope" required>\n <mat-option *ngFor="let scope of attributeScopes" [value]="scope">\n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</section>\n'}]}],b.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var h=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.timeseriesConfigForm},t.prototype.onConfigurationSet=function(e){this.timeseriesConfigForm=this.fb.group({defaultTTL:[e?e.defaultTTL:null,[i.Validators.required,i.Validators.min(0)]]})},t}(a.RuleNodeConfigurationComponent);h.decorators=[{type:t.Component,args:[{selector:"tb-action-node-timeseries-config",template:'<section [formGroup]="timeseriesConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.default-ttl</mat-label>\n <input type="number" min="0" step="1" matInput formControlName="defaultTTL" required>\n <mat-error *ngIf="timeseriesConfigForm.get(\'defaultTTL\').hasError(\'required\')">\n {{ \'tb.rulenode.default-ttl-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="timeseriesConfigForm.get(\'defaultTTL\').hasError(\'min\')">\n {{ \'tb.rulenode.min-default-ttl-message\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],h.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var C=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.rpcRequestConfigForm},t.prototype.onConfigurationSet=function(e){this.rpcRequestConfigForm=this.fb.group({timeoutInSeconds:[e?e.timeoutInSeconds:null,[i.Validators.required,i.Validators.min(0)]]})},t}(a.RuleNodeConfigurationComponent);C.decorators=[{type:t.Component,args:[{selector:"tb-action-node-rpc-request-config",template:'<section [formGroup]="rpcRequestConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.timeout-sec</mat-label>\n <input type="number" min="0" step="1" matInput formControlName="timeoutInSeconds" required>\n <mat-error *ngIf="rpcRequestConfigForm.get(\'timeoutInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="rpcRequestConfigForm.get(\'timeoutInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-timeout-message\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],C.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var v=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.logConfigForm},t.prototype.onConfigurationSet=function(e){this.logConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},t.prototype.testScript=function(){var e=this,t=this.logConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"string",this.translate.instant("tb.rulenode.to-string"),"ToString",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.logConfigForm.get("jsScript").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);v.decorators=[{type:t.Component,args:[{selector:"tb-action-node-log-config",template:'<section [formGroup]="logConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.to-string</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="ToString"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-to-string-function\' | translate }}\n </button>\n </div>\n</section>\n'}]}],v.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},v.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var F=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.assignCustomerConfigForm},t.prototype.onConfigurationSet=function(e){this.assignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required]],createCustomerIfNotExists:[!!e&&e.createCustomerIfNotExists,[]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},t}(a.RuleNodeConfigurationComponent);F.decorators=[{type:t.Component,args:[{selector:"tb-action-node-assign-to-customer-config",template:'<section [formGroup]="assignCustomerConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-name-pattern</mat-label>\n <input required matInput formControlName="customerNamePattern">\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="createCustomerIfNotExists" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.create-customer-if-not-exists\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="customerCacheExpiration">\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.customer-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],F.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var x=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.clearAlarmConfigForm},t.prototype.onConfigurationSet=function(e){this.clearAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],alarmType:[e?e.alarmType:null,[i.Validators.required]]})},t.prototype.testScript=function(){var e=this,t=this.clearAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.clearAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);x.decorators=[{type:t.Component,args:[{selector:"tb-action-node-clear-alarm-config",template:'<section [formGroup]="clearAlarmConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.alarm-details-builder</label>\n <tb-js-func #jsFuncComponent\n formControlName="alarmDetailsBuildJs"\n functionName="Details"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-details-function\' | translate }}\n </button>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.alarm-type</mat-label>\n <input required matInput formControlName="alarmType">\n <mat-error *ngIf="clearAlarmConfigForm.get(\'alarmType\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-type-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],x.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},x.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var T=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i.store=t,i.fb=r,i.nodeScriptTestService=n,i.translate=o,i.alarmSeverities=Object.keys(a.AlarmSeverity),i.alarmSeverityTranslationMap=a.alarmSeverityTranslations,i.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],i}return f(t,e),t.prototype.configForm=function(){return this.createAlarmConfigForm},t.prototype.onConfigurationSet=function(e){this.createAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],useMessageAlarmData:[!!e&&e.useMessageAlarmData,[]],alarmType:[e?e.alarmType:null,[]],severity:[e?e.severity:null,[]],propagate:[!!e&&e.propagate,[]],relationTypes:[e?e.relationTypes:null,[]]})},t.prototype.validatorTriggers=function(){return["useMessageAlarmData"]},t.prototype.updateValidators=function(e){this.createAlarmConfigForm.get("useMessageAlarmData").value?(this.createAlarmConfigForm.get("alarmType").setValidators([]),this.createAlarmConfigForm.get("severity").setValidators([])):(this.createAlarmConfigForm.get("alarmType").setValidators([i.Validators.required]),this.createAlarmConfigForm.get("severity").setValidators([i.Validators.required])),this.createAlarmConfigForm.get("alarmType").updateValueAndValidity({emitEvent:e}),this.createAlarmConfigForm.get("severity").updateValueAndValidity({emitEvent:e})},t.prototype.testScript=function(){var e=this,t=this.createAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.createAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},t.prototype.removeKey=function(e,t){var r=this.createAlarmConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.createAlarmConfigForm.get(t).setValue(r,{emitEvent:!0}))},t.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.createAlarmConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.createAlarmConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);T.decorators=[{type:t.Component,args:[{selector:"tb-action-node-create-alarm-config",template:'<section [formGroup]="createAlarmConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.alarm-details-builder</label>\n <tb-js-func #jsFuncComponent\n formControlName="alarmDetailsBuildJs"\n functionName="Details"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-details-function\' | translate }}\n </button>\n </div>\n <mat-checkbox formControlName="useMessageAlarmData" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-message-alarm-data\' | translate }}\n </mat-checkbox>\n <section fxLayout="column" *ngIf="createAlarmConfigForm.get(\'useMessageAlarmData\').value === false">\n <section fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.alarm-type</mat-label>\n <input required matInput formControlName="alarmType">\n <mat-error *ngIf="createAlarmConfigForm.get(\'alarmType\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-type-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.alarm-severity</mat-label>\n <mat-select formControlName="severity" required>\n <mat-option *ngFor="let severity of alarmSeverities" [value]="severity">\n {{ alarmSeverityTranslationMap.get(severity) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="createAlarmConfigForm.get(\'severity\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-severity-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </section>\n <mat-checkbox formControlName="propagate" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.propagate\' | translate }}\n </mat-checkbox>\n <section *ngIf="createAlarmConfigForm.get(\'propagate\').value === true">\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.relation-types-list</mat-label>\n <mat-chip-list #relationTypesChipList>\n <mat-chip\n *ngFor="let key of createAlarmConfigForm.get(\'relationTypes\').value;"\n (removed)="removeKey(key, \'relationTypes\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.relation-types-list\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="relationTypesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'relationTypes\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-types-list-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </section>\n </section>\n</section>\n'}]}],T.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},T.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var q=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return f(t,e),t.prototype.configForm=function(){return this.createRelationConfigForm},t.prototype.onConfigurationSet=function(e){this.createRelationConfigForm=this.fb.group({direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[i.Validators.required]],entityNamePattern:[e?e.entityNamePattern:null,[]],entityTypePattern:[e?e.entityTypePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],createEntityIfNotExists:[!!e&&e.createEntityIfNotExists,[]],removeCurrentRelations:[!!e&&e.removeCurrentRelations,[]],changeOriginatorToRelatedEntity:[!!e&&e.changeOriginatorToRelatedEntity,[]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},t.prototype.validatorTriggers=function(){return["entityType"]},t.prototype.updateValidators=function(e){var t=this.createRelationConfigForm.get("entityType").value;t?this.createRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required]):this.createRelationConfigForm.get("entityNamePattern").setValidators([]),!t||t!==a.EntityType.DEVICE&&t!==a.EntityType.ASSET?this.createRelationConfigForm.get("entityTypePattern").setValidators([]):this.createRelationConfigForm.get("entityTypePattern").setValidators([i.Validators.required]),this.createRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e}),this.createRelationConfigForm.get("entityTypePattern").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);q.decorators=[{type:t.Component,args:[{selector:"tb-action-node-create-relation-config",template:'<section [formGroup]="createRelationConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout="row" fxLayoutGap="8px">\n <tb-entity-type-select\n showLabel\n style="min-width: 100px;"\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <mat-form-field *ngIf="createRelationConfigForm.get(\'entityType\').value" fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-name-pattern</mat-label>\n <input required matInput formControlName="entityNamePattern">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field *ngIf="createRelationConfigForm.get(\'entityType\').value === entityType.DEVICE ||\n createRelationConfigForm.get(\'entityType\').value === entityType.ASSET"\n fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-type-pattern</mat-label>\n <input required matInput formControlName="entityTypePattern">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityTypePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.relation-type-pattern</mat-label>\n <input required matInput formControlName="relationType">\n <mat-error *ngIf="createRelationConfigForm.get(\'relationType\').hasError(\'required\')">\n {{ \'tb.rulenode.relation-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <section *ngIf="createRelationConfigForm.get(\'entityType\').value === entityType.CUSTOMER ||\n createRelationConfigForm.get(\'entityType\').value === entityType.DEVICE ||\n createRelationConfigForm.get(\'entityType\').value === entityType.ASSET">\n <mat-checkbox formControlName="createEntityIfNotExists">\n {{ \'tb.rulenode.create-entity-if-not-exists\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.create-entity-if-not-exists-hint</div>\n </section>\n <mat-checkbox formControlName="removeCurrentRelations">\n {{ \'tb.rulenode.remove-current-relations\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.remove-current-relations-hint</div>\n <mat-checkbox formControlName="changeOriginatorToRelatedEntity">\n {{ \'tb.rulenode.change-originator-to-related-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.change-originator-to-related-entity-hint</div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.entity-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="entityCacheExpiration">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="createRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.entity-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],q.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var I=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.msgDelayConfigForm},t.prototype.onConfigurationSet=function(e){this.msgDelayConfigForm=this.fb.group({useMetadataPeriodInSecondsPatterns:[!!e&&e.useMetadataPeriodInSecondsPatterns,[]],periodInSeconds:[e?e.periodInSeconds:null,[]],periodInSecondsPattern:[e?e.periodInSecondsPattern:null,[]],maxPendingMsgs:[e?e.maxPendingMsgs:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(1e5)]]})},t.prototype.validatorTriggers=function(){return["useMetadataPeriodInSecondsPatterns"]},t.prototype.updateValidators=function(e){this.msgDelayConfigForm.get("useMetadataPeriodInSecondsPatterns").value?(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([i.Validators.required]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([])):(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([i.Validators.required,i.Validators.min(0)])),this.msgDelayConfigForm.get("periodInSecondsPattern").updateValueAndValidity({emitEvent:e}),this.msgDelayConfigForm.get("periodInSeconds").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);I.decorators=[{type:t.Component,args:[{selector:"tb-action-node-msg-delay-config",template:'<section [formGroup]="msgDelayConfigForm" fxLayout="column">\n <mat-checkbox formControlName="useMetadataPeriodInSecondsPatterns">\n {{ \'tb.rulenode.use-metadata-period-in-seconds-patterns\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.use-metadata-period-in-seconds-patterns-hint</div>\n <mat-form-field *ngIf="msgDelayConfigForm.get(\'useMetadataPeriodInSecondsPatterns\').value !== true; else periodInSecondsPattern"\n class="mat-block">\n <mat-label translate>tb.rulenode.period-seconds</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="periodInSeconds">\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.period-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-period-0-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <ng-template #periodInSecondsPattern>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.period-in-seconds-pattern</mat-label>\n <input required matInput formControlName="periodInSecondsPattern">\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSecondsPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.period-in-seconds-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.period-in-seconds-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </ng-template>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.max-pending-messages</mat-label>\n <input required type="number" min="1" max="100000" step="1" matInput formControlName="maxPendingMsgs">\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'required\')">\n {{ \'tb.rulenode.max-pending-messages-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'min\')">\n {{ \'tb.rulenode.max-pending-messages-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'max\')">\n {{ \'tb.rulenode.max-pending-messages-range\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],I.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var S=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return f(t,e),t.prototype.configForm=function(){return this.deleteRelationConfigForm},t.prototype.onConfigurationSet=function(e){this.deleteRelationConfigForm=this.fb.group({deleteForSingleEntity:[!!e&&e.deleteForSingleEntity,[]],direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[]],entityNamePattern:[e?e.entityNamePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},t.prototype.validatorTriggers=function(){return["deleteForSingleEntity","entityType"]},t.prototype.updateValidators=function(e){var t=this.deleteRelationConfigForm.get("deleteForSingleEntity").value,r=this.deleteRelationConfigForm.get("entityType").value;t?this.deleteRelationConfigForm.get("entityType").setValidators([i.Validators.required]):this.deleteRelationConfigForm.get("entityType").setValidators([]),t&&r?this.deleteRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required]):this.deleteRelationConfigForm.get("entityNamePattern").setValidators([]),this.deleteRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:!1}),this.deleteRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);S.decorators=[{type:t.Component,args:[{selector:"tb-action-node-delete-relation-config",template:'<section [formGroup]="deleteRelationConfigForm" fxLayout="column">\n <mat-checkbox formControlName="deleteForSingleEntity">\n {{ \'tb.rulenode.delete-relation-to-specific-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.delete-relation-hint</div>\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div *ngIf="deleteRelationConfigForm.get(\'deleteForSingleEntity\').value" fxLayout="row" fxLayoutGap="8px">\n <tb-entity-type-select\n showLabel\n style="min-width: 100px;"\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <mat-form-field *ngIf="deleteRelationConfigForm.get(\'entityType\').value" fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-name-pattern</mat-label>\n <input required matInput formControlName="entityNamePattern">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.relation-type-pattern</mat-label>\n <input required matInput formControlName="relationType">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'relationType\').hasError(\'required\')">\n {{ \'tb.rulenode.relation-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.entity-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="entityCacheExpiration">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.entity-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],S.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var k,N=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.generatorConfigForm},t.prototype.onConfigurationSet=function(e){this.generatorConfigForm=this.fb.group({msgCount:[e?e.msgCount:null,[i.Validators.required,i.Validators.min(0)]],periodInSeconds:[e?e.periodInSeconds:null,[i.Validators.required,i.Validators.min(1)]],originator:[e?e.originator:null,[]],jsScript:[e?e.jsScript:null,[i.Validators.required]]})},t.prototype.prepareInputConfig=function(e){return e&&(e.originatorId&&e.originatorType?e.originator={id:e.originatorId,entityType:e.originatorType}:e.originator=null,delete e.originatorId,delete e.originatorType),e},t.prototype.prepareOutputConfig=function(e){return e.originator?(e.originatorId=e.originator.id,e.originatorType=e.originator.entityType):(e.originatorId=null,e.originatorType=null),delete e.originator,e},t.prototype.testScript=function(){var e=this,t=this.generatorConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"generate",this.translate.instant("tb.rulenode.generator"),"Generate",["prevMsg","prevMetadata","prevMsgType"],this.ruleNodeId).subscribe((function(t){t&&e.generatorConfigForm.get("jsScript").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);N.decorators=[{type:t.Component,args:[{selector:"tb-action-node-generator-config",template:'<section [formGroup]="generatorConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.message-count</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="msgCount">\n <mat-error *ngIf="generatorConfigForm.get(\'msgCount\').hasError(\'required\')">\n {{ \'tb.rulenode.message-count-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="generatorConfigForm.get(\'msgCount\').hasError(\'min\')">\n {{ \'tb.rulenode.min-message-count-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.period-seconds</mat-label>\n <input required type="number" min="1" step="1" matInput formControlName="periodInSeconds">\n <mat-error *ngIf="generatorConfigForm.get(\'periodInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.period-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="generatorConfigForm.get(\'periodInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-period-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <div fxLayout="column">\n <label class="tb-small">{{ \'tb.rulenode.originator\' | translate }}</label>\n <tb-entity-select\n required="false"\n formControlName="originator">\n </tb-entity-select>\n </div>\n <label translate class="tb-title no-padding">tb.rulenode.generate</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Generate"\n [functionArgs]="[\'prevMsg\', \'prevMetadata\', \'prevMsgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-generator-function\' | translate }}\n </button>\n </div>\n</section>\n'}]}],N.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},N.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]},function(e){e.CUSTOMER="CUSTOMER",e.TENANT="TENANT",e.RELATED="RELATED",e.ALARM_ORIGINATOR="ALARM_ORIGINATOR"}(k||(k={}));var V,E=new Map([[k.CUSTOMER,"tb.rulenode.originator-customer"],[k.TENANT,"tb.rulenode.originator-tenant"],[k.RELATED,"tb.rulenode.originator-related"],[k.ALARM_ORIGINATOR,"tb.rulenode.originator-alarm-originator"]]);!function(e){e.CIRCLE="CIRCLE",e.POLYGON="POLYGON"}(V||(V={}));var A,L=new Map([[V.CIRCLE,"tb.rulenode.perimeter-circle"],[V.POLYGON,"tb.rulenode.perimeter-polygon"]]);!function(e){e.MILLISECONDS="MILLISECONDS",e.SECONDS="SECONDS",e.MINUTES="MINUTES",e.HOURS="HOURS",e.DAYS="DAYS"}(A||(A={}));var M,P=new Map([[A.MILLISECONDS,"tb.rulenode.time-unit-milliseconds"],[A.SECONDS,"tb.rulenode.time-unit-seconds"],[A.MINUTES,"tb.rulenode.time-unit-minutes"],[A.HOURS,"tb.rulenode.time-unit-hours"],[A.DAYS,"tb.rulenode.time-unit-days"]]);!function(e){e.METER="METER",e.KILOMETER="KILOMETER",e.FOOT="FOOT",e.MILE="MILE",e.NAUTICAL_MILE="NAUTICAL_MILE"}(M||(M={}));var w,R=new Map([[M.METER,"tb.rulenode.range-unit-meter"],[M.KILOMETER,"tb.rulenode.range-unit-kilometer"],[M.FOOT,"tb.rulenode.range-unit-foot"],[M.MILE,"tb.rulenode.range-unit-mile"],[M.NAUTICAL_MILE,"tb.rulenode.range-unit-nautical-mile"]]);!function(e){e.TITLE="TITLE",e.COUNTRY="COUNTRY",e.STATE="STATE",e.ZIP="ZIP",e.ADDRESS="ADDRESS",e.ADDRESS2="ADDRESS2",e.PHONE="PHONE",e.EMAIL="EMAIL",e.ADDITIONAL_INFO="ADDITIONAL_INFO"}(w||(w={}));var D,O,K,U=new Map([[w.TITLE,"tb.rulenode.entity-details-title"],[w.COUNTRY,"tb.rulenode.entity-details-country"],[w.STATE,"tb.rulenode.entity-details-state"],[w.ZIP,"tb.rulenode.entity-details-zip"],[w.ADDRESS,"tb.rulenode.entity-details-address"],[w.ADDRESS2,"tb.rulenode.entity-details-address2"],[w.PHONE,"tb.rulenode.entity-details-phone"],[w.EMAIL,"tb.rulenode.entity-details-email"],[w.ADDITIONAL_INFO,"tb.rulenode.entity-details-additional_info"]]);!function(e){e.FIRST="FIRST",e.LAST="LAST",e.ALL="ALL"}(D||(D={})),function(e){e.ASC="ASC",e.DESC="DESC"}(O||(O={})),function(e){e.STANDARD="STANDARD",e.FIFO="FIFO"}(K||(K={}));var j,H=new Map([[K.STANDARD,"tb.rulenode.sqs-queue-standard"],[K.FIFO,"tb.rulenode.sqs-queue-fifo"]]),G=["anonymous","basic","cert.PEM"],B=new Map([["anonymous","tb.rulenode.credentials-anonymous"],["basic","tb.rulenode.credentials-basic"],["cert.PEM","tb.rulenode.credentials-pem"]]),z=["sas","cert.PEM"],$=new Map([["sas","tb.rulenode.credentials-sas"],["cert.PEM","tb.rulenode.credentials-pem"]]);!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(j||(j={}));var Q=["US-ASCII","ISO-8859-1","UTF-8","UTF-16BE","UTF-16LE","UTF-16"],_=new Map([["US-ASCII","tb.rulenode.charset-us-ascii"],["ISO-8859-1","tb.rulenode.charset-iso-8859-1"],["UTF-8","tb.rulenode.charset-utf-8"],["UTF-16BE","tb.rulenode.charset-utf-16be"],["UTF-16LE","tb.rulenode.charset-utf-16le"],["UTF-16","tb.rulenode.charset-utf-16"]]),W=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=V,n.perimeterTypes=Object.keys(V),n.perimeterTypeTranslationMap=L,n.rangeUnits=Object.keys(M),n.rangeUnitTranslationMap=R,n.timeUnits=Object.keys(A),n.timeUnitsTranslationMap=P,n}return f(t,e),t.prototype.configForm=function(){return this.geoActionConfigForm},t.prototype.onConfigurationSet=function(e){this.geoActionConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]],minInsideDuration:[e?e.minInsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minInsideDurationTimeUnit:[e?e.minInsideDurationTimeUnit:null,[i.Validators.required]],minOutsideDuration:[e?e.minOutsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minOutsideDurationTimeUnit:[e?e.minOutsideDurationTimeUnit:null,[i.Validators.required]]})},t.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},t.prototype.updateValidators=function(e){var t=this.geoActionConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoActionConfigForm.get("perimeterType").value;t?this.geoActionConfigForm.get("perimeterType").setValidators([]):this.geoActionConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==V.CIRCLE?(this.geoActionConfigForm.get("centerLatitude").setValidators([]),this.geoActionConfigForm.get("centerLongitude").setValidators([]),this.geoActionConfigForm.get("range").setValidators([]),this.geoActionConfigForm.get("rangeUnit").setValidators([])):(this.geoActionConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoActionConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoActionConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoActionConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==V.POLYGON?this.geoActionConfigForm.get("polygonsDefinition").setValidators([]):this.geoActionConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoActionConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoActionConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);W.decorators=[{type:t.Component,args:[{selector:"tb-action-node-gps-geofencing-config",template:'<section [formGroup]="geoActionConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.latitude-key-name</mat-label>\n <input matInput formControlName="latitudeKeyName" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'latitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.latitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.longitude-key-name</mat-label>\n <input matInput formControlName="longitudeKeyName" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'longitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.longitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="fetchPerimeterInfoFromMessageMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.fetch-perimeter-info-from-message-metadata\' | translate }}\n </mat-checkbox>\n <div fxLayout="row" *ngIf="!geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.perimeter-type</mat-label>\n <mat-select formControlName="perimeterType" required>\n <mat-option *ngFor="let type of perimeterTypes" [value]="type">\n {{ perimeterTypeTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column"\n *ngIf="geoActionConfigForm.get(\'perimeterType\').value === perimeterType.CIRCLE &&\n !geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-latitude</mat-label>\n <input type="number" min="-90" max="90" step="0.1" matInput formControlName="centerLatitude" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'centerLatitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-latitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-longitude</mat-label>\n <input type="number" min="-180" max="180" step="0.1" matInput formControlName="centerLongitude" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'centerLongitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-longitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range</mat-label>\n <input type="number" min="0" step="0.1" matInput formControlName="range" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'range\').hasError(\'required\')">\n {{ \'tb.rulenode.range-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range-units</mat-label>\n <mat-select formControlName="rangeUnit" required>\n <mat-option *ngFor="let type of rangeUnits" [value]="type">\n {{ rangeUnitTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout="column" *ngIf="geoActionConfigForm.get(\'perimeterType\').value === perimeterType.POLYGON &&\n !geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field class="mat-block" hintLabel="{{\'tb.rulenode.polygon-definition-hint\' | translate}}" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.polygon-definition</mat-label>\n <input matInput formControlName="polygonsDefinition" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'polygonsDefinition\').hasError(\'required\')">\n {{ \'tb.rulenode.polygon-definition-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-inside-duration</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="minInsideDuration" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'required\')">\n {{ \'tb.rulenode.min-inside-duration-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-inside-duration-time-unit</mat-label>\n <mat-select formControlName="minInsideDurationTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-outside-duration</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="minOutsideDuration" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'required\')">\n {{ \'tb.rulenode.min-outside-duration-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-outside-duration-time-unit</mat-label>\n <mat-select formControlName="minOutsideDurationTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n</section>\n'}]}],W.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Y=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.msgCountConfigForm},t.prototype.onConfigurationSet=function(e){this.msgCountConfigForm=this.fb.group({interval:[e?e.interval:null,[i.Validators.required,i.Validators.min(1)]],telemetryPrefix:[e?e.telemetryPrefix:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Y.decorators=[{type:t.Component,args:[{selector:"tb-action-node-msg-count-config",template:'<section [formGroup]="msgCountConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.interval-seconds</mat-label>\n <input required type="number" min="1" step="1" matInput formControlName="interval">\n <mat-error *ngIf="msgCountConfigForm.get(\'interval\').hasError(\'required\')">\n {{ \'tb.rulenode.interval-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgCountConfigForm.get(\'interval\').hasError(\'min\')">\n {{ \'tb.rulenode.min-interval-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.output-timeseries-key-prefix</mat-label>\n <input required matInput formControlName="telemetryPrefix">\n <mat-error *ngIf="msgCountConfigForm.get(\'telemetryPrefix\').hasError(\'required\')">\n {{ \'tb.rulenode.output-timeseries-key-prefix-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],Y.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var J=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.rpcReplyConfigForm},t.prototype.onConfigurationSet=function(e){this.rpcReplyConfigForm=this.fb.group({requestIdMetaDataAttribute:[e?e.requestIdMetaDataAttribute:null,[]]})},t}(a.RuleNodeConfigurationComponent);J.decorators=[{type:t.Component,args:[{selector:"tb-action-node-rpc-reply-config",template:'<section [formGroup]="rpcReplyConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.request-id-metadata-attribute</mat-label>\n <input matInput formControlName="requestIdMetaDataAttribute">\n </mat-form-field>\n</section>\n'}]}],J.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Z=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.saveToCustomTableConfigForm},t.prototype.onConfigurationSet=function(e){this.saveToCustomTableConfigForm=this.fb.group({tableName:[e?e.tableName:null,[i.Validators.required]],fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Z.decorators=[{type:t.Component,args:[{selector:"tb-action-node-custom-table-config",template:'<section [formGroup]="saveToCustomTableConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.custom-table-name</mat-label>\n <input required matInput formControlName="tableName">\n <mat-error *ngIf="saveToCustomTableConfigForm.get(\'tableName\').hasError(\'required\')">\n {{ \'tb.rulenode.custom-table-name-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.custom-table-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title tb-required">tb.rulenode.fields-mapping</label>\n <tb-kv-map-config\n required\n formControlName="fieldsMapping"\n requiredText="tb.rulenode.fields-mapping-required"\n keyText="tb.rulenode.message-field"\n keyRequiredText="tb.rulenode.message-field-required"\n valText="tb.rulenode.table-col"\n valRequiredText="tb.rulenode.table-col-required">\n </tb-kv-map-config>\n</section>\n'}]}],Z.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var X=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.translate=r,o.injector=n,o.fb=a,o.propagateChange=null,o.valueChangeSubscription=null,o}return f(t,e),Object.defineProperty(t.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.ngControl=this.injector.get(i.NgControl),null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.kvListFormGroup=this.fb.group({}),this.kvListFormGroup.addControl("keyVals",this.fb.array([]))},t.prototype.keyValsFormArray=function(){return this.kvListFormGroup.get("keyVals")},t.prototype.registerOnChange=function(e){this.propagateChange=e},t.prototype.registerOnTouched=function(e){},t.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.kvListFormGroup.disable({emitEvent:!1}):this.kvListFormGroup.enable({emitEvent:!1})},t.prototype.writeValue=function(e){var t,r,n=this;this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe();var a=[];if(e)try{for(var o=g(Object.keys(e)),l=o.next();!l.done;l=o.next()){var s=l.value;Object.prototype.hasOwnProperty.call(e,s)&&a.push(this.fb.group({key:[s,[i.Validators.required]],value:[e[s],[i.Validators.required]]}))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.kvListFormGroup.setControl("keyVals",this.fb.array(a)),this.valueChangeSubscription=this.kvListFormGroup.valueChanges.subscribe((function(){n.updateModel()}))},t.prototype.removeKeyVal=function(e){this.kvListFormGroup.get("keyVals").removeAt(e)},t.prototype.addKeyVal=function(){this.kvListFormGroup.get("keyVals").push(this.fb.group({key:["",[i.Validators.required]],value:["",[i.Validators.required]]}))},t.prototype.validate=function(e){return!this.kvListFormGroup.get("keyVals").value.length&&this.required?{kvMapRequired:!0}:this.kvListFormGroup.valid?null:{kvFieldsRequired:!0}},t.prototype.updateModel=function(){var e=this.kvListFormGroup.get("keyVals").value;if(this.required&&!e.length||!this.kvListFormGroup.valid)this.propagateChange(null);else{var t={};e.forEach((function(e){t[e.key]=e.value})),this.propagateChange(t)}},t}(a.PageComponent);X.decorators=[{type:t.Component,args:[{selector:"tb-kv-map-config",template:'<section fxLayout="column" class="tb-kv-map-config" [formGroup]="kvListFormGroup">\n <div class="header" fxFlex fxLayout="row" fxLayoutGap="8px">\n <span class="cell" fxFlex translate>{{ keyText }}</span>\n <span class="cell" fxFlex translate>{{ valText }}</span>\n <span [fxShow]="!disabled" style="width: 52px;" innerHTML="&nbsp"></span>\n </div>\n <div class="body">\n <div class="row" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"\n formArrayName="keyVals"\n *ngFor="let keyValControl of keyValsFormArray().controls; let $index = index">\n <mat-form-field fxFlex floatLabel="always" hideRequiredMarker class="cell mat-block">\n <mat-label></mat-label>\n <input [formControl]="keyValControl.get(\'key\')" matInput required\n placeholder="{{ keyText | translate }}"/>\n <mat-error *ngIf="keyValControl.get(\'key\').hasError(\'required\')">\n {{ keyRequiredText | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" hideRequiredMarker class="cell mat-block">\n <mat-label></mat-label>\n <input [formControl]="keyValControl.get(\'value\')" matInput required\n placeholder="{{ valText | translate }}"/>\n <mat-error *ngIf="keyValControl.get(\'value\').hasError(\'required\')">\n {{ valRequiredText | translate }}\n </mat-error>\n </mat-form-field>\n <button mat-button mat-icon-button color="primary"\n [fxShow]="!disabled"\n type="button"\n (click)="removeKeyVal($index)"\n [disabled]="isLoading$ | async"\n matTooltip="{{ \'tb.key-val.remove-entry\' | translate }}"\n matTooltipPosition="above">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n <tb-error [error]="ngControl.hasError(\'kvMapRequired\')\n ? translate.instant(requiredText) : \'\'"></tb-error>\n <div style="margin-top: 8px;">\n <button mat-button mat-raised-button color="primary"\n [fxShow]="!disabled"\n [disabled]="isLoading$ | async"\n (click)="addKeyVal()"\n type="button"\n matTooltip="{{ \'tb.key-val.add-entry\' | translate }}"\n matTooltipPosition="above">\n <mat-icon>add</mat-icon>\n {{ \'action.add\' | translate }}\n </button>\n </div>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return X})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return X})),multi:!0}],styles:[":host .tb-kv-map-config{margin-bottom:16px}:host .tb-kv-map-config .header{padding-bottom:5px;padding-left:5px;padding-right:5px}:host .tb-kv-map-config .header .cell{color:rgba(0,0,0,.54);font-size:12px;font-weight:700;padding-left:5px;padding-right:5px;white-space:nowrap}:host .tb-kv-map-config .body{max-height:300px;overflow:auto;padding-bottom:20px;padding-left:5px;padding-right:5px}:host .tb-kv-map-config .body .row{max-height:40px;padding-top:5px}:host .tb-kv-map-config .body .cell{padding-left:5px;padding-right:5px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell{margin:0;max-height:40px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell .mat-form-field-infix{border-top:0}:host ::ng-deep .tb-kv-map-config .body button.mat-button{margin:0}"]}]}],X.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:t.Injector},{type:i.FormBuilder}]},X.propDecorators={disabled:[{type:t.Input}],requiredText:[{type:t.Input}],keyText:[{type:t.Input}],keyRequiredText:[{type:t.Input}],valText:[{type:t.Input}],valRequiredText:[{type:t.Input}],required:[{type:t.Input}]};var ee=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n.propagateChange=null,n}return f(t,e),Object.defineProperty(t.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var e=this;this.deviceRelationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],relationType:[null],deviceTypes:[null,[i.Validators.required]]}),this.deviceRelationsQueryFormGroup.valueChanges.subscribe((function(t){e.deviceRelationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},t.prototype.registerOnChange=function(e){this.propagateChange=e},t.prototype.registerOnTouched=function(e){},t.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.deviceRelationsQueryFormGroup.disable({emitEvent:!1}):this.deviceRelationsQueryFormGroup.enable({emitEvent:!1})},t.prototype.writeValue=function(e){this.deviceRelationsQueryFormGroup.reset(e,{emitEvent:!1})},t}(a.PageComponent);ee.decorators=[{type:t.Component,args:[{selector:"tb-device-relations-query-config",template:'<section fxLayout="column" [formGroup]="deviceRelationsQueryFormGroup">\n <mat-checkbox formControlName="fetchLastLevelOnly" style="padding-bottom: 16px;">\n {{ \'alias.last-level-relation\' | translate }}\n </mat-checkbox>\n <div fxLayoutGap="8px" fxLayout="row">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.max-relation-level</mat-label>\n <input matInput\n type="number"\n min="1"\n step="1"\n placeholder="{{ \'tb.rulenode.unlimited-level\' | translate }}"\n formControlName="maxLevel">\n </mat-form-field>\n </div>\n <div class="mat-caption" style="color: rgba(0,0,0,0.57);" translate>relation.relation-type</div>\n <tb-relation-type-autocomplete\n fxFlex\n formControlName="relationType">\n </tb-relation-type-autocomplete>\n <div class="mat-caption tb-required" style="color: rgba(0,0,0,0.57);" translate>device.device-types</div>\n <tb-entity-subtype-list\n required\n [entityType]="entityType.DEVICE"\n formControlName="deviceTypes">\n </tb-entity-subtype-list>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return ee})),multi:!0}]}]}],ee.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},ee.propDecorators={disabled:[{type:t.Input}],required:[{type:t.Input}]};var te=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.propagateChange=null,n}return f(t,e),Object.defineProperty(t.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var e=this;this.relationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],filters:[null]}),this.relationsQueryFormGroup.valueChanges.subscribe((function(t){e.relationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},t.prototype.registerOnChange=function(e){this.propagateChange=e},t.prototype.registerOnTouched=function(e){},t.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.relationsQueryFormGroup.disable({emitEvent:!1}):this.relationsQueryFormGroup.enable({emitEvent:!1})},t.prototype.writeValue=function(e){this.relationsQueryFormGroup.reset(e||{},{emitEvent:!1})},t}(a.PageComponent);te.decorators=[{type:t.Component,args:[{selector:"tb-relations-query-config",template:'<section fxLayout="column" [formGroup]="relationsQueryFormGroup">\n <mat-checkbox formControlName="fetchLastLevelOnly" style="padding-bottom: 16px;">\n {{ \'alias.last-level-relation\' | translate }}\n </mat-checkbox>\n <div fxLayoutGap="8px" fxLayout="row">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.max-relation-level</mat-label>\n <input matInput\n type="number"\n min="1"\n step="1"\n placeholder="{{ \'tb.rulenode.unlimited-level\' | translate }}"\n formControlName="maxLevel">\n </mat-form-field>\n </div>\n <div class="mat-caption" style="color: rgba(0,0,0,0.57);" translate>relation.relation-filters</div>\n <tb-relation-filters\n formControlName="filters"\n ></tb-relation-filters>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return te})),multi:!0}]}]}],te.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},te.propDecorators={disabled:[{type:t.Input}],required:[{type:t.Input}]};var re=function(e){function t(t,r,n,o){var i,l,m=e.call(this,t)||this;m.store=t,m.translate=r,m.truncate=n,m.fb=o,m.placeholder="tb.rulenode.message-type",m.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],m.messageTypes=[],m.messageTypesList=[],m.searchText="",m.propagateChange=function(e){},m.messageTypeConfigForm=m.fb.group({messageType:[null]});try{for(var u=g(Object.keys(a.MessageType)),d=u.next();!d.done;d=u.next()){var p=d.value;m.messageTypesList.push({name:a.messageTypeNames.get(a.MessageType[p]),value:p})}}catch(e){i={error:e}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(i)throw i.error}}return m}return f(t,e),Object.defineProperty(t.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),t.prototype.registerOnChange=function(e){this.propagateChange=e},t.prototype.registerOnTouched=function(e){},t.prototype.ngOnInit=function(){var e=this;this.filteredMessageTypes=this.messageTypeConfigForm.get("messageType").valueChanges.pipe(p.startWith(""),p.map((function(e){return e||""})),p.mergeMap((function(t){return e.fetchMessageTypes(t)})),p.share())},t.prototype.ngAfterViewInit=function(){},t.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.messageTypeConfigForm.disable({emitEvent:!1}):this.messageTypeConfigForm.enable({emitEvent:!1})},t.prototype.writeValue=function(e){var t=this;this.searchText="",this.messageTypes.length=0,e&&e.forEach((function(e){var r=t.messageTypesList.find((function(t){return t.value===e}));r?t.messageTypes.push({name:r.name,value:r.value}):t.messageTypes.push({name:e,value:e})}))},t.prototype.displayMessageTypeFn=function(e){return e?e.name:void 0},t.prototype.textIsNotEmpty=function(e){return!!(e&&null!=e&&e.length>0)},t.prototype.createMessageType=function(e,t){e.preventDefault(),this.transformMessageType(t)},t.prototype.add=function(e){this.transformMessageType(e.value)},t.prototype.fetchMessageTypes=function(e){if(this.searchText=e,this.searchText&&this.searchText.length){var t=this.searchText.toUpperCase();return d.of(this.messageTypesList.filter((function(e){return e.name.toUpperCase().includes(t)})))}return d.of(this.messageTypesList)},t.prototype.transformMessageType=function(e){if((e||"").trim()){var t=null,r=e.trim(),n=this.messageTypesList.find((function(e){return e.name===r}));(t=n?{name:n.name,value:n.value}:{name:r,value:r})&&this.addMessageType(t)}this.clear("")},t.prototype.remove=function(e){var t=this.messageTypes.indexOf(e);t>=0&&(this.messageTypes.splice(t,1),this.updateModel())},t.prototype.selected=function(e){this.addMessageType(e.option.value),this.clear("")},t.prototype.addMessageType=function(e){-1===this.messageTypes.findIndex((function(t){return t.value===e.value}))&&(this.messageTypes.push(e),this.updateModel())},t.prototype.onFocus=function(){this.messageTypeConfigForm.get("messageType").updateValueAndValidity({onlySelf:!0,emitEvent:!0})},t.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.messageTypeInput.nativeElement.value=e,this.messageTypeConfigForm.get("messageType").patchValue(null,{emitEvent:!0}),setTimeout((function(){t.messageTypeInput.nativeElement.blur(),t.messageTypeInput.nativeElement.focus()}),0)},t.prototype.updateModel=function(){var e=this.messageTypes.map((function(e){return e.value}));this.required?(this.chipList.errorState=!e.length,this.propagateChange(e.length>0?e:null)):(this.chipList.errorState=!1,this.propagateChange(e))},t}(a.PageComponent);re.decorators=[{type:t.Component,args:[{selector:"tb-message-types-config",template:'<mat-form-field [formGroup]="messageTypeConfigForm" style="width: 100%;">\n <mat-label *ngIf="label" translate>{{ label }}</mat-label>\n <mat-chip-list #chipList [required]="required">\n <mat-chip\n *ngFor="let messageType of messageTypes"\n [selectable]="true"\n [removable]="true"\n (removed)="remove(messageType)">\n {{messageType.name}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{ placeholder | translate }}"\n style="max-width: 200px;"\n #messageTypeInput\n (focusin)="onFocus()"\n formControlName="messageType"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="messageTypeAutocomplete"\n [matChipInputFor]="chipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="add($event)">\n </mat-chip-list>\n <mat-autocomplete #messageTypeAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="selected($event)"\n [displayWith]="displayMessageTypeFn">\n <mat-option *ngFor="let messageType of filteredMessageTypes | async" [value]="messageType">\n <span [innerHTML]="messageType.name | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredMessageTypes | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div *ngIf="!textIsNotEmpty(searchText); else searchNotEmpty">\n <span translate>tb.rulenode.no-message-types-found</span>\n </div>\n <ng-template #searchNotEmpty>\n <span>\n {{ translate.get(\'tb.rulenode.no-message-type-matching\',\n {messageType: truncate.transform(searchText, true, 6, &apos;...&apos;)}) | async }}\n </span>\n </ng-template>\n <span>\n <a translate (click)="createMessageType($event, searchText)">tb.rulenode.create-new-message-type</a>\n </span>\n </div>\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf="chipList.errorState">\n {{ \'tb.rulenode.message-types-required\' | translate }}\n </mat-error>\n</mat-form-field>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return re})),multi:!0}]}]}],re.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:a.TruncatePipe},{type:i.FormBuilder}]},re.propDecorators={required:[{type:t.Input}],label:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],chipList:[{type:t.ViewChild,args:["chipList",{static:!1}]}],matAutocomplete:[{type:t.ViewChild,args:["messageTypeAutocomplete",{static:!1}]}],messageTypeInput:[{type:t.ViewChild,args:["messageTypeInput",{static:!1}]}]};var ne=function(){};ne.decorators=[{type:t.NgModule,args:[{declarations:[X,ee,te,re],imports:[r.CommonModule,a.SharedModule,m.HomeComponentsModule],exports:[X,ee,te,re]}]}];var ae=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.unassignCustomerConfigForm},t.prototype.onConfigurationSet=function(e){this.unassignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},t}(a.RuleNodeConfigurationComponent);ae.decorators=[{type:t.Component,args:[{selector:"tb-action-node-un-assign-to-customer-config",template:'<section [formGroup]="unassignCustomerConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-name-pattern</mat-label>\n <input required matInput formControlName="customerNamePattern">\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="customerCacheExpiration">\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.customer-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],ae.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var oe=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.snsConfigForm},t.prototype.onConfigurationSet=function(e){this.snsConfigForm=this.fb.group({topicArnPattern:[e?e.topicArnPattern:null,[i.Validators.required]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);oe.decorators=[{type:t.Component,args:[{selector:"tb-action-node-sns-config",template:'<section [formGroup]="snsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic-arn-pattern</mat-label>\n <input required matInput formControlName="topicArnPattern">\n <mat-error *ngIf="snsConfigForm.get(\'topicArnPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-arn-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.topic-arn-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-access-key-id</mat-label>\n <input required matInput formControlName="accessKeyId">\n <mat-error *ngIf="snsConfigForm.get(\'accessKeyId\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-access-key-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-secret-access-key</mat-label>\n <input required matInput formControlName="secretAccessKey">\n <mat-error *ngIf="snsConfigForm.get(\'secretAccessKey\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-secret-access-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-region</mat-label>\n <input required matInput formControlName="region">\n <mat-error *ngIf="snsConfigForm.get(\'region\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-region-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],oe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var ie=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.sqsQueueType=K,n.sqsQueueTypes=Object.keys(K),n.sqsQueueTypeTranslationsMap=H,n}return f(t,e),t.prototype.configForm=function(){return this.sqsConfigForm},t.prototype.onConfigurationSet=function(e){this.sqsConfigForm=this.fb.group({queueType:[e?e.queueType:null,[i.Validators.required]],queueUrlPattern:[e?e.queueUrlPattern:null,[i.Validators.required]],delaySeconds:[e?e.delaySeconds:null,[i.Validators.min(0),i.Validators.max(900)]],messageAttributes:[e?e.messageAttributes:null,[]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);ie.decorators=[{type:t.Component,args:[{selector:"tb-action-node-sqs-config",template:'<section [formGroup]="sqsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.queue-type</mat-label>\n <mat-select formControlName="queueType" required>\n <mat-option *ngFor="let type of sqsQueueTypes" [value]="type">\n {{ sqsQueueTypeTranslationsMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.queue-url-pattern</mat-label>\n <input required matInput formControlName="queueUrlPattern">\n <mat-error *ngIf="sqsConfigForm.get(\'queueUrlPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.queue-url-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.queue-url-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field *ngIf="sqsConfigForm.get(\'queueType\').value === sqsQueueType.STANDARD" class="mat-block">\n <mat-label translate>tb.rulenode.delay-seconds</mat-label>\n <input required type="number" min="0" max="900" step="1" matInput formControlName="delaySeconds">\n <mat-error *ngIf="sqsConfigForm.get(\'delaySeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-delay-seconds-message\' | translate }}\n </mat-error>\n <mat-error *ngIf="sqsConfigForm.get(\'delaySeconds\').hasError(\'max\')">\n {{ \'tb.rulenode.max-delay-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.message-attributes</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.message-attributes-hint\' | translate}}}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="messageAttributes"\n keyText="tb.rulenode.name"\n keyRequiredText="tb.rulenode.name-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-access-key-id</mat-label>\n <input required matInput formControlName="accessKeyId">\n <mat-error *ngIf="sqsConfigForm.get(\'accessKeyId\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-access-key-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-secret-access-key</mat-label>\n <input required matInput formControlName="secretAccessKey">\n <mat-error *ngIf="sqsConfigForm.get(\'secretAccessKey\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-secret-access-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-region</mat-label>\n <input required matInput formControlName="region">\n <mat-error *ngIf="sqsConfigForm.get(\'region\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-region-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}]}],ie.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var le=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.pubSubConfigForm},t.prototype.onConfigurationSet=function(e){this.pubSubConfigForm=this.fb.group({projectId:[e?e.projectId:null,[i.Validators.required]],topicName:[e?e.topicName:null,[i.Validators.required]],serviceAccountKey:[e?e.serviceAccountKey:null,[i.Validators.required]],serviceAccountKeyFileName:[e?e.serviceAccountKeyFileName:null,[i.Validators.required]],messageAttributes:[e?e.messageAttributes:null,[]]})},t}(a.RuleNodeConfigurationComponent);le.decorators=[{type:t.Component,args:[{selector:"tb-action-node-pub-sub-config",template:'<section [formGroup]="pubSubConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.gcp-project-id</mat-label>\n <input required matInput formControlName="projectId">\n <mat-error *ngIf="pubSubConfigForm.get(\'projectId\').hasError(\'required\')">\n {{ \'tb.rulenode.gcp-project-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.pubsub-topic-name</mat-label>\n <input required matInput formControlName="topicName">\n <mat-error *ngIf="pubSubConfigForm.get(\'topicName\').hasError(\'required\')">\n {{ \'tb.rulenode.pubsub-topic-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <tb-file-input style="padding-bottom: 24px;"\n formControlName="serviceAccountKey"\n [existingFileName]="pubSubConfigForm.get(\'serviceAccountKeyFileName\').value"\n (fileNameChanged)="pubSubConfigForm.get(\'serviceAccountKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.gcp-service-account-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <label translate class="tb-title">tb.rulenode.message-attributes</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.message-attributes-hint\' | translate}}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="messageAttributes"\n keyText="tb.rulenode.name"\n keyRequiredText="tb.rulenode.name-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n</section>\n'}]}],le.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var se=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.ackValues=["all","-1","0","1"],n.ToByteStandartCharsetTypesValues=Q,n.ToByteStandartCharsetTypeTranslationMap=_,n}return f(t,e),t.prototype.configForm=function(){return this.kafkaConfigForm},t.prototype.onConfigurationSet=function(e){this.kafkaConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],bootstrapServers:[e?e.bootstrapServers:null,[i.Validators.required]],retries:[e?e.retries:null,[i.Validators.min(0)]],batchSize:[e?e.batchSize:null,[i.Validators.min(0)]],linger:[e?e.linger:null,[i.Validators.min(0)]],bufferMemory:[e?e.bufferMemory:null,[i.Validators.min(0)]],acks:[e?e.acks:null,[i.Validators.required]],keySerializer:[e?e.keySerializer:null,[i.Validators.required]],valueSerializer:[e?e.valueSerializer:null,[i.Validators.required]],otherProperties:[e?e.otherProperties:null,[]],addMetadataKeyValuesAsKafkaHeaders:[!!e&&e.addMetadataKeyValuesAsKafkaHeaders,[]],kafkaHeadersCharset:[e?e.kafkaHeadersCharset:null,[]]})},t.prototype.validatorTriggers=function(){return["addMetadataKeyValuesAsKafkaHeaders"]},t.prototype.updateValidators=function(e){this.kafkaConfigForm.get("addMetadataKeyValuesAsKafkaHeaders").value?this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([i.Validators.required]):this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([]),this.kafkaConfigForm.get("kafkaHeadersCharset").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);se.decorators=[{type:t.Component,args:[{selector:"tb-action-node-kafka-config",template:'<section [formGroup]="kafkaConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.topic-pattern</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="kafkaConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-pattern-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.bootstrap-servers</mat-label>\n <input required matInput formControlName="bootstrapServers">\n <mat-error *ngIf="kafkaConfigForm.get(\'bootstrapServers\').hasError(\'required\')">\n {{ \'tb.rulenode.bootstrap-servers-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.retries</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="retries">\n <mat-error *ngIf="kafkaConfigForm.get(\'retries\').hasError(\'min\')">\n {{ \'tb.rulenode.min-retries-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.batch-size-bytes</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="batchSize">\n <mat-error *ngIf="kafkaConfigForm.get(\'batchSize\').hasError(\'min\')">\n {{ \'tb.rulenode.min-batch-size-bytes-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.linger-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="linger">\n <mat-error *ngIf="kafkaConfigForm.get(\'linger\').hasError(\'min\')">\n {{ \'tb.rulenode.min-linger-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.buffer-memory-bytes</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="bufferMemory">\n <mat-error *ngIf="kafkaConfigForm.get(\'bufferMemory\').hasError(\'min\')">\n {{ \'tb.rulenode.min-buffer-memory-bytes-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.acks</mat-label>\n <mat-select formControlName="acks" required>\n <mat-option *ngFor="let ackValue of ackValues" [value]="ackValue">\n {{ ackValue }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.key-serializer</mat-label>\n <input required matInput formControlName="keySerializer">\n <mat-error *ngIf="kafkaConfigForm.get(\'keySerializer\').hasError(\'required\')">\n {{ \'tb.rulenode.key-serializer-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.value-serializer</mat-label>\n <input required matInput formControlName="valueSerializer">\n <mat-error *ngIf="kafkaConfigForm.get(\'valueSerializer\').hasError(\'required\')">\n {{ \'tb.rulenode.value-serializer-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.other-properties</label>\n <tb-kv-map-config\n required="false"\n formControlName="otherProperties"\n keyText="tb.rulenode.key"\n keyRequiredText="tb.rulenode.key-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-checkbox fxFlex formControlName="addMetadataKeyValuesAsKafkaHeaders" style="padding-top: 16px;">\n {{ \'tb.rulenode.add-metadata-key-values-as-kafka-headers\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.add-metadata-key-values-as-kafka-headers-hint</div>\n <mat-form-field fxFlex class="mat-block" *ngIf="kafkaConfigForm.get(\'addMetadataKeyValuesAsKafkaHeaders\').value">\n <mat-label translate>tb.rulenode.charset-encoding</mat-label>\n <mat-select formControlName="kafkaHeadersCharset" required>\n <mat-option *ngFor="let charset of ToByteStandartCharsetTypesValues" [value]="charset">\n {{ ToByteStandartCharsetTypeTranslationMap.get(charset) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</section>\n'}]}],se.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allMqttCredentialsTypes=G,n.mqttCredentialsTypeTranslationsMap=B,n}return f(t,e),t.prototype.configForm=function(){return this.mqttConfigForm},t.prototype.onConfigurationSet=function(e){this.mqttConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:this.fb.group({type:[e&&e.credentials?e.credentials.type:null,[i.Validators.required]],username:[e&&e.credentials?e.credentials.username:null,[]],password:[e&&e.credentials?e.credentials.password:null,[]],caCert:[e&&e.credentials?e.credentials.caCert:null,[]],caCertFileName:[e&&e.credentials?e.credentials.caCertFileName:null,[]],privateKey:[e&&e.credentials?e.credentials.privateKey:null,[]],privateKeyFileName:[e&&e.credentials?e.credentials.privateKeyFileName:null,[]],cert:[e&&e.credentials?e.credentials.cert:null,[]],certFileName:[e&&e.credentials?e.credentials.certFileName:null,[]]})})},t.prototype.prepareOutputConfig=function(e){var t=e.credentials.type;switch(t){case"anonymous":e.credentials={type:t};break;case"basic":e.credentials={type:t,username:e.credentials.username,password:e.credentials.password};break;case"cert.PEM":delete e.credentials.username}return e},t.prototype.validatorTriggers=function(){return["credentials.type"]},t.prototype.updateValidators=function(e){var t=this.mqttConfigForm.get("credentials"),r=t.get("type").value;switch(e&&t.reset({type:r},{emitEvent:!1}),t.get("username").setValidators([]),t.get("password").setValidators([]),t.get("caCert").setValidators([]),t.get("caCertFileName").setValidators([]),t.get("privateKey").setValidators([]),t.get("privateKeyFileName").setValidators([]),t.get("cert").setValidators([]),t.get("certFileName").setValidators([]),r){case"anonymous":break;case"basic":t.get("username").setValidators([i.Validators.required]),t.get("password").setValidators([i.Validators.required]);break;case"cert.PEM":t.get("caCert").setValidators([i.Validators.required]),t.get("caCertFileName").setValidators([i.Validators.required]),t.get("privateKey").setValidators([i.Validators.required]),t.get("privateKeyFileName").setValidators([i.Validators.required]),t.get("cert").setValidators([i.Validators.required]),t.get("certFileName").setValidators([i.Validators.required])}t.get("username").updateValueAndValidity({emitEvent:e}),t.get("password").updateValueAndValidity({emitEvent:e}),t.get("caCert").updateValueAndValidity({emitEvent:e}),t.get("caCertFileName").updateValueAndValidity({emitEvent:e}),t.get("privateKey").updateValueAndValidity({emitEvent:e}),t.get("privateKeyFileName").updateValueAndValidity({emitEvent:e}),t.get("cert").updateValueAndValidity({emitEvent:e}),t.get("certFileName").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);me.decorators=[{type:t.Component,args:[{selector:"tb-action-node-mqtt-config",template:'<section [formGroup]="mqttConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic-pattern</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="mqttConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.mqtt-topic-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <div fxFlex fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="60" class="mat-block">\n <mat-label translate>tb.rulenode.host</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="mqttConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="40" class="mat-block">\n <mat-label translate>tb.rulenode.port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="port">\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'required\')">\n {{ \'tb.rulenode.port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'min\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'max\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="40" class="mat-block">\n <mat-label translate>tb.rulenode.connect-timeout</mat-label>\n <input required type="number" step="1" min="1" max="200" matInput formControlName="connectTimeoutSec">\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'required\')">\n {{ \'tb.rulenode.connect-timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'min\')">\n {{ \'tb.rulenode.connect-timeout-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'max\')">\n {{ \'tb.rulenode.connect-timeout-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.client-id</mat-label>\n <input matInput formControlName="clientId">\n </mat-form-field>\n <mat-checkbox formControlName="cleanSession" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.clean-session\' | translate }}\n </mat-checkbox>\n <mat-checkbox formControlName="ssl" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-ssl\' | translate }}\n </mat-checkbox>\n <mat-expansion-panel class="tb-mqtt-credentials-panel-group">\n <mat-expansion-panel-header>\n <mat-panel-title translate>tb.rulenode.credentials</mat-panel-title>\n <mat-panel-description>\n {{ mqttCredentialsTypeTranslationsMap.get(mqttConfigForm.get(\'credentials\').get(\'type\').value) | translate }}\n </mat-panel-description>\n </mat-expansion-panel-header>\n <section formGroupName="credentials" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.credentials-type</mat-label>\n <mat-select formControlName="type" required>\n <mat-option *ngFor="let credentialsType of allMqttCredentialsTypes" [value]="credentialsType">\n {{ mqttCredentialsTypeTranslationsMap.get(credentialsType) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'type\').hasError(\'required\')">\n {{ \'tb.rulenode.credentials-type-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <section fxLayout="column" [ngSwitch]="mqttConfigForm.get(\'credentials\').get(\'type\').value">\n <ng-template ngSwitchCase="anonymous">\n </ng-template>\n <ng-template ngSwitchCase="basic">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input required matInput formControlName="username">\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'username\').hasError(\'required\')">\n {{ \'tb.rulenode.username-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input type="password" required matInput formControlName="password">\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'password\').hasError(\'required\')">\n {{ \'tb.rulenode.password-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template ngSwitchCase="cert.PEM">\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'caCertFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'caCertFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input formControlName="cert"\n inputId="CertSelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'certFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'certFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input style="padding-bottom: 8px;"\n formControlName="privateKey"\n inputId="privateKeySelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'privateKeyFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'privateKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.private-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.private-key-password</mat-label>\n <input type="password" matInput formControlName="password">\n </mat-form-field>\n </ng-template>\n </section>\n </section>\n </mat-expansion-panel>\n</section>\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}"]}]}],me.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var ue=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.messageProperties=[null,"BASIC","TEXT_PLAIN","MINIMAL_BASIC","MINIMAL_PERSISTENT_BASIC","PERSISTENT_BASIC","PERSISTENT_TEXT_PLAIN"],n}return f(t,e),t.prototype.configForm=function(){return this.rabbitMqConfigForm},t.prototype.onConfigurationSet=function(e){this.rabbitMqConfigForm=this.fb.group({exchangeNamePattern:[e?e.exchangeNamePattern:null,[]],routingKeyPattern:[e?e.routingKeyPattern:null,[]],messageProperties:[e?e.messageProperties:null,[]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],virtualHost:[e?e.virtualHost:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]],automaticRecoveryEnabled:[!!e&&e.automaticRecoveryEnabled,[]],connectionTimeout:[e?e.connectionTimeout:null,[i.Validators.min(0)]],handshakeTimeout:[e?e.handshakeTimeout:null,[i.Validators.min(0)]],clientProperties:[e?e.clientProperties:null,[]]})},t}(a.RuleNodeConfigurationComponent);ue.decorators=[{type:t.Component,args:[{selector:"tb-action-node-rabbit-mq-config",template:'<section [formGroup]="rabbitMqConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.exchange-name-pattern</mat-label>\n <input matInput formControlName="exchangeNamePattern">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.routing-key-pattern</mat-label>\n <input matInput formControlName="routingKeyPattern">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.message-properties</mat-label>\n <mat-select formControlName="messageProperties">\n <mat-option *ngFor="let property of messageProperties" [value]="property">\n {{ property }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="100" fxFlex.gt-sm="60" class="mat-block">\n <mat-label translate>tb.rulenode.host</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="100" fxFlex.gt-sm="40" class="mat-block">\n <mat-label translate>tb.rulenode.port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="port">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'required\')">\n {{ \'tb.rulenode.port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'min\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'max\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.virtual-host</mat-label>\n <input matInput formControlName="virtualHost">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input matInput formControlName="username">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input type="password" matInput formControlName="password">\n </mat-form-field>\n <mat-checkbox formControlName="automaticRecoveryEnabled" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.automatic-recovery\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.connection-timeout-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="connectionTimeout">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'connectionTimeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-connection-timeout-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.handshake-timeout-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="handshakeTimeout">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'handshakeTimeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-handshake-timeout-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.client-properties</label>\n <tb-kv-map-config\n required="false"\n formControlName="clientProperties"\n keyText="tb.rulenode.key"\n keyRequiredText="tb.rulenode.key-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n</section>\n'}]}],ue.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var de=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.proxySchemes=["http","https"],n.httpRequestTypes=Object.keys(j),n}return f(t,e),t.prototype.configForm=function(){return this.restApiCallConfigForm},t.prototype.onConfigurationSet=function(e){this.restApiCallConfigForm=this.fb.group({restEndpointUrlPattern:[e?e.restEndpointUrlPattern:null,[i.Validators.required]],requestMethod:[e?e.requestMethod:null,[i.Validators.required]],useSimpleClientHttpFactory:[!!e&&e.useSimpleClientHttpFactory,[]],enableProxy:[!!e&&e.enableProxy,[]],useSystemProxyProperties:[!!e&&e.enableProxy,[]],proxyScheme:[e?e.proxyHost:null,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],readTimeoutMs:[e?e.readTimeoutMs:null,[]],maxParallelRequestsCount:[e?e.maxParallelRequestsCount:null,[i.Validators.min(0)]],headers:[e?e.headers:null,[]],useRedisQueueForMsgPersistence:[!!e&&e.useRedisQueueForMsgPersistence,[]],trimQueue:[!!e&&e.trimQueue,[]],maxQueueSize:[e?e.maxQueueSize:null,[]]})},t.prototype.validatorTriggers=function(){return["useSimpleClientHttpFactory","useRedisQueueForMsgPersistence","enableProxy","useSystemProxyProperties"]},t.prototype.updateValidators=function(e){var t=this.restApiCallConfigForm.get("useSimpleClientHttpFactory").value,r=this.restApiCallConfigForm.get("useRedisQueueForMsgPersistence").value,n=this.restApiCallConfigForm.get("enableProxy").value,a=this.restApiCallConfigForm.get("useSystemProxyProperties").value;n&&!a?(this.restApiCallConfigForm.get("proxyHost").setValidators(n?[i.Validators.required]:[]),this.restApiCallConfigForm.get("proxyPort").setValidators(n?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])):(this.restApiCallConfigForm.get("proxyHost").setValidators([]),this.restApiCallConfigForm.get("proxyPort").setValidators([]),t?this.restApiCallConfigForm.get("readTimeoutMs").setValidators([]):this.restApiCallConfigForm.get("readTimeoutMs").setValidators([i.Validators.min(0)])),r?this.restApiCallConfigForm.get("maxQueueSize").setValidators([i.Validators.min(0)]):this.restApiCallConfigForm.get("maxQueueSize").setValidators([]),this.restApiCallConfigForm.get("readTimeoutMs").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("maxQueueSize").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);de.decorators=[{type:t.Component,args:[{selector:"tb-action-node-rest-api-call-config",template:'<section [formGroup]="restApiCallConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.endpoint-url-pattern</mat-label>\n <input required matInput formControlName="restEndpointUrlPattern">\n <mat-error *ngIf="restApiCallConfigForm.get(\'restEndpointUrlPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.endpoint-url-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.endpoint-url-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.request-method</mat-label>\n <mat-select formControlName="requestMethod">\n <mat-option *ngFor="let requestType of httpRequestTypes" [value]="requestType">\n {{ requestType }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-checkbox formControlName="enableProxy" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-proxy\' | translate }}\n </mat-checkbox>\n <mat-checkbox *ngIf="!restApiCallConfigForm.get(\'enableProxy\').value" formControlName="useSimpleClientHttpFactory" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-simple-client-http-factory\' | translate }}\n </mat-checkbox>\n <div *ngIf="restApiCallConfigForm.get(\'enableProxy\').value">\n <mat-checkbox formControlName="useSystemProxyProperties" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-system-proxy-properties\' | translate }}\n </mat-checkbox>\n <div *ngIf="!restApiCallConfigForm.get(\'useSystemProxyProperties\').value">\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="10">\n <mat-label translate>tb.rulenode.proxy-scheme</mat-label>\n <mat-select formControlName="proxyScheme">\n <mat-option *ngFor="let proxyScheme of proxySchemes" [value]="proxyScheme">\n {{ proxyScheme }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="md-block" fxFlex="100" fxFlex.gt-sm="50">\n <mat-label translate>tb.rulenode.proxy-host</mat-label>\n <input matInput required formControlName="proxyHost">\n <mat-error *ngIf="restApiCallConfigForm.get(\'proxyHost\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="40">\n <mat-label translate>tb.rulenode.proxy-port</mat-label>\n <input matInput required formControlName="proxyPort" type="number" step="1">\n <mat-error *ngIf="restApiCallConfigForm.get(\'proxyPort\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-port-required\' | translate }}\n </mat-error>\n <mat-error\n *ngIf="restApiCallConfigForm.get(\'proxyPort\').hasError(\'min\') || restApiCallConfigForm.get(\'proxyPort\').hasError(\'max\')">\n {{ \'tb.rulenode.proxy-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-user</mat-label>\n <input matInput formControlName="proxyUser">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-password</mat-label>\n <input matInput formControlName="proxyPassword">\n </mat-form-field>\n </div>\n </div>\n <mat-form-field *ngIf="!restApiCallConfigForm.get(\'useSimpleClientHttpFactory\').value || restApiCallConfigForm.get(\'enableProxy\').value" class="mat-block"\n style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.read-timeout</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="readTimeoutMs">\n <mat-hint innerHTML="{{ \'tb.rulenode.read-timeout-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.max-parallel-requests-count</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="maxParallelRequestsCount">\n <mat-hint innerHTML="{{ \'tb.rulenode.max-parallel-requests-count-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.headers</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.headers-hint\' | translate }}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="headers"\n keyText="tb.rulenode.header"\n keyRequiredText="tb.rulenode.header-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-checkbox formControlName="useRedisQueueForMsgPersistence" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-redis-queue\' | translate }}\n </mat-checkbox>\n <div fxLayout="column" *ngIf="restApiCallConfigForm.get(\'useRedisQueueForMsgPersistence\').value === true">\n <mat-checkbox formControlName="trimQueue" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.trim-redis-queue\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.redis-queue-max-size</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="maxQueueSize">\n </mat-form-field>\n </div>\n</section>\n'}]}],de.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var pe=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.smtpProtocols=["smtp","smtps"],n.tlsVersions=["TLSv1","TLSv1.1","TLSv1.2","TLSv1.3"],n}return f(t,e),t.prototype.configForm=function(){return this.sendEmailConfigForm},t.prototype.onConfigurationSet=function(e){this.sendEmailConfigForm=this.fb.group({useSystemSmtpSettings:[!!e&&e.useSystemSmtpSettings,[]],smtpProtocol:[e?e.smtpProtocol:null,[]],smtpHost:[e?e.smtpHost:null,[]],smtpPort:[e?e.smtpPort:null,[]],timeout:[e?e.timeout:null,[]],enableTls:[!!e&&e.enableTls,[]],tlsVersion:[e?e.tlsVersion:null,[]],enableProxy:[!!e&&e.enableProxy,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]]})},t.prototype.validatorTriggers=function(){return["useSystemSmtpSettings","enableProxy"]},t.prototype.updateValidators=function(e){var t=this.sendEmailConfigForm.get("useSystemSmtpSettings").value,r=this.sendEmailConfigForm.get("enableProxy").value;t?(this.sendEmailConfigForm.get("smtpProtocol").setValidators([]),this.sendEmailConfigForm.get("smtpHost").setValidators([]),this.sendEmailConfigForm.get("smtpPort").setValidators([]),this.sendEmailConfigForm.get("timeout").setValidators([]),this.sendEmailConfigForm.get("proxyHost").setValidators([]),this.sendEmailConfigForm.get("proxyPort").setValidators([])):(this.sendEmailConfigForm.get("smtpProtocol").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpHost").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpPort").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]),this.sendEmailConfigForm.get("timeout").setValidators([i.Validators.required,i.Validators.min(0)]),this.sendEmailConfigForm.get("proxyHost").setValidators(r?[i.Validators.required]:[]),this.sendEmailConfigForm.get("proxyPort").setValidators(r?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])),this.sendEmailConfigForm.get("smtpProtocol").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpPort").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("timeout").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);pe.decorators=[{type:t.Component,args:[{selector:"tb-action-node-send-email-config",template:'<section [formGroup]="sendEmailConfigForm" fxLayout="column">\n <mat-checkbox formControlName="useSystemSmtpSettings" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-system-smtp-settings\' | translate }}\n </mat-checkbox>\n <section fxLayout="column" *ngIf="sendEmailConfigForm.get(\'useSystemSmtpSettings\').value === false">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.smtp-protocol</mat-label>\n <mat-select formControlName="smtpProtocol">\n <mat-option *ngFor="let smtpProtocol of smtpProtocols" [value]="smtpProtocol">\n {{ smtpProtocol.toUpperCase() }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="100" fxFlex.gt-sm="60" class="mat-block">\n <mat-label translate>tb.rulenode.smtp-host</mat-label>\n <input required matInput formControlName="smtpHost">\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpHost\').hasError(\'required\')">\n {{ \'tb.rulenode.smtp-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="100" fxFlex.gt-sm="40" class="mat-block">\n <mat-label translate>tb.rulenode.smtp-port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="smtpPort">\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'required\')">\n {{ \'tb.rulenode.smtp-port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'min\')">\n {{ \'tb.rulenode.smtp-port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'max\')">\n {{ \'tb.rulenode.smtp-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.timeout-msec</mat-label>\n <input required type="number" step="1" min="0" matInput formControlName="timeout">\n <mat-error *ngIf="sendEmailConfigForm.get(\'timeout\').hasError(\'required\')">\n {{ \'tb.rulenode.timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'timeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-timeout-msec-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox formControlName="enableTls" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-tls\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block" *ngIf="sendEmailConfigForm.get(\'enableTls\').value === true">\n <mat-label translate>tb.rulenode.tls-version</mat-label>\n <mat-select formControlName="tlsVersion">\n <mat-option *ngFor="let tlsVersion of tlsVersions" [value]="tlsVersion">\n {{ tlsVersion }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <tb-checkbox formControlName="enableProxy" style="display: block; padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-proxy\' | translate }}\n </tb-checkbox>\n <div *ngIf="sendEmailConfigForm.get(\'enableProxy\').value">\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="60">\n <mat-label translate>tb.rulenode.proxy-host</mat-label>\n <input matInput required formControlName="proxyHost">\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyHost\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="40">\n <mat-label translate>tb.rulenode.proxy-port</mat-label>\n <input matInput required formControlName="proxyPort" type="number" step="1" min="1" max="65535">\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyPort\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyPort\').hasError(\'min\') || sendEmailConfigForm.get(\'proxyPort\').hasError(\'max\')">\n {{ \'tb.rulenode.proxy-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-user</mat-label>\n <input matInput formControlName="proxyUser">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-password</mat-label>\n <input matInput formControlName="proxyPassword">\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" floatLabel="always">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input matInput placeholder="{{ \'tb.rulenode.enter-username\' | translate }}" formControlName="username">\n </mat-form-field>\n <mat-form-field class="mat-block" floatLabel="always">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input matInput type="password" placeholder="{{ \'tb.rulenode.enter-password\' | translate }}" formControlName="password">\n </mat-form-field>\n </section>\n</section>\n'}]}],pe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var ce=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.serviceType=a.ServiceType.TB_RULE_ENGINE,n}return f(t,e),t.prototype.configForm=function(){return this.checkPointConfigForm},t.prototype.onConfigurationSet=function(e){this.checkPointConfigForm=this.fb.group({queueName:[e?e.queueName:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);ce.decorators=[{type:t.Component,args:[{selector:"tb-action-node-check-point-config",template:'<section [formGroup]="checkPointConfigForm" fxLayout="column">\n <tb-queue-type-list\n required\n [queueType]="serviceType"\n formControlName="queueName">\n </tb-queue-type-list>\n <div class="tb-hint" translate>tb.rulenode.select-queue-hint</div>\n</section>\n'}]}],ce.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var fe=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allAzureIotHubCredentialsTypes=z,n.azureIotHubCredentialsTypeTranslationsMap=$,n}return f(t,e),t.prototype.configForm=function(){return this.azureIotHubConfigForm},t.prototype.onConfigurationSet=function(e){this.azureIotHubConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[i.Validators.required]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:this.fb.group({type:[e&&e.credentials?e.credentials.type:null,[i.Validators.required]],sasKey:[e&&e.credentials?e.credentials.sasKey:null,[]],caCert:[e&&e.credentials?e.credentials.caCert:null,[]],caCertFileName:[e&&e.credentials?e.credentials.caCertFileName:null,[]],privateKey:[e&&e.credentials?e.credentials.privateKey:null,[]],privateKeyFileName:[e&&e.credentials?e.credentials.privateKeyFileName:null,[]],cert:[e&&e.credentials?e.credentials.cert:null,[]],certFileName:[e&&e.credentials?e.credentials.certFileName:null,[]],password:[e&&e.credentials?e.credentials.password:null,[]]})})},t.prototype.prepareOutputConfig=function(e){var t=e.credentials.type;return"sas"===t&&(e.credentials={type:t,sasKey:e.credentials.sasKey,caCert:e.credentials.caCert,caCertFileName:e.credentials.caCertFileName}),e},t.prototype.validatorTriggers=function(){return["credentials.type"]},t.prototype.updateValidators=function(e){var t=this.azureIotHubConfigForm.get("credentials"),r=t.get("type").value;switch(e&&t.reset({type:r},{emitEvent:!1}),t.get("sasKey").setValidators([]),t.get("privateKey").setValidators([]),t.get("privateKeyFileName").setValidators([]),t.get("cert").setValidators([]),t.get("certFileName").setValidators([]),r){case"sas":t.get("sasKey").setValidators([i.Validators.required]);break;case"cert.PEM":t.get("privateKey").setValidators([i.Validators.required]),t.get("privateKeyFileName").setValidators([i.Validators.required]),t.get("cert").setValidators([i.Validators.required]),t.get("certFileName").setValidators([i.Validators.required])}t.get("sasKey").updateValueAndValidity({emitEvent:e}),t.get("privateKey").updateValueAndValidity({emitEvent:e}),t.get("privateKeyFileName").updateValueAndValidity({emitEvent:e}),t.get("cert").updateValueAndValidity({emitEvent:e}),t.get("certFileName").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);fe.decorators=[{type:t.Component,args:[{selector:"tb-action-node-azure-iot-hub-config",template:'<section [formGroup]="azureIotHubConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.hostname</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.hostname-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.device-id</mat-label>\n <input required matInput formControlName="clientId" autocomplete="new-clientId">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'clientId\').hasError(\'required\')">\n {{ \'tb.rulenode.device-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-accordion multi>\n <mat-expansion-panel class="tb-mqtt-credentials-panel-group">\n <mat-expansion-panel-header>\n <mat-panel-title translate>tb.rulenode.credentials</mat-panel-title>\n <mat-panel-description>\n {{ azureIotHubCredentialsTypeTranslationsMap.get(azureIotHubConfigForm.get(\'credentials.type\').value) | translate }}\n </mat-panel-description>\n </mat-expansion-panel-header>\n <section formGroupName="credentials" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.credentials-type</mat-label>\n <mat-select formControlName="type" required>\n <mat-option *ngFor="let credentialsType of allAzureIotHubCredentialsTypes" [value]="credentialsType">\n {{ azureIotHubCredentialsTypeTranslationsMap.get(credentialsType) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="azureIotHubConfigForm.get(\'credentials.type\').hasError(\'required\')">\n {{ \'tb.rulenode.credentials-type-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <section fxLayout="column" [ngSwitch]="azureIotHubConfigForm.get(\'credentials.type\').value">\n <ng-template ngSwitchCase="anonymous">\n </ng-template>\n <ng-template ngSwitchCase="sas">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.sas-key</mat-label>\n <input type="password" required matInput formControlName="sasKey" autocomplete="new-password">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'credentials.sasKey\').hasError(\'required\')">\n {{ \'tb.rulenode.sas-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.caCertFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.caCertFileName\').setValue($event)"\n label="{{\'tb.rulenode.azure-ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n </ng-template>\n <ng-template ngSwitchCase="cert.PEM">\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.caCertFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.caCertFileName\').setValue($event)"\n label="{{\'tb.rulenode.azure-ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input formControlName="cert"\n inputId="CertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.certFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.certFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input style="padding-bottom: 8px;"\n formControlName="privateKey"\n inputId="privateKeySelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.privateKeyFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.privateKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.private-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.private-key-password</mat-label>\n <input type="password" matInput formControlName="password" autocomplete="new-password">\n </mat-form-field>\n </ng-template>\n </section>\n </section>\n </mat-expansion-panel>\n </mat-accordion>\n</section>\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}"]}]}],fe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var ge=function(){};ge.decorators=[{type:t.NgModule,args:[{declarations:[b,h,C,v,F,x,T,q,I,S,N,W,Y,J,Z,ae,oe,ie,le,se,me,ue,de,pe,ce,fe],imports:[r.CommonModule,a.SharedModule,ne],exports:[b,h,C,v,F,x,T,q,I,S,N,W,Y,J,Z,ae,oe,ie,le,se,me,ue,de,pe,ce,fe]}]}];var ye=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return f(t,e),t.prototype.configForm=function(){return this.checkMessageConfigForm},t.prototype.onConfigurationSet=function(e){this.checkMessageConfigForm=this.fb.group({messageNames:[e?e.messageNames:null,[]],metadataNames:[e?e.metadataNames:null,[]],checkAllKeys:[!!e&&e.checkAllKeys,[]]})},t.prototype.validateConfig=function(){var e=this.checkMessageConfigForm.get("messageNames").value,t=this.checkMessageConfigForm.get("metadataNames").value;return e.length>0||t.length>0},t.prototype.removeMessageName=function(e){var t=this.checkMessageConfigForm.get("messageNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("messageNames").setValue(t,{emitEvent:!0}))},t.prototype.removeMetadataName=function(e){var t=this.checkMessageConfigForm.get("metadataNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("metadataNames").setValue(t,{emitEvent:!0}))},t.prototype.addMessageName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("messageNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("messageNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},t.prototype.addMetadataName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("metadataNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("metadataNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},t}(a.RuleNodeConfigurationComponent);ye.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-check-message-config",template:'<section [formGroup]="checkMessageConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding tb-required">tb.rulenode.data-keys</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #messageNamesChipList>\n <mat-chip\n *ngFor="let messageName of checkMessageConfigForm.get(\'messageNames\').value;"\n (removed)="removeMessageName(messageName)">\n {{messageName}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.data-keys\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="messageNamesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addMessageName($event)"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <div class="tb-hint" translate>tb.rulenode.separator-hint</div>\n <label translate class="tb-title no-padding tb-required">tb.rulenode.metadata-keys</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #metadataNamesChipList>\n <mat-chip\n *ngFor="let metadataName of checkMessageConfigForm.get(\'metadataNames\').value;"\n (removed)="removeMetadataName(metadataName)">\n {{metadataName}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.metadata-keys\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="metadataNamesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addMetadataName($event)"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <div class="tb-hint" translate>tb.rulenode.separator-hint</div>\n <mat-checkbox fxFlex formControlName="checkAllKeys" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.check-all-keys\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.check-all-keys-hint</div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}]}],ye.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var be=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.entitySearchDirection=Object.keys(a.EntitySearchDirection),n.entitySearchDirectionTranslationsMap=a.entitySearchDirectionTranslations,n}return f(t,e),t.prototype.configForm=function(){return this.checkRelationConfigForm},t.prototype.onConfigurationSet=function(e){this.checkRelationConfigForm=this.fb.group({checkForSingleEntity:[!!e&&e.checkForSingleEntity,[]],direction:[e?e.direction:null,[]],entityType:[e?e.entityType:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],entityId:[e?e.entityId:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],relationType:[e?e.relationType:null,[i.Validators.required]]})},t.prototype.validatorTriggers=function(){return["checkForSingleEntity"]},t.prototype.updateValidators=function(e){var t=this.checkRelationConfigForm.get("checkForSingleEntity").value;this.checkRelationConfigForm.get("entityType").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:e}),this.checkRelationConfigForm.get("entityId").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityId").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);be.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-check-relation-config",template:'<section [formGroup]="checkRelationConfigForm" fxLayout="column">\n <mat-checkbox fxFlex formControlName="checkForSingleEntity" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.check-relation-to-specific-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.check-relation-hint</div>\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select formControlName="direction" required>\n <mat-option *ngFor="let direction of entitySearchDirection" [value]="direction">\n {{ entitySearchDirectionTranslationsMap.get(direction) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout="row" *ngIf="checkRelationConfigForm.get(\'checkForSingleEntity\').value" style="padding-top: 20px">\n <tb-entity-type-select\n style="min-width: 100px; padding-bottom: 20px; padding-right: 8px;"\n showLabel\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <tb-entity-autocomplete\n fxFlex\n required\n *ngIf="checkRelationConfigForm.get(\'entityType\').value"\n [entityType]="checkRelationConfigForm.get(\'entityType\').value"\n formControlName="entityId">\n </tb-entity-autocomplete>\n </div>\n <tb-relation-type-autocomplete\n required\n formControlName="relationType">\n </tb-relation-type-autocomplete>\n</section>\n'}]}],be.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var he=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=V,n.perimeterTypes=Object.keys(V),n.perimeterTypeTranslationMap=L,n.rangeUnits=Object.keys(M),n.rangeUnitTranslationMap=R,n}return f(t,e),t.prototype.configForm=function(){return this.geoFilterConfigForm},t.prototype.onConfigurationSet=function(e){this.geoFilterConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]]})},t.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},t.prototype.updateValidators=function(e){var t=this.geoFilterConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoFilterConfigForm.get("perimeterType").value;t?this.geoFilterConfigForm.get("perimeterType").setValidators([]):this.geoFilterConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==V.CIRCLE?(this.geoFilterConfigForm.get("centerLatitude").setValidators([]),this.geoFilterConfigForm.get("centerLongitude").setValidators([]),this.geoFilterConfigForm.get("range").setValidators([]),this.geoFilterConfigForm.get("rangeUnit").setValidators([])):(this.geoFilterConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoFilterConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoFilterConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoFilterConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==V.POLYGON?this.geoFilterConfigForm.get("polygonsDefinition").setValidators([]):this.geoFilterConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoFilterConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoFilterConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);he.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-gps-geofencing-config",template:'<section [formGroup]="geoFilterConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.latitude-key-name</mat-label>\n <input matInput formControlName="latitudeKeyName" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'latitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.latitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.longitude-key-name</mat-label>\n <input matInput formControlName="longitudeKeyName" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'longitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.longitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="fetchPerimeterInfoFromMessageMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.fetch-perimeter-info-from-message-metadata\' | translate }}\n </mat-checkbox>\n <div fxLayout="row" *ngIf="!geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.perimeter-type</mat-label>\n <mat-select formControlName="perimeterType" required>\n <mat-option *ngFor="let type of perimeterTypes" [value]="type">\n {{ perimeterTypeTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column"\n *ngIf="geoFilterConfigForm.get(\'perimeterType\').value === perimeterType.CIRCLE &&\n !geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-latitude</mat-label>\n <input type="number" min="-90" max="90" step="0.1" matInput formControlName="centerLatitude" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'centerLatitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-latitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-longitude</mat-label>\n <input type="number" min="-180" max="180" step="0.1" matInput formControlName="centerLongitude" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'centerLongitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-longitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range</mat-label>\n <input type="number" min="0" step="0.1" matInput formControlName="range" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'range\').hasError(\'required\')">\n {{ \'tb.rulenode.range-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range-units</mat-label>\n <mat-select formControlName="rangeUnit" required>\n <mat-option *ngFor="let type of rangeUnits" [value]="type">\n {{ rangeUnitTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout="row" *ngIf="geoFilterConfigForm.get(\'perimeterType\').value === perimeterType.POLYGON &&\n !geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="column" fxFlex="100">\n <mat-form-field class="mat-block" hintLabel="{{\'tb.rulenode.polygon-definition-hint\' | translate}}">\n <mat-label translate>tb.rulenode.polygon-definition</mat-label>\n <input matInput formControlName="polygonsDefinition" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'polygonsDefinition\').hasError(\'required\')">\n {{ \'tb.rulenode.polygon-definition-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n</section>\n'}]}],he.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Ce=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.messageTypeConfigForm},t.prototype.onConfigurationSet=function(e){this.messageTypeConfigForm=this.fb.group({messageTypes:[e?e.messageTypes:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Ce.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-message-type-config",template:'<section [formGroup]="messageTypeConfigForm" fxLayout="column">\n <tb-message-types-config\n required\n label="tb.rulenode.message-types-filter"\n formControlName="messageTypes"\n ></tb-message-types-config>\n</section>\n'}]}],Ce.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var ve=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allowedEntityTypes=[a.EntityType.DEVICE,a.EntityType.ASSET,a.EntityType.ENTITY_VIEW,a.EntityType.TENANT,a.EntityType.CUSTOMER,a.EntityType.USER,a.EntityType.DASHBOARD,a.EntityType.RULE_CHAIN,a.EntityType.RULE_NODE],n}return f(t,e),t.prototype.configForm=function(){return this.originatorTypeConfigForm},t.prototype.onConfigurationSet=function(e){this.originatorTypeConfigForm=this.fb.group({originatorTypes:[e?e.originatorTypes:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);ve.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-originator-type-config",template:'<section [formGroup]="originatorTypeConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding tb-required">tb.rulenode.originator-types-filter</label>\n <tb-entity-type-list fxFlex\n formControlName="originatorTypes"\n [allowedEntityTypes]="allowedEntityTypes"\n [ignoreAuthorityFilter]="true"\n required>\n </tb-entity-type-list>\n</section>\n',styles:[":host ::ng-deep tb-entity-type-list .mat-form-field-flex{padding-top:0}:host ::ng-deep tb-entity-type-list .mat-form-field-infix{border-top:0}"]}]}],ve.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Fe=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.scriptConfigForm},t.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},t.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"filter",this.translate.instant("tb.rulenode.filter"),"Filter",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);Fe.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-script-config",template:'<section [formGroup]="scriptConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.filter</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Filter"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-filter-function\' | translate }}\n </button>\n </div>\n</section>\n'}]}],Fe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},Fe.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var xe=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.switchConfigForm},t.prototype.onConfigurationSet=function(e){this.switchConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},t.prototype.testScript=function(){var e=this,t=this.switchConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"switch",this.translate.instant("tb.rulenode.switch"),"Switch",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.switchConfigForm.get("jsScript").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);xe.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-switch-config",template:'<section [formGroup]="switchConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.switch</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Switch"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-switch-function\' | translate }}\n </button>\n </div>\n</section>\n'}]}],xe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},xe.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var Te=function(e){function t(t,r,n){var o,l,s=e.call(this,t)||this;s.store=t,s.translate=r,s.fb=n,s.alarmStatusTranslationsMap=a.alarmStatusTranslations,s.alarmStatusList=[],s.searchText="",s.displayStatusFn=s.displayStatus.bind(s);try{for(var m=g(Object.keys(a.AlarmStatus)),u=m.next();!u.done;u=m.next()){var d=u.value;s.alarmStatusList.push(a.AlarmStatus[d])}}catch(e){o={error:e}}finally{try{u&&!u.done&&(l=m.return)&&l.call(m)}finally{if(o)throw o.error}}return s.statusFormControl=new i.FormControl(""),s.filteredAlarmStatus=s.statusFormControl.valueChanges.pipe(p.startWith(""),p.map((function(e){return e||""})),p.mergeMap((function(e){return s.fetchAlarmStatus(e)})),p.share()),s}return f(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},t.prototype.configForm=function(){return this.alarmStatusConfigForm},t.prototype.prepareInputConfig=function(e){return this.searchText="",this.statusFormControl.patchValue("",{emitEvent:!0}),e},t.prototype.onConfigurationSet=function(e){this.alarmStatusConfigForm=this.fb.group({alarmStatusList:[e?e.alarmStatusList:null,[i.Validators.required]]})},t.prototype.displayStatus=function(e){return e?this.translate.instant(a.alarmStatusTranslations.get(e)):void 0},t.prototype.fetchAlarmStatus=function(e){var t=this,r=this.getAlarmStatusList();if(this.searchText=e,this.searchText&&this.searchText.length){var n=this.searchText.toUpperCase();return d.of(r.filter((function(e){return t.translate.instant(a.alarmStatusTranslations.get(a.AlarmStatus[e])).toUpperCase().includes(n)})))}return d.of(r)},t.prototype.alarmStatusSelected=function(e){this.addAlarmStatus(e.option.value),this.clear("")},t.prototype.removeAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))}},t.prototype.addAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))},t.prototype.getAlarmStatusList=function(){var e=this;return this.alarmStatusList.filter((function(t){return-1===e.alarmStatusConfigForm.get("alarmStatusList").value.indexOf(t)}))},t.prototype.onAlarmStatusInputFocus=function(){this.statusFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},t.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.alarmStatusInput.nativeElement.value=e,this.statusFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.alarmStatusInput.nativeElement.blur(),t.alarmStatusInput.nativeElement.focus()}),0)},t}(a.RuleNodeConfigurationComponent);Te.decorators=[{type:t.Component,args:[{selector:"tb-filter-node-check-alarm-status-config",template:'<section [formGroup]="alarmStatusConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" class="alarm-status-list">\n <mat-label translate>tb.rulenode.alarm-status-filter</mat-label>\n <mat-chip-list #alarmStatusChipList required>\n <mat-chip\n *ngFor="let alarmStatus of alarmStatusConfigForm.get(\'alarmStatusList\').value;"\n (removed)="removeAlarmStatus(alarmStatus)">\n <span>\n <strong>{{alarmStatusTranslationsMap.get(alarmStatus) | translate}}</strong>\n </span>\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text"\n style="max-width: 200px;"\n #alarmStatusInput\n (focusin)="onAlarmStatusInputFocus()"\n [formControl]="statusFormControl"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="alarmStatusAutocomplete"\n [matChipInputFor]="alarmStatusChipList">\n </mat-chip-list>\n <mat-autocomplete #alarmStatusAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="alarmStatusSelected($event)"\n [displayWith]="displayStatusFn">\n <mat-option *ngFor="let status of filteredAlarmStatus | async" [value]="status">\n <span [innerHTML]="alarmStatusTranslationsMap.get(status) | translate | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredAlarmStatus | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div>\n <span translate>tb.rulenode.no-alarm-status-matching</span>\n </div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <tb-error [error]="(statusFormControl.touched &&\n alarmStatusConfigForm.get(\'alarmStatusList\').hasError(\'required\'))\n ? translate.instant(\'tb.rulenode.alarm-status-list-empty\') : \'\'"></tb-error>\n </section>\n\n\n\n'}]}],Te.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},Te.propDecorators={alarmStatusInput:[{type:t.ViewChild,args:["alarmStatusInput",{static:!1}]}]};var qe=function(){};qe.decorators=[{type:t.NgModule,args:[{declarations:[ye,be,he,Ce,ve,Fe,xe,Te],imports:[r.CommonModule,a.SharedModule,ne],exports:[ye,be,he,Ce,ve,Fe,xe,Te]}]}];var Ie=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.customerAttributesConfigForm},t.prototype.onConfigurationSet=function(e){this.customerAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Ie.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-customer-attributes-config",template:'<section [formGroup]="customerAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ customerAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ customerAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}]}],Ie.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Se=function(e){function t(t,r,n){var a,o,l=e.call(this,t)||this;l.store=t,l.translate=r,l.fb=n,l.entityDetailsTranslationsMap=U,l.entityDetailsList=[],l.searchText="",l.displayDetailsFn=l.displayDetails.bind(l);try{for(var s=g(Object.keys(w)),m=s.next();!m.done;m=s.next()){var u=m.value;l.entityDetailsList.push(w[u])}}catch(e){a={error:e}}finally{try{m&&!m.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}return l.detailsFormControl=new i.FormControl(""),l.filteredEntityDetails=l.detailsFormControl.valueChanges.pipe(p.startWith(""),p.map((function(e){return e||""})),p.mergeMap((function(e){return l.fetchEntityDetails(e)})),p.share()),l}return f(t,e),t.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},t.prototype.configForm=function(){return this.entityDetailsConfigForm},t.prototype.prepareInputConfig=function(e){return this.searchText="",this.detailsFormControl.patchValue("",{emitEvent:!0}),e},t.prototype.onConfigurationSet=function(e){this.entityDetailsConfigForm=this.fb.group({detailsList:[e?e.detailsList:null,[i.Validators.required]],addToMetadata:[!!e&&e.addToMetadata,[]]})},t.prototype.displayDetails=function(e){return e?this.translate.instant(U.get(e)):void 0},t.prototype.fetchEntityDetails=function(e){var t=this;if(this.searchText=e,this.searchText&&this.searchText.length){var r=this.searchText.toUpperCase();return d.of(this.entityDetailsList.filter((function(e){return t.translate.instant(U.get(w[e])).toUpperCase().includes(r)})))}return d.of(this.entityDetailsList)},t.prototype.detailsFieldSelected=function(e){this.addDetailsField(e.option.value),this.clear("")},t.prototype.removeDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.entityDetailsConfigForm.get("detailsList").setValue(t))}},t.prototype.addDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.entityDetailsConfigForm.get("detailsList").setValue(t))},t.prototype.onEntityDetailsInputFocus=function(){this.detailsFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},t.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.detailsInput.nativeElement.value=e,this.detailsFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.detailsInput.nativeElement.blur(),t.detailsInput.nativeElement.focus()}),0)},t}(a.RuleNodeConfigurationComponent);Se.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-entity-details-config",template:'<section [formGroup]="entityDetailsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" class="entity-fields-list">\n <mat-label translate>tb.rulenode.entity-details</mat-label>\n <mat-chip-list #detailsChipList required>\n <mat-chip\n *ngFor="let details of entityDetailsConfigForm.get(\'detailsList\').value;"\n (removed)="removeDetailsField(details)">\n <span>\n <strong>{{entityDetailsTranslationsMap.get(details) | translate}}</strong>\n </span>\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text"\n style="max-width: 200px;"\n #detailsInput\n (focusin)="onEntityDetailsInputFocus()"\n [formControl]="detailsFormControl"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="detailsAutocomplete"\n [matChipInputFor]="detailsChipList">\n </mat-chip-list>\n <mat-autocomplete #detailsAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="detailsFieldSelected($event)"\n [displayWith]="displayDetailsFn">\n <mat-option *ngFor="let details of filteredEntityDetails | async" [value]="details">\n <span [innerHTML]="entityDetailsTranslationsMap.get(details) | translate | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredEntityDetails | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div>\n <span translate>tb.rulenode.no-entity-details-matching</span>\n </div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <tb-error [error]="(detailsFormControl.touched &&\n entityDetailsConfigForm.get(\'detailsList\').hasError(\'required\'))\n ? translate.instant(\'tb.rulenode.entity-details-list-empty\') : \'\'"></tb-error>\n <mat-checkbox fxFlex formControlName="addToMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.add-to-metadata\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.add-to-metadata-hint</div>\n</section>\n',styles:[":host ::ng-deep mat-form-field.entity-fields-list .mat-form-field-wrapper{margin-bottom:-1.25em}"]}]}],Se.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},Se.propDecorators={detailsInput:[{type:t.ViewChild,args:["detailsInput",{static:!1}]}]};var ke=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return f(t,e),t.prototype.configForm=function(){return this.deviceAttributesConfigForm},t.prototype.onConfigurationSet=function(e){this.deviceAttributesConfigForm=this.fb.group({deviceRelationsQuery:[e?e.deviceRelationsQuery:null,[i.Validators.required]],tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},t.prototype.removeKey=function(e,t){var r=this.deviceAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.deviceAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},t.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.deviceAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.deviceAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},t}(a.RuleNodeConfigurationComponent);ke.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-device-attributes-config",template:'<section [formGroup]="deviceAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.device-relations-query</label>\n <tb-device-relations-query-config\n required\n formControlName="deviceRelationsQuery"\n style="padding-bottom: 15px;">\n </tb-device-relations-query-config>\n <mat-checkbox fxFlex formControlName="tellFailureIfAbsent" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.tell-failure-if-absent\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.tell-failure-if-absent-hint</div>\n <label translate class="tb-title no-padding">tb.rulenode.client-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #clientAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'clientAttributeNames\').value;"\n (removed)="removeKey(key, \'clientAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.client-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="clientAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'clientAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.shared-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #sharedAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'sharedAttributeNames\').value;"\n (removed)="removeKey(key, \'sharedAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.shared-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="sharedAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'sharedAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.server-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #serverAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'serverAttributeNames\').value;"\n (removed)="removeKey(key, \'serverAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.server-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="serverAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'serverAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <mat-checkbox formControlName="getLatestValueWithTs" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.get-latest-value-with-ts\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.get-latest-value-with-ts-hint\' | translate }}"></div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}]}],ke.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Ne=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return f(t,e),t.prototype.configForm=function(){return this.originatorAttributesConfigForm},t.prototype.onConfigurationSet=function(e){this.originatorAttributesConfigForm=this.fb.group({tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},t.prototype.removeKey=function(e,t){var r=this.originatorAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.originatorAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},t.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.originatorAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.originatorAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},t}(a.RuleNodeConfigurationComponent);Ne.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-originator-attributes-config",template:'<section [formGroup]="originatorAttributesConfigForm" fxLayout="column">\n <mat-checkbox fxFlex formControlName="tellFailureIfAbsent" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.tell-failure-if-absent\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.tell-failure-if-absent-hint</div>\n <label translate class="tb-title no-padding">tb.rulenode.client-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #clientAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'clientAttributeNames\').value;"\n (removed)="removeKey(key, \'clientAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.client-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="clientAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'clientAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.client-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.shared-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #sharedAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'sharedAttributeNames\').value;"\n (removed)="removeKey(key, \'sharedAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.shared-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="sharedAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'sharedAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.shared-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.server-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #serverAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'serverAttributeNames\').value;"\n (removed)="removeKey(key, \'serverAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.server-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="serverAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'serverAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.server-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.latest-timeseries-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-checkbox formControlName="getLatestValueWithTs" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.get-latest-value-with-ts\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.get-latest-value-with-ts-hint\' | translate }}"></div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}]}],Ne.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Ve=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.originatorFieldsConfigForm},t.prototype.onConfigurationSet=function(e){this.originatorFieldsConfigForm=this.fb.group({fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Ve.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-originator-fields-config",template:'<section [formGroup]="originatorFieldsConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.fields-mapping</label>\n <tb-kv-map-config\n required\n formControlName="fieldsMapping"\n requiredText="tb.rulenode.fields-mapping-required"\n keyText="tb.rulenode.source-field"\n keyRequiredText="tb.rulenode.source-field-required"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}]}],Ve.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Ee=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n.fetchMode=D,n.fetchModes=Object.keys(D),n.samplingOrders=Object.keys(O),n.timeUnits=Object.keys(A),n.timeUnitsTranslationMap=P,n}return f(t,e),t.prototype.configForm=function(){return this.getTelemetryFromDatabaseConfigForm},t.prototype.onConfigurationSet=function(e){this.getTelemetryFromDatabaseConfigForm=this.fb.group({latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],fetchMode:[e?e.fetchMode:null,[i.Validators.required]],orderBy:[e?e.orderBy:null,[]],limit:[e?e.limit:null,[]],useMetadataIntervalPatterns:[!!e&&e.useMetadataIntervalPatterns,[]],startInterval:[e?e.startInterval:null,[]],startIntervalTimeUnit:[e?e.startIntervalTimeUnit:null,[]],endInterval:[e?e.endInterval:null,[]],endIntervalTimeUnit:[e?e.endIntervalTimeUnit:null,[]],startIntervalPattern:[e?e.startIntervalPattern:null,[]],endIntervalPattern:[e?e.endIntervalPattern:null,[]]})},t.prototype.validatorTriggers=function(){return["fetchMode","useMetadataIntervalPatterns"]},t.prototype.updateValidators=function(e){var t=this.getTelemetryFromDatabaseConfigForm.get("fetchMode").value,r=this.getTelemetryFromDatabaseConfigForm.get("useMetadataIntervalPatterns").value;t&&t===D.ALL?(this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([i.Validators.required,i.Validators.min(2),i.Validators.max(1e3)])):(this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([])),r?(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([i.Validators.required])):(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([])),this.getTelemetryFromDatabaseConfigForm.get("orderBy").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("limit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").updateValueAndValidity({emitEvent:e})},t.prototype.removeKey=function(e,t){var r=this.getTelemetryFromDatabaseConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(r,{emitEvent:!0}))},t.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.getTelemetryFromDatabaseConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},t}(a.RuleNodeConfigurationComponent);Ee.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-get-telemetry-from-database",template:'<section [formGroup]="getTelemetryFromDatabaseConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of getTelemetryFromDatabaseConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.latest-timeseries-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.fetch-mode</mat-label>\n <mat-select formControlName="fetchMode" required>\n <mat-option *ngFor="let mode of fetchModes" [value]="mode">\n {{ mode }}\n </mat-option>\n </mat-select>\n <mat-hint translate>tb.rulenode.fetch-mode-hint</mat-hint>\n </mat-form-field>\n <div fxLayout="column" *ngIf="getTelemetryFromDatabaseConfigForm.get(\'fetchMode\').value === fetchMode.ALL">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.order-by</mat-label>\n <mat-select formControlName="orderBy" required>\n <mat-option *ngFor="let order of samplingOrders" [value]="order">\n {{ order }}\n </mat-option>\n </mat-select>\n <mat-hint translate>tb.rulenode.order-by-hint</mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.limit</mat-label>\n <input type="number" min="2" max="1000" step="1" matInput formControlName="limit" required>\n <mat-hint translate>tb.rulenode.limit-hint</mat-hint>\n </mat-form-field>\n </div>\n <mat-checkbox formControlName="useMetadataIntervalPatterns">\n {{ \'tb.rulenode.use-metadata-interval-patterns\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.use-metadata-interval-patterns-hint</div>\n <div fxLayout="column" *ngIf="getTelemetryFromDatabaseConfigForm.get(\'useMetadataIntervalPatterns\').value === false; else intervalPattern">\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.start-interval</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="startInterval" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'required\')">\n {{ \'tb.rulenode.start-interval-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.start-interval-time-unit</mat-label>\n <mat-select formControlName="startIntervalTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.end-interval</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="endInterval" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'required\')">\n {{ \'tb.rulenode.end-interval-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.end-interval-time-unit</mat-label>\n <mat-select formControlName="endIntervalTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <ng-template #intervalPattern>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.start-interval-pattern</mat-label>\n <input matInput formControlName="startIntervalPattern" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startIntervalPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.start-interval-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.start-interval-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.end-interval-pattern</mat-label>\n <input matInput formControlName="endIntervalPattern" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endIntervalPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.end-interval-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.end-interval-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </ng-template>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}]}],Ee.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Ae=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.relatedAttributesConfigForm},t.prototype.onConfigurationSet=function(e){this.relatedAttributesConfigForm=this.fb.group({relationsQuery:[e?e.relationsQuery:null,[i.Validators.required]],telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Ae.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-related-attributes-config",template:'<section [formGroup]="relatedAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.relations-query</label>\n <tb-relations-query-config\n required\n formControlName="relationsQuery"\n style="padding-bottom: 15px;">\n </tb-relations-query-config>\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ relatedAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ relatedAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}]}],Ae.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Le=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.tenantAttributesConfigForm},t.prototype.onConfigurationSet=function(e){this.tenantAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Le.decorators=[{type:t.Component,args:[{selector:"tb-enrichment-node-tenant-attributes-config",template:'<section [formGroup]="tenantAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ tenantAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ tenantAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}]}],Le.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var Me=function(){};Me.decorators=[{type:t.NgModule,args:[{declarations:[Ie,Se,ke,Ne,Ve,Ee,Ae,Le],imports:[r.CommonModule,a.SharedModule,ne],exports:[Ie,Se,ke,Ne,Ve,Ee,Ae,Le]}]}];var Pe=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.originatorSource=k,n.originatorSources=Object.keys(k),n.originatorSourceTranslationMap=E,n}return f(t,e),t.prototype.configForm=function(){return this.changeOriginatorConfigForm},t.prototype.onConfigurationSet=function(e){this.changeOriginatorConfigForm=this.fb.group({originatorSource:[e?e.originatorSource:null,[i.Validators.required]],relationsQuery:[e?e.relationsQuery:null,[]]})},t.prototype.validatorTriggers=function(){return["originatorSource"]},t.prototype.updateValidators=function(e){var t=this.changeOriginatorConfigForm.get("originatorSource").value;t&&t===k.RELATED?this.changeOriginatorConfigForm.get("relationsQuery").setValidators([i.Validators.required]):this.changeOriginatorConfigForm.get("relationsQuery").setValidators([]),this.changeOriginatorConfigForm.get("relationsQuery").updateValueAndValidity({emitEvent:e})},t}(a.RuleNodeConfigurationComponent);Pe.decorators=[{type:t.Component,args:[{selector:"tb-transformation-node-change-originator-config",template:'<section [formGroup]="changeOriginatorConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.originator-source</mat-label>\n <mat-select formControlName="originatorSource" required>\n <mat-option *ngFor="let source of originatorSources" [value]="source">\n {{ originatorSourceTranslationMap.get(source) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <section fxLayout="column" *ngIf="changeOriginatorConfigForm.get(\'originatorSource\').value === originatorSource.RELATED">\n <label translate class="tb-title tb-required">tb.rulenode.relations-query</label>\n <tb-relations-query-config\n required\n formControlName="relationsQuery"\n style="padding-bottom: 15px;">\n </tb-relations-query-config>\n </section>\n</section>\n'}]}],Pe.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var we=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return f(t,e),t.prototype.configForm=function(){return this.scriptConfigForm},t.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},t.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"update",this.translate.instant("tb.rulenode.transformer"),"Transform",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},t.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},t}(a.RuleNodeConfigurationComponent);we.decorators=[{type:t.Component,args:[{selector:"tb-transformation-node-script-config",template:'<section [formGroup]="scriptConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.transform</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Transform"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-transformer-function\' | translate }}\n </button>\n </div>\n</section>\n'}]}],we.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},we.propDecorators={jsFuncComponent:[{type:t.ViewChild,args:["jsFuncComponent",{static:!0}]}]};var Re=function(e){function t(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return f(t,e),t.prototype.configForm=function(){return this.toEmailConfigForm},t.prototype.onConfigurationSet=function(e){this.toEmailConfigForm=this.fb.group({fromTemplate:[e?e.fromTemplate:null,[i.Validators.required]],toTemplate:[e?e.toTemplate:null,[i.Validators.required]],ccTemplate:[e?e.ccTemplate:null,[]],bccTemplate:[e?e.bccTemplate:null,[]],subjectTemplate:[e?e.subjectTemplate:null,[i.Validators.required]],bodyTemplate:[e?e.bodyTemplate:null,[i.Validators.required]]})},t}(a.RuleNodeConfigurationComponent);Re.decorators=[{type:t.Component,args:[{selector:"tb-transformation-node-to-email-config",template:'<section [formGroup]="toEmailConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.from-template</mat-label>\n <textarea required matInput formControlName="fromTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'fromTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.from-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.from-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.to-template</mat-label>\n <textarea required matInput formControlName="toTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'toTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.to-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.cc-template</mat-label>\n <textarea matInput formControlName="ccTemplate" rows="2"></textarea>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.bcc-template</mat-label>\n <textarea matInput formControlName="bccTemplate" rows="2"></textarea>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.subject-template</mat-label>\n <textarea required matInput formControlName="subjectTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'subjectTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.subject-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.subject-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.body-template</mat-label>\n <textarea required matInput formControlName="bodyTemplate" rows="6"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'bodyTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.body-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.body-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}]}],Re.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]};var De=function(){};De.decorators=[{type:t.NgModule,args:[{declarations:[Pe,we,Re],imports:[r.CommonModule,a.SharedModule,ne],exports:[Pe,we,Re]}]}];var Oe=function(e){!function(e){e.setTranslation("en_US",{tb:{rulenode:{"create-entity-if-not-exists":"Create new entity if not exists","create-entity-if-not-exists-hint":"Create a new entity set above if it does not exist.","entity-name-pattern":"Name pattern","entity-name-pattern-required":"Name pattern is required","entity-name-pattern-hint":"Name pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","entity-type-pattern":"Type pattern","entity-type-pattern-required":"Type pattern is required","entity-type-pattern-hint":"Type pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","entity-cache-expiration":"Entities cache expiration time (sec)","entity-cache-expiration-hint":"Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.","entity-cache-expiration-required":"Entities cache expiration time is required.","entity-cache-expiration-range":"Entities cache expiration time should be greater than or equal to 0.","customer-name-pattern":"Customer name pattern","customer-name-pattern-required":"Customer name pattern is required","create-customer-if-not-exists":"Create new customer if not exists","customer-cache-expiration":"Customers cache expiration time (sec)","customer-name-pattern-hint":"Customer name pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","customer-cache-expiration-hint":"Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.","customer-cache-expiration-required":"Customers cache expiration time is required.","customer-cache-expiration-range":"Customers cache expiration time should be greater than or equal to 0.","start-interval":"Start Interval","end-interval":"End Interval","start-interval-time-unit":"Start Interval Time Unit","end-interval-time-unit":"End Interval Time Unit","fetch-mode":"Fetch mode","fetch-mode-hint":"If selected fetch mode 'ALL' you able to choose telemetry sampling order.","order-by":"Order by","order-by-hint":"Select to choose telemetry sampling order.",limit:"Limit","limit-hint":"Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.","time-unit-milliseconds":"Milliseconds","time-unit-seconds":"Seconds","time-unit-minutes":"Minutes","time-unit-hours":"Hours","time-unit-days":"Days","time-value-range":"Time value should be in a range from 1 to 2147483647.","start-interval-value-required":"Start interval value is required.","end-interval-value-required":"End interval value is required.",filter:"Filter",switch:"Switch","message-type":"Message type","message-type-required":"Message type is required.","message-types-filter":"Message types filter","no-message-types-found":"No message types found","no-message-type-matching":"'{{messageType}}' not found.","create-new-message-type":"Create a new one!","message-types-required":"Message types are required.","client-attributes":"Client attributes","client-attributes-hint":"Client attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","shared-attributes":"Shared attributes","shared-attributes-hint":"Shared attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","server-attributes":"Server attributes","server-attributes-hint":"Server attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","latest-timeseries":"Latest timeseries","latest-timeseries-hint":"Latest timeseries, use <code>${metaKeyName}</code> to substitute variables from metadata","data-keys":"Message data","metadata-keys":"Message metadata","relations-query":"Relations query","device-relations-query":"Device relations query","max-relation-level":"Max relation level","relation-type-pattern":"Relation type pattern","relation-type-pattern-hint":"Relation type pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","relation-type-pattern-required":"Relation type pattern is required","relation-types-list":"Relation types to propagate","relation-types-list-hint":"If Propagate relation types are not selected, alarms will be propagated without filtering by relation type.","unlimited-level":"Unlimited level","latest-telemetry":"Latest telemetry","attr-mapping":"Attributes mapping","source-attribute":"Source attribute","source-attribute-required":"Source attribute is required.","source-telemetry":"Source telemetry","source-telemetry-required":"Source telemetry is required.","target-attribute":"Target attribute","target-attribute-required":"Target attribute is required.","attr-mapping-required":"At least one attribute mapping should be specified.","fields-mapping":"Fields mapping","fields-mapping-required":"At least one field mapping should be specified.","source-field":"Source field","source-field-required":"Source field is required.","originator-source":"Originator source","originator-customer":"Customer","originator-tenant":"Tenant","originator-related":"Related","originator-alarm-originator":"Alarm Originator","clone-message":"Clone message",transform:"Transform","default-ttl":"Default TTL in seconds","default-ttl-required":"Default TTL is required.","min-default-ttl-message":"Only 0 minimum TTL is allowed.","message-count":"Message count (0 - unlimited)","message-count-required":"Message count is required.","min-message-count-message":"Only 0 minimum message count is allowed.","period-seconds":"Period in seconds","period-seconds-required":"Period is required.","use-metadata-period-in-seconds-patterns":"Use metadata period in seconds pattern","use-metadata-period-in-seconds-patterns-hint":"If selected, rule node use period in seconds interval pattern from message metadata assuming that intervals are in the seconds.","period-in-seconds-pattern":"Period in seconds metadata pattern","period-in-seconds-pattern-required":"Period in seconds pattern is required","period-in-seconds-pattern-hint":"Period in seconds pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","min-period-seconds-message":"Only 1 second minimum period is allowed.",originator:"Originator","message-body":"Message body","message-metadata":"Message metadata",generate:"Generate","test-generator-function":"Test generator function",generator:"Generator","test-filter-function":"Test filter function","test-switch-function":"Test switch function","test-transformer-function":"Test transformer function",transformer:"Transformer","alarm-create-condition":"Alarm create condition","test-condition-function":"Test condition function","alarm-clear-condition":"Alarm clear condition","alarm-details-builder":"Alarm details builder","test-details-function":"Test details function","alarm-type":"Alarm type","alarm-type-required":"Alarm type is required.","alarm-severity":"Alarm severity","alarm-severity-required":"Alarm severity is required","alarm-status-filter":"Alarm status filter","alarm-status-list-empty":"Alarm status list is empty","no-alarm-status-matching":"No alarm status matching were found.",propagate:"Propagate",condition:"Condition",details:"Details","to-string":"To string","test-to-string-function":"Test to string function","from-template":"From Template","from-template-required":"From Template is required","from-template-hint":"From address template, use <code>${metaKeyName}</code> to substitute variables from metadata","to-template":"To Template","to-template-required":"To Template is required","mail-address-list-template-hint":"Comma separated address list, use <code>${metaKeyName}</code> to substitute variables from metadata","cc-template":"Cc Template","bcc-template":"Bcc Template","subject-template":"Subject Template","subject-template-required":"Subject Template is required","subject-template-hint":"Mail subject template, use <code>${metaKeyName}</code> to substitute variables from metadata","body-template":"Body Template","body-template-required":"Body Template is required","body-template-hint":"Mail body template, use <code>${metaKeyName}</code> to substitute variables from metadata","request-id-metadata-attribute":"Request Id Metadata attribute name","timeout-sec":"Timeout in seconds","timeout-required":"Timeout is required","min-timeout-message":"Only 0 minimum timeout value is allowed.","endpoint-url-pattern":"Endpoint URL pattern","endpoint-url-pattern-required":"Endpoint URL pattern is required","endpoint-url-pattern-hint":"HTTP URL address pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","request-method":"Request method","use-simple-client-http-factory":"Use simple client HTTP factory","read-timeout":"Read timeout in millis","read-timeout-hint":"The value of 0 means an infinite timeout","max-parallel-requests-count":"Max number of parallel requests","max-parallel-requests-count-hint":"The value of 0 specifies no limit in parallel processing",headers:"Headers","headers-hint":"Use <code>${metaKeyName}</code> in header/value fields to substitute variables from metadata",header:"Header","header-required":"Header is required",value:"Value","value-required":"Value is required","topic-pattern":"Topic pattern","topic-pattern-required":"Topic pattern is required","mqtt-topic-pattern-hint":"MQTT topic pattern, use <code>${metaKeyName}</code> to substitute variables from metadata",topic:"Topic","topic-required":"Topic is required","bootstrap-servers":"Bootstrap servers","bootstrap-servers-required":"Bootstrap servers value is required","other-properties":"Other properties",key:"Key","key-required":"Key is required",retries:"Automatically retry times if fails","min-retries-message":"Only 0 minimum retries is allowed.","batch-size-bytes":"Produces batch size in bytes","min-batch-size-bytes-message":"Only 0 minimum batch size is allowed.","linger-ms":"Time to buffer locally (ms)","min-linger-ms-message":"Only 0 ms minimum value is allowed.","buffer-memory-bytes":"Client buffer max size in bytes","min-buffer-memory-message":"Only 0 minimum buffer size is allowed.",acks:"Number of acknowledgments","key-serializer":"Key serializer","key-serializer-required":"Key serializer is required","value-serializer":"Value serializer","value-serializer-required":"Value serializer is required","topic-arn-pattern":"Topic ARN pattern","topic-arn-pattern-required":"Topic ARN pattern is required","topic-arn-pattern-hint":"Topic ARN pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","aws-access-key-id":"AWS Access Key ID","aws-access-key-id-required":"AWS Access Key ID is required","aws-secret-access-key":"AWS Secret Access Key","aws-secret-access-key-required":"AWS Secret Access Key is required","aws-region":"AWS Region","aws-region-required":"AWS Region is required","exchange-name-pattern":"Exchange name pattern","routing-key-pattern":"Routing key pattern","message-properties":"Message properties",host:"Host","host-required":"Host is required",port:"Port","port-required":"Port is required","port-range":"Port should be in a range from 1 to 65535.","virtual-host":"Virtual host",username:"Username",password:"Password","automatic-recovery":"Automatic recovery","connection-timeout-ms":"Connection timeout (ms)","min-connection-timeout-ms-message":"Only 0 ms minimum value is allowed.","handshake-timeout-ms":"Handshake timeout (ms)","min-handshake-timeout-ms-message":"Only 0 ms minimum value is allowed.","client-properties":"Client properties","queue-url-pattern":"Queue URL pattern","queue-url-pattern-required":"Queue URL pattern is required","queue-url-pattern-hint":"Queue URL pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","delay-seconds":"Delay (seconds)","min-delay-seconds-message":"Only 0 seconds minimum value is allowed.","max-delay-seconds-message":"Only 900 seconds maximum value is allowed.",name:"Name","name-required":"Name is required","queue-type":"Queue type","sqs-queue-standard":"Standard","sqs-queue-fifo":"FIFO","gcp-project-id":"GCP project ID","gcp-project-id-required":"GCP project ID is required","gcp-service-account-key":"GCP service account key file","gcp-service-account-key-required":"GCP service account key file is required","pubsub-topic-name":"Topic name","pubsub-topic-name-required":"Topic name is required","message-attributes":"Message attributes","message-attributes-hint":"Use <code>${metaKeyName}</code> in name/value fields to substitute variables from metadata","connect-timeout":"Connection timeout (sec)","connect-timeout-required":"Connection timeout is required.","connect-timeout-range":"Connection timeout should be in a range from 1 to 200.","client-id":"Client ID","device-id":"Device ID","device-id-required":"Device ID is required.","clean-session":"Clean session","enable-ssl":"Enable SSL",credentials:"Credentials","credentials-type":"Credentials type","credentials-type-required":"Credentials type is required.","credentials-anonymous":"Anonymous","credentials-basic":"Basic","credentials-pem":"PEM","credentials-sas":"Shared Access Signature","sas-key":"SAS Key","sas-key-required":"SAS Key is required.",hostname:"Hostname","hostname-required":"Hostname is required.","azure-ca-cert":"CA certificate file","username-required":"Username is required.","password-required":"Password is required.","ca-cert":"CA certificate file *","private-key":"Private key file *",cert:"Certificate file *","no-file":"No file selected.","drop-file":"Drop a file or click to select a file to upload.","private-key-password":"Private key password","use-system-smtp-settings":"Use system SMTP settings","use-metadata-interval-patterns":"Use metadata interval patterns","use-metadata-interval-patterns-hint":"If selected, rule node use start and end interval patterns from message metadata assuming that intervals are in the milliseconds.","use-message-alarm-data":"Use message alarm data","check-all-keys":"Check that all selected keys are present","check-all-keys-hint":"If selected, checks that all specified keys are present in the message data and metadata.","check-relation-to-specific-entity":"Check relation to specific entity","check-relation-hint":"Checks existence of relation to specific entity or to any entity based on direction and relation type.","delete-relation-to-specific-entity":"Delete relation to specific entity","delete-relation-hint":"Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.","remove-current-relations":"Remove current relations","remove-current-relations-hint":"Removes current relations from the originator of the incoming message based on direction and type.","change-originator-to-related-entity":"Change originator to related entity","change-originator-to-related-entity-hint":"Used to process submitted message as a message from another entity.","start-interval-pattern":"Start interval pattern","end-interval-pattern":"End interval pattern","start-interval-pattern-required":"Start interval pattern is required","end-interval-pattern-required":"End interval pattern is required","start-interval-pattern-hint":"Start interval pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","end-interval-pattern-hint":"End interval pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","smtp-protocol":"Protocol","smtp-host":"SMTP host","smtp-host-required":"SMTP host is required.","smtp-port":"SMTP port","smtp-port-required":"You must supply a smtp port.","smtp-port-range":"SMTP port should be in a range from 1 to 65535.","timeout-msec":"Timeout ms","min-timeout-msec-message":"Only 0 ms minimum value is allowed.","enter-username":"Enter username","enter-password":"Enter password","enable-tls":"Enable TLS","tls-version":"TLS version","enable-proxy":"Enable proxy","use-system-proxy-properties":"Use system proxy properties","proxy-host":"Proxy host","proxy-host-required":"Proxy host is required.","proxy-port":"Proxy port","proxy-port-required":"Proxy port is required.","proxy-port-range":"Proxy port should be in a range from 1 to 65535.","proxy-user":"Proxy user","proxy-password":"Proxy password","proxy-scheme":"Proxy scheme","min-period-0-seconds-message":"Only 0 second minimum period is allowed.","max-pending-messages":"Maximum pending messages","max-pending-messages-required":"Maximum pending messages is required.","max-pending-messages-range":"Maximum pending messages should be in a range from 1 to 100000.","originator-types-filter":"Originator types filter","interval-seconds":"Interval in seconds","interval-seconds-required":"Interval is required.","min-interval-seconds-message":"Only 1 second minimum interval is allowed.","output-timeseries-key-prefix":"Output timeseries key prefix","output-timeseries-key-prefix-required":"Output timeseries key prefix required.","separator-hint":'You should press "enter" to complete field input.',"entity-details":"Select entity details:","entity-details-title":"Title","entity-details-country":"Country","entity-details-state":"State","entity-details-zip":"Zip","entity-details-address":"Address","entity-details-address2":"Address2","entity-details-additional_info":"Additional Info","entity-details-phone":"Phone","entity-details-email":"Email","add-to-metadata":"Add selected details to message metadata","add-to-metadata-hint":"If selected, adds the selected details keys to the message metadata instead of message data.","entity-details-list-empty":"No entity details selected.","no-entity-details-matching":"No entity details matching were found.","custom-table-name":"Custom table name","custom-table-name-required":"Table Name is required","custom-table-hint":"You should enter the table name without prefix 'cs_tb_'.","message-field":"Message field","message-field-required":"Message field is required.","table-col":"Table column","table-col-required":"Table column is required.","latitude-key-name":"Latitude key name","longitude-key-name":"Longitude key name","latitude-key-name-required":"Latitude key name is required.","longitude-key-name-required":"Longitude key name is required.","fetch-perimeter-info-from-message-metadata":"Fetch perimeter information from message metadata","perimeter-circle":"Circle","perimeter-polygon":"Polygon","perimeter-type":"Perimeter type","circle-center-latitude":"Center latitude","circle-center-latitude-required":"Center latitude is required.","circle-center-longitude":"Center longitude","circle-center-longitude-required":"Center longitude is required.","range-unit-meter":"Meter","range-unit-kilometer":"Kilometer","range-unit-foot":"Foot","range-unit-mile":"Mile","range-unit-nautical-mile":"Nautical mile","range-units":"Range units",range:"Range","range-required":"Range is required.","polygon-definition":"Polygon definition","polygon-definition-required":"Polygon definition is required.","polygon-definition-hint":"Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].","min-inside-duration":"Minimal inside duration","min-inside-duration-value-required":"Minimal inside duration is required","min-inside-duration-time-unit":"Minimal inside duration time unit","min-outside-duration":"Minimal outside duration","min-outside-duration-value-required":"Minimal outside duration is required","min-outside-duration-time-unit":"Minimal outside duration time unit","tell-failure-if-absent":"Tell Failure","tell-failure-if-absent-hint":'If at least one selected key doesn\'t exist the outbound message will report "Failure".',"get-latest-value-with-ts":"Fetch Latest telemetry with Timestamp","get-latest-value-with-ts-hint":'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "&lcub;\\"ts\\":1574329385897,\\"value\\":42&rcub;"',"use-redis-queue":"Use redis queue for message persistence","trim-redis-queue":"Trim redis queue","redis-queue-max-size":"Redis queue max size","add-metadata-key-values-as-kafka-headers":"Add Message metadata key-value pairs to Kafka record headers","add-metadata-key-values-as-kafka-headers-hint":"If selected, key-value pairs from message metadata will be added to the outgoing records headers as byte arrays with predefined charset encoding.","charset-encoding":"Charset encoding","charset-encoding-required":"Charset encoding is required.","charset-us-ascii":"US-ASCII","charset-iso-8859-1":"ISO-8859-1","charset-utf-8":"UTF-8","charset-utf-16be":"UTF-16BE","charset-utf-16le":"UTF-16LE","charset-utf-16":"UTF-16","select-queue-hint":"The queue name can be selected from a drop-down list or add a custom name."},"key-val":{key:"Key",value:"Value","remove-entry":"Remove entry","add-entry":"Add entry"}}},!0)}(e)};Oe.decorators=[{type:t.NgModule,args:[{declarations:[y],imports:[r.CommonModule,a.SharedModule],exports:[ge,qe,Me,De,y]}]}],Oe.ctorParameters=function(){return[{type:n.TranslateService}]},e.RuleNodeCoreConfigModule=Oe,e.ɵa=y,e.ɵb=ge,e.ɵba=ce,e.ɵbb=fe,e.ɵbc=ne,e.ɵbd=X,e.ɵbe=ee,e.ɵbf=te,e.ɵbg=re,e.ɵbh=qe,e.ɵbi=ye,e.ɵbj=be,e.ɵbk=he,e.ɵbl=Ce,e.ɵbm=ve,e.ɵbn=Fe,e.ɵbo=xe,e.ɵbp=Te,e.ɵbq=Me,e.ɵbr=Ie,e.ɵbs=Se,e.ɵbt=ke,e.ɵbu=Ne,e.ɵbv=Ve,e.ɵbw=Ee,e.ɵbx=Ae,e.ɵby=Le,e.ɵbz=De,e.ɵc=b,e.ɵca=Pe,e.ɵcb=we,e.ɵcc=Re,e.ɵd=h,e.ɵe=C,e.ɵf=v,e.ɵg=F,e.ɵh=x,e.ɵi=T,e.ɵj=q,e.ɵk=I,e.ɵl=S,e.ɵm=N,e.ɵn=W,e.ɵo=Y,e.ɵp=J,e.ɵq=Z,e.ɵr=ae,e.ɵs=oe,e.ɵt=ie,e.ɵu=le,e.ɵv=se,e.ɵw=me,e.ɵx=ue,e.ɵy=de,e.ɵz=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
  15 + ***************************************************************************** */var g=function(e,t){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function y(e,t){function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function b(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}Object.create;function C(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var v,F=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.emptyConfigForm},r.prototype.onConfigurationSet=function(e){this.emptyConfigForm=this.fb.group({})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-node-empty-config",template:"<div></div>"}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),x=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.attributeScopes=Object.keys(a.AttributeScope),n.telemetryTypeTranslationsMap=a.telemetryTypeTranslations,n}return y(r,e),r.prototype.configForm=function(){return this.attributesConfigForm},r.prototype.onConfigurationSet=function(e){this.attributesConfigForm=this.fb.group({scope:[e?e.scope:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-attributes-config",template:'<section [formGroup]="attributesConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>attribute.attributes-scope</mat-label>\n <mat-select formControlName="scope" required>\n <mat-option *ngFor="let scope of attributeScopes" [value]="scope">\n {{ telemetryTypeTranslationsMap.get(scope) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),T=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.timeseriesConfigForm},r.prototype.onConfigurationSet=function(e){this.timeseriesConfigForm=this.fb.group({defaultTTL:[e?e.defaultTTL:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-timeseries-config",template:'<section [formGroup]="timeseriesConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.default-ttl</mat-label>\n <input type="number" min="0" step="1" matInput formControlName="defaultTTL" required>\n <mat-error *ngIf="timeseriesConfigForm.get(\'defaultTTL\').hasError(\'required\')">\n {{ \'tb.rulenode.default-ttl-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="timeseriesConfigForm.get(\'defaultTTL\').hasError(\'min\')">\n {{ \'tb.rulenode.min-default-ttl-message\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),q=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.rpcRequestConfigForm},r.prototype.onConfigurationSet=function(e){this.rpcRequestConfigForm=this.fb.group({timeoutInSeconds:[e?e.timeoutInSeconds:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-rpc-request-config",template:'<section [formGroup]="rpcRequestConfigForm" fxLayout="column">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.timeout-sec</mat-label>\n <input type="number" min="0" step="1" matInput formControlName="timeoutInSeconds" required>\n <mat-error *ngIf="rpcRequestConfigForm.get(\'timeoutInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="rpcRequestConfigForm.get(\'timeoutInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-timeout-message\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),S=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.logConfigForm},r.prototype.onConfigurationSet=function(e){this.logConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.logConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"string",this.translate.instant("tb.rulenode.to-string"),"ToString",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.logConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-action-node-log-config",template:'<section [formGroup]="logConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.to-string</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="ToString"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-to-string-function\' | translate }}\n </button>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),I=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.assignCustomerConfigForm},r.prototype.onConfigurationSet=function(e){this.assignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required]],createCustomerIfNotExists:[!!e&&e.createCustomerIfNotExists,[]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-assign-to-customer-config",template:'<section [formGroup]="assignCustomerConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-name-pattern</mat-label>\n <input required matInput formControlName="customerNamePattern">\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="createCustomerIfNotExists" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.create-customer-if-not-exists\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="customerCacheExpiration">\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="assignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.customer-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),k=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.clearAlarmConfigForm},r.prototype.onConfigurationSet=function(e){this.clearAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],alarmType:[e?e.alarmType:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.clearAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.clearAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-action-node-clear-alarm-config",template:'<section [formGroup]="clearAlarmConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.alarm-details-builder</label>\n <tb-js-func #jsFuncComponent\n formControlName="alarmDetailsBuildJs"\n functionName="Details"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-details-function\' | translate }}\n </button>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.alarm-type</mat-label>\n <input required matInput formControlName="alarmType">\n <mat-error *ngIf="clearAlarmConfigForm.get(\'alarmType\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-type-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),N=function(e){function r(t,r,n,o){var i=e.call(this,t)||this;return i.store=t,i.fb=r,i.nodeScriptTestService=n,i.translate=o,i.alarmSeverities=Object.keys(a.AlarmSeverity),i.alarmSeverityTranslationMap=a.alarmSeverityTranslations,i.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],i}return y(r,e),r.prototype.configForm=function(){return this.createAlarmConfigForm},r.prototype.onConfigurationSet=function(e){this.createAlarmConfigForm=this.fb.group({alarmDetailsBuildJs:[e?e.alarmDetailsBuildJs:null,[i.Validators.required]],useMessageAlarmData:[!!e&&e.useMessageAlarmData,[]],alarmType:[e?e.alarmType:null,[]],severity:[e?e.severity:null,[]],propagate:[!!e&&e.propagate,[]],relationTypes:[e?e.relationTypes:null,[]]})},r.prototype.validatorTriggers=function(){return["useMessageAlarmData"]},r.prototype.updateValidators=function(e){this.createAlarmConfigForm.get("useMessageAlarmData").value?(this.createAlarmConfigForm.get("alarmType").setValidators([]),this.createAlarmConfigForm.get("severity").setValidators([])):(this.createAlarmConfigForm.get("alarmType").setValidators([i.Validators.required]),this.createAlarmConfigForm.get("severity").setValidators([i.Validators.required])),this.createAlarmConfigForm.get("alarmType").updateValueAndValidity({emitEvent:e}),this.createAlarmConfigForm.get("severity").updateValueAndValidity({emitEvent:e})},r.prototype.testScript=function(){var e=this,t=this.createAlarmConfigForm.get("alarmDetailsBuildJs").value;this.nodeScriptTestService.testNodeScript(t,"json",this.translate.instant("tb.rulenode.details"),"Details",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.createAlarmConfigForm.get("alarmDetailsBuildJs").setValue(t)}))},r.prototype.removeKey=function(e,t){var r=this.createAlarmConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.createAlarmConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.createAlarmConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.createAlarmConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-action-node-create-alarm-config",template:'<section [formGroup]="createAlarmConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.alarm-details-builder</label>\n <tb-js-func #jsFuncComponent\n formControlName="alarmDetailsBuildJs"\n functionName="Details"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-details-function\' | translate }}\n </button>\n </div>\n <mat-checkbox formControlName="useMessageAlarmData" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-message-alarm-data\' | translate }}\n </mat-checkbox>\n <section fxLayout="column" *ngIf="createAlarmConfigForm.get(\'useMessageAlarmData\').value === false">\n <section fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.alarm-type</mat-label>\n <input required matInput formControlName="alarmType">\n <mat-error *ngIf="createAlarmConfigForm.get(\'alarmType\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-type-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.alarm-severity</mat-label>\n <mat-select formControlName="severity" required>\n <mat-option *ngFor="let severity of alarmSeverities" [value]="severity">\n {{ alarmSeverityTranslationMap.get(severity) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="createAlarmConfigForm.get(\'severity\').hasError(\'required\')">\n {{ \'tb.rulenode.alarm-severity-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </section>\n <mat-checkbox formControlName="propagate" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.propagate\' | translate }}\n </mat-checkbox>\n <section *ngIf="createAlarmConfigForm.get(\'propagate\').value === true">\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.relation-types-list</mat-label>\n <mat-chip-list #relationTypesChipList>\n <mat-chip\n *ngFor="let key of createAlarmConfigForm.get(\'relationTypes\').value;"\n (removed)="removeKey(key, \'relationTypes\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.relation-types-list\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="relationTypesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'relationTypes\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-types-list-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </section>\n </section>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),V=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return y(r,e),r.prototype.configForm=function(){return this.createRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.createRelationConfigForm=this.fb.group({direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[i.Validators.required]],entityNamePattern:[e?e.entityNamePattern:null,[]],entityTypePattern:[e?e.entityTypePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],createEntityIfNotExists:[!!e&&e.createEntityIfNotExists,[]],removeCurrentRelations:[!!e&&e.removeCurrentRelations,[]],changeOriginatorToRelatedEntity:[!!e&&e.changeOriginatorToRelatedEntity,[]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.validatorTriggers=function(){return["entityType"]},r.prototype.updateValidators=function(e){var t=this.createRelationConfigForm.get("entityType").value;t?this.createRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required]):this.createRelationConfigForm.get("entityNamePattern").setValidators([]),!t||t!==a.EntityType.DEVICE&&t!==a.EntityType.ASSET?this.createRelationConfigForm.get("entityTypePattern").setValidators([]):this.createRelationConfigForm.get("entityTypePattern").setValidators([i.Validators.required]),this.createRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e}),this.createRelationConfigForm.get("entityTypePattern").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-create-relation-config",template:'<section [formGroup]="createRelationConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout="row" fxLayoutGap="8px">\n <tb-entity-type-select\n showLabel\n style="min-width: 100px;"\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <mat-form-field *ngIf="createRelationConfigForm.get(\'entityType\').value" fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-name-pattern</mat-label>\n <input required matInput formControlName="entityNamePattern">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field *ngIf="createRelationConfigForm.get(\'entityType\').value === entityType.DEVICE ||\n createRelationConfigForm.get(\'entityType\').value === entityType.ASSET"\n fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-type-pattern</mat-label>\n <input required matInput formControlName="entityTypePattern">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityTypePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.relation-type-pattern</mat-label>\n <input required matInput formControlName="relationType">\n <mat-error *ngIf="createRelationConfigForm.get(\'relationType\').hasError(\'required\')">\n {{ \'tb.rulenode.relation-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <section *ngIf="createRelationConfigForm.get(\'entityType\').value === entityType.CUSTOMER ||\n createRelationConfigForm.get(\'entityType\').value === entityType.DEVICE ||\n createRelationConfigForm.get(\'entityType\').value === entityType.ASSET">\n <mat-checkbox formControlName="createEntityIfNotExists">\n {{ \'tb.rulenode.create-entity-if-not-exists\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.create-entity-if-not-exists-hint</div>\n </section>\n <mat-checkbox formControlName="removeCurrentRelations">\n {{ \'tb.rulenode.remove-current-relations\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.remove-current-relations-hint</div>\n <mat-checkbox formControlName="changeOriginatorToRelatedEntity">\n {{ \'tb.rulenode.change-originator-to-related-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.change-originator-to-related-entity-hint</div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.entity-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="entityCacheExpiration">\n <mat-error *ngIf="createRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="createRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.entity-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),E=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.msgDelayConfigForm},r.prototype.onConfigurationSet=function(e){this.msgDelayConfigForm=this.fb.group({useMetadataPeriodInSecondsPatterns:[!!e&&e.useMetadataPeriodInSecondsPatterns,[]],periodInSeconds:[e?e.periodInSeconds:null,[]],periodInSecondsPattern:[e?e.periodInSecondsPattern:null,[]],maxPendingMsgs:[e?e.maxPendingMsgs:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(1e5)]]})},r.prototype.validatorTriggers=function(){return["useMetadataPeriodInSecondsPatterns"]},r.prototype.updateValidators=function(e){this.msgDelayConfigForm.get("useMetadataPeriodInSecondsPatterns").value?(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([i.Validators.required]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([])):(this.msgDelayConfigForm.get("periodInSecondsPattern").setValidators([]),this.msgDelayConfigForm.get("periodInSeconds").setValidators([i.Validators.required,i.Validators.min(0)])),this.msgDelayConfigForm.get("periodInSecondsPattern").updateValueAndValidity({emitEvent:e}),this.msgDelayConfigForm.get("periodInSeconds").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-msg-delay-config",template:'<section [formGroup]="msgDelayConfigForm" fxLayout="column">\n <mat-checkbox formControlName="useMetadataPeriodInSecondsPatterns">\n {{ \'tb.rulenode.use-metadata-period-in-seconds-patterns\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.use-metadata-period-in-seconds-patterns-hint</div>\n <mat-form-field *ngIf="msgDelayConfigForm.get(\'useMetadataPeriodInSecondsPatterns\').value !== true; else periodInSecondsPattern"\n class="mat-block">\n <mat-label translate>tb.rulenode.period-seconds</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="periodInSeconds">\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.period-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-period-0-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <ng-template #periodInSecondsPattern>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.period-in-seconds-pattern</mat-label>\n <input required matInput formControlName="periodInSecondsPattern">\n <mat-error *ngIf="msgDelayConfigForm.get(\'periodInSecondsPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.period-in-seconds-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.period-in-seconds-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </ng-template>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.max-pending-messages</mat-label>\n <input required type="number" min="1" max="100000" step="1" matInput formControlName="maxPendingMsgs">\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'required\')">\n {{ \'tb.rulenode.max-pending-messages-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'min\')">\n {{ \'tb.rulenode.max-pending-messages-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgDelayConfigForm.get(\'maxPendingMsgs\').hasError(\'max\')">\n {{ \'tb.rulenode.max-pending-messages-range\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),A=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n}return y(r,e),r.prototype.configForm=function(){return this.deleteRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.deleteRelationConfigForm=this.fb.group({deleteForSingleEntity:[!!e&&e.deleteForSingleEntity,[]],direction:[e?e.direction:null,[i.Validators.required]],entityType:[e?e.entityType:null,[]],entityNamePattern:[e?e.entityNamePattern:null,[]],relationType:[e?e.relationType:null,[i.Validators.required]],entityCacheExpiration:[e?e.entityCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.prototype.validatorTriggers=function(){return["deleteForSingleEntity","entityType"]},r.prototype.updateValidators=function(e){var t=this.deleteRelationConfigForm.get("deleteForSingleEntity").value,r=this.deleteRelationConfigForm.get("entityType").value;t?this.deleteRelationConfigForm.get("entityType").setValidators([i.Validators.required]):this.deleteRelationConfigForm.get("entityType").setValidators([]),t&&r?this.deleteRelationConfigForm.get("entityNamePattern").setValidators([i.Validators.required]):this.deleteRelationConfigForm.get("entityNamePattern").setValidators([]),this.deleteRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:!1}),this.deleteRelationConfigForm.get("entityNamePattern").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-delete-relation-config",template:'<section [formGroup]="deleteRelationConfigForm" fxLayout="column">\n <mat-checkbox formControlName="deleteForSingleEntity">\n {{ \'tb.rulenode.delete-relation-to-specific-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.delete-relation-hint</div>\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div *ngIf="deleteRelationConfigForm.get(\'deleteForSingleEntity\').value" fxLayout="row" fxLayoutGap="8px">\n <tb-entity-type-select\n showLabel\n style="min-width: 100px;"\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <mat-form-field *ngIf="deleteRelationConfigForm.get(\'entityType\').value" fxFlex class="mat-block" style="padding-bottom: 32px;">\n <mat-label translate>tb.rulenode.entity-name-pattern</mat-label>\n <input required matInput formControlName="entityNamePattern">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.relation-type-pattern</mat-label>\n <input required matInput formControlName="relationType">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'relationType\').hasError(\'required\')">\n {{ \'tb.rulenode.relation-type-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.relation-type-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.entity-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="entityCacheExpiration">\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.entity-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="deleteRelationConfigForm.get(\'entityCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.entity-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.entity-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),L=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.generatorConfigForm},r.prototype.onConfigurationSet=function(e){this.generatorConfigForm=this.fb.group({msgCount:[e?e.msgCount:null,[i.Validators.required,i.Validators.min(0)]],periodInSeconds:[e?e.periodInSeconds:null,[i.Validators.required,i.Validators.min(1)]],originator:[e?e.originator:null,[]],jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.prepareInputConfig=function(e){return e&&(e.originatorId&&e.originatorType?e.originator={id:e.originatorId,entityType:e.originatorType}:e.originator=null,delete e.originatorId,delete e.originatorType),e},r.prototype.prepareOutputConfig=function(e){return e.originator?(e.originatorId=e.originator.id,e.originatorType=e.originator.entityType):(e.originatorId=null,e.originatorType=null),delete e.originator,e},r.prototype.testScript=function(){var e=this,t=this.generatorConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"generate",this.translate.instant("tb.rulenode.generator"),"Generate",["prevMsg","prevMetadata","prevMsgType"],this.ruleNodeId).subscribe((function(t){t&&e.generatorConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-action-node-generator-config",template:'<section [formGroup]="generatorConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.message-count</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="msgCount">\n <mat-error *ngIf="generatorConfigForm.get(\'msgCount\').hasError(\'required\')">\n {{ \'tb.rulenode.message-count-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="generatorConfigForm.get(\'msgCount\').hasError(\'min\')">\n {{ \'tb.rulenode.min-message-count-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.period-seconds</mat-label>\n <input required type="number" min="1" step="1" matInput formControlName="periodInSeconds">\n <mat-error *ngIf="generatorConfigForm.get(\'periodInSeconds\').hasError(\'required\')">\n {{ \'tb.rulenode.period-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="generatorConfigForm.get(\'periodInSeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-period-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <div fxLayout="column">\n <label class="tb-small">{{ \'tb.rulenode.originator\' | translate }}</label>\n <tb-entity-select\n required="false"\n formControlName="originator">\n </tb-entity-select>\n </div>\n <label translate class="tb-title no-padding">tb.rulenode.generate</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Generate"\n [functionArgs]="[\'prevMsg\', \'prevMetadata\', \'prevMsgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row" style="padding-bottom: 16px;">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-generator-function\' | translate }}\n </button>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent);!function(e){e.CUSTOMER="CUSTOMER",e.TENANT="TENANT",e.RELATED="RELATED",e.ALARM_ORIGINATOR="ALARM_ORIGINATOR"}(v||(v={}));var M,P=new Map([[v.CUSTOMER,"tb.rulenode.originator-customer"],[v.TENANT,"tb.rulenode.originator-tenant"],[v.RELATED,"tb.rulenode.originator-related"],[v.ALARM_ORIGINATOR,"tb.rulenode.originator-alarm-originator"]]);!function(e){e.CIRCLE="CIRCLE",e.POLYGON="POLYGON"}(M||(M={}));var R,w=new Map([[M.CIRCLE,"tb.rulenode.perimeter-circle"],[M.POLYGON,"tb.rulenode.perimeter-polygon"]]);!function(e){e.MILLISECONDS="MILLISECONDS",e.SECONDS="SECONDS",e.MINUTES="MINUTES",e.HOURS="HOURS",e.DAYS="DAYS"}(R||(R={}));var O,D=new Map([[R.MILLISECONDS,"tb.rulenode.time-unit-milliseconds"],[R.SECONDS,"tb.rulenode.time-unit-seconds"],[R.MINUTES,"tb.rulenode.time-unit-minutes"],[R.HOURS,"tb.rulenode.time-unit-hours"],[R.DAYS,"tb.rulenode.time-unit-days"]]);!function(e){e.METER="METER",e.KILOMETER="KILOMETER",e.FOOT="FOOT",e.MILE="MILE",e.NAUTICAL_MILE="NAUTICAL_MILE"}(O||(O={}));var K,B=new Map([[O.METER,"tb.rulenode.range-unit-meter"],[O.KILOMETER,"tb.rulenode.range-unit-kilometer"],[O.FOOT,"tb.rulenode.range-unit-foot"],[O.MILE,"tb.rulenode.range-unit-mile"],[O.NAUTICAL_MILE,"tb.rulenode.range-unit-nautical-mile"]]);!function(e){e.TITLE="TITLE",e.COUNTRY="COUNTRY",e.STATE="STATE",e.ZIP="ZIP",e.ADDRESS="ADDRESS",e.ADDRESS2="ADDRESS2",e.PHONE="PHONE",e.EMAIL="EMAIL",e.ADDITIONAL_INFO="ADDITIONAL_INFO"}(K||(K={}));var U,j,H,G=new Map([[K.TITLE,"tb.rulenode.entity-details-title"],[K.COUNTRY,"tb.rulenode.entity-details-country"],[K.STATE,"tb.rulenode.entity-details-state"],[K.ZIP,"tb.rulenode.entity-details-zip"],[K.ADDRESS,"tb.rulenode.entity-details-address"],[K.ADDRESS2,"tb.rulenode.entity-details-address2"],[K.PHONE,"tb.rulenode.entity-details-phone"],[K.EMAIL,"tb.rulenode.entity-details-email"],[K.ADDITIONAL_INFO,"tb.rulenode.entity-details-additional_info"]]);!function(e){e.FIRST="FIRST",e.LAST="LAST",e.ALL="ALL"}(U||(U={})),function(e){e.ASC="ASC",e.DESC="DESC"}(j||(j={})),function(e){e.STANDARD="STANDARD",e.FIFO="FIFO"}(H||(H={}));var z,$=new Map([[H.STANDARD,"tb.rulenode.sqs-queue-standard"],[H.FIFO,"tb.rulenode.sqs-queue-fifo"]]),Q=["anonymous","basic","cert.PEM"],_=new Map([["anonymous","tb.rulenode.credentials-anonymous"],["basic","tb.rulenode.credentials-basic"],["cert.PEM","tb.rulenode.credentials-pem"]]),W=["sas","cert.PEM"],J=new Map([["sas","tb.rulenode.credentials-sas"],["cert.PEM","tb.rulenode.credentials-pem"]]);!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(z||(z={}));var Y=["US-ASCII","ISO-8859-1","UTF-8","UTF-16BE","UTF-16LE","UTF-16"],Z=new Map([["US-ASCII","tb.rulenode.charset-us-ascii"],["ISO-8859-1","tb.rulenode.charset-iso-8859-1"],["UTF-8","tb.rulenode.charset-utf-8"],["UTF-16BE","tb.rulenode.charset-utf-16be"],["UTF-16LE","tb.rulenode.charset-utf-16le"],["UTF-16","tb.rulenode.charset-utf-16"]]),X=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=M,n.perimeterTypes=Object.keys(M),n.perimeterTypeTranslationMap=w,n.rangeUnits=Object.keys(O),n.rangeUnitTranslationMap=B,n.timeUnits=Object.keys(R),n.timeUnitsTranslationMap=D,n}return y(r,e),r.prototype.configForm=function(){return this.geoActionConfigForm},r.prototype.onConfigurationSet=function(e){this.geoActionConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]],minInsideDuration:[e?e.minInsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minInsideDurationTimeUnit:[e?e.minInsideDurationTimeUnit:null,[i.Validators.required]],minOutsideDuration:[e?e.minOutsideDuration:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]],minOutsideDurationTimeUnit:[e?e.minOutsideDurationTimeUnit:null,[i.Validators.required]]})},r.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},r.prototype.updateValidators=function(e){var t=this.geoActionConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoActionConfigForm.get("perimeterType").value;t?this.geoActionConfigForm.get("perimeterType").setValidators([]):this.geoActionConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==M.CIRCLE?(this.geoActionConfigForm.get("centerLatitude").setValidators([]),this.geoActionConfigForm.get("centerLongitude").setValidators([]),this.geoActionConfigForm.get("range").setValidators([]),this.geoActionConfigForm.get("rangeUnit").setValidators([])):(this.geoActionConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoActionConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoActionConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoActionConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==M.POLYGON?this.geoActionConfigForm.get("polygonsDefinition").setValidators([]):this.geoActionConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoActionConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoActionConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoActionConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-gps-geofencing-config",template:'<section [formGroup]="geoActionConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.latitude-key-name</mat-label>\n <input matInput formControlName="latitudeKeyName" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'latitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.latitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.longitude-key-name</mat-label>\n <input matInput formControlName="longitudeKeyName" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'longitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.longitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="fetchPerimeterInfoFromMessageMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.fetch-perimeter-info-from-message-metadata\' | translate }}\n </mat-checkbox>\n <div fxLayout="row" *ngIf="!geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.perimeter-type</mat-label>\n <mat-select formControlName="perimeterType" required>\n <mat-option *ngFor="let type of perimeterTypes" [value]="type">\n {{ perimeterTypeTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column"\n *ngIf="geoActionConfigForm.get(\'perimeterType\').value === perimeterType.CIRCLE &&\n !geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-latitude</mat-label>\n <input type="number" min="-90" max="90" step="0.1" matInput formControlName="centerLatitude" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'centerLatitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-latitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-longitude</mat-label>\n <input type="number" min="-180" max="180" step="0.1" matInput formControlName="centerLongitude" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'centerLongitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-longitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range</mat-label>\n <input type="number" min="0" step="0.1" matInput formControlName="range" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'range\').hasError(\'required\')">\n {{ \'tb.rulenode.range-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range-units</mat-label>\n <mat-select formControlName="rangeUnit" required>\n <mat-option *ngFor="let type of rangeUnits" [value]="type">\n {{ rangeUnitTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout="column" *ngIf="geoActionConfigForm.get(\'perimeterType\').value === perimeterType.POLYGON &&\n !geoActionConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field class="mat-block" hintLabel="{{\'tb.rulenode.polygon-definition-hint\' | translate}}" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.polygon-definition</mat-label>\n <input matInput formControlName="polygonsDefinition" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'polygonsDefinition\').hasError(\'required\')">\n {{ \'tb.rulenode.polygon-definition-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-inside-duration</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="minInsideDuration" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'required\')">\n {{ \'tb.rulenode.min-inside-duration-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minInsideDuration\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-inside-duration-time-unit</mat-label>\n <mat-select formControlName="minInsideDurationTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-outside-duration</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="minOutsideDuration" required>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'required\')">\n {{ \'tb.rulenode.min-outside-duration-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="geoActionConfigForm.get(\'minOutsideDuration\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.min-outside-duration-time-unit</mat-label>\n <mat-select formControlName="minOutsideDurationTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ee=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.msgCountConfigForm},r.prototype.onConfigurationSet=function(e){this.msgCountConfigForm=this.fb.group({interval:[e?e.interval:null,[i.Validators.required,i.Validators.min(1)]],telemetryPrefix:[e?e.telemetryPrefix:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-msg-count-config",template:'<section [formGroup]="msgCountConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.interval-seconds</mat-label>\n <input required type="number" min="1" step="1" matInput formControlName="interval">\n <mat-error *ngIf="msgCountConfigForm.get(\'interval\').hasError(\'required\')">\n {{ \'tb.rulenode.interval-seconds-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="msgCountConfigForm.get(\'interval\').hasError(\'min\')">\n {{ \'tb.rulenode.min-interval-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.output-timeseries-key-prefix</mat-label>\n <input required matInput formControlName="telemetryPrefix">\n <mat-error *ngIf="msgCountConfigForm.get(\'telemetryPrefix\').hasError(\'required\')">\n {{ \'tb.rulenode.output-timeseries-key-prefix-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),te=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.rpcReplyConfigForm},r.prototype.onConfigurationSet=function(e){this.rpcReplyConfigForm=this.fb.group({requestIdMetaDataAttribute:[e?e.requestIdMetaDataAttribute:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-rpc-reply-config",template:'<section [formGroup]="rpcReplyConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.request-id-metadata-attribute</mat-label>\n <input matInput formControlName="requestIdMetaDataAttribute">\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),re=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.saveToCustomTableConfigForm},r.prototype.onConfigurationSet=function(e){this.saveToCustomTableConfigForm=this.fb.group({tableName:[e?e.tableName:null,[i.Validators.required]],fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-custom-table-config",template:'<section [formGroup]="saveToCustomTableConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.custom-table-name</mat-label>\n <input required matInput formControlName="tableName">\n <mat-error *ngIf="saveToCustomTableConfigForm.get(\'tableName\').hasError(\'required\')">\n {{ \'tb.rulenode.custom-table-name-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.custom-table-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title tb-required">tb.rulenode.fields-mapping</label>\n <tb-kv-map-config\n required\n formControlName="fieldsMapping"\n requiredText="tb.rulenode.fields-mapping-required"\n keyText="tb.rulenode.message-field"\n keyRequiredText="tb.rulenode.message-field-required"\n valText="tb.rulenode.table-col"\n valRequiredText="tb.rulenode.table-col-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ne=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.translate=r,o.injector=n,o.fb=a,o.propagateChange=null,o.valueChangeSubscription=null,o}var a;return y(r,e),a=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){this.ngControl=this.injector.get(i.NgControl),null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.kvListFormGroup=this.fb.group({}),this.kvListFormGroup.addControl("keyVals",this.fb.array([]))},r.prototype.keyValsFormArray=function(){return this.kvListFormGroup.get("keyVals")},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.kvListFormGroup.disable({emitEvent:!1}):this.kvListFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){var t,r,n=this;this.valueChangeSubscription&&this.valueChangeSubscription.unsubscribe();var a=[];if(e)try{for(var o=C(Object.keys(e)),l=o.next();!l.done;l=o.next()){var s=l.value;Object.prototype.hasOwnProperty.call(e,s)&&a.push(this.fb.group({key:[s,[i.Validators.required]],value:[e[s],[i.Validators.required]]}))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.kvListFormGroup.setControl("keyVals",this.fb.array(a)),this.valueChangeSubscription=this.kvListFormGroup.valueChanges.subscribe((function(){n.updateModel()}))},r.prototype.removeKeyVal=function(e){this.kvListFormGroup.get("keyVals").removeAt(e)},r.prototype.addKeyVal=function(){this.kvListFormGroup.get("keyVals").push(this.fb.group({key:["",[i.Validators.required]],value:["",[i.Validators.required]]}))},r.prototype.validate=function(e){return!this.kvListFormGroup.get("keyVals").value.length&&this.required?{kvMapRequired:!0}:this.kvListFormGroup.valid?null:{kvFieldsRequired:!0}},r.prototype.updateModel=function(){var e=this.kvListFormGroup.get("keyVals").value;if(this.required&&!e.length||!this.kvListFormGroup.valid)this.propagateChange(null);else{var t={};e.forEach((function(e){t[e.key]=e.value})),this.propagateChange(t)}},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:t.Injector},{type:i.FormBuilder}]},b([t.Input(),h("design:type",Boolean)],r.prototype,"disabled",void 0),b([t.Input(),h("design:type",String)],r.prototype,"requiredText",void 0),b([t.Input(),h("design:type",String)],r.prototype,"keyText",void 0),b([t.Input(),h("design:type",String)],r.prototype,"keyRequiredText",void 0),b([t.Input(),h("design:type",String)],r.prototype,"valText",void 0),b([t.Input(),h("design:type",String)],r.prototype,"valRequiredText",void 0),b([t.Input(),h("design:type",Boolean),h("design:paramtypes",[Boolean])],r.prototype,"required",null),r=a=b([t.Component({selector:"tb-kv-map-config",template:'<section fxLayout="column" class="tb-kv-map-config" [formGroup]="kvListFormGroup">\n <div class="header" fxFlex fxLayout="row" fxLayoutGap="8px">\n <span class="cell" fxFlex translate>{{ keyText }}</span>\n <span class="cell" fxFlex translate>{{ valText }}</span>\n <span [fxShow]="!disabled" style="width: 52px;" innerHTML="&nbsp"></span>\n </div>\n <div class="body">\n <div class="row" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px"\n formArrayName="keyVals"\n *ngFor="let keyValControl of keyValsFormArray().controls; let $index = index">\n <mat-form-field fxFlex floatLabel="always" hideRequiredMarker class="cell mat-block">\n <mat-label></mat-label>\n <input [formControl]="keyValControl.get(\'key\')" matInput required\n placeholder="{{ keyText | translate }}"/>\n <mat-error *ngIf="keyValControl.get(\'key\').hasError(\'required\')">\n {{ keyRequiredText | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" hideRequiredMarker class="cell mat-block">\n <mat-label></mat-label>\n <input [formControl]="keyValControl.get(\'value\')" matInput required\n placeholder="{{ valText | translate }}"/>\n <mat-error *ngIf="keyValControl.get(\'value\').hasError(\'required\')">\n {{ valRequiredText | translate }}\n </mat-error>\n </mat-form-field>\n <button mat-button mat-icon-button color="primary"\n [fxShow]="!disabled"\n type="button"\n (click)="removeKeyVal($index)"\n [disabled]="isLoading$ | async"\n matTooltip="{{ \'tb.key-val.remove-entry\' | translate }}"\n matTooltipPosition="above">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n <tb-error [error]="ngControl.hasError(\'kvMapRequired\')\n ? translate.instant(requiredText) : \'\'"></tb-error>\n <div style="margin-top: 8px;">\n <button mat-button mat-raised-button color="primary"\n [fxShow]="!disabled"\n [disabled]="isLoading$ | async"\n (click)="addKeyVal()"\n type="button"\n matTooltip="{{ \'tb.key-val.add-entry\' | translate }}"\n matTooltipPosition="above">\n <mat-icon>add</mat-icon>\n {{ \'action.add\' | translate }}\n </button>\n </div>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return a})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return a})),multi:!0}],styles:[":host .tb-kv-map-config{margin-bottom:16px}:host .tb-kv-map-config .header{padding-left:5px;padding-right:5px;padding-bottom:5px}:host .tb-kv-map-config .header .cell{padding-left:5px;padding-right:5px;color:rgba(0,0,0,.54);font-size:12px;font-weight:700;white-space:nowrap}:host .tb-kv-map-config .body{padding-left:5px;padding-right:5px;padding-bottom:20px;max-height:300px;overflow:auto}:host .tb-kv-map-config .body .row{padding-top:5px;max-height:40px}:host .tb-kv-map-config .body .cell{padding-left:5px;padding-right:5px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell{margin:0;max-height:40px}:host ::ng-deep .tb-kv-map-config .body mat-form-field.cell .mat-form-field-infix{border-top:0}:host ::ng-deep .tb-kv-map-config .body button.mat-button{margin:0}"]}),h("design:paramtypes",[o.Store,n.TranslateService,t.Injector,i.FormBuilder])],r)}(a.PageComponent),ae=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.entityType=a.EntityType,n.propagateChange=null,n}var n;return y(r,e),n=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.deviceRelationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],relationType:[null],deviceTypes:[null,[i.Validators.required]]}),this.deviceRelationsQueryFormGroup.valueChanges.subscribe((function(t){e.deviceRelationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.deviceRelationsQueryFormGroup.disable({emitEvent:!1}):this.deviceRelationsQueryFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){this.deviceRelationsQueryFormGroup.reset(e,{emitEvent:!1})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},b([t.Input(),h("design:type",Boolean)],r.prototype,"disabled",void 0),b([t.Input(),h("design:type",Boolean),h("design:paramtypes",[Boolean])],r.prototype,"required",null),r=n=b([t.Component({selector:"tb-device-relations-query-config",template:'<section fxLayout="column" [formGroup]="deviceRelationsQueryFormGroup">\n <mat-checkbox formControlName="fetchLastLevelOnly" style="padding-bottom: 16px;">\n {{ \'alias.last-level-relation\' | translate }}\n </mat-checkbox>\n <div fxLayoutGap="8px" fxLayout="row">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.max-relation-level</mat-label>\n <input matInput\n type="number"\n min="1"\n step="1"\n placeholder="{{ \'tb.rulenode.unlimited-level\' | translate }}"\n formControlName="maxLevel">\n </mat-form-field>\n </div>\n <div class="mat-caption" style="color: rgba(0,0,0,0.57);" translate>relation.relation-type</div>\n <tb-relation-type-autocomplete\n fxFlex\n formControlName="relationType">\n </tb-relation-type-autocomplete>\n <div class="mat-caption tb-required" style="color: rgba(0,0,0,0.57);" translate>device.device-types</div>\n <tb-entity-subtype-list\n required\n [entityType]="entityType.DEVICE"\n formControlName="deviceTypes">\n </tb-entity-subtype-list>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.PageComponent),oe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.directionTypes=Object.keys(a.EntitySearchDirection),n.directionTypeTranslations=a.entitySearchDirectionTranslations,n.propagateChange=null,n}var n;return y(r,e),n=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.relationsQueryFormGroup=this.fb.group({fetchLastLevelOnly:[!1,[]],direction:[null,[i.Validators.required]],maxLevel:[null,[]],filters:[null]}),this.relationsQueryFormGroup.valueChanges.subscribe((function(t){e.relationsQueryFormGroup.valid?e.propagateChange(t):e.propagateChange(null)}))},r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.relationsQueryFormGroup.disable({emitEvent:!1}):this.relationsQueryFormGroup.enable({emitEvent:!1})},r.prototype.writeValue=function(e){this.relationsQueryFormGroup.reset(e||{},{emitEvent:!1})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},b([t.Input(),h("design:type",Boolean)],r.prototype,"disabled",void 0),b([t.Input(),h("design:type",Boolean),h("design:paramtypes",[Boolean])],r.prototype,"required",null),r=n=b([t.Component({selector:"tb-relations-query-config",template:'<section fxLayout="column" [formGroup]="relationsQueryFormGroup">\n <mat-checkbox formControlName="fetchLastLevelOnly" style="padding-bottom: 16px;">\n {{ \'alias.last-level-relation\' | translate }}\n </mat-checkbox>\n <div fxLayoutGap="8px" fxLayout="row">\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select required matInput formControlName="direction">\n <mat-option *ngFor="let type of directionTypes" [value]="type">\n {{ directionTypeTranslations.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field fxFlex floatLabel="always" class="mat-block">\n <mat-label translate>tb.rulenode.max-relation-level</mat-label>\n <input matInput\n type="number"\n min="1"\n step="1"\n placeholder="{{ \'tb.rulenode.unlimited-level\' | translate }}"\n formControlName="maxLevel">\n </mat-form-field>\n </div>\n <div class="mat-caption" style="color: rgba(0,0,0,0.57);" translate>relation.relation-filters</div>\n <tb-relation-filters\n formControlName="filters"\n ></tb-relation-filters>\n</section>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.PageComponent),ie=function(e){function r(t,r,n,o){var i,l,m=e.call(this,t)||this;m.store=t,m.translate=r,m.truncate=n,m.fb=o,m.placeholder="tb.rulenode.message-type",m.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],m.messageTypes=[],m.messageTypesList=[],m.searchText="",m.propagateChange=function(e){},m.messageTypeConfigForm=m.fb.group({messageType:[null]});try{for(var u=C(Object.keys(a.MessageType)),d=u.next();!d.done;d=u.next()){var p=d.value;m.messageTypesList.push({name:a.messageTypeNames.get(a.MessageType[p]),value:p})}}catch(e){i={error:e}}finally{try{d&&!d.done&&(l=u.return)&&l.call(u)}finally{if(i)throw i.error}}return m}var l;return y(r,e),l=r,Object.defineProperty(r.prototype,"required",{get:function(){return this.requiredValue},set:function(e){this.requiredValue=u.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),r.prototype.registerOnChange=function(e){this.propagateChange=e},r.prototype.registerOnTouched=function(e){},r.prototype.ngOnInit=function(){var e=this;this.filteredMessageTypes=this.messageTypeConfigForm.get("messageType").valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(t){return e.fetchMessageTypes(t)})),f.share())},r.prototype.ngAfterViewInit=function(){},r.prototype.setDisabledState=function(e){this.disabled=e,this.disabled?this.messageTypeConfigForm.disable({emitEvent:!1}):this.messageTypeConfigForm.enable({emitEvent:!1})},r.prototype.writeValue=function(e){var t=this;this.searchText="",this.messageTypes.length=0,e&&e.forEach((function(e){var r=t.messageTypesList.find((function(t){return t.value===e}));r?t.messageTypes.push({name:r.name,value:r.value}):t.messageTypes.push({name:e,value:e})}))},r.prototype.displayMessageTypeFn=function(e){return e?e.name:void 0},r.prototype.textIsNotEmpty=function(e){return!!(e&&null!=e&&e.length>0)},r.prototype.createMessageType=function(e,t){e.preventDefault(),this.transformMessageType(t)},r.prototype.add=function(e){this.transformMessageType(e.value)},r.prototype.fetchMessageTypes=function(e){if(this.searchText=e,this.searchText&&this.searchText.length){var t=this.searchText.toUpperCase();return c.of(this.messageTypesList.filter((function(e){return e.name.toUpperCase().includes(t)})))}return c.of(this.messageTypesList)},r.prototype.transformMessageType=function(e){if((e||"").trim()){var t=null,r=e.trim(),n=this.messageTypesList.find((function(e){return e.name===r}));(t=n?{name:n.name,value:n.value}:{name:r,value:r})&&this.addMessageType(t)}this.clear("")},r.prototype.remove=function(e){var t=this.messageTypes.indexOf(e);t>=0&&(this.messageTypes.splice(t,1),this.updateModel())},r.prototype.selected=function(e){this.addMessageType(e.option.value),this.clear("")},r.prototype.addMessageType=function(e){-1===this.messageTypes.findIndex((function(t){return t.value===e.value}))&&(this.messageTypes.push(e),this.updateModel())},r.prototype.onFocus=function(){this.messageTypeConfigForm.get("messageType").updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.messageTypeInput.nativeElement.value=e,this.messageTypeConfigForm.get("messageType").patchValue(null,{emitEvent:!0}),setTimeout((function(){t.messageTypeInput.nativeElement.blur(),t.messageTypeInput.nativeElement.focus()}),0)},r.prototype.updateModel=function(){var e=this.messageTypes.map((function(e){return e.value}));this.required?(this.chipList.errorState=!e.length,this.propagateChange(e.length>0?e:null)):(this.chipList.errorState=!1,this.propagateChange(e))},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:a.TruncatePipe},{type:i.FormBuilder}]},b([t.Input(),h("design:type",Boolean),h("design:paramtypes",[Boolean])],r.prototype,"required",null),b([t.Input(),h("design:type",String)],r.prototype,"label",void 0),b([t.Input(),h("design:type",Object)],r.prototype,"placeholder",void 0),b([t.Input(),h("design:type",Boolean)],r.prototype,"disabled",void 0),b([t.ViewChild("chipList",{static:!1}),h("design:type",d.MatChipList)],r.prototype,"chipList",void 0),b([t.ViewChild("messageTypeAutocomplete",{static:!1}),h("design:type",p.MatAutocomplete)],r.prototype,"matAutocomplete",void 0),b([t.ViewChild("messageTypeInput",{static:!1}),h("design:type",t.ElementRef)],r.prototype,"messageTypeInput",void 0),r=l=b([t.Component({selector:"tb-message-types-config",template:'<mat-form-field [formGroup]="messageTypeConfigForm" style="width: 100%;">\n <mat-label *ngIf="label" translate>{{ label }}</mat-label>\n <mat-chip-list #chipList [required]="required">\n <mat-chip\n *ngFor="let messageType of messageTypes"\n [selectable]="true"\n [removable]="true"\n (removed)="remove(messageType)">\n {{messageType.name}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{ placeholder | translate }}"\n style="max-width: 200px;"\n #messageTypeInput\n (focusin)="onFocus()"\n formControlName="messageType"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="messageTypeAutocomplete"\n [matChipInputFor]="chipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="add($event)">\n </mat-chip-list>\n <mat-autocomplete #messageTypeAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="selected($event)"\n [displayWith]="displayMessageTypeFn">\n <mat-option *ngFor="let messageType of filteredMessageTypes | async" [value]="messageType">\n <span [innerHTML]="messageType.name | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredMessageTypes | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div *ngIf="!textIsNotEmpty(searchText); else searchNotEmpty">\n <span translate>tb.rulenode.no-message-types-found</span>\n </div>\n <ng-template #searchNotEmpty>\n <span>\n {{ translate.get(\'tb.rulenode.no-message-type-matching\',\n {messageType: truncate.transform(searchText, true, 6, &apos;...&apos;)}) | async }}\n </span>\n </ng-template>\n <span>\n <a translate (click)="createMessageType($event, searchText)">tb.rulenode.create-new-message-type</a>\n </span>\n </div>\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf="chipList.errorState">\n {{ \'tb.rulenode.message-types-required\' | translate }}\n </mat-error>\n</mat-form-field>\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return l})),multi:!0}]}),h("design:paramtypes",[o.Store,n.TranslateService,a.TruncatePipe,i.FormBuilder])],r)}(a.PageComponent),le=function(){function e(){}return e=b([t.NgModule({declarations:[ne,ae,oe,ie],imports:[r.CommonModule,a.SharedModule,m.HomeComponentsModule],exports:[ne,ae,oe,ie]})],e)}(),se=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.unassignCustomerConfigForm},r.prototype.onConfigurationSet=function(e){this.unassignCustomerConfigForm=this.fb.group({customerNamePattern:[e?e.customerNamePattern:null,[i.Validators.required]],customerCacheExpiration:[e?e.customerCacheExpiration:null,[i.Validators.required,i.Validators.min(0)]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-un-assign-to-customer-config",template:'<section [formGroup]="unassignCustomerConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-name-pattern</mat-label>\n <input required matInput formControlName="customerNamePattern">\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerNamePattern\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-name-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-name-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.customer-cache-expiration</mat-label>\n <input required type="number" min="0" step="1" matInput formControlName="customerCacheExpiration">\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'required\')">\n {{ \'tb.rulenode.customer-cache-expiration-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="unassignCustomerConfigForm.get(\'customerCacheExpiration\').hasError(\'min\')">\n {{ \'tb.rulenode.customer-cache-expiration-range\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.customer-cache-expiration-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),me=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.snsConfigForm},r.prototype.onConfigurationSet=function(e){this.snsConfigForm=this.fb.group({topicArnPattern:[e?e.topicArnPattern:null,[i.Validators.required]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-sns-config",template:'<section [formGroup]="snsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic-arn-pattern</mat-label>\n <input required matInput formControlName="topicArnPattern">\n <mat-error *ngIf="snsConfigForm.get(\'topicArnPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-arn-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.topic-arn-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-access-key-id</mat-label>\n <input required matInput formControlName="accessKeyId">\n <mat-error *ngIf="snsConfigForm.get(\'accessKeyId\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-access-key-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-secret-access-key</mat-label>\n <input required matInput formControlName="secretAccessKey">\n <mat-error *ngIf="snsConfigForm.get(\'secretAccessKey\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-secret-access-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-region</mat-label>\n <input required matInput formControlName="region">\n <mat-error *ngIf="snsConfigForm.get(\'region\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-region-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ue=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.sqsQueueType=H,n.sqsQueueTypes=Object.keys(H),n.sqsQueueTypeTranslationsMap=$,n}return y(r,e),r.prototype.configForm=function(){return this.sqsConfigForm},r.prototype.onConfigurationSet=function(e){this.sqsConfigForm=this.fb.group({queueType:[e?e.queueType:null,[i.Validators.required]],queueUrlPattern:[e?e.queueUrlPattern:null,[i.Validators.required]],delaySeconds:[e?e.delaySeconds:null,[i.Validators.min(0),i.Validators.max(900)]],messageAttributes:[e?e.messageAttributes:null,[]],accessKeyId:[e?e.accessKeyId:null,[i.Validators.required]],secretAccessKey:[e?e.secretAccessKey:null,[i.Validators.required]],region:[e?e.region:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-sqs-config",template:'<section [formGroup]="sqsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.queue-type</mat-label>\n <mat-select formControlName="queueType" required>\n <mat-option *ngFor="let type of sqsQueueTypes" [value]="type">\n {{ sqsQueueTypeTranslationsMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.queue-url-pattern</mat-label>\n <input required matInput formControlName="queueUrlPattern">\n <mat-error *ngIf="sqsConfigForm.get(\'queueUrlPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.queue-url-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.queue-url-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field *ngIf="sqsConfigForm.get(\'queueType\').value === sqsQueueType.STANDARD" class="mat-block">\n <mat-label translate>tb.rulenode.delay-seconds</mat-label>\n <input required type="number" min="0" max="900" step="1" matInput formControlName="delaySeconds">\n <mat-error *ngIf="sqsConfigForm.get(\'delaySeconds\').hasError(\'min\')">\n {{ \'tb.rulenode.min-delay-seconds-message\' | translate }}\n </mat-error>\n <mat-error *ngIf="sqsConfigForm.get(\'delaySeconds\').hasError(\'max\')">\n {{ \'tb.rulenode.max-delay-seconds-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.message-attributes</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.message-attributes-hint\' | translate}}}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="messageAttributes"\n keyText="tb.rulenode.name"\n keyRequiredText="tb.rulenode.name-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-access-key-id</mat-label>\n <input required matInput formControlName="accessKeyId">\n <mat-error *ngIf="sqsConfigForm.get(\'accessKeyId\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-access-key-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-secret-access-key</mat-label>\n <input required matInput formControlName="secretAccessKey">\n <mat-error *ngIf="sqsConfigForm.get(\'secretAccessKey\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-secret-access-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.aws-region</mat-label>\n <input required matInput formControlName="region">\n <mat-error *ngIf="sqsConfigForm.get(\'region\').hasError(\'required\')">\n {{ \'tb.rulenode.aws-region-required\' | translate }}\n </mat-error>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),de=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.pubSubConfigForm},r.prototype.onConfigurationSet=function(e){this.pubSubConfigForm=this.fb.group({projectId:[e?e.projectId:null,[i.Validators.required]],topicName:[e?e.topicName:null,[i.Validators.required]],serviceAccountKey:[e?e.serviceAccountKey:null,[i.Validators.required]],serviceAccountKeyFileName:[e?e.serviceAccountKeyFileName:null,[i.Validators.required]],messageAttributes:[e?e.messageAttributes:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-pub-sub-config",template:'<section [formGroup]="pubSubConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.gcp-project-id</mat-label>\n <input required matInput formControlName="projectId">\n <mat-error *ngIf="pubSubConfigForm.get(\'projectId\').hasError(\'required\')">\n {{ \'tb.rulenode.gcp-project-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.pubsub-topic-name</mat-label>\n <input required matInput formControlName="topicName">\n <mat-error *ngIf="pubSubConfigForm.get(\'topicName\').hasError(\'required\')">\n {{ \'tb.rulenode.pubsub-topic-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <tb-file-input style="padding-bottom: 24px;"\n formControlName="serviceAccountKey"\n [existingFileName]="pubSubConfigForm.get(\'serviceAccountKeyFileName\').value"\n (fileNameChanged)="pubSubConfigForm.get(\'serviceAccountKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.gcp-service-account-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <label translate class="tb-title">tb.rulenode.message-attributes</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.message-attributes-hint\' | translate}}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="messageAttributes"\n keyText="tb.rulenode.name"\n keyRequiredText="tb.rulenode.name-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),pe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.ackValues=["all","-1","0","1"],n.ToByteStandartCharsetTypesValues=Y,n.ToByteStandartCharsetTypeTranslationMap=Z,n}return y(r,e),r.prototype.configForm=function(){return this.kafkaConfigForm},r.prototype.onConfigurationSet=function(e){this.kafkaConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],bootstrapServers:[e?e.bootstrapServers:null,[i.Validators.required]],retries:[e?e.retries:null,[i.Validators.min(0)]],batchSize:[e?e.batchSize:null,[i.Validators.min(0)]],linger:[e?e.linger:null,[i.Validators.min(0)]],bufferMemory:[e?e.bufferMemory:null,[i.Validators.min(0)]],acks:[e?e.acks:null,[i.Validators.required]],keySerializer:[e?e.keySerializer:null,[i.Validators.required]],valueSerializer:[e?e.valueSerializer:null,[i.Validators.required]],otherProperties:[e?e.otherProperties:null,[]],addMetadataKeyValuesAsKafkaHeaders:[!!e&&e.addMetadataKeyValuesAsKafkaHeaders,[]],kafkaHeadersCharset:[e?e.kafkaHeadersCharset:null,[]]})},r.prototype.validatorTriggers=function(){return["addMetadataKeyValuesAsKafkaHeaders"]},r.prototype.updateValidators=function(e){this.kafkaConfigForm.get("addMetadataKeyValuesAsKafkaHeaders").value?this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([i.Validators.required]):this.kafkaConfigForm.get("kafkaHeadersCharset").setValidators([]),this.kafkaConfigForm.get("kafkaHeadersCharset").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-kafka-config",template:'<section [formGroup]="kafkaConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.topic-pattern</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="kafkaConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-pattern-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.bootstrap-servers</mat-label>\n <input required matInput formControlName="bootstrapServers">\n <mat-error *ngIf="kafkaConfigForm.get(\'bootstrapServers\').hasError(\'required\')">\n {{ \'tb.rulenode.bootstrap-servers-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.retries</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="retries">\n <mat-error *ngIf="kafkaConfigForm.get(\'retries\').hasError(\'min\')">\n {{ \'tb.rulenode.min-retries-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.batch-size-bytes</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="batchSize">\n <mat-error *ngIf="kafkaConfigForm.get(\'batchSize\').hasError(\'min\')">\n {{ \'tb.rulenode.min-batch-size-bytes-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.linger-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="linger">\n <mat-error *ngIf="kafkaConfigForm.get(\'linger\').hasError(\'min\')">\n {{ \'tb.rulenode.min-linger-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.buffer-memory-bytes</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="bufferMemory">\n <mat-error *ngIf="kafkaConfigForm.get(\'bufferMemory\').hasError(\'min\')">\n {{ \'tb.rulenode.min-buffer-memory-bytes-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.acks</mat-label>\n <mat-select formControlName="acks" required>\n <mat-option *ngFor="let ackValue of ackValues" [value]="ackValue">\n {{ ackValue }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.key-serializer</mat-label>\n <input required matInput formControlName="keySerializer">\n <mat-error *ngIf="kafkaConfigForm.get(\'keySerializer\').hasError(\'required\')">\n {{ \'tb.rulenode.key-serializer-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.value-serializer</mat-label>\n <input required matInput formControlName="valueSerializer">\n <mat-error *ngIf="kafkaConfigForm.get(\'valueSerializer\').hasError(\'required\')">\n {{ \'tb.rulenode.value-serializer-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.other-properties</label>\n <tb-kv-map-config\n required="false"\n formControlName="otherProperties"\n keyText="tb.rulenode.key"\n keyRequiredText="tb.rulenode.key-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-checkbox fxFlex formControlName="addMetadataKeyValuesAsKafkaHeaders" style="padding-top: 16px;">\n {{ \'tb.rulenode.add-metadata-key-values-as-kafka-headers\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.add-metadata-key-values-as-kafka-headers-hint</div>\n <mat-form-field fxFlex class="mat-block" *ngIf="kafkaConfigForm.get(\'addMetadataKeyValuesAsKafkaHeaders\').value">\n <mat-label translate>tb.rulenode.charset-encoding</mat-label>\n <mat-select formControlName="kafkaHeadersCharset" required>\n <mat-option *ngFor="let charset of ToByteStandartCharsetTypesValues" [value]="charset">\n {{ ToByteStandartCharsetTypeTranslationMap.get(charset) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ce=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allMqttCredentialsTypes=Q,n.mqttCredentialsTypeTranslationsMap=_,n}return y(r,e),r.prototype.configForm=function(){return this.mqttConfigForm},r.prototype.onConfigurationSet=function(e){this.mqttConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:this.fb.group({type:[e&&e.credentials?e.credentials.type:null,[i.Validators.required]],username:[e&&e.credentials?e.credentials.username:null,[]],password:[e&&e.credentials?e.credentials.password:null,[]],caCert:[e&&e.credentials?e.credentials.caCert:null,[]],caCertFileName:[e&&e.credentials?e.credentials.caCertFileName:null,[]],privateKey:[e&&e.credentials?e.credentials.privateKey:null,[]],privateKeyFileName:[e&&e.credentials?e.credentials.privateKeyFileName:null,[]],cert:[e&&e.credentials?e.credentials.cert:null,[]],certFileName:[e&&e.credentials?e.credentials.certFileName:null,[]]})})},r.prototype.prepareOutputConfig=function(e){var t=e.credentials.type;switch(t){case"anonymous":e.credentials={type:t};break;case"basic":e.credentials={type:t,username:e.credentials.username,password:e.credentials.password};break;case"cert.PEM":delete e.credentials.username}return e},r.prototype.validatorTriggers=function(){return["credentials.type"]},r.prototype.updateValidators=function(e){var t=this.mqttConfigForm.get("credentials"),r=t.get("type").value;switch(e&&t.reset({type:r},{emitEvent:!1}),t.get("username").setValidators([]),t.get("password").setValidators([]),t.get("caCert").setValidators([]),t.get("caCertFileName").setValidators([]),t.get("privateKey").setValidators([]),t.get("privateKeyFileName").setValidators([]),t.get("cert").setValidators([]),t.get("certFileName").setValidators([]),r){case"anonymous":break;case"basic":t.get("username").setValidators([i.Validators.required]),t.get("password").setValidators([i.Validators.required]);break;case"cert.PEM":t.get("caCert").setValidators([i.Validators.required]),t.get("caCertFileName").setValidators([i.Validators.required]),t.get("privateKey").setValidators([i.Validators.required]),t.get("privateKeyFileName").setValidators([i.Validators.required]),t.get("cert").setValidators([i.Validators.required]),t.get("certFileName").setValidators([i.Validators.required])}t.get("username").updateValueAndValidity({emitEvent:e}),t.get("password").updateValueAndValidity({emitEvent:e}),t.get("caCert").updateValueAndValidity({emitEvent:e}),t.get("caCertFileName").updateValueAndValidity({emitEvent:e}),t.get("privateKey").updateValueAndValidity({emitEvent:e}),t.get("privateKeyFileName").updateValueAndValidity({emitEvent:e}),t.get("cert").updateValueAndValidity({emitEvent:e}),t.get("certFileName").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-mqtt-config",template:'<section [formGroup]="mqttConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic-pattern</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="mqttConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.mqtt-topic-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <div fxFlex fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="60" class="mat-block">\n <mat-label translate>tb.rulenode.host</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="mqttConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="40" class="mat-block">\n <mat-label translate>tb.rulenode.port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="port">\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'required\')">\n {{ \'tb.rulenode.port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'min\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'port\').hasError(\'max\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="40" class="mat-block">\n <mat-label translate>tb.rulenode.connect-timeout</mat-label>\n <input required type="number" step="1" min="1" max="200" matInput formControlName="connectTimeoutSec">\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'required\')">\n {{ \'tb.rulenode.connect-timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'min\')">\n {{ \'tb.rulenode.connect-timeout-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="mqttConfigForm.get(\'connectTimeoutSec\').hasError(\'max\')">\n {{ \'tb.rulenode.connect-timeout-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.client-id</mat-label>\n <input matInput formControlName="clientId">\n </mat-form-field>\n <mat-checkbox formControlName="cleanSession" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.clean-session\' | translate }}\n </mat-checkbox>\n <mat-checkbox formControlName="ssl" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-ssl\' | translate }}\n </mat-checkbox>\n <mat-expansion-panel class="tb-mqtt-credentials-panel-group">\n <mat-expansion-panel-header>\n <mat-panel-title translate>tb.rulenode.credentials</mat-panel-title>\n <mat-panel-description>\n {{ mqttCredentialsTypeTranslationsMap.get(mqttConfigForm.get(\'credentials\').get(\'type\').value) | translate }}\n </mat-panel-description>\n </mat-expansion-panel-header>\n <section formGroupName="credentials" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.credentials-type</mat-label>\n <mat-select formControlName="type" required>\n <mat-option *ngFor="let credentialsType of allMqttCredentialsTypes" [value]="credentialsType">\n {{ mqttCredentialsTypeTranslationsMap.get(credentialsType) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'type\').hasError(\'required\')">\n {{ \'tb.rulenode.credentials-type-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <section fxLayout="column" [ngSwitch]="mqttConfigForm.get(\'credentials\').get(\'type\').value">\n <ng-template ngSwitchCase="anonymous">\n </ng-template>\n <ng-template ngSwitchCase="basic">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input required matInput formControlName="username">\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'username\').hasError(\'required\')">\n {{ \'tb.rulenode.username-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input type="password" required matInput formControlName="password">\n <mat-error *ngIf="mqttConfigForm.get(\'credentials\').get(\'password\').hasError(\'required\')">\n {{ \'tb.rulenode.password-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </ng-template>\n <ng-template ngSwitchCase="cert.PEM">\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'caCertFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'caCertFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input formControlName="cert"\n inputId="CertSelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'certFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'certFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input style="padding-bottom: 8px;"\n formControlName="privateKey"\n inputId="privateKeySelect"\n [existingFileName]="mqttConfigForm.get(\'credentials\').get(\'privateKeyFileName\').value"\n (fileNameChanged)="mqttConfigForm.get(\'credentials\').get(\'privateKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.private-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.private-key-password</mat-label>\n <input type="password" matInput formControlName="password">\n </mat-form-field>\n </ng-template>\n </section>\n </section>\n </mat-expansion-panel>\n</section>\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),fe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.messageProperties=[null,"BASIC","TEXT_PLAIN","MINIMAL_BASIC","MINIMAL_PERSISTENT_BASIC","PERSISTENT_BASIC","PERSISTENT_TEXT_PLAIN"],n}return y(r,e),r.prototype.configForm=function(){return this.rabbitMqConfigForm},r.prototype.onConfigurationSet=function(e){this.rabbitMqConfigForm=this.fb.group({exchangeNamePattern:[e?e.exchangeNamePattern:null,[]],routingKeyPattern:[e?e.routingKeyPattern:null,[]],messageProperties:[e?e.messageProperties:null,[]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],virtualHost:[e?e.virtualHost:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]],automaticRecoveryEnabled:[!!e&&e.automaticRecoveryEnabled,[]],connectionTimeout:[e?e.connectionTimeout:null,[i.Validators.min(0)]],handshakeTimeout:[e?e.handshakeTimeout:null,[i.Validators.min(0)]],clientProperties:[e?e.clientProperties:null,[]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-rabbit-mq-config",template:'<section [formGroup]="rabbitMqConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.exchange-name-pattern</mat-label>\n <input matInput formControlName="exchangeNamePattern">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.routing-key-pattern</mat-label>\n <input matInput formControlName="routingKeyPattern">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.message-properties</mat-label>\n <mat-select formControlName="messageProperties">\n <mat-option *ngFor="let property of messageProperties" [value]="property">\n {{ property }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="100" fxFlex.gt-sm="60" class="mat-block">\n <mat-label translate>tb.rulenode.host</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="100" fxFlex.gt-sm="40" class="mat-block">\n <mat-label translate>tb.rulenode.port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="port">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'required\')">\n {{ \'tb.rulenode.port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'min\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="rabbitMqConfigForm.get(\'port\').hasError(\'max\')">\n {{ \'tb.rulenode.port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.virtual-host</mat-label>\n <input matInput formControlName="virtualHost">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input matInput formControlName="username">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input type="password" matInput formControlName="password">\n </mat-form-field>\n <mat-checkbox formControlName="automaticRecoveryEnabled" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.automatic-recovery\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.connection-timeout-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="connectionTimeout">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'connectionTimeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-connection-timeout-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.handshake-timeout-ms</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="handshakeTimeout">\n <mat-error *ngIf="rabbitMqConfigForm.get(\'handshakeTimeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-handshake-timeout-ms-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.client-properties</label>\n <tb-kv-map-config\n required="false"\n formControlName="clientProperties"\n keyText="tb.rulenode.key"\n keyRequiredText="tb.rulenode.key-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ge=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.proxySchemes=["http","https"],n.httpRequestTypes=Object.keys(z),n}return y(r,e),r.prototype.configForm=function(){return this.restApiCallConfigForm},r.prototype.onConfigurationSet=function(e){this.restApiCallConfigForm=this.fb.group({restEndpointUrlPattern:[e?e.restEndpointUrlPattern:null,[i.Validators.required]],requestMethod:[e?e.requestMethod:null,[i.Validators.required]],useSimpleClientHttpFactory:[!!e&&e.useSimpleClientHttpFactory,[]],enableProxy:[!!e&&e.enableProxy,[]],useSystemProxyProperties:[!!e&&e.enableProxy,[]],proxyScheme:[e?e.proxyHost:null,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],readTimeoutMs:[e?e.readTimeoutMs:null,[]],maxParallelRequestsCount:[e?e.maxParallelRequestsCount:null,[i.Validators.min(0)]],headers:[e?e.headers:null,[]],useRedisQueueForMsgPersistence:[!!e&&e.useRedisQueueForMsgPersistence,[]],trimQueue:[!!e&&e.trimQueue,[]],maxQueueSize:[e?e.maxQueueSize:null,[]]})},r.prototype.validatorTriggers=function(){return["useSimpleClientHttpFactory","useRedisQueueForMsgPersistence","enableProxy","useSystemProxyProperties"]},r.prototype.updateValidators=function(e){var t=this.restApiCallConfigForm.get("useSimpleClientHttpFactory").value,r=this.restApiCallConfigForm.get("useRedisQueueForMsgPersistence").value,n=this.restApiCallConfigForm.get("enableProxy").value,a=this.restApiCallConfigForm.get("useSystemProxyProperties").value;n&&!a?(this.restApiCallConfigForm.get("proxyHost").setValidators(n?[i.Validators.required]:[]),this.restApiCallConfigForm.get("proxyPort").setValidators(n?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])):(this.restApiCallConfigForm.get("proxyHost").setValidators([]),this.restApiCallConfigForm.get("proxyPort").setValidators([]),t?this.restApiCallConfigForm.get("readTimeoutMs").setValidators([]):this.restApiCallConfigForm.get("readTimeoutMs").setValidators([i.Validators.min(0)])),r?this.restApiCallConfigForm.get("maxQueueSize").setValidators([i.Validators.min(0)]):this.restApiCallConfigForm.get("maxQueueSize").setValidators([]),this.restApiCallConfigForm.get("readTimeoutMs").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("maxQueueSize").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.restApiCallConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-rest-api-call-config",template:'<section [formGroup]="restApiCallConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.endpoint-url-pattern</mat-label>\n <input required matInput formControlName="restEndpointUrlPattern">\n <mat-error *ngIf="restApiCallConfigForm.get(\'restEndpointUrlPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.endpoint-url-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.endpoint-url-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.request-method</mat-label>\n <mat-select formControlName="requestMethod">\n <mat-option *ngFor="let requestType of httpRequestTypes" [value]="requestType">\n {{ requestType }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-checkbox formControlName="enableProxy" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-proxy\' | translate }}\n </mat-checkbox>\n <mat-checkbox *ngIf="!restApiCallConfigForm.get(\'enableProxy\').value" formControlName="useSimpleClientHttpFactory" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-simple-client-http-factory\' | translate }}\n </mat-checkbox>\n <div *ngIf="restApiCallConfigForm.get(\'enableProxy\').value">\n <mat-checkbox formControlName="useSystemProxyProperties" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-system-proxy-properties\' | translate }}\n </mat-checkbox>\n <div *ngIf="!restApiCallConfigForm.get(\'useSystemProxyProperties\').value">\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="10">\n <mat-label translate>tb.rulenode.proxy-scheme</mat-label>\n <mat-select formControlName="proxyScheme">\n <mat-option *ngFor="let proxyScheme of proxySchemes" [value]="proxyScheme">\n {{ proxyScheme }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field class="md-block" fxFlex="100" fxFlex.gt-sm="50">\n <mat-label translate>tb.rulenode.proxy-host</mat-label>\n <input matInput required formControlName="proxyHost">\n <mat-error *ngIf="restApiCallConfigForm.get(\'proxyHost\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="40">\n <mat-label translate>tb.rulenode.proxy-port</mat-label>\n <input matInput required formControlName="proxyPort" type="number" step="1">\n <mat-error *ngIf="restApiCallConfigForm.get(\'proxyPort\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-port-required\' | translate }}\n </mat-error>\n <mat-error\n *ngIf="restApiCallConfigForm.get(\'proxyPort\').hasError(\'min\') || restApiCallConfigForm.get(\'proxyPort\').hasError(\'max\')">\n {{ \'tb.rulenode.proxy-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-user</mat-label>\n <input matInput formControlName="proxyUser">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-password</mat-label>\n <input matInput formControlName="proxyPassword">\n </mat-form-field>\n </div>\n </div>\n <mat-form-field *ngIf="!restApiCallConfigForm.get(\'useSimpleClientHttpFactory\').value || restApiCallConfigForm.get(\'enableProxy\').value" class="mat-block"\n style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.read-timeout</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="readTimeoutMs">\n <mat-hint innerHTML="{{ \'tb.rulenode.read-timeout-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.max-parallel-requests-count</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="maxParallelRequestsCount">\n <mat-hint innerHTML="{{ \'tb.rulenode.max-parallel-requests-count-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title">tb.rulenode.headers</label>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.headers-hint\' | translate }}"></div>\n <tb-kv-map-config\n required="false"\n formControlName="headers"\n keyText="tb.rulenode.header"\n keyRequiredText="tb.rulenode.header-required"\n valText="tb.rulenode.value"\n valRequiredText="tb.rulenode.value-required">\n </tb-kv-map-config>\n <mat-checkbox formControlName="useRedisQueueForMsgPersistence" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-redis-queue\' | translate }}\n </mat-checkbox>\n <div fxLayout="column" *ngIf="restApiCallConfigForm.get(\'useRedisQueueForMsgPersistence\').value === true">\n <mat-checkbox formControlName="trimQueue" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.trim-redis-queue\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.redis-queue-max-size</mat-label>\n <input type="number" step="1" min="0" matInput formControlName="maxQueueSize">\n </mat-form-field>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),ye=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.smtpProtocols=["smtp","smtps"],n.tlsVersions=["TLSv1","TLSv1.1","TLSv1.2","TLSv1.3"],n}return y(r,e),r.prototype.configForm=function(){return this.sendEmailConfigForm},r.prototype.onConfigurationSet=function(e){this.sendEmailConfigForm=this.fb.group({useSystemSmtpSettings:[!!e&&e.useSystemSmtpSettings,[]],smtpProtocol:[e?e.smtpProtocol:null,[]],smtpHost:[e?e.smtpHost:null,[]],smtpPort:[e?e.smtpPort:null,[]],timeout:[e?e.timeout:null,[]],enableTls:[!!e&&e.enableTls,[]],tlsVersion:[e?e.tlsVersion:null,[]],enableProxy:[!!e&&e.enableProxy,[]],proxyHost:[e?e.proxyHost:null,[]],proxyPort:[e?e.proxyPort:null,[]],proxyUser:[e?e.proxyUser:null,[]],proxyPassword:[e?e.proxyPassword:null,[]],username:[e?e.username:null,[]],password:[e?e.password:null,[]]})},r.prototype.validatorTriggers=function(){return["useSystemSmtpSettings","enableProxy"]},r.prototype.updateValidators=function(e){var t=this.sendEmailConfigForm.get("useSystemSmtpSettings").value,r=this.sendEmailConfigForm.get("enableProxy").value;t?(this.sendEmailConfigForm.get("smtpProtocol").setValidators([]),this.sendEmailConfigForm.get("smtpHost").setValidators([]),this.sendEmailConfigForm.get("smtpPort").setValidators([]),this.sendEmailConfigForm.get("timeout").setValidators([]),this.sendEmailConfigForm.get("proxyHost").setValidators([]),this.sendEmailConfigForm.get("proxyPort").setValidators([])):(this.sendEmailConfigForm.get("smtpProtocol").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpHost").setValidators([i.Validators.required]),this.sendEmailConfigForm.get("smtpPort").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]),this.sendEmailConfigForm.get("timeout").setValidators([i.Validators.required,i.Validators.min(0)]),this.sendEmailConfigForm.get("proxyHost").setValidators(r?[i.Validators.required]:[]),this.sendEmailConfigForm.get("proxyPort").setValidators(r?[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]:[])),this.sendEmailConfigForm.get("smtpProtocol").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("smtpPort").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("timeout").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyHost").updateValueAndValidity({emitEvent:e}),this.sendEmailConfigForm.get("proxyPort").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-send-email-config",template:'<section [formGroup]="sendEmailConfigForm" fxLayout="column">\n <mat-checkbox formControlName="useSystemSmtpSettings" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.use-system-smtp-settings\' | translate }}\n </mat-checkbox>\n <section fxLayout="column" *ngIf="sendEmailConfigForm.get(\'useSystemSmtpSettings\').value === false">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.smtp-protocol</mat-label>\n <mat-select formControlName="smtpProtocol">\n <mat-option *ngFor="let smtpProtocol of smtpProtocols" [value]="smtpProtocol">\n {{ smtpProtocol.toUpperCase() }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex="100" fxFlex.gt-sm="60" class="mat-block">\n <mat-label translate>tb.rulenode.smtp-host</mat-label>\n <input required matInput formControlName="smtpHost">\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpHost\').hasError(\'required\')">\n {{ \'tb.rulenode.smtp-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex="100" fxFlex.gt-sm="40" class="mat-block">\n <mat-label translate>tb.rulenode.smtp-port</mat-label>\n <input required type="number" step="1" min="1" max="65535" matInput formControlName="smtpPort">\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'required\')">\n {{ \'tb.rulenode.smtp-port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'min\')">\n {{ \'tb.rulenode.smtp-port-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'smtpPort\').hasError(\'max\')">\n {{ \'tb.rulenode.smtp-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.timeout-msec</mat-label>\n <input required type="number" step="1" min="0" matInput formControlName="timeout">\n <mat-error *ngIf="sendEmailConfigForm.get(\'timeout\').hasError(\'required\')">\n {{ \'tb.rulenode.timeout-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'timeout\').hasError(\'min\')">\n {{ \'tb.rulenode.min-timeout-msec-message\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox formControlName="enableTls" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-tls\' | translate }}\n </mat-checkbox>\n <mat-form-field class="mat-block" *ngIf="sendEmailConfigForm.get(\'enableTls\').value === true">\n <mat-label translate>tb.rulenode.tls-version</mat-label>\n <mat-select formControlName="tlsVersion">\n <mat-option *ngFor="let tlsVersion of tlsVersions" [value]="tlsVersion">\n {{ tlsVersion }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <tb-checkbox formControlName="enableProxy" style="display: block; padding-bottom: 16px;">\n {{ \'tb.rulenode.enable-proxy\' | translate }}\n </tb-checkbox>\n <div *ngIf="sendEmailConfigForm.get(\'enableProxy\').value">\n <div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="60">\n <mat-label translate>tb.rulenode.proxy-host</mat-label>\n <input matInput required formControlName="proxyHost">\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyHost\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-host-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block" fxFlex="100" fxFlex.gt-sm="40">\n <mat-label translate>tb.rulenode.proxy-port</mat-label>\n <input matInput required formControlName="proxyPort" type="number" step="1" min="1" max="65535">\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyPort\').hasError(\'required\')">\n {{ \'tb.rulenode.proxy-port-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="sendEmailConfigForm.get(\'proxyPort\').hasError(\'min\') || sendEmailConfigForm.get(\'proxyPort\').hasError(\'max\')">\n {{ \'tb.rulenode.proxy-port-range\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-user</mat-label>\n <input matInput formControlName="proxyUser">\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.proxy-password</mat-label>\n <input matInput formControlName="proxyPassword">\n </mat-form-field>\n </div>\n <mat-form-field class="mat-block" floatLabel="always">\n <mat-label translate>tb.rulenode.username</mat-label>\n <input matInput placeholder="{{ \'tb.rulenode.enter-username\' | translate }}" formControlName="username">\n </mat-form-field>\n <mat-form-field class="mat-block" floatLabel="always">\n <mat-label translate>tb.rulenode.password</mat-label>\n <input matInput type="password" placeholder="{{ \'tb.rulenode.enter-password\' | translate }}" formControlName="password">\n </mat-form-field>\n </section>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),be=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.serviceType=a.ServiceType.TB_RULE_ENGINE,n}return y(r,e),r.prototype.configForm=function(){return this.checkPointConfigForm},r.prototype.onConfigurationSet=function(e){this.checkPointConfigForm=this.fb.group({queueName:[e?e.queueName:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-check-point-config",template:'<section [formGroup]="checkPointConfigForm" fxLayout="column">\n <tb-queue-type-list\n required\n [queueType]="serviceType"\n formControlName="queueName">\n </tb-queue-type-list>\n <div class="tb-hint" translate>tb.rulenode.select-queue-hint</div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),he=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allAzureIotHubCredentialsTypes=W,n.azureIotHubCredentialsTypeTranslationsMap=J,n}return y(r,e),r.prototype.configForm=function(){return this.azureIotHubConfigForm},r.prototype.onConfigurationSet=function(e){this.azureIotHubConfigForm=this.fb.group({topicPattern:[e?e.topicPattern:null,[i.Validators.required]],host:[e?e.host:null,[i.Validators.required]],port:[e?e.port:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(65535)]],connectTimeoutSec:[e?e.connectTimeoutSec:null,[i.Validators.required,i.Validators.min(1),i.Validators.max(200)]],clientId:[e?e.clientId:null,[i.Validators.required]],cleanSession:[!!e&&e.cleanSession,[]],ssl:[!!e&&e.ssl,[]],credentials:this.fb.group({type:[e&&e.credentials?e.credentials.type:null,[i.Validators.required]],sasKey:[e&&e.credentials?e.credentials.sasKey:null,[]],caCert:[e&&e.credentials?e.credentials.caCert:null,[]],caCertFileName:[e&&e.credentials?e.credentials.caCertFileName:null,[]],privateKey:[e&&e.credentials?e.credentials.privateKey:null,[]],privateKeyFileName:[e&&e.credentials?e.credentials.privateKeyFileName:null,[]],cert:[e&&e.credentials?e.credentials.cert:null,[]],certFileName:[e&&e.credentials?e.credentials.certFileName:null,[]],password:[e&&e.credentials?e.credentials.password:null,[]]})})},r.prototype.prepareOutputConfig=function(e){var t=e.credentials.type;return"sas"===t&&(e.credentials={type:t,sasKey:e.credentials.sasKey,caCert:e.credentials.caCert,caCertFileName:e.credentials.caCertFileName}),e},r.prototype.validatorTriggers=function(){return["credentials.type"]},r.prototype.updateValidators=function(e){var t=this.azureIotHubConfigForm.get("credentials"),r=t.get("type").value;switch(e&&t.reset({type:r},{emitEvent:!1}),t.get("sasKey").setValidators([]),t.get("privateKey").setValidators([]),t.get("privateKeyFileName").setValidators([]),t.get("cert").setValidators([]),t.get("certFileName").setValidators([]),r){case"sas":t.get("sasKey").setValidators([i.Validators.required]);break;case"cert.PEM":t.get("privateKey").setValidators([i.Validators.required]),t.get("privateKeyFileName").setValidators([i.Validators.required]),t.get("cert").setValidators([i.Validators.required]),t.get("certFileName").setValidators([i.Validators.required])}t.get("sasKey").updateValueAndValidity({emitEvent:e}),t.get("privateKey").updateValueAndValidity({emitEvent:e}),t.get("privateKeyFileName").updateValueAndValidity({emitEvent:e}),t.get("cert").updateValueAndValidity({emitEvent:e}),t.get("certFileName").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-action-node-azure-iot-hub-config",template:'<section [formGroup]="azureIotHubConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.topic</mat-label>\n <input required matInput formControlName="topicPattern">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'topicPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.topic-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.hostname</mat-label>\n <input required matInput formControlName="host">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'host\').hasError(\'required\')">\n {{ \'tb.rulenode.hostname-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.device-id</mat-label>\n <input required matInput formControlName="clientId" autocomplete="new-clientId">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'clientId\').hasError(\'required\')">\n {{ \'tb.rulenode.device-id-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-accordion multi>\n <mat-expansion-panel class="tb-mqtt-credentials-panel-group">\n <mat-expansion-panel-header>\n <mat-panel-title translate>tb.rulenode.credentials</mat-panel-title>\n <mat-panel-description>\n {{ azureIotHubCredentialsTypeTranslationsMap.get(azureIotHubConfigForm.get(\'credentials.type\').value) | translate }}\n </mat-panel-description>\n </mat-expansion-panel-header>\n <section formGroupName="credentials" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.credentials-type</mat-label>\n <mat-select formControlName="type" required>\n <mat-option *ngFor="let credentialsType of allAzureIotHubCredentialsTypes" [value]="credentialsType">\n {{ azureIotHubCredentialsTypeTranslationsMap.get(credentialsType) | translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf="azureIotHubConfigForm.get(\'credentials.type\').hasError(\'required\')">\n {{ \'tb.rulenode.credentials-type-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <section fxLayout="column" [ngSwitch]="azureIotHubConfigForm.get(\'credentials.type\').value">\n <ng-template ngSwitchCase="anonymous">\n </ng-template>\n <ng-template ngSwitchCase="sas">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.sas-key</mat-label>\n <input type="password" required matInput formControlName="sasKey" autocomplete="new-password">\n <mat-error *ngIf="azureIotHubConfigForm.get(\'credentials.sasKey\').hasError(\'required\')">\n {{ \'tb.rulenode.sas-key-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.caCertFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.caCertFileName\').setValue($event)"\n label="{{\'tb.rulenode.azure-ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n </ng-template>\n <ng-template ngSwitchCase="cert.PEM">\n <tb-file-input formControlName="caCert"\n inputId="caCertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.caCertFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.caCertFileName\').setValue($event)"\n label="{{\'tb.rulenode.azure-ca-cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input formControlName="cert"\n inputId="CertSelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.certFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.certFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.cert\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <tb-file-input style="padding-bottom: 8px;"\n formControlName="privateKey"\n inputId="privateKeySelect"\n [existingFileName]="azureIotHubConfigForm.get(\'credentials.privateKeyFileName\').value"\n (fileNameChanged)="azureIotHubConfigForm.get(\'credentials.privateKeyFileName\').setValue($event)"\n required\n requiredAsError\n label="{{\'tb.rulenode.private-key\' | translate}}"\n noFileText="tb.rulenode.no-file"\n dropLabel="{{\'tb.rulenode.drop-file\' | translate}}">\n </tb-file-input>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.private-key-password</mat-label>\n <input type="password" matInput formControlName="password" autocomplete="new-password">\n </mat-form-field>\n </ng-template>\n </section>\n </section>\n </mat-expansion-panel>\n </mat-accordion>\n</section>\n',styles:[":host .tb-mqtt-credentials-panel-group{margin:0 6px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ce=function(){function e(){}return e=b([t.NgModule({declarations:[x,T,q,S,I,k,N,V,E,A,L,X,ee,te,re,se,me,ue,de,pe,ce,fe,ge,ye,be,he],imports:[r.CommonModule,a.SharedModule,le],exports:[x,T,q,S,I,k,N,V,E,A,L,X,ee,te,re,se,me,ue,de,pe,ce,fe,ge,ye,be,he]})],e)}(),ve=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return y(r,e),r.prototype.configForm=function(){return this.checkMessageConfigForm},r.prototype.onConfigurationSet=function(e){this.checkMessageConfigForm=this.fb.group({messageNames:[e?e.messageNames:null,[]],metadataNames:[e?e.metadataNames:null,[]],checkAllKeys:[!!e&&e.checkAllKeys,[]]})},r.prototype.validateConfig=function(){var e=this.checkMessageConfigForm.get("messageNames").value,t=this.checkMessageConfigForm.get("metadataNames").value;return e.length>0||t.length>0},r.prototype.removeMessageName=function(e){var t=this.checkMessageConfigForm.get("messageNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("messageNames").setValue(t,{emitEvent:!0}))},r.prototype.removeMetadataName=function(e){var t=this.checkMessageConfigForm.get("metadataNames").value,r=t.indexOf(e);r>=0&&(t.splice(r,1),this.checkMessageConfigForm.get("metadataNames").setValue(t,{emitEvent:!0}))},r.prototype.addMessageName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("messageNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("messageNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},r.prototype.addMetadataName=function(e){var t=e.input,r=e.value;if((r||"").trim()){r=r.trim();var n=this.checkMessageConfigForm.get("metadataNames").value;n&&-1!==n.indexOf(r)||(n||(n=[]),n.push(r),this.checkMessageConfigForm.get("metadataNames").setValue(n,{emitEvent:!0}))}t&&(t.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-filter-node-check-message-config",template:'<section [formGroup]="checkMessageConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding tb-required">tb.rulenode.data-keys</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #messageNamesChipList>\n <mat-chip\n *ngFor="let messageName of checkMessageConfigForm.get(\'messageNames\').value;"\n (removed)="removeMessageName(messageName)">\n {{messageName}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.data-keys\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="messageNamesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addMessageName($event)"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <div class="tb-hint" translate>tb.rulenode.separator-hint</div>\n <label translate class="tb-title no-padding tb-required">tb.rulenode.metadata-keys</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #metadataNamesChipList>\n <mat-chip\n *ngFor="let metadataName of checkMessageConfigForm.get(\'metadataNames\').value;"\n (removed)="removeMetadataName(metadataName)">\n {{metadataName}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.metadata-keys\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="metadataNamesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addMetadataName($event)"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <div class="tb-hint" translate>tb.rulenode.separator-hint</div>\n <mat-checkbox fxFlex formControlName="checkAllKeys" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.check-all-keys\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.check-all-keys-hint</div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Fe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.entitySearchDirection=Object.keys(a.EntitySearchDirection),n.entitySearchDirectionTranslationsMap=a.entitySearchDirectionTranslations,n}return y(r,e),r.prototype.configForm=function(){return this.checkRelationConfigForm},r.prototype.onConfigurationSet=function(e){this.checkRelationConfigForm=this.fb.group({checkForSingleEntity:[!!e&&e.checkForSingleEntity,[]],direction:[e?e.direction:null,[]],entityType:[e?e.entityType:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],entityId:[e?e.entityId:null,e&&e.checkForSingleEntity?[i.Validators.required]:[]],relationType:[e?e.relationType:null,[i.Validators.required]]})},r.prototype.validatorTriggers=function(){return["checkForSingleEntity"]},r.prototype.updateValidators=function(e){var t=this.checkRelationConfigForm.get("checkForSingleEntity").value;this.checkRelationConfigForm.get("entityType").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityType").updateValueAndValidity({emitEvent:e}),this.checkRelationConfigForm.get("entityId").setValidators(t?[i.Validators.required]:[]),this.checkRelationConfigForm.get("entityId").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-filter-node-check-relation-config",template:'<section [formGroup]="checkRelationConfigForm" fxLayout="column">\n <mat-checkbox fxFlex formControlName="checkForSingleEntity" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.check-relation-to-specific-entity\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.check-relation-hint</div>\n <mat-form-field class="mat-block" style="min-width: 100px;">\n <mat-label translate>relation.direction</mat-label>\n <mat-select formControlName="direction" required>\n <mat-option *ngFor="let direction of entitySearchDirection" [value]="direction">\n {{ entitySearchDirectionTranslationsMap.get(direction) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxLayout="row" *ngIf="checkRelationConfigForm.get(\'checkForSingleEntity\').value" style="padding-top: 20px">\n <tb-entity-type-select\n style="min-width: 100px; padding-bottom: 20px; padding-right: 8px;"\n showLabel\n required\n formControlName="entityType">\n </tb-entity-type-select>\n <tb-entity-autocomplete\n fxFlex\n required\n *ngIf="checkRelationConfigForm.get(\'entityType\').value"\n [entityType]="checkRelationConfigForm.get(\'entityType\').value"\n formControlName="entityId">\n </tb-entity-autocomplete>\n </div>\n <tb-relation-type-autocomplete\n required\n formControlName="relationType">\n </tb-relation-type-autocomplete>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),xe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.perimeterType=M,n.perimeterTypes=Object.keys(M),n.perimeterTypeTranslationMap=w,n.rangeUnits=Object.keys(O),n.rangeUnitTranslationMap=B,n}return y(r,e),r.prototype.configForm=function(){return this.geoFilterConfigForm},r.prototype.onConfigurationSet=function(e){this.geoFilterConfigForm=this.fb.group({latitudeKeyName:[e?e.latitudeKeyName:null,[i.Validators.required]],longitudeKeyName:[e?e.longitudeKeyName:null,[i.Validators.required]],fetchPerimeterInfoFromMessageMetadata:[!!e&&e.fetchPerimeterInfoFromMessageMetadata,[]],perimeterType:[e?e.perimeterType:null,[]],centerLatitude:[e?e.centerLatitude:null,[]],centerLongitude:[e?e.centerLatitude:null,[]],range:[e?e.range:null,[]],rangeUnit:[e?e.rangeUnit:null,[]],polygonsDefinition:[e?e.polygonsDefinition:null,[]]})},r.prototype.validatorTriggers=function(){return["fetchPerimeterInfoFromMessageMetadata","perimeterType"]},r.prototype.updateValidators=function(e){var t=this.geoFilterConfigForm.get("fetchPerimeterInfoFromMessageMetadata").value,r=this.geoFilterConfigForm.get("perimeterType").value;t?this.geoFilterConfigForm.get("perimeterType").setValidators([]):this.geoFilterConfigForm.get("perimeterType").setValidators([i.Validators.required]),t||r!==M.CIRCLE?(this.geoFilterConfigForm.get("centerLatitude").setValidators([]),this.geoFilterConfigForm.get("centerLongitude").setValidators([]),this.geoFilterConfigForm.get("range").setValidators([]),this.geoFilterConfigForm.get("rangeUnit").setValidators([])):(this.geoFilterConfigForm.get("centerLatitude").setValidators([i.Validators.required,i.Validators.min(-90),i.Validators.max(90)]),this.geoFilterConfigForm.get("centerLongitude").setValidators([i.Validators.required,i.Validators.min(-180),i.Validators.max(180)]),this.geoFilterConfigForm.get("range").setValidators([i.Validators.required,i.Validators.min(0)]),this.geoFilterConfigForm.get("rangeUnit").setValidators([i.Validators.required])),t||r!==M.POLYGON?this.geoFilterConfigForm.get("polygonsDefinition").setValidators([]):this.geoFilterConfigForm.get("polygonsDefinition").setValidators([i.Validators.required]),this.geoFilterConfigForm.get("perimeterType").updateValueAndValidity({emitEvent:!1}),this.geoFilterConfigForm.get("centerLatitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("centerLongitude").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("range").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("rangeUnit").updateValueAndValidity({emitEvent:e}),this.geoFilterConfigForm.get("polygonsDefinition").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-filter-node-gps-geofencing-config",template:'<section [formGroup]="geoFilterConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.latitude-key-name</mat-label>\n <input matInput formControlName="latitudeKeyName" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'latitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.latitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.longitude-key-name</mat-label>\n <input matInput formControlName="longitudeKeyName" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'longitudeKeyName\').hasError(\'required\')">\n {{ \'tb.rulenode.longitude-key-name-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-checkbox fxFlex formControlName="fetchPerimeterInfoFromMessageMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.fetch-perimeter-info-from-message-metadata\' | translate }}\n </mat-checkbox>\n <div fxLayout="row" *ngIf="!geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.perimeter-type</mat-label>\n <mat-select formControlName="perimeterType" required>\n <mat-option *ngFor="let type of perimeterTypes" [value]="type">\n {{ perimeterTypeTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column"\n *ngIf="geoFilterConfigForm.get(\'perimeterType\').value === perimeterType.CIRCLE &&\n !geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-latitude</mat-label>\n <input type="number" min="-90" max="90" step="0.1" matInput formControlName="centerLatitude" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'centerLatitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-latitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.circle-center-longitude</mat-label>\n <input type="number" min="-180" max="180" step="0.1" matInput formControlName="centerLongitude" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'centerLongitude\').hasError(\'required\')">\n {{ \'tb.rulenode.circle-center-longitude-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n <div fxLayout="row" fxLayoutGap="8px">\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range</mat-label>\n <input type="number" min="0" step="0.1" matInput formControlName="range" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'range\').hasError(\'required\')">\n {{ \'tb.rulenode.range-required\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex>\n <mat-label translate>tb.rulenode.range-units</mat-label>\n <mat-select formControlName="rangeUnit" required>\n <mat-option *ngFor="let type of rangeUnits" [value]="type">\n {{ rangeUnitTranslationMap.get(type) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <div fxLayout="row" *ngIf="geoFilterConfigForm.get(\'perimeterType\').value === perimeterType.POLYGON &&\n !geoFilterConfigForm.get(\'fetchPerimeterInfoFromMessageMetadata\').value">\n <div fxLayout="column" fxFlex="100">\n <mat-form-field class="mat-block" hintLabel="{{\'tb.rulenode.polygon-definition-hint\' | translate}}">\n <mat-label translate>tb.rulenode.polygon-definition</mat-label>\n <input matInput formControlName="polygonsDefinition" required>\n <mat-error *ngIf="geoFilterConfigForm.get(\'polygonsDefinition\').hasError(\'required\')">\n {{ \'tb.rulenode.polygon-definition-required\' | translate }}\n </mat-error>\n </mat-form-field>\n </div>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Te=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.messageTypeConfigForm},r.prototype.onConfigurationSet=function(e){this.messageTypeConfigForm=this.fb.group({messageTypes:[e?e.messageTypes:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-filter-node-message-type-config",template:'<section [formGroup]="messageTypeConfigForm" fxLayout="column">\n <tb-message-types-config\n required\n label="tb.rulenode.message-types-filter"\n formControlName="messageTypes"\n ></tb-message-types-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),qe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.allowedEntityTypes=[a.EntityType.DEVICE,a.EntityType.ASSET,a.EntityType.ENTITY_VIEW,a.EntityType.TENANT,a.EntityType.CUSTOMER,a.EntityType.USER,a.EntityType.DASHBOARD,a.EntityType.RULE_CHAIN,a.EntityType.RULE_NODE],n}return y(r,e),r.prototype.configForm=function(){return this.originatorTypeConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorTypeConfigForm=this.fb.group({originatorTypes:[e?e.originatorTypes:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-filter-node-originator-type-config",template:'<section [formGroup]="originatorTypeConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding tb-required">tb.rulenode.originator-types-filter</label>\n <tb-entity-type-list fxFlex\n formControlName="originatorTypes"\n [allowedEntityTypes]="allowedEntityTypes"\n [ignoreAuthorityFilter]="true"\n required>\n </tb-entity-type-list>\n</section>\n',styles:[":host ::ng-deep tb-entity-type-list .mat-form-field-flex{padding-top:0}:host ::ng-deep tb-entity-type-list .mat-form-field-infix{border-top:0}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Se=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.scriptConfigForm},r.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"filter",this.translate.instant("tb.rulenode.filter"),"Filter",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-filter-node-script-config",template:'<section [formGroup]="scriptConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.filter</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Filter"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-filter-function\' | translate }}\n </button>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),Ie=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.switchConfigForm},r.prototype.onConfigurationSet=function(e){this.switchConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.switchConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"switch",this.translate.instant("tb.rulenode.switch"),"Switch",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.switchConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-filter-node-switch-config",template:'<section [formGroup]="switchConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.switch</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Switch"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-switch-function\' | translate }}\n </button>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),ke=function(e){function r(t,r,n){var o,l,s=e.call(this,t)||this;s.store=t,s.translate=r,s.fb=n,s.alarmStatusTranslationsMap=a.alarmStatusTranslations,s.alarmStatusList=[],s.searchText="",s.displayStatusFn=s.displayStatus.bind(s);try{for(var m=C(Object.keys(a.AlarmStatus)),u=m.next();!u.done;u=m.next()){var d=u.value;s.alarmStatusList.push(a.AlarmStatus[d])}}catch(e){o={error:e}}finally{try{u&&!u.done&&(l=m.return)&&l.call(m)}finally{if(o)throw o.error}}return s.statusFormControl=new i.FormControl(""),s.filteredAlarmStatus=s.statusFormControl.valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(e){return s.fetchAlarmStatus(e)})),f.share()),s}return y(r,e),r.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},r.prototype.configForm=function(){return this.alarmStatusConfigForm},r.prototype.prepareInputConfig=function(e){return this.searchText="",this.statusFormControl.patchValue("",{emitEvent:!0}),e},r.prototype.onConfigurationSet=function(e){this.alarmStatusConfigForm=this.fb.group({alarmStatusList:[e?e.alarmStatusList:null,[i.Validators.required]]})},r.prototype.displayStatus=function(e){return e?this.translate.instant(a.alarmStatusTranslations.get(e)):void 0},r.prototype.fetchAlarmStatus=function(e){var t=this,r=this.getAlarmStatusList();if(this.searchText=e,this.searchText&&this.searchText.length){var n=this.searchText.toUpperCase();return c.of(r.filter((function(e){return t.translate.instant(a.alarmStatusTranslations.get(a.AlarmStatus[e])).toUpperCase().includes(n)})))}return c.of(r)},r.prototype.alarmStatusSelected=function(e){this.addAlarmStatus(e.option.value),this.clear("")},r.prototype.removeAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))}},r.prototype.addAlarmStatus=function(e){var t=this.alarmStatusConfigForm.get("alarmStatusList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.alarmStatusConfigForm.get("alarmStatusList").setValue(t))},r.prototype.getAlarmStatusList=function(){var e=this;return this.alarmStatusList.filter((function(t){return-1===e.alarmStatusConfigForm.get("alarmStatusList").value.indexOf(t)}))},r.prototype.onAlarmStatusInputFocus=function(){this.statusFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.alarmStatusInput.nativeElement.value=e,this.statusFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.alarmStatusInput.nativeElement.blur(),t.alarmStatusInput.nativeElement.focus()}),0)},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},b([t.ViewChild("alarmStatusInput",{static:!1}),h("design:type",t.ElementRef)],r.prototype,"alarmStatusInput",void 0),r=b([t.Component({selector:"tb-filter-node-check-alarm-status-config",template:'<section [formGroup]="alarmStatusConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" class="alarm-status-list">\n <mat-label translate>tb.rulenode.alarm-status-filter</mat-label>\n <mat-chip-list #alarmStatusChipList required>\n <mat-chip\n *ngFor="let alarmStatus of alarmStatusConfigForm.get(\'alarmStatusList\').value;"\n (removed)="removeAlarmStatus(alarmStatus)">\n <span>\n <strong>{{alarmStatusTranslationsMap.get(alarmStatus) | translate}}</strong>\n </span>\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text"\n style="max-width: 200px;"\n #alarmStatusInput\n (focusin)="onAlarmStatusInputFocus()"\n [formControl]="statusFormControl"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="alarmStatusAutocomplete"\n [matChipInputFor]="alarmStatusChipList">\n </mat-chip-list>\n <mat-autocomplete #alarmStatusAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="alarmStatusSelected($event)"\n [displayWith]="displayStatusFn">\n <mat-option *ngFor="let status of filteredAlarmStatus | async" [value]="status">\n <span [innerHTML]="alarmStatusTranslationsMap.get(status) | translate | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredAlarmStatus | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div>\n <span translate>tb.rulenode.no-alarm-status-matching</span>\n </div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <tb-error [error]="(statusFormControl.touched &&\n alarmStatusConfigForm.get(\'alarmStatusList\').hasError(\'required\'))\n ? translate.instant(\'tb.rulenode.alarm-status-list-empty\') : \'\'"></tb-error>\n </section>\n\n\n\n'}),h("design:paramtypes",[o.Store,n.TranslateService,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ne=function(){function e(){}return e=b([t.NgModule({declarations:[ve,Fe,xe,Te,qe,Se,Ie,ke],imports:[r.CommonModule,a.SharedModule,le],exports:[ve,Fe,xe,Te,qe,Se,Ie,ke]})],e)}(),Ve=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.customerAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.customerAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-customer-attributes-config",template:'<section [formGroup]="customerAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ customerAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ customerAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ee=function(e){function r(t,r,n){var a,o,l=e.call(this,t)||this;l.store=t,l.translate=r,l.fb=n,l.entityDetailsTranslationsMap=G,l.entityDetailsList=[],l.searchText="",l.displayDetailsFn=l.displayDetails.bind(l);try{for(var s=C(Object.keys(K)),m=s.next();!m.done;m=s.next()){var u=m.value;l.entityDetailsList.push(K[u])}}catch(e){a={error:e}}finally{try{m&&!m.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}return l.detailsFormControl=new i.FormControl(""),l.filteredEntityDetails=l.detailsFormControl.valueChanges.pipe(f.startWith(""),f.map((function(e){return e||""})),f.mergeMap((function(e){return l.fetchEntityDetails(e)})),f.share()),l}return y(r,e),r.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},r.prototype.configForm=function(){return this.entityDetailsConfigForm},r.prototype.prepareInputConfig=function(e){return this.searchText="",this.detailsFormControl.patchValue("",{emitEvent:!0}),e},r.prototype.onConfigurationSet=function(e){this.entityDetailsConfigForm=this.fb.group({detailsList:[e?e.detailsList:null,[i.Validators.required]],addToMetadata:[!!e&&e.addToMetadata,[]]})},r.prototype.displayDetails=function(e){return e?this.translate.instant(G.get(e)):void 0},r.prototype.fetchEntityDetails=function(e){var t=this;if(this.searchText=e,this.searchText&&this.searchText.length){var r=this.searchText.toUpperCase();return c.of(this.entityDetailsList.filter((function(e){return t.translate.instant(G.get(K[e])).toUpperCase().includes(r)})))}return c.of(this.entityDetailsList)},r.prototype.detailsFieldSelected=function(e){this.addDetailsField(e.option.value),this.clear("")},r.prototype.removeDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;if(t){var r=t.indexOf(e);r>=0&&(t.splice(r,1),this.entityDetailsConfigForm.get("detailsList").setValue(t))}},r.prototype.addDetailsField=function(e){var t=this.entityDetailsConfigForm.get("detailsList").value;t||(t=[]),-1===t.indexOf(e)&&(t.push(e),this.entityDetailsConfigForm.get("detailsList").setValue(t))},r.prototype.onEntityDetailsInputFocus=function(){this.detailsFormControl.updateValueAndValidity({onlySelf:!0,emitEvent:!0})},r.prototype.clear=function(e){var t=this;void 0===e&&(e=""),this.detailsInput.nativeElement.value=e,this.detailsFormControl.patchValue(null,{emitEvent:!0}),setTimeout((function(){t.detailsInput.nativeElement.blur(),t.detailsInput.nativeElement.focus()}),0)},r.ctorParameters=function(){return[{type:o.Store},{type:n.TranslateService},{type:i.FormBuilder}]},b([t.ViewChild("detailsInput",{static:!1}),h("design:type",t.ElementRef)],r.prototype,"detailsInput",void 0),r=b([t.Component({selector:"tb-enrichment-node-entity-details-config",template:'<section [formGroup]="entityDetailsConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" class="entity-fields-list">\n <mat-label translate>tb.rulenode.entity-details</mat-label>\n <mat-chip-list #detailsChipList required>\n <mat-chip\n *ngFor="let details of entityDetailsConfigForm.get(\'detailsList\').value;"\n (removed)="removeDetailsField(details)">\n <span>\n <strong>{{entityDetailsTranslationsMap.get(details) | translate}}</strong>\n </span>\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text"\n style="max-width: 200px;"\n #detailsInput\n (focusin)="onEntityDetailsInputFocus()"\n [formControl]="detailsFormControl"\n matAutocompleteOrigin\n #origin="matAutocompleteOrigin"\n [matAutocompleteConnectedTo]="origin"\n [matAutocomplete]="detailsAutocomplete"\n [matChipInputFor]="detailsChipList">\n </mat-chip-list>\n <mat-autocomplete #detailsAutocomplete="matAutocomplete"\n class="tb-autocomplete"\n (optionSelected)="detailsFieldSelected($event)"\n [displayWith]="displayDetailsFn">\n <mat-option *ngFor="let details of filteredEntityDetails | async" [value]="details">\n <span [innerHTML]="entityDetailsTranslationsMap.get(details) | translate | highlight:searchText"></span>\n </mat-option>\n <mat-option *ngIf="(filteredEntityDetails | async)?.length === 0" [value]="null" class="tb-not-found">\n <div class="tb-not-found-content" (click)="$event.stopPropagation()">\n <div>\n <span translate>tb.rulenode.no-entity-details-matching</span>\n </div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </mat-form-field>\n <tb-error [error]="(detailsFormControl.touched &&\n entityDetailsConfigForm.get(\'detailsList\').hasError(\'required\'))\n ? translate.instant(\'tb.rulenode.entity-details-list-empty\') : \'\'"></tb-error>\n <mat-checkbox fxFlex formControlName="addToMetadata" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.add-to-metadata\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.add-to-metadata-hint</div>\n</section>\n',styles:[":host ::ng-deep mat-form-field.entity-fields-list .mat-form-field-wrapper{margin-bottom:-1.25em}"]}),h("design:paramtypes",[o.Store,n.TranslateService,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ae=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return y(r,e),r.prototype.configForm=function(){return this.deviceAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.deviceAttributesConfigForm=this.fb.group({deviceRelationsQuery:[e?e.deviceRelationsQuery:null,[i.Validators.required]],tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},r.prototype.removeKey=function(e,t){var r=this.deviceAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.deviceAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.deviceAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.deviceAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-device-attributes-config",template:'<section [formGroup]="deviceAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.device-relations-query</label>\n <tb-device-relations-query-config\n required\n formControlName="deviceRelationsQuery"\n style="padding-bottom: 15px;">\n </tb-device-relations-query-config>\n <mat-checkbox fxFlex formControlName="tellFailureIfAbsent" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.tell-failure-if-absent\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.tell-failure-if-absent-hint</div>\n <label translate class="tb-title no-padding">tb.rulenode.client-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #clientAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'clientAttributeNames\').value;"\n (removed)="removeKey(key, \'clientAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.client-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="clientAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'clientAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.shared-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #sharedAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'sharedAttributeNames\').value;"\n (removed)="removeKey(key, \'sharedAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.shared-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="sharedAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'sharedAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.server-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #serverAttributesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'serverAttributeNames\').value;"\n (removed)="removeKey(key, \'serverAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.server-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="serverAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'serverAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of deviceAttributesConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n </mat-form-field>\n <mat-checkbox formControlName="getLatestValueWithTs" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.get-latest-value-with-ts\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.get-latest-value-with-ts-hint\' | translate }}"></div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Le=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n}return y(r,e),r.prototype.configForm=function(){return this.originatorAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorAttributesConfigForm=this.fb.group({tellFailureIfAbsent:[!!e&&e.tellFailureIfAbsent,[]],clientAttributeNames:[e?e.clientAttributeNames:null,[]],sharedAttributeNames:[e?e.sharedAttributeNames:null,[]],serverAttributeNames:[e?e.serverAttributeNames:null,[]],latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],getLatestValueWithTs:[!!e&&e.getLatestValueWithTs,[]]})},r.prototype.removeKey=function(e,t){var r=this.originatorAttributesConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.originatorAttributesConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.originatorAttributesConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.originatorAttributesConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-originator-attributes-config",template:'<section [formGroup]="originatorAttributesConfigForm" fxLayout="column">\n <mat-checkbox fxFlex formControlName="tellFailureIfAbsent" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.tell-failure-if-absent\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" translate>tb.rulenode.tell-failure-if-absent-hint</div>\n <label translate class="tb-title no-padding">tb.rulenode.client-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #clientAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'clientAttributeNames\').value;"\n (removed)="removeKey(key, \'clientAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.client-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="clientAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'clientAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.client-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.shared-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #sharedAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'sharedAttributeNames\').value;"\n (removed)="removeKey(key, \'sharedAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.shared-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="sharedAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'sharedAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.shared-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.server-attributes</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #serverAttributesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'serverAttributeNames\').value;"\n (removed)="removeKey(key, \'serverAttributeNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.server-attributes\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="serverAttributesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'serverAttributeNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.server-attributes-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of originatorAttributesConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.latest-timeseries-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-checkbox formControlName="getLatestValueWithTs" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.get-latest-value-with-ts\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" innerHTML="{{ \'tb.rulenode.get-latest-value-with-ts-hint\' | translate }}"></div>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Me=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.originatorFieldsConfigForm},r.prototype.onConfigurationSet=function(e){this.originatorFieldsConfigForm=this.fb.group({fieldsMapping:[e?e.fieldsMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-originator-fields-config",template:'<section [formGroup]="originatorFieldsConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.fields-mapping</label>\n <tb-kv-map-config\n required\n formControlName="fieldsMapping"\n requiredText="tb.rulenode.fields-mapping-required"\n keyText="tb.rulenode.source-field"\n keyRequiredText="tb.rulenode.source-field-required"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Pe=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.separatorKeysCodes=[s.ENTER,s.COMMA,s.SEMICOLON],n.fetchMode=U,n.fetchModes=Object.keys(U),n.samplingOrders=Object.keys(j),n.timeUnits=Object.keys(R),n.timeUnitsTranslationMap=D,n}return y(r,e),r.prototype.configForm=function(){return this.getTelemetryFromDatabaseConfigForm},r.prototype.onConfigurationSet=function(e){this.getTelemetryFromDatabaseConfigForm=this.fb.group({latestTsKeyNames:[e?e.latestTsKeyNames:null,[]],fetchMode:[e?e.fetchMode:null,[i.Validators.required]],orderBy:[e?e.orderBy:null,[]],limit:[e?e.limit:null,[]],useMetadataIntervalPatterns:[!!e&&e.useMetadataIntervalPatterns,[]],startInterval:[e?e.startInterval:null,[]],startIntervalTimeUnit:[e?e.startIntervalTimeUnit:null,[]],endInterval:[e?e.endInterval:null,[]],endIntervalTimeUnit:[e?e.endIntervalTimeUnit:null,[]],startIntervalPattern:[e?e.startIntervalPattern:null,[]],endIntervalPattern:[e?e.endIntervalPattern:null,[]]})},r.prototype.validatorTriggers=function(){return["fetchMode","useMetadataIntervalPatterns"]},r.prototype.updateValidators=function(e){var t=this.getTelemetryFromDatabaseConfigForm.get("fetchMode").value,r=this.getTelemetryFromDatabaseConfigForm.get("useMetadataIntervalPatterns").value;t&&t===U.ALL?(this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([i.Validators.required,i.Validators.min(2),i.Validators.max(1e3)])):(this.getTelemetryFromDatabaseConfigForm.get("orderBy").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("limit").setValidators([])),r?(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([i.Validators.required])):(this.getTelemetryFromDatabaseConfigForm.get("startInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("endInterval").setValidators([i.Validators.required,i.Validators.min(1),i.Validators.max(2147483647)]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").setValidators([i.Validators.required]),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").setValidators([]),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").setValidators([])),this.getTelemetryFromDatabaseConfigForm.get("orderBy").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("limit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endInterval").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalTimeUnit").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("startIntervalPattern").updateValueAndValidity({emitEvent:e}),this.getTelemetryFromDatabaseConfigForm.get("endIntervalPattern").updateValueAndValidity({emitEvent:e})},r.prototype.removeKey=function(e,t){var r=this.getTelemetryFromDatabaseConfigForm.get(t).value,n=r.indexOf(e);n>=0&&(r.splice(n,1),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(r,{emitEvent:!0}))},r.prototype.addKey=function(e,t){var r=e.input,n=e.value;if((n||"").trim()){n=n.trim();var a=this.getTelemetryFromDatabaseConfigForm.get(t).value;a&&-1!==a.indexOf(n)||(a||(a=[]),a.push(n),this.getTelemetryFromDatabaseConfigForm.get(t).setValue(a,{emitEvent:!0}))}r&&(r.value="")},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-get-telemetry-from-database",template:'<section [formGroup]="getTelemetryFromDatabaseConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.latest-timeseries</label>\n <mat-form-field floatLabel="always" class="mat-block">\n <mat-label></mat-label>\n <mat-chip-list #latestTimeseriesChipList>\n <mat-chip\n *ngFor="let key of getTelemetryFromDatabaseConfigForm.get(\'latestTsKeyNames\').value;"\n (removed)="removeKey(key, \'latestTsKeyNames\')">\n {{key}}\n <mat-icon matChipRemove>close</mat-icon>\n </mat-chip>\n <input matInput type="text" placeholder="{{\'tb.rulenode.latest-timeseries\' | translate}}"\n style="max-width: 200px;"\n [matChipInputFor]="latestTimeseriesChipList"\n [matChipInputSeparatorKeyCodes]="separatorKeysCodes"\n (matChipInputTokenEnd)="addKey($event, \'latestTsKeyNames\')"\n [matChipInputAddOnBlur]="true">\n </mat-chip-list>\n <mat-hint innerHTML="{{ \'tb.rulenode.latest-timeseries-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.fetch-mode</mat-label>\n <mat-select formControlName="fetchMode" required>\n <mat-option *ngFor="let mode of fetchModes" [value]="mode">\n {{ mode }}\n </mat-option>\n </mat-select>\n <mat-hint translate>tb.rulenode.fetch-mode-hint</mat-hint>\n </mat-form-field>\n <div fxLayout="column" *ngIf="getTelemetryFromDatabaseConfigForm.get(\'fetchMode\').value === fetchMode.ALL">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.order-by</mat-label>\n <mat-select formControlName="orderBy" required>\n <mat-option *ngFor="let order of samplingOrders" [value]="order">\n {{ order }}\n </mat-option>\n </mat-select>\n <mat-hint translate>tb.rulenode.order-by-hint</mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.limit</mat-label>\n <input type="number" min="2" max="1000" step="1" matInput formControlName="limit" required>\n <mat-hint translate>tb.rulenode.limit-hint</mat-hint>\n </mat-form-field>\n </div>\n <mat-checkbox formControlName="useMetadataIntervalPatterns">\n {{ \'tb.rulenode.use-metadata-interval-patterns\' | translate }}\n </mat-checkbox>\n <div class="tb-hint" style="padding-bottom: 16px;" translate>tb.rulenode.use-metadata-interval-patterns-hint</div>\n <div fxLayout="column" *ngIf="getTelemetryFromDatabaseConfigForm.get(\'useMetadataIntervalPatterns\').value === false; else intervalPattern">\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.start-interval</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="startInterval" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'required\')">\n {{ \'tb.rulenode.start-interval-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startInterval\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.start-interval-time-unit</mat-label>\n <mat-select formControlName="startIntervalTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap.gt-sm="8px">\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.end-interval</mat-label>\n <input type="number" step="1" min="1" max="2147483647" matInput formControlName="endInterval" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'required\')">\n {{ \'tb.rulenode.end-interval-value-required\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'min\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endInterval\').hasError(\'max\')">\n {{ \'tb.rulenode.time-value-range\' | translate }}\n </mat-error>\n </mat-form-field>\n <mat-form-field fxFlex class="mat-block">\n <mat-label translate>tb.rulenode.end-interval-time-unit</mat-label>\n <mat-select formControlName="endIntervalTimeUnit" required>\n <mat-option *ngFor="let timeUnit of timeUnits" [value]="timeUnit">\n {{ timeUnitsTranslationMap.get(timeUnit) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </div>\n <ng-template #intervalPattern>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.start-interval-pattern</mat-label>\n <input matInput formControlName="startIntervalPattern" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'startIntervalPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.start-interval-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.start-interval-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.end-interval-pattern</mat-label>\n <input matInput formControlName="endIntervalPattern" required>\n <mat-error *ngIf="getTelemetryFromDatabaseConfigForm.get(\'endIntervalPattern\').hasError(\'required\')">\n {{ \'tb.rulenode.end-interval-pattern-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.end-interval-pattern-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n </ng-template>\n</section>\n',styles:[":host label.tb-title{margin-bottom:-10px}"]}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Re=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.relatedAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.relatedAttributesConfigForm=this.fb.group({relationsQuery:[e?e.relationsQuery:null,[i.Validators.required]],telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-related-attributes-config",template:'<section [formGroup]="relatedAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.relations-query</label>\n <tb-relations-query-config\n required\n formControlName="relationsQuery"\n style="padding-bottom: 15px;">\n </tb-relations-query-config>\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ relatedAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ relatedAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),we=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.tenantAttributesConfigForm},r.prototype.onConfigurationSet=function(e){this.tenantAttributesConfigForm=this.fb.group({telemetry:[!!e&&e.telemetry,[]],attrMapping:[e?e.attrMapping:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-enrichment-node-tenant-attributes-config",template:'<section [formGroup]="tenantAttributesConfigForm" fxLayout="column">\n <label translate class="tb-title tb-required">tb.rulenode.attr-mapping</label>\n <mat-checkbox fxFlex formControlName="telemetry" style="padding-bottom: 16px;">\n {{ \'tb.rulenode.latest-telemetry\' | translate }}\n </mat-checkbox>\n <tb-kv-map-config\n required\n formControlName="attrMapping"\n requiredText="tb.rulenode.attr-mapping-required"\n keyText="{{ tenantAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry\' : \'tb.rulenode.source-attribute\' }}"\n keyRequiredText="{{ tenantAttributesConfigForm.get(\'telemetry\').value ? \'tb.rulenode.source-telemetry-required\' : \'tb.rulenode.source-attribute-required\' }}"\n valText="tb.rulenode.target-attribute"\n valRequiredText="tb.rulenode.target-attribute-required">\n </tb-kv-map-config>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Oe=function(){function e(){}return e=b([t.NgModule({declarations:[Ve,Ee,Ae,Le,Me,Pe,Re,we],imports:[r.CommonModule,a.SharedModule,le],exports:[Ve,Ee,Ae,Le,Me,Pe,Re,we]})],e)}(),De=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n.originatorSource=v,n.originatorSources=Object.keys(v),n.originatorSourceTranslationMap=P,n}return y(r,e),r.prototype.configForm=function(){return this.changeOriginatorConfigForm},r.prototype.onConfigurationSet=function(e){this.changeOriginatorConfigForm=this.fb.group({originatorSource:[e?e.originatorSource:null,[i.Validators.required]],relationsQuery:[e?e.relationsQuery:null,[]]})},r.prototype.validatorTriggers=function(){return["originatorSource"]},r.prototype.updateValidators=function(e){var t=this.changeOriginatorConfigForm.get("originatorSource").value;t&&t===v.RELATED?this.changeOriginatorConfigForm.get("relationsQuery").setValidators([i.Validators.required]):this.changeOriginatorConfigForm.get("relationsQuery").setValidators([]),this.changeOriginatorConfigForm.get("relationsQuery").updateValueAndValidity({emitEvent:e})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-transformation-node-change-originator-config",template:'<section [formGroup]="changeOriginatorConfigForm" fxLayout="column">\n <mat-form-field class="mat-block">\n <mat-label translate>tb.rulenode.originator-source</mat-label>\n <mat-select formControlName="originatorSource" required>\n <mat-option *ngFor="let source of originatorSources" [value]="source">\n {{ originatorSourceTranslationMap.get(source) | translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <section fxLayout="column" *ngIf="changeOriginatorConfigForm.get(\'originatorSource\').value === originatorSource.RELATED">\n <label translate class="tb-title tb-required">tb.rulenode.relations-query</label>\n <tb-relations-query-config\n required\n formControlName="relationsQuery"\n style="padding-bottom: 15px;">\n </tb-relations-query-config>\n </section>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ke=function(e){function r(t,r,n,a){var o=e.call(this,t)||this;return o.store=t,o.fb=r,o.nodeScriptTestService=n,o.translate=a,o}return y(r,e),r.prototype.configForm=function(){return this.scriptConfigForm},r.prototype.onConfigurationSet=function(e){this.scriptConfigForm=this.fb.group({jsScript:[e?e.jsScript:null,[i.Validators.required]]})},r.prototype.testScript=function(){var e=this,t=this.scriptConfigForm.get("jsScript").value;this.nodeScriptTestService.testNodeScript(t,"update",this.translate.instant("tb.rulenode.transformer"),"Transform",["msg","metadata","msgType"],this.ruleNodeId).subscribe((function(t){t&&e.scriptConfigForm.get("jsScript").setValue(t)}))},r.prototype.onValidate=function(){this.jsFuncComponent.validateOnSubmit()},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder},{type:l.NodeScriptTestService},{type:n.TranslateService}]},b([t.ViewChild("jsFuncComponent",{static:!0}),h("design:type",a.JsFuncComponent)],r.prototype,"jsFuncComponent",void 0),r=b([t.Component({selector:"tb-transformation-node-script-config",template:'<section [formGroup]="scriptConfigForm" fxLayout="column">\n <label translate class="tb-title no-padding">tb.rulenode.transform</label>\n <tb-js-func #jsFuncComponent\n formControlName="jsScript"\n functionName="Transform"\n [functionArgs]="[\'msg\', \'metadata\', \'msgType\']"\n noValidate="true">\n </tb-js-func>\n <div fxLayout="row">\n <button mat-button mat-raised-button color="primary" (click)="testScript()">\n {{ \'tb.rulenode.test-transformer-function\' | translate }}\n </button>\n </div>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder,l.NodeScriptTestService,n.TranslateService])],r)}(a.RuleNodeConfigurationComponent),Be=function(e){function r(t,r){var n=e.call(this,t)||this;return n.store=t,n.fb=r,n}return y(r,e),r.prototype.configForm=function(){return this.toEmailConfigForm},r.prototype.onConfigurationSet=function(e){this.toEmailConfigForm=this.fb.group({fromTemplate:[e?e.fromTemplate:null,[i.Validators.required]],toTemplate:[e?e.toTemplate:null,[i.Validators.required]],ccTemplate:[e?e.ccTemplate:null,[]],bccTemplate:[e?e.bccTemplate:null,[]],subjectTemplate:[e?e.subjectTemplate:null,[i.Validators.required]],bodyTemplate:[e?e.bodyTemplate:null,[i.Validators.required]]})},r.ctorParameters=function(){return[{type:o.Store},{type:i.FormBuilder}]},r=b([t.Component({selector:"tb-transformation-node-to-email-config",template:'<section [formGroup]="toEmailConfigForm" fxLayout="column">\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.from-template</mat-label>\n <textarea required matInput formControlName="fromTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'fromTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.from-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.from-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.to-template</mat-label>\n <textarea required matInput formControlName="toTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'toTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.to-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.cc-template</mat-label>\n <textarea matInput formControlName="ccTemplate" rows="2"></textarea>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.bcc-template</mat-label>\n <textarea matInput formControlName="bccTemplate" rows="2"></textarea>\n <mat-hint innerHTML="{{ \'tb.rulenode.mail-address-list-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.subject-template</mat-label>\n <textarea required matInput formControlName="subjectTemplate" rows="2"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'subjectTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.subject-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.subject-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n <mat-form-field class="mat-block" style="padding-bottom: 16px;">\n <mat-label translate>tb.rulenode.body-template</mat-label>\n <textarea required matInput formControlName="bodyTemplate" rows="6"></textarea>\n <mat-error *ngIf="toEmailConfigForm.get(\'bodyTemplate\').hasError(\'required\')">\n {{ \'tb.rulenode.body-template-required\' | translate }}\n </mat-error>\n <mat-hint innerHTML="{{ \'tb.rulenode.body-template-hint\' | translate }}"></mat-hint>\n </mat-form-field>\n</section>\n'}),h("design:paramtypes",[o.Store,i.FormBuilder])],r)}(a.RuleNodeConfigurationComponent),Ue=function(){function e(){}return e=b([t.NgModule({declarations:[De,Ke,Be],imports:[r.CommonModule,a.SharedModule,le],exports:[De,Ke,Be]})],e)}(),je=function(){function e(e){!function(e){e.setTranslation("en_US",{tb:{rulenode:{"create-entity-if-not-exists":"Create new entity if not exists","create-entity-if-not-exists-hint":"Create a new entity set above if it does not exist.","entity-name-pattern":"Name pattern","entity-name-pattern-required":"Name pattern is required","entity-name-pattern-hint":"Name pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","entity-type-pattern":"Type pattern","entity-type-pattern-required":"Type pattern is required","entity-type-pattern-hint":"Type pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","entity-cache-expiration":"Entities cache expiration time (sec)","entity-cache-expiration-hint":"Specifies maximum time interval allowed to store found entity records. 0 value means that records will never expire.","entity-cache-expiration-required":"Entities cache expiration time is required.","entity-cache-expiration-range":"Entities cache expiration time should be greater than or equal to 0.","customer-name-pattern":"Customer name pattern","customer-name-pattern-required":"Customer name pattern is required","create-customer-if-not-exists":"Create new customer if not exists","customer-cache-expiration":"Customers cache expiration time (sec)","customer-name-pattern-hint":"Customer name pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","customer-cache-expiration-hint":"Specifies maximum time interval allowed to store found customer records. 0 value means that records will never expire.","customer-cache-expiration-required":"Customers cache expiration time is required.","customer-cache-expiration-range":"Customers cache expiration time should be greater than or equal to 0.","start-interval":"Start Interval","end-interval":"End Interval","start-interval-time-unit":"Start Interval Time Unit","end-interval-time-unit":"End Interval Time Unit","fetch-mode":"Fetch mode","fetch-mode-hint":"If selected fetch mode 'ALL' you able to choose telemetry sampling order.","order-by":"Order by","order-by-hint":"Select to choose telemetry sampling order.",limit:"Limit","limit-hint":"Min limit value is 2, max - 1000. In case you want to fetch a single entry, select fetch mode 'FIRST' or 'LAST'.","time-unit-milliseconds":"Milliseconds","time-unit-seconds":"Seconds","time-unit-minutes":"Minutes","time-unit-hours":"Hours","time-unit-days":"Days","time-value-range":"Time value should be in a range from 1 to 2147483647.","start-interval-value-required":"Start interval value is required.","end-interval-value-required":"End interval value is required.",filter:"Filter",switch:"Switch","message-type":"Message type","message-type-required":"Message type is required.","message-types-filter":"Message types filter","no-message-types-found":"No message types found","no-message-type-matching":"'{{messageType}}' not found.","create-new-message-type":"Create a new one!","message-types-required":"Message types are required.","client-attributes":"Client attributes","client-attributes-hint":"Client attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","shared-attributes":"Shared attributes","shared-attributes-hint":"Shared attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","server-attributes":"Server attributes","server-attributes-hint":"Server attributes, use <code>${metaKeyName}</code> to substitute variables from metadata","latest-timeseries":"Latest timeseries","latest-timeseries-hint":"Latest timeseries, use <code>${metaKeyName}</code> to substitute variables from metadata","data-keys":"Message data","metadata-keys":"Message metadata","relations-query":"Relations query","device-relations-query":"Device relations query","max-relation-level":"Max relation level","relation-type-pattern":"Relation type pattern","relation-type-pattern-hint":"Relation type pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","relation-type-pattern-required":"Relation type pattern is required","relation-types-list":"Relation types to propagate","relation-types-list-hint":"If Propagate relation types are not selected, alarms will be propagated without filtering by relation type.","unlimited-level":"Unlimited level","latest-telemetry":"Latest telemetry","attr-mapping":"Attributes mapping","source-attribute":"Source attribute","source-attribute-required":"Source attribute is required.","source-telemetry":"Source telemetry","source-telemetry-required":"Source telemetry is required.","target-attribute":"Target attribute","target-attribute-required":"Target attribute is required.","attr-mapping-required":"At least one attribute mapping should be specified.","fields-mapping":"Fields mapping","fields-mapping-required":"At least one field mapping should be specified.","source-field":"Source field","source-field-required":"Source field is required.","originator-source":"Originator source","originator-customer":"Customer","originator-tenant":"Tenant","originator-related":"Related","originator-alarm-originator":"Alarm Originator","clone-message":"Clone message",transform:"Transform","default-ttl":"Default TTL in seconds","default-ttl-required":"Default TTL is required.","min-default-ttl-message":"Only 0 minimum TTL is allowed.","message-count":"Message count (0 - unlimited)","message-count-required":"Message count is required.","min-message-count-message":"Only 0 minimum message count is allowed.","period-seconds":"Period in seconds","period-seconds-required":"Period is required.","use-metadata-period-in-seconds-patterns":"Use metadata period in seconds pattern","use-metadata-period-in-seconds-patterns-hint":"If selected, rule node use period in seconds interval pattern from message metadata assuming that intervals are in the seconds.","period-in-seconds-pattern":"Period in seconds metadata pattern","period-in-seconds-pattern-required":"Period in seconds pattern is required","period-in-seconds-pattern-hint":"Period in seconds pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","min-period-seconds-message":"Only 1 second minimum period is allowed.",originator:"Originator","message-body":"Message body","message-metadata":"Message metadata",generate:"Generate","test-generator-function":"Test generator function",generator:"Generator","test-filter-function":"Test filter function","test-switch-function":"Test switch function","test-transformer-function":"Test transformer function",transformer:"Transformer","alarm-create-condition":"Alarm create condition","test-condition-function":"Test condition function","alarm-clear-condition":"Alarm clear condition","alarm-details-builder":"Alarm details builder","test-details-function":"Test details function","alarm-type":"Alarm type","alarm-type-required":"Alarm type is required.","alarm-severity":"Alarm severity","alarm-severity-required":"Alarm severity is required","alarm-status-filter":"Alarm status filter","alarm-status-list-empty":"Alarm status list is empty","no-alarm-status-matching":"No alarm status matching were found.",propagate:"Propagate",condition:"Condition",details:"Details","to-string":"To string","test-to-string-function":"Test to string function","from-template":"From Template","from-template-required":"From Template is required","from-template-hint":"From address template, use <code>${metaKeyName}</code> to substitute variables from metadata","to-template":"To Template","to-template-required":"To Template is required","mail-address-list-template-hint":"Comma separated address list, use <code>${metaKeyName}</code> to substitute variables from metadata","cc-template":"Cc Template","bcc-template":"Bcc Template","subject-template":"Subject Template","subject-template-required":"Subject Template is required","subject-template-hint":"Mail subject template, use <code>${metaKeyName}</code> to substitute variables from metadata","body-template":"Body Template","body-template-required":"Body Template is required","body-template-hint":"Mail body template, use <code>${metaKeyName}</code> to substitute variables from metadata","request-id-metadata-attribute":"Request Id Metadata attribute name","timeout-sec":"Timeout in seconds","timeout-required":"Timeout is required","min-timeout-message":"Only 0 minimum timeout value is allowed.","endpoint-url-pattern":"Endpoint URL pattern","endpoint-url-pattern-required":"Endpoint URL pattern is required","endpoint-url-pattern-hint":"HTTP URL address pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","request-method":"Request method","use-simple-client-http-factory":"Use simple client HTTP factory","read-timeout":"Read timeout in millis","read-timeout-hint":"The value of 0 means an infinite timeout","max-parallel-requests-count":"Max number of parallel requests","max-parallel-requests-count-hint":"The value of 0 specifies no limit in parallel processing",headers:"Headers","headers-hint":"Use <code>${metaKeyName}</code> in header/value fields to substitute variables from metadata",header:"Header","header-required":"Header is required",value:"Value","value-required":"Value is required","topic-pattern":"Topic pattern","topic-pattern-required":"Topic pattern is required","mqtt-topic-pattern-hint":"MQTT topic pattern, use <code>${metaKeyName}</code> to substitute variables from metadata",topic:"Topic","topic-required":"Topic is required","bootstrap-servers":"Bootstrap servers","bootstrap-servers-required":"Bootstrap servers value is required","other-properties":"Other properties",key:"Key","key-required":"Key is required",retries:"Automatically retry times if fails","min-retries-message":"Only 0 minimum retries is allowed.","batch-size-bytes":"Produces batch size in bytes","min-batch-size-bytes-message":"Only 0 minimum batch size is allowed.","linger-ms":"Time to buffer locally (ms)","min-linger-ms-message":"Only 0 ms minimum value is allowed.","buffer-memory-bytes":"Client buffer max size in bytes","min-buffer-memory-message":"Only 0 minimum buffer size is allowed.",acks:"Number of acknowledgments","key-serializer":"Key serializer","key-serializer-required":"Key serializer is required","value-serializer":"Value serializer","value-serializer-required":"Value serializer is required","topic-arn-pattern":"Topic ARN pattern","topic-arn-pattern-required":"Topic ARN pattern is required","topic-arn-pattern-hint":"Topic ARN pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","aws-access-key-id":"AWS Access Key ID","aws-access-key-id-required":"AWS Access Key ID is required","aws-secret-access-key":"AWS Secret Access Key","aws-secret-access-key-required":"AWS Secret Access Key is required","aws-region":"AWS Region","aws-region-required":"AWS Region is required","exchange-name-pattern":"Exchange name pattern","routing-key-pattern":"Routing key pattern","message-properties":"Message properties",host:"Host","host-required":"Host is required",port:"Port","port-required":"Port is required","port-range":"Port should be in a range from 1 to 65535.","virtual-host":"Virtual host",username:"Username",password:"Password","automatic-recovery":"Automatic recovery","connection-timeout-ms":"Connection timeout (ms)","min-connection-timeout-ms-message":"Only 0 ms minimum value is allowed.","handshake-timeout-ms":"Handshake timeout (ms)","min-handshake-timeout-ms-message":"Only 0 ms minimum value is allowed.","client-properties":"Client properties","queue-url-pattern":"Queue URL pattern","queue-url-pattern-required":"Queue URL pattern is required","queue-url-pattern-hint":"Queue URL pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","delay-seconds":"Delay (seconds)","min-delay-seconds-message":"Only 0 seconds minimum value is allowed.","max-delay-seconds-message":"Only 900 seconds maximum value is allowed.",name:"Name","name-required":"Name is required","queue-type":"Queue type","sqs-queue-standard":"Standard","sqs-queue-fifo":"FIFO","gcp-project-id":"GCP project ID","gcp-project-id-required":"GCP project ID is required","gcp-service-account-key":"GCP service account key file","gcp-service-account-key-required":"GCP service account key file is required","pubsub-topic-name":"Topic name","pubsub-topic-name-required":"Topic name is required","message-attributes":"Message attributes","message-attributes-hint":"Use <code>${metaKeyName}</code> in name/value fields to substitute variables from metadata","connect-timeout":"Connection timeout (sec)","connect-timeout-required":"Connection timeout is required.","connect-timeout-range":"Connection timeout should be in a range from 1 to 200.","client-id":"Client ID","device-id":"Device ID","device-id-required":"Device ID is required.","clean-session":"Clean session","enable-ssl":"Enable SSL",credentials:"Credentials","credentials-type":"Credentials type","credentials-type-required":"Credentials type is required.","credentials-anonymous":"Anonymous","credentials-basic":"Basic","credentials-pem":"PEM","credentials-sas":"Shared Access Signature","sas-key":"SAS Key","sas-key-required":"SAS Key is required.",hostname:"Hostname","hostname-required":"Hostname is required.","azure-ca-cert":"CA certificate file","username-required":"Username is required.","password-required":"Password is required.","ca-cert":"CA certificate file *","private-key":"Private key file *",cert:"Certificate file *","no-file":"No file selected.","drop-file":"Drop a file or click to select a file to upload.","private-key-password":"Private key password","use-system-smtp-settings":"Use system SMTP settings","use-metadata-interval-patterns":"Use metadata interval patterns","use-metadata-interval-patterns-hint":"If selected, rule node use start and end interval patterns from message metadata assuming that intervals are in the milliseconds.","use-message-alarm-data":"Use message alarm data","check-all-keys":"Check that all selected keys are present","check-all-keys-hint":"If selected, checks that all specified keys are present in the message data and metadata.","check-relation-to-specific-entity":"Check relation to specific entity","check-relation-hint":"Checks existence of relation to specific entity or to any entity based on direction and relation type.","delete-relation-to-specific-entity":"Delete relation to specific entity","delete-relation-hint":"Deletes relation from the originator of the incoming message to the specified entity or list of entities based on direction and type.","remove-current-relations":"Remove current relations","remove-current-relations-hint":"Removes current relations from the originator of the incoming message based on direction and type.","change-originator-to-related-entity":"Change originator to related entity","change-originator-to-related-entity-hint":"Used to process submitted message as a message from another entity.","start-interval-pattern":"Start interval pattern","end-interval-pattern":"End interval pattern","start-interval-pattern-required":"Start interval pattern is required","end-interval-pattern-required":"End interval pattern is required","start-interval-pattern-hint":"Start interval pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","end-interval-pattern-hint":"End interval pattern, use <code>${metaKeyName}</code> to substitute variables from metadata","smtp-protocol":"Protocol","smtp-host":"SMTP host","smtp-host-required":"SMTP host is required.","smtp-port":"SMTP port","smtp-port-required":"You must supply a smtp port.","smtp-port-range":"SMTP port should be in a range from 1 to 65535.","timeout-msec":"Timeout ms","min-timeout-msec-message":"Only 0 ms minimum value is allowed.","enter-username":"Enter username","enter-password":"Enter password","enable-tls":"Enable TLS","tls-version":"TLS version","enable-proxy":"Enable proxy","use-system-proxy-properties":"Use system proxy properties","proxy-host":"Proxy host","proxy-host-required":"Proxy host is required.","proxy-port":"Proxy port","proxy-port-required":"Proxy port is required.","proxy-port-range":"Proxy port should be in a range from 1 to 65535.","proxy-user":"Proxy user","proxy-password":"Proxy password","proxy-scheme":"Proxy scheme","min-period-0-seconds-message":"Only 0 second minimum period is allowed.","max-pending-messages":"Maximum pending messages","max-pending-messages-required":"Maximum pending messages is required.","max-pending-messages-range":"Maximum pending messages should be in a range from 1 to 100000.","originator-types-filter":"Originator types filter","interval-seconds":"Interval in seconds","interval-seconds-required":"Interval is required.","min-interval-seconds-message":"Only 1 second minimum interval is allowed.","output-timeseries-key-prefix":"Output timeseries key prefix","output-timeseries-key-prefix-required":"Output timeseries key prefix required.","separator-hint":'You should press "enter" to complete field input.',"entity-details":"Select entity details:","entity-details-title":"Title","entity-details-country":"Country","entity-details-state":"State","entity-details-zip":"Zip","entity-details-address":"Address","entity-details-address2":"Address2","entity-details-additional_info":"Additional Info","entity-details-phone":"Phone","entity-details-email":"Email","add-to-metadata":"Add selected details to message metadata","add-to-metadata-hint":"If selected, adds the selected details keys to the message metadata instead of message data.","entity-details-list-empty":"No entity details selected.","no-entity-details-matching":"No entity details matching were found.","custom-table-name":"Custom table name","custom-table-name-required":"Table Name is required","custom-table-hint":"You should enter the table name without prefix 'cs_tb_'.","message-field":"Message field","message-field-required":"Message field is required.","table-col":"Table column","table-col-required":"Table column is required.","latitude-key-name":"Latitude key name","longitude-key-name":"Longitude key name","latitude-key-name-required":"Latitude key name is required.","longitude-key-name-required":"Longitude key name is required.","fetch-perimeter-info-from-message-metadata":"Fetch perimeter information from message metadata","perimeter-circle":"Circle","perimeter-polygon":"Polygon","perimeter-type":"Perimeter type","circle-center-latitude":"Center latitude","circle-center-latitude-required":"Center latitude is required.","circle-center-longitude":"Center longitude","circle-center-longitude-required":"Center longitude is required.","range-unit-meter":"Meter","range-unit-kilometer":"Kilometer","range-unit-foot":"Foot","range-unit-mile":"Mile","range-unit-nautical-mile":"Nautical mile","range-units":"Range units",range:"Range","range-required":"Range is required.","polygon-definition":"Polygon definition","polygon-definition-required":"Polygon definition is required.","polygon-definition-hint":"Please, use the following format for manual definition of polygon: [[lat1,lon1],[lat2,lon2], ... ,[latN,lonN]].","min-inside-duration":"Minimal inside duration","min-inside-duration-value-required":"Minimal inside duration is required","min-inside-duration-time-unit":"Minimal inside duration time unit","min-outside-duration":"Minimal outside duration","min-outside-duration-value-required":"Minimal outside duration is required","min-outside-duration-time-unit":"Minimal outside duration time unit","tell-failure-if-absent":"Tell Failure","tell-failure-if-absent-hint":'If at least one selected key doesn\'t exist the outbound message will report "Failure".',"get-latest-value-with-ts":"Fetch Latest telemetry with Timestamp","get-latest-value-with-ts-hint":'If selected, latest telemetry values will be added to the outbound message metadata with timestamp, e.g: "temp": "&lcub;\\"ts\\":1574329385897,\\"value\\":42&rcub;"',"use-redis-queue":"Use redis queue for message persistence","trim-redis-queue":"Trim redis queue","redis-queue-max-size":"Redis queue max size","add-metadata-key-values-as-kafka-headers":"Add Message metadata key-value pairs to Kafka record headers","add-metadata-key-values-as-kafka-headers-hint":"If selected, key-value pairs from message metadata will be added to the outgoing records headers as byte arrays with predefined charset encoding.","charset-encoding":"Charset encoding","charset-encoding-required":"Charset encoding is required.","charset-us-ascii":"US-ASCII","charset-iso-8859-1":"ISO-8859-1","charset-utf-8":"UTF-8","charset-utf-16be":"UTF-16BE","charset-utf-16le":"UTF-16LE","charset-utf-16":"UTF-16","select-queue-hint":"The queue name can be selected from a drop-down list or add a custom name."},"key-val":{key:"Key",value:"Value","remove-entry":"Remove entry","add-entry":"Add entry"}}},!0)}(e)}return e.ctorParameters=function(){return[{type:n.TranslateService}]},e=b([t.NgModule({declarations:[F],imports:[r.CommonModule,a.SharedModule],exports:[Ce,Ne,Oe,Ue,F]}),h("design:paramtypes",[n.TranslateService])],e)}();e.RuleNodeCoreConfigModule=je,e.ɵa=F,e.ɵb=Ce,e.ɵba=be,e.ɵbb=he,e.ɵbc=le,e.ɵbd=ne,e.ɵbe=ae,e.ɵbf=oe,e.ɵbg=ie,e.ɵbh=Ne,e.ɵbi=ve,e.ɵbj=Fe,e.ɵbk=xe,e.ɵbl=Te,e.ɵbm=qe,e.ɵbn=Se,e.ɵbo=Ie,e.ɵbp=ke,e.ɵbq=Oe,e.ɵbr=Ve,e.ɵbs=Ee,e.ɵbt=Ae,e.ɵbu=Le,e.ɵbv=Me,e.ɵbw=Pe,e.ɵbx=Re,e.ɵby=we,e.ɵbz=Ue,e.ɵc=x,e.ɵca=De,e.ɵcb=Ke,e.ɵcc=Be,e.ɵd=T,e.ɵe=q,e.ɵf=S,e.ɵg=I,e.ɵh=k,e.ɵi=N,e.ɵj=V,e.ɵk=E,e.ɵl=A,e.ɵm=L,e.ɵn=X,e.ɵo=ee,e.ɵp=te,e.ɵq=re,e.ɵr=se,e.ɵs=me,e.ɵt=ue,e.ɵu=de,e.ɵv=pe,e.ɵw=ce,e.ɵx=fe,e.ɵy=ge,e.ɵz=ye,Object.defineProperty(e,"__esModule",{value:!0})}));
17 16 //# sourceMappingURL=rulenode-core-config.umd.min.js.map
\ No newline at end of file
... ...