PageSourceSearch

https://login-one.de/chunk-TALM73UG.js

js login-one.de collected 2026-10-06 11:20:35 UTC 29,029 bytes, 1 lines download raw bytes

1import{a as ct}from"./chunk-NGGJFR4R.js";import{a as mt}from"./chunk-OACE23BO.js";import{a as dt}from"./chunk-744UA7G4.js";import{a as Je,b as Ze,d as P,e as et,f as tt,g as it,h as nt,i as ot,j as rt,n as at,p as ut}from"./chunk-75ZGI46B.js";import"./chunk-SSGNCS76.js";import{a as Xe}from"./chunk-PTPPBFEY.js";import"./chunk-FQERVR7P.js";import{a as st}from"./chunk-LOU2SUOX.js";import{a as lt,b as pt}from"./chunk-VWUAPGPP.js";import"./chunk-X6LYNCFC.js";import{a as le,b as G,c as we,d as Ie,e as Se,f as ke,g as se}from"./chunk-KEYLHRBJ.js";import"./chunk-5UUZZVZX.js";import"./chunk-B7LUSRDE.js";import{x as Ee}from"./chunk-HIYVYO6O.js";import"./chunk-BTSKBMZG.js";import{f as X,g as R,h as J}from"./chunk-XNRYRHNO.js";import"./chunk-3M3HXQOB.js";import{A as ne,i as Z,k as ee,l as te,m as ie,n as Le,o as Ye,p as Ue,q as ze,r as We,s as He,t as qe,u as Ke,w as je}from"./chunk-GI64JJB2.js";import{c as Me,d as x,e as Ve,f as De,j as Be,l as $e,m as Ne,n as Fe,o as Pe,p as Oe,r as Ae,s as Re,t as Ge}from"./chunk-AEBLGLX6.js";import"./chunk-A747FPVT.js";import{a as Qe}from"./chunk-NUITGORQ.js";import{m as Q}from"./chunk-UVVION6E.js";import{$b as C,Ac as p,Da as _,Ea as f,F as L,Fb as H,H as Y,Ic as q,Jc as K,Kc as V,Lb as A,O as U,Pc as c,Q as fe,Qc as F,Rc as D,U as z,Uc as Te,Vc as ve,Wc as ye,a as M,b as B,bc as g,cd as be,dc as E,ec as w,f as ce,fc as I,ga as he,gc as d,ha as O,hc as r,hd as y,ia as Ce,ic as o,id as b,jc as m,kd as xe,l as $,m as de,mb as ge,nb as a,nc as re,oc as ae,s as me,tc as v,ud as j,va as k,w as N,x as ue,xb as W,y as _e,yc as h}from"./chunk-QVH74DMT.js";var _t=J("business-case-type"),ft=R(_t,n=>n.businessCaseTypes),ht=n=>R(_t,l=>l.businessCaseTypes.filter(e=>!e.ownerInstitutionId||e.ownerInstitutionId===n));var Ct=(n,l)=>e=>{let t=e.value;return!t||+(t.size/1e3**2).toFixed(2)<n?null:{fileSizeValidator:l||!0}},gt=n=>l=>{let e=l.value;if(!e)return null;let t=e.type;return n.includes(t)?null:{fileType:"Nicht unterst\xFCtzter Dateityp."}};function yt(n){return new Promise((l,e)=>{let t=new FileReader;t.onload=i=>l(i.target.result),t.onerror=()=>e(new Error("Failed to read file")),t.readAsDataURL(n)})}function bt(n){return new Promise((l,e)=>{let t=new Image;t.onload=()=>l(t),t.onerror=()=>e(new Error("Failed to load image")),t.src=n})}function Tt(n,l,e){return t=>ce(null,null,function*(){let i=t.value;if(!i)return null;try{let s=yield yt(i),u=yield bt(s);return u.naturalWidth>=n||u.naturalHeight>=l?null:{fileDimension:e||!0}}catch(s){return s}})}var xt=J("tile-group"),oe=R(xt,n=>n.tileGroups);var wt=["pathTypeahead"],It=()=>["name"];function St(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.form.controls.icon.getError("fileSizeValidator"))}}function kt(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.form.controls.icon.getError("fileType"))}}function Mt(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.form.controls.icon.getError("fileDimension"))}}function Vt(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.getErrorMessage(e.form.controls.name.errors))}}function Dt(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.getErrorMessage(e.form.controls.shortDescription.errors))}}function Bt(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p();d("errorMessage",e.getErrorMessage(e.form.controls.description.errors))}}function $t(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p(2);d("errorMessage",e.form.controls.target.getError("invalidTarget"))}}function Nt(n,l){if(n&1&&(r(0,"label",36),c(1,"URL"),o(),m(2,"input",37),C(3,$t,1,1,"app-input-error-message",12)),n&2){let e=p();a(3),g(e.showError(e.form.controls.target)?3:-1)}}function Ft(n,l){if(n&1&&m(0,"app-input-error-message",12),n&2){let e=p(2);d("errorMessage",e.form.controls.target.getError("invalidTarget"))}}function Pt(n,l){n&1&&(r(0,"div",40),m(1,"i",41),c(2,"Pfad ist nur f\xFCr Admins aufrufbar"),o())}function Ot(n,l){n&1&&m(0,"i",41)}function At(n,l){if(n&1&&(C(0,Ot,1,0,"i",41),c(1)),n&2){let e=l.result,t=p(2);g(t.hasAdminGuard(e)?0:-1),a(),D(" ",e.path," ")}}function Rt(n,l){if(n&1){let e=v();r(0,"label",38),c(1,"Pfad"),o(),r(2,"input",39,0),h("selectItem",function(i){_(e);let s=V(3),u=p();return f(u.selectPath(i,s))})("focus",function(i){_(e);let s=p();return f(s.focusPathSearch$.next(i.target.value))})("click",function(i){_(e);let s=p();return f(s.clickPathSearch$.next(i.target.value))}),o(),C(5,Ft,1,1,"app-input-error-message",12),C(6,Pt,3,0,"div",40),A(7,At,2,2,"ng-template",null,1,xe)}if(n&2){let e=V(8),t=p();a(2),d("ngbTypeahead",t.searchPath)("resultFormatter",t.pathFormatter)("resultTemplate",e)("editable",!1)("popperOptions",t.pathPopperOptions),a(3),g(t.showError(t.form.controls.target)?5:-1),a(),g(t.hasAdminGuard(t.selectedPath)?6:-1)}}function Gt(n,l){if(n&1&&(r(0,"option",29),c(1),o()),n&2){let e=l.$implicit,t=p();d("value",e),a(),D(" ",t.TILE_PRIORITY_MAP[e]," ")}}function Lt(n,l){if(n&1&&(r(0,"option",29),c(1),o()),n&2){let e=l.$implicit;d("value",e),a(),F(e)}}function Yt(n,l){if(n&1&&(r(0,"div",5)(1,"label",42),c(2,"Funktionstyp"),o(),m(3,"input",43),o()),n&2){let e=p();a(3),d("value",e.tile.type)}}function Ut(n,l){if(n&1&&(r(0,"option",46),c(1),o()),n&2){let e=l.$implicit;d("ngValue",e),a(),F(e.name)}}function zt(n,l){if(n&1){let e=v();r(0,"div",58),h("click",function(i){let s=_(e).$implicit;return p(2).removeExcludedBy(s),f(i.stopPropagation())}),r(1,"span"),c(2),o(),c(3,"\xA0"),m(4,"i",59),o()}if(n&2){let e=l.$implicit;a(2),F(e.name)}}function Wt(n,l){n&1&&m(0,"i",61)}function Ht(n,l){if(n&1){let e=v();r(0,"div",60),h("click",function(){let i=_(e).$implicit,s=p(2);return f(s.toggleExcludedBy(i))}),C(1,Wt,1,0,"i",61),c(2),o()}if(n&2){let e=l.$implicit;a(),g(e.isSelected?1:-1),a(),D(" ",e.name," ")}}function qt(n,l){if(n&1){let e=v();r(0,"div",5)(1,"label",44),c(2,"Gruppe"),o(),r(3,"select",45)(4,"option",46),c(5,"-- keine --"),o(),w(6,Ut,2,2,"option",46,E),y(8,"async"),o()(),r(9,"div",47),h("openChange",function(i){_(e);let s=V(25),u=p();return f(u.onExcludedByOpen(i,s))}),r(10,"label",48),c(11,"Ausblenden bei Gesch\xE4ftsfalltyp"),o(),r(12,"div",49)(13,"div",50)(14,"div",51),w(15,zt,5,1,"div",52,E),y(17,"async"),o(),m(18,"i",53),o()(),r(19,"div",54),w(20,Ht,3,2,"div",55,E),y(22,"async"),r(23,"div",56)(24,"app-filter",57,2),y(26,"async"),h("filtered",function(i){_(e);let s=p();return f(s.filteredBusinessCaseTypes$.next(i))}),o()()()()}if(n&2){let e=p();a(3),d("compareWith",e.groupCompareFn),a(),d("ngValue",null),a(2),I(b(8,5,e.tileGroups$)),a(3),d("popperOptions",e.popperOptions),a(6),I(b(17,7,e.selectedBusinessCaseTypes$)),a(5),I(b(22,9,e.filteredAndMappedBusinessCaseTypes$)),a(4),d("items",b(26,11,e.businessCaseTypes$))("searchableKeys",be(13,It))}}function Kt(n,l){if(n&1){let e=v();r(0,"button",62),h("click",function(){_(e);let i=p();return f(i.deleteTile())}),c(1,"L\xF6schen"),o()}}var pe=(()=>{class n{constructor(){this.pathTypeahead=j("pathTypeahead"),this.activeModal=k(Le),this.TILE_PRIORITY_MAP=Ie,this.priorityRange=Array(se).fill(null).map((e,t)=>t+1),this.filteredBusinessCaseTypes$=new de([]),this.roles=["INSTITUTION_MEMBER","INSTITUTION_ADMIN"],this.focusPathSearch$=new $,this.clickPathSearch$=new $,this.fb=k(Ae),this.store=k(X),this.renderer=k(W),this.maxLengthName=50,this.maxLengthDescription=255,this.maxLengthShortDescription=50,this.minImageHeight=100,this.minImageWidth=100,this.unsubscribe$=new $,this.maxFileSizeInMB=2,this.searchPath=e=>{let i=e.pipe(U(200),z()),s=this.clickPathSearch$.pipe(Y(()=>!this.pathTypeahead()?.isPopupOpen())),u=this.focusPathSearch$;return L(i,u,s).pipe(N(T=>T===""?this.routes:this.routes.filter(S=>S.path.toLowerCase().indexOf(T.toLowerCase())>-1).slice(0,10)))},this.pathFormatter=e=>e.path.startsWith("/")?e.path:`/${e.path}`,this.popperOptions=e=>B(M({},e),{modifiers:[...e.modifiers,{name:"customPreventOverflow",enabled:!0,phase:"main",requiresIfExists:["offset"],fn({state:t}){let i=t.elements.reference.getBoundingClientRect();t.styles.popper.maxHeight=i.top+"px",t.styles.popper.minWidth="100%"}}]}),this.pathPopperOptions=e=>B(M({},e),{modifiers:[...e.modifiers,{name:"customPreventOverflow",enabled:!0,phase:"main",requiresIfExists:["offset"],fn({state:t}){let i=t.elements.reference.getBoundingClientRect();t.placement.includes("top")&&(t.styles.popper.maxHeight=i.top+"px"),t.placement.includes("bottom")&&(t.styles.popper.maxHeight=`${window.innerHeight-i.top-i.height}px`),t.styles.popper.minWidth="100%",t.styles.popper.overflowY="auto"}}]}),this.mapNestedRoutes=(e,t="")=>{let i=`${t}/${e.path}`;return e.children?.length?e.children.flatMap(s=>this.mapNestedRoutes(s,i)):[B(M({},e),{path:i})]},this.form=this.fb.group({name:["",[x.required,x.maxLength(this.maxLengthName)]],businessCaseType:["",[x.required]],description:["",[x.maxLength(this.maxLengthDescription)]],shortDescription:["",[x.maxLength(this.maxLengthShortDescription)]],target:["",[x.required,this.targetValidator()]],isInternal:[!0,[x.required]],c
1ategory:["",[x.required]],icon:[null,[x.required,this.fileValidator(),this.fileTypeValidator()],[this.fileDimensionValidator()]],role:[this.roles[0],[x.required]],tileGroup:null,priority:[Se,[x.required,x.min(ke),x.max(se)]],excludedByBusinessCaseTypes:[[]]}),this.form.controls.isInternal.valueChanges.pipe(Ce(this.unsubscribe$)).subscribe(()=>this.form.controls.target.reset("")),this.previewTile$=this.form.controls.icon.valueChanges.pipe(O(e=>e instanceof File?new Promise(t=>{let i=new FileReader;i.onload=s=>{t({name:this.form.controls.name.value,icon:s.target.result})},i.readAsDataURL(e)}):me({name:this.form.controls.name.value,icon:e||""}))),this.routes=ut.find(e=>e.path==="").children.flatMap(e=>this.mapNestedRoutes(e))}get headline(){let e=this.tile;if(e)return`${G[e.category]}: ${e.name}`;let t=this.category;return t?`${G[t]}-Definition`:""}get selectedPath(){return this.form.controls.isInternal.value?this.routes.find(e=>e.path===this.form.controls.target.value):null}ngAfterViewInit(){let e=this.tile;e&&(this.form.patchValue(e,{emitEvent:!1}),this.form.controls.icon.updateValueAndValidity());let t=this.category;if(t&&this.form.controls.category.setValue(t),this.form.controls.businessCaseType.setValue(this.businessCaseType.name),this.isDeletable=e&&("id"in e||"fakeId"in e),t==="MARKETING"){this.tileGroups$=this.store.select(oe),this.businessCaseTypes$=this.store.select(ft);let i=this.group;i&&this.form.controls.tileGroup.setValue(i);let s=this.form.controls.excludedByBusinessCaseTypes.valueChanges.pipe(he(this.form.controls.excludedByBusinessCaseTypes.value));this.filteredAndMappedBusinessCaseTypes$=ue([this.filteredBusinessCaseTypes$,s]).pipe(N(([u,T])=>T?.length>0?u.map(S=>T.indexOf(S.id)>-1?B(M({},S),{isSelected:!0}):S):u)),this.selectedBusinessCaseTypes$=s.pipe(O(u=>this.businessCaseTypes$.pipe(N(T=>T.filter(S=>u.includes(S.id))))))}}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}showError(e){return e.invalid&&(e.dirty||e.touched)}updateIcon(e){let t=e.target.files;if(t){let i=t[0],s=this.form.controls.icon;s.setValue(i),s.markAsDirty()}}getErrorMessage(e){if("maxlength"in e){let{requiredLength:t,actualLength:i}=e.maxlength;return`Maximale L\xE4nge von ${t} \xFCberschritten. ${i} angegeben.`}return"required"in e?"Das Feld ist verpflichtend.":"Das Feld ist nicht valide."}selectPath(e,t){e.preventDefault();let i=this.pathFormatter(e.item);this.form.controls.target.setValue(i),this.renderer.setProperty(t,"value",i)}toggleExcludedBy(e){let t=this.form.controls.excludedByBusinessCaseTypes;e.isSelected?t.setValue(t.value.filter(i=>i!==e.id)):t.setValue([...t.value,e.id])}removeExcludedBy(e){let t=this.form.controls.excludedByBusinessCaseTypes;t.setValue([...t.value].filter(i=>i!==e.id))}onExcludedByOpen(e,t){e&&t.input().nativeElement.focus()}saveTile(){if(this.form.valid){let e=this.form.value,t=this.tile;t?this.store.dispatch(P.update({tile:M(M({},t),e)})):this.store.dispatch(P.add({tile:e})),this.activeModal.close()}}deleteTile(){this.isDeletable&&this.store.dispatch(P.delete({tile:this.tile})),this.activeModal.close()}hasAdminGuard(e){return e?.canActivate?.findIndex(t=>t==="isAdminGuard")>-1}groupCompareFn(e,t){return e&&t?e.id===t.id:e===t}targetValidator(){return e=>this.form?.controls.isInternal.value?this.routes.findIndex(t=>e.value===t.path)>-1?null:{invalidTarget:"Kein g\xFCltiger Pfad."}:e.value.match(/^https?:\/\/[^\s/$.?#].\S*$/)?null:{invalidTarget:"Keine g\xFCltige URL."}}fileValidator(){return e=>e.value instanceof File?Ct(this.maxFileSizeInMB,`Das ausgew\xE4hlte Bild ist gr\xF6\xDFer als ${this.maxFileSizeInMB} MB.`)(e):null}fileTypeValidator(){return e=>e.value instanceof File?gt(["image/jpeg","image/png","image/svg+xml"])(e):null}fileDimensionValidator(){return e=>e.value instanceof File?Tt(this.minImageWidth,this.minImageHeight,`Das ausgew\xE4hlte Bild ist kleiner als ${this.minImageWidth}px Breite und ${this.minImageHeight}px H\xF6he.`)(e):Promise.resolve(null)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=H({type:n,selectors:[["app-tile-modal"]],viewQuery:function(t,i){t&1&&q(i.pathTypeahead,wt,5),t&2&&K()},inputs:{category:"category",businessCaseType:"businessCaseType",group:"group",tile:"tile"},decls:64,vars:18,consts:[["pathInput","","pathTypeahead","ngbTypeahead"],["pathTemplate",""],["filter",""],[3,"headline"],["body","",3,"formGroup"],[1,"mb-3"],["for","icon",1,"form-label"],[1,"row","align-item-center"],[1,"col-auto"],["classes","border border-muted",3,"tile"],[1,"col","align-self-center"],["id","icon","type","file","accept","image/jpeg, image/png, image/xml+svg",1,"form-control",3,"change"],[3,"errorMessage"],["for","name",1,"form-label"],["id","name","formControlName","name","type","text",1,"form-control"],["for","shortDe
1scription",1,"form-label"],["id","shortDescription","formControlName","shortDescription","type","text",1,"form-control"],["for","description",1,"form-label"],["id","description","formControlName","description",1,"form-control"],[1,"form-label"],[1,"d-flex"],[1,"form-check","me-3"],["name","isInternal","formControlName","isInternal","type","radio","id","isInternalTrue",1,"form-check-input",3,"value"],["for","isInternalTrue",1,"form-check-label"],[1,"form-check"],["name","isInternal","formControlName","isInternal","type","radio","id","isInternalFalse",1,"form-check-input",3,"value"],["for","isInternalFalse",1,"form-check-label"],["for","priority",1,"form-label"],["name","priority","id","priority","formControlName","priority",1,"form-select"],[3,"value"],["for","role",1,"form-label"],["name","role","id","role","formControlName","role",1,"form-select"],["footer",""],["data-test","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click"],["data-test","delete-button","type","button",1,"btn","btn-danger"],["data-test","confirm-button","type","button",1,"btn","btn-primary",3,"click","disabled"],["for","urlTarget",1,"form-label"],["id","urlTarget","formControlName","target","type","text",1,"form-control"],["for","pathTarget",1,"form-label"],["id","pathTarget","type","text","formControlName","target","placement","top-left",1,"form-control",3,"selectItem","focus","click","ngbTypeahead","resultFormatter","resultTemplate","editable","popperOptions"],[1,"text-muted","fs-6","p-1"],[1,"fa-solid","fa-lock","me-2"],["for","type",1,"form-label"],["type","text","id","type","disabled","",1,"form-control",3,"value"],["for","tileGroup",1,"form-label"],["id","tileGroup","name","tileGroup","formControlName","tileGroup",1,"form-select",3,"compareWith"],[3,"ngValue"],["ngbDropdown","","autoClose","outside","placement","top-left",1,"mb-3",3,"openChange","popperOptions"],["for","excludedBy",1,"form-label"],["id","excludedBy","ngbDropdownToggle","",1,"form-control"],[1,"d-flex","justify-content-between","align-items-center",2,"min-height","24px"],[1,"d-flex","flex-wrap"],[1,"badge","rounded-pill","text-bg-primary","cursor-pointer","me-2","mb-2"],[1,"fa-solid","fa-caret-up"],["ngbDropdownMenu","",1,"overflow-y-auto","pb-0"],["ngbDropdownItem","",1,"position-relative"],[1,"sticky-top","left-0","right-0","bottom-0","py-2","px-4","bg-white"],[3,"filtered","items","searchableKeys"],[1,"badge","rounded-pill","text-bg-primary","cursor-pointer","me-2","mb-2",3,"click"],[1,"fa-regular","fa-circle-xmark"],["ngbDropdownItem","",1,"position-relative",3,"click"],[1,"text-primary-dark","fa-solid","fa-check-circle"],["data-test","delete-button","type","button",1,"btn","btn-danger",3,"click"]],template:function(t,i){t&1&&(r(0,"app-modal-dialog",3),re(1,4),r(2,"div",5)(3,"label",6),c(4,"Icon"),o(),r(5,"div",7)(6,"div",8),m(7,"app-tile-icon",9),y(8,"async"),o(),r(9,"div",10)(10,"input",11),h("change",function(u){return i.updateIcon(u)}),o(),C(11,St,1,1,"app-input-error-message",12),C(12,kt,1,1,"app-input-error-message",12),C(13,Mt,1,1,"app-input-error-message",12),o()()(),r(14,"div",5)(15,"label",13),c(16,"Name"),o(),m(17,"input",14),C(18,Vt,1,1,"app-input-error-message",12),o(),r(19,"div",5)(20,"label",15),c(21,"Beschreibung"),o(),m(22,"input",16),C(23,Dt,1,1,"app-input-error-message",12),o(),r(24,"div",5)(25,"label",17),c(26,"Infotext"),o(),m(27,"textarea",18),C(28,Bt,1,1,"app-input-error-message",12),o(),r(29,"div",5)(30,"div",19),c(31,"Verlinkungstyp"),o(),r(32,"div",20)(33,"div",21),m(34,"input",22),r(35,"label",23),c(36,"interner Link"),o()(),r(37,"div",24),m(38,"input",25),r(39,"label",26),c(40,"externer Link"),o()()()(),r(41,"div",5),C(42,Nt,4,1)(43,Rt,9,7),o(),r(44,"div",5)(45,"label",27),c(46,"Priorit\xE4t"),o(),r(47,"select",28),w(48,Gt,2,2,"option",29,E),o()(),r(50,"div",5)(51,"label",30),c(52,"Sichtbar f\xFCr Benutzerrolle"),o(),r(53,"select",31),w(54,Lt,2,2,"option",29,E),o()(),C(56,Yt,4,1,"div",5),C(57,qt,27,14),ae(),re(58,32),r(59,"button",33),h("click",function(){return i.activeModal.dismiss()}),c(60," Abbrechen "),o(),C(61,Kt,2,0,"button",34),r(62,"button",35),h("click",function(){return i.saveTile()}),c(63," \xDCbernehmen "),o(),ae(),o()),t&2&&(d("headline",i.headline),a(),d("formGroup",i.form),a(6),d("tile",b(8,16,i.previewTile$)),a(4),g(i.form.controls.icon.getError("fileSizeValidator")?11:-1),a(),g(i.form.controls.icon.getError("fileType")?12:-1),a(),g(i.form.controls.icon.getError("fileDimension")?13:-1),a(5),g(i.showError(i.form.controls.name)?18:-1),a(5),g(i.showError(i.form.controls.shortDescription)?23:-1),a(5),g(i.showError(i.form.controls.description)?28:-1),a(6),d("value",!0),a(4),d("value",!1),a(4),g(i.form.controls.isInternal.value?43:42),a(6),I(i.priorityRange),a(6),I(i.roles),a(2),g((i.tile==null?null:i.tile.type)!=null?56:-1),a(),g(i.category==="MARKETING"?57:-1),a(4),g(i.isDeletable?61:-1),a(),d("disabled",i.form.invali
1d||!i.form.dirty))},dependencies:[Xe,Re,Pe,Oe,Me,Fe,Be,Ve,De,Ge,$e,Ne,lt,ct,ne,ie,te,ee,Z,mt,Q],encapsulation:2})}}return n})();var jt=["typeahead"];function Qt(n,l){if(n&1){let e=v();r(0,"div",22),h("click",function(){let i=_(e).$implicit,s=p();return f(s.dismiss(i))}),r(1,"div",26),c(2),o(),r(3,"div"),c(4),o(),r(5,"div"),c(6),o()()}if(n&2){let e=l.$implicit,t=p();a(2),D("",t.OPERATION_TYPE_MAP[e.type],":"),a(2),D("Name: ",e.tile.name),a(2),D("Kategorie: ",t.TILE_CATEGORY_MAP[e.tile.category])}}function Xt(n,l){if(n&1){let e=v();r(0,"div",29)(1,"app-tile",32),h("click",function(){let i=_(e).$implicit,s=p(2);return f(s.editTile(i))}),o()()}if(n&2){let e=l.$implicit;a(),d("tile",e)("isEditor",!0)}}function Jt(n,l){if(n&1){let e=v();r(0,"div",27)(1,"div",6),m(2,"app-page-heading",28),o()(),r(3,"div",5),w(4,Xt,2,2,"div",29,E),y(6,"async"),r(7,"div",29)(8,"div",30),h("click",function(){_(e);let i=p();return f(i.createTile("PRIMARY"))}),m(9,"i",31),o()()()}if(n&2){let e=p();a(4),I(b(6,0,e.primaryTiles$))}}function Zt(n,l){if(n&1){let e=v();r(0,"div",29)(1,"app-tile",32),h("click",function(){let i=_(e).$implicit,s=p(2);return f(s.editTile(i))}),o()()}if(n&2){let e=l.$implicit;a(),d("tile",e)("isEditor",!0)}}function ei(n,l){if(n&1){let e=v();r(0,"div",27)(1,"div",6),m(2,"app-page-heading",33),o()(),r(3,"div",5),w(4,Zt,2,2,"div",29,E),y(6,"async"),r(7,"div",29)(8,"div",30),h("click",function(){_(e);let i=p();return f(i.createTile("FUNCTIONAL"))}),m(9,"i",31),o()()()}if(n&2){let e=p();a(4),I(b(6,0,e.functionalTiles$))}}function ti(n,l){if(n&1){let e=v();r(0,"div",41)(1,"app-marketing-tile",42),h("click",function(){let i=_(e).$implicit,s=p(5);return f(s.editTile(i))}),o()()}if(n&2){let e=l.$implicit;a(),d("tile",e)("isEditor",!0)}}function ii(n,l){if(n&1){let e=v();r(0,"div",27),w(1,ti,2,2,"div",41,E),r(3,"div",29)(4,"div",30),h("click",function(){_(e);let i=p(4);return f(i.createTile("MARKETING"))}),m(5,"i",31),o()()()}if(n&2){let e=p(2),t=p(2);a(),I(e[t.NO_GROUP_KEY])}}function ni(n,l){if(n&1){let e=v();r(0,"div",41)(1,"app-marketing-tile",42),h("click",function(){let i=_(e).$implicit,s=p(6);return f(s.editTile(i))}),o()()}if(n&2){let e=l.$implicit;a(),d("tile",e)("isEditor",!0)}}function oi(n,l){if(n&1){let e=v();r(0,"div",27),w(1,ni,2,2,"div",41,E),r(3,"div",29)(4,"div",30),h("click",function(){_(e);let i=p().$implicit,s=p(4);return f(s.createTile("MARKETING",i))}),m(5,"i",31),o()()()}if(n&2){let e=p().$implicit,t=p(2);a(),I(t[e.name])}}function ri(n,l){if(n&1&&(r(0,"li",37)(1,"button",38),c(2),o(),A(3,oi,6,0,"ng-template",39),o()),n&2){let e=l.$implicit;d("ngbNavItem",e.name),a(2),F(e.name)}}function ai(n,l){if(n&1){let e=v();r(0,"div",27)(1,"div",6)(2,"ul",36,1),ye("activeIdChange",function(i){_(e);let s=p(3);return ve(s.activeGroup,i)||(s.activeGroup=i),f(i)}),r(4,"li",37)(5,"button",38),c(6,"ohne Gruppe"),o(),A(7,ii,6,0,"ng-template",39),o(),w(8,ri,4,2,"li",37,E),o(),m(10,"div",40),o()()}if(n&2){let e=V(3),t=p(3);a(2),Te("activeId",t.activeGroup),a(2),d("ngbNavItem",t.NO_GROUP_KEY),a(4),I(l),a(2),d("ngbNavOutlet",e)}}function li(n,l){if(n&1&&(r(0,"div",34)(1,"div",4)(2,"div",27)(3,"div",6),m(4,"app-page-heading",35),o()(),C(5,ai,11,3,"div",27),y(6,"async"),o()()),n&2){let e,t=p(2);a(5),g((e=b(6,1,t.tileGroups$))?5:-1,e)}}function si(n,l){if(n&1&&(C(0,li,7,3,"div",34),y(1,"async")),n&2){let e,t=p();g((e=b(1,1,t.marketingTilesGrouped$))?0:-1,e)}}var rn=(()=>{class n{constructor(){this.typeahead=j("typeahead"),this.activeGroup=le,this.focusSearch$=new $,this.clickSearch$=new $,this.NO_GROUP_KEY=le,this.OPERATION_TYPE_MAP=we,this.TILE_CATEGORY_MAP=G,this.store=k(X),this.institutionFacade=k(Ee),this.modalService=k(Ye),this.renderer=k(W),this.message="\xC4nderungen wirklich verwerfen?",this.search=e=>{let i=e.pipe(U(200),z()),s=this.clickSearch$.pipe(Y(()=>!this.typeahead()?.isPopupOpen())),u=this.focusSearch$;return L(i,u,s).pipe(_e(T=>this.businessCaseTypes$.pipe(N(S=>T===""?S:S.filter(vt=>vt.name.toLowerCase().indexOf(T.toLowerCase())>-1).slice(0,10)))))},this.formatter=e=>e.name,this.popperOptions=e=>B(M({},e),{modifiers:[...e.modifiers,{name:"customPreventOverflow",enabled:!0,phase:"main",requiresIfExists:["offset"],fn({state:t}){let i=t.elements.reference.getBoundingClientRect();t.styles.popper.maxHeight=`${window.innerHeight-i.top-i.height-8}px`,t.styles.popper.minWidth=`${i.width}px`,t.styles.popper.overflowY="auto"}}]}),this.selectedBusinessCaseType={id:null,name:null,ownerInstitutionId:null}}handleUnload(e){this.operationCount$.pipe(fe(1)).subscribe(t=>{t>0&&e.preventDefault()})}canDeactivate(){return this.operationCount$.pipe(N(e=>e>0?confirm(this.message):!0))}ngOnInit(){this.store.dispatch(Je.load()),this.store.dispatch(at.load()),this.businessCaseTypes$=this.institutionFacade.institution$.pipe(O(e=>this.store.select(ht(e.id)))),this.operationCount$=this.store.select(rt),this.operations$=this.store.select(tt),this.tileGroups$=this.store.select(oe),this.primaryTiles$=this.store.select(it),this.functionalTiles$=this.store.select(nt),this.marketingTilesGrouped$=this.store.select(ot)}selectBusinessCaseType(e,t){e.preventDefault(),this.selectedBusinessCaseType.id!==e.item.id&&(this.selectedBusinessCaseType=e.item,e.item.id&&(this.store.dispatch(Ze.load({businessCaseTypeId:e.item.id})),this.renderer.setProperty(t,"value",e.item.name)))}createTile(e,t){let i=this.modalService.open(pe,{size:"lg"});i.componentInstance.category=e,i.componentInstance.businessCaseType=this.selectedBusinessCaseType,t&&(i.componentInstance.group=t)}editTile(e){let t=this.modalService.open(pe,{size:"lg"});t.componentInstance.category=e.category,t.componentInstance.businessCaseType=this.selectedBusinessCaseType,t.componentInstance.tile=e,t.componentInstance.group=e.tileGroup}save(){this.store.dispatch(et())}dismissAll(){this.store.dispatch(P.discardAllOperations())}dismiss(e){this.store.dispatch(P.discardSpecificOperation({operation:e}))}clear(e){e.value="",this.selectBusinessCaseType({item:{id:null,ownerInstitutionId:null,name:null},preventDefault:()=>{}},e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=H({type:n,selectors:[["app-dashboard-tile-editor"]],viewQuery:function(t,i){t&1&&q(i.typeahead,jt,5),t&2&&K()},hostBindings:function(t,i){t&1&&h("beforeunload",function(u){return i.handleUnload(u)},ge)},decls:43,vars:18,consts:[["bctInput","","typeahead","ngbTypeahead"],["tileGroupTabs","ngbNav"],[1,"bg-dashboard","h-100","d-flex","flex-column","justify-content-between"],[1,"space-2"],[1,"container"],[1,"row","space-bottom-2"],[1,"col-12"],[1,"d-flex","flex-wrap","align-items-baseline","justify-content-between"],[1,"d-flex","align-items-center"],["for","business-case-type",1,"form-label","me-2","mb-0"],[1,"input-group","input-group-sm"],["id","business-case-type","type","text","placeholder","Bitte ausw\xE4hlen...","placement","bottom-left",1,"form-control","form-control-sm",2,"min-width","350px",3,"selectItem","focus","click","ngbTypeahead","resultFormatter","editable","popperOptions"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"fa-regular","fa-circle-xmark"],[1,"form-label","me-2","mb-0"],["ngbDropdown",""],["ngbDropdownToggle","","data-test","dismiss-button","type","button",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"disabled"],[1,"badge","rounded-pill","bg-secondary"],[1,"fa-solid","fa-caret-down","ms-3"],["ngbDropdownMenu",""],["ngbDropdownItem",""],[1,"dropdown-divider","mb-3"],["ngbDropdownItem","",3,"click"],["data-test","save-button","type","button",1,"btn","btn-sm","btn-primary","m-1",3,"click","disabled"],["data-test","primary-tiles",1,"row","space-bottom-2"],["data-test","functional-tiles",1,"row","space-bottom-2"],[1,"fw-bold"],[1,"row"],["content","Partnerkacheln","type","sub-primary"],[1,"col-12","col-md-6","col-xl-4","mb-6"],["data-test","add-tile",1,"d-inline-flex","cursor-pointer","transition-3d-hover","align-items-center","justify-content-center","text-primary","border","border-3","border-primary","rounded-circle",2,"height","88px","width","88px",3,"click"],[1,"fa-solid","fa-plus",2,"font-size","3rem"],[3,"click","tile","isEditor"],["content","Funktionskacheln","type","sub-primary"],[1,"bg-white","space-1"],["content","Marketingkacheln","type","strong","data-test","marketing"],["ngbNav","",1,"nav-tabs",3,"activeIdChange","activeId"],[3,"ngbNavItem"],["ngbNavLink",""],["ngbNavContent",""],[1,"mt-5",3,"ngbNavOutlet"],[1,"col-12","col-md-6","col-xl-4","mb-3"],[1,"d-block","cursor-pointer","transition-3d-hover",3,"click","tile","isEditor"]],template:function(t,i){if(t&1){let s=v();r(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6),m(5,"app-breadcrumbs"),o(),r(6,"div",6)(7,"div",7)(8,"div",8)(9,"label",9),c(10,"Gesch\xE4ftsfalltyp:"),o(),r(11,"div",10)(12,"input",11,0),h("selectItem",function(T){_(s);let S=V(13);return f(i.selectBusinessCaseType(T,S))})("focus",function(T){return _(s),f(i.focusSearch$.next(T.target.value))})("click",function(T){return _(s),f(i.clickSearch$.next(T.target.value))}),o(),r(15,"button",12),h("click",function(){_(s);let T=V(13);return f(i.clear(T))}),m(16,"i",13),o()()(),r(17,"div",8)(18,"div",14),c(19,"\xC4nderungen:"),o(),r(20,"div",15)(21,"button",16),y(22,"async"),c(23," Verwerfen "),r(24,"span",17),c(25),y(26,"async"),o(),m(27,"i",18),o(),r(28,"div",19),w(29,Qt,7,3,"div",20,E),y(31,"async"),m(32,"div",21),r(33,"div",22),h("click",function(){return _(s),f(i.dismissAll())}),c(34,"Alle \xC4nderungen verwerfen"),o()()(),r(35,"button",23),y(36,"async"),h("click",function(){return _(s),f(i.save())}),c(37," Speichern "),o()()()()(),r(38,"div",24),C(39,Jt,10,2),o(),r(40,"div",25),C(41,ei,10,2),o()()(),C(42,si,2,3),o()}t&2&&(a(12),d("ngbTypeahead",i.search)("resultFormatter",i.formatter)("editable",!1)("popperOptions",i.popperOptions),a(9),d("disabled",b(22,10,i.operationCount$)===0),a(4),F(b(26,12,i.operationCount$)),a(4),I(b(31,14,i.operations$)),a(6),d("disabled",b(36,16,i.operationCount$)===0),a(4),g(i.selectedBusinessCaseType.id?39:-1),a(2),g(i.selectedBusinessCaseType.id?41:-1),a(),g(i.selectedBusinessCaseType.id?42:-1))},dependencies:[dt,ne,ie,te,ee,Z,Qe,st,He,We,ze,Ke,qe,Ue,pt,je,Q],encapsulation:2})}}return n})();export{rn as DashboardTileEditorComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.