@indigina/kendo 1.0.149-beta → 1.0.152-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,5 +13,5 @@
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function G(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function B(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function H(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function K(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}Object.create;var $=0,W=function(){function e(e,t,n){this.parent=e,this.eref=t,this.defaultValue=n,this.disabled=!1,this.disabledKey="disabled"}return e.prototype.ngOnInit=function(){this.setUp()},e.prototype.setUp=function(){var e,t;this.id="_"+this.fieldName+ ++$;var n=[];try{for(var r=H(this.eref.nativeElement.attributes),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.setAttribute(o.name,o.value);a&&n.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}var s=this.parent.form.get(this.fieldName);s?(s.validator&&n.push(s.validator),s.setValidators(n),s.updateValueAndValidity()):this.parent.form.addControl(this.fieldName,new f.FormControl(this.defaultValue,n))},e.prototype.setAttribute=function(e,t){if(e!==this.disabledKey)return"required"===e?f.Validators.required:void 0;this.disabled=!0},e}();W.decorators=[{type:d.Directive}],W.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef},{type:void 0}]},W.propDecorators={labelKey:[{type:d.Input}],fieldName:[{type:d.Input}],disabled:[{type:d.Input}]};var J=function(e){function t(t,n){var r=e.call(this,t,n,"")||this;return r.parent=t,r.eref=n,r.type="text",r}return G(t,e),t.prototype.setAttribute=function(t,n){return"type"===t&&(this.type=n),"max-length"===t?f.Validators.maxLength(parseInt(n,10)):e.prototype.setAttribute.call(this,t,n)},t}(W);J.decorators=[{type:d.Component,args:[{selector:"field-input",template:'<div class="form-group">\n <label\n for="{{ id }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9">\n <input\n [formControlName]="fieldName"\n id="{{ id }}"\n [type]="type"\n class="k-input"\n autocomplete="new-{{ fieldName }}"\n placeholder="{{ labelKey | translate }}"\n [attr.disabled]="disabled ? disabledKey : null"\n />\n <ng-content></ng-content>\n <div\n class="bg-danger"\n *ngIf="\n parent.form.get(fieldName) &&\n parent.form.get(fieldName).invalid &&\n parent.form.get(fieldName).touched\n "\n >\n <span *ngIf="parent.form.get(fieldName).errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'email\']">{{\n \'ValidEmail\' | translate\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'serverErrorMsg\']">{{\n parent.form.get(fieldName).errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],J.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},J.propDecorators={labelKey:[{type:d.Input}],fieldName:[{type:d.Input}]};var Z=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.parent=t,r.eref=n,r.isPositive=!1,r.type="number",r}return G(t,e),t.prototype.ngAfterContentInit=function(){var e=this,t=this.parent.form.get(this.fieldName);t.valueChanges.subscribe((function(n){n!==e.cachedValue&&(e.cachedValue=!e.isPositive&&(n||0===n)||e.isPositive&&n>=0&&""!==n?+n:"",t.setValue(e.cachedValue))}))},t}(J);Z.decorators=[{type:d.Component,args:[{selector:"number-input",template:'<div class="form-group">\n <label\n for="{{ id }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9">\n <input\n [formControlName]="fieldName"\n id="{{ id }}"\n [type]="type"\n class="k-input"\n autocomplete="new-{{ fieldName }}"\n placeholder="{{ labelKey | translate }}"\n [attr.disabled]="disabled ? disabledKey : null"\n />\n <ng-content></ng-content>\n <div\n class="bg-danger"\n *ngIf="\n parent.form.get(fieldName) &&\n parent.form.get(fieldName).invalid &&\n parent.form.get(fieldName).touched\n "\n >\n <span *ngIf="parent.form.get(fieldName).errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'email\']">{{\n \'ValidEmail\' | translate\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'serverErrorMsg\']">{{\n parent.form.get(fieldName).errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}]}]}],Z.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},Z.propDecorators={isPositive:[{type:d.Input}]};var X=function(){function e(){this.errors=[]}return e.prototype.setErrors=function(e){this.errors=e,e.length&&this.form.setErrors({_general_errors_:e})},e}();X.decorators=[{type:d.Component,args:[{selector:"app-general-errors",template:'<div [formGroup]="form">\n <div class="bg-danger" *ngIf="form.invalid && errors.length">\n <ul class="custom-error">\n <li *ngFor="let error of errors">{{ error }}</li>\n </ul>\n </div>\n</div>\n',styles:[""]}]}],X.ctorParameters=function(){return[]},X.propDecorators={form:[{type:d.Input}]};var Y=function(){};Y.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Y},token:Y,providedIn:"root"}),Y.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var Q=function(){};Q.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Q},token:Q,providedIn:"root"}),Q.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var ee="language",te=function(){function e(e){this.translate=e,this.languages=[{name:"English",code:"en-US"},{name:"Русский",code:"ru-RU"}]}return e.prototype.init=function(){this.translate.addLangs(this.languages.map((function(e){return e.code}))),this.localeId=this.getLocale(),this.setLocale(this.localeId||this.languages[0].code)},e.prototype.getLocales=function(){return this.languages},e.prototype.getLocale=function(){return localStorage&&localStorage.getItem(ee)||this.localeId},e.prototype.setLocale=function(e){this.translate.use(e),this.localeId=e,localStorage&&localStorage.setItem(ee,e)},e}();te.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new te(R.ɵɵinject(D.TranslateService))},token:te,providedIn:"root"}),te.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],te.ctorParameters=function(){return[{type:a.TranslateService}]};var ne=function(){function e(e){this.router=e,this.collapsed=!1,this.router.isActive=function(e,t){var n;return!!(null===(n=this.routerState.snapshot.root.children)||void 0===n?void 0:n.length)&&e.toString()==="/"+this.routerState.snapshot.root.children[0].routeConfig.path.split("/:")[0]}}return e.prototype.ngOnInit=function(){var e=this;this.setActualPath(this.router.routerState.snapshot),this.router.events.subscribe((function(t){t instanceof g.NavigationEnd&&e.setActualPath(e.router.routerState.snapshot)}))},e.prototype.ngOnChanges=function(){this.setItemExpand()},e.prototype.collapseChild=function(e,t){this.item.expanded=this.item.text===e.text&&!this.item.expanded&&!!this.item.items,e.items&&0!==e.items.length?t.collapsed=!1:t.collapsed=!0},e.prototype.setItemExpand=function(){var e,t=this;this.item.expanded=null===(e=this.item.items)||void 0===e?void 0:e.some((function(e){return void 0!==e.link&&e.link===t.actualPath}))},e.prototype.setActualPath=function(e){var t;(null===(t=e.root.children)||void 0===t?void 0:t.length)&&(this.actualPath="/"+e.root.children[0].routeConfig.path.split("/:")[0],this.setItemExpand())},e}();ne.decorators=[{type:d.Component,args:[{selector:"[menu-item-group]",template:'<ng-container *ngIf="item.items && item.items.length">\n <a (click)="collapseChild(item, $event)">\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n <ul\n [ngClass]="\n item.expanded == true\n ? \'nav nav-second-level collapse in\'\n : \'nav nav-second-level collapse\'\n "\n >\n <ng-template ngFor let-item [ngForOf]="item.items">\n <li menu-item-group [item]="item"></li>\n </ng-template>\n </ul>\n</ng-container>\n<ng-container *ngIf="!item.items || !item.items.length">\n <a\n *ngIf="item.link"\n routerLink="{{ item.link }}"\n routerLinkActive="active-route"\n class="sub-menu-link"\n (click)="collapseChild(item, $event)"\n >\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n <a\n *ngIf="item.url"\n class="sub-menu-link"\n href="{{ item.url }}"\n target="_blank"\n (click)="collapseChild(item, $event)"\n >\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n</ng-container>\n<ng-template #labelWithIcon>\n <i class="menu-icon fa {{ item.iconClass }}"></i>\n <span class="nav-label">{{ item.text | translate }}</span>\n</ng-template>\n',styles:[""]}]}],ne.ctorParameters=function(){return[{type:g.Router}]},ne.propDecorators={item:[{type:d.Input}]};var re,ie=function(){function e(){this.logoClick=new d.EventEmitter}return e.prototype.onLogoClick=function(){this.logoClick.emit()},e.prototype.collapse=function(e,t,n){var r;null===(r=this.items)||void 0===r||r.forEach((function(e){e.text!==t.text&&e.expanded&&(e.expanded=!1)})),n.collapsed?e.collapsed=!0:e.collapsed=!1},e}();ie.decorators=[{type:d.Component,args:[{selector:"side-menu",template:'<nav\n id="menu-left"\n class="navbar-default navbar-main navbar-static-side open"\n role="navigation"\n>\n <div class="sidebar-collapse">\n <ul id="side-menu" class="nav">\n <li class="nav-header">\n <div class="profile-element">\n <a href="/" class="img-supply">\n <img alt="Supply Stream logo" />\n </a>\n </div>\n <div class="logo-element" (click)="onLogoClick()">\n <i class="fa fa-exchange"></i>\n </div>\n </li>\n </ul>\n\n <div class="sidebar-collapse">\n <ul class="nav">\n <ng-template ngFor let-item [ngForOf]="items">\n <li\n #itemComponent\n menu-item-group\n [item]="item"\n [ngClass]="{\n menu: true,\n active: item.expanded ? item.expanded : false,\n collapsed: itemComponent.collapsed\n }"\n (click)="collapse(itemComponent, item, $event)"\n ></li>\n </ng-template>\n </ul>\n </div>\n </div>\n</nav>\n',styles:[""]}]}],ie.propDecorators={items:[{type:d.Input}],logoClick:[{type:d.Output}]},function(e){e.String="string",e.Number="number",e.Object="object",e.Array="array"}(re||(re={}));var oe,ae=function(){function e(){}return Object.defineProperty(e.prototype,"isSimpleValue",{get:function(){return!this.isArrayValue&&!this.isObjectValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isArrayValue",{get:function(){return this.prop.propType===re.Array},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isObjectValue",{get:function(){return this.prop.propType===re.Object},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propClass",{get:function(){return this.prop.propType===re.Number?"number":"string"},enumerable:!1,configurable:!0}),e.prototype.expandAll=function(){this.treeViewNodes.forEach((function(e){return e.expandAll()}))},e.prototype.collapseAll=function(){this.treeViewNodes.forEach((function(e){return e.collapseAll()}))},e}();ae.decorators=[{type:d.Component,args:[{selector:"tree-view-node-prop",template:'<li class="tree-view-prop">\n <span class="prop-name">{{ prop.startTag }}</span>\n <span *ngIf="isSimpleValue" [ngClass]="propClass">{{ prop.value }}</span>\n <ng-container *ngIf="isArrayValue">\n <span class="bracket">{{ prop.brackets?.inside }}</span>\n <ng-container *ngTemplateOutlet="arrayNode"></ng-container>\n <span class="bracket">{{ prop.brackets?.outside }}</span>\n </ng-container>\n <ng-container *ngIf="isObjectValue">\n <ng-container *ngTemplateOutlet="singleNode"></ng-container>\n </ng-container>\n <span class="prop-name">{{ prop.endTag }}</span>\n</li>\n\n<ng-template #arrayNode>\n <tree-view-node\n *ngFor="let node of prop.value"\n [node]="node"\n [hasExpand]="true"\n class="array-node"\n #node\n ></tree-view-node>\n</ng-template>\n\n<ng-template #singleNode>\n <tree-view-node\n *ngIf="isObjectValue"\n [node]="prop.value"\n [hasExpand]="true"\n #node\n ></tree-view-node>\n</ng-template>\n',styles:[":host *{font-size:14px}:host li{position:relative}:host .prop-name{color:#555;font-weight:700}:host .tree-view-prop{list-style-type:none;margin:4px 0;position:relative;padding-left:20px}::ng-deep .tree-view-prop .number{color:#00f}::ng-deep .tree-view-prop .string{color:green}"]}]}],ae.propDecorators={treeViewNodes:[{type:d.ViewChildren,args:["node"]}],prop:[{type:d.Input}]},function(e){e.Object="object",e.Array="array",e.Primitive="primitive"}(oe||(oe={}));var se,le=function(){function e(){this.expanded=!0}return Object.defineProperty(e.prototype,"isObject",{get:function(){return this.node.nodeType===oe.Object},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isArray",{get:function(){return this.node.nodeType===oe.Array},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPrimitive",{get:function(){return this.node.nodeType===oe.Primitive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"primitive",{get:function(){var e=this.node.props[0].value;return{value:e,type:typeof e,startTag:this.node.props[0].startTag}},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.expanded=!this.hasExpand},e.prototype.toggleExpand=function(){this.expanded=!this.expanded},e.prototype.expandAll=function(){this.hasExpand&&(this.expanded=!0),this.treeViewProps.forEach((function(e){return e.expandAll()}))},e.prototype.collapseAll=function(){this.hasExpand&&(this.expanded=!1),this.treeViewProps.forEach((function(e){return e.collapseAll()}))},e}();le.decorators=[{type:d.Component,args:[{selector:"tree-view-node",template:'<span class="tree-view-node">\n <span class="bracket">{{ node.brackets?.inside }}</span>\n <ng-container\n *ngIf="isPrimitive; then primitiveNode; else baseNode"\n ></ng-container>\n <span class="bracket">{{ node.brackets?.outside }}</span>\n</span>\n\n<ng-template #primitiveNode>\n <span class="tree-view-prop">\n {{ primitive.startTag }}\n <span [ngClass]="primitive.type">\n {{ primitive.value }}\n </span>\n </span>\n</ng-template>\n\n<ng-template #baseNode>\n <span>\n <i\n [ngClass]="\n expanded\n ? \'fa fa-caret-down node-toggler\'\n : \'fa fa-caret-right node-toggler\'\n "\n *ngIf="hasExpand"\n (click)="toggleExpand()"\n ></i>\n <span class="ellipsis" *ngIf="!expanded">...</span>\n <ul [ngClass]="!expanded ? \'hidden\' : \'\'">\n <tree-view-node-prop\n *ngFor="let prop of node.props"\n [prop]="prop"\n #prop\n ></tree-view-node-prop>\n </ul>\n </span>\n</ng-template>\n',styles:[""]}]}],le.propDecorators={treeViewProps:[{type:d.ViewChildren,args:["prop"]}],node:[{type:d.Input}],hasExpand:[{type:d.Input}]},function(e){e.Json="json",e.Xml="xml",e.Text="text"}(se||(se={}));var ce=function(){function e(e){this.nextResolver=e}return e.prototype.resolve=function(e){return this.nextResolver?this.nextResolver.resolve(e):null},e}();function ue(e){return Object.values(re).find((function(t){return t===e}))||re.String}var pe={inside:"{",outside:"}"},de={inside:"[",outside:"]"},fe=function(){function e(){}return e.convert=function(e){return Array.isArray(e)?this.convertArray(e):this.convertObject(e)},e.convertObject=function(e){var t,n,r=[];try{for(var i=H(Object.keys(e)),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a],l=null!==s?ue(typeof s):re.String;if(Array.isArray(s)){var c=this.convertArray(s),u=Array.isArray(c)?re.Array:re.Object;r.push({startTag:a+": ",value:c,propType:u,brackets:de})}else l!==re.Object?r.push({startTag:a+": ",value:s,propType:l}):r.push({startTag:a+": ",value:this.convertObject(s),propType:l})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{props:r,nodeType:oe.Object,brackets:pe}},e.convertArray=function(e){var t=this,n=[];return e.forEach((function(e,r){if(typeof e!==re.Object)n.push(t.getPrimitive(e,r));else{var i=Array.isArray(e)?de:pe,o=i.inside,a=i.outside;n.push(Object.assign(Object.assign({},t.convertObject(e)),{nodeType:Array.isArray(e)?oe.Array:(s=typeof e,Object.values(oe).find((function(e){return e===s}))||oe.Object),brackets:{inside:r+": "+o,outside:a}}))}var s})),{props:[{value:n,propType:re.Array}],brackets:de}},e.getPrimitive=function(e,t){return{props:[{startTag:t+": ",value:e,propType:ue(typeof e)}],nodeType:oe.Primitive}},e}(),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(t){try{var n=JSON.parse(t);return{data:fe.convert(n),format:se.Json}}catch(n){return e.prototype.resolve.call(this,t)}},t}(ce),ge=function(){function e(){}return e.convert=function(e){return{props:[{value:e,propType:re.String}]}},e}(),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(e){return{data:ge.convert(e),format:se.Text}},t}(ce),me=function(){function e(){}return e.convert=function(e){return e.childElementCount>1?this.convertObject(e.childNodes):{props:[this.convertProp(e.children[0])]}},e.convertProp=function(e){var t,n,r=e.tagName;return e.childElementCount>0?(t=this.convertObject(e.children),n=re.Array):n=ue(typeof(t=e.textContent)),{startTag:"<"+r+">",endTag:"</"+r+">",value:t,propType:n}},e.convertObject=function(e){var t,n,r=Array();try{for(var i=H(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(this.convertProp(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return[{props:r}]},e}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(t){try{var n=(new DOMParser).parseFromString(t,"text/xml");if(n.all.length>0&&0===n.getElementsByTagName("parsererror").length)return{data:me.convert(n),format:se.Xml}}catch(e){}return e.prototype.resolve.call(this,t)},t}(ce),be=function(){function e(){this.chain=new he(new ye(new ve(null)))}return e.prototype.resolve=function(e){return this.chain.resolve(e)},e}(),we=function(){function e(e){this.clipboardService=e,this.maxTextLength=1200,this.maxRootItems=10,this.ContentTypesFormat=se}return Object.defineProperty(e.prototype,"IsArray",{get:function(){return!!this.data&&Array.isArray(this.resolved.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCollapse",{get:function(){return!!this.data&&(this.resolved.format===se.Text?this.hasTextCollapse():this.hasNodeCollapse())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.rawView?se.Text:this.resolved.format},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(){var e=new be;this.allShow=!1,this.rawView=!1,this.resolved=e.resolve(this.data),this.collapsed=this.hasCollapse},e.prototype.expandToggle=function(){this.collapsed=!this.collapsed},e.prototype.toggleExpandAll=function(){this.allShow?this.treeViewNodes.forEach((function(e){return e.collapseAll()})):this.treeViewNodes.forEach((function(e){return e.expandAll()})),this.collapsed=!!this.hasCollapse&&this.allShow,this.allShow=!this.allShow},e.prototype.toggleRawView=function(){this.rawView=!this.rawView},e.prototype.copyToClipboard=function(){this.clipboardService.copy(this.data)},e.prototype.hasTextCollapse=function(){return this.data.length>this.maxTextLength},e.prototype.hasNodeCollapse=function(){return!Array.isArray(this.resolved.data)&&this.resolved.data.props.length>this.maxRootItems},e}();we.decorators=[{type:d.Component,args:[{selector:"tree-view",template:'<div\n class="tree-view"\n [ngClass]="collapsed ? \'collapsed\' : \'expanded\'"\n [class]="format"\n *ngIf="data"\n>\n <ng-container *ngIf="format != ContentTypesFormat.Text; else textFormat">\n <div>\n <ng-container *ngTemplateOutlet="defaultActions"></ng-container>\n </div>\n <div [ngClass]="allShow ? \'show-all tree-view-body\' : \'tree-view-body\'">\n <ng-container *ngIf="IsArray; then arrayNode; else singleNode">\n </ng-container>\n <ng-template #singleNode>\n <tree-view-node [node]="resolved.data" #node> </tree-view-node>\n </ng-template>\n\n <ng-template #arrayNode>\n <tree-view-node\n *ngFor="let node of resolved.data"\n [node]="node"\n [hasExpand]="true"\n class="array-node"\n #node\n >\n </tree-view-node>\n </ng-template>\n </div>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n (click)="toggleExpandAll()"\n *ngIf="resolved.format !== ContentTypesFormat.Text"\n [disabled]="rawView"\n class="tree-view-action"\n >\n <i [ngClass]="allShow ? \'fa fa-minus\' : \'fa fa-plus\'"></i>\n </button>\n <button (click)="copyToClipboard()" class="tree-view-action">\n <i class="fa fa-clipboard"></i>\n </button>\n <button\n (click)="toggleRawView()"\n class="tree-view-action"\n [ngClass]="rawView ? \'pressed\' : \'\'"\n *ngIf="resolved.format !== ContentTypesFormat.Text"\n >\n <i class="fa fa-file-text-o"></i>\n </button>\n </ng-template>\n\n <ng-template #textFormat>\n <ng-container *ngTemplateOutlet="defaultActions"> </ng-container>\n <pre class="text-view tree-view-body">{{ data }}</pre>\n </ng-template>\n <div *ngIf="hasCollapse">\n <button (click)="expandToggle()" class="expand-toggler">\n <i\n class="fa"\n [ngClass]="\n collapsed ? \'fa-chevron-circle-down\' : \'fa-chevron-circle-up\'\n "\n ></i>\n </button>\n </div>\n</div>\n',styles:[":host ::ng-deep .tree-view ul{padding-left:20px;margin:0}:host ::ng-deep .node-toggler{position:absolute;left:3px;color:#222;font-size:14px;font-weight:700;padding:1px;cursor:pointer;width:20px}:host .tree-view{position:relative}:host ::ng-deep .hidden{display:none}:host .tree-view-action{margin:3px}:host .tree-view-body{position:relative;margin:5px;padding:0 20px;font-family:monospace;overflow:hidden}:host .collapsed .tree-view-body{max-height:200px}:host .expand-toggler{width:100%;height:30px;background:none;border:none;outline:none;cursor:pointer;position:relative;background:linear-gradient(hsla(0,0%,100%,0),#fff 45%);max-width:100%;padding:0;left:0;transition:all .1s ease-in-out;margin-top:15px}:host .expand-toggler .fa{font-size:16px;color:#444;transition:all .3s ease-in-out}:host .collapsed .expand-toggler{height:60px;margin-top:-40px;padding-top:20px;position:absolute}:host .expand-toggler:hover .fa{color:#36517e;transform:scale(1.7) rotate(-90deg)}:host .collapsed{padding-bottom:20px}:host .text-view{white-space:pre-wrap}:host .tree-view-action:disabled{opacity:.65}:host .tree-view-action.pressed{box-shadow:inset 1px 1px 3px rgba(0,0,0,.26666666666666666)}::ng-deep .json .array-node{display:block}"]}]}],we.ctorParameters=function(){return[{type:l.ClipboardService}]},we.propDecorators={treeViewNodes:[{type:d.ViewChildren,args:["node"]}],data:[{type:d.Input}],maxTextLength:[{type:d.Input}],maxRootItems:[{type:d.Input}]};var Se={langs:{getTranslation:function(){return v.of({})}},appSettings:{accountUrl:"",apiUrl:"",toastrTimeOut:2500,oidc:{clientId:"",authority:"",issuer:""},azureB2C:{clientId:"",authority:"",knownAuthorities:[""]}}},Ce=Se,ke=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:d.APP_INITIALIZER,useFactory:Fe,multi:!0,deps:[te]},{provide:Q,useValue:t||Se}]}},e}();function Fe(e){return function(){e.init()}}function xe(e){return e.langs}function Ie(e){return e.appSettings}ke.decorators=[{type:d.NgModule,args:[{declarations:[ie,ne,we,le,ae,V,X,J,Z],imports:[h.BrowserModule,p.HttpClientModule,a.TranslateModule.forChild({loader:{provide:a.TranslateLoader,useFactory:xe,deps:[Q,p.HttpClient]}}),o.LoadingBarHttpClientModule,u.CommonModule,g.RouterModule,f.ReactiveFormsModule,c.ToastrModule.forRoot(),n.BrowserAnimationsModule],providers:[{provide:d.APP_INITIALIZER,useFactory:Fe,multi:!0,deps:[te]},{provide:Q,useValue:Ce},{provide:Y,useFactory:Ie,deps:[Q]},a.TranslateStore],exports:[ie,we,V,X,J,a.TranslateModule,l.ClipboardModule,o.LoadingBarHttpClientModule,c.ToastrModule,n.BrowserAnimationsModule,Z]}]}];var Te,Ee={signalr:{eventsHub:"EventsHub"},oidc:{config:"oidc/config"},members:{me:"members/me"},admins:Object.assign(Object.assign({},Ae("admins")),{roles:Object.assign({},Ae("admins/roles"))}),system:{info:"system/info"},firstUser:"admins/first",partners:Ae("partners"),permissions:{all:function(e){return"permissions/"+e+"s"},member:function(e){return"permissions/"+e},mine:"permissions/me"},users:Object.assign(Object.assign({},Ae("users")),{roles:Object.assign({},Ae("users/roles"))}),apiTokens:Ae("apiTokens")},Oe=/'((\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1})'/g;function Ae(e){return{path:e,query:function(t){return e+"?"+y.toODataString(t,{utcDates:!0}).replace(Oe,"$1")},entityPath:function(t){return e+"/"+t}}}e.EventNames=void 0,(Te=e.EventNames||(e.EventNames={})).UserUpdated="userUpdated",Te.PermissionsUpdated="permissionsUpdated";var Pe,je="/admin/",De=function(){function t(e,t,n,r){var i=this;this.resolver=e,this.httpService=t,this.settingsService=n,this.signalRService=r,this.user=new v.BehaviorSubject(null),this.resolver.getProvider().pipe(m.map((function(e){i.initialize(e)}))).subscribe()}return t.prototype.login=function(){this.resolver.getProvider().pipe(m.map((function(e){e.login()}))).subscribe()},t.prototype.logout=function(){this.settingsService.clearLoginAsUser(),this.resolver.getProvider().pipe(m.map((function(e){e.logout()}))).subscribe()},t.prototype.initialize=function(t){var n=this;this.getCurrentUser().subscribe((function(r){if(r){var i=n.settingsService.getCallbackPath();if(i)return n.settingsService.clearCallbackPath(),void(window.location.href=window.location.origin+i);!n.isAdmin(r)||window.location.pathname.startsWith(je)?t.getAccessToken().subscribe((function(r){n.signalRService.startConnection(r),n.signalRService.on(e.EventNames.UserUpdated).subscribe((function(){return B(n,void 0,void 0,(function(){var e=this;return z(this,(function(n){return t.getAccessToken().subscribe((function(t){e.signalRService.reconnect(t)})),this.httpService.get(Ee.members.me).subscribe((function(t){return e.user.next(t)})),[2]}))}))}))})):window.location.href=""+window.location.origin+je}}))},t.prototype.getCurrentUser=function(){var e=this;return this.resolver.getProvider().pipe(m.mergeMap((function(t){return e.user.getValue()||!t.isUserLoggedIn()?e.user:t.getAccessToken().pipe(m.mergeMap((function(){return e.httpService.get(Ee.members.me).pipe(m.map((function(t){return e.user.next(t),t})))})))})))},t.prototype.isUserLoggedIn=function(){return this.resolver.getProvider().pipe(m.map((function(e){return e.isUserLoggedIn()})))},t}(),Me=function(){function e(e,t){this.observable=e,this.action=t}return Object.defineProperty(e.prototype,"connected",{get:function(){return!this.subscription.closed},enumerable:!1,configurable:!0}),e.prototype.resume=function(){this.subscription=this.observable.subscribe(this.action)},e.prototype.pause=function(){this.subscription.unsubscribe()},e}(),Ne=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.generalErrors=[],i}return G(t,e),t.prototype.getControl=function(e){return this.contains(e)||this.addControl(e,new f.FormControl({})),this.get(e)},t.prototype.applyServerErrors=function(e,t){for(var n in this.generalErrors=[],e.title&&this.generalErrors.push(e.title),t||(t=this),e.errors){var r=t.controls[n];r?r.setErrors({serverErrorMsg:e.errors[n].join(",")}):this.generalErrors.push(e.errors[n].join(","))}},t}(f.FormGroup);e.HttpCodes=void 0,(Pe=e.HttpCodes||(e.HttpCodes={}))[Pe.BadRequest=400]="BadRequest",Pe[Pe.Forbidden=403]="Forbidden",Pe[Pe.InternalServerError=500]="InternalServerError",Pe[Pe.NotFound=404]="NotFound",Pe[Pe.OK=200]="OK",Pe[Pe.Unauthorized=401]="Unauthorized";var Le="callbackPath",Re="X-User-Id",Ue="access_token",Ve=function(){function e(){}return e.prototype.putCurrentCallbackPath=function(){this.putCallbackPath(window.location.pathname+window.location.hash)},e.prototype.putCallbackPath=function(e){this.getCallbackPath()||"/home"===e||localStorage.setItem(Le,e)},e.prototype.getCallbackPath=function(){return localStorage.getItem(Le)},e.prototype.clearCallbackPath=function(){localStorage.removeItem(Le)},e.prototype.setLoginAsUser=function(e){localStorage.setItem(Re,e)},e.prototype.getLoginAsUser=function(){return localStorage.getItem(Re)},e.prototype.clearLoginAsUser=function(){localStorage.removeItem(Re)},e.prototype.setToken=function(e){localStorage.setItem(Ue,e)},e.prototype.getToken=function(){return localStorage.getItem(Ue)},e}();Ve.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Ve},token:Ve,providedIn:"root"}),Ve.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var qe=function(){function e(e,t){this.toastr=e,this.appSettings=t,this.timeout=this.appSettings.toastrTimeOut}return e.prototype.showError=function(e,t){void 0===t&&(t="Error"),this.toastr.error(e,t,{timeOut:this.timeout})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=""),this.toastr.success(e,t,{timeOut:this.timeout})},e}();qe.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new qe(R.ɵɵinject(N.ToastrService),R.ɵɵinject(Y))},token:qe,providedIn:"root"}),qe.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],qe.ctorParameters=function(){return[{type:c.ToastrService},{type:Y}]};var Ge=/^http(s)?:\/\//,Be=function(){function t(e,t,n,r,i,o){this.appToastrService=e,this.httpClient=t,this.appSettings=n,this.translate=r,this.router=i,this.settingsService=o}return t.prototype.get=function(e){var t=this;return this.httpClient.get(this.createUrl(e)).pipe(m.catchError((function(e){return t.handleServerError(e)})))},t.prototype.delete=function(e){var t=this;return this.httpClient.delete(this.createUrl(e)).pipe(m.tap((function(){return t.showSuccessMessage("ToastrMessages.RemovedSuccessfully")})),m.catchError((function(e){return t.handleServerError(e)})))},t.prototype.post=function(e,t,n){var r=this;return void 0===n&&(n=null),this.httpClient.post(this.createUrl(e),t).pipe(m.tap((function(){return r.showSuccessMessage(null!=n?n:"ToastrMessages.SavedSuccessfully")})),m.catchError((function(e){return r.handleServerError(e)})))},t.prototype.put=function(e,t,n){var r=this;return void 0===n&&(n=null),this.httpClient.put(this.createUrl(e),t).pipe(m.tap((function(){return r.showSuccessMessage(null!=n?n:"ToastrMessages.SavedSuccessfully")})),m.catchError((function(e){return r.handleServerError(e)})))},t.prototype.createUrl=function(e){return Ge.test(e)?e:this.appSettings.apiUrl+e},t.prototype.handleServerError=function(t){return t.error instanceof ErrorEvent?(this.appToastrService.showError("An error occurred: "+t.error.message),v.of(null)):t.status===e.HttpCodes.Unauthorized?(this.settingsService.putCurrentCallbackPath(),this.appToastrService.showError(this.translate.instant("ToastrMessages.Unauthorized")),v.of(null)):t.status===e.HttpCodes.Forbidden?(this.appToastrService.showError(this.translate.instant("ToastrMessages.Forbidden")),this.router.navigate(["forbidden"]),v.of(null)):t.status===e.HttpCodes.NotFound?(this.settingsService.getLoginAsUser()&&(this.settingsService.clearLoginAsUser(),this.appToastrService.showError(this.translate.instant("ToastrMessages.CanNotLoginAsUser")),setTimeout((function(){window.location.href="/"}),1e3)),this.appToastrService.showError(this.translate.instant("ToastrMessages.NotFound")),v.of(null)):t.status>=e.HttpCodes.InternalServerError?(this.appToastrService.showError(this.translate.instant("ToastrMessages.ServerError")+t.error.title),v.of(null)):v.throwError(t)},t.prototype.showSuccessMessage=function(e){this.appToastrService.showSuccess(this.translate.instant(e))},t}();Be.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Be(R.ɵɵinject(qe),R.ɵɵinject(L.HttpClient),R.ɵɵinject(Y),R.ɵɵinject(D.TranslateService),R.ɵɵinject(U.Router),R.ɵɵinject(Ve))},token:Be,providedIn:"root"}),Be.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Be.ctorParameters=function(){return[{type:qe},{type:p.HttpClient},{type:Y},{type:a.TranslateService},{type:g.Router},{type:Ve}]};var ze,He=function(){function e(){}return e.prototype.ngOnInit=function(){this.subscription.resume()},e.prototype.toggle=function(){this.subscription.connected?this.subscription.pause():this.subscription.resume()},e}();He.decorators=[{type:d.Component,args:[{selector:"live-updates-control",template:"<button (click)=\"toggle()\" class=\"k-button\">\n <em [ngClass]=\"subscription.connected ? 'fa fa-pause' : 'fa fa-play'\"></em>\n {{\n (subscription.connected ? 'LiveFeed.Pause' : 'LiveFeed.Resume') | translate\n }}\n</button>\n",styles:[":host .fa{margin-right:5px}"]}]}],He.propDecorators={subscription:[{type:d.Input}]},function(e){e.IdentityServer="IdentityServer",e.AzureB2C="AzureB2C"}(ze||(ze={}));var _e=function(){},Ke=function(e){function t(t,n){var r=e.call(this)||this;return r.authService=t,r.settingsService=n,r.isUserLoggedIn=function(){var e;return!!(null===(e=r.authService.instance.getActiveAccount())||void 0===e?void 0:e.localAccountId)},r}return G(t,e),t.prototype.initialize=function(){return v.of(!0)},t.prototype.login=function(){this.isUserLoggedIn()||this.authService.loginRedirect().subscribe()},t.prototype.logout=function(){this.authService.logoutRedirect({postLogoutRedirectUri:location.origin})},t.prototype.getAccessToken=function(){var e=this,t={scopes:["openid","offline_access","profile"]};return v.from(this.authService.instance.acquireTokenSilent(t).then((function(t){var n=t.idToken;return e.settingsService.setToken(n),n})).catch((function(n){return B(e,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return n instanceof b.InteractionRequiredAuthError?[4,this.authService.instance.acquireTokenRedirect(t)]:[3,2];case 1:return e.sent(),[2,this.settingsService.getToken()];case 2:return[2]}}))}))})))},t}(_e),$e=function(e){function t(t,n){var r=e.call(this)||this;return r.oauthService=t,r.configuration=n,r.isUserLoggedIn=function(){return r.oauthService.hasValidAccessToken()},r}return G(t,e),t.prototype.initialize=function(){var e={issuer:this.configuration.appSettings.oidc.issuer,redirectUri:window.location.origin+"/login/callback",clientId:this.configuration.appSettings.oidc.clientId,scope:"openid profile offline_access",postLogoutRedirectUri:window.location.origin+"/home",silentRefreshRedirectUri:window.location.origin+"/silent-renew.html"};return this.configure(e)},t.prototype.login=function(){this.oauthService.initLoginFlow()},t.prototype.logout=function(){this.oauthService.logOut()},t.prototype.getAccessToken=function(){return v.of(this.oauthService.getAccessToken())},t.prototype.configure=function(e){var t=this;return this.oauthService.configure(e),this.oauthService.tokenValidationHandler=new w.JwksValidationHandler,this.oauthService.setupAutomaticSilentRefresh(),v.from(this.oauthService.loadDiscoveryDocument(e.issuer+"/identity/.well-known/openid-configuration")).pipe(m.mergeMap((function(){return v.from(t.oauthService.tryLoginImplicitFlow())})))},t}(_e),We=function(e,t,n,r,i){var o=this;this.AuthProvider$=new v.BehaviorSubject(null),this.getProvider=function(){return o.AuthProvider$.pipe(m.filter((function(e){return!!e})))},e.get(Ee.system.info).subscribe((function(e){var a;(a=e.identityProvider===ze.IdentityServer?new $e(t,i):new Ke(n,r)).initialize().subscribe((function(){return o.AuthProvider$.next(a)}))}))};We.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new We(R.ɵɵinject(Be),R.ɵɵinject(M.OAuthService),R.ɵɵinject(P.MsalService),R.ɵɵinject(Ve),R.ɵɵinject(Q))},token:We,providedIn:"root"}),We.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],We.ctorParameters=function(){return[{type:Be},{type:s.OAuthService},{type:r.MsalService},{type:Ve},{type:Q}]};var Je=function(){function e(e){this.appSettings=e,this.isConnectionEstablished=!1,this.eventEmitters={}}return e.prototype.createConnection=function(e){var t,n=this;this.hubConnection=(new j.HubConnectionBuilder).withUrl(this.appSettings.apiUrl+Ee.signalr.eventsHub,{accessTokenFactory:function(){return e}}).configureLogging(null!==(t=this.appSettings.signalRLogLevel)&&void 0!==t?t:j.LogLevel.None).build(),this.hubConnection.onclose((function(t){void 0!==t&&(n.isConnectionEstablished=!1,n.startConnection(e))}))},e.prototype.startConnection=function(e){var t=this;this.isConnectionEstablished||(this.createConnection(e),this.hubConnection.start().then((function(){t.isConnectionEstablished=!0,Object.keys(t.eventEmitters).forEach((function(e){t.hubConnection.on(e,(function(n){t.eventEmitters[e].emit(n)}))}))})).catch((function(){console.warn("Error while establishing connection, retrying..."),setTimeout((function(){return t.startConnection(e)}),5e3)})))},e.prototype.reconnect=function(e){var t=this;this.isConnectionEstablished&&this.hubConnection.stop().then((function(){t.isConnectionEstablished=!1,t.startConnection(e)}))},e.prototype.on=function(e){var t=this;return this.eventEmitters[e]||(this.eventEmitters[e]=new d.EventEmitter,this.hubConnection&&this.hubConnection.on(e,(function(n){t.eventEmitters[e].emit(n)}))),this.eventEmitters[e]},e}();Je.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Je(R.ɵɵinject(Y))},token:Je,providedIn:"root"}),Je.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Je.ctorParameters=function(){return[{type:Y}]};var Ze=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.resolver=t,o.isAdmin=function(e){var t;return null!==(t="Admin"===(null==e?void 0:e.type))&&void 0!==t&&t},o}return G(t,e),t}(De);Ze.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Ze(R.ɵɵinject(We),R.ɵɵinject(Be),R.ɵɵinject(Ve),R.ɵɵinject(Je))},token:Ze,providedIn:"root"}),Ze.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Ze.ctorParameters=function(){return[{type:We},{type:Be},{type:Ve},{type:Je}]};var Xe=function(){function e(e,t,n){this.eref=e,this.accountService=t,this.appSettings=n,this.expand=!1,this.languageSelectorVisible=!1}return Object.defineProperty(e.prototype,"fullName",{get:function(){var e,t;return(null===(e=this.user)||void 0===e?void 0:e.firstName)+" "+(null===(t=this.user)||void 0===t?void 0:t.lastName)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accountUrl",{get:function(){return this.appSettings.accountUrl},enumerable:!1,configurable:!0}),e.prototype.toogle=function(){this.expand=!this.expand},e.prototype.logout=function(){this.accountService.logout()},e.prototype.openLanguageSelector=function(e){e.stopPropagation(),this.toogle(),this.languageSelectorVisible=!0},e.prototype.clickedOutside=function(e){!this.eref.nativeElement.contains(e.target)&&this.expand&&this.toogle()},e}();Xe.decorators=[{type:d.Component,args:[{selector:"account-menu",template:'<div class="profile-img left" id="accountMenu">\n <div #accountMenuElement title="User Account" (click)="toogle()">\n <img alt="image" class="img-circle top-bar-profile left" />\n </div>\n <kendo-popup\n *ngIf="expand"\n [anchor]="accountMenu"\n popupClass="k-widget dropdown open"\n >\n <ul class="dropdown-menu top-bar-dropdown animated fadeInLeft">\n <li class="top-bar-header-row media">\n <div class="media-left">\n <img alt="image" class="img-circle" />\n </div>\n <div class="media-body">\n <span class="left fa fa-user" aria-hidden="true"></span>\n <span class="left pad5left">{{ fullName }}</span>\n </div>\n </li>\n <li class="pad5top">\n <a (click)="openLanguageSelector($event)" data-icon="globe">{{\n \'ChangeLanguage\' | translate\n }}</a>\n </li>\n <li>\n <a [href]="accountUrl" data-icon="desktop" translate="Account"></a>\n </li>\n <li>\n <a translate="Logout" data-icon="sign-out" (click)="logout()"></a>\n </li>\n </ul>\n </kendo-popup>\n\n <language-selector [(visible)]="languageSelectorVisible"></language-selector>\n</div>\n',styles:[".top-bar-dropdown{right:-24px;top:42px}.top-bar-profile{cursor:pointer}"]}]}],Xe.ctorParameters=function(){return[{type:d.ElementRef},{type:Ze},{type:Y}]},Xe.propDecorators={accountMenu:[{type:d.ViewChild,args:["accountMenuElement"]}],user:[{type:d.Input}],clickedOutside:[{type:d.HostListener,args:["document:click",["$event"]]}]};var Ye=function(){function e(e,t,n){this.authService=e,this.settingsService=t,this.router=n}return e.prototype.ngOnInit=function(){var e=this;this.authService.handleRedirectObservable().subscribe((function(t){e.settingsService.setToken(t.idToken),e.authService.instance.setActiveAccount(t.account),e.router.navigate(["home"])}))},e.prototype.logout=function(){this.authService.logout()},e}();Ye.decorators=[{type:d.Component,args:[{selector:"lib-azure-login",template:""}]}],Ye.ctorParameters=function(){return[{type:r.MsalService},{type:Ve},{type:g.Router}]};var Qe=function(){function e(e,t){this.eref=e,this.settings=t,this.visibleChange=new d.EventEmitter,this.currentLanguageCode="",this.currentLanguageCode=this.settings.getLocale(),this.languages=this.settings.getLocales()}return e.prototype.changeLanguage=function(e){return B(this,void 0,void 0,(function(){return z(this,(function(t){return this.currentLanguageCode=e,this.settings.setLocale(this.currentLanguageCode),this.close(),[2]}))}))},e.prototype.close=function(){this.visible=!1,this.visibleChange.emit(this.visible)},e.prototype.clickedOutside=function(e){this.eref.nativeElement.contains(e.target)||this.close()},e}();Qe.decorators=[{type:d.Component,args:[{selector:"language-selector",template:'<kendo-window\n *ngIf="visible"\n class="language-selector"\n [draggable]="false"\n [resizable]="false"\n>\n <kendo-window-titlebar>\n <div>{{ \'ChangeLanguage\' | translate }}</div>\n <button kendoWindowCloseAction (click)="close()"></button>\n </kendo-window-titlebar>\n <div class="languages" *ngIf="languages">\n <div *ngFor="let language of languages" class="language-change-action">\n <button class="btn" (click)="changeLanguage(language.code)">\n <span\n *ngIf="currentLanguageCode == language.code"\n class="fa fa-check"\n aria-hidden="true"\n ></span>\n {{ language.name }}\n </button>\n </div>\n </div>\n</kendo-window>\n',styles:[".language-selector{right:40px;top:52px!important;left:auto}.language-selector kendo-window-titlebar{padding:5px 8px}.language-selector kendo-window-titlebar div{width:100%}.language-selector .btn{width:95%}.language-selector .fa{margin-right:5px}.language-change-action{padding:5px}"]}]}],Qe.ctorParameters=function(){return[{type:d.ElementRef},{type:te}]},Qe.propDecorators={visible:[{type:d.Input}],visibleChange:[{type:d.Output}],clickedOutside:[{type:d.HostListener,args:["document:click",["$event"]]}]};var et=window.navigator.userAgent.indexOf("MSIE ")>-1||window.navigator.userAgent.indexOf("Trident/")>-1,tt=function(e){var t={auth:{clientId:e.appSettings.azureB2C.clientId,authority:e.appSettings.azureB2C.authority,knownAuthorities:e.appSettings.azureB2C.knownAuthorities,redirectUri:window.location.origin+"/azure/login/callback",postLogoutRedirectUri:"/",navigateToLoginRequestUrl:!1},cache:{cacheLocation:b.BrowserCacheLocation.SessionStorage,storeAuthStateInCookie:et},system:{loggerOptions:{loggerCallback:function(){},piiLoggingEnabled:!1}}};return new b.PublicClientApplication(t)},nt=function(){function t(t,n,r){var i=this;this.httpService=t,this.accountService=n,this.signalRService=r,this.loaded=!1,this.mine=new v.BehaviorSubject({}),this.accountService.user.subscribe((function(t){return B(i,void 0,void 0,(function(){var n=this;return z(this,(function(r){return t?(this.httpService.get(Ee.permissions.mine).subscribe((function(t){n.mine.next(t),n.loaded=!0,n.signalRService.on(e.EventNames.PermissionsUpdated).subscribe((function(){n.getPermissionsFromServer()}))})),[2]):(this.mine.next({}),[2])}))}))}))}return t.prototype.getAll=function(e){return this.httpService.get(Ee.permissions.all(e))},t.prototype.getMine=function(){return this.loaded?this.mine:this.getPermissionsFromServer()},t.prototype.getPermissionsFromServer=function(){var e=this;return this.httpService.get(Ee.permissions.mine).pipe(m.map((function(t){return e.mine.next(t),t})))},t}();nt.decorators=[{type:d.Injectable}],nt.ctorParameters=function(){return[{type:Be},{type:Ze},{type:Je}]};var rt="hidden",it=function(){function e(e,t,n,r){this.elementRef=e,this.route=t,this.permissionsService=n,this.renderer=r}return e.prototype.ngOnInit=function(){var e=this;this.hide();var t=this.permissionCategory?this.permissionCategory:this.getRouteCategory(this.route);t?this.permissionsService.mine.subscribe((function(n){n[t]&&e.hasType(n[t])?e.show():e.hide()})):this.show()},e.prototype.hide=function(){this.renderer.addClass(this.elementRef.nativeElement,rt)},e.prototype.show=function(){this.renderer.removeClass(this.elementRef.nativeElement,rt)},e.prototype.hasType=function(e){var t=this;return Array.isArray(this.permissionType)?e.map((function(e){return t.permissionType.includes(e)})).some((function(e){return e})):e.includes(this.permissionType)},e.prototype.getRouteCategory=function(e){var t=e.snapshot.data;return t&&t.permission?t.permission.category:this.route.parent?this.getRouteCategory(this.route.parent):null},e}();it.decorators=[{type:d.Directive,args:[{selector:"[requirePermission]"}]}],it.ctorParameters=function(){return[{type:d.ElementRef},{type:g.ActivatedRoute},{type:nt},{type:d.Renderer2}]},it.propDecorators={permissionType:[{type:d.Input}],permissionCategory:[{type:d.Input}]};var ot,at=function(){function e(e){this.settingsService=e}return e.prototype.intercept=function(e,t){if(!e.headers.keys().find((function(e){return"Authorization"===e}))){var n=this.settingsService.getToken();if(n){var r=e.clone({setHeaders:{Authorization:"Bearer "+n}});return t.handle(r)}return t.handle(e)}return t.handle(e)},e}();at.decorators=[{type:d.Injectable}],at.ctorParameters=function(){return[{type:Ve}]},e.FieldTypes=void 0,(ot=e.FieldTypes||(e.FieldTypes={}))[ot.Text=0]="Text",ot[ot.Checkbox=1]="Checkbox",ot[ot.Dropdown=2]="Dropdown",ot[ot.Multiselect=3]="Multiselect";var st=function(){function t(t){this.translate=t,this.showArchiveSwitcher=!0,this.showSearhText=!0,this.FieldTypes=e.FieldTypes,this.defaultNamedModel={name:this.translate.instant("All"),id:null}}return t.prototype.ngOnInit=function(){var e,t=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){return e.valueField=e.valueField?e.valueField:"id"})),this.filterService.filter$.subscribe((function(e){t.filter=e,t.changeFilter()}))},t.prototype.ngOnChanges=function(){this.changeFilter()},t.prototype.setTodayFilter=function(){this.filterService.setToday()},t.prototype.clearFilter=function(){var e;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){e.filter.value=null,e.filter.values&&(e.filter.values=[])})),this.filterService.reset(),this.emitChangeEvents()},t.prototype.applyFilter=function(){this.setCustomFilters(),this.filterService.applyFilter(this.filter)},t.prototype.fieldChange=function(e,t){t.change&&t.change(e)},t.prototype.fillFilter=function(){var e,t,n=this;this.filter&&(null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){e.filter=Object.assign(Object.assign({},e.filter),{value:null,values:null})})),null===(t=this.filter.customFilters)||void 0===t||t.forEach((function(e){var t,r=null===(t=n.customFilterElements)||void 0===t?void 0:t.find((function(t){return t.filter.field===e.field&&t.filter.filterTarget===e.filterTarget}));r&&(r.filter=Object.assign({},e))})))},t.prototype.setCustomFilters=function(){var e,t,n=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){var t,r=null===(t=n.filter.customFilters)||void 0===t?void 0:t.findIndex((function(t){return t.field===e.filter.field}));-1!==r&&n.filter.customFilters.splice(r,1)})),null===(t=this.customFilterElements)||void 0===t||t.forEach((function(e){return n.filter.customFilters.push(e.filter)}))},t.prototype.fixMultiselectFilters=function(){var t,n=null===(t=this.customFilterElements)||void 0===t?void 0:t.map((function(t){if(t.fieldType===e.FieldTypes.Multiselect)return t.filter}));n&&n.forEach((function(e){(null==e?void 0:e.value)&&(e.values=[e.value],e.value=null)}))},t.prototype.changeFilter=function(){this.fillFilter(),this.fixMultiselectFilters(),this.emitChangeEvents()},t.prototype.emitChangeEvents=function(){var e,t=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){var n;(e.filter.value||e.filter.values)&&t.fieldChange(null!==(n=e.filter.value)&&void 0!==n?n:e.filter.values,e)}))},t}();st.decorators=[{type:d.Component,args:[{selector:"activity-filter",template:'<div class="header-selection-field activity-filter">\n <div class="filter-row">\n <div>\n <label for="datefrom" class="title-field">\n <span>{{ \'ActivitiesFilter.DateFrom\' | translate }}:</span>\n <div>\n <kendo-datetimepicker\n format="dd/MM/yyyy HH:mm"\n [(value)]="filter.dateFrom"\n ></kendo-datetimepicker>\n </div>\n </label>\n </div>\n <div>\n <label for="dateto" class="title-field">\n <span>{{ \'ActivitiesFilter.DateTo\' | translate }}:</span>\n <div>\n <kendo-datetimepicker\n format="dd/MM/yyyy HH:mm"\n [(value)]="filter.dateTo"\n ></kendo-datetimepicker>\n </div>\n </label>\n </div>\n <div>\n <label class="title-field">\n <span class="link-button" (click)="setTodayFilter()">\n {{ \'ActivitiesFilter.FilterToday\' | translate }}\n </span>\n </label>\n </div>\n <div class="filter-row">\n <div class="flag" *ngIf="showArchiveSwitcher">\n <div class="checkbox">\n <label>\n <input [(ngModel)]="filter.switchToArchive" type="checkbox" />\n {{ \'ActivitiesFilter.SwitchToArchiveLabel\' | translate }}\n </label>\n </div>\n </div>\n <div *ngIf="showSearhText">\n <label class="title-field">\n <span>{{ \'ActivitiesFilter.SearchLabel\' | translate }}:</span>\n </label>\n <input\n type="text"\n k-input\n class="input k-input searchtext-input"\n [(ngModel)]="filter.searchText"\n (keyup.enter)="applyFilter()"\n [disabled]="filter.switchToArchive"\n />\n </div>\n </div>\n </div>\n <div class="filter-row">\n <ng-container *ngFor="let field of customFilterElements">\n <ng-container [ngSwitch]="field.fieldType">\n <ng-template [ngSwitchCase]="FieldTypes.Text">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <input\n type="text"\n class="input k-input"\n [(ngModel)]="field.filter.value"\n [placeholder]="field.placeholder | translate"\n />\n </div>\n </label>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Dropdown">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <kendo-dropdownlist\n [data]="field.data"\n textField="name"\n [valueField]="field.valueField"\n [defaultItem]="defaultNamedModel"\n [(ngModel)]="field.filter.value"\n [valuePrimitive]="true"\n (valueChange)="fieldChange($event, field)"\n ></kendo-dropdownlist>\n </div>\n </label>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Checkbox">\n <div class="flag">\n <div class="checkbox">\n <label>\n <input [(ngModel)]="field.filter.value" type="checkbox" />\n {{ field.title | translate }}\n </label>\n </div>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Multiselect">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <kendo-multiselect\n kendoMultiSelectSummaryTag\n [autoClose]="false"\n [data]="field.data"\n [(ngModel)]="field.filter.values"\n textField="name"\n [valueField]="field.valueField"\n [valuePrimitive]="true"\n [placeholder]="field.placeholder | translate"\n (valueChange)="fieldChange($event, field)"\n ></kendo-multiselect>\n </div>\n </label>\n </div>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <div class="row">\n <div class="col-md-12">\n <button class="btn btn-inverse" (click)="applyFilter()">\n {{ \'Buttons.Apply\' | translate }}\n </button>\n <button class="btn btn-inverse" (click)="clearFilter()">\n {{ \'Buttons.Clear\' | translate }}\n </button>\n </div>\n </div>\n</div>\n<current-timezone></current-timezone>\n',styles:["::ng-deep .filter-row{display:flex;flex-flow:row wrap;margin-bottom:20px}::ng-deep .filter-row>div{margin:0 10px 30px 5px;min-width:100px}::ng-deep .filter-row .title-field{margin:0;width:100%}::ng-deep .filter-row .flag{margin-top:10px!important}"]}]}],st.ctorParameters=function(){return[{type:a.TranslateService}]},st.propDecorators={showArchiveSwitcher:[{type:d.Input}],showSearhText:[{type:d.Input}],customFilterElements:[{type:d.Input}],filterService:[{type:d.Input}]};var lt=function(){function e(e){this.dialogService=e}return e.prototype.cancel=function(){this.dialog.close(),this.callback=void 0},e.prototype.confirm=function(){this.callback(),this.cancel()},e.prototype.open=function(e,t){this.callback=t,this.dialog=this.dialogService.open({content:e,actions:this.dialogActions})},e}();lt.decorators=[{type:d.Component,args:[{selector:"confirm-dialog",template:'<ng-template #dialogActions>\n <button kendoButton (click)="cancel()" translate="Cancel"></button>\n <button kendoButton (click)="confirm()" translate="Confirm"></button>\n</ng-template>\n<div kendoDialogContainer></div>\n',styles:[""]}]}],lt.ctorParameters=function(){return[{type:k.DialogService}]},lt.propDecorators={dialogActions:[{type:d.ViewChild,args:["dialogActions",{static:!0}]}]};var ct=A,ut=function(){function e(){}return e.prototype.ngOnInit=function(){var e=ct.tz.guess();this.timeZoneAndOffset=e+" "+ct().format("Z")},e}();ut.decorators=[{type:d.Component,args:[{selector:"current-timezone",template:'<div class="divide-line"></div>\n<div class="time-zone">\n {{ \'CurrentTimeZone\' | translate }}: {{ timeZoneAndOffset }}\n</div>\n',styles:[""]}]}],ut.ctorParameters=function(){return[]};var pt=function(){this.save=new d.EventEmitter};pt.decorators=[{type:d.Component,args:[{selector:"entity-edit-buttons-bar",template:'<div class="form-group buttons-panel">\n <div class="col-md-4">\n <a\n [routerLink]="[\'../new\']"\n preserveFragment\n class="btn btn-succes"\n translate="CreateNew"\n requirePermission\n permissionType="Create"\n >\n </a>\n </div>\n <div class="col-md-8 text-right">\n <a\n [routerLink]="[\'../\']"\n preserveFragment\n class="btn btn-inverse"\n translate="Cancel"\n ></a>\n <button\n type="submit"\n class="btn btn-success"\n (click)="save.emit()"\n translate="Save"\n [disabled]="!valid"\n requirePermission\n [permissionType]="[\'Edit\', \'Create\']"\n ></button>\n </div>\n</div>\n',styles:[""]}]}],pt.propDecorators={valid:[{type:d.Input}],save:[{type:d.Output}]};var dt=function(){function e(e){this.route=e,this.saveInProgress=!1}return e.prototype.ngOnInit=function(){var e=this;this.route.params.subscribe((function(t){e.formGroup=null;var n=new Ne({});t.id?e.adapter.getService().get(t.id).subscribe((function(t){var r,i;n.addControl("id",new f.FormControl(t.id));try{for(var o=H(Object.keys(t)),a=o.next();!a.done;a=o.next()){var s=a.value;n.addControl(s,new f.FormControl(t[s]))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}e.adapter.setForm(n),e.formGroup=n})):(e.adapter.setForm(n),e.formGroup=n)}))},e.prototype.save=function(){var e=this;this.saveInProgress=!0,this.adapter.getService().save(this.adapter.getValue()).pipe(m.finalize((function(){return e.saveInProgress=!1}))).subscribe((function(t){e.adapter.onSaved(t)}),(function(t){e.formGroup.applyServerErrors(t.error,e.formGroup),e.generalErrors.setErrors(e.formGroup.generalErrors)}))},e}();dt.decorators=[{type:d.Component,args:[{selector:"entity-edit-form",template:'<div class="col-md-8">\n <header class="header-page-bg">\n <h4>{{ title | translate }}</h4>\n </header>\n <div class="panel editor-area hero-unit">\n <form\n class="form-horizontal"\n [formGroup]="formGroup"\n novalidate\n autocomplete="off"\n *ngIf="formGroup"\n >\n <div class="col-md-3"></div>\n <div class="col-md-9">\n <app-general-errors\n #general_errors\n [form]="formGroup"\n ></app-general-errors>\n </div>\n <ng-content></ng-content>\n <entity-edit-buttons-bar\n (save)="save()"\n [valid]="formGroup.valid && formGroup.dirty && !saveInProgress"\n >\n </entity-edit-buttons-bar>\n </form>\n </div>\n</div>\n',styles:[""]}]}],dt.ctorParameters=function(){return[{type:g.ActivatedRoute}]},dt.propDecorators={generalErrors:[{type:d.ViewChild,args:["general_errors"]}],title:[{type:d.Input}],adapter:[{type:d.Input}]};var ft=function(e){function t(t,n){var r=e.call(this,t,n,"")||this;return r.parent=t,r.eref=n,r.data=[],r}return G(t,e),Object.defineProperty(t.prototype,"control",{get:function(){return this.parent.form.get(this.fieldName)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return t.sent(),this.control.setValue((this.data.find((function(t){return t.id===e.control.value}))||this.data[0]).id),[2]}}))}))},t.prototype.getData=function(){var e=this;this.service.getPage(this.filter?{filter:this.filter}:{}).subscribe((function(t){return e.data=t.data}))},t}(W);ft.decorators=[{type:d.Component,args:[{selector:"field-dropdown",template:'<div class="form-group">\n <label\n for="{{ \'_\' + fieldName }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9" *ngIf="control">\n <kendo-dropdownlist\n id="{{ \'_\' + fieldName }}"\n [formControl]="control"\n [data]="data"\n textField="name"\n valueField="id"\n [valuePrimitive]="true"\n >\n </kendo-dropdownlist>\n\n <div class="bg-danger" *ngIf="control.invalid && control.touched">\n <span *ngIf="control.errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="control.errors[\'serverErrorMsg\']">{{\n control.errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],ft.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},ft.propDecorators={service:[{type:d.Input}],rebind:[{type:d.Input}],filter:[{type:d.Input}]};var ht=function(e){function t(t,n){var r=e.call(this,t,n,[])||this;return r.parent=t,r.eref=n,r.data=[],r}return G(t,e),Object.defineProperty(t.prototype,"control",{get:function(){return this.parent.form.get(this.fieldName)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(){var e=this;this.getData().subscribe((function(t){e.data=t.data,e.control.setValue(e.control.value.filter((function(t){return e.data.filter((function(e){return e.id===t})).length})))}))},t.prototype.getData=function(){return this.service.getPage(this.filter?{filter:this.filter}:{})},t}(W);ht.decorators=[{type:d.Component,args:[{selector:"field-multiselect",template:'<div class="form-group">\n <label\n for="{{ \'_\' + fieldName }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9" *ngIf="control">\n <kendo-multiselect\n id="{{ \'_\' + fieldName }}"\n [formControl]="control"\n [data]="data"\n [autoClose]="false"\n textField="name"\n valueField="id"\n [valuePrimitive]="true"\n >\n </kendo-multiselect>\n\n <div class="bg-danger" *ngIf="control.invalid && control.touched">\n <span *ngIf="control.errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="control.errors[\'serverErrorMsg\']">{{\n control.errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],ht.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},ht.propDecorators={service:[{type:d.Input}],rebind:[{type:d.Input}],filter:[{type:d.Input}]};var gt=function(e){var t="";return Object.keys(e).forEach((function(n){if("object"==typeof e[n]){var r=vt(e[n])?"":JSON.stringify(e[n]);t+=r?n+"="+r+"&":""}else t+=e[n]||0===e[n]?n+"="+e[n]+"&":""})),t.slice(0,-1)},vt=function(e){return null===e||0===Object.keys(e).length},mt=function(e){return isNaN(e)&&!isNaN(Date.parse(e))},yt=function(e){var t={};return e.forEach((function(e,n){var r;t[n]="sort"===n||"group"===n?JSON.parse(e):"filter"===n?(bt(r=JSON.parse(e)),r):e})),t};function bt(e){e.filters.length&&e.filters.forEach((function(e){var t=e;t.value=mt(t.value)?new Date(t.value):t.value;var n=e;n.filters&&bt(n)}))}var wt="name",St=function(){function e(e,t,n){this.translate=e,this.route=t,this.router=n,this.filterChange=new d.EventEmitter,this.gridState={},this.loadings=0,this.selected=[],this.gridFields=[],this.defaultFields=[{name:"name",label:"Name",sortable:!0,position:0}],this.getAllData=this.getAllData.bind(this),this.getRowClass=this.getRowClass.bind(this)}return e.prototype.ngOnChanges=function(e){e.filters&&!e.filters.firstChange&&this.getFilteredData()},e.prototype.ngOnInit=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){return this.gridFields=(this.fields||[]).concat(this.defaultFields).sort((function(e,t){return(e.position||0)-(t.position||0)})),this.filters=this.filters?this.filters:[],this.commands=this.commands?this.commands:[],this.route.fragment.subscribe((function(t){return B(e,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return[4,this.restoreGridState(new URLSearchParams(t))];case 1:return e.sent(),[2]}}))}))})),this.route.firstChild.params.subscribe((function(t){return B(e,void 0,void 0,(function(){return z(this,(function(e){return t.id?this.selected[0]=t.id:this.selected.pop(),[2]}))}))})),[2]}))}))},e.prototype.removeHandler=function(e){var t=this,n=e.dataItem;this.dialog.open(this.translate.instant("Confirmation.Delete")+': "'+n.name+'"?',(function(){return t.remove(n)}))},e.prototype.selectItem=function(e){var t=e.dataItem;this.router.navigate([t.id],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.onActivate=function(e){var t=this;e.saved&&e.saved.subscribe((function(e){return t.updateGrid(e)}))},e.prototype.onDeactivate=function(e){e.saved&&e.saved.unsubscribe()},e.prototype.dataStateChange=function(e){var t=this;Object.keys(e).forEach((function(n){t.gridState[n]=isNaN(e.skip)?t.gridState[n]:e[n]})),this.router.navigate([],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.onSearch=function(e){this.searchTerm=e,this.gridState.skip=0,this.getFilteredData()},e.prototype.getAllData=function(){var e=Object.assign({},this.gridState);return delete e.skip,delete e.take,this.service.getPage(e)},e.prototype.getRowClass=function(e){return this.rowClass&&e?this.rowClass(e.dataItem,e.index):{}},e.prototype.getFilteredData=function(){this.gridState.filter=this.getFilter(),this.router.navigate([],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.updateGrid=function(e){var t=this.page.data.filter((function(t){return t.id===e.id}));t.length?this.page.data[this.page.data.indexOf(t[0])]=e:(this.page.total++,this.page.data.splice(0,0,e),this.page.data.length>this.gridState.take&&this.page.data.splice(this.page.data.length-1,1),this.selected[0]=e.id,this.router.navigate([e.id],{relativeTo:this.route,preserveFragment:!0}))},e.prototype.remove=function(e){return B(this,void 0,void 0,(function(){var t=this;return z(this,(function(n){return this.loadings++,this.service.delete(e.id).subscribe((function(){t.selected.length&&t.selected[t.selected.length-1]===e.id&&t.router.navigate(["../"],{preserveFragment:!0,relativeTo:t.route.firstChild}),t.loadings--})),this.getData(),[2]}))}))},e.prototype.getData=function(){var e=this;this.loadings++,this.service.getPage(this.gridState).subscribe((function(t){e.page=t,e.loadings--}))},e.prototype.getFilter=function(){return{logic:"and",filters:this.searchTerm?K([{field:wt,operator:"contains",value:this.searchTerm}],this.filters):this.filters}},e.prototype.onFilterChange=function(){var e,t=null===(e=this.gridState.filter)||void 0===e?void 0:e.filters.find((function(e){return e.field===wt}));this.searchTerm=null==t?void 0:t.value,this.filterChange.emit(this.gridState.filter)},e.prototype.restoreGridState=function(e){return B(this,void 0,void 0,(function(){var t,n;return z(this,(function(r){return t={sort:this.defaultSort||[{field:wt,dir:"asc"}],skip:0,take:10},n=yt(e),this.gridState=n.hasOwnProperty("take")?n:t,this.onFilterChange(),this.getData(),[2]}))}))},e}();St.decorators=[{type:d.Component,args:[{selector:"entity-list",template:'<div class="row">\n <div class="col-md-4">\n <header class="header-page-bg"></header>\n <div class="panel search-panel hero-unit">\n <div class="header-selection-field">\n <label for="searchinput" class="title-field" translate="Search"></label>\n <input\n kendoTextBox\n class="quick-filter input input-field"\n title=""\n id="searchinput"\n type="text"\n appDebounce\n (debounceKeyup)="onSearch($event.target.value)"\n [ngModel]="searchTerm"\n [debounceTime]="600"\n />\n </div>\n <ng-content></ng-content>\n <div class="divide-line"></div>\n\n <kendo-grid\n [data]="page"\n [pageSize]="gridState.take"\n [skip]="gridState.skip"\n [sort]="gridState.sort"\n [pageable]="true"\n [sortable]="true"\n [style.maxHeight.px]="480"\n (remove)="removeHandler($event)"\n (dataStateChange)="dataStateChange($event)"\n [loading]="loadings > 0"\n (cellClick)="selectItem($event)"\n culture\n class="rows-pointable"\n kendoGridSelectBy="id"\n [selectedKeys]="selected"\n [rowClass]="getRowClass"\n >\n <ng-template kendoGridToolbarTemplate>\n <excel-export-button></excel-export-button>\n </ng-template>\n <kendo-grid-excel [fetchData]="getAllData"></kendo-grid-excel>\n <kendo-grid-command-column width="65">\n <ng-template kendoGridCellTemplate>\n <button\n kendoGridRemoveCommand\n requirePermission\n permissionType="Delete"\n >\n <i class="k-icon glyphicon glyphicon-trash"></i>\n </button>\n </ng-template>\n </kendo-grid-command-column>\n <kendo-grid-column\n *ngFor="let field of gridFields"\n field="{{ field.name }}"\n title="{{ field.label | translate }}"\n [sortable]="field.sortable !== false"\n >\n </kendo-grid-column>\n <kendo-grid-command-column width="65" *ngIf="commands.length > 0">\n <ng-template kendoGridCellTemplate let-dataItem>\n <button\n *ngFor="let command of commands"\n (click)="command.handler(dataItem)"\n title="{{ command.title | translate }}"\n class="k-button"\n >\n <i *ngIf="command.iconClass" class="{{ command.iconClass }}"></i>\n {{ command.name | translate }}\n </button>\n </ng-template>\n </kendo-grid-command-column>\n <ng-template kendoGridNoRecordsTemplate>\n {{ \'Messages.NoRecords\' | translate }}\n </ng-template>\n <ng-template kendoPagerTemplate>\n <kendo-grid-spacer></kendo-grid-spacer>\n <kendo-pager-prev-buttons></kendo-pager-prev-buttons>\n <kendo-pager-numeric-buttons\n [buttonCount]="10"\n ></kendo-pager-numeric-buttons>\n <kendo-pager-next-buttons></kendo-pager-next-buttons>\n <kendo-pager-info></kendo-pager-info>\n </ng-template>\n </kendo-grid>\n </div>\n </div>\n <router-outlet\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n ></router-outlet>\n</div>\n<confirm-dialog #confirmDialog></confirm-dialog>\n',styles:[""]}]}],St.ctorParameters=function(){return[{type:a.TranslateService},{type:g.ActivatedRoute},{type:g.Router}]},St.propDecorators={service:[{type:d.Input}],filters:[{type:d.Input}],fields:[{type:d.Input}],commands:[{type:d.Input}],rowClass:[{type:d.Input}],defaultSort:[{type:d.Input}],filterChange:[{type:d.Output}],dialog:[{type:d.ViewChild,args:["confirmDialog",{static:!0}]}]};var Ct=function(){function e(e){this.translate=e,this.valueChange=new d.EventEmitter}return e.prototype.ngOnInit=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){switch(t.label){case 0:return this.defaultItem={id:null,name:this.translate.instant("All")},[4,this.getData()];case 1:return t.sent(),this.translate.onLangChange.subscribe((function(t){e.defaultItem={id:null,name:e.translate.instant("All")}})),[2]}}))}))},e.prototype.getData=function(){var e=this;this.service.getPage({}).subscribe((function(t){if(e.data=t.data,e.initialSelectedId){var n=e.data.find((function(t){return t.id===e.initialSelectedId}));n&&e.kendoDropDown.writeValue(n)}}))},e.prototype.onValueChange=function(e){this.valueChange.emit(e)},e.prototype.initSelectedId=function(e){this.initialSelectedId=e},e}();Ct.decorators=[{type:d.Component,args:[{selector:"field-dropdownlist",template:'<div class="header-selection-field">\n <label\n for="{{ \'_\' + label }}"\n class="title-field"\n translate="{{ label }}"\n ></label>\n <kendo-dropdownlist\n [data]="data"\n textField="name"\n valueField="id"\n id="{{ \'_\' + label }}"\n (valueChange)="onValueChange($event)"\n [defaultItem]="defaultItem"\n #inputElement\n >\n </kendo-dropdownlist>\n</div>\n',styles:[""]}]}],Ct.ctorParameters=function(){return[{type:a.TranslateService}]},Ct.propDecorators={service:[{type:d.Input}],label:[{type:d.Input}],valueChange:[{type:d.Output}],kendoDropDown:[{type:d.ViewChild,args:["inputElement"]}]};var kt=function(){};kt.decorators=[{type:d.Component,args:[{selector:"excel-export-button",template:'<button type="button" kendoGridExcelCommand>\n <em ngClass="fa fa-file-excel-o"></em>\n {{ \'Buttons.ExcelExport\' | translate }}\n</button>\n',styles:[""]}]}];var Ft=function(){};Ft.decorators=[{type:d.Component,args:[{selector:"footer-bar",template:'<nav class="footer navbar navbar-default navbar-fixed-bottom">\n <div class="container">\n <a class="navbar-brand pull-right" href="http://www.indigina.com/">\n <ng-content></ng-content>\n </a>\n </div>\n</nav>\n',styles:[""]}]}];var xt=function(){function e(e,t){this.route=e,this.router=t,this.opened=!0}return e.prototype.close=function(){var e;this.opened=!1,this.router.navigate([this.callbackPath],{relativeTo:this.route,fragment:null===(e=this.route.snapshot)||void 0===e?void 0:e.fragment})},e}();xt.decorators=[{type:d.Component,args:[{selector:"modal-window",template:'<div class="modal-window window-wrapper">\n <div class="k-overlay" *ngIf="opened" (click)="close()"></div>\n <kendo-window (close)="close()" [height]="830" [width]="800" *ngIf="opened">\n <kendo-window-titlebar>\n <div class="k-window-title"></div>\n <button kendoWindowCloseAction></button>\n </kendo-window-titlebar>\n <ng-content></ng-content>\n </kendo-window>\n</div>\n',styles:[".modal-window{z-index:11002}"]}]}],xt.ctorParameters=function(){return[{type:g.ActivatedRoute},{type:g.Router}]},xt.propDecorators={callbackPath:[{type:d.Input}]};var It=function(){function e(){this.valueChange=new d.EventEmitter,this.showFilter=!0,this.value=[],this.filters=[]}return Object.defineProperty(e.prototype,"ValueKey",{get:function(){return this.valueField?this.valueField:"id"},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.currentData=this.data,this.currentData&&this.currentData.length&&(this.traverseFilters(this.currentFilter),this.value=this.filters.map((function(e){return e.value})),this.showFilter="string"==typeof this.currentData[0].name)},e.prototype.traverseFilters=function(e){var t=e;if(t.filters)for(var n=0;n<t.filters.length;n++){var r=t.filters[n];r.value&&r.field===this.field&&this.filters.push(r),this.traverseFilters(r)}},e.prototype.isItemSelected=function(e){var t=this;return this.value.some((function(n){return n===e[t.ValueKey]}))},e.prototype.onSelectionChange=function(e){var t=this,n=e[this.ValueKey];this.value.some((function(e){return e===n}))?this.value=this.value.filter((function(e){return e!==n})):this.value.push(n),this.filterService.filter({filters:this.value.map((function(e){return{field:t.field,operator:"eq",value:e}})),logic:"or"})},e.prototype.onInput=function(e){var t=this;this.currentData=y.distinct(K(this.currentData.filter((function(e){return t.value.some((function(t){return t===e.id}))})),y.filterBy(this.data,{operator:"contains",field:"name",value:e.target.value})),"name")},e}();It.decorators=[{type:d.Component,args:[{selector:"multicheck-filter",template:'<ul>\n <li *ngIf="showFilter">\n <input class="k-textbox" (input)="onInput($event)" />\n </li>\n <li\n *ngFor="let item of currentData; let i = index"\n (click)="onSelectionChange(item)"\n [ngClass]="{ \'k-state-selected\': isItemSelected(item) }"\n >\n <input\n type="checkbox"\n style="margin-right: 5px"\n id="chk-{{ item.id }}"\n class="k-checkbox"\n [checked]="isItemSelected(item)"\n />\n <label\n class="k-multiselect-checkbox k-checkbox-label"\n for="chk-{{ item.id }}"\n >\n {{ item.name }}\n </label>\n </li>\n</ul>\n',styles:["ul{list-style-type:none;height:200px;overflow-y:scroll;padding-left:0;padding-right:12px}ul>li{padding:8px 12px;border:1px solid rgba(0,0,0,.08);border-bottom:none}ul>li:last-of-type{border-bottom:1px solid rgba(0,0,0,.08)}.k-multiselect-checkbox{pointer-events:none}"]}]}],It.propDecorators={currentFilter:[{type:d.Input}],data:[{type:d.Input}],filterService:[{type:d.Input}],field:[{type:d.Input}],valueField:[{type:d.Input}],valueChange:[{type:d.Output}]};var Tt=function(){function e(){}return e.prototype.toggleButtonClick=function(){document.body.classList.toggle("mini-navbar")},e}();Tt.decorators=[{type:d.Component,args:[{selector:"top-bar",template:'<div id="supply-top-navbar" class="supply-nav-margin">\n <nav class="navbar navbar-static-top white-bg">\n <div class="navbar-header" [style.display]="currentUser != null">\n <button type="button" class="navbar-minimalize minimalize-style-2 btn btn-primary" (click)="toggleButtonClick()">\n <i class="fa fa-bars"></i>\n </button>\n </div>\n <ng-content></ng-content>\n <div id="topBarIcons" class="clearfix" *ngIf="currentUser != null">\n <a [routerLink]="[\'/security/admins\', currentUser.id]" class="message-icons left container-login">\n <span class="fa fa-user" aria-hidden="true"></span>\n <span class="pad5left">{{currentUser.userName}}</span>\n </a>\n <account-menu [user]="currentUser"></account-menu>\n </div>\n </nav>\n</div>\n',styles:[""]}]}],Tt.propDecorators={currentUser:[{type:d.Input}]};var Et,Ot,At,Pt,jt=localStorage,Dt=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:Q,useValue:t},{provide:s.OAuthModuleConfig,useValue:{resourceServer:{allowedUrls:[t.appSettings.apiUrl],sendAccessToken:!0}}},{provide:r.MSAL_INSTANCE,useFactory:tt,deps:[Q]}]}},e}();Dt.decorators=[{type:d.NgModule,args:[{declarations:[Tt,Ft,Xe,Qe,pt,dt,St,ft,ht,Ct,lt,kt,It,it,st,ut,xt,He,Ye],imports:[u.CommonModule,g.RouterModule,ke,s.OAuthModule.forRoot(),T.PopupModule,x.GridModule,x.ExcelModule,I.InputsModule,S.ButtonsModule,k.DialogsModule,u.CommonModule,f.FormsModule,k.WindowModule,k.DialogsModule,f.ReactiveFormsModule,F.DropDownsModule,E.TooltipModule,C.DateInputsModule,r.MsalModule],providers:[{provide:s.OAuthStorage,useValue:jt},{provide:p.HTTP_INTERCEPTORS,useClass:at,multi:!0},Ze,nt,Je,r.MsalService],exports:[Tt,Ft,Xe,Qe,ke,T.PopupModule,s.OAuthModule,F.DropDownsModule,E.TooltipModule,C.DateInputsModule,k.WindowModule,k.DialogsModule,T.PopupModule,x.GridModule,x.ExcelModule,I.InputsModule,S.ButtonsModule,pt,dt,St,ft,ht,Ct,lt,kt,It,it,st,ut,xt,He,r.MsalModule,Ye]}]}],e.FilterTargets=void 0,(Et=e.FilterTargets||(e.FilterTargets={}))[Et.Url=0]="Url",Et[Et.Grid=1]="Grid",e.MemberTypes=void 0,(Ot=e.MemberTypes||(e.MemberTypes={})).Admin="Admin",Ot.User="User",e.Operators=void 0,(At=e.Operators||(e.Operators={})).eq="eq",At.neq="neq",At.isnull="isnull",At.isnotnull="isnotnull",At.lt="lt",At.lte="lte",At.gt="gt",At.gte="gte",At.startswith="startswith",At.endswith="endswith",At.contains="contains",At.doesnotcontain="doesnotcontain",At.isempty="isempty",At.isnotempty="isnotempty",e.PermissionTypes=void 0,(Pt=e.PermissionTypes||(e.PermissionTypes={})).Create="Create",Pt.Delete="Delete",Pt.Edit="Edit",Pt.View="View",Pt.Set="Set";var Mt=function(){function t(){}return t.toGridState=function(t,n){var r,i={filter:{logic:"and",filters:[]}},o={logic:"and",filters:[]};return i.skip=t.skip,i.take=t.take,t.group&&(i.group=t.group),t.sort?i.sort=t.sort:i.sort=[{field:n,dir:"desc"}],t.dateFrom&&o.filters.push({operator:e.Operators.gte,field:n,value:t.dateFrom}),t.dateTo&&o.filters.push({operator:e.Operators.lte,field:n,value:t.dateTo}),null===(r=t.customFilters)||void 0===r||r.forEach((function(t){if(t.filterTarget===e.FilterTargets.Grid)if(t.values&&t.values.length){var n={logic:"or",filters:[]};t.values.forEach((function(e){n.filters.push({operator:t.operator,field:t.field,value:e})})),i.filter.filters.push(n)}else null!==t.value&&void 0!==t.value&&o.filters.push({operator:t.operator,field:t.field,value:t.value})})),o.filters.length&&(i.filter.filters.length?i.filter.filters.push(o):i.filter.filters=o.filters),i},t}(),Nt="filter",Lt=function(){function t(e,t){var n=this;this.route=e,this.router=t,this.defaultFilter={dateTo:null,dateFrom:null,switchToArchive:!1,searchText:"",skip:0,take:10},this.DateFilterStartFieldName="start",this.filterBehavior=new v.BehaviorSubject(this.defaultFilter),this.gridStateBehavior=new v.BehaviorSubject(Mt.toGridState(this.defaultFilter,this.DateFilterStartFieldName)),this.filter$=this.filterBehavior.asObservable(),this.gridState$=this.gridStateBehavior.asObservable(),this.currentFilter=Object.assign({},this.defaultFilter),this.route.fragment.subscribe((function(e){return B(n,void 0,void 0,(function(){var t;return z(this,(function(n){return t=yt(new URLSearchParams(e)),Object.keys(t).some((function(e){return e===Nt}))?(this.currentGridState=t,this.fillCurrentFilter(t)):(this.clearFilter(),this.setTodayDates(),this.currentGridState=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName)),this.filterBehavior.next(this.currentFilter),[2]}))}))})),this.filter$.subscribe((function(e){n.gridStateBehavior.next(Mt.toGridState(e,n.DateFilterStartFieldName))}))}return t.prototype.reset=function(){this.clearFilter(),this.applyFilter(this.currentFilter),this.gridStateBehavior.next(this.currentGridState)},t.prototype.setFilter=function(e){this.currentFilter.skip=0,this.currentFilter=Object.assign(e),this.currentGridState=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName)},t.prototype.applyFilter=function(e){this.setFilter(e),this.stateNavigation(this.prepareFilterToSerialize())},t.prototype.setToday=function(){this.setTodayDates(),this.applyFilter(this.currentFilter)},t.prototype.clearFilter=function(){if(this.currentFilter){var e=Object.assign([],this.currentFilter.customFilters);e.forEach((function(e){e.value=null,e.values&&(e.values=[])})),this.currentFilter=Object.assign({},this.defaultFilter),this.currentFilter.customFilters=e}else this.currentFilter=Object.assign({},this.defaultFilter)},t.prototype.setGridState=function(e){this.currentGridState=e;var t=this.currentFilter,n=t.switchToArchive,r=t.searchText;this.clearFilter(),this.currentFilter=Object.assign(this.currentFilter,{switchToArchive:n,searchText:r}),this.fillCurrentFilter(this.currentGridState),this.stateNavigation(this.currentGridState)},t.prototype.setTodayDates=function(){var e=new Date;this.currentFilter.dateTo=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,0,0,0),this.currentFilter.dateFrom=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)},t.prototype.stateNavigation=function(e){return B(this,void 0,void 0,(function(){return z(this,(function(t){switch(t.label){case 0:return[4,this.router.navigate([],{relativeTo:this.route,fragment:gt(e)})];case 1:return t.sent()||this.filterBehavior.next(this.currentFilter),[2]}}))}))},t.prototype.prepareFilterToSerialize=function(){var t,n=this,r={};return Object.keys(this.currentFilter).forEach((function(e){"dateTo"!==e&&"dateFrom"!==e&&"customFilters"!==e&&(r[e]=n.currentFilter[e])})),null===(t=this.currentFilter.customFilters)||void 0===t||t.forEach((function(t){t.filterTarget==e.FilterTargets.Url&&(r[t.field]=t.value)})),r.filter=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName).filter,r},t.prototype.fillCurrentFilter=function(e){var t=this;this.currentFilter.customFilters=[],this.fillFromDescriptor(e.filter),Object.keys(e).forEach((function(n){n!==Nt&&"null"!==n&&"filters"!==n&&(Object.keys(t.currentFilter).some((function(e){return e==n}))?t.currentFilter[n]=e[n]:t.fillUrlFilter(n,e[n]))}))},t.prototype.fillUrlFilter=function(t,n){var r=this.currentFilter.customFilters.findIndex((function(e){return e.field==t}));-1!==r?this.currentFilter.customFilters[r].value=n:this.currentFilter.customFilters.push({field:t,value:n,operator:e.Operators.eq,filterTarget:e.FilterTargets.Url})},t.prototype.fillFromDescriptor=function(t){var n=this;null==t||t.filters.forEach((function(t){var r=t;r.field===n.DateFilterStartFieldName&&r.operator===e.Operators.lte&&(n.currentFilter.dateTo=r.value),r.field===n.DateFilterStartFieldName&&r.operator===e.Operators.gte&&(n.currentFilter.dateFrom=r.value),r.field&&r.field!==n.DateFilterStartFieldName&&n.setFieldFilter({field:r.field,filterTarget:e.FilterTargets.Grid,operator:e.Operators[r.operator],value:r.value});var i=t;i.filters&&n.fillFromDescriptor(i)}))},t.prototype.setFieldFilter=function(e){var t=this.currentFilter.customFilters.findIndex((function(t){return t.field===e.field&&t.operator===e.operator}));if(-1!==t){var n=this.currentFilter.customFilters[t].values,r=this.currentFilter.customFilters[t].value;this.currentFilter.customFilters[t].values=n||[],r&&(this.currentFilter.customFilters[t].values.push(r),this.currentFilter.customFilters[t].value=null),this.currentFilter.customFilters[t].values.push(e.value)}else this.currentFilter.customFilters.push(e)},t}();Lt.decorators=[{type:d.Injectable}],Lt.ctorParameters=function(){return[{type:g.ActivatedRoute},{type:g.Router}]};var Rt=function(){function e(e,t){this.httpService=e,this.endpoints=t}return e.prototype.getPage=function(e){return this.httpService.get(this.endpoints.query(e))},e.prototype.get=function(e){return this.httpService.get(this.endpoints.entityPath(e))},e.prototype.delete=function(e){return this.httpService.delete(this.endpoints.entityPath(e))},e.prototype.save=function(e){return e.id?this.httpService.put(this.endpoints.entityPath(e.id),e):this.httpService.post(this.endpoints.path,e)},e}(),Ut=function(){function e(e){this.service=e,this.saved=new d.EventEmitter}return Object.defineProperty(e.prototype,"adapter",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype.getValue=function(){return this.form.value},e.prototype.getService=function(){return this.service},e.prototype.setForm=function(e){this.form=e},e.prototype.onSaved=function(e){this.saved.emit(e)},e}(),Vt=A;Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return i.LogLevel}}),Object.defineProperty(e,"OAuthModule",{enumerable:!0,get:function(){return s.OAuthModule}}),Object.defineProperty(e,"OAuthModuleConfig",{enumerable:!0,get:function(){return s.OAuthModuleConfig}}),Object.defineProperty(e,"OAuthService",{enumerable:!0,get:function(){return s.OAuthService}}),Object.defineProperty(e,"OAuthStorage",{enumerable:!0,get:function(){return s.OAuthStorage}}),e.AccountMenuComponent=Xe,e.AccountService=Ze,e.ActivityFilterComponent=st,e.ActivityFilterService=Lt,e.AppSettings=Y,e.AppToastrService=qe,e.AuthProvider=_e,e.AuthProviderResolver=We,e.AzureLoginCallbackComponent=Ye,e.BaseAccountService=De,e.ConfirmDialogComponent=lt,e.CurrentTimezoneComponent=ut,e.DebounceDirective=V,e.EntityEditButtonsBarComponent=pt,e.EntityEditComponent=Ut,e.EntityEditFormComponent=dt,e.EntityListComponent=St,e.EntityService=Rt,e.ExcelExportButtonComponent=kt,e.FieldComponent=W,e.FieldDropdownComponent=ft,e.FieldDropdownlistComponent=Ct,e.FieldInputComponent=J,e.FieldMultiSelectComponent=ht,e.FooterBarComponent=Ft,e.FormGroupWithErrors=Ne,e.GeneralErrorsComponent=X,e.HttpMethods=[{name:"POST",id:"POST"},{name:"PUT",id:"PUT"},{name:"GET",id:"GET"},{name:"DELETE",id:"DELETE"}],e.HttpService=Be,e.IndiginaConfiguration=Q,e.IndiginaModule=ke,e.KendoModule=Dt,e.LanguageSelectorComponent=Qe,e.LiveUpdatesControlComponent=He,e.LocaleSettingsService=te,e.MSALInstanceFactory=tt,e.ModalWindowComponent=xt,e.MulticheckFilterComponent=It,e.NumberInputComponent=Z,e.PermissionsService=nt,e.ReEntrySubscription=Me,e.RequirePermissionDirective=it,e.SettingsService=Ve,e.SideMenuComponent=ie,e.SignalRService=Je,e.TopMenuComponent=Tt,e.TreeViewComponent=we,e.buildActivityEndpoints=function(e){return{query:function(t){return"activities/"+e+"?"+y.toODataString(t,{utcDates:!0}).replace(Oe,"$1")},search:function(t,n){var r="activities/"+e+"/search?"+y.toODataString(t,{utcDates:!0});return n&&(r+="&searchTerm="+n),r},detailedActivity:function(t,n){return n?"activities/"+e+"/"+t+"/"+n:"activities/"+e+"/"+t}}},e.buildEntityEndpoints=Ae,e.endpoints=Ee,e.momentTimezone=Vt,e.urlDeserialize=yt,e.urlSerialize=gt,e.ɵa=Fe,e.ɵb=xe,e.ɵc=Ie,e.ɵd=ne,e.ɵe=le,e.ɵf=ae,e.ɵg=at,Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.keys(r).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),Object.keys(o).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),Object.keys(a).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})})),Object.keys(l).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})})),Object.keys(c).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})}));
16
+ var q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function G(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function B(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function H(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function K(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}Object.create;var $=0,W=function(){function e(e,t,n){this.parent=e,this.eref=t,this.defaultValue=n,this.disabled=!1,this.disabledKey="disabled"}return e.prototype.ngOnInit=function(){this.setUp()},e.prototype.setUp=function(){var e,t;this.id="_"+this.fieldName+ ++$;var n=[];try{for(var r=H(this.eref.nativeElement.attributes),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.setAttribute(o.name,o.value);a&&n.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}var s=this.parent.form.get(this.fieldName);s?(s.validator&&n.push(s.validator),s.setValidators(n),s.updateValueAndValidity()):this.parent.form.addControl(this.fieldName,new f.FormControl(this.defaultValue,n))},e.prototype.setAttribute=function(e,t){if(e!==this.disabledKey)return"required"===e?f.Validators.required:void 0;this.disabled=!0},e}();W.decorators=[{type:d.Directive}],W.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef},{type:void 0}]},W.propDecorators={labelKey:[{type:d.Input}],fieldName:[{type:d.Input}],disabled:[{type:d.Input}]};var J=function(e){function t(t,n){var r=e.call(this,t,n,"")||this;return r.parent=t,r.eref=n,r.type="text",r}return G(t,e),t.prototype.setAttribute=function(t,n){return"type"===t&&(this.type=n),"max-length"===t?f.Validators.maxLength(parseInt(n,10)):e.prototype.setAttribute.call(this,t,n)},t}(W);J.decorators=[{type:d.Component,args:[{selector:"field-input",template:'<div class="form-group">\n <label\n for="{{ id }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9">\n <input\n [formControlName]="fieldName"\n id="{{ id }}"\n [type]="type"\n class="k-input"\n autocomplete="new-{{ fieldName }}"\n placeholder="{{ labelKey | translate }}"\n [attr.disabled]="disabled ? disabledKey : null"\n />\n <ng-content></ng-content>\n <div\n class="bg-danger"\n *ngIf="\n parent.form.get(fieldName) &&\n parent.form.get(fieldName).invalid &&\n parent.form.get(fieldName).touched\n "\n >\n <span *ngIf="parent.form.get(fieldName).errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'email\']">{{\n \'ValidEmail\' | translate\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'serverErrorMsg\']">{{\n parent.form.get(fieldName).errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],J.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},J.propDecorators={labelKey:[{type:d.Input}],fieldName:[{type:d.Input}]};var Z=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.parent=t,r.eref=n,r.isPositive=!1,r.type="number",r}return G(t,e),t.prototype.ngAfterContentInit=function(){var e=this,t=this.parent.form.get(this.fieldName);t.valueChanges.subscribe((function(n){n!==e.cachedValue&&(e.cachedValue=!e.isPositive&&(n||0===n)||e.isPositive&&n>=0&&""!==n?+n:"",t.setValue(e.cachedValue))}))},t}(J);Z.decorators=[{type:d.Component,args:[{selector:"number-input",template:'<div class="form-group">\n <label\n for="{{ id }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9">\n <input\n [formControlName]="fieldName"\n id="{{ id }}"\n [type]="type"\n class="k-input"\n autocomplete="new-{{ fieldName }}"\n placeholder="{{ labelKey | translate }}"\n [attr.disabled]="disabled ? disabledKey : null"\n />\n <ng-content></ng-content>\n <div\n class="bg-danger"\n *ngIf="\n parent.form.get(fieldName) &&\n parent.form.get(fieldName).invalid &&\n parent.form.get(fieldName).touched\n "\n >\n <span *ngIf="parent.form.get(fieldName).errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'email\']">{{\n \'ValidEmail\' | translate\n }}</span>\n <span *ngIf="parent.form.get(fieldName).errors[\'serverErrorMsg\']">{{\n parent.form.get(fieldName).errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}]}]}],Z.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},Z.propDecorators={isPositive:[{type:d.Input}]};var X=function(){function e(){this.errors=[]}return e.prototype.setErrors=function(e){this.errors=e,e.length&&this.form.setErrors({_general_errors_:e})},e}();X.decorators=[{type:d.Component,args:[{selector:"app-general-errors",template:'<div [formGroup]="form">\n <div class="bg-danger" *ngIf="form.invalid && errors.length">\n <ul class="custom-error">\n <li *ngFor="let error of errors">{{ error }}</li>\n </ul>\n </div>\n</div>\n',styles:[""]}]}],X.ctorParameters=function(){return[]},X.propDecorators={form:[{type:d.Input}]};var Y=function(){};Y.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Y},token:Y,providedIn:"root"}),Y.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var Q=function(){};Q.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Q},token:Q,providedIn:"root"}),Q.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var ee="language",te=function(){function e(e){this.translate=e,this.languages=[{name:"English",code:"en-US"},{name:"Русский",code:"ru-RU"}]}return e.prototype.init=function(){this.translate.addLangs(this.languages.map((function(e){return e.code}))),this.localeId=this.getLocale(),this.setLocale(this.localeId||this.languages[0].code)},e.prototype.getLocales=function(){return this.languages},e.prototype.getLocale=function(){return localStorage&&localStorage.getItem(ee)||this.localeId},e.prototype.setLocale=function(e){this.translate.use(e),this.localeId=e,localStorage&&localStorage.setItem(ee,e)},e}();te.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new te(R.ɵɵinject(D.TranslateService))},token:te,providedIn:"root"}),te.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],te.ctorParameters=function(){return[{type:a.TranslateService}]};var ne=function(){function e(e){this.router=e,this.collapsed=!1,this.router.isActive=function(e,t){var n;return!!(null===(n=this.routerState.snapshot.root.children)||void 0===n?void 0:n.length)&&e.toString()==="/"+this.routerState.snapshot.root.children[0].routeConfig.path.split("/:")[0]}}return e.prototype.ngOnInit=function(){var e=this;this.setActualPath(this.router.routerState.snapshot),this.router.events.subscribe((function(t){t instanceof g.NavigationEnd&&e.setActualPath(e.router.routerState.snapshot)}))},e.prototype.ngOnChanges=function(){this.setItemExpand()},e.prototype.collapseChild=function(e,t){this.item.expanded=this.item.text===e.text&&!this.item.expanded&&!!this.item.items,e.items&&0!==e.items.length?t.collapsed=!1:t.collapsed=!0},e.prototype.setItemExpand=function(){var e,t=this;this.item.expanded=null===(e=this.item.items)||void 0===e?void 0:e.some((function(e){return void 0!==e.link&&e.link===t.actualPath}))},e.prototype.setActualPath=function(e){var t;(null===(t=e.root.children)||void 0===t?void 0:t.length)&&(this.actualPath="/"+e.root.children[0].routeConfig.path.split("/:")[0],this.setItemExpand())},e}();ne.decorators=[{type:d.Component,args:[{selector:"[menu-item-group]",template:'<ng-container *ngIf="item.items && item.items.length">\n <a (click)="collapseChild(item, $event)">\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n <ul\n [ngClass]="\n item.expanded == true\n ? \'nav nav-second-level collapse in\'\n : \'nav nav-second-level collapse\'\n "\n >\n <ng-template ngFor let-item [ngForOf]="item.items">\n <li menu-item-group [item]="item"></li>\n </ng-template>\n </ul>\n</ng-container>\n<ng-container *ngIf="!item.items || !item.items.length">\n <a\n *ngIf="item.link"\n routerLink="{{ item.link }}"\n routerLinkActive="active-route"\n class="sub-menu-link"\n (click)="collapseChild(item, $event)"\n >\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n <a\n *ngIf="item.url"\n class="sub-menu-link"\n href="{{ item.url }}"\n target="_blank"\n (click)="collapseChild(item, $event)"\n >\n <ng-container *ngIf="!item.iconClass; else labelWithIcon">\n {{ item.text | translate }}\n </ng-container>\n </a>\n</ng-container>\n<ng-template #labelWithIcon>\n <i class="menu-icon fa {{ item.iconClass }}"></i>\n <span class="nav-label">{{ item.text | translate }}</span>\n</ng-template>\n',styles:[""]}]}],ne.ctorParameters=function(){return[{type:g.Router}]},ne.propDecorators={item:[{type:d.Input}]};var re,ie=function(){function e(){this.logoClick=new d.EventEmitter}return e.prototype.onLogoClick=function(){this.logoClick.emit()},e.prototype.collapse=function(e,t,n){var r;null===(r=this.items)||void 0===r||r.forEach((function(e){e.text!==t.text&&e.expanded&&(e.expanded=!1)})),n.collapsed?e.collapsed=!0:e.collapsed=!1},e}();ie.decorators=[{type:d.Component,args:[{selector:"side-menu",template:'<nav\n id="menu-left"\n class="navbar-default navbar-main navbar-static-side open"\n role="navigation"\n>\n <div class="sidebar-collapse">\n <ul id="side-menu" class="nav">\n <li class="nav-header">\n <div class="profile-element">\n <a href="/" class="img-supply">\n <img alt="Supply Stream logo" />\n </a>\n </div>\n <div class="logo-element" (click)="onLogoClick()">\n <i class="fa fa-exchange"></i>\n </div>\n </li>\n </ul>\n\n <div class="sidebar-collapse">\n <ul class="nav">\n <ng-template ngFor let-item [ngForOf]="items">\n <li\n #itemComponent\n menu-item-group\n [item]="item"\n [ngClass]="{\n menu: true,\n active: item.expanded ? item.expanded : false,\n collapsed: itemComponent.collapsed\n }"\n (click)="collapse(itemComponent, item, $event)"\n ></li>\n </ng-template>\n </ul>\n </div>\n </div>\n</nav>\n',styles:[""]}]}],ie.propDecorators={items:[{type:d.Input}],logoClick:[{type:d.Output}]},function(e){e.String="string",e.Number="number",e.Object="object",e.Array="array"}(re||(re={}));var oe,ae=function(){function e(){}return Object.defineProperty(e.prototype,"isSimpleValue",{get:function(){return!this.isArrayValue&&!this.isObjectValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isArrayValue",{get:function(){return this.prop.propType===re.Array},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isObjectValue",{get:function(){return this.prop.propType===re.Object},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propClass",{get:function(){return this.prop.propType===re.Number?"number":"string"},enumerable:!1,configurable:!0}),e.prototype.expandAll=function(){this.treeViewNodes.forEach((function(e){return e.expandAll()}))},e.prototype.collapseAll=function(){this.treeViewNodes.forEach((function(e){return e.collapseAll()}))},e}();ae.decorators=[{type:d.Component,args:[{selector:"tree-view-node-prop",template:'<li class="tree-view-prop">\n <span class="prop-name">{{ prop.startTag }}</span>\n <span *ngIf="isSimpleValue" [ngClass]="propClass">{{ prop.value }}</span>\n <ng-container *ngIf="isArrayValue">\n <span class="bracket">{{ prop.brackets?.inside }}</span>\n <ng-container *ngTemplateOutlet="arrayNode"></ng-container>\n <span class="bracket">{{ prop.brackets?.outside }}</span>\n </ng-container>\n <ng-container *ngIf="isObjectValue">\n <ng-container *ngTemplateOutlet="singleNode"></ng-container>\n </ng-container>\n <span class="prop-name">{{ prop.endTag }}</span>\n</li>\n\n<ng-template #arrayNode>\n <tree-view-node\n *ngFor="let node of prop.value"\n [node]="node"\n [hasExpand]="true"\n class="array-node"\n #node\n ></tree-view-node>\n</ng-template>\n\n<ng-template #singleNode>\n <tree-view-node\n *ngIf="isObjectValue"\n [node]="prop.value"\n [hasExpand]="true"\n #node\n ></tree-view-node>\n</ng-template>\n',styles:[":host *{font-size:14px}:host li{position:relative}:host .prop-name{color:#555;font-weight:700}:host .tree-view-prop{list-style-type:none;margin:4px 0;position:relative;padding-left:20px}::ng-deep .tree-view-prop .number{color:#00f}::ng-deep .tree-view-prop .string{color:green}"]}]}],ae.propDecorators={treeViewNodes:[{type:d.ViewChildren,args:["node"]}],prop:[{type:d.Input}]},function(e){e.Object="object",e.Array="array",e.Primitive="primitive"}(oe||(oe={}));var se,le=function(){function e(){this.expanded=!0}return Object.defineProperty(e.prototype,"isObject",{get:function(){return this.node.nodeType===oe.Object},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isArray",{get:function(){return this.node.nodeType===oe.Array},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPrimitive",{get:function(){return this.node.nodeType===oe.Primitive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"primitive",{get:function(){var e=this.node.props[0].value;return{value:e,type:typeof e,startTag:this.node.props[0].startTag}},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.expanded=!this.hasExpand},e.prototype.toggleExpand=function(){this.expanded=!this.expanded},e.prototype.expandAll=function(){this.hasExpand&&(this.expanded=!0),this.treeViewProps.forEach((function(e){return e.expandAll()}))},e.prototype.collapseAll=function(){this.hasExpand&&(this.expanded=!1),this.treeViewProps.forEach((function(e){return e.collapseAll()}))},e}();le.decorators=[{type:d.Component,args:[{selector:"tree-view-node",template:'<span class="tree-view-node">\n <span class="bracket">{{ node.brackets?.inside }}</span>\n <ng-container\n *ngIf="isPrimitive; then primitiveNode; else baseNode"\n ></ng-container>\n <span class="bracket">{{ node.brackets?.outside }}</span>\n</span>\n\n<ng-template #primitiveNode>\n <span class="tree-view-prop">\n {{ primitive.startTag }}\n <span [ngClass]="primitive.type">\n {{ primitive.value }}\n </span>\n </span>\n</ng-template>\n\n<ng-template #baseNode>\n <span>\n <i\n [ngClass]="\n expanded\n ? \'fa fa-caret-down node-toggler\'\n : \'fa fa-caret-right node-toggler\'\n "\n *ngIf="hasExpand"\n (click)="toggleExpand()"\n ></i>\n <span class="ellipsis" *ngIf="!expanded">...</span>\n <ul [ngClass]="!expanded ? \'hidden\' : \'\'">\n <tree-view-node-prop\n *ngFor="let prop of node.props"\n [prop]="prop"\n #prop\n ></tree-view-node-prop>\n </ul>\n </span>\n</ng-template>\n',styles:[""]}]}],le.propDecorators={treeViewProps:[{type:d.ViewChildren,args:["prop"]}],node:[{type:d.Input}],hasExpand:[{type:d.Input}]},function(e){e.Json="json",e.Xml="xml",e.Text="text"}(se||(se={}));var ce=function(){function e(e){this.nextResolver=e}return e.prototype.resolve=function(e){return this.nextResolver?this.nextResolver.resolve(e):null},e}();function ue(e){return Object.values(re).find((function(t){return t===e}))||re.String}var pe={inside:"{",outside:"}"},de={inside:"[",outside:"]"},fe=function(){function e(){}return e.convert=function(e){return Array.isArray(e)?this.convertArray(e):this.convertObject(e)},e.convertObject=function(e){var t,n,r=[];try{for(var i=H(Object.keys(e)),o=i.next();!o.done;o=i.next()){var a=o.value,s=e[a],l=null!==s?ue(typeof s):re.String;if(Array.isArray(s)){var c=this.convertArray(s),u=Array.isArray(c)?re.Array:re.Object;r.push({startTag:a+": ",value:c,propType:u,brackets:de})}else l!==re.Object?r.push({startTag:a+": ",value:s,propType:l}):r.push({startTag:a+": ",value:this.convertObject(s),propType:l})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{props:r,nodeType:oe.Object,brackets:pe}},e.convertArray=function(e){var t=this,n=[];return e.forEach((function(e,r){if(typeof e!==re.Object)n.push(t.getPrimitive(e,r));else{var i=Array.isArray(e)?de:pe,o=i.inside,a=i.outside;n.push(Object.assign(Object.assign({},t.convertObject(e)),{nodeType:Array.isArray(e)?oe.Array:(s=typeof e,Object.values(oe).find((function(e){return e===s}))||oe.Object),brackets:{inside:r+": "+o,outside:a}}))}var s})),{props:[{value:n,propType:re.Array}],brackets:de}},e.getPrimitive=function(e,t){return{props:[{startTag:t+": ",value:e,propType:ue(typeof e)}],nodeType:oe.Primitive}},e}(),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(t){try{var n=JSON.parse(t);return{data:fe.convert(n),format:se.Json}}catch(n){return e.prototype.resolve.call(this,t)}},t}(ce),ge=function(){function e(){}return e.convert=function(e){return{props:[{value:e,propType:re.String}]}},e}(),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(e){return{data:ge.convert(e),format:se.Text}},t}(ce),me=function(){function e(){}return e.convert=function(e){return e.childElementCount>1?this.convertObject(e.childNodes):{props:[this.convertProp(e.children[0])]}},e.convertProp=function(e){var t,n,r=e.tagName;return e.childElementCount>0?(t=this.convertObject(e.children),n=re.Array):n=ue(typeof(t=e.textContent)),{startTag:"<"+r+">",endTag:"</"+r+">",value:t,propType:n}},e.convertObject=function(e){var t,n,r=Array();try{for(var i=H(e),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(this.convertProp(a))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return[{props:r}]},e}(),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.resolve=function(t){try{var n=(new DOMParser).parseFromString(t,"text/xml");if(n.all.length>0&&0===n.getElementsByTagName("parsererror").length)return{data:me.convert(n),format:se.Xml}}catch(e){}return e.prototype.resolve.call(this,t)},t}(ce),be=function(){function e(){this.chain=new he(new ye(new ve(null)))}return e.prototype.resolve=function(e){return this.chain.resolve(e)},e}(),we=function(){function e(e){this.clipboardService=e,this.maxTextLength=1200,this.maxRootItems=10,this.ContentTypesFormat=se}return Object.defineProperty(e.prototype,"IsArray",{get:function(){return!!this.data&&Array.isArray(this.resolved.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCollapse",{get:function(){return!!this.data&&(this.resolved.format===se.Text?this.hasTextCollapse():this.hasNodeCollapse())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this.rawView?se.Text:this.resolved.format},enumerable:!1,configurable:!0}),e.prototype.ngOnChanges=function(){var e=new be;this.allShow=!1,this.rawView=!1,this.resolved=e.resolve(this.data),this.collapsed=this.hasCollapse},e.prototype.expandToggle=function(){this.collapsed=!this.collapsed},e.prototype.toggleExpandAll=function(){this.allShow?this.treeViewNodes.forEach((function(e){return e.collapseAll()})):this.treeViewNodes.forEach((function(e){return e.expandAll()})),this.collapsed=!!this.hasCollapse&&this.allShow,this.allShow=!this.allShow},e.prototype.toggleRawView=function(){this.rawView=!this.rawView},e.prototype.copyToClipboard=function(){this.clipboardService.copy(this.data)},e.prototype.hasTextCollapse=function(){return this.data.length>this.maxTextLength},e.prototype.hasNodeCollapse=function(){return!Array.isArray(this.resolved.data)&&this.resolved.data.props.length>this.maxRootItems},e}();we.decorators=[{type:d.Component,args:[{selector:"tree-view",template:'<div\n class="tree-view"\n [ngClass]="collapsed ? \'collapsed\' : \'expanded\'"\n [class]="format"\n *ngIf="data"\n>\n <ng-container *ngIf="format != ContentTypesFormat.Text; else textFormat">\n <div>\n <ng-container *ngTemplateOutlet="defaultActions"></ng-container>\n </div>\n <div [ngClass]="allShow ? \'show-all tree-view-body\' : \'tree-view-body\'">\n <ng-container *ngIf="IsArray; then arrayNode; else singleNode">\n </ng-container>\n <ng-template #singleNode>\n <tree-view-node [node]="resolved.data" #node> </tree-view-node>\n </ng-template>\n\n <ng-template #arrayNode>\n <tree-view-node\n *ngFor="let node of resolved.data"\n [node]="node"\n [hasExpand]="true"\n class="array-node"\n #node\n >\n </tree-view-node>\n </ng-template>\n </div>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n (click)="toggleExpandAll()"\n *ngIf="resolved.format !== ContentTypesFormat.Text"\n [disabled]="rawView"\n class="tree-view-action"\n >\n <i [ngClass]="allShow ? \'fa fa-minus\' : \'fa fa-plus\'"></i>\n </button>\n <button (click)="copyToClipboard()" class="tree-view-action">\n <i class="fa fa-clipboard"></i>\n </button>\n <button\n (click)="toggleRawView()"\n class="tree-view-action"\n [ngClass]="rawView ? \'pressed\' : \'\'"\n *ngIf="resolved.format !== ContentTypesFormat.Text"\n >\n <i class="fa fa-file-text-o"></i>\n </button>\n </ng-template>\n\n <ng-template #textFormat>\n <ng-container *ngTemplateOutlet="defaultActions"> </ng-container>\n <pre class="text-view tree-view-body">{{ data }}</pre>\n </ng-template>\n <div *ngIf="hasCollapse">\n <button (click)="expandToggle()" class="expand-toggler">\n <i\n class="fa"\n [ngClass]="\n collapsed ? \'fa-chevron-circle-down\' : \'fa-chevron-circle-up\'\n "\n ></i>\n </button>\n </div>\n</div>\n',styles:[":host ::ng-deep .tree-view ul{padding-left:20px;margin:0}:host ::ng-deep .node-toggler{position:absolute;left:3px;color:#222;font-size:14px;font-weight:700;padding:1px;cursor:pointer;width:20px}:host .tree-view{position:relative}:host ::ng-deep .hidden{display:none}:host .tree-view-action{margin:3px}:host .tree-view-body{position:relative;margin:5px;padding:0 20px;font-family:monospace;overflow:hidden}:host .collapsed .tree-view-body{max-height:200px}:host .expand-toggler{width:100%;height:30px;background:none;border:none;outline:none;cursor:pointer;position:relative;background:linear-gradient(hsla(0,0%,100%,0),#fff 45%);max-width:100%;padding:0;left:0;transition:all .1s ease-in-out;margin-top:15px}:host .expand-toggler .fa{font-size:16px;color:#444;transition:all .3s ease-in-out}:host .collapsed .expand-toggler{height:60px;margin-top:-40px;padding-top:20px;position:absolute}:host .expand-toggler:hover .fa{color:#36517e;transform:scale(1.7) rotate(-90deg)}:host .collapsed{padding-bottom:20px}:host .text-view{white-space:pre-wrap}:host .tree-view-action:disabled{opacity:.65}:host .tree-view-action.pressed{box-shadow:inset 1px 1px 3px rgba(0,0,0,.26666666666666666)}::ng-deep .json .array-node{display:block}"]}]}],we.ctorParameters=function(){return[{type:l.ClipboardService}]},we.propDecorators={treeViewNodes:[{type:d.ViewChildren,args:["node"]}],data:[{type:d.Input}],maxTextLength:[{type:d.Input}],maxRootItems:[{type:d.Input}]};var Se={langs:{getTranslation:function(){return v.of({})}},appSettings:{accountUrl:"",apiUrl:"",toastrTimeOut:2500,oidc:{clientId:"",authority:"",issuer:""},azureB2C:{clientId:"",authority:"",knownAuthorities:[""]}}},Ce=Se,ke=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:d.APP_INITIALIZER,useFactory:Fe,multi:!0,deps:[te]},{provide:Q,useValue:t||Se}]}},e}();function Fe(e){return function(){e.init()}}function xe(e){return e.langs}function Ie(e){return e.appSettings}ke.decorators=[{type:d.NgModule,args:[{declarations:[ie,ne,we,le,ae,V,X,J,Z],imports:[h.BrowserModule,p.HttpClientModule,a.TranslateModule.forChild({loader:{provide:a.TranslateLoader,useFactory:xe,deps:[Q,p.HttpClient]}}),o.LoadingBarHttpClientModule,u.CommonModule,g.RouterModule,f.ReactiveFormsModule,c.ToastrModule.forRoot(),n.BrowserAnimationsModule],providers:[{provide:d.APP_INITIALIZER,useFactory:Fe,multi:!0,deps:[te]},{provide:Q,useValue:Ce},{provide:Y,useFactory:Ie,deps:[Q]},a.TranslateStore],exports:[ie,we,V,X,J,a.TranslateModule,l.ClipboardModule,o.LoadingBarHttpClientModule,c.ToastrModule,n.BrowserAnimationsModule,Z]}]}];var Te,Ee={signalr:{eventsHub:"EventsHub"},oidc:{config:"oidc/config"},members:{me:"members/me"},admins:Object.assign(Object.assign({},Ae("admins")),{roles:Object.assign({},Ae("admins/roles"))}),system:{info:"system/info"},firstUser:"admins/first",partners:Ae("partners"),permissions:{all:function(e){return"permissions/"+e+"s"},member:function(e){return"permissions/"+e},mine:"permissions/me"},users:Object.assign(Object.assign({},Ae("users")),{roles:Object.assign({},Ae("users/roles"))}),apiTokens:Ae("apiTokens")},Oe=/'((\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1})'/g;function Ae(e){return{path:e,query:function(t){return e+"?"+y.toODataString(t,{utcDates:!0}).replace(Oe,"$1")},entityPath:function(t){return e+"/"+t}}}e.EventNames=void 0,(Te=e.EventNames||(e.EventNames={})).UserUpdated="userUpdated",Te.PermissionsUpdated="permissionsUpdated";var Pe,je="/admin/",De=function(){function t(e,t,n,r){var i=this;this.resolver=e,this.httpService=t,this.settingsService=n,this.signalRService=r,this.user=new v.BehaviorSubject(null),this.resolver.getProvider().pipe(m.map((function(e){i.initialize(e)}))).subscribe()}return t.prototype.login=function(){this.resolver.getProvider().pipe(m.map((function(e){e.login()}))).subscribe()},t.prototype.logout=function(){this.settingsService.clearLoginAsUser(),this.resolver.getProvider().pipe(m.map((function(e){e.logout()}))).subscribe()},t.prototype.initialize=function(t){var n=this;this.getCurrentUser().subscribe((function(r){if(r){var i=n.settingsService.getCallbackPath();if(i)return n.settingsService.clearCallbackPath(),void(window.location.href=window.location.origin+i);!n.isAdmin(r)||window.location.pathname.startsWith(je)?t.getAccessToken().subscribe((function(r){n.signalRService.startConnection(r),n.signalRService.on(e.EventNames.UserUpdated).subscribe((function(){return B(n,void 0,void 0,(function(){var e=this;return z(this,(function(n){return t.getAccessToken().subscribe((function(t){e.signalRService.reconnect(t)})),this.httpService.get(Ee.members.me).subscribe((function(t){return e.user.next(t)})),[2]}))}))}))})):window.location.href=""+window.location.origin+je}}))},t.prototype.getCurrentUser=function(){var e=this;return this.resolver.getProvider().pipe(m.mergeMap((function(t){return e.user.getValue()||!t.isUserLoggedIn()?e.user:t.getAccessToken().pipe(m.mergeMap((function(){return e.httpService.get(Ee.members.me).pipe(m.map((function(t){return e.user.next(t),t})))})))})))},t.prototype.isUserLoggedIn=function(){return this.resolver.getProvider().pipe(m.map((function(e){return e.isUserLoggedIn()})))},t}(),Me=function(){function e(e,t){this.observable=e,this.action=t}return Object.defineProperty(e.prototype,"connected",{get:function(){return!this.subscription.closed},enumerable:!1,configurable:!0}),e.prototype.resume=function(){this.subscription=this.observable.subscribe(this.action)},e.prototype.pause=function(){this.subscription.unsubscribe()},e}(),Ne=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.generalErrors=[],i}return G(t,e),t.prototype.getControl=function(e){return this.contains(e)||this.addControl(e,new f.FormControl({})),this.get(e)},t.prototype.applyServerErrors=function(e,t){for(var n in this.generalErrors=[],e.title&&this.generalErrors.push(e.title),t||(t=this),e.errors){var r=t.controls[n];r?r.setErrors({serverErrorMsg:e.errors[n].join(",")}):this.generalErrors.push(e.errors[n].join(","))}},t}(f.FormGroup);e.HttpCodes=void 0,(Pe=e.HttpCodes||(e.HttpCodes={}))[Pe.BadRequest=400]="BadRequest",Pe[Pe.Forbidden=403]="Forbidden",Pe[Pe.InternalServerError=500]="InternalServerError",Pe[Pe.NotFound=404]="NotFound",Pe[Pe.OK=200]="OK",Pe[Pe.Unauthorized=401]="Unauthorized";var Le="callbackPath",Re="X-User-Id",Ue="access_token",Ve=function(){function e(){}return e.prototype.putCurrentCallbackPath=function(){this.putCallbackPath(window.location.pathname+window.location.hash)},e.prototype.putCallbackPath=function(e){this.getCallbackPath()||"/home"===e||localStorage.setItem(Le,e)},e.prototype.getCallbackPath=function(){return localStorage.getItem(Le)},e.prototype.clearCallbackPath=function(){localStorage.removeItem(Le)},e.prototype.setLoginAsUser=function(e){localStorage.setItem(Re,e)},e.prototype.getLoginAsUser=function(){return localStorage.getItem(Re)},e.prototype.clearLoginAsUser=function(){localStorage.removeItem(Re)},e.prototype.setToken=function(e){localStorage.setItem(Ue,e)},e.prototype.getToken=function(){return localStorage.getItem(Ue)},e}();Ve.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Ve},token:Ve,providedIn:"root"}),Ve.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}];var qe=function(){function e(e,t){this.toastr=e,this.appSettings=t,this.timeout=this.appSettings.toastrTimeOut}return e.prototype.showError=function(e,t){void 0===t&&(t="Error"),this.toastr.error(e,t,{timeOut:this.timeout})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=""),this.toastr.success(e,t,{timeOut:this.timeout})},e}();qe.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new qe(R.ɵɵinject(N.ToastrService),R.ɵɵinject(Y))},token:qe,providedIn:"root"}),qe.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],qe.ctorParameters=function(){return[{type:c.ToastrService},{type:Y}]};var Ge=/^http(s)?:\/\//,Be=function(){function t(e,t,n,r,i,o){this.appToastrService=e,this.httpClient=t,this.appSettings=n,this.translate=r,this.router=i,this.settingsService=o}return t.prototype.get=function(e){var t=this;return this.httpClient.get(this.createUrl(e)).pipe(m.catchError((function(e){return t.handleServerError(e)})))},t.prototype.delete=function(e){var t=this;return this.httpClient.delete(this.createUrl(e)).pipe(m.tap((function(){return t.showSuccessMessage("ToastrMessages.RemovedSuccessfully")})),m.catchError((function(e){return t.handleServerError(e)})))},t.prototype.post=function(e,t,n){var r=this;return void 0===n&&(n=null),this.httpClient.post(this.createUrl(e),t).pipe(m.tap((function(){return r.showSuccessMessage(null!=n?n:"ToastrMessages.SavedSuccessfully")})),m.catchError((function(e){return r.handleServerError(e)})))},t.prototype.put=function(e,t,n){var r=this;return void 0===n&&(n=null),this.httpClient.put(this.createUrl(e),t).pipe(m.tap((function(){return r.showSuccessMessage(null!=n?n:"ToastrMessages.SavedSuccessfully")})),m.catchError((function(e){return r.handleServerError(e)})))},t.prototype.createUrl=function(e){return Ge.test(e)?e:this.appSettings.apiUrl+e},t.prototype.handleServerError=function(t){return t.error instanceof ErrorEvent?(this.appToastrService.showError("An error occurred: "+t.error.message),v.of(null)):t.status===e.HttpCodes.Unauthorized?(this.settingsService.putCurrentCallbackPath(),this.appToastrService.showError(this.translate.instant("ToastrMessages.Unauthorized")),v.of(null)):t.status===e.HttpCodes.Forbidden?(this.appToastrService.showError(this.translate.instant("ToastrMessages.Forbidden")),this.router.navigate(["forbidden"]),v.of(null)):t.status===e.HttpCodes.NotFound?(this.settingsService.getLoginAsUser()&&(this.settingsService.clearLoginAsUser(),this.appToastrService.showError(this.translate.instant("ToastrMessages.CanNotLoginAsUser")),setTimeout((function(){window.location.href="/"}),1e3)),this.appToastrService.showError(this.translate.instant("ToastrMessages.NotFound")),v.of(null)):t.status>=e.HttpCodes.InternalServerError?(this.appToastrService.showError(this.translate.instant("ToastrMessages.ServerError")+t.error.title),v.of(null)):v.throwError(t)},t.prototype.showSuccessMessage=function(e){this.appToastrService.showSuccess(this.translate.instant(e))},t}();Be.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Be(R.ɵɵinject(qe),R.ɵɵinject(L.HttpClient),R.ɵɵinject(Y),R.ɵɵinject(D.TranslateService),R.ɵɵinject(U.Router),R.ɵɵinject(Ve))},token:Be,providedIn:"root"}),Be.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Be.ctorParameters=function(){return[{type:qe},{type:p.HttpClient},{type:Y},{type:a.TranslateService},{type:g.Router},{type:Ve}]};var ze,He=function(){function e(){}return e.prototype.ngOnInit=function(){this.subscription.resume()},e.prototype.toggle=function(){this.subscription.connected?this.subscription.pause():this.subscription.resume()},e}();He.decorators=[{type:d.Component,args:[{selector:"live-updates-control",template:"<button (click)=\"toggle()\" class=\"k-button\">\n <em [ngClass]=\"subscription.connected ? 'fa fa-pause' : 'fa fa-play'\"></em>\n {{\n (subscription.connected ? 'LiveFeed.Pause' : 'LiveFeed.Resume') | translate\n }}\n</button>\n",styles:[":host .fa{margin-right:5px}"]}]}],He.propDecorators={subscription:[{type:d.Input}]},function(e){e.IdentityServer="IdentityServer",e.AzureB2C="AzureB2C"}(ze||(ze={}));var _e=function(){},Ke=function(e){function t(t,n){var r=e.call(this)||this;return r.authService=t,r.settingsService=n,r.isUserLoggedIn=function(){var e;return!!(null===(e=r.authService.instance.getActiveAccount())||void 0===e?void 0:e.localAccountId)},r}return G(t,e),t.prototype.initialize=function(){return v.of(!0)},t.prototype.login=function(){this.isUserLoggedIn()||this.authService.loginRedirect().subscribe()},t.prototype.logout=function(){this.authService.logoutRedirect({postLogoutRedirectUri:location.origin})},t.prototype.getAccessToken=function(){var e=this,t={scopes:["openid","offline_access","profile"]};return v.from(this.authService.instance.acquireTokenSilent(t).then((function(t){var n=t.idToken;return e.settingsService.setToken(n),n})).catch((function(n){return B(e,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return n instanceof b.InteractionRequiredAuthError?[4,this.authService.instance.acquireTokenRedirect(t)]:[3,2];case 1:return e.sent(),[2,this.settingsService.getToken()];case 2:return[2]}}))}))})))},t}(_e),$e=function(e){function t(t,n){var r=e.call(this)||this;return r.oauthService=t,r.configuration=n,r.isUserLoggedIn=function(){return r.oauthService.hasValidAccessToken()},r}return G(t,e),t.prototype.initialize=function(){var e={issuer:this.configuration.appSettings.oidc.issuer,redirectUri:window.location.origin+"/login/callback",clientId:this.configuration.appSettings.oidc.clientId,scope:"openid profile offline_access",postLogoutRedirectUri:window.location.origin+"/home",silentRefreshRedirectUri:window.location.origin+"/silent-renew.html"};return this.configure(e)},t.prototype.login=function(){this.oauthService.initLoginFlow()},t.prototype.logout=function(){this.oauthService.logOut()},t.prototype.getAccessToken=function(){return v.of(this.oauthService.getAccessToken())},t.prototype.configure=function(e){var t=this;return this.oauthService.configure(e),this.oauthService.tokenValidationHandler=new w.JwksValidationHandler,this.oauthService.setupAutomaticSilentRefresh(),v.from(this.oauthService.loadDiscoveryDocument(e.issuer+"/identity/.well-known/openid-configuration")).pipe(m.mergeMap((function(){return v.from(t.oauthService.tryLoginImplicitFlow())})))},t}(_e),We=function(e,t,n,r,i){var o=this;this.AuthProvider$=new v.BehaviorSubject(null),this.getProvider=function(){return o.AuthProvider$.pipe(m.filter((function(e){return!!e})))},e.get(Ee.system.info).subscribe((function(e){var a;(a=e.identityProvider===ze.IdentityServer?new $e(t,i):new Ke(n,r)).initialize().subscribe((function(){return o.AuthProvider$.next(a)}))}))};We.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new We(R.ɵɵinject(Be),R.ɵɵinject(M.OAuthService),R.ɵɵinject(P.MsalService),R.ɵɵinject(Ve),R.ɵɵinject(Q))},token:We,providedIn:"root"}),We.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],We.ctorParameters=function(){return[{type:Be},{type:s.OAuthService},{type:r.MsalService},{type:Ve},{type:Q}]};var Je=function(){function e(e){this.appSettings=e,this.isConnectionEstablished=!1,this.eventEmitters={}}return e.prototype.createConnection=function(e){var t,n=this;this.hubConnection=(new j.HubConnectionBuilder).withUrl(this.appSettings.apiUrl+Ee.signalr.eventsHub,{accessTokenFactory:function(){return e}}).configureLogging(null!==(t=this.appSettings.signalRLogLevel)&&void 0!==t?t:j.LogLevel.None).build(),this.hubConnection.onclose((function(t){void 0!==t&&(n.isConnectionEstablished=!1,n.startConnection(e))}))},e.prototype.startConnection=function(e){var t=this;this.isConnectionEstablished||(this.createConnection(e),this.hubConnection.start().then((function(){t.isConnectionEstablished=!0,Object.keys(t.eventEmitters).forEach((function(e){t.hubConnection.on(e,(function(n){t.eventEmitters[e].emit(n)}))}))})).catch((function(){console.warn("Error while establishing connection, retrying..."),setTimeout((function(){return t.startConnection(e)}),5e3)})))},e.prototype.reconnect=function(e){var t=this;this.isConnectionEstablished&&this.hubConnection.stop().then((function(){t.isConnectionEstablished=!1,t.startConnection(e)}))},e.prototype.on=function(e){var t=this;return this.eventEmitters[e]||(this.eventEmitters[e]=new d.EventEmitter,this.hubConnection&&this.hubConnection.on(e,(function(n){t.eventEmitters[e].emit(n)}))),this.eventEmitters[e]},e}();Je.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Je(R.ɵɵinject(Y))},token:Je,providedIn:"root"}),Je.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Je.ctorParameters=function(){return[{type:Y}]};var Ze=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.resolver=t,o.isAdmin=function(e){var t;return null!==(t="Admin"===(null==e?void 0:e.type))&&void 0!==t&&t},o}return G(t,e),t}(De);Ze.ɵprov=R.ɵɵdefineInjectable({factory:function(){return new Ze(R.ɵɵinject(We),R.ɵɵinject(Be),R.ɵɵinject(Ve),R.ɵɵinject(Je))},token:Ze,providedIn:"root"}),Ze.decorators=[{type:d.Injectable,args:[{providedIn:"root"}]}],Ze.ctorParameters=function(){return[{type:We},{type:Be},{type:Ve},{type:Je}]};var Xe=function(){function e(e,t,n){this.eref=e,this.accountService=t,this.appSettings=n,this.expand=!1,this.languageSelectorVisible=!1}return Object.defineProperty(e.prototype,"fullName",{get:function(){var e,t;return(null===(e=this.user)||void 0===e?void 0:e.firstName)+" "+(null===(t=this.user)||void 0===t?void 0:t.lastName)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accountUrl",{get:function(){return this.appSettings.accountUrl},enumerable:!1,configurable:!0}),e.prototype.toogle=function(){this.expand=!this.expand},e.prototype.logout=function(){this.accountService.logout()},e.prototype.openLanguageSelector=function(e){e.stopPropagation(),this.toogle(),this.languageSelectorVisible=!0},e.prototype.clickedOutside=function(e){!this.eref.nativeElement.contains(e.target)&&this.expand&&this.toogle()},e}();Xe.decorators=[{type:d.Component,args:[{selector:"account-menu",template:'<div class="profile-img left" id="accountMenu">\n <div #accountMenuElement title="User Account" (click)="toogle()">\n <img alt="image" class="img-circle top-bar-profile left" />\n </div>\n <kendo-popup\n *ngIf="expand"\n [anchor]="accountMenu"\n popupClass="k-widget dropdown open"\n >\n <ul class="dropdown-menu top-bar-dropdown animated fadeInLeft">\n <li class="top-bar-header-row media">\n <div class="media-left">\n <img alt="image" class="img-circle" />\n </div>\n <div class="media-body">\n <span class="left fa fa-user" aria-hidden="true"></span>\n <span class="left pad5left">{{ fullName }}</span>\n </div>\n </li>\n <li class="pad5top">\n <a (click)="openLanguageSelector($event)" data-icon="globe">{{\n \'ChangeLanguage\' | translate\n }}</a>\n </li>\n <li>\n <a [href]="accountUrl" data-icon="desktop" translate="Account"></a>\n </li>\n <li>\n <a translate="Logout" data-icon="sign-out" (click)="logout()"></a>\n </li>\n </ul>\n </kendo-popup>\n\n <language-selector [(visible)]="languageSelectorVisible"></language-selector>\n</div>\n',styles:[".top-bar-dropdown{right:-24px;top:42px}.top-bar-profile{cursor:pointer}"]}]}],Xe.ctorParameters=function(){return[{type:d.ElementRef},{type:Ze},{type:Y}]},Xe.propDecorators={accountMenu:[{type:d.ViewChild,args:["accountMenuElement"]}],user:[{type:d.Input}],clickedOutside:[{type:d.HostListener,args:["document:click",["$event"]]}]};var Ye=function(){function e(e,t,n){this.authService=e,this.settingsService=t,this.router=n}return e.prototype.ngOnInit=function(){var e=this;this.authService.handleRedirectObservable().subscribe((function(t){t&&(e.settingsService.setToken(t.idToken),e.authService.instance.setActiveAccount(t.account)),e.router.navigate(["home"])}))},e.prototype.logout=function(){this.authService.logout()},e}();Ye.decorators=[{type:d.Component,args:[{selector:"lib-azure-login",template:""}]}],Ye.ctorParameters=function(){return[{type:r.MsalService},{type:Ve},{type:g.Router}]};var Qe=function(){function e(e,t){this.eref=e,this.settings=t,this.visibleChange=new d.EventEmitter,this.currentLanguageCode="",this.currentLanguageCode=this.settings.getLocale(),this.languages=this.settings.getLocales()}return e.prototype.changeLanguage=function(e){return B(this,void 0,void 0,(function(){return z(this,(function(t){return this.currentLanguageCode=e,this.settings.setLocale(this.currentLanguageCode),this.close(),[2]}))}))},e.prototype.close=function(){this.visible=!1,this.visibleChange.emit(this.visible)},e.prototype.clickedOutside=function(e){this.eref.nativeElement.contains(e.target)||this.close()},e}();Qe.decorators=[{type:d.Component,args:[{selector:"language-selector",template:'<kendo-window\n *ngIf="visible"\n class="language-selector"\n [draggable]="false"\n [resizable]="false"\n>\n <kendo-window-titlebar>\n <div>{{ \'ChangeLanguage\' | translate }}</div>\n <button kendoWindowCloseAction (click)="close()"></button>\n </kendo-window-titlebar>\n <div class="languages" *ngIf="languages">\n <div *ngFor="let language of languages" class="language-change-action">\n <button class="btn" (click)="changeLanguage(language.code)">\n <span\n *ngIf="currentLanguageCode == language.code"\n class="fa fa-check"\n aria-hidden="true"\n ></span>\n {{ language.name }}\n </button>\n </div>\n </div>\n</kendo-window>\n',styles:[".language-selector{right:40px;top:52px!important;left:auto}.language-selector kendo-window-titlebar{padding:5px 8px}.language-selector kendo-window-titlebar div{width:100%}.language-selector .btn{width:95%}.language-selector .fa{margin-right:5px}.language-change-action{padding:5px}"]}]}],Qe.ctorParameters=function(){return[{type:d.ElementRef},{type:te}]},Qe.propDecorators={visible:[{type:d.Input}],visibleChange:[{type:d.Output}],clickedOutside:[{type:d.HostListener,args:["document:click",["$event"]]}]};var et=window.navigator.userAgent.indexOf("MSIE ")>-1||window.navigator.userAgent.indexOf("Trident/")>-1,tt=function(e){var t={auth:{clientId:e.appSettings.azureB2C.clientId,authority:e.appSettings.azureB2C.authority,knownAuthorities:e.appSettings.azureB2C.knownAuthorities,redirectUri:window.location.origin+"/azure/login/callback",postLogoutRedirectUri:"/",navigateToLoginRequestUrl:!1},cache:{cacheLocation:b.BrowserCacheLocation.SessionStorage,storeAuthStateInCookie:et},system:{loggerOptions:{loggerCallback:function(){},piiLoggingEnabled:!1}}};return new b.PublicClientApplication(t)},nt=function(){function t(t,n,r){var i=this;this.httpService=t,this.accountService=n,this.signalRService=r,this.loaded=!1,this.mine=new v.BehaviorSubject({}),this.accountService.user.subscribe((function(t){return B(i,void 0,void 0,(function(){var n=this;return z(this,(function(r){return t?(this.httpService.get(Ee.permissions.mine).subscribe((function(t){n.mine.next(t),n.loaded=!0,n.signalRService.on(e.EventNames.PermissionsUpdated).subscribe((function(){n.getPermissionsFromServer()}))})),[2]):(this.mine.next({}),[2])}))}))}))}return t.prototype.getAll=function(e){return this.httpService.get(Ee.permissions.all(e))},t.prototype.getMine=function(){return this.loaded?this.mine:this.getPermissionsFromServer()},t.prototype.getPermissionsFromServer=function(){var e=this;return this.httpService.get(Ee.permissions.mine).pipe(m.map((function(t){return e.mine.next(t),t})))},t}();nt.decorators=[{type:d.Injectable}],nt.ctorParameters=function(){return[{type:Be},{type:Ze},{type:Je}]};var rt="hidden",it=function(){function e(e,t,n,r){this.elementRef=e,this.route=t,this.permissionsService=n,this.renderer=r}return e.prototype.ngOnInit=function(){var e=this;this.hide();var t=this.permissionCategory?this.permissionCategory:this.getRouteCategory(this.route);t?this.permissionsService.mine.subscribe((function(n){n[t]&&e.hasType(n[t])?e.show():e.hide()})):this.show()},e.prototype.hide=function(){this.renderer.addClass(this.elementRef.nativeElement,rt)},e.prototype.show=function(){this.renderer.removeClass(this.elementRef.nativeElement,rt)},e.prototype.hasType=function(e){var t=this;return Array.isArray(this.permissionType)?e.map((function(e){return t.permissionType.includes(e)})).some((function(e){return e})):e.includes(this.permissionType)},e.prototype.getRouteCategory=function(e){var t=e.snapshot.data;return t&&t.permission?t.permission.category:this.route.parent?this.getRouteCategory(this.route.parent):null},e}();it.decorators=[{type:d.Directive,args:[{selector:"[requirePermission]"}]}],it.ctorParameters=function(){return[{type:d.ElementRef},{type:g.ActivatedRoute},{type:nt},{type:d.Renderer2}]},it.propDecorators={permissionType:[{type:d.Input}],permissionCategory:[{type:d.Input}]};var ot,at=function(){function e(e){this.settingsService=e}return e.prototype.intercept=function(e,t){if(!e.headers.keys().find((function(e){return"Authorization"===e}))){var n=this.settingsService.getToken();if(n){var r=e.clone({setHeaders:{Authorization:"Bearer "+n}});return t.handle(r)}return t.handle(e)}return t.handle(e)},e}();at.decorators=[{type:d.Injectable}],at.ctorParameters=function(){return[{type:Ve}]},e.FieldTypes=void 0,(ot=e.FieldTypes||(e.FieldTypes={}))[ot.Text=0]="Text",ot[ot.Checkbox=1]="Checkbox",ot[ot.Dropdown=2]="Dropdown",ot[ot.Multiselect=3]="Multiselect";var st=function(){function t(t){this.translate=t,this.showArchiveSwitcher=!0,this.showSearhText=!0,this.FieldTypes=e.FieldTypes,this.defaultNamedModel={name:this.translate.instant("All"),id:null}}return t.prototype.ngOnInit=function(){var e,t=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){return e.valueField=e.valueField?e.valueField:"id"})),this.filterService.filter$.subscribe((function(e){t.filter=e,t.changeFilter()}))},t.prototype.ngOnChanges=function(){this.changeFilter()},t.prototype.setTodayFilter=function(){this.filterService.setToday()},t.prototype.clearFilter=function(){var e;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){e.filter.value=null,e.filter.values&&(e.filter.values=[])})),this.filterService.reset(),this.emitChangeEvents()},t.prototype.applyFilter=function(){this.setCustomFilters(),this.filterService.applyFilter(this.filter)},t.prototype.fieldChange=function(e,t){t.change&&t.change(e)},t.prototype.fillFilter=function(){var e,t,n=this;this.filter&&(null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){e.filter=Object.assign(Object.assign({},e.filter),{value:null,values:null})})),null===(t=this.filter.customFilters)||void 0===t||t.forEach((function(e){var t,r=null===(t=n.customFilterElements)||void 0===t?void 0:t.find((function(t){return t.filter.field===e.field&&t.filter.filterTarget===e.filterTarget}));r&&(r.filter=Object.assign({},e))})))},t.prototype.setCustomFilters=function(){var e,t,n=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){var t,r=null===(t=n.filter.customFilters)||void 0===t?void 0:t.findIndex((function(t){return t.field===e.filter.field}));-1!==r&&n.filter.customFilters.splice(r,1)})),null===(t=this.customFilterElements)||void 0===t||t.forEach((function(e){return n.filter.customFilters.push(e.filter)}))},t.prototype.fixMultiselectFilters=function(){var t,n=null===(t=this.customFilterElements)||void 0===t?void 0:t.map((function(t){if(t.fieldType===e.FieldTypes.Multiselect)return t.filter}));n&&n.forEach((function(e){(null==e?void 0:e.value)&&(e.values=[e.value],e.value=null)}))},t.prototype.changeFilter=function(){this.fillFilter(),this.fixMultiselectFilters(),this.emitChangeEvents()},t.prototype.emitChangeEvents=function(){var e,t=this;null===(e=this.customFilterElements)||void 0===e||e.forEach((function(e){var n;(e.filter.value||e.filter.values)&&t.fieldChange(null!==(n=e.filter.value)&&void 0!==n?n:e.filter.values,e)}))},t}();st.decorators=[{type:d.Component,args:[{selector:"activity-filter",template:'<div class="header-selection-field activity-filter">\n <div class="filter-row">\n <div>\n <label for="datefrom" class="title-field">\n <span>{{ \'ActivitiesFilter.DateFrom\' | translate }}:</span>\n <div>\n <kendo-datetimepicker\n format="dd/MM/yyyy HH:mm"\n [(value)]="filter.dateFrom"\n ></kendo-datetimepicker>\n </div>\n </label>\n </div>\n <div>\n <label for="dateto" class="title-field">\n <span>{{ \'ActivitiesFilter.DateTo\' | translate }}:</span>\n <div>\n <kendo-datetimepicker\n format="dd/MM/yyyy HH:mm"\n [(value)]="filter.dateTo"\n ></kendo-datetimepicker>\n </div>\n </label>\n </div>\n <div>\n <label class="title-field">\n <span class="link-button" (click)="setTodayFilter()">\n {{ \'ActivitiesFilter.FilterToday\' | translate }}\n </span>\n </label>\n </div>\n <div class="filter-row">\n <div class="flag" *ngIf="showArchiveSwitcher">\n <div class="checkbox">\n <label>\n <input [(ngModel)]="filter.switchToArchive" type="checkbox" />\n {{ \'ActivitiesFilter.SwitchToArchiveLabel\' | translate }}\n </label>\n </div>\n </div>\n <div *ngIf="showSearhText">\n <label class="title-field">\n <span>{{ \'ActivitiesFilter.SearchLabel\' | translate }}:</span>\n </label>\n <input\n type="text"\n k-input\n class="input k-input searchtext-input"\n [(ngModel)]="filter.searchText"\n (keyup.enter)="applyFilter()"\n [disabled]="filter.switchToArchive"\n />\n </div>\n </div>\n </div>\n <div class="filter-row">\n <ng-container *ngFor="let field of customFilterElements">\n <ng-container [ngSwitch]="field.fieldType">\n <ng-template [ngSwitchCase]="FieldTypes.Text">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <input\n type="text"\n class="input k-input"\n [(ngModel)]="field.filter.value"\n [placeholder]="field.placeholder | translate"\n />\n </div>\n </label>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Dropdown">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <kendo-dropdownlist\n [data]="field.data"\n textField="name"\n [valueField]="field.valueField"\n [defaultItem]="defaultNamedModel"\n [(ngModel)]="field.filter.value"\n [valuePrimitive]="true"\n (valueChange)="fieldChange($event, field)"\n ></kendo-dropdownlist>\n </div>\n </label>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Checkbox">\n <div class="flag">\n <div class="checkbox">\n <label>\n <input [(ngModel)]="field.filter.value" type="checkbox" />\n {{ field.title | translate }}\n </label>\n </div>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]="FieldTypes.Multiselect">\n <div>\n <label class="title-field">\n <span>{{ field.title | translate }}:</span>\n <div>\n <kendo-multiselect\n kendoMultiSelectSummaryTag\n [autoClose]="false"\n [data]="field.data"\n [(ngModel)]="field.filter.values"\n textField="name"\n [valueField]="field.valueField"\n [valuePrimitive]="true"\n [placeholder]="field.placeholder | translate"\n (valueChange)="fieldChange($event, field)"\n ></kendo-multiselect>\n </div>\n </label>\n </div>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <div class="row">\n <div class="col-md-12">\n <button class="btn btn-inverse" (click)="applyFilter()">\n {{ \'Buttons.Apply\' | translate }}\n </button>\n <button class="btn btn-inverse" (click)="clearFilter()">\n {{ \'Buttons.Clear\' | translate }}\n </button>\n </div>\n </div>\n</div>\n<current-timezone></current-timezone>\n',styles:["::ng-deep .filter-row{display:flex;flex-flow:row wrap;margin-bottom:20px}::ng-deep .filter-row>div{margin:0 10px 30px 5px;min-width:100px}::ng-deep .filter-row .title-field{margin:0;width:100%}::ng-deep .filter-row .flag{margin-top:10px!important}"]}]}],st.ctorParameters=function(){return[{type:a.TranslateService}]},st.propDecorators={showArchiveSwitcher:[{type:d.Input}],showSearhText:[{type:d.Input}],customFilterElements:[{type:d.Input}],filterService:[{type:d.Input}]};var lt=function(){function e(e){this.dialogService=e}return e.prototype.cancel=function(){this.dialog.close(),this.callback=void 0},e.prototype.confirm=function(){this.callback(),this.cancel()},e.prototype.open=function(e,t){this.callback=t,this.dialog=this.dialogService.open({content:e,actions:this.dialogActions})},e}();lt.decorators=[{type:d.Component,args:[{selector:"confirm-dialog",template:'<ng-template #dialogActions>\n <button kendoButton (click)="cancel()" translate="Cancel"></button>\n <button kendoButton (click)="confirm()" translate="Confirm"></button>\n</ng-template>\n<div kendoDialogContainer></div>\n',styles:[""]}]}],lt.ctorParameters=function(){return[{type:k.DialogService}]},lt.propDecorators={dialogActions:[{type:d.ViewChild,args:["dialogActions",{static:!0}]}]};var ct=A,ut=function(){function e(){}return e.prototype.ngOnInit=function(){var e=ct.tz.guess();this.timeZoneAndOffset=e+" "+ct().format("Z")},e}();ut.decorators=[{type:d.Component,args:[{selector:"current-timezone",template:'<div class="divide-line"></div>\n<div class="time-zone">\n {{ \'CurrentTimeZone\' | translate }}: {{ timeZoneAndOffset }}\n</div>\n',styles:[""]}]}],ut.ctorParameters=function(){return[]};var pt=function(){this.save=new d.EventEmitter};pt.decorators=[{type:d.Component,args:[{selector:"entity-edit-buttons-bar",template:'<div class="form-group buttons-panel">\n <div class="col-md-4">\n <a\n [routerLink]="[\'../new\']"\n preserveFragment\n class="btn btn-succes"\n translate="CreateNew"\n requirePermission\n permissionType="Create"\n >\n </a>\n </div>\n <div class="col-md-8 text-right">\n <a\n [routerLink]="[\'../\']"\n preserveFragment\n class="btn btn-inverse"\n translate="Cancel"\n ></a>\n <button\n type="submit"\n class="btn btn-success"\n (click)="save.emit()"\n translate="Save"\n [disabled]="!valid"\n requirePermission\n [permissionType]="[\'Edit\', \'Create\']"\n ></button>\n </div>\n</div>\n',styles:[""]}]}],pt.propDecorators={valid:[{type:d.Input}],save:[{type:d.Output}]};var dt=function(){function e(e){this.route=e,this.saveInProgress=!1}return e.prototype.ngOnInit=function(){var e=this;this.route.params.subscribe((function(t){e.formGroup=null;var n=new Ne({});t.id?e.adapter.getService().get(t.id).subscribe((function(t){var r,i;n.addControl("id",new f.FormControl(t.id));try{for(var o=H(Object.keys(t)),a=o.next();!a.done;a=o.next()){var s=a.value;n.addControl(s,new f.FormControl(t[s]))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}e.adapter.setForm(n),e.formGroup=n})):(e.adapter.setForm(n),e.formGroup=n)}))},e.prototype.save=function(){var e=this;this.saveInProgress=!0,this.adapter.getService().save(this.adapter.getValue()).pipe(m.finalize((function(){return e.saveInProgress=!1}))).subscribe((function(t){e.adapter.onSaved(t)}),(function(t){e.formGroup.applyServerErrors(t.error,e.formGroup),e.generalErrors.setErrors(e.formGroup.generalErrors)}))},e}();dt.decorators=[{type:d.Component,args:[{selector:"entity-edit-form",template:'<div class="col-md-8">\n <header class="header-page-bg">\n <h4>{{ title | translate }}</h4>\n </header>\n <div class="panel editor-area hero-unit">\n <form\n class="form-horizontal"\n [formGroup]="formGroup"\n novalidate\n autocomplete="off"\n *ngIf="formGroup"\n >\n <div class="col-md-3"></div>\n <div class="col-md-9">\n <app-general-errors\n #general_errors\n [form]="formGroup"\n ></app-general-errors>\n </div>\n <ng-content></ng-content>\n <entity-edit-buttons-bar\n (save)="save()"\n [valid]="formGroup.valid && formGroup.dirty && !saveInProgress"\n >\n </entity-edit-buttons-bar>\n </form>\n </div>\n</div>\n',styles:[""]}]}],dt.ctorParameters=function(){return[{type:g.ActivatedRoute}]},dt.propDecorators={generalErrors:[{type:d.ViewChild,args:["general_errors"]}],title:[{type:d.Input}],adapter:[{type:d.Input}]};var ft=function(e){function t(t,n){var r=e.call(this,t,n,"")||this;return r.parent=t,r.eref=n,r.data=[],r}return G(t,e),Object.defineProperty(t.prototype,"control",{get:function(){return this.parent.form.get(this.fieldName)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return t.sent(),this.control.setValue((this.data.find((function(t){return t.id===e.control.value}))||this.data[0]).id),[2]}}))}))},t.prototype.getData=function(){var e=this;this.service.getPage(this.filter?{filter:this.filter}:{}).subscribe((function(t){return e.data=t.data}))},t}(W);ft.decorators=[{type:d.Component,args:[{selector:"field-dropdown",template:'<div class="form-group">\n <label\n for="{{ \'_\' + fieldName }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9" *ngIf="control">\n <kendo-dropdownlist\n id="{{ \'_\' + fieldName }}"\n [formControl]="control"\n [data]="data"\n textField="name"\n valueField="id"\n [valuePrimitive]="true"\n >\n </kendo-dropdownlist>\n\n <div class="bg-danger" *ngIf="control.invalid && control.touched">\n <span *ngIf="control.errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="control.errors[\'serverErrorMsg\']">{{\n control.errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],ft.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},ft.propDecorators={service:[{type:d.Input}],rebind:[{type:d.Input}],filter:[{type:d.Input}]};var ht=function(e){function t(t,n){var r=e.call(this,t,n,[])||this;return r.parent=t,r.eref=n,r.data=[],r}return G(t,e),Object.defineProperty(t.prototype,"control",{get:function(){return this.parent.form.get(this.fieldName)},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(){var e=this;this.getData().subscribe((function(t){e.data=t.data,e.control.setValue(e.control.value.filter((function(t){return e.data.filter((function(e){return e.id===t})).length})))}))},t.prototype.getData=function(){return this.service.getPage(this.filter?{filter:this.filter}:{})},t}(W);ht.decorators=[{type:d.Component,args:[{selector:"field-multiselect",template:'<div class="form-group">\n <label\n for="{{ \'_\' + fieldName }}"\n class="col-md-3 control-label"\n translate="{{ labelKey }}"\n ></label>\n <div class="col-md-9" *ngIf="control">\n <kendo-multiselect\n id="{{ \'_\' + fieldName }}"\n [formControl]="control"\n [data]="data"\n [autoClose]="false"\n textField="name"\n valueField="id"\n [valuePrimitive]="true"\n >\n </kendo-multiselect>\n\n <div class="bg-danger" *ngIf="control.invalid && control.touched">\n <span *ngIf="control.errors[\'required\']">{{\n \'Required\' | translate: { param0: labelKey | translate }\n }}</span>\n <span *ngIf="control.errors[\'serverErrorMsg\']">{{\n control.errors[\'serverErrorMsg\']\n }}</span>\n </div>\n </div>\n</div>\n',viewProviders:[{provide:f.ControlContainer,useExisting:f.FormGroupDirective}],styles:[""]}]}],ht.ctorParameters=function(){return[{type:f.FormGroupDirective},{type:d.ElementRef}]},ht.propDecorators={service:[{type:d.Input}],rebind:[{type:d.Input}],filter:[{type:d.Input}]};var gt=function(e){var t="";return Object.keys(e).forEach((function(n){if("object"==typeof e[n]){var r=vt(e[n])?"":JSON.stringify(e[n]);t+=r?n+"="+r+"&":""}else t+=e[n]||0===e[n]?n+"="+e[n]+"&":""})),t.slice(0,-1)},vt=function(e){return null===e||0===Object.keys(e).length},mt=function(e){return isNaN(e)&&!isNaN(Date.parse(e))},yt=function(e){var t={};return e.forEach((function(e,n){var r;t[n]="sort"===n||"group"===n?JSON.parse(e):"filter"===n?(bt(r=JSON.parse(e)),r):e})),t};function bt(e){e.filters.length&&e.filters.forEach((function(e){var t=e;t.value=mt(t.value)?new Date(t.value):t.value;var n=e;n.filters&&bt(n)}))}var wt="name",St=function(){function e(e,t,n){this.translate=e,this.route=t,this.router=n,this.filterChange=new d.EventEmitter,this.gridState={},this.loadings=0,this.selected=[],this.gridFields=[],this.defaultFields=[{name:"name",label:"Name",sortable:!0,position:0}],this.getAllData=this.getAllData.bind(this),this.getRowClass=this.getRowClass.bind(this)}return e.prototype.ngOnChanges=function(e){e.filters&&!e.filters.firstChange&&this.getFilteredData()},e.prototype.ngOnInit=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){return this.gridFields=(this.fields||[]).concat(this.defaultFields).sort((function(e,t){return(e.position||0)-(t.position||0)})),this.filters=this.filters?this.filters:[],this.commands=this.commands?this.commands:[],this.route.fragment.subscribe((function(t){return B(e,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return[4,this.restoreGridState(new URLSearchParams(t))];case 1:return e.sent(),[2]}}))}))})),this.route.firstChild.params.subscribe((function(t){return B(e,void 0,void 0,(function(){return z(this,(function(e){return t.id?this.selected[0]=t.id:this.selected.pop(),[2]}))}))})),[2]}))}))},e.prototype.removeHandler=function(e){var t=this,n=e.dataItem;this.dialog.open(this.translate.instant("Confirmation.Delete")+': "'+n.name+'"?',(function(){return t.remove(n)}))},e.prototype.selectItem=function(e){var t=e.dataItem;this.router.navigate([t.id],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.onActivate=function(e){var t=this;e.saved&&e.saved.subscribe((function(e){return t.updateGrid(e)}))},e.prototype.onDeactivate=function(e){e.saved&&e.saved.unsubscribe()},e.prototype.dataStateChange=function(e){var t=this;Object.keys(e).forEach((function(n){t.gridState[n]=isNaN(e.skip)?t.gridState[n]:e[n]})),this.router.navigate([],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.onSearch=function(e){this.searchTerm=e,this.gridState.skip=0,this.getFilteredData()},e.prototype.getAllData=function(){var e=Object.assign({},this.gridState);return delete e.skip,delete e.take,this.service.getPage(e)},e.prototype.getRowClass=function(e){return this.rowClass&&e?this.rowClass(e.dataItem,e.index):{}},e.prototype.getFilteredData=function(){this.gridState.filter=this.getFilter(),this.router.navigate([],{relativeTo:this.route,fragment:gt(this.gridState)})},e.prototype.updateGrid=function(e){var t=this.page.data.filter((function(t){return t.id===e.id}));t.length?this.page.data[this.page.data.indexOf(t[0])]=e:(this.page.total++,this.page.data.splice(0,0,e),this.page.data.length>this.gridState.take&&this.page.data.splice(this.page.data.length-1,1),this.selected[0]=e.id,this.router.navigate([e.id],{relativeTo:this.route,preserveFragment:!0}))},e.prototype.remove=function(e){return B(this,void 0,void 0,(function(){var t=this;return z(this,(function(n){return this.loadings++,this.service.delete(e.id).subscribe((function(){t.selected.length&&t.selected[t.selected.length-1]===e.id&&t.router.navigate(["../"],{preserveFragment:!0,relativeTo:t.route.firstChild}),t.loadings--})),this.getData(),[2]}))}))},e.prototype.getData=function(){var e=this;this.loadings++,this.service.getPage(this.gridState).subscribe((function(t){e.page=t,e.loadings--}))},e.prototype.getFilter=function(){return{logic:"and",filters:this.searchTerm?K([{field:wt,operator:"contains",value:this.searchTerm}],this.filters):this.filters}},e.prototype.onFilterChange=function(){var e,t=null===(e=this.gridState.filter)||void 0===e?void 0:e.filters.find((function(e){return e.field===wt}));this.searchTerm=null==t?void 0:t.value,this.filterChange.emit(this.gridState.filter)},e.prototype.restoreGridState=function(e){return B(this,void 0,void 0,(function(){var t,n;return z(this,(function(r){return t={sort:this.defaultSort||[{field:wt,dir:"asc"}],skip:0,take:10},n=yt(e),this.gridState=n.hasOwnProperty("take")?n:t,this.onFilterChange(),this.getData(),[2]}))}))},e}();St.decorators=[{type:d.Component,args:[{selector:"entity-list",template:'<div class="row">\n <div class="col-md-4">\n <header class="header-page-bg"></header>\n <div class="panel search-panel hero-unit">\n <div class="header-selection-field">\n <label for="searchinput" class="title-field" translate="Search"></label>\n <input\n kendoTextBox\n class="quick-filter input input-field"\n title=""\n id="searchinput"\n type="text"\n appDebounce\n (debounceKeyup)="onSearch($event.target.value)"\n [ngModel]="searchTerm"\n [debounceTime]="600"\n />\n </div>\n <ng-content></ng-content>\n <div class="divide-line"></div>\n\n <kendo-grid\n [data]="page"\n [pageSize]="gridState.take"\n [skip]="gridState.skip"\n [sort]="gridState.sort"\n [pageable]="true"\n [sortable]="true"\n [style.maxHeight.px]="480"\n (remove)="removeHandler($event)"\n (dataStateChange)="dataStateChange($event)"\n [loading]="loadings > 0"\n (cellClick)="selectItem($event)"\n culture\n class="rows-pointable"\n kendoGridSelectBy="id"\n [selectedKeys]="selected"\n [rowClass]="getRowClass"\n >\n <ng-template kendoGridToolbarTemplate>\n <excel-export-button></excel-export-button>\n </ng-template>\n <kendo-grid-excel [fetchData]="getAllData"></kendo-grid-excel>\n <kendo-grid-command-column width="65">\n <ng-template kendoGridCellTemplate>\n <button\n kendoGridRemoveCommand\n requirePermission\n permissionType="Delete"\n >\n <i class="k-icon glyphicon glyphicon-trash"></i>\n </button>\n </ng-template>\n </kendo-grid-command-column>\n <kendo-grid-column\n *ngFor="let field of gridFields"\n field="{{ field.name }}"\n title="{{ field.label | translate }}"\n [sortable]="field.sortable !== false"\n >\n </kendo-grid-column>\n <kendo-grid-command-column width="65" *ngIf="commands.length > 0">\n <ng-template kendoGridCellTemplate let-dataItem>\n <button\n *ngFor="let command of commands"\n (click)="command.handler(dataItem)"\n title="{{ command.title | translate }}"\n class="k-button"\n >\n <i *ngIf="command.iconClass" class="{{ command.iconClass }}"></i>\n {{ command.name | translate }}\n </button>\n </ng-template>\n </kendo-grid-command-column>\n <ng-template kendoGridNoRecordsTemplate>\n {{ \'Messages.NoRecords\' | translate }}\n </ng-template>\n <ng-template kendoPagerTemplate>\n <kendo-grid-spacer></kendo-grid-spacer>\n <kendo-pager-prev-buttons></kendo-pager-prev-buttons>\n <kendo-pager-numeric-buttons\n [buttonCount]="10"\n ></kendo-pager-numeric-buttons>\n <kendo-pager-next-buttons></kendo-pager-next-buttons>\n <kendo-pager-info></kendo-pager-info>\n </ng-template>\n </kendo-grid>\n </div>\n </div>\n <router-outlet\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n ></router-outlet>\n</div>\n<confirm-dialog #confirmDialog></confirm-dialog>\n',styles:[""]}]}],St.ctorParameters=function(){return[{type:a.TranslateService},{type:g.ActivatedRoute},{type:g.Router}]},St.propDecorators={service:[{type:d.Input}],filters:[{type:d.Input}],fields:[{type:d.Input}],commands:[{type:d.Input}],rowClass:[{type:d.Input}],defaultSort:[{type:d.Input}],filterChange:[{type:d.Output}],dialog:[{type:d.ViewChild,args:["confirmDialog",{static:!0}]}]};var Ct=function(){function e(e){this.translate=e,this.valueChange=new d.EventEmitter}return e.prototype.ngOnInit=function(){return B(this,void 0,void 0,(function(){var e=this;return z(this,(function(t){switch(t.label){case 0:return this.defaultItem={id:null,name:this.translate.instant("All")},[4,this.getData()];case 1:return t.sent(),this.translate.onLangChange.subscribe((function(t){e.defaultItem={id:null,name:e.translate.instant("All")}})),[2]}}))}))},e.prototype.getData=function(){var e=this;this.service.getPage({}).subscribe((function(t){if(e.data=t.data,e.initialSelectedId){var n=e.data.find((function(t){return t.id===e.initialSelectedId}));n&&e.kendoDropDown.writeValue(n)}}))},e.prototype.onValueChange=function(e){this.valueChange.emit(e)},e.prototype.initSelectedId=function(e){this.initialSelectedId=e},e}();Ct.decorators=[{type:d.Component,args:[{selector:"field-dropdownlist",template:'<div class="header-selection-field">\n <label\n for="{{ \'_\' + label }}"\n class="title-field"\n translate="{{ label }}"\n ></label>\n <kendo-dropdownlist\n [data]="data"\n textField="name"\n valueField="id"\n id="{{ \'_\' + label }}"\n (valueChange)="onValueChange($event)"\n [defaultItem]="defaultItem"\n #inputElement\n >\n </kendo-dropdownlist>\n</div>\n',styles:[""]}]}],Ct.ctorParameters=function(){return[{type:a.TranslateService}]},Ct.propDecorators={service:[{type:d.Input}],label:[{type:d.Input}],valueChange:[{type:d.Output}],kendoDropDown:[{type:d.ViewChild,args:["inputElement"]}]};var kt=function(){};kt.decorators=[{type:d.Component,args:[{selector:"excel-export-button",template:'<button type="button" kendoGridExcelCommand>\n <em ngClass="fa fa-file-excel-o"></em>\n {{ \'Buttons.ExcelExport\' | translate }}\n</button>\n',styles:[""]}]}];var Ft=function(){};Ft.decorators=[{type:d.Component,args:[{selector:"footer-bar",template:'<nav class="footer navbar navbar-default navbar-fixed-bottom">\n <div class="container">\n <a class="navbar-brand pull-right" href="http://www.indigina.com/">\n <ng-content></ng-content>\n </a>\n </div>\n</nav>\n',styles:[""]}]}];var xt=function(){function e(e,t){this.route=e,this.router=t,this.opened=!0}return e.prototype.close=function(){var e;this.opened=!1,this.router.navigate([this.callbackPath],{relativeTo:this.route,fragment:null===(e=this.route.snapshot)||void 0===e?void 0:e.fragment})},e}();xt.decorators=[{type:d.Component,args:[{selector:"modal-window",template:'<div class="modal-window window-wrapper">\n <div class="k-overlay" *ngIf="opened" (click)="close()"></div>\n <kendo-window (close)="close()" [height]="830" [width]="800" *ngIf="opened">\n <kendo-window-titlebar>\n <div class="k-window-title"></div>\n <button kendoWindowCloseAction></button>\n </kendo-window-titlebar>\n <ng-content></ng-content>\n </kendo-window>\n</div>\n',styles:[".modal-window{z-index:11002}"]}]}],xt.ctorParameters=function(){return[{type:g.ActivatedRoute},{type:g.Router}]},xt.propDecorators={callbackPath:[{type:d.Input}]};var It=function(){function e(){this.valueChange=new d.EventEmitter,this.showFilter=!0,this.value=[],this.filters=[]}return Object.defineProperty(e.prototype,"ValueKey",{get:function(){return this.valueField?this.valueField:"id"},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.currentData=this.data,this.currentData&&this.currentData.length&&(this.traverseFilters(this.currentFilter),this.value=this.filters.map((function(e){return e.value})),this.showFilter="string"==typeof this.currentData[0].name)},e.prototype.traverseFilters=function(e){var t=e;if(t.filters)for(var n=0;n<t.filters.length;n++){var r=t.filters[n];r.value&&r.field===this.field&&this.filters.push(r),this.traverseFilters(r)}},e.prototype.isItemSelected=function(e){var t=this;return this.value.some((function(n){return n===e[t.ValueKey]}))},e.prototype.onSelectionChange=function(e){var t=this,n=e[this.ValueKey];this.value.some((function(e){return e===n}))?this.value=this.value.filter((function(e){return e!==n})):this.value.push(n),this.filterService.filter({filters:this.value.map((function(e){return{field:t.field,operator:"eq",value:e}})),logic:"or"})},e.prototype.onInput=function(e){var t=this;this.currentData=y.distinct(K(this.currentData.filter((function(e){return t.value.some((function(t){return t===e.id}))})),y.filterBy(this.data,{operator:"contains",field:"name",value:e.target.value})),"name")},e}();It.decorators=[{type:d.Component,args:[{selector:"multicheck-filter",template:'<ul>\n <li *ngIf="showFilter">\n <input class="k-textbox" (input)="onInput($event)" />\n </li>\n <li\n *ngFor="let item of currentData; let i = index"\n (click)="onSelectionChange(item)"\n [ngClass]="{ \'k-state-selected\': isItemSelected(item) }"\n >\n <input\n type="checkbox"\n style="margin-right: 5px"\n id="chk-{{ item.id }}"\n class="k-checkbox"\n [checked]="isItemSelected(item)"\n />\n <label\n class="k-multiselect-checkbox k-checkbox-label"\n for="chk-{{ item.id }}"\n >\n {{ item.name }}\n </label>\n </li>\n</ul>\n',styles:["ul{list-style-type:none;height:200px;overflow-y:scroll;padding-left:0;padding-right:12px}ul>li{padding:8px 12px;border:1px solid rgba(0,0,0,.08);border-bottom:none}ul>li:last-of-type{border-bottom:1px solid rgba(0,0,0,.08)}.k-multiselect-checkbox{pointer-events:none}"]}]}],It.propDecorators={currentFilter:[{type:d.Input}],data:[{type:d.Input}],filterService:[{type:d.Input}],field:[{type:d.Input}],valueField:[{type:d.Input}],valueChange:[{type:d.Output}]};var Tt=function(){function e(){}return e.prototype.toggleButtonClick=function(){document.body.classList.toggle("mini-navbar")},e}();Tt.decorators=[{type:d.Component,args:[{selector:"top-bar",template:'<div id="supply-top-navbar" class="supply-nav-margin">\n <nav class="navbar navbar-static-top white-bg">\n <div class="navbar-header" [style.display]="currentUser != null">\n <button type="button" class="navbar-minimalize minimalize-style-2 btn btn-primary" (click)="toggleButtonClick()">\n <i class="fa fa-bars"></i>\n </button>\n </div>\n <ng-content></ng-content>\n <div id="topBarIcons" class="clearfix" *ngIf="currentUser != null">\n <a [routerLink]="[\'/security/admins\', currentUser.id]" class="message-icons left container-login">\n <span class="fa fa-user" aria-hidden="true"></span>\n <span class="pad5left">{{currentUser.userName}}</span>\n </a>\n <account-menu [user]="currentUser"></account-menu>\n </div>\n </nav>\n</div>\n',styles:[""]}]}],Tt.propDecorators={currentUser:[{type:d.Input}]};var Et,Ot,At,Pt,jt=localStorage,Dt=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:Q,useValue:t},{provide:s.OAuthModuleConfig,useValue:{resourceServer:{allowedUrls:[t.appSettings.apiUrl],sendAccessToken:!0}}},{provide:r.MSAL_INSTANCE,useFactory:tt,deps:[Q]}]}},e}();Dt.decorators=[{type:d.NgModule,args:[{declarations:[Tt,Ft,Xe,Qe,pt,dt,St,ft,ht,Ct,lt,kt,It,it,st,ut,xt,He,Ye],imports:[u.CommonModule,g.RouterModule,ke,s.OAuthModule.forRoot(),T.PopupModule,x.GridModule,x.ExcelModule,I.InputsModule,S.ButtonsModule,k.DialogsModule,u.CommonModule,f.FormsModule,k.WindowModule,k.DialogsModule,f.ReactiveFormsModule,F.DropDownsModule,E.TooltipModule,C.DateInputsModule,r.MsalModule],providers:[{provide:s.OAuthStorage,useValue:jt},{provide:p.HTTP_INTERCEPTORS,useClass:at,multi:!0},Ze,nt,Je,r.MsalService],exports:[Tt,Ft,Xe,Qe,ke,T.PopupModule,s.OAuthModule,F.DropDownsModule,E.TooltipModule,C.DateInputsModule,k.WindowModule,k.DialogsModule,T.PopupModule,x.GridModule,x.ExcelModule,I.InputsModule,S.ButtonsModule,pt,dt,St,ft,ht,Ct,lt,kt,It,it,st,ut,xt,He,r.MsalModule,Ye]}]}],e.FilterTargets=void 0,(Et=e.FilterTargets||(e.FilterTargets={}))[Et.Url=0]="Url",Et[Et.Grid=1]="Grid",e.MemberTypes=void 0,(Ot=e.MemberTypes||(e.MemberTypes={})).Admin="Admin",Ot.User="User",e.Operators=void 0,(At=e.Operators||(e.Operators={})).eq="eq",At.neq="neq",At.isnull="isnull",At.isnotnull="isnotnull",At.lt="lt",At.lte="lte",At.gt="gt",At.gte="gte",At.startswith="startswith",At.endswith="endswith",At.contains="contains",At.doesnotcontain="doesnotcontain",At.isempty="isempty",At.isnotempty="isnotempty",e.PermissionTypes=void 0,(Pt=e.PermissionTypes||(e.PermissionTypes={})).Create="Create",Pt.Delete="Delete",Pt.Edit="Edit",Pt.View="View",Pt.Set="Set";var Mt=function(){function t(){}return t.toGridState=function(t,n){var r,i={filter:{logic:"and",filters:[]}},o={logic:"and",filters:[]};return i.skip=t.skip,i.take=t.take,t.group&&(i.group=t.group),t.sort?i.sort=t.sort:i.sort=[{field:n,dir:"desc"}],t.dateFrom&&o.filters.push({operator:e.Operators.gte,field:n,value:t.dateFrom}),t.dateTo&&o.filters.push({operator:e.Operators.lte,field:n,value:t.dateTo}),null===(r=t.customFilters)||void 0===r||r.forEach((function(t){if(t.filterTarget===e.FilterTargets.Grid)if(t.values&&t.values.length){var n={logic:"or",filters:[]};t.values.forEach((function(e){n.filters.push({operator:t.operator,field:t.field,value:e})})),i.filter.filters.push(n)}else null!==t.value&&void 0!==t.value&&o.filters.push({operator:t.operator,field:t.field,value:t.value})})),o.filters.length&&(i.filter.filters.length?i.filter.filters.push(o):i.filter.filters=o.filters),i},t}(),Nt="filter",Lt=function(){function t(e,t){var n=this;this.route=e,this.router=t,this.defaultFilter={dateTo:null,dateFrom:null,switchToArchive:!1,searchText:"",skip:0,take:10},this.DateFilterStartFieldName="start",this.filterBehavior=new v.BehaviorSubject(this.defaultFilter),this.gridStateBehavior=new v.BehaviorSubject(Mt.toGridState(this.defaultFilter,this.DateFilterStartFieldName)),this.filter$=this.filterBehavior.asObservable(),this.gridState$=this.gridStateBehavior.asObservable(),this.currentFilter=Object.assign({},this.defaultFilter),this.route.fragment.subscribe((function(e){return B(n,void 0,void 0,(function(){var t;return z(this,(function(n){return t=yt(new URLSearchParams(e)),Object.keys(t).some((function(e){return e===Nt}))?(this.currentGridState=t,this.fillCurrentFilter(t)):(this.clearFilter(),this.setTodayDates(),this.currentGridState=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName)),this.filterBehavior.next(this.currentFilter),[2]}))}))})),this.filter$.subscribe((function(e){n.gridStateBehavior.next(Mt.toGridState(e,n.DateFilterStartFieldName))}))}return t.prototype.reset=function(){this.clearFilter(),this.applyFilter(this.currentFilter),this.gridStateBehavior.next(this.currentGridState)},t.prototype.setFilter=function(e){this.currentFilter.skip=0,this.currentFilter=Object.assign(e),this.currentGridState=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName)},t.prototype.applyFilter=function(e){this.setFilter(e),this.stateNavigation(this.prepareFilterToSerialize())},t.prototype.setToday=function(){this.setTodayDates(),this.applyFilter(this.currentFilter)},t.prototype.clearFilter=function(){if(this.currentFilter){var e=Object.assign([],this.currentFilter.customFilters);e.forEach((function(e){e.value=null,e.values&&(e.values=[])})),this.currentFilter=Object.assign({},this.defaultFilter),this.currentFilter.customFilters=e}else this.currentFilter=Object.assign({},this.defaultFilter)},t.prototype.setGridState=function(e){this.currentGridState=e;var t=this.currentFilter,n=t.switchToArchive,r=t.searchText;this.clearFilter(),this.currentFilter=Object.assign(this.currentFilter,{switchToArchive:n,searchText:r}),this.fillCurrentFilter(this.currentGridState),this.stateNavigation(this.currentGridState)},t.prototype.setTodayDates=function(){var e=new Date;this.currentFilter.dateTo=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,0,0,0),this.currentFilter.dateFrom=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0)},t.prototype.stateNavigation=function(e){return B(this,void 0,void 0,(function(){return z(this,(function(t){switch(t.label){case 0:return[4,this.router.navigate([],{relativeTo:this.route,fragment:gt(e)})];case 1:return t.sent()||this.filterBehavior.next(this.currentFilter),[2]}}))}))},t.prototype.prepareFilterToSerialize=function(){var t,n=this,r={};return Object.keys(this.currentFilter).forEach((function(e){"dateTo"!==e&&"dateFrom"!==e&&"customFilters"!==e&&(r[e]=n.currentFilter[e])})),null===(t=this.currentFilter.customFilters)||void 0===t||t.forEach((function(t){t.filterTarget==e.FilterTargets.Url&&(r[t.field]=t.value)})),r.filter=Mt.toGridState(this.currentFilter,this.DateFilterStartFieldName).filter,r},t.prototype.fillCurrentFilter=function(e){var t=this;this.currentFilter.customFilters=[],this.fillFromDescriptor(e.filter),Object.keys(e).forEach((function(n){n!==Nt&&"null"!==n&&"filters"!==n&&(Object.keys(t.currentFilter).some((function(e){return e==n}))?t.currentFilter[n]=e[n]:t.fillUrlFilter(n,e[n]))}))},t.prototype.fillUrlFilter=function(t,n){var r=this.currentFilter.customFilters.findIndex((function(e){return e.field==t}));-1!==r?this.currentFilter.customFilters[r].value=n:this.currentFilter.customFilters.push({field:t,value:n,operator:e.Operators.eq,filterTarget:e.FilterTargets.Url})},t.prototype.fillFromDescriptor=function(t){var n=this;null==t||t.filters.forEach((function(t){var r=t;r.field===n.DateFilterStartFieldName&&r.operator===e.Operators.lte&&(n.currentFilter.dateTo=r.value),r.field===n.DateFilterStartFieldName&&r.operator===e.Operators.gte&&(n.currentFilter.dateFrom=r.value),r.field&&r.field!==n.DateFilterStartFieldName&&n.setFieldFilter({field:r.field,filterTarget:e.FilterTargets.Grid,operator:e.Operators[r.operator],value:r.value});var i=t;i.filters&&n.fillFromDescriptor(i)}))},t.prototype.setFieldFilter=function(e){var t=this.currentFilter.customFilters.findIndex((function(t){return t.field===e.field&&t.operator===e.operator}));if(-1!==t){var n=this.currentFilter.customFilters[t].values,r=this.currentFilter.customFilters[t].value;this.currentFilter.customFilters[t].values=n||[],r&&(this.currentFilter.customFilters[t].values.push(r),this.currentFilter.customFilters[t].value=null),this.currentFilter.customFilters[t].values.push(e.value)}else this.currentFilter.customFilters.push(e)},t}();Lt.decorators=[{type:d.Injectable}],Lt.ctorParameters=function(){return[{type:g.ActivatedRoute},{type:g.Router}]};var Rt=function(){function e(e,t){this.httpService=e,this.endpoints=t}return e.prototype.getPage=function(e){return this.httpService.get(this.endpoints.query(e))},e.prototype.get=function(e){return this.httpService.get(this.endpoints.entityPath(e))},e.prototype.delete=function(e){return this.httpService.delete(this.endpoints.entityPath(e))},e.prototype.save=function(e){return e.id?this.httpService.put(this.endpoints.entityPath(e.id),e):this.httpService.post(this.endpoints.path,e)},e}(),Ut=function(){function e(e){this.service=e,this.saved=new d.EventEmitter}return Object.defineProperty(e.prototype,"adapter",{get:function(){return this},enumerable:!1,configurable:!0}),e.prototype.getValue=function(){return this.form.value},e.prototype.getService=function(){return this.service},e.prototype.setForm=function(e){this.form=e},e.prototype.onSaved=function(e){this.saved.emit(e)},e}(),Vt=A;Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return i.LogLevel}}),Object.defineProperty(e,"OAuthModule",{enumerable:!0,get:function(){return s.OAuthModule}}),Object.defineProperty(e,"OAuthModuleConfig",{enumerable:!0,get:function(){return s.OAuthModuleConfig}}),Object.defineProperty(e,"OAuthService",{enumerable:!0,get:function(){return s.OAuthService}}),Object.defineProperty(e,"OAuthStorage",{enumerable:!0,get:function(){return s.OAuthStorage}}),e.AccountMenuComponent=Xe,e.AccountService=Ze,e.ActivityFilterComponent=st,e.ActivityFilterService=Lt,e.AppSettings=Y,e.AppToastrService=qe,e.AuthProvider=_e,e.AuthProviderResolver=We,e.AzureLoginCallbackComponent=Ye,e.BaseAccountService=De,e.ConfirmDialogComponent=lt,e.CurrentTimezoneComponent=ut,e.DebounceDirective=V,e.EntityEditButtonsBarComponent=pt,e.EntityEditComponent=Ut,e.EntityEditFormComponent=dt,e.EntityListComponent=St,e.EntityService=Rt,e.ExcelExportButtonComponent=kt,e.FieldComponent=W,e.FieldDropdownComponent=ft,e.FieldDropdownlistComponent=Ct,e.FieldInputComponent=J,e.FieldMultiSelectComponent=ht,e.FooterBarComponent=Ft,e.FormGroupWithErrors=Ne,e.GeneralErrorsComponent=X,e.HttpMethods=[{name:"POST",id:"POST"},{name:"PUT",id:"PUT"},{name:"GET",id:"GET"},{name:"DELETE",id:"DELETE"}],e.HttpService=Be,e.IndiginaConfiguration=Q,e.IndiginaModule=ke,e.KendoModule=Dt,e.LanguageSelectorComponent=Qe,e.LiveUpdatesControlComponent=He,e.LocaleSettingsService=te,e.MSALInstanceFactory=tt,e.ModalWindowComponent=xt,e.MulticheckFilterComponent=It,e.NumberInputComponent=Z,e.PermissionsService=nt,e.ReEntrySubscription=Me,e.RequirePermissionDirective=it,e.SettingsService=Ve,e.SideMenuComponent=ie,e.SignalRService=Je,e.TopMenuComponent=Tt,e.TreeViewComponent=we,e.buildActivityEndpoints=function(e){return{query:function(t){return"activities/"+e+"?"+y.toODataString(t,{utcDates:!0}).replace(Oe,"$1")},search:function(t,n){var r="activities/"+e+"/search?"+y.toODataString(t,{utcDates:!0});return n&&(r+="&searchTerm="+n),r},detailedActivity:function(t,n){return n?"activities/"+e+"/"+t+"/"+n:"activities/"+e+"/"+t}}},e.buildEntityEndpoints=Ae,e.endpoints=Ee,e.momentTimezone=Vt,e.urlDeserialize=yt,e.urlSerialize=gt,e.ɵa=Fe,e.ɵb=xe,e.ɵc=Ie,e.ɵd=ne,e.ɵe=le,e.ɵf=ae,e.ɵg=at,Object.keys(n).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})),Object.keys(r).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),Object.keys(o).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})),Object.keys(a).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})})),Object.keys(l).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})})),Object.keys(c).forEach((function(t){"default"===t||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})})),Object.defineProperty(e,"__esModule",{value:!0})}));
17
17
  //# sourceMappingURL=indigina-kendo.umd.min.js.map