!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/material/sidenav"),require("rxjs"),require("@angular/material/dialog"),require("@angular/common"),require("@angular/material/button"),require("@angular/material/icon"),require("@ngx-translate/core"),require("@angular/material/snack-bar"),require("@angular/router"),require("@angular/material/card"),require("@angular/animations"),require("rxjs/operators"),require("@angular/material/list"),require("@angular/material/tabs"),require("lodash"),require("@angular/cdk/layout"),require("keycloak-angular"),require("@angular/material/toolbar"),require("@angular/material/menu"),require("@angular/material/radio"),require("@angular/material/progress-spinner"),require("@angular/forms"),require("@angular/material/form-field"),require("@angular/material/input"),require("@angular/common/http"),require("@angular/service-worker"),require("@angular/cdk/scrolling"),require("@angular/material/checkbox")):"function"==typeof define&&define.amd?define("@pirinjs/angular",["exports","@angular/core","@angular/material/sidenav","rxjs","@angular/material/dialog","@angular/common","@angular/material/button","@angular/material/icon","@ngx-translate/core","@angular/material/snack-bar","@angular/router","@angular/material/card","@angular/animations","rxjs/operators","@angular/material/list","@angular/material/tabs","lodash","@angular/cdk/layout","keycloak-angular","@angular/material/toolbar","@angular/material/menu","@angular/material/radio","@angular/material/progress-spinner","@angular/forms","@angular/material/form-field","@angular/material/input","@angular/common/http","@angular/service-worker","@angular/cdk/scrolling","@angular/material/checkbox"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).pirinjs=e.pirinjs||{},e.pirinjs.angular={}),e.ng.core,e.ng.material.sidenav,e.rxjs,e.ng.material.dialog,e.ng.common,e.ng.material.button,e.ng.material.icon,e["@ngx-translate/core"],e.ng.material.snackBar,e.ng.router,e.ng.material.card,e.ng.animations,e.rxjs.operators,e.ng.material.list,e.ng.material.tabs,e.lodash,e.ng.cdk.layout,e["keycloak-angular"],e.ng.material.toolbar,e.ng.material.menu,e.ng.material.radio,e.ng.material.progressSpinner,e.ng.forms,e.ng.material.formField,e.ng.material.input,e.ng.common.http,e.ng.serviceWorker,e.ng.cdk.scrolling,e.ng.material.checkbox)}(this,(function(e,t,n,r,i,a,o,s,l,c,u,p,d,f,m,g,h,v,b,y,x,I,S,C,w,M,_,k,E,P){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var O=function(e,t){return(O=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 j(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}O(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function T(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(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(o,s)}l((r=r.apply(e,t||[])).next())}))}function L(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}Object.create;function B(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.")}Object.create;var R=function(){};function F(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",6),t.ɵɵtext(1,"error"),t.ɵɵelementEnd())}function U(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon"),t.ɵɵtext(1,"info"),t.ɵɵelementEnd())}var A=function(e){function t(t){var n=e.call(this)||this;return n.dialogRef=t,n.error=!1,n}return j(t,e),t.prototype.onNoClick=function(){this.dialogRef.close("x")},t}(R);A.ɵfac=function(e){return new(e||A)(t.ɵɵdirectiveInject(i.MatDialogRef))},A.ɵcmp=t.ɵɵdefineComponent({type:A,selectors:[["pine-info"]],features:[t.ɵɵInheritDefinitionFeature],decls:14,vars:11,consts:[["mat-dialog-title",""],["color","warn",4,"ngIf","ngIfElse"],["noerror",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"dialog-buttons"],["mat-button","","color","primary","cdkFocusInitial","",1,"uppercase",3,"click"],["color","warn"]],template:function(e,n){if(1&e&&(t.ɵɵelementStart(0,"h1",0),t.ɵɵtemplate(1,F,2,0,"mat-icon",1),t.ɵɵtemplate(2,U,2,0,"ng-template",null,2,t.ɵɵtemplateRefExtractor),t.ɵɵtext(4),t.ɵɵpipe(5,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"p"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"div",4),t.ɵɵelementStart(11,"button",5),t.ɵɵlistener("click",(function(){return n.onNoClick()})),t.ɵɵtext(12),t.ɵɵpipe(13,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var r=t.ɵɵreference(3);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.error)("ngIfElse",r),t.ɵɵadvance(3),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(5,5,n.caption),"\n"),t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,7,n.text)),t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(13,9,"action.ok"))}},directives:[i.MatDialogTitle,a.NgIf,i.MatDialogContent,i.MatDialogActions,o.MatButton,s.MatIcon],pipes:[l.TranslatePipe],styles:["h1[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}mat-icon[_ngcontent-%COMP%]{margin-right:12px}"]});var N=function(){function e(e,t,n){this.translate=e,this.snackBar=t,this.dialog=n,this._supportedLanguages=["cs","en"],this._isMobileSubj=new r.BehaviorSubject(!1),this._isTinySubj=new r.BehaviorSubject(!1),this._menuToggleListener=null,this._menuEnabledSubj=new r.BehaviorSubject(!1),this._backIconListener=null,this._backIconSubj=new r.BehaviorSubject(!1),this._refreshIconListener=null,this._refreshIconSubj=new r.BehaviorSubject(!1),this._customIconSubj=new r.BehaviorSubject([]),this._customIconActionSubj=new r.BehaviorSubject(null),this._pageTitleSubj=new r.BehaviorSubject("app"),this._inProgressSubj=new r.BehaviorSubject(!1),this._progressCounter=0,this._isActionsVisibleSubj=new r.BehaviorSubject(!1);var i=localStorage.getItem("lang");i&&this._supportedLanguages.includes(i)||(i="cs"),e.setDefaultLang(i),e.use(i)}return e.prototype.observeIsMobile=function(){return this._isMobileSubj.asObservable()},e.prototype.observeIsTiny=function(){return this._isTinySubj.asObservable()},e.prototype.observeMenuEnabled=function(){return this._menuEnabledSubj.asObservable()},e.prototype.observeBackIconEnabled=function(){return this._backIconSubj.asObservable()},e.prototype.observeRefreshIconEnabled=function(){return this._refreshIconSubj.asObservable()},e.prototype.observeCustomIcons=function(){return this._customIconSubj.asObservable()},e.prototype.observeCustomIconAction=function(){return this._customIconActionSubj.asObservable()},e.prototype.observePageTitle=function(){return this._pageTitleSubj.asObservable()},e.prototype.setMobile=function(e){this._isMobileSubj.next(e)},e.prototype.setTiny=function(e){this._isTinySubj.next(e)},e.prototype.setMenuEnabled=function(e){this._menuEnabledSubj.next(e)},e.prototype.setMenuToggleListener=function(e){this._menuToggleListener=e},e.prototype.toggleMenu=function(){this._menuToggleListener()},e.prototype.setBackIconEnabled=function(e){this._backIconSubj.next(e)},e.prototype.setLanguage=function(e){this._supportedLanguages.includes(e)&&(this.translate.use(e),localStorage.setItem("lang",e))},e.prototype.setBackIconListener=function(e){this._backIconListener=e},e.prototype.back=function(){this._backIconListener&&this._backIconListener()},e.prototype.triggerCustomIconAction=function(e,t){this._customIconActionSubj.next({id:e,event:t})},e.prototype.setRefreshIconEnabled=function(e){this._refreshIconSubj.next(e)},e.prototype.setRefreshIconListener=function(e){this._refreshIconListener=e},e.prototype.refresh=function(){this._refreshIconListener&&this._refreshIconListener()},e.prototype.setCustomIcons=function(e){this._customIcons=e,this._customIconSubj.next(this._customIcons)},e.prototype.setIconVisibility=function(e,t){var n,r;try{for(var i=B(this._customIcons),a=i.next();!a.done;a=i.next()){var o=a.value;if(o.id===e&&o.visible!==t){o.visible=t;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}this._customIconSubj.next(this._customIcons)},e.prototype.setPageTitle=function(e){this._pageTitleSubj.next(e)},e.prototype.observeInProgress=function(){return this._inProgressSubj.asObservable()},e.prototype.setInProgress=function(){this._progressCounter++,1===this._progressCounter&&this._inProgressSubj.next(!0)},e.prototype.clearInProgress=function(e,t){this._progressCounter--,e&&this.showSnackBar(e,t),0===this._progressCounter&&this._inProgressSubj.next(!1)},e.prototype.showSnackBar=function(e,t){var n=this;this.translate.get([e,"action.close"]).subscribe((function(r){t?n.showDialog(r[e],t,!0):n.snackBar.open(r[e],r["action.close"],{duration:2e3})}))},e.prototype.showDialog=function(e,t,n){var r=this.dialog.open(A),i=r.componentInstance;return i.error=n,i.caption=e,i.text=t,r},e.prototype.observeIsActionsVisible=function(){return this._isActionsVisibleSubj.asObservable()},e.prototype.setActionsVisible=function(e){this._isActionsVisibleSubj.next(e)},Object.defineProperty(e.prototype,"actionsComponent",{get:function(){return this._actionsComponent},set:function(e){this._actionsComponent=e},enumerable:!1,configurable:!0}),e}();N.ɵfac=function(e){return new(e||N)(t.ɵɵinject(l.TranslateService),t.ɵɵinject(c.MatSnackBar),t.ɵɵinject(i.MatDialog))},N.ɵprov=t.ɵɵdefineInjectable({token:N,factory:N.ɵfac,providedIn:"root"});var V=function(){function e(e,t,n,r){this.appService=e,this.router=t,this.translateService=n,this.cd=r,this.menuEnabled=!1}return e.prototype.ngOnInit=function(){var e=this;this.updateCurrentLang(this.translateService.currentLang),this.subLang=this.translateService.onLangChange.subscribe((function(t){t&&e.updateCurrentLang(t.lang)})),this.subIsMobile=this.appService.observeIsMobile().subscribe((function(t){e.isMobile=t,e.onIsMobileUpdated()})),this.subIsTiny=this.appService.observeIsTiny().subscribe((function(t){e.isTiny=t,e.onIsTinyUpdated()})),this.appService.setMenuToggleListener((function(){return e.drawer.toggle()}))},e.prototype.ngOnDestroy=function(){this.subLang.unsubscribe(),this.subIsMobile.unsubscribe(),this.subIsTiny.unsubscribe()},e.prototype.onIsMobileUpdated=function(){},e.prototype.onIsTinyUpdated=function(){},e.prototype.onCurrentLangUpdated=function(){},e.prototype.updateCurrentLang=function(e){this.lang=e,this.onCurrentLangUpdated()},e}();V.ɵfac=function(e){return new(e||V)(t.ɵɵdirectiveInject(N),t.ɵɵdirectiveInject(u.Router),t.ɵɵdirectiveInject(l.TranslateService),t.ɵɵdirectiveInject(t.ChangeDetectorRef))},V.ɵcmp=t.ɵɵdefineComponent({type:V,selectors:[["ng-component"]],viewQuery:function(e,r){var i;(1&e&&t.ɵɵstaticViewQuery(n.MatDrawer,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(r.drawer=i.first))},decls:0,vars:0,template:function(e,t){},encapsulation:2});var D=function(){this.authorizedUrl="/home"};D.ɵfac=function(e){return new(e||D)},D.ɵcmp=t.ɵɵdefineComponent({type:D,selectors:[["pirin-public"]],inputs:{authorizedUrl:"authorizedUrl"},decls:1,vars:1,consts:[[3,"authorizedUrl"]],template:function(e,n){1&e&&t.ɵɵelement(0,"pirin-login",0),2&e&&t.ɵɵproperty("authorizedUrl",n.authorizedUrl)},styles:["[_nghost-%COMP%]{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;flex-wrap:nowrap;justify-content:center}pirin-login[_ngcontent-%COMP%]{margin-top:36px;min-width:400px}"]});var q=function(){function e(e){this.route=e,this.loginError=null}return e.prototype.ngOnInit=function(){var e=this;this.route.queryParams.subscribe((function(t){var n=t.error;n&&(e.loginError=n)}))},e.prototype.goBack=function(){window.history.go(-1)},e}();q.ɵfac=function(e){return new(e||q)(t.ɵɵdirectiveInject(u.ActivatedRoute))},q.ɵcmp=t.ɵɵdefineComponent({type:q,selectors:[["pirin-forbidden"]],decls:12,vars:9,consts:[[1,"pi-login-error-area"],[1,"pi-login-error-text","header"],[1,"pi-login-error-text"],["mat-button","","href","##",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-card",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"error_outline"),t.ɵɵelementEnd(),t.ɵɵtext(4),t.ɵɵpipe(5,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",2),t.ɵɵtext(7),t.ɵɵpipe(8,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(9,"a",3),t.ɵɵlistener("click",(function(){return n.goBack()})),t.ɵɵtext(10),t.ɵɵpipe(11,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(5,3,"forbidden.title")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(8,5,"forbidden.detail")),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(11,7,"forbidden.back")))},directives:[p.MatCard,s.MatIcon,o.MatAnchor],pipes:[l.TranslatePipe],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap;justify-content:space-around}mat-card[_ngcontent-%COMP%]{margin-top:24px;max-width:500px;min-width:400px;padding:12px}mat-icon[_ngcontent-%COMP%]{margin-right:12px}.pi-login-error-text[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.pi-login-error-text.header[_ngcontent-%COMP%]{margin-bottom:12px}"]});var $=[d.style({transform:"translate(-400px, 0)",offset:1})],Q=[d.style({transform:"translate(400px, 0)",offset:1})],z=d.trigger("swipeAnimator",[d.transition("* => goRight",d.animate(150,d.keyframes(Q))),d.transition("* => goLeft",d.animate(150,d.keyframes($)))]),G=function(){};G.ɵfac=function(e){return new(e||G)},G.ɵcmp=t.ɵɵdefineComponent({type:G,selectors:[["pirin-home"]],decls:1,vars:0,template:function(e,n){1&e&&t.ɵɵelement(0,"router-outlet")},directives:[u.RouterOutlet],styles:["[_nghost-%COMP%]{align-items:stretch;display:flex;flex-direction:row;flex-grow:0;flex-shrink:1;flex-wrap:nowrap;width:100%}"],data:{animation:[z]}});var H=function(){function e(e){this._nav=e}return e.prototype.getNavForUrl=function(e){var t,n,r=[];try{for(var i=B(this._nav),a=i.next();!a.done;a=i.next()){var o=a.value;r.push(this.getItemWithStatus(e,o))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.getItemWithStatus=function(e,t){var n,r,i={url:t.url,icon:t.icon,label:t.label};if(i.active=e.includes(t.url),t.children&&t.children.length>0){i.children=[];try{for(var a=B(t.children),o=a.next();!o.done;o=a.next()){var s=o.value;i.children.push(this.getItemWithStatus(e,s))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}return i},e}(),K=function(e){return{active:e}};function W(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-list-item",9),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(r);var e=n.$implicit;return t.ɵɵnextContext(3).navigateByUrl(e.url)})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵtext(3),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd()}if(2&e){var i=n.$implicit;t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(5,K,i.active)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(i.icon),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(4,3,i.label)," ")}}function J(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,W,5,7,"mat-list-item",8),t.ɵɵelementContainerEnd()),2&e){var r=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",r.children)}}function Y(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementContainerStart(0),t.ɵɵelementStart(1,"mat-list-item",6),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(r);var e=n.$implicit;return t.ɵɵnextContext().navigateByUrl(e.url)})),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵtext(4),t.ɵɵpipe(5,"translate"),t.ɵɵelementEnd(),t.ɵɵtemplate(6,J,2,1,"ng-container",7),t.ɵɵelementContainerEnd()}if(2&e){var i=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(6,K,i.active&&!i.children)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(i.icon),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(5,4,i.label)," "),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",i.children)}}function X(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-icon"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(r.icon)}}function Z(e,n){1&e&&(t.ɵɵelementStart(0,"mat-tab"),t.ɵɵtemplate(1,X,2,1,"ng-template",11),t.ɵɵelementEnd())}function ee(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-tab-group",10),t.ɵɵlistener("selectedTabChange",(function(e){t.ɵɵrestoreView(r);var n=t.ɵɵnextContext();return n.navigate(n.priNav,e.index)})),t.ɵɵtemplate(1,Z,2,0,"mat-tab",3),t.ɵɵelementEnd()}if(2&e){var i=t.ɵɵnextContext();t.ɵɵproperty("selectedIndex",i.priIndex),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",i.priNav)}}function te(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-icon"),t.ɵɵtext(1),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate(r.icon)}}function ne(e,n){1&e&&(t.ɵɵelementStart(0,"mat-tab"),t.ɵɵtemplate(1,te,2,1,"ng-template",11),t.ɵɵelementEnd())}function re(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-tab-group",12),t.ɵɵlistener("selectedTabChange",(function(e){t.ɵɵrestoreView(r);var n=t.ɵɵnextContext();return n.navigate(n.secNav,e.index)})),t.ɵɵtemplate(1,ne,2,0,"mat-tab",3),t.ɵɵelementEnd()}if(2&e){var i=t.ɵɵnextContext();t.ɵɵproperty("selectedIndex",i.secIndex),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",i.secNav)}}var ie=function(){function e(e,t,n){this.router=e,this.navService=t,this.appService=n,this.priIndex=0,this.secIndex=0,this.priNav=[],this.secNav=[]}return e.prototype.ngOnInit=function(){var e=this;this.subIsMobile=this.appService.observeIsMobile().subscribe((function(t){e.isMobile=t})),this.subRoute=this.router.events.pipe(f.filter((function(e){return e instanceof u.NavigationEnd}))).subscribe((function(){e.updateNav(e.router.url)})),this.updateNav(this.router.url)},e.prototype.ngOnDestroy=function(){this.subIsMobile.unsubscribe(),this.subRoute.unsubscribe()},e.prototype.navigate=function(e,t){return T(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,this.router.navigate([e[t].url])];case 1:return n.sent(),[2]}}))}))},e.prototype.navigateByUrl=function(e){return T(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,this.router.navigate([e])];case 1:return t.sent(),[2]}}))}))},e.prototype.updateNav=function(e){this.priNav=this.navService.getNavForUrl(e),this.secNav=null;for(var t=0;t<this.priNav.length;t++){var n=this.priNav[t];if(n.active){if(n.children){this.secNav=n.children;for(var r=0;r<n.children.length;r++){if(n.children[r].active){this.secIndex=r;break}}}else this.secIndex=-1;this.priIndex=t;break}}},e}();ie.ɵfac=function(e){return new(e||ie)(t.ɵɵdirectiveInject(u.Router),t.ɵɵdirectiveInject(H),t.ɵɵdirectiveInject(N))},ie.ɵcmp=t.ɵɵdefineComponent({type:ie,selectors:[["pirin-home-nav"]],decls:8,vars:5,consts:[[1,"example-container"],["mode","side",3,"opened","disableClose"],[1,"mat-nav-list"],[4,"ngFor","ngForOf"],["mat-stretch-tabs","","backgroundColor","primary","headerPosition","above","class","mat-elevation-z5",3,"selectedIndex","selectedTabChange",4,"ngIf"],["mat-stretch-tabs","","backgroundColor","primary","headerPosition","below","class","mat-elevation-z4",3,"selectedIndex","selectedTabChange",4,"ngIf"],[1,"nav-list-item",3,"ngClass","click"],[4,"ngIf"],["class","nav-list-item child",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"nav-list-item","child",3,"ngClass","click"],["mat-stretch-tabs","","backgroundColor","primary","headerPosition","above",1,"mat-elevation-z5",3,"selectedIndex","selectedTabChange"],["mat-tab-label",""],["mat-stretch-tabs","","backgroundColor","primary","headerPosition","below",1,"mat-elevation-z4",3,"selectedIndex","selectedTabChange"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-drawer-container",0),t.ɵɵelementStart(1,"mat-drawer",1),t.ɵɵelementStart(2,"mat-list",2),t.ɵɵtemplate(3,Y,7,8,"ng-container",3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"mat-drawer-content"),t.ɵɵtemplate(5,ee,2,2,"mat-tab-group",4),t.ɵɵelement(6,"router-outlet"),t.ɵɵtemplate(7,re,2,2,"mat-tab-group",5),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("opened",!n.isMobile)("disableClose",!0),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",n.priNav),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",n.isMobile),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",n.isMobile&&n.secNav))},directives:[n.MatDrawerContainer,n.MatDrawer,m.MatList,a.NgForOf,n.MatDrawerContent,a.NgIf,u.RouterOutlet,m.MatListItem,a.NgClass,s.MatIcon,g.MatTabGroup,g.MatTab,g.MatTabLabel],pipes:[l.TranslatePipe],styles:["[_nghost-%COMP%]{flex-direction:row;flex-grow:1;flex-shrink:1;justify-content:space-around}[_nghost-%COMP%], mat-drawer-content[_ngcontent-%COMP%]{align-items:stretch;display:flex;flex-wrap:nowrap}mat-drawer-content[_ngcontent-%COMP%]{background-color:silver;flex-direction:column;justify-content:flex-start}mat-drawer[_ngcontent-%COMP%]{padding:24px 12px;width:350px}mat-icon[_ngcontent-%COMP%]{margin-right:12px}.nav-list-item.child[_ngcontent-%COMP%]{color:rgba(0,0,0,.66)}.nav-list-item.child[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-left:12px}.nav-list-item.active[_ngcontent-%COMP%]{background-color:silver}"]});var ae=function(e){this.viewContainerRef=e};function oe(e,t){}ae.ɵfac=function(e){return new(e||ae)(t.ɵɵdirectiveInject(t.ViewContainerRef))},ae.ɵdir=t.ɵɵdefineDirective({type:ae,selectors:[["","pirinHost",""]]});var se=function(){function e(e){this.factoryResolver=e}return e.prototype.insertComponent=function(e){var t=this.factoryResolver.resolveComponentFactory(e),n=this.host.viewContainerRef;return n.clear(),n.createComponent(t).instance},e.prototype.clear=function(){this.host.viewContainerRef.clear()},e}();se.ɵfac=function(e){return new(e||se)(t.ɵɵdirectiveInject(t.ComponentFactoryResolver))},se.ɵcmp=t.ɵɵdefineComponent({type:se,selectors:[["pirin-dynamic-host"]],viewQuery:function(e,n){var r;(1&e&&t.ɵɵstaticViewQuery(ae,!0),2&e)&&(t.ɵɵqueryRefresh(r=t.ɵɵloadQuery())&&(n.host=r.first))},decls:1,vars:0,consts:[["pirinHost",""]],template:function(e,n){1&e&&t.ɵɵtemplate(0,oe,0,0,"ng-template",0)},directives:[ae],styles:["[_nghost-%COMP%]{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}"]});var le=function(){function e(e){this._subject=new r.BehaviorSubject(e),this._fallbackValue=e}return e.prototype.observe=function(){return this._subject.asObservable()},e.prototype.get=function(){return this._actualValue},e.prototype.update=function(e){this._actualValue=null!=e?e:this._fallbackValue,this._subject.next(this._actualValue)},e.prototype.clear=function(){this.update(this._fallbackValue)},e}(),ce=function(){function e(e,t,n){var r=this;this.kc=e,this._http=t,this._retrieveProfileUrl=n,this._settings=null,this._profile=null,this._currentUserProfile$=new le,this._currentUserRoles$=new le([]),this._currentUserSettings$=new le,e.keycloakEvents$.subscribe((function(e){return T(r,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return e.type!==b.KeycloakEventType.OnAuthSuccess?[3,3]:(t=this,[4,this.kc.loadUserProfile()]);case 1:return t._profile=r.sent(),this._currentUserProfile$.update(this._profile),this._currentUserRoles$.update(this.kc.getUserRoles(!0)),this.isSettingsSupported()?(n=this,[4,this.retrieveUserSettings(this._profile.username)]):[3,3];case 2:n._settings=r.sent(),this._currentUserSettings$.update(this._settings),r.label=3;case 3:return e.type!==b.KeycloakEventType.OnAuthLogout&&e.type!==b.KeycloakEventType.OnAuthError&&e.type!==b.KeycloakEventType.OnAuthRefreshError&&e.type!==b.KeycloakEventType.OnTokenExpired||(this._currentUserProfile$.clear(),this._currentUserRoles$.clear(),this._currentUserSettings$.clear()),[2]}}))}))}))}return e.prototype.observeCurrentUserProfile=function(){return this._currentUserProfile$.observe()},e.prototype.observeCurrentUserRoles=function(){return this._currentUserRoles$.observe()},e.prototype.observeCurrentUserSettings=function(){return this._currentUserSettings$.observe()},e.prototype.refreshUserSettings=function(){return T(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return this.isSettingsSupported()?(e=this,[4,this.retrieveUserSettings(this._profile.username)]):[3,2];case 1:e._settings=t.sent(),this._currentUserSettings$.update(this._settings),t.label=2;case 2:return[2]}}))}))},e.prototype.retrieveUserSettings=function(e){return T(this,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return console.log(this._retrieveProfileUrl(e)),[4,this._http.get(this._retrieveProfileUrl(e)).toPromise()];case 1:return[2,t.sent()]}}))}))},e.prototype.isSettingsSupported=function(){return!!this._profile&&!!this._retrieveProfileUrl},e}();function ue(e,n){1&e&&(t.ɵɵelementStart(0,"div",24),t.ɵɵelementStart(1,"div"),t.ɵɵelementStart(2,"mat-icon",25),t.ɵɵtext(3,"arrow_back"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd())}function pe(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"a",22),t.ɵɵlistener("click",(function(e){return t.ɵɵrestoreView(r),t.ɵɵnextContext(2).goBack(e)})),t.ɵɵtemplate(1,ue,4,0,"div",23),t.ɵɵelementEnd()}if(2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.logo)}}function de(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",24),t.ɵɵelementStart(1,"div"),t.ɵɵelement(2,"img",26),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext(3);t.ɵɵadvance(2),t.ɵɵproperty("src",r.logo,t.ɵɵsanitizeUrl)}}function fe(e,n){if(1&e&&t.ɵɵtemplate(0,de,3,1,"div",23),2&e){var r=t.ɵɵnextContext(2);t.ɵɵproperty("ngIf",r.logo)}}function me(e,n){1&e&&t.ɵɵelement(0,"mat-spinner",27),2&e&&t.ɵɵproperty("diameter",30)}function ge(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",28),t.ɵɵlistener("click",(function(e){t.ɵɵrestoreView(r);var n=t.ɵɵnextContext().$implicit;return t.ɵɵnextContext(2).iconAction(n.id,e)})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var i=t.ɵɵnextContext().$implicit;t.ɵɵpropertyInterpolate("aria-label",t.ɵɵpipeBind1(1,2,i.label)),t.ɵɵadvance(3),t.ɵɵtextInterpolate(i.icon)}}function he(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,ge,4,4,"button",14),t.ɵɵelementContainerEnd()),2&e){var r=n.$implicit;t.ɵɵadvance(1),t.ɵɵproperty("ngIf",r.visible)}}function ve(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",28),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(r),t.ɵɵnextContext(2).refresh()})),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"refresh"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}2&e&&t.ɵɵpropertyInterpolate("aria-label",t.ɵɵpipeBind1(1,1,"refresh"))}function be(e,n){if(1&e&&(t.ɵɵelementStart(0,"button",29),t.ɵɵpipe(1,"translate"),t.ɵɵelementStart(2,"mat-icon"),t.ɵɵtext(3,"settings"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){t.ɵɵnextContext();var r=t.ɵɵreference(15);t.ɵɵpropertyInterpolate("aria-label",t.ɵɵpipeBind1(1,2,"menu")),t.ɵɵproperty("matMenuTriggerFor",r)}}function ye(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"div",18),t.ɵɵelementStart(1,"div",19),t.ɵɵtext(2),t.ɵɵelementEnd(),t.ɵɵelementStart(3,"button",30),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(r),t.ɵɵnextContext(2).settings()})),t.ɵɵelementStart(4,"mat-icon"),t.ɵɵtext(5,"face"),t.ɵɵelementEnd(),t.ɵɵtext(6),t.ɵɵpipe(7,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(8,"button",30),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(r),t.ɵɵnextContext(2).logout()})),t.ɵɵelementStart(9,"mat-icon"),t.ɵɵtext(10,"exit_to_app"),t.ɵɵelementEnd(),t.ɵɵtext(11),t.ɵɵpipe(12,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var i=t.ɵɵnextContext(2);t.ɵɵadvance(2),t.ɵɵtextInterpolate(i.currentUsername),t.ɵɵadvance(4),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(7,3,"menu.settings")," "),t.ɵɵadvance(5),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(12,5,"menu.logout")," ")}}function xe(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"mat-radio-button",31),t.ɵɵlistener("click",(function(){t.ɵɵrestoreView(r);var e=n.$implicit;return t.ɵɵnextContext(2).setLanguage(e.code)})),t.ɵɵtext(1),t.ɵɵelementEnd()}if(2&e){var i=n.$implicit,a=t.ɵɵnextContext(2);t.ɵɵproperty("value",i.code)("checked",a.currentLang==i.code),t.ɵɵadvance(1),t.ɵɵtextInterpolate(i.name)}}function Ie(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",18),t.ɵɵelementStart(1,"div",32),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext(2);t.ɵɵadvance(2),t.ɵɵtextInterpolate2("",t.ɵɵpipeBind1(3,2,"version"),": ",r.version,"")}}var Se=function(e){return{offset:e}};function Ce(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",6),t.ɵɵtemplate(1,pe,2,1,"a",7),t.ɵɵtemplate(2,fe,1,1,"ng-template",null,8,t.ɵɵtemplateRefExtractor),t.ɵɵelementStart(4,"span",9),t.ɵɵtext(5),t.ɵɵpipe(6,"translate"),t.ɵɵelementEnd(),t.ɵɵelement(7,"div",10),t.ɵɵtemplate(8,me,1,1,"mat-spinner",11),t.ɵɵelement(9,"div",10),t.ɵɵelementStart(10,"span",12),t.ɵɵtemplate(11,he,2,1,"ng-container",13),t.ɵɵtemplate(12,ve,4,3,"button",14),t.ɵɵtemplate(13,be,4,4,"button",15),t.ɵɵelementStart(14,"mat-menu",null,16),t.ɵɵtemplate(16,ye,13,7,"div",17),t.ɵɵelementStart(17,"div",18),t.ɵɵelementStart(18,"div",19),t.ɵɵtext(19),t.ɵɵpipe(20,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(21,"mat-radio-group",20),t.ɵɵtemplate(22,xe,2,3,"mat-radio-button",21),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(23,Ie,4,4,"div",17),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var r=t.ɵɵreference(3),i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.backEnabled)("ngIfElse",r),t.ɵɵadvance(3),t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(16,Se,i.logo)),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(6,12,i.pageTitle)),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",i.inProgress),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",i.customIcons),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.refreshEnabled),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.menuEnabled),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",i.currentUsername),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(20,14,"menu.lang")),t.ɵɵadvance(3),t.ɵɵproperty("ngForOf",i.supportedLanguages),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.version)}}function we(e,n){if(1&e&&(t.ɵɵelementStart(0,"a",35,36),t.ɵɵelementStart(2,"span",37),t.ɵɵtext(3),t.ɵɵpipe(4,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e){var r=n.$implicit,i=t.ɵɵreference(1);t.ɵɵproperty("routerLink",r.path)("active",i.isActive),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(4,3,r.label))}}function Me(e,n){if(1&e&&(t.ɵɵelementStart(0,"nav",33),t.ɵɵtemplate(1,we,5,5,"a",34),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext();t.ɵɵattribute("mat-stretch-tabs",r.mobileQuery.matches?"":null),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",r.navLinks)}}var _e=function(e){return{display:e}},ke=function(){function e(e,t,n,r,i,a,o){var s=this;this.changeDetectorRef=t,this.translateService=n,this.keycloakService=r,this.userService=i,this.appService=a,this.router=o,this.supportedLanguages=[{code:"en",name:"English"},{code:"cs",name:"Česky"}],this.navLinks=[{path:"page1",label:"section.page1",icon:"people"},{path:"page2",label:"section.page2",icon:"business"}],this.tabs=!1,this.inProgress=!1,this.currentLang="",this.currentUsername="",this.customIcons=[],this._mobileQueryListener=function(){s.updateMobile()},this._tinyQueryListener=function(){s.updateTiny()},this.mobileQuery=e.matchMedia("(max-width: 1200px)"),this.tinyQuery=e.matchMedia("(max-width: 600px)"),this.mobileQuery.addListener(this._mobileQueryListener),this.tinyQuery.addListener(this._tinyQueryListener),this.updateMobile(!0),this.updateTiny(!0)}return e.prototype.ngOnInit=function(){var e=this;this.currentLang=this.translateService.currentLang,this.logo=this.appService.logo,this.version=this.appService.version,this.subTitle=this.appService.observePageTitle().subscribe((function(t){e.pageTitle=t})),this.subRefreshEnabled=this.appService.observeRefreshIconEnabled().subscribe((function(t){e.refreshEnabled=t})),this.subMenuEnabled=this.appService.observeMenuEnabled().subscribe((function(t){e.menuEnabled=t})),this.subBackIcon=this.appService.observeBackIconEnabled().subscribe((function(t){e.backEnabled=t})),this.subInProgress=this.appService.observeInProgress().subscribe((function(t){e.inProgress=t})),this.subActions=this.appService.observeIsActionsVisible().subscribe((function(t){e.actionsVisible=t})),this.subCustomIcons=this.appService.observeCustomIcons().subscribe((function(t){e.customIcons=t})),this.subLang=this.translateService.onLangChange.subscribe((function(t){t&&(e.currentLang=t.lang)})),this.subUser=this.userService.observeCurrentUserSettings().subscribe((function(t){t&&t.data?e.currentUsername=h.get(t,["data","firstName"])+" "+h.get(t,["data","familyName"]):e.currentUsername=null}))},e.prototype.ngAfterViewInit=function(){this.appService.actionsComponent=this.actions},e.prototype.ngOnDestroy=function(){this.mobileQuery.removeListener(this._mobileQueryListener),this.tinyQuery.removeListener(this._tinyQueryListener),this.subTitle.unsubscribe(),this.subRefreshEnabled.unsubscribe(),this.subMenuEnabled.unsubscribe(),this.subBackIcon.unsubscribe(),this.subCustomIcons.unsubscribe(),this.subInProgress.unsubscribe(),this.subActions.unsubscribe(),this.subLang.unsubscribe(),this.subUser.unsubscribe(),this.subExpired.unsubscribe()},e.prototype.setLanguage=function(e){this.appService.setLanguage(e)},e.prototype.settings=function(){return T(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,this.router.navigate(["/home/settings"])];case 1:return e.sent(),[2]}}))}))},e.prototype.logout=function(){return T(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,this.keycloakService.logout()];case 1:return e.sent(),[2]}}))}))},e.prototype.fix=function(){return T(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return[4,this.router.navigate(["/home/fix"])];case 1:return e.sent(),[2]}}))}))},e.prototype.goBack=function(e){e.preventDefault(),this.appService.back()},e.prototype.toggleMenu=function(){this.appService.toggleMenu()},e.prototype.refresh=function(){this.appService.refresh()},e.prototype.iconAction=function(e,t){this.appService.triggerCustomIconAction(e,t)},e.prototype.updateMobile=function(e){void 0===e&&(e=!1),this.appService.setMobile(this.mobileQuery.matches),e||this.changeDetectorRef.detectChanges()},e.prototype.updateTiny=function(e){void 0===e&&(e=!1),this.appService.setTiny(this.tinyQuery.matches),e||this.changeDetectorRef.detectChanges()},e}();function Ee(e,n){if(1&e&&(t.ɵɵelementStart(0,"mat-error"),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext().$implicit;t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(2,1,r.text)," ")}}function Pe(e,n){if(1&e&&(t.ɵɵelementContainerStart(0),t.ɵɵtemplate(1,Ee,3,3,"mat-error",9),t.ɵɵelementContainerEnd()),2&e){var r=n.$implicit,i=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵproperty("ngIf",i.formGroup.controls.value.hasError(r.code))}}ke.ɵfac=function(e){return new(e||ke)(t.ɵɵdirectiveInject(v.MediaMatcher),t.ɵɵdirectiveInject(t.ChangeDetectorRef),t.ɵɵdirectiveInject(l.TranslateService),t.ɵɵdirectiveInject(b.KeycloakService),t.ɵɵdirectiveInject(ce),t.ɵɵdirectiveInject(N),t.ɵɵdirectiveInject(u.Router))},ke.ɵcmp=t.ɵɵdefineComponent({type:ke,selectors:[["pirin-app-root"]],viewQuery:function(e,n){var r;(1&e&&t.ɵɵstaticViewQuery(se,!0),2&e)&&(t.ɵɵqueryRefresh(r=t.ɵɵloadQuery())&&(n.actions=r.first))},decls:7,vars:6,consts:[[3,"color"],[1,"tb"],[3,"ngStyle"],["class","noactions",4,"ngIf"],["mat-tab-nav-bar","","mat-align-tabs","center","backgroundColor","primary",4,"ngIf"],[1,"content-area"],[1,"noactions"],["href","#",3,"click",4,"ngIf","ngIfElse"],["noBack",""],[3,"ngClass"],[1,"fill"],[3,"diameter",4,"ngIf"],[1,"tb-icons"],[4,"ngFor","ngForOf"],["mat-icon-button","",3,"aria-label","click",4,"ngIf"],["mat-icon-button","",3,"aria-label","matMenuTriggerFor",4,"ngIf"],["menu","matMenu"],["class","menu-section",4,"ngIf"],[1,"menu-section"],[1,"mat-h4","pri"],[1,"menu-radio-group"],[3,"value","checked","click",4,"ngFor","ngForOf"],["href","#",3,"click"],["class","logo-container",4,"ngIf"],[1,"logo-container"],["color","primary"],["alt","Logo",3,"src"],[3,"diameter"],["mat-icon-button","",3,"aria-label","click"],["mat-icon-button","",3,"aria-label","matMenuTriggerFor"],["mat-menu-item","","role","menuitemradio",3,"click"],[3,"value","checked","click"],[1,"pseudo-mat-h4","pri"],["mat-tab-nav-bar","","mat-align-tabs","center","backgroundColor","primary"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"ngFor","ngForOf"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["rla","routerLinkActive"],[1,"tb-label"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"mat-toolbar",0),t.ɵɵelementStart(1,"div",1),t.ɵɵelement(2,"pirin-dynamic-host",2),t.ɵɵtemplate(3,Ce,24,18,"div",3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵtemplate(4,Me,2,2,"nav",4),t.ɵɵelementStart(5,"div",5),t.ɵɵelement(6,"router-outlet"),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("color",n.actionsVisible?"accent":"primary"),t.ɵɵadvance(2),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(4,_e,n.actionsVisible?"flex":"none")),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",!n.actionsVisible),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.tabs))},directives:[y.MatToolbar,se,a.NgStyle,a.NgIf,u.RouterOutlet,a.NgClass,a.NgForOf,x._MatMenu,I.MatRadioGroup,s.MatIcon,S.MatSpinner,o.MatButton,x.MatMenuTrigger,x.MatMenuItem,I.MatRadioButton,g.MatTabNav,u.RouterLinkWithHref,g.MatTabLink,u.RouterLinkActive],pipes:[l.TranslatePipe],styles:["[_nghost-%COMP%]{align-items:stretch;display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}.noactions[_ngcontent-%COMP%]{align-items:center}.content-area[_ngcontent-%COMP%], .noactions[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}.content-area[_ngcontent-%COMP%]{align-items:stretch}.tb[_ngcontent-%COMP%]{flex-grow:1;flex-shrink:1;min-height:64px}.tb[_ngcontent-%COMP%], .tb-icons[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.tb-icons[_ngcontent-%COMP%]{font-size:1rem}.tb-icon[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;margin-left:12px}.tb-label[_ngcontent-%COMP%]{margin-left:12px;text-transform:uppercase}.menu-section[_ngcontent-%COMP%]{padding:12px}.menu-radio-group[_ngcontent-%COMP%], .menu-section[_ngcontent-%COMP%]{align-items:flex-start;display:flex;flex-direction:column;flex-wrap:nowrap}.menu-radio-group[_ngcontent-%COMP%]{font-size:14px;font-weight:400;padding:0 16px}.offset[_ngcontent-%COMP%]{margin-left:87px}.logo-container[_ngcontent-%COMP%]{-webkit-clip-path:circle(36px at center);align-items:center;clip-path:circle(36px at center);display:flex;flex-direction:row;flex-wrap:nowrap;font-weight:bolder;height:74px;justify-content:center;max-height:74px;max-width:74px;min-height:74px;min-width:74px;position:absolute;top:6px;width:74px;z-index:100}.logo-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{-webkit-clip-path:circle(32px at center);clip-path:circle(32px at center);height:64px;max-height:64px;max-width:64px;min-height:64px;min-width:64px;width:64px}.logo-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{-o-object-fit:contain;-webkit-clip-path:circle(30px at center);clip-path:circle(30px at center);height:60px;margin:2px;max-height:60px;max-width:60px;min-height:60px;min-width:60px;object-fit:contain;overflow:hidden;width:60px}.logo-container[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{font-size:48px;height:48px;margin:8px;max-height:48px;max-width:48px;min-height:48px;min-width:48px;width:48px}.pseudo-mat-h4[_ngcontent-%COMP%]{font:400 15px/24px Roboto,Helvetica Neue,sans-serif}"]});var Oe=function(){function e(e,t){this.fb=e,this.dialogRef=t,this.checkInProgress=!1,this.valueChangeListener=null}return e.prototype.ngOnInit=function(){var e=this;this.formGroup=this.fb.group({value:[this.value,this.validators,this.asyncValidators]}),this.subFormValue=this.formGroup.controls.value.valueChanges.pipe(f.debounceTime(250)).subscribe((function(t){t&&e.valueChangeListener&&(t===e.value?(e.checkInProgress=!1,e.formGroup.controls.value.setErrors(null)):(e.checkInProgress=!0,e.valueChangeListener(t)))}))},e.prototype.ngOnDestroy=function(){this.subFormValue.unsubscribe()},e.prototype.revalidateValue=function(){this.formGroup.controls.value.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this.formGroup.controls.value.markAsTouched({onlySelf:!0})},e.prototype.onNoClick=function(){this.dialogRef.close(null)},e.prototype.onSubmitClick=function(){this.dialogRef.close(this.formGroup.controls.value.value!==this.value?this.formGroup.controls.value.value:null)},e}();function je(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",5),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(r),t.ɵɵnextContext(2).add.emit({})})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2,"add"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}function Te(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",3),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵtemplate(3,je,3,0,"button",4),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext();t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(2,2,r.caption)," "),t.ɵɵadvance(2),t.ɵɵproperty("ngIf",r.canAdd)}}Oe.ɵfac=function(e){return new(e||Oe)(t.ɵɵdirectiveInject(C.FormBuilder),t.ɵɵdirectiveInject(i.MatDialogRef))},Oe.ɵcmp=t.ɵɵdefineComponent({type:Oe,selectors:[["pine-edit-text"]],decls:18,vars:18,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[3,"formGroup"],[1,"flex-line"],["cdkFocusInitial","","matInput","","formControlName","value",3,"placeholder"],[4,"ngFor","ngForOf"],["mat-dialog-actions","",1,"dialog-buttons"],["mat-button","",1,"uppercase",3,"click"],["mat-button","","color","primary",1,"uppercase",3,"disabled","click"],[4,"ngIf"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h1",0),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",1),t.ɵɵelementStart(5,"form",2),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"mat-form-field"),t.ɵɵelement(8,"input",4),t.ɵɵpipe(9,"translate"),t.ɵɵtemplate(10,Pe,2,1,"ng-container",5),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(11,"div",6),t.ɵɵelementStart(12,"button",7),t.ɵɵlistener("click",(function(){return n.onNoClick()})),t.ɵɵtext(13),t.ɵɵpipe(14,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(15,"button",8),t.ɵɵlistener("click",(function(){return n.onSubmitClick()})),t.ɵɵtext(16),t.ɵɵpipe(17,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate2("",t.ɵɵpipeBind1(2,8,"common.edit"),": ",t.ɵɵpipeBind1(3,10,n.caption),""),t.ɵɵadvance(4),t.ɵɵproperty("formGroup",n.formGroup),t.ɵɵadvance(3),t.ɵɵproperty("placeholder",t.ɵɵpipeBind1(9,12,n.caption)),t.ɵɵadvance(2),t.ɵɵproperty("ngForOf",n.errors),t.ɵɵadvance(3),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(14,14,"action.cancel")),t.ɵɵadvance(2),t.ɵɵproperty("disabled",!n.formGroup.valid||n.checkInProgress),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(17,16,"action.accept")))},directives:[i.MatDialogTitle,i.MatDialogContent,C.ɵangular_packages_forms_forms_y,C.NgControlStatusGroup,C.FormGroupDirective,w.MatFormField,M.MatInput,C.DefaultValueAccessor,C.NgControlStatus,C.FormControlName,a.NgForOf,i.MatDialogActions,o.MatButton,a.NgIf,w.MatError],pipes:[l.TranslatePipe],styles:["[_nghost-%COMP%]{max-width:80vw}.flex-line[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}mat-form-field[_ngcontent-%COMP%]{width:100%}"]});var Le=function(e){return{actions:e}},Be=function(e){return{display:e}},Re=function(){this.selection=new Set,this.canAdd=!1,this.add=new t.EventEmitter};Re.ɵfac=function(e){return new(e||Re)},Re.ɵcmp=t.ɵɵdefineComponent({type:Re,selectors:[["pine-section-header"]],viewQuery:function(e,n){var r;(1&e&&t.ɵɵstaticViewQuery(se,!0),2&e)&&(t.ɵɵqueryRefresh(r=t.ɵɵloadQuery())&&(n.actions=r.first))},inputs:{caption:"caption",selection:"selection",canAdd:"canAdd"},outputs:{add:"add"},decls:3,vars:7,consts:[[1,"pi-section-header",3,"ngClass"],[3,"ngStyle"],["class","pi-section-noactions",4,"ngIf"],[1,"pi-section-noactions"],["mat-icon-button","","class","pi-section-side-fab","color","primary",3,"click",4,"ngIf"],["mat-icon-button","","color","primary",1,"pi-section-side-fab",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelement(1,"pirin-dynamic-host",1),t.ɵɵtemplate(2,Te,4,4,"div",2),t.ɵɵelementEnd()),2&e&&(t.ɵɵproperty("ngClass",t.ɵɵpureFunction1(3,Le,n.selection.size>0)),t.ɵɵadvance(1),t.ɵɵproperty("ngStyle",t.ɵɵpureFunction1(5,Be,n.selection.size>0?"flex":"none")),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",0==n.selection.size))},directives:[a.NgClass,se,a.NgStyle,a.NgIf,o.MatButton,s.MatIcon],pipes:[l.TranslatePipe],styles:["[_nghost-%COMP%]{align-items:center}.pi-section-header[_ngcontent-%COMP%], [_nghost-%COMP%]{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}.pi-section-header[_ngcontent-%COMP%]{align-items:stretch;font:400 12px/20px Roboto,Helvetica Neue,sans-serif;margin-bottom:6px;max-height:40px;min-height:40px}.pi-section-noactions[_ngcontent-%COMP%]{align-items:flex-end;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap;justify-content:space-between}"]});var Fe=function(){function e(e){this.translate=e}return e.prototype.transform=function(e,t){return e?r.of(e):this.translate.get(["common.na"]).pipe(f.map((function(e){return e["common.na"]})))},e}();Fe.ɵfac=function(e){return new(e||Fe)(t.ɵɵdirectiveInject(l.TranslateService))},Fe.ɵpipe=t.ɵɵdefinePipe({name:"pirinNa",type:Fe,pure:!0});var Ue=["sectionTemplate"],Ae=function(e,t){return{transparent:e,italic:t}};function Ne(e,n){if(1&e&&(t.ɵɵelementStart(0,"span",6),t.ɵɵtext(1),t.ɵɵpipe(2,"async"),t.ɵɵpipe(3,"pirinNa"),t.ɵɵelementEnd()),2&e){var r=t.ɵɵnextContext();t.ɵɵproperty("ngClass",t.ɵɵpureFunction2(6,Ae,!r.value,!r.value)),t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,2,t.ɵɵpipeBind1(3,4,r.value)))}}function Ve(e,n){1&e&&t.ɵɵelementContainer(0)}function De(e,n){if(1&e){var r=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"button",7),t.ɵɵlistener("click",(function(){return t.ɵɵrestoreView(r),t.ɵɵnextContext().edit.emit({})})),t.ɵɵelementStart(1,"mat-icon"),t.ɵɵtext(2,"edit"),t.ɵɵelementEnd(),t.ɵɵelementEnd()}}var qe=function(){this.canEdit=!1,this.edit=new t.EventEmitter};function $e(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon",9),t.ɵɵtext(1,"help"),t.ɵɵelementEnd())}function Qe(e,n){1&e&&(t.ɵɵelementStart(0,"mat-icon"),t.ɵɵtext(1,"help"),t.ɵɵelementEnd())}function ze(e,n){1&e&&(t.ɵɵelementStart(0,"button",10),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"action.yes")))}function Ge(e,n){1&e&&(t.ɵɵelementStart(0,"button",11),t.ɵɵtext(1),t.ɵɵpipe(2,"translate"),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(2,1,"action.yes")))}qe.ɵfac=function(e){return new(e||qe)},qe.ɵcmp=t.ɵɵdefineComponent({type:qe,selectors:[["pine-section-body"]],contentQueries:function(e,n,r){var i;(1&e&&t.ɵɵstaticContentQuery(r,Ue,!0),2&e)&&(t.ɵɵqueryRefresh(i=t.ɵɵloadQuery())&&(n.sectionTemplate=i.first))},inputs:{value:"value",canEdit:"canEdit"},outputs:{edit:"edit"},decls:7,vars:2,consts:[[1,"pi-section-content"],[1,"pi-spacer"],[1,"fill","mat-h3","bold","no-margin"],["defaultSection",""],[4,"ngTemplateOutlet"],["mat-icon-button","","class","pi-section-side-fab","color","primary",3,"click",4,"ngIf"],[3,"ngClass"],["mat-icon-button","","color","primary",1,"pi-section-side-fab",3,"click"]],template:function(e,n){if(1&e&&(t.ɵɵelementStart(0,"div",0),t.ɵɵelement(1,"div",1),t.ɵɵelementStart(2,"div",2),t.ɵɵtemplate(3,Ne,4,9,"ng-template",null,3,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(5,Ve,1,0,"ng-container",4),t.ɵɵelementEnd(),t.ɵɵtemplate(6,De,3,0,"button",5),t.ɵɵelementEnd()),2&e){var r=t.ɵɵreference(4);t.ɵɵadvance(5),t.ɵɵproperty("ngTemplateOutlet",n.sectionTemplate?n.sectionTemplate:r),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.canEdit)}},directives:[a.NgTemplateOutlet,a.NgIf,a.NgClass,o.MatButton,s.MatIcon],pipes:[a.AsyncPipe,Fe],styles:[".pi-section-content[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;padding-top:12px}.pi-spacer[_ngcontent-%COMP%]{flex:0 0 24px}"]});var He=function(e){function t(t){var n=e.call(this)||this;return n.dialogRef=t,n}return j(t,e),t.prototype.onNoClick=function(){this.dialogRef.close("x")},t}(R);He.ɵfac=function(e){return new(e||He)(t.ɵɵdirectiveInject(i.MatDialogRef))},He.ɵcmp=t.ɵɵdefineComponent({type:He,selectors:[["pine-yes-no"]],features:[t.ɵɵInheritDefinitionFeature],decls:18,vars:13,consts:[["mat-dialog-title",""],["color","warn",4,"ngIf","ngIfElse"],["nowarnicon",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"dialog-buttons"],["mat-button","","color","primary","cdkFocusInitial","",1,"uppercase",3,"click"],[1,"fill"],["class","uppercase","mat-button","","mat-dialog-close","yes","color","warn",4,"ngIf","ngIfElse"],["nowarnbtn",""],["color","warn"],["mat-button","","mat-dialog-close","yes","color","warn",1,"uppercase"],["mat-button","","mat-dialog-close","yes","color","primary",1,"uppercase"]],template:function(e,n){if(1&e&&(t.ɵɵelementStart(0,"h1",0),t.ɵɵtemplate(1,$e,2,0,"mat-icon",1),t.ɵɵtemplate(2,Qe,2,0,"ng-template",null,2,t.ɵɵtemplateRefExtractor),t.ɵɵtext(4),t.ɵɵpipe(5,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(6,"div",3),t.ɵɵelementStart(7,"p"),t.ɵɵtext(8),t.ɵɵpipe(9,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(10,"div",4),t.ɵɵelementStart(11,"button",5),t.ɵɵlistener("click",(function(){return n.onNoClick()})),t.ɵɵtext(12),t.ɵɵpipe(13,"translate"),t.ɵɵelementEnd(),t.ɵɵelement(14,"div",6),t.ɵɵtemplate(15,ze,3,3,"button",7),t.ɵɵtemplate(16,Ge,3,3,"ng-template",null,8,t.ɵɵtemplateRefExtractor),t.ɵɵelementEnd()),2&e){var r=t.ɵɵreference(3),i=t.ɵɵreference(17);t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.warn)("ngIfElse",r),t.ɵɵadvance(3),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(5,7,n.caption),"\n"),t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(9,9,n.text)),t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(13,11,"action.no")),t.ɵɵadvance(3),t.ɵɵproperty("ngIf",n.warn)("ngIfElse",i)}},directives:[i.MatDialogTitle,a.NgIf,i.MatDialogContent,i.MatDialogActions,o.MatButton,s.MatIcon,i.MatDialogClose],pipes:[l.TranslatePipe],styles:["h1[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}mat-icon[_ngcontent-%COMP%]{margin-right:12px}"]});var Ke=function(e){function t(){return e.call(this)||this}return j(t,e),t}(R);Ke.ɵfac=function(e){return new(e||Ke)},Ke.ɵcmp=t.ɵɵdefineComponent({type:Ke,selectors:[["pine-wait"]],features:[t.ɵɵInheritDefinitionFeature],decls:8,vars:7,consts:[["mat-dialog-title",""],[3,"diameter"],["mat-dialog-content",""]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"h1",0),t.ɵɵelement(1,"mat-spinner",1),t.ɵɵtext(2),t.ɵɵpipe(3,"translate"),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"div",2),t.ɵɵelementStart(5,"p"),t.ɵɵtext(6),t.ɵɵpipe(7,"translate"),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵproperty("diameter",20),t.ɵɵadvance(1),t.ɵɵtextInterpolate1(" ",t.ɵɵpipeBind1(3,3,n.caption),"\n"),t.ɵɵadvance(4),t.ɵɵtextInterpolate(t.ɵɵpipeBind1(7,5,n.text)))},directives:[i.MatDialogTitle,S.MatSpinner,i.MatDialogContent],pipes:[l.TranslatePipe],styles:["h1[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;flex-wrap:nowrap}mat-icon[_ngcontent-%COMP%]{margin-right:12px}"]});var We=function(){function e(e){this.vc=e}return e.prototype.ngOnInit=function(){var e={item:this.item,idx:this.idx};this.vc.createEmbeddedView(this.appListItem,e)},e}();We.ɵfac=function(e){return new(e||We)(t.ɵɵdirectiveInject(t.ViewContainerRef))},We.ɵdir=t.ɵɵdefineDirective({type:We,selectors:[["","pirinListItem",""]],inputs:{appListItem:"appListItem",item:"item",idx:"idx"}});var Je=function(){function e(e,t){this.router=e,this.appService=t}return e.prototype.canActivate=function(t,n){var r=this,i=h.get(t,["data","pageTitle"],"app.title"),a=h.get(t,["data","backEnabled"],!1),o=h.get(t,["data","backPath"],null),s=h.get(t,["data","menuEnabled"],!1),l=h.get(t,["data","refreshEnabled"],!1),c=h.get(t,["data","customIcons"],[]);return e.safeCall(i,(function(e){return r.appService.setPageTitle(e)})),e.safeCall(a,(function(e){return r.appService.setBackIconEnabled(e)})),e.safeCall(s,(function(e){return r.appService.setMenuEnabled(e)})),e.safeCall(l,(function(e){return r.appService.setRefreshIconEnabled(e)})),e.safeCall(o,(function(e){return r.appService.setBackIconListener((function(){return r.router.navigate([e])}))})),e.safeCall(c,(function(e){return r.appService.setCustomIcons(e)})),!0},e.safeCall=function(e,t){h.isNil(e)||t(e)},e}();Je.ɵfac=function(e){return new(e||Je)(t.ɵɵinject(u.Router),t.ɵɵinject(N))},Je.ɵprov=t.ɵɵdefineInjectable({token:Je,factory:Je.ɵfac,providedIn:"root"});var Ye=new t.InjectionToken("AppHRef"),Xe=function(e){function t(t,n,r,i){var a=e.call(this,t,n)||this;return a.router=t,a.keycloak=n,a._app=r,a._href=i,a}return j(t,e),t.prototype.isAccessAllowed=function(e,t){return T(this,void 0,void 0,(function(){var n,r=this;return L(this,(function(i){switch(i.label){case 0:return this.authenticated?[3,2]:[4,this.keycloak.login({redirectUri:window.location.origin+this._href+t.url.substring(1)})];case 1:i.sent(),i.label=2;case 2:return(n=e.data.roles)instanceof Array&&0!==n.length?[2,n.some((function(e){return r.roles.includes(e)}))]:[2,!0]}}))}))},t}(b.KeycloakAuthGuard);Xe.ɵfac=function(e){return new(e||Xe)(t.ɵɵinject(u.Router),t.ɵɵinject(b.KeycloakService),t.ɵɵinject(N),t.ɵɵinject(Ye))},Xe.ɵprov=t.ɵɵdefineInjectable({token:Xe,factory:Xe.ɵfac,providedIn:"root"});var Ze=function(){function e(){}return e.prototype.encodeKey=function(e){return encodeURIComponent(e)},e.prototype.encodeValue=function(e){return encodeURIComponent(e)},e.prototype.decodeKey=function(e){return decodeURIComponent(e)},e.prototype.decodeValue=function(e){return decodeURIComponent(e)},e}(),et=function(){function e(e,t,n,i){void 0===i&&(i=20),this.http=e,this.cfg=t,this._updated$=new r.BehaviorSubject({}),this._params=new _.HttpParams({encoder:new Ze}),this._pagingFrom=0,this._pagingCount=20,this._pagingTotal=null,this._pagingAll=!1,this._type=n,this._queryUrl=t.queryUrl,i&&(this._pagingCount=i),this.setParamInternal("from",this._pagingFrom.toString()),this.setParamInternal("count",this._pagingCount.toString())}return e.prototype.withParam=function(e,t){return this.setParamInternal(e,t),this},e.prototype.withoutPaging=function(){return this._pagingAll=!0,this.setParamInternal("all",String(this._pagingAll)),this.clearParamInternal("from"),this.clearParamInternal("count"),this},e.prototype.observeList=function(){var e=this;return this._updated$.asObservable().pipe(f.debounceTime(500),f.switchMap((function(){return e.http.get(e._queryUrl+"/v1/data/list/"+e._type+"?"+e._params.toString())})),f.tap((function(t){e._pagingTotal=t.paging.total})))},e.prototype.getDetail=function(e,t){var n=t?"?tag="+t:"";return this.http.get(this._queryUrl+"/v1/data/detail/"+this._type+"/"+e+n)},e.prototype.refresh=function(){this.update(!0)},e.prototype.nextPage=function(){if(this._pagingAll)throw new Error("Paging is disabled for this query");this._pagingTotal?this._pagingFrom+this._pagingCount<this._pagingTotal&&(this._pagingFrom+=this._pagingCount,this.setParamInternal("from",this._pagingFrom.toString()),this.update(!1)):this.update(!1)},e.prototype.previousPage=function(){if(this._pagingAll)throw new Error("Paging is disabled for this query");this._pagingFrom-this._pagingCount>0&&(this._pagingFrom-=this._pagingCount,this.setParamInternal("from",this._pagingFrom.toString()),this.update(!1))},e.prototype.setPageSize=function(e){if(this._pagingAll)throw new Error("Paging is disabled for this query");this._pagingCount=e,this.setParamInternal("count",this._pagingCount.toString()),this.update(!0)},e.prototype.setParam=function(e,t){this.setParamInternal(e,t.toString()),this.update(!0)},e.prototype.replaceParamValue=function(e,t,n){var r,i;try{for(var a=B(this._params.getAll(e)),o=a.next();!o.done;o=a.next()){var s=o.value;s.includes(n)&&(this._params=this._params.delete(e,s))}}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}this.setParamInternal(e,t.toString()),this.update(!0)},e.prototype.setParams=function(e){var t,n;try{for(var r=B(e),i=r.next();!i.done;i=r.next()){var a=i.value;this.setParamInternal(a.key,a.value.toString())}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.update(!0)},e.prototype.clearParam=function(e){this.clearParamInternal(e),this.update(!0)},e.prototype.clearParams=function(e){var t,n;try{for(var r=B(e),i=r.next();!i.done;i=r.next()){var a=i.value;this.clearParamInternal(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.update(!0)},e.prototype.observeUpdated=function(){return this._updated$.asObservable()},e.prototype.getParams=function(){return this._params},e.prototype.setParamInternal=function(e,t){this._params.has(e)?this._params=this._params.append(e,t.toString()):this._params=this._params.set(e,t.toString())},e.prototype.clearParamInternal=function(e){this._params=this._params.delete(e)},e.prototype.update=function(e){e&&(this._pagingFrom=0,this._params.set("from",this._pagingFrom.toString())),this._updated$.next({})},e}(),tt=function(){function e(e,t,n,r){this.dialog=e,this.translate=t,r.isEnabled&&this.setupAppUpdates(n,r)}return e.prototype.setupAppUpdates=function(e,t){var n=this;console.log("Setting-up auto-update...");var i=e.isStable.pipe(f.first((function(e){return!0===e}))),a=r.interval(36e5);r.concat(i,a).subscribe((function(){console.log("Checking for update"),t.checkForUpdate()})),t.available.subscribe((function(e){console.log("current version is: "+e.current.appData.version),console.log("available version is: "+e.available.appData.version),n.translate.get(["common.wait","update.text"]).subscribe((function(i){var a=n.showDialog(i["common.wait"],i["update.text"]+": "+e.available.appData.version);a.afterClosed().subscribe((function(){t.activateUpdate().then((function(){console.log("Activating...."),document.location.reload()}))})),r.timer(2e3).pipe(f.first()).subscribe((function(){return a.close({})}))}))})),t.activated.subscribe((function(e){console.log("Old version was: "+e.previous.appData.version),console.log("New version is: "+e.current.appData.version)}))},e.prototype.showDialog=function(e,t){var n=this.dialog.open(Ke,{disableClose:!0}),r=n.componentInstance;return r.caption=e,r.text=t,n},e}();function nt(e){return e>9?""+e:"0"+e}tt.ɵfac=function(e){return new(e||tt)(t.ɵɵinject(i.MatDialog),t.ɵɵinject(l.TranslateService),t.ɵɵinject(t.ApplicationRef),t.ɵɵinject(k.SwUpdate))},tt.ɵprov=t.ɵɵdefineInjectable({token:tt,factory:tt.ɵfac,providedIn:"root"});var rt=function(){};rt.ɵmod=t.ɵɵdefineNgModule({type:rt}),rt.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||rt)},imports:[[a.CommonModule,u.RouterModule,C.FormsModule,C.ReactiveFormsModule,_.HttpClientModule,l.TranslateModule,E.ScrollingModule,y.MatToolbarModule,w.MatFormFieldModule,o.MatButtonModule,p.MatCardModule,P.MatCheckboxModule,s.MatIconModule,i.MatDialogModule,n.MatSidenavModule,x.MatMenuModule,I.MatRadioModule,S.MatProgressSpinnerModule,c.MatSnackBarModule,g.MatTabsModule,m.MatListModule,M.MatInputModule,k.ServiceWorkerModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(rt,{declarations:[G,ie,D,q,ke,se,He,A,Ke,Oe,Re,qe,We,ae,Fe],imports:[a.CommonModule,u.RouterModule,C.FormsModule,C.ReactiveFormsModule,_.HttpClientModule,l.TranslateModule,E.ScrollingModule,y.MatToolbarModule,w.MatFormFieldModule,o.MatButtonModule,p.MatCardModule,P.MatCheckboxModule,s.MatIconModule,i.MatDialogModule,n.MatSidenavModule,x.MatMenuModule,I.MatRadioModule,S.MatProgressSpinnerModule,c.MatSnackBarModule,g.MatTabsModule,m.MatListModule,M.MatInputModule,k.ServiceWorkerModule],exports:[G,ie,D,q,ke,se,He,A,Ke,Oe,Re,qe,We,ae,Fe]}),e.APP_HREF=Ye,e.AppComponent=ke,e.CommonComponent=V,e.DynamicHostComponent=se,e.EditTextComponent=Oe,e.ForbiddenComponent=q,e.HomeComponent=G,e.HomeNavComponent=ie,e.InfoComponent=A,e.ListItemDirective=We,e.ObservableProperty=le,e.PirinAppGuard=Je,e.PirinAppService=N,e.PirinAuthorizedGuard=Xe,e.PirinFullParamEncoder=Ze,e.PirinHostDirective=ae,e.PirinModule=rt,e.PirinNaPipe=Fe,e.PirinNavService=H,e.PirinQueryEntityService=et,e.PirinUserService=ce,e.PirinVersionUpdateService=tt,e.PublicComponent=D,e.SectionBodyComponent=qe,e.SectionHeaderComponent=Re,e.WaitComponent=Ke,e.YesNoComponent=He,e.animations=z,e.dateToISOString=function(e){var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return t+"-"+nt(n)+"-"+nt(r)},e.getErrorText=function(e){return e.error.message?e.error.message:e.message?e.message:e.statusText?e.statusText:e||"Unknown error"},e.goLeft=$,e.goRight=Q,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=pirinjs-angular.umd.min.js.map