PageSourceSearch

https://repositoriousco.co/170.b318ba9bc0b97512.js

js repositoriousco.co collected 2026-10-04 17:57:14 UTC 142,600 bytes, 1 lines download raw bytes

1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[170],{84963(re,q,c){"use strict";c.d(q,{O:()=>W});var V=c(96354),A=c(20881),L=c(4093);class W extends A.W{findByHref(N,_=!0,d=!0,...R){return super.findByHref(N,_,d,...R).pipe((0,L.qD)(),(0,V.T)(v=>{if(v.hasFailed)throw new Error("Couldn't retrieve the config");return v}))}findByName(N,_=!0,d=!0,...R){return super.findById(N,_,d,...R)}}},67685(re,q,c){"use strict";c.d(q,{f:()=>b});var V=c(96354),A=c(25558),L=c(96697),W=c(57775),ee=c(81948),N=c(7094),_=c(4093),d=c(90066),R=c(88667),v=c(60796),U=c(88392),h=c(3601),w=c(2615);let b=(()=>{var x;class I extends d.LE{constructor(C,e,S,E,Q){super("entitytypes",C,e,S,E),this.requestService=C,this.rdbService=e,this.objectCache=S,this.halService=E,this.relationshipTypeService=Q,this.findAllData=new R.H(this.linkPath,C,e,S,E,this.responseMsToLive),this.searchData=new v.X(this.linkPath,C,e,S,E,this.responseMsToLive)}getBrowseEndpoint(C,e){return this.halService.getEndpoint(this.linkPath)}getRelationshipTypesEndpoint(C){return this.halService.getEndpoint(this.linkPath).pipe((0,A.n)(e=>this.halService.getEndpoint("relationshiptypes",`${e}/${C}`)))}isLeftType(C,e){return C.leftType.pipe((0,_.yd)(),(0,_.Bo)(),(0,V.T)(S=>S.uuid===e.uuid))}getAllAuthorizedRelationshipType(C={}){return this.searchBy("findAllByAuthorizedCollection",C).pipe((0,_.bD)())}hasMoreThanOneAuthorized(){return this.getAllAuthorizedRelationshipType({elementsPerPage:2,currentPage:1}).pipe((0,V.T)(e=>{let S;return S=!!e.payload&&e.payload.page.length>1,S}))}getAllAuthorizedRelationshipTypeImport(C={}){return this.searchBy("findAllByAuthorizedExternalSource",C).pipe((0,_.bD)())}hasMoreThanOneAuthorizedImport(){return this.getAllAuthorizedRelationshipTypeImport({elementsPerPage:2,currentPage:1}).pipe((0,L.s)(1),(0,V.T)(e=>e?.payload?.totalElements>1))}getEntityTypeRelationships(C,e=!0,S=!0,...E){const Q=this.getRelationshipTypesEndpoint(C);return this.relationshipTypeService.findListByHref(Q,void 0,e,S,...E)}getEntityTypeByLabel(C){return this.halService.getEndpoint(this.linkPath).pipe((0,L.s)(1),(0,A.n)(e=>this.findByHref(e+"/label/"+C)))}findAll(C,e,S,...E){return this.findAllData.findAll(C,e,S,...E)}searchBy(C,e,S,E,...Q){return this.searchData.searchBy(C,e,S,E,...Q)}static#e=x=()=>(this.\u0275fac=function(e){return new(e||I)(w.KVO(h.B),w.KVO(W.o),w.KVO(ee.$),w.KVO(N.Y),w.KVO(U.RelationshipTypeDataService))},this.\u0275prov=w.jDH({token:I,factory:I.\u0275fac,providedIn:"root"}))}return x(),I})()},23932(re,q,c){"use strict";c.d(q,{ROUTES:()=>xs});var V=c(59072),A=c(92307),L=c(12808),W=c(60892),ee=c(38285),N=c(8667),_=c(72200),d=c(2615),R=c(38132),v=c(91029),U=c(87655),h=c(99063),w=c(29968),b=c(68018),x=c(7673),I=c(84572),u=c(96354),C=c(2180),e=c(73664);const S=s=>({active:s}),E=s=>[s];function Q(s,a){if(1&s&&(e.j41(0,"a",13),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const o=e.XpG().$implicit,t=e.XpG(2);e.Y8G("ngClass",e.eq3(7,S,o.page===t.currentPage))("routerLink",e.eq3(9,E,"./"+o.page)),e.BMQ("aria-selected",o.page===t.currentPage)("data-test",o.page),e.R7$(),e.SpI(" ",e.bMT(2,5,"item.edit.tabs."+o.page+".head")," ")}}function qe(s,a){if(1&s&&(e.j41(0,"button",15),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const o=e.XpG().$implicit;e.R7$(),e.SpI(" ",e.bMT(2,1,"item.edit.tabs."+o.page+".head")," ")}}function et(s,a){if(1&s&&(e.j41(0,"li",12),e.nVh(1,Q,3,11,"a",13),e.nI1(2,"async"),e.j41(3,"span",14),e.nI1(4,"translate"),e.nV
1h(5,qe,3,3,"button",15),e.nI1(6,"async"),e.k0s()()),2&s){const o=a.$implicit;e.R7$(),e.vxM(e.bMT(2,3,o.enabled)?1:-1),e.R7$(2),e.Y8G("ngbTooltip",e.bMT(4,5,"item.edit.tabs.disabled.tooltip")),e.R7$(2),e.vxM(!0!==e.bMT(6,7,o.enabled)?5:-1)}}function tt(s,a){if(1&s&&(e.j41(0,"ul",5),e.Z7z(1,et,7,9,"li",12,e.fX1),e.k0s()),2&s){const o=e.XpG();e.R7$(),e.Dyx(o.pages)}}let it=(()=>{var s;class a{constructor(t,i,n){this.route=t,this.router=i,this.injector=n,this.router.events.subscribe(()=>this.initPageParamsByRoute())}ngOnInit(){this.initPageParamsByRoute(),this.pages=this.route.routeConfig.children.filter(t=>(0,h.hj)(t.path)).map(t=>{let i=(0,x.of)(!0);return(0,h.hj)(t.canActivate)&&(i=(0,I.z)(t.canActivate.map(n=>(0,d.N4e)(this.injector,()=>n(this.route.snapshot,this.router.routerState.snapshot)))).pipe((0,u.T)(n=>n.every(l=>!0===l)))),{page:t.path,enabled:i}}),this.itemRD$=this.route.data.pipe((0,u.T)(t=>t.dso))}getItemPage(t){return(0,U._o)(t)}initPageParamsByRoute(){this.currentPage=this.route.snapshot.firstChild.routeConfig.path}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(d.zZn))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-edit-item-page"]],decls:18,vars:10,consts:[[1,"container"],[1,"row"],[1,"col-12"],[1,"border-bottom"],[1,"pt-2"],["role","tablist",1,"nav","nav-tabs","justify-content-start"],[1,"tab-pane","active"],[1,"mb-4"],[1,"button-row","bottom"],[1,"text-end"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-arrow-left"],["role","presentation",1,"nav-item"],["role","tab",1,"nav-link",3,"ngClass","routerLink"],[3,"ngbTooltip"],[1,"nav-link","disabled"]],template:function(i,n){if(1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div",4),e.nVh(7,tt,3,0,"ul",5),e.j41(8,"div",6)(9,"div",7),e.nrm(10,"router-outlet"),e.k0s(),e.j41(11,"div",8)(12,"div",9)(13,"a",10),e.nI1(14,"async"),e.nrm(15,"i",11),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()()()()()()),2&i){let l;e.R7$(4),e.JRh(e.bMT(5,4,"item.edit.head")),e.R7$(3),e.vxM(n.pages.length>0?7:-1),e.R7$(6),e.Y8G("routerLink",n.getItemPage(null==(l=e.bMT(14,6,n.itemRD$))?null:l.payload)),e.R7$(3),e.SpI(" ",e.bMT(17,8,"item.edit.return"))}},dependencies:[w.md,_.YU,R.Wk,v.n3,b.h,_.Jj,b.D9],encapsulation:2,data:{animation:[C.qG,C.Ws]},changeDetection:0}))}return s(),a})();var H=c(55743),m=c(4093),nt=c(21200);function st(s,a){1&s&&e.nrm(0,"ds-access-control-form-container",0),2&s&&e.Y8G("itemRD",a)("showLimitToSpecificBitstreams",!0)}let ot=(()=>{var s;class a{constructor(t){this.route=t}ngOnInit(){this.itemRD$=this.route.parent.parent.data.pipe((0,u.T)(t=>t.dso)).pipe((0,m.yd)())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-access-control"]],decls:2,vars:3,consts:[["titleMessage","item-access-control-title",3,"itemRD","showLimitToSpecificBitstreams"]],template:function(i,n){if(1&i&&(e.nVh(0,st,1,2,"ds-access-control-form-container",0),e.nI1(1,"async")),2&i){let l;e.vxM((l=e.bMT(1,1,n.itemRD$))?0:-1,l)}},dependencies:[nt.o,_.Jj],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}"]}))}return s(),a})();var te=c(43446),ue=c(8177),Re=c(58956),X=c(16808),at=c(48125),Se=c.n(at),T=c(84412),Y=c(5964),be=c(73028),Be=c(99437),M=c(96697),fe=c(64972),ce=c(74082),lt=c(80781);function rt(s,a){if(1&s&&e.nrm(0,"ds-resource-policies",4),2&s){const o=a.$implicit;
1e.Y8G("resourceType","bitstream")("resourceUUID",o.id)("resourceName",o.name)}}function ct(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",3)(1,"button",9),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2).$implicit,n=e.XpG();return d.Njj(n.onBitstreamsLoad(i))}),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&s&&(e.R7$(2),e.JRh(e.bMT(3,1,"collection.edit.item.authorizations.load-more-button")))}function dt(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",5)(1,"div",6)(2,"button",7),e.bIt("click",function(){d.eBV(o);const i=e.XpG().$implicit,n=e.XpG();return d.Njj(n.collapseArea(i.id))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"div",8),e.Z7z(6,rt,1,3,"ds-resource-policies",4,e.fX1),e.nI1(8,"async"),e.nVh(9,ct,4,3,"div",3),e.k0s()()}if(2&s){const o=e.XpG().$implicit,t=e.XpG();e.R7$(2),e.BMQ("aria-expanded",!1)("aria-controls",o.id),e.R7$(),e.Lme(" ",e.bMT(4,7,"collection.edit.item.authorizations.show-bitstreams-button")," ",t.nameService.getName(o)," "),e.R7$(2),e.Y8G("id",o.id)("ngbCollapse",t.bundleBitstreamsMap.get(o.id).isCollapsed),e.R7$(),e.Dyx(e.bMT(8,9,t.bundleBitstreamsMap.get(o.id).bitstreams)),e.R7$(3),e.vxM(t.bundleBitstreamsMap.get(o.id).allBitstreamsLoaded?-1:9)}}function pt(s,a){if(1&s&&(e.nrm(0,"ds-resource-policies",4),e.nV
1h(1,dt,10,11,"div",5),e.nI1(2,"async")),2&s){let o;const t=a.$implicit,i=e.XpG();e.Y8G("resourceType","bundle")("resourceUUID",t.id)("resourceName",t.name),e.R7$(),e.vxM((null==(o=e.bMT(2,4,null==(o=i.bundleBitstreamsMap.get(t.id))?null:o.bitstreams))?null:o.length)>0?1:-1)}}function mt(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",3)(1,"button",9),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.onBundleLoad())}),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&s&&(e.R7$(2),e.JRh(e.bMT(3,1,"collection.edit.item.authorizations.load-bundle-button")))}let ht=(()=>{var s;class a{constructor(t,i,n){this.linkService=t,this.route=i,this.nameService=n,this.bundleBitstreamsMap=new Map,this.bundles$=new T.t([]),this.subs=[],this.bundlesPerPage=6,this.bundlesPageSize=1,this.allBundlesLoaded=!1,this.bitstreamSize=4,this.bitstreamPageSize=4,this.AlertType=ce.v}ngOnInit(){this.getBundlesPerItem(),this.itemName$=this.getItemName()}getItemName(){return this.item$.pipe((0,u.T)(t=>this.nameService.getName(t)))}getBundlesPerItem(t=1){this.item$=this.route.data.pipe((0,u.T)(n=>n.dso),(0,m.QQ)(),(0,u.T)(n=>this.linkService.resolveLink(n,(0,X.s)("bundles",{findListOptions:{currentPage:t,elementsPerPage:this.bundlesPerPage}},(0,X.s)("bitstreams")))));const i=this.item$.pipe((0,Y.p)(n=>(0,h.hj)(n.bundles)),(0,be.Z)(n=>n.bundles),(0,m.QQ)(),(0,Be.W)(n=>(console.error(n),(0,x.of)((0,Re.g)(null,[])))));this.subs.push(i.pipe((0,M.s)(1),(0,u.T)(n=>n.page)).subscribe(n=>{(Se()(n.length,0)||n.length<this.bundlesPerPage)&&(this.allBundlesLoaded=!0),Se()(t,1)?this.bundles$.next(n):this.bundles$.next(this.bundles$.getValue().concat(n))}),i.pipe((0,M.s)(1),(0,be.Z)(n=>n.page),(0,u.T)(n=>({id:n.id,bitstreams:this.getBundleBitstreams(n)}))).subscribe(n=>{const l={isCollapsed:!0,allBitstreamsLoaded:!1,bitstreams:null};l.bitstreams=n.bitstreams.pipe((0,u.T)(r=>(l.allBitstreamsLoaded=r?.page.length<this.bitstreamSize,[...r.page.slice(0,this.bitstreamSize)]))),this.bundleBitstreamsMap.set(n.id,l)}))}getBundleBitstreams(t){return t.bitstreams.pipe((0,m.ak)(),(0,Be.W)(i=>(console.error(i),(0,x.of)((0,Re.g)(null,[])))))}collapseArea(t){this.bundleBitstreamsMap.get(t).isCollapsed=!this.bundleBitstreamsMap.get(t).isCollapsed}onBundleLoad(){this.bundlesPageSize++,this.getBundlesPerItem(this.bundlesPageSize)}onBitstreamsLoad(t){return this.getBundleBitstreams(t).subscribe(i=>{const n=i?.page.slice(this.bitstreamPageSize,this.bitstreamPageSize+this.bitstreamSize),l=this.bundleBitstreamsMap.get(t.id).bitstreams.pipe((0,u.T)(p=>[...p,...n]));this.bitstreamPageSize=this.bitstreamPageSize+this.bitstreamSize;const r={bitstreams:l,isCollapsed:this.bundleBitstreamsMap.get(t.id).isCollapsed,allBitstreamsLoaded:i?.page.length<=this.bitstreamPageSize};this.bundleBitstreamsMap.set(t.id,r)})}ngOnDestroy(){this.subs.filter(t=>(0,h.a4)(t)).forEach(t=>t.unsubscribe())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(ue._),e.rXU(v.nX),e.rXU(te.f))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-authorizations"]],decls:9,vars:12,consts:[[1,"container"],[3,"type","content"],[3,"resourceType","resourceName","resourceUUID"],[1,"row","justify-content-center"],[3,"resourceType","resourceUUID","resourceName"],[1,"card","auth-bitstream-container"],[1,"card-header"],["type","button",1,"btn","btn-outline-primary",3,"click"],[1,"card-body",3,"id","ngbCollapse"],["type","button",1,"btn","btn-link",3,"click"]],template:function(i,n){if(1&i&&(e.j41(0,"div",0),e.nrm(1,"ds-alert",1)(2,"ds-resource-policies",2),e.nI1(3,"async"),e.nI1(4,"async"),e.Z7z(5,pt,3,6,null,null,e.fX1),e.nI1(7,"async"),e.nVh(8,mt,4,3,"div",3),e.k0s()),2&i){let l;e.R7$(),e.Y8G("type",n.AlertType.Info)("content","item.edit.authorizations.heading"),e.R7$(),e.Y8G("resourceType","item")("resourceName",e.bMT(3,6,n.itemName$))("resourceUUID",null==(l=e.bMT(4,8,n.item$))?null:l.id),e.R7$(3),e.Dyx(e.bMT(7,10,n.bundles$)),e.R7$(3),e.vxM(n.allBundlesLoaded?-1:8)}},dependencies:[fe.C,w.HC,w.$G,lt.e,b.h,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.auth-bitstream-container[_ngcontent-%COMP%]{margin-top:-1em;margin-bottom:1.5em}"]}))}return s(),a})();var Pe=c(81948),Oe=c(4266),ve=c(37419),D=c(45187),z=c(16289),se=c(3601),P=c(23304),oe=c(32951),ge=c(50540),g=c(25558),K=c(79104),de=c(15202);let je=(()=>{var s;class a{transform(t){const i=[];return(0,h.hj)(t)&&Object.values(t).forEach(n=>i.push(n)),i}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)},this.\u0275pipe=e.EJ8({name:"dsObjectValues",type:a,pure:!0}))}return s(),a})();var ie=c(50186),ut=c(15862),ae=c(88141),bt=c(78544),ft=c(55929);let De=(()=>{var s;class a extends ft.F{constructor(t,i,n,l,r,p){super(i,l,r,n),this.itemService=t,this.objectUpdatesService=i,this.router=n,this.notificationsService=l,this.translateService=r,this.route=p}ngOnInit(){(0,h.a4)(this.item)?this.setItem(this.item):this.itemUpdateSubscription=(0,I.z)([this.route.data,this.route.parent.data]).pipe((0,u.T)(([t,i])=>Object.assign({},t,i)),(0,u.T)(t=>t.dso),(0,ae.M)(t=>{this.item=t.payload}),(0,g.n)(t=>this.itemService.findByHref(t.payload._links.self.href,!0,!0,...(0,ut.
1U)())),(0,m.v7)()).subscribe(t=>{this.setItem(t.payload)}),super.ngOnInit(),this.discardTimeOut=bt.c.item.edit.undoTimeout,this.hasChanges().pipe((0,M.s)(1)).subscribe(t=>{t?this.checkLastModified():this.initializeOriginalFields()}),this.initializeNotificationsPrefix(),this.initializeUpdates()}setItem(t){this.item=t,this.itemPageRoute=(0,U._o)(this.item),this.postItemInit(),this.initializeUpdates()}ngOnDestroy(){(0,h.a4)(this.itemUpdateSubscription)&&this.itemUpdateSubscription.unsubscribe()}postItemInit(){}initializeUpdates(){}initializeNotificationsPrefix(){}initializeOriginalFields(){}submit(){}trackUpdate(t,i){return i&&i.field?i.field.uuid:void 0}isValid(){return this.objectUpdatesService.isValidPage(this.url)}checkLastModified(){const t=this.item.lastModified;this.objectUpdatesService.getLastModified(this.url).pipe((0,M.s)(1)).subscribe(i=>{i.getDate()!==t.getDate()&&(this.notificationsService.warning(this.getNotificationTitle("outdated"),this.getNotificationContent("outdated")),this.initializeOriginalFields())})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(D.ItemDataService),e.rXU(z.F),e.rXU(v.Ix),e.rXU(P.I),e.rXU(b.c$),e.rXU(v.nX))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-abstract-item-update"]],inputs:{item:"item"},features:[e.Vt3],decls:0,vars:0,template:function(i,n){},encapsulation:2}))}return s(),a})();var O=c(3079),vt=c(44437),gt=c(50808);class le{constructor(a,o,t,i,n){this.xs=a,this.sm=o,this.md=t,this.lg=i,this.xl=n}buildClasses(){return`col-${this.xs} col-sm-${this.sm} col-md-${this.md} col-lg-${this.lg} col-xl-${this.xl}`}}class _t{constructor(a){this.columns=a}combineColumns(a,o){if(a<o&&(0,h.a4)(this.columns[a])&&(0,h.a4)(this.columns[o])){let t=this.columns[a].xs,i=this.columns[a].sm,n=this.columns[a].md,l=this.columns[a].lg,r=this.columns[a].xl;for(let p=a+1;p<o+1;p++)t+=this.columns[p].xs,i+=this.columns[p].sm,n+=this.columns[p].md,l+=this.columns[p].lg,r+=this.columns[p].xl;return new le(t,i,n,l,r)}}}const _e="item.edit.bitstreams.notifications.move";let Fe=(()=>{var s;class a{constructor(t,i,n,l,r,p,f,y){this.notificationsService=t,this.translateService=i,this.objectUpdatesService=n,this.bitstreamService=l,this.bundleService=r,this.dsoNameService=p,this.requestService=f,this.liveRegionService=y,this.selectionAction$=new T.t(null),this.isPerformingMoveRequest=new T.t(!1)}getSelectionAction$(){return this.selectionAction$}getSelectionAction(){const t=this.selectionAction$.value;return(0,h.Tn)(t)?null:Object.assign({},t)}hasSelectedBitstream(){const t=this.getSelectionAction();if((0,h.Tn)(t))return!1;const i=t.action;return"Selected"===i||"Moved"===i}getSelectedBitstream(){if(!this.hasSelectedBitstream())return null;const t=this.getSelectionAction();return Object.assign({},t.selectedEntry)}selectBitstreamEntry(t){(0,h.a4)(t)&&t.bitstream!==this.getSelectedBitstream()?.bitstream&&(this.announceSelect(t.bitstream.name),this.updateSelectionAction({action:"Selected",selectedEntry:t}))}updateSelectionAction(t){this.selectionAction$.next(t)}clearSelection(){const t=this.getSelectedBitstream();(0,h.a4)(t)&&(this.updateSelectionAction({action:"Cleared",selectedEntry:t}),this.announceClear(t.bitstream.name),t.currentPosition!==t.originalPosition&&this.displaySuccessNotification(_e))}cancelSelection(){const t=this.getSelectedBitstream();if((0,h.Tn)(t)||this.getPerformingMoveRequest())return;const i=t.originalPosition,n=t.currentPosition;n===i?(this.announceClear(t.bitstream.name),this.updateSelectionAction({action:"Cleared",selectedEntry:t})):(this.announceCancel(t.bitstream.name,i),this.performBitstreamMoveRequest(t.bundle,n,i),this.updateSelectionAction({action:"Cancelled",selectedEntry:t}))}moveSelectedBitstreamUp(){const t=this.getSelectedBitstream();if((0,h.Tn)(t)||this.getPerformingMoveRequest())return;const i=t.currentPosition;if(i>0){const n=i-1;t.currentPosition=n,this.performBitstreamMoveRequest(t.bundle,i,n,()=>{this.announceMove(t.bitstream.name,n)}),this.updateSelectionAction({action:"Moved",selectedEntry:t})}}moveSelectedBitstreamDown(){const t=this.getSelectedBitstream();if((0,h.Tn)(t)||this.getPerformingMoveRequest())return;const i=t.currentPosition;if(i<t.bundleSize-1){const n=i+1;t.currentPosition=n,this.performBitstreamMoveRequest(t.bundle,i,n,()=>{this.announceMove(t.bitstream.name,n)}),this.updateSelectionAction({action:"Moved",selectedEntry:t})}}performBitstreamMoveRequest(t,i,n,l){if(this.getPerformingMoveRequest())return void console.warn("Attempted to perform move request while previous request has not completed yet");const r={op:"move",from:`/_links/bitstreams/${i}/href`,path:`/_links/bitstreams/${n}/href`};
1this.announceLoading(),this.isPerformingMoveRequest.next(!0),this.bundleService.patch(t,[r]).pipe((0,m.qD)(),(0,ae.M)(p=>this.displayFailedResponseNotifications(_e,[p])),(0,g.n)(()=>this.requestService.setStaleByHrefSubstring(t.self)),(0,M.s)(1)).subscribe(()=>{this.isPerformingMoveRequest.next(!1),l?.()})}getPerformingMoveRequest(){return this.isPerformingMoveRequest.value}getPerformingMoveRequest$(){return this.isPerformingMoveRequest}getInitialBundlesPaginationOptions(){return Object.assign(new oe.W,{id:"bundles-pagination-options",currentPage:1,pageSize:9999})}getInitialBitstreamsPaginationOptions(t){return Object.assign(new oe.W,{id:t,currentPage:1,pageSize:10})}getColumnSizes(){return new _t([new le(2,2,3,4,4),new le(2,3,3,3,3),new le(2,2,2,2,2),new le(6,5,4,3,3)])}displayNotifications(t,i){this.displayFailedResponseNotifications(t,i),this.displaySuccessFulResponseNotifications(t,i)}displayFailedResponseNotifications(t,i){i.filter(l=>(0,h.a4)(l)&&l.hasFailed).forEach(l=>{this.displayErrorNotification(t,l.errorMessage)})}displayErrorNotification(t,i){this.notificationsService.error(this.translateService.instant(`${t}.failed.title`),i)}displaySuccessFulResponseNotifications(t,i){i.filter(l=>(0,h.a4)(l)&&l.hasSucceeded).length>0&&this.displaySuccessNotification(t)}displaySuccessNotification(t){this.notificationsService.success(this.translateService.instant(`${t}.saved.title`),this.translateService.instant(`${t}.saved.content`))}removeMarkedBitstreams(t){return t.pipe((0,M.s)(1)).pipe((0,g.n)(l=>(0,vt.y)(...l.map(r=>this.objectUpdatesService.getFieldUpdates(r.self,[],!0)))),(0,u.T)(l=>[].concat(...l.map(r=>Object.values(r).filter(p=>p.changeType===O.B.REMOVE)))),(0,u.T)(l=>l.map(r=>r.field))).pipe((0,M.s)(1),(0,g.n)(l=>this.bitstreamService.removeMultiple(l)))}mapBitstreamsToTableEntries(t){return t.map(i=>{const n=this.dsoNameService.getName(i);return{bitstream:i,id:i.uuid,name:n,nameStripped:this.nameToHeader(n),description:i.firstMetadataValue("dc.description"),format:i.format.pipe((0,m.ak)()),downloadUrl:(0,U.hV)(i)}})}nameToHeader(t){return this.stripWhiteSpace(t)}stripWhiteSpace(t){return t.replace(/\s+/g,"")}announceSelect(t){const i=this.translateService.instant("item.edit.bitstreams.edit.live.select",{bitstream:t});this.liveRegionService.addMessage(i)}announceMove(t,i){const n=this.translateService.instant("item.edit.bitstreams.edit.live.move",{bitstream:t,toIndex:i+1});this.liveRegionService.addMessage(n)}announceCancel(t,i){const n=this.translateService.instant("item.edit.bitstreams.edit.live.cancel",{bitstream:t,toIndex:i+1});this.liveRegionService.addMessage(n)}announceClear(t){const i=this.translateService.instant("item.edit.bitstreams.edit.live.clear",{bitstream:t});this.liveRegionService.addMessage(i)}announceLoading(){const t=this.translateService.instant("item.edit.bitstreams.edit.live.loading");this.liveRegionService.addMessage(t)}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(d.KVO(P.I),d.KVO(b.c$),d.KVO(z.F),d.KVO(Oe.BitstreamDataService),d.KVO(ve.BundleDataService),d.KVO(te.f),d.KVO(se.B),d.KVO(gt.A))},this.\u0275prov=d.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}))}return s(),a})();var Ee=c(17052),yt=c(11873),k=c(6170),Ve=c(92416),Ue=(c(41033),c(69568)),pe=c(2175),Xe=c(33745);const Ct=["bundleView"],It=["dragTooltip"],Ge=s=>({bundle:s}),wt=s=>({name:s}),Mt=s=>[s,"bitstreams","new"],Tt=s=>({invisible:s}),kt=s=>["/bitstreams/",s,"edit"],xt=s=>["/bitstreams/",s,"replace"];function $t(s,a){if(1&s){const o=e.RV6();e.j41(0,"li",24),e.nI1(1,"async"),e.j41(2,"button",25),e.bIt("click",function(){const i=d.eBV(o).$implicit,n=e.XpG(4);return d.Njj(n.doPageSizeChange(i))}),e.nrm(3,"i",26),e.nI1(4,"async"),e.EFF(5),e.k0s()()}if(2&s){const o=a.$implicit,t=e.XpG(4);e.BMQ("aria-selected",o===e.bMT(1,3,t.pageSize$)),e.R7$(3),e.Y8G("ngClass",e.eq3(7,Tt,o!==e.bMT(4,5,t.pageSize$))),e.R7$(2),e.SpI(" ",o," ")}}function Rt(s,a){if(1&s&&(e.j41(0,"button",36),e.nI1(1,"translate"),e.nrm(2,"i",43),e.k0s()),2&s){const o=e.XpG(2).$implicit;e.Y8G("title",e.mNQ(e.bMT(1,3,"item.edit.bitstreams.edit.buttons.replace")))("routerLink",e.eq3(5,xt,o.id))}}function St(s,a){if(1&s){const o=e.RV6();e.j41(0,"tr",28),e.bIt("cdkDragStarted",function(){d.eBV(o);const i=e.XpG(5);return d.Njj(i.dragStart())})("cdkDragEnded",function(){d.eBV(o);const i=e.XpG(5);return d.Njj(i.dragEnd())}),e.j41(1,"th",29)(2,"div",30),e.bIt("keydown.enter",function(i){d.eBV(o);const n=e.XpG().$implicit,l=e.XpG(4);return d.Njj(l.select(i,n))})("keydown.space",function(i){d.eBV(o);const n=e.XpG().$implicit,l=e.XpG(4);return d.Njj(l.select(i,n))})("click",function(i){d.eBV(o);const n=e.XpG().$implicit,l=e.XpG(4);return d.Njj(l.select(i,n))}),e.nrm(3,"i",31),e.nI1(4,"translate"),e.k0s(),e.j41(5,"span",32),e.EFF(6),e.k0s()(),e.j41(7,"td",33),e.EFF(8),e.k0s(),e.j41(9,"td",33),e.EFF(10),e.nI1(11,"async"),e.k0s(),e.j41(12,"td",33)(13,"div",34)(14,"div",35)(15,"a",36),e.nI1(16,"translate"),e.nI1(17,"translate"),e.nI1(18,"dsBrowserOnly"),e.nrm(19,"i",37),e.k0s(),e.j41(20,"button",36),e.nI1(21,"translate"),e.nI1(22,"translate"),e.nrm(23,"i",38),e.k0s(),e.nVh(24,Rt,3,7,"button",36),e.nI1(25,"async"),e.j41(26,"button",39),e.nI1(27,"translate"),e.nI1(28,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG().$implicit,n=e.XpG(4);return d.Njj(n.remove(i.bitstream))}),e.nrm(29,"i",40),e.k0s(),e.j41(30,"button",41),e.nI1(31,"translate"),e.nI1(32,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG().$implicit,n=e.XpG(4);return d.Njj(n.undo(i.bitstream))}),e.nrm(33,"i",42),e.k0s()()()()()}if(2&s){let o;const t=a,i=e.XpG().$implicit,n=e.XpG(4);e.Y8G("ngClass",n.getRowClass(t,i)),e.R7$(),e.HbH(e.VkB("bitstream-name row-element ",n.columnSizes.columns[0].buildClasse
1s())),e.Y8G("id",e.mNQ(i.nameStripped))("headers",e.VkB("",n.bundleName," name")),e.R7$(2),e.Y8G("title",e.bMT(4,48,"item.edit.bitstreams.edit.buttons.drag")),e.R7$(3),e.JRh(i.name),e.R7$(),e.HbH(e.VkB("row-element ",n.columnSizes.columns[1].buildClasses())),e.Y8G("headers",e.ai1("",i.nameStripped," ",n.bundleName," description")),e.R7$(),e.SpI(" ",i.description," "),e.R7$(),e.HbH(e.VkB("row-element ",n.columnSizes.columns[2].buildClasses())),e.Y8G("headers",e.ai1("",i.nameStripped," ",n.bundleName," format")),e.R7$(),e.SpI(" ",null==(o=e.bMT(11,50,i.format))?null:o.shortDescription," "),e.R7$(2),e.HbH(e.VkB("row-element ",n.columnSizes.columns[3].buildClasses())),e.Y8G("headers",e.ai1("",i.nameStripped," ",n.bundleName," actions")),e.R7$(3),e.Y8G("title",e.mNQ(e.bMT(16,52,"item.edit.bitstreams.edit.buttons.download")))("routerLink",i.downloadUrl),e.BMQ("aria-label",e.bMT(17,54,"item.edit.bitstreams.edit.buttons.download"))("data-test",e.bMT(18,56,"download-button")),e.R7$(5),e.Y8G("title",e.mNQ(e.bMT(21,58,"item.edit.bitstreams.edit.buttons.edit")))("routerLink",e.eq3(72,kt,i.id)),e.BMQ("aria-label",e.bMT(22,60,"item.edit.bitstreams.edit.buttons.edit")),e.R7$(4),e.vxM(e.bMT(25,62,n.canReplaceBitstream(i.bitstream.self))?24:-1),e.R7$(2),e.Y8G("title",e.mNQ(e.bMT(27,64,"item.edit.bitstreams.edit.buttons.remove")))("dsBtnDisabled",!n.canRemove(t)),e.BMQ("aria-label",e.bMT(28,66,"item. edit bitstreams.edit.buttons.remove")),e.R7$(4),e.Y8G("title",e.mNQ(e.bMT(31,68,"item.edit.bitstreams.edit.buttons.undo")))("dsBtnDisabled",!n.canUndo(t)),e.BMQ("aria-label",e.bMT(32,70,"item.edit.bitstreams.edit.buttons.undo"))}}function Bt(s,a){if(1&s&&e.nVh(0,St,34,74,"tr",27),2&s){let o;const t=a.$implicit,i=e.XpG();e.vxM((o=i[t.id])?0:-1,o)}}function Pt(s,a){if(1&s){const o=e.RV6();e.j41(0,"table",5),e.nI1(1,"translate"),e.j41(2,"thead")(3,"tr",6)(4,"th",7),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"th",8),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"th",9),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"th",10),e.EFF(14),e.nI1(15,"translate"),e.k0s()()(),e.j41(16,"tbody",11),e.bIt("cdkDropListDropped",function(i){d.eBV(o);const n=e.XpG(3);return d.Njj(n.drop(i))}),e.j41(17,"tr",12)(18,"th",13),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"td")(22,"div",14)(23,"button",15),e.nI1(24,"translate"),e.nI1(25,"translate"),e.nrm(26,"i",16),e.k0s(),e.j41(27,"div",17,2)(29,"button",18),e.nI1(30,"translate"),e.nI1(31,"translate"),e.nrm(32,"i",19),e.k0s(),e.j41(33,"ul",20)(34,"li",21)(35,"span",22),e.EFF(36),e.nI1(37,"translate"),e.k0s(),e.j41(38,"ul",23),e.Z7z(39,$t,6,9,"li",24,e.fX1),e.k0s()()()()()()(),e.Z7z(41,Bt,1,1,null,null,e.fX1),e.nI1(43,"async"),e.k0s()()}if(2&s){const o=e.XpG(3);e.AVh("mt-n1",!o.isFirstTable),e.BMQ("aria-label",e.i5U(1,32,"item.edit.bitstreams.bundle.table.aria-label",e.eq3(58,Ge,o.bundleName))),e.R7$(2),e.AVh("visually-hidden",!o.isFirstTable),e.R7$(2),e.HbH(o.columnSizes.columns[0].buildClasses()),e.R7$(),e.SpI(" ",e.bMT(6,35,"item.edit.bitstreams.headers.name")," "),e.R7$(2),e.HbH(o.columnSizes.columns[1].buildClasses()),e.R7$(),e.SpI(" ",e.bMT(9,37,"item.edit.bitstreams.headers.description")," "),e.R7$(2),e.HbH(o.columnSizes.columns[2].buildClasses()),e.R7$(),e.SpI(" ",e.bMT(12,39,"item.edit.bitstreams.headers.format")," "),e.R7$(2),e.HbH(e.VkB("",o.columnSizes.columns[3].buildClasses()," text-center")),e.R7$(),e.SpI(" ",e.bMT(15,41,"item.edit.bitstreams.headers.actions")," "),e.R7$(4),e.Y8G("id",e.mNQ(o.bundleName)),e.R7$(),e.SpI(" ",e.i5U(20,43,"item.edit.bitstreams.bundle.name",e.eq3(60,wt,o.bundleName))," "),e.R7$(2),e.HbH(e.VkB("text-center row-element ",o.columnSizes.columns[3].buildClasses())),e.R7$(2),e.Y8G("title",e.mNQ(e.bMT(24,46,"item.edit.bitstreams.bundle.edit.buttons.upload")))("routerLink",e.eq3(62,Mt,o.itemPageRoute))("queryParams",e.eq3(64,Ge,o.bundle.id)),e.BMQ("aria-label",e.bMT(25,48,"item.edit.bitstreams.bundle.edit.buttons.upload")),e.R7$(6),e.Y8G("title",e.bMT(30,50,"pagination.options.description")),e.BMQ("aria-label",e.bMT(31,52,"pagination.options.description")),e.R7$(7),e.JRh(e.bMT(37,54,"pagination.results-per-page")),e.R7$(3),e.Dyx(o.paginationOptions.pageSizeOptions),e.R7$(2),e.Dyx(e.bMT(43,56,o.tableEntries$))}}function Ot(s,a){if(1&s&&(e.j41(0,"ds-pagination",3,1),e.nI1(2,"translate"),e.nV
1h(3,Pt,44,66,"table",4),e.nI1(4,"async"),e.k0s()),2&s){let o;const t=e.XpG(2);e.Y8G("hideGear",!0)("hidePagerWhenSinglePage",!0)("hidePaginationDetail",!0)("paginationOptions",t.paginationOptions)("collectionSize",a.totalElements)("retainScrollPosition",!0)("ngbTooltip",e.bMT(2,9,"item.edit.bitstreams.bundle.tooltip"))("autoClose",!1),e.R7$(3),e.vxM((o=e.bMT(4,11,t.updates$))?3:-1,o)}}function jt(s,a){if(1&s&&(e.nVh(0,Ot,5,13,"ds-pagination",3),e.nI1(1,"async")),2&s){let o;const t=e.XpG();e.vxM((o=null==(o=e.bMT(1,1,t.bitstreamsRD$))?null:o.payload)?0:-1,o)}}let Dt=(()=>{var s;class a{constructor(t,i,n,l,r,p,f,y){this.viewContainerRef=t,this.dsoNameService=i,this.bundleService=n,this.objectUpdatesService=l,this.paginationService=r,this.requestService=p,this.itemBitstreamsService=f,this.authorizationService=y,this.FieldChangeType=O.B,this.isFirstTable=!1,this.tableEntries$=new T.t([]),this.updates$=new T.t(null),this.canReplaceBitstreamCache=new Map,this.subscriptions=[]}ngOnInit(){this.bundleNameColumn=this.columnSizes.combineColumns(0,2),this.viewContainerRef.createEmbeddedView(this.bundleView),this.itemPageRoute=(0,U._o)(this.item),this.bundleName=this.dsoNameService.getName(this.bundle),this.bundleUrl=this.bundle.self,this.initializePagination(),this.initializeBitstreams(),this.initializeSelectionActions()}ngOnDestroy(){this.viewContainerRef.clear(),this.subscriptions.forEach(t=>t?.unsubscribe()),this.canReplaceBitstreamCache.clear()}canReplaceBitstream(t){return this.canReplaceBitstreamCache.has(t)||this.canReplaceBitstreamCache.set(t,this.authorizationService.isAuthorized(k._.CanReplaceBitstreamAdmin,t).pipe((0,Ue.t)({bufferSize:1,refCount:!0}))),this.canReplaceBitstreamCache.get(t)}initializePagination(){this.paginationOptions=this.itemBitstreamsService.getInitialBitstreamsPaginationOptions(this.bundleName),this.currentPaginationOptions$=new T.t(this.paginationOptions),this.pageSize$=new T.t(this.paginationOptions.pageSize),this.subscriptions.push(this.paginationService.getCurrentPagination(this.paginationOptions.id,this.paginationOptions).subscribe(t=>{this.currentPaginationOptions$.next(t),this.pageSize$.next(t.pageSize)}))}initializeBitstreams(){this.bitstreamsRD$=this.currentPaginationOptions$.pipe((0,g.n)(t=>{const i=new ge.C({pagination:Object.assign({},t)});return this.bundleService.getBitstreamsEndpoint(this.bundle.id,i).pipe((0,g.n)(n=>this.requestService.hasByHref$(n)),(0,g.n)(()=>this.bundleService.getBitstreams(this.bundle.id,i,(0,X.s)("format"))))}),(0,m.v7)(),(0,Ue.t)({bufferSize:1,refCount:!0})),this.subscriptions.push(this.bitstreamsRD$.pipe((0,M.s)(1),(0,ae.M)(t=>this.bundleSize=t.payload.totalElements),(0,m.qn)()).subscribe(t=>{this.objectUpdatesService.initialize(this.bundleUrl,t,new Date)}),this.bitstreamsRD$.pipe((0,m.qn)(),(0,g.n)(t=>this.objectUpdatesService.getFieldUpdatesExclusive(this.bundleUrl,t))).subscribe(t=>this.updates$.next(t)),this.bitstreamsRD$.pipe((0,m.qn)(),(0,u.T)(t=>this.itemBitstreamsService.mapBitstreamsToTableEntries(t))).subscribe(t=>this.tableEntries$.next(t)))}initializeSelectionActions(){this.subscriptions.push(this.itemBitstreamsService.getSelectionAction$().subscribe(t=>this.handleSelectionAction(t)))}handleSelectionAction(t){(0,h.Tn)(t)||t.selectedEntry.bundle!==this.bundle||("Moved"===t.action&&this.redirectToCurrentPage(t.selectedEntry),"Cancelled"===t.action&&this.redirectToOriginalPage(t.selectedEntry),"Cleared"===t.action&&this.redirectToCurrentPage(t.selectedEntry))}redirectToCurrentPage(t){const i=this.getCurrentPage(),n=this.bundleIndexToPage(t.currentPosition);i!==n&&this.changeToPage(n)}redirectToOriginalPage(t){const i=this.getCurrentPage(),n=this.bundleIndexToPage(t.originalPosition);i!==n&&this.changeToPage(n)}canRemove(t){return t.changeType!==O.B.REMOVE}canUndo(t){return t.changeType>=O.B.UPDATE}remove(t){this.objectUpdatesService.saveRemoveFieldUpdate(this.bundleUrl,t)}undo(t){this.objectUpdatesService.removeSingleFieldUpdate(this.bundleUrl,t.uuid)}getRowClass(t,i){const n=this.itemBitstreamsService.getSelectedBitstream();if((0,h.a4)(n)&&i.id===n.bitstream.id)return"table-info";switch(t.changeType){case O.B.UPDATE:return"table-warning";case O.B.ADD:return"table-success";case O.B.REMOVE:return"table-danger";default:return"bg-white"}}doPageSizeChange(t){this.paginationComponent.doPageSizeChange(t)}
1dragStart(){this.paginationComponent.shouldShowBottomPager.pipe((0,M.s)(1),(0,Y.p)(t=>t)).subscribe(()=>{this.dragTooltip.open()})}dragEnd(){this.dragTooltip.close()}drop(t){const i=t.previousIndex;let n=t.currentIndex;const l=this.getCurrentPage();let r=this.getCurrentPage();const p=document.elementFromPoint(t.dropPoint.x,t.dropPoint.y);if((0,h.a4)(p)&&(0,h.a4)(p.textContent)&&p.classList.contains("page-link")){let G=Number(p.textContent);(0,h.a4)(G)&&!Number.isNaN(G)&&(G-=1,G!==l&&(r=G,n=r>l?0:this.getCurrentPageSize()-1))}const f=this.pageIndexToBundleIndex(i,l),y=this.pageIndexToBundleIndex(n,r);if(f===y)return;const $=this.tableEntries$.value[i];this.itemBitstreamsService.performBitstreamMoveRequest(this.bundle,f,y,()=>{this.itemBitstreamsService.announceMove($.name,y),r!==this.getCurrentPage()&&this.changeToPage(r),this.itemBitstreamsService.displaySuccessNotification(_e)})}select(t,i){if(t.preventDefault(),t instanceof KeyboardEvent&&t.repeat)return;const n=this.itemBitstreamsService.getSelectedBitstream();if((0,h.a4)(n)&&n.bitstream===i)this.itemBitstreamsService.cancelSelection();else{const l=this.createBitstreamSelectionObject(i);if((0,h.Tn)(l))return void console.warn("Failed to create selection object");this.itemBitstreamsService.selectBitstreamEntry(l)}}createBitstreamSelectionObject(t){const i=this.findBitstreamPageIndex(t);if(-1===i)return null;const n=this.pageIndexToBundleIndex(i,this.getCurrentPage());return{bitstream:t,bundle:this.bundle,bundleSize:this.bundleSize,currentPosition:n,originalPosition:n}}findBitstreamPageIndex(t){return this.tableEntries$.value.findIndex(n=>n===t)}getCurrentPage(){return this.currentPaginationOptions$.value.currentPage-1}getCurrentPageSize(){return this.currentPaginationOptions$.value.pageSize}pageIndexToBundleIndex(t,i){return i*this.getCurrentPageSize()+t}bundleIndexToPage(t){return Math.floor(t/this.getCurrentPageSize())}changeToPage(t){this.paginationComponent.doPageChange(t+1)}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(e.c1b),e.rXU(te.f),e.rXU(ve.BundleDataService),e.rXU(z.F),e.rXU(Ve.m),e.rXU(se.B),e.rXU(Fe),e.rXU(yt.AuthorizationDataService))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-edit-bitstream-bundle"]],viewQuery:function(i,n){if(1&i&&(e.GBs(Ct,7),e.GBs(pe.e,5),e.GBs(It,5)),2&i){let l;
1e.mGM(l=e.lsd())&&(n.bundleView=l.first),e.mGM(l=e.lsd())&&(n.paginationComponent=l.first),e.mGM(l=e.lsd())&&(n.dragTooltip=l.first)}},inputs:{bundle:"bundle",item:"item",columnSizes:"columnSizes",isFirstTable:"isFirstTable"},decls:2,vars:0,consts:[["bundleView",""],["dragTooltip","ngbTooltip"],["paginationControls","ngbDropdown"],["placement","bottom","triggers","manual",3,"hideGear","hidePagerWhenSinglePage","hidePaginationDetail","paginationOptions","collectionSize","retainScrollPosition","ngbTooltip","autoClose"],[1,"table",3,"mt-n1"],[1,"table"],[1,"header-row","fw-bold"],["id","name","scope","col"],["id","description","scope","col"],["id","format","scope","col"],["id","actions","scope","col"],["cdkDropList","",3,"cdkDropListDropped"],[1,"bundle-row"],["colspan","3","scope","colgroup",1,"row-element",3,"id"],[1,"btn-group"],[1,"btn","btn-outline-success","btn-sm",3,"routerLink","queryParams","title"],[1,"fas","fa-upload","fa-fw"],["ngbDropdown","","container","body","placement","bottom-right",1,"btn-group","float-end","p-0"],["id","paginationControls","ngbDropdownToggle","","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm",3,"title"],["aria-hidden","true",1,"fas","fa-cog"],["id","paginationControlsDropdownMenu","aria-labelledby","paginationControls","role","menu","ngbDropdownMenu",""],["role","menuitem"],["id","pagination-control_results-per-page","role","heading",1,"dropdown-header"],["aria-labelledby","pagination-control_results-per-page","role","listbox",1,"list-unstyled"],["role","option"],[1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fas","fa-check",3,"ngClass"],["cdkDrag","",1,"bitstream-row",3,"ngClass"],["cdkDrag","",1,"bitstream-row",3,"cdkDragStarted","cdkDragEnded","ngClass"],["scope","row",3,"id","headers"],["tabindex","0","cdkDragHandle","",1,"drag-handle","text-muted","float-start","p-1","me-2","d-inline",3,"keydown.enter","keydown.space","click"],[1,"drag-icon",3,"title"],[1,"dont-break-out"],[3,"headers"],[1,"text-center","w-100"],[1,"btn-group","relationship-action-buttons"],[1,"btn","btn-outline-primary","btn-sm",3,"routerLink","title"],[1,"fas","fa-download","fa-fw"],[1,"fas","fa-edit","fa-fw"],[1,"btn","btn-outline-danger","btn-sm",3,"click","dsBtnDisabled","title"],[1,"fas","fa-trash-alt","fa-fw"],[1,"btn","btn-outline-warning","btn-sm",3,"click","dsBtnDisabled","title"],[1,"fas","fa-undo-alt","fa-fw"],[1,"fas","fa-retweet","fa-fw"]],template:function(i,n){1&i&&e.DNE(0,jt,2,3,"ng-template",null,0,e.C5r)},dependencies:[K.A,Ee.T1,Ee.O7,_.MD,_.YU,w.zH,w.tg,w.do,w.U0,w.md,pe.e,R.Wk,b.h,Xe.L,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.drag-handle[_ngcontent-%COMP%]:hover, .bitstream-row-drag-handle[_ngcontent-%COMP%]:hover{cursor:move}.cdk-drag-preview[_ngcontent-%COMP%]{margin-left:0;box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
1.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%]   .bitstream-row-drag-handle[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%]   .drag-handle[_ngcontent-%COMP%]{cursor:grabbing}[_nghost-%COMP%]     .larger-tooltip .tooltip-inner{max-width:500px}.table-border[_ngcontent-%COMP%]{border:1px solid #dee2e6}[_nghost-%COMP%]     .pagination{padding-top:.5rem}.scrollable-table[_ngcontent-%COMP%]{overflow-x:auto}.disabled-overlay[_ngcontent-%COMP%]{opacity:.6}.loading-overlay[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%}tr.table-danger[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{--bs-table-bg-type: var(--bs-table-bg)}",".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.header-row[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{padding:.75rem}.header-row[_ngcontent-%COMP%]{--bs-table-bg: var(--bs-dark);--bs-table-bg-state: var(--bs-dark);--bs-table-color-state: var(--bs-light)}.bundle-row[_ngcontent-%COMP%]{--bs-table-color-state: var(--bs-dark);--bs-table-bg: var(--bs-light-bg-subtle);--bs-table-bg-state: var(--bs-light-bg-subtle)}.row-element[_ngcontent-%COMP%]{padding:.75em;border-bottom:var(--bs-table-border-width) solid var(--bs-table-border-color)}.bitstream-name[_ngcontent-%COMP%]{font-weight:400}.table[_ngcontent-%COMP%]{margin-bottom:0}"]}))}return s(),a})();var Ae=c(17705);const Ft=s=>[s,"bitstreams","new"],Et=s=>({"disabled-overlay":s});function Vt(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",18),e.nI1(1,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.reinstate())}),e.nrm(2,"i",19),e.j41(3,"span",8),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}2&s&&(e.BMQ("aria-label",e.bMT(1,2,"item.edit.bitstreams.reinstate-button")),e.R7$(4),e.SpI("\xa0",e.bMT(5,4,"item.edit.bitstreams.reinstate-button")))}function Ut(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",20),e.nI1(1,"async"),e.nI1(2,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.discard())}),e.nrm(3,"i",21),e.j41(4,"span",8),e.EFF(5),e.nI1(6,"translate"),e.k0s()()}if(2&s){const o=e.XpG(2);e.Y8G("dsBtnDisabled",!0!==e.bMT(1,3,o.hasChanges$)||o.submitting),e.BMQ("aria-label",e.bMT(2,5,"item.edit.bitstreams.discard-button")),e.R7$(5),e.SpI("\xa0",e.bMT(6,7,"item.edit.bitstreams.discard-button"))}}function Xt(s,a){if(1&s&&e.nrm(0,"ds-item-edit-bitstream-bundle",22),2&s){const o=a.$implicit,t=a.$index,i=e.XpG(3);e.Y8G("bundle",o)("item",i.item)("columnSizes",i.columnSizes)("isFirstTable",0===t)}}function Gt(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",23)(1,"button",24),e.bIt("click",function(){d.eBV(o);const i=e.XpG(3);return d.Njj(i.loadBundles())}),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"item.edit.bitstreams.load-more.link")))}function At(s,a){if(1&s&&(e.j41(0,"div",13),e.nI1(1,"async"),e.Z7z(2,Xt,1,4,"ds-item-edit-bitstream-bundle",22,e.fX1),e.nVh(4,Gt,4,3,"div",23),e.nI1(5,"async"),e.k0s()),2&s){const o=e.XpG().ngVar,t=e.XpG();e.Y8G("ngClass",e.eq3(6,Et,e.bMT(1,2,t.isProcessingMoveRequest))),e.R7$(2),e.Dyx(o),e.R7$(2),e.vxM(e.bMT(5,4,t.showLoadMoreLink$)?4:-1)}}function Lt(s,a){1&s&&(e.j41(0,"div",14),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"item.edit.bitstreams.empty")," "))}function Nt(s,a){1&s&&(e.nrm(0,"ds-loading",15),e.nI1(1,"translate")),2&s&&e.Y8G("message",e.mNQ(e.bMT(1,2,"loading.bitstreams")))}function zt(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",18),e.nI1(1,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.reinstate())}),e.nrm(2,"i",19),e.j41(3,"span",8),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}2&s&&(e.BMQ("aria-label",e.bMT(1,2,"item.edit.bitstreams.reinstate-button")),e.R7$(4),e.SpI("\xa0",e.bMT(5,4,"item.edit.bitstreams.reinstate-button")))}function Yt(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",20),e.nI1(1,"async"),e.nI1(2,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.discard())}),e.nrm(3,"i",21),e.j41(4,"span",8),e.EFF(5),e.nI1(6,"translate"),e.k0s()()}if(2&s){const o=e.XpG(2);e.Y8G("dsBtnDisabled",!0!==e.bMT(1,3,o.hasChanges$)||o.submitting),e.BMQ("aria-label",e.bMT(2,5,"item.edit.bitstreams.discard-button")),e.R7$(5),e.SpI("\xa0",e.bMT(6,7,"item.edit.bitstreams.discard-button"))}}function Wt(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",2)(1,"div",3),e.nrm(2,"ds-alert",4),e.k0s(),e.j41(3,"div",5)(4,"button",6),e.nI1(5,"translate"),e.nrm(6,"i",7),e.j41(7,"span",8),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.nVh(10,Vt,6,6,"button",9),e.nI1(11,"async"),e.j41(12,"button",10),e.nI1(13,"async"),e.nI1(14,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.submit())}),e.nrm(15,"i",11),e.j41(16,"span",8),e.EFF(17),e.nI1(18,"translate"),e.k0s()(),e.nVh(19,Ut,7,9,"button",12),e.nI1(20,"async"),e.k0s(),e.nVh(21,At,6,8,"div",13),e.nV
1h(22,Lt,3,3,"div",14),e.nVh(23,Nt,2,4,"ds-loading",15),e.j41(24,"div",16)(25,"div",17),e.nVh(26,zt,6,6,"button",9),e.nI1(27,"async"),e.j41(28,"button",10),e.nI1(29,"async"),e.nI1(30,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.submit())}),e.nrm(31,"i",11),e.j41(32,"span",8),e.EFF(33),e.nI1(34,"translate"),e.k0s()(),e.nVh(35,Yt,7,9,"button",12),e.nI1(36,"async"),e.k0s()()()}if(2&s){const o=a.ngVar,t=e.XpG();e.R7$(2),e.Y8G("content","item.edit.bitstreams.info-alert")("type",t.AlertType.Info),e.R7$(2),e.Y8G("routerLink",e.eq3(42,Ft,t.itemPageRoute)),e.BMQ("aria-label",e.bMT(5,18,"item.edit.bitstreams.upload-button")),e.R7$(4),e.SpI("\xa0",e.bMT(9,20,"item.edit.bitstreams.upload-button")),e.R7$(2),e.vxM(e.bMT(11,22,t.isReinstatable$)?10:-1),e.R7$(2),e.Y8G("dsBtnDisabled",!0!==e.bMT(13,24,t.hasChanges$)||t.submitting),e.BMQ("aria-label",e.bMT(14,26,"item.edit.bitstreams.save-button")),e.R7$(5),e.SpI("\xa0",e.bMT(18,28,"item.edit.bitstreams.save-button")),e.R7$(2),e.vxM(!0!==e.bMT(20,30,t.isReinstatable$)?19:-1),e.R7$(2),e.vxM(t.item&&(null==o?null:o.length)>0?21:-1),e.R7$(),e.vxM(0===(null==o?null:o.length)?22:-1),e.R7$(),e.vxM(o?-1:23),e.R7$(3),e.vxM(e.bMT(27,32,t.isReinstatable$)?26:-1),e.R7$(2),e.Y8G("dsBtnDisabled",!0!==e.bMT(29,34,t.hasChanges$)||t.submitting),e.BMQ("aria-label",e.bMT(30,36,"item.edit.bitstreams.save-button")),e.R7$(5),e.SpI("\xa0",e.bMT(34,38,"item.edit.bitstreams.save-button")),e.R7$(2),e.vxM(!0!==e.bMT(36,40,t.isReinstatable$)?35:-1)}}function Ht(s,a){1&s&&e.nrm(0,"ds-loading",1)}let Kt=(()=>{var s;class a extends De{get bundles$(){return this.bundlesSubject.asObservable()}constructor(t,i,n,l,r,p,f,y,$,F,G,xe,$e){super(t,i,n,l,r,p),this.itemService=t,this.objectUpdatesService=i,this.router=n,this.notificationsService=l,this.translateService=r,this.route=p,this.bitstreamService=f,this.objectCache=y,this.requestService=$,this.cdRef=F,this.bundleService=G,this.zone=xe,this.itemBitstreamsService=$e,this.AlertType=ce.v,this.bundlesSubject=new T.t([]),this.bundlesOptions=Object.assign(new oe.W,{id:"bundles-pagination-options",currentPage:1,pageSize:10}),this.submitting=!1,this.showLoadMoreLink$=new T.t(!0),this.columnSizes=this.itemBitstreamsService.getColumnSizes()}postItemInit(){this.loadBundles(1)}moveUp(t){this.itemBitstreamsService.hasSelectedBitstream()&&(t.preventDefault(),this.itemBitstreamsService.moveSelectedBitstreamUp())}moveDown(t){this.itemBitstreamsService.hasSelectedBitstream()&&(t.preventDefault(),this.itemBitstreamsService.moveSelectedBitstreamDown())}cancelSelection(t){this.itemBitstreamsService.hasSelectedBitstream()&&(t.preventDefault(),this.itemBitstreamsService.cancelSelection())}clearSelection(t){this.itemBitstreamsService.hasSelectedBitstream()&&t.target instanceof Element&&"BODY"===t.target.tagName&&(t.preventDefault(),this.itemBitstreamsService.clearSelection())}initializeNotificationsPrefix(){this.notificationsPrefix="item.edit.bitstreams.notifications."}loadBundles(t){this.bundlesOptions=Object.assign(new oe.W,this.bundlesOptions,{currentPage:t||this.bundlesOptions.currentPage+1}),this.itemService.getBundles(this.item.id,new ge.C({pagination:this.bundlesOptions})).pipe((0,m.yd)(),(0,m.Bo)()).subscribe(i=>{this.updateBundles(i)})}updateBundles(t){const i=this.bundlesSubject.getValue(),n=t.page.filter(r=>!i.some(p=>p.id===r.id)),l=[...i,...n];this.showLoadMoreLink$.next(l.length<t.totalElements),this.bundlesSubject.next(l)}submit(){this.submitting=!0,this.itemBitstreamsService.removeMarkedBitstreams(this.bundles$.pipe((0,M.s)(1))).subscribe(i=>{this.itemBitstreamsService.displayNotifications("item.edit.bitstreams.notifications.remove",[i]),this.submitting=!1})}dropBitstream(t,i){this.zone.runOutsideAngular(()=>{(0,h.a4)(i)&&(0,h.a4)(i.fromIndex)&&(0,h.a4)(i.toIndex)&&(0,h.a4)(i.finish)&&this.bundleService.patch(t,[{op:"move",from:`/_links/bitstreams/${i.fromIndex}/href`,path:`/_links/bitstreams/${i.toIndex}/href`}]).pipe((0,M.s)(1)).subscribe(l=>{this.zone.run(()=>{this.displayNotifications("item.edit.bitstreams.notifications.move",[l]),this.requestService.removeByHrefSubstring(t.self).pi
1pe((0,Y.p)(r=>r),(0,M.s)(1)).subscribe(()=>i.finish())})})})}displayNotifications(t,i){if((0,h.hj)(i)){const n=i.filter(r=>(0,h.a4)(r)&&r.hasFailed),l=i.filter(r=>(0,h.a4)(r)&&r.hasSucceeded);n.forEach(r=>{this.notificationsService.error(this.translateService.instant(`${t}.failed.title`),r.errorMessage)}),l.length>0&&this.notificationsService.success(this.translateService.instant(`${t}.saved.title`),this.translateService.instant(`${t}.saved.content`))}}discard(){const t=this.notificationsService.info(this.getNotificationTitle("discarded"),this.getNotificationContent("discarded"),{timeOut:this.discardTimeOut});this.objectUpdatesService.discardAllFieldUpdates(this.url,t)}reinstate(){this.bundles$.pipe((0,M.s)(1)).subscribe(t=>{t.forEach(i=>{this.objectUpdatesService.reinstateFieldUpdates(i.self)})})}isReinstatable(){return this.bundles$.pipe((0,g.n)(t=>(0,I.z)(t.map(i=>this.objectUpdatesService.isReinstatable(i.self)))),(0,u.T)(t=>t.includes(!0)))}hasChanges(){return this.bundles$.pipe((0,g.n)(t=>(0,I.z)(t.map(i=>this.objectUpdatesService.hasUpdates(i.self)))),(0,u.T)(t=>t.includes(!0)))}ngOnDestroy(){this.itemUpdateSubscription&&this.itemUpdateSubscription.unsubscribe()}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(D.ItemDataService),e.rXU(z.F),e.rXU(v.Ix),e.rXU(P.I),e.rXU(b.c$),e.rXU(v.nX),e.rXU(Oe.BitstreamDataService),e.rXU(Pe.$),e.rXU(se.B),e.rXU(Ae.gRc),e.rXU(ve.BundleDataService),e.rXU(e.SKi),e.rXU(Fe))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-bitstreams"]],hostBindings:function(i,n){1&i&&e.bIt("keydown.arrowUp",function(r){return n.moveUp(r)},e.EBC)("keydown.arrowDown",function(r){return n.moveDown(r)},e.EBC)("keyup.escape",function(r){return n.cancelSelection(r)},e.EBC)("keydown.enter",function(r){return n.clearSelection(r)},e.EBC)("keydown.space",function(r){return n.clearSelection(r)},e.EBC)},features:[e.Jv_([je]),e.Vt3],decls:4,vars:6,consts:[["class","item-bitstreams",4,"ngVar"],[1,"loading-overlay"],[1,"item-bitstreams"],["id","reorder-description",1,"mt-2"],[3,"content","type"],[1,"button-row","top","d-flex","mt-2","space-children-mr"],[1,"me-auto","btn","btn-success",3,"routerLink"],[1,"fas","fa-upload"],[1,"d-none","d-sm-inline"],[1,"btn","btn-warning"],[1,"btn","btn-primary",3,"click","dsBtnDisabled"],[1,"fas","fa-save"],[1,"btn","btn-danger",3,"dsBtnDisabled"],[1,"mt-4","table-border","scrollable-table",3,"ngClass"],["role","alert",1,"alert","alert-info","w-100","d-inline-block","mt-4"],[3,"message"],[1,"button-row","bottom"],[1,"mt-4","float-end","space-children-mr","ms-gap"],[1,"btn","btn-warning",3,"click"],[1,"fas","fa-undo-alt"],[1,"btn","btn-danger",3,"click","dsBtnDisabled"],[1,"fas","fa-times"],["aria-describedby","reorder-description",3,"bundle","item","columnSizes","isFirstTable"],[1,"d-flex","justify-content-center"],[1,"btn","btn-link","my-3",3,"click"]],template:function(i,n){1&i&&(e.DNE(0,Wt,37,44,"div",0),e.nI1(1,"async"),e.nVh(2,Ht,1,0,"ds-loading",1),e.nI1(3,"async")),2&i&&(e.Y8G("ngVar",e.bMT(1,2,n.bundles$)),e.R7$(2),e.vxM(e.bMT(3,4,n.isProcessingMoveRequest)?2:-1))},dependencies:[fe.C,K.A,Dt,_.YU,R.Wk,de.v,b.h,ie.r,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.drag-handle[_ngcontent-%COMP%]:hover, .bitstream-row-drag-handle[_ngcontent-%COMP%]:hover{cursor:move}.cdk-drag-preview[_ngcontent-%COMP%]{margin-left:0;box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}
1.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging[_ngcontent-%COMP%]   .bitstream-row-drag-handle[_ngcontent-%COMP%], .cdk-drop-list-dragging[_ngcontent-%COMP%]   .drag-handle[_ngcontent-%COMP%]{cursor:grabbing}[_nghost-%COMP%]     .larger-tooltip .tooltip-inner{max-width:500px}.table-border[_ngcontent-%COMP%]{border:1px solid #dee2e6}[_nghost-%COMP%]     .pagination{padding-top:.5rem}.scrollable-table[_ngcontent-%COMP%]{overflow-x:auto}.disabled-overlay[_ngcontent-%COMP%]{opacity:.6}.loading-overlay[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%}tr.table-danger[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{--bs-table-bg-type: var(--bs-table-bg)}"]}))}return s(),a})();var Jt=c(69295),ye=c(93136),Le=c(99172),J=c(11798),Qt=c(14744),Zt=c(95386),qt=c(26773);const ei=(s,a)=>({"btn-danger":s,"btn-primary":a}),ti=(s,a)=>({"fa-trash":s,"fa-save":a});function ii(s,a){if(1&s){const o=e.RV6();e.j41(0,"tr")(1,"td")(2,"input",10,0),e.nI1(4,"async"),e.nI1(5,"async"),e.nI1(6,"translate"),e.bIt("change",function(){const i=d.eBV(o).$implicit,n=e.XpG(3);return d.Njj(n.switch(i.dso.id))}),e.k0s()(),e.j41(7,"td")(8,"a",11),e.EFF(9),e.k0s()()()}if(2&s){const o=a.$implicit,t=e.sdS(3),i=e.XpG(3);e.R7$(2),e.Y8G("name",e.mNQ(o.dso.id))("disabled",!1===e.bMT(4,7,o.canSelect$))("ngModel",e.bMT(5,9,o.selected$)),e.BMQ("aria-label",e.bMT(6,11,t.checked?"collection.select.table.deselect":"collection.select.table.select")),e.R7$(6),e.Y8G("routerLink",o.route),e.R7$(),e.JRh(i.dsoNameService.getName(o.dso))}}function ni(s,a){if(1&s&&(e.j41(0,"ds-pagination",2)(1,"div",6)(2,"table",7)(3,"thead")(4,"tr")(5,"th")(6,"span",8),e.EFF(7),e.nI1(8,"translate"),e.k0s()(),e.j41(9,"th",9),e.EFF(10),e.nI1(11,"translate"),e.k0s()()(),e.j41(12,"tbody"),e.Z7z(13,ii,10,13,"tr",null,e.fX1),e.nI1(15,"async"),e.k0s()()()()),2&s){const o=e.XpG().ngVar,t=e.XpG();e.Y8G("paginationOptions",t.paginationOptions)("sortOptions",t.sortOptions)("collectionSize",null==o||null==o.payload?null:o.payload.totalElements)("hidePagerWhenSinglePage",!0)("hideGear",!0),e.R7$(7),e.JRh(e.bMT(8,7,"collection.select.table.selected")),e.R7$(3),e.JRh(e.bMT(11,9,"collection.select.table.title")),e.R7$(3),e.Dyx(e.bMT(15,11,t.selectCollections$))}}function si(s,a){1&s&&(e.j41(0,"div",3),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"collection.select.empty")," "))}function oi(s,a){1&s&&(e.nrm(0,"ds-error",4),e.nI1(1,"translate")),2&s&&e.Y8G("message",e.mNQ(e.bMT(1,2,"error.collections")))}function ai(s,a){1&s&&(e.nrm(0,"ds-loading",4),e.nI1(1,"translate")),2&s&&e.Y8G("message",e.mNQ(e.bMT(1,2,"loading.collections")))}function li(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",12)(1,"button",13),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.onCancel())}),e.nrm(2,"i",14),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"button",15),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.confirmSelected())}),e.nrm(6,"i",16),e.EFF(7),e.nI1(8,"translate"),e.k0s()()}if(2&s){const o=a.ngVar,t=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,5,t.cancelButton)," "),e.R7$(2),e.Y8G("ngClass",e.l_i(9,ei,t.dangerConfirm,!t.dangerConfirm))("dsBtnDisabled",0===(null==o?null:o.length)),e.R7$(),e.Y8G("ngClass",e.l_i(12,ti,t.dangerConfirm,!t.dangerConfirm)),e.R7$(),e.SpI(" ",e.bMT(8,7,t.confirmButton)," ")}}function ri(s,a){if(1&s&&(e.qex(0),e.nVh(1,ni,16,13,"ds-pagination",2),e.nVh(2,si,3,3,"div",3),e.nVh(3,oi,2,4,"ds-error",4),e.nVh(4,ai,2,4,"ds-loading",4),e.DNE(5,li,9,15,"div",5),e.nI1(6,"async"),e.bVm()),2&s){const o=a.ngVar,t=e.XpG();e.R7$(),e.vxM((null==o||null==o.payload?null:o.payload.totalElements)>0||(null==o||null==o.payload||null==o.payload.page?null:o.payload.page.length)>0?1:-1),e.R7$(),e.vxM(0===(null==o||null==o.payload?null:o.payload.totalElements)||0===(null==o||null==o.payload||null==o.payload.page?null:o.payload.page.length)?2:-1),e.R7$(),e.vxM(null!=o&&o.hasFailed?3:-1),e.R7$(),e.vxM(!o||null!=o&&o.isLoading?4:-1),e.R7$(),e.Y8G("ngVar",e.bMT(6,5,t.selectedIds$))}}let ci=(()=>{var s;class a extends qt.h{ngOnInit(){super.ngOnInit(),(0,h.hj)(this.confirmButton)||(this.confirmButton="collection.select.confirm"),this.selectCollections$=this.dsoRD$.pipe((0,h.Az)(),(0,m.Hz)(),(0,u.T)(t=>t.page.map(i=>Object.assign(new Zt.A,{dso:i,canSelect$:this.canSelect(i),selected$:this.getSelected(i.id),route:(0,U.JW)(i.id)}))))}static#e=s=()=>(this.\u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(a)))(n||a)}})(),this.\u0275cmp=e.VBU({type:a,selectors:[["ds-collection-select"]],features:[e.Vt3],decls:2,vars:3,consts:[["selectCollectionBtn",""],[4,"ngVar"],[3,"paginationOptions","sortOptions","collectionSize","hidePagerWhenSinglePage","hideGear"],["role","alert",1,"alert","alert-info","w-100"],[3,"message"],["class","space-children-mr float-end",4,"ng
1Var"],[1,"table-responsive","mt-2"],["id","collection-select",1,"table","table-striped","table-hover"],[1,"sr-only"],["scope","col"],["type","checkbox",1,"collection-checkbox",3,"change","disabled","ngModel","name"],[3,"routerLink"],[1,"space-children-mr","float-end"],[1,"btn","btn-outline-secondary","collection-cancel",3,"click"],[1,"fas","fa-times"],[1,"btn","collection-confirm",3,"click","ngClass","dsBtnDisabled"],[1,"fas",3,"ngClass"]],template:function(i,n){1&i&&(e.DNE(0,ri,7,7,"ng-container",1),e.nI1(1,"async")),2&i&&e.Y8G("ngVar",e.bMT(1,1,n.dsoRD$))},dependencies:[K.A,Qt.A,J.YN,J.Zm,J.BC,J.vS,_.YU,pe.e,R.Wk,de.v,b.h,ie.r,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:first-of-type, table[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-of-type{width:1rem!important}"]}))}return s(),a})();var Ne=c(30717),di=c(37222),pi=c(43144);const mi=["tabs"],hi=s=>({name:s});function ui(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",11)(1,"ds-collection-select",12),e.nI1(2,"async"),e.bIt("confirm",function(i){d.eBV(o);const n=e.XpG();return d.Njj(n.removeMappings(i))})("cancel",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.onCancel())}),e.k0s()()}if(2&s){let o;const t=e.XpG();e.R7$(),e.Y8G("key","browse")("dsoRD$",t.itemCollectionsRD$)("paginationOptions",null==(o=e.bMT(2,6,t.searchOptions$))?null:o.pagination)("confirmButton","item.edit.item-mapper.buttons.remove")("cancelButton","item.edit.item-mapper.cancel")("dangerConfirm",!0)}}function bi(s,a){if(1&s){const o=e.RV6();e.j41(0,"div")(1,"ds-collection-select",17),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("confirm",function(i){d.eBV(o);const n=e.XpG(2);return d.Njj(n.mapCollections(i))})("cancel",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.onCancel())}),e.k0s()()}if(2&s){let o,t;const i=e.XpG(2);e.R7$(),e.Y8G("key","map")("dsoRD$",i.mappedCollectionsRD$)("paginationOptions",null==(o=e.bMT(2,6,i.searchOptions$))?null:o.pagination)("sortOptions",null==(t=e.bMT(3,8,i.searchOptions$))?null:t.sort)("confirmButton","item.edit.item-mapper.buttons.add")("cancelButton","item.edit.item-mapper.cancel")}}function fi(s,a){1&s&&(e.j41(0,"div",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"item.edit.item-mapper.no-search")," "))}function vi(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"ds-search-form",15),e.nI1(3,"async"),e.nI1(4,"translate"),e.bIt("submitSearch",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.performedSearch=!0)}),e.k0s()()(),e.nVh(5,bi,4,10,"div"),e.nVh(6,fi,3,3,"div",16)}if(2&s){let o;const t=e.XpG();e.R7$(2),e.Y8G("query",null==(o=e.bMT(3,6,t.searchOptions$))?null:o.query
1)("currentUrl","./")("inPlaceSearch",!0)("searchPlaceholder",e.bMT(4,8,"item.edit.item-mapper.search-form.placeholder")),e.R7$(3),e.vxM(t.performedSearch?5:-1),e.R7$(),e.vxM(t.performedSearch?-1:6)}}let ze=(()=>{var s;class a{constructor(t,i,n,l,r,p,f,y,$){this.route=t,this.router=i,this.searchConfigService=n,this.searchService=l,this.notificationsService=r,this.itemDataService=p,this.collectionDataService=f,this.translateService=y,this.dsoNameService=$,this.performedSearch=!1}ngOnInit(){this.itemRD$=this.route.parent.data.pipe((0,M.s)(1),(0,u.T)(t=>t.dso)),this.itemName$=this.itemRD$.pipe((0,Y.p)(t=>(0,h.a4)(t)),(0,u.T)(t=>this.dsoNameService.getName(t.payload,!0))),this.searchOptions$=this.searchConfigService.paginatedSearchOptions,this.loadCollectionLists()}loadCollectionLists(){this.shouldUpdate$=new T.t(!0),this.itemCollectionsRD$=(0,I.z)(this.itemRD$.pipe((0,m.ak)()),this.shouldUpdate$).pipe((0,g.n)(([n,l])=>(!0===l&&this.shouldUpdate$.next(!1),this.collectionDataService.findListByHref(this.itemDataService.getMappedCollectionsEndpoint(n.id),void 0,!l,!1).pipe((0,m.v7)()))));const t=this.itemRD$.pipe((0,m.ak)(),(0,g.n)(n=>this.collectionDataService.findOwningCollectionFor(n)),(0,m.v7)()),i=(0,I.z)(this.itemCollectionsRD$,t,this.searchOptions$);this.mappedCollectionsRD$=i.pipe((0,g.n)(([n,l,r])=>this.searchService.search(Object.assign(new ge.C(r),{query:this.buildQuery([...n.payload.page,l.payload],r.query),dsoTypes:[ye.W.COLLECTION]}),1e4).pipe((0,m.jY)(),(0,Le.Z)(void 0))))}mapCollections(t){const n=(0,I.z)([this.itemRD$.pipe((0,m.yd)(),(0,u.T)(l=>l.payload),(0,u.T)(l=>l.id)),this.itemCollectionsRD$.pipe((0,m.yd)(),(0,u.T)(l=>l.payload.page),(0,u.T)(l=>l.map(r=>r.id)))]).pipe((0,g.n)(([l,r])=>(0,I.z)(this.filterIds(t,r).map(p=>this.itemDataService.mapToCollection(l,p).pipe((0,m.qD)())))));this.showNotifications(n,"item.edit.item-mapper.notifications.add")}removeMappings(t){const i=this.itemRD$.pipe((0,m.yd)(),(0,u.T)(n=>n.payload.id),(0,g.n)(n=>(0,I.z)(t.map(l=>this.itemDataService.removeMappingFromCollection(n,l).pipe((0,m.qD)())))));this.showNotifications(i,"item.edit.item-mapper.notifications.remove")}filterIds(t,i){return t.filter(n=>i.indexOf(n)<0)}showNotifications(t,i){t.subscribe(n=>{const l=n.filter(p=>p.hasSucceeded),r=n.filter(p=>p.hasFailed);if(l.length>0&&((0,I.z)([this.translateService.get(`${i}.success.head`),this.translateService.get(`${i}.success.content`,{amount:l.length})]).subscribe(([f,y])=>{this.notificationsService.success(f,y)}),this.shouldUpdate$.next(!0)),r.length>0){const p=r.filter(y=>403===y.statusCode),f=r.filter(y=>403!==y.statusCode);p.length>0&&(0,I.z)([this.translateService.get(`${i}.error.forbidden.head`),this.translateService.get(`${i}.error.forbidden.content`)]).subscribe(([$,F])=>{this.notificationsService.error($,F)}),f.length>0&&(0,I.z)([this.translateService.get(`${i}.error.head`),this.translateService.get(`${i}.error.content`,{amount:f.length})]).subscribe(([$,F])=>{this.notificationsService.error($,F)})}this.switchToFirstTab()})}tabChange(t){this.performedSearch=!1,this.router.navigateByUrl(this.getCurrentUrl())}getCurrentUrl(){return this.router.url.indexOf("?")>-1?this.router.url.substring(0,this.router.url.indexOf("?")):this.router.url}buildQuery(t,i){let n=i;for(const l of t)n=this.addExcludeCollection(l.id,n);return n}addExcludeCollection(t,i){const n=`-search.resourceid:${t}`;return(0,h.hj)(i)?`${i} AND ${n}`:n}switchToFirstTab(){this.tabs.select("browseTab")}onCancel(){this.itemRD$.pipe((0,m.yd)(),(0,m.Bo)(),(0,M.s)(1)).subscribe(t=>{this.router.navigate([(0,U._o)(t)])})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(di.g),e.rXU(Ne.S),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(Jt.CollectionDataService),e.rXU(b.c$),e.rXU(te.f))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-collection-mapper"]],viewQuery:function(i,n){if(1&i&&e.GBs(mi,5),2&i){let l;e.mGM(l=e.lsd())&&(n.tabs=l.first)}},decls:26,vars:26,consts:[["tabs","ngbNav"],[1,"container","mt-2"],[1,"row"],[1,"col-12"],["id","item-name",3,"innerHTML"],["ngbNav","",1,"nav-tabs",3,"navChange","destroyOnHide"],["role","presentation","data-test","browseTab",3,"ngbNavItem"],["ngbNavLink",""],["ngbNavContent",""],["role","presentation","data-test","mapTab",3,"ngbNavItem"],[3,"ngbNavOutlet"],[1,"mt-2"],[1,"mt-2",3,"confirm","cancel","key","dsoRD$","paginationOptions","confirmButton","cancelButton","dangerConfirm"],[1,"row","mt-2"],[1,"col-12","col-lg-6"],["
1id","search-form",3,"submitSearch","query","currentUrl","inPlaceSearch","searchPlaceholder"],["role","alert",1,"alert","alert-info","w-100"],[1,"mt-2",3,"confirm","cancel","key","dsoRD$","paginationOptions","sortOptions","confirmButton","cancelButton"]],template:function(i,n){if(1&i){const l=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.nrm(6,"p",4),e.nI1(7,"async"),e.nI1(8,"translate"),e.j41(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"ul",5,0),e.bIt("navChange",function(p){return d.eBV(l),d.Njj(n.tabChange(p))}),e.j41(14,"li",6)(15,"a",7),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.DNE(18,ui,3,8,"ng-template",8),e.k0s(),e.j41(19,"li",9),e.nI1(20,"dsBrowserOnly"),e.j41(21,"a",7),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.DNE(24,vi,7,10,"ng-template",8),e.k0s()(),e.nrm(25,"div",10),e.k0s()()()}if(2&i){const l=e.sdS(13);e.R7$(4),e.JRh(e.bMT(5,9,"item.edit.item-mapper.head")),e.R7$(2),e.Y8G("innerHTML",e.i5U(8,13,"item.edit.item-mapper.item",e.eq3(24,hi,e.bMT(7,11,n.itemName$))),e.npT),e.R7$(4),e.JRh(e.bMT(11,16,"item.edit.item-mapper.description")),e.R7$(2),e.Y8G("destroyOnHide",!0),e.R7$(2),e.Y8G("ngbNavItem","browseTab"),e.R7$(2),e.JRh(e.bMT(17,18,"item.edit.item-mapper.tabs.browse")),e.R7$(3),e.Y8G("ngbNavItem",e.bMT(20,20,"mapTab")),e.R7$(3),e.JRh(e.bMT(23,22,"item.edit.item-mapper.tabs.map")),e.R7$(3),e.Y8G("ngbNavOutlet",l)}},dependencies:[ci,w.X9,w.Um,w.sy,w.Ri,w.m_,pi.d,b.h,_.Jj,Xe.L,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}"],data:{animation:[C.qG,C.Ws]},changeDetection:0}))}return s(),a})();var gi=c(1144);const _i=s=>({item:s});function yi(s,a){1&s&&e.nrm(0,"ds-curation-form",1),2&s&&e.Y8G("dsoHandle",null==a?null:a.payload.handle)}let Ci=(()=>{var s;class a{constructor(t,i){this.route=t,this.dsoNameService=i}ngOnInit(){this.dsoRD$=this.route.parent.data.pipe((0,M.s)(1),(0,u.T)(t=>t.dso)),this.itemName$=this.dsoRD$.pipe((0,Y.p)(t=>(0,h.a4)(t)),(0,u.T)(t=>this.dsoNameService.getName(t.payload)))}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(te.f))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-curate"]],decls:7,vars:11,consts:[[1,"container","mt-3"],[3,"dsoHandle"]],template:function(i,n){if(1&i&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.nI1(3,"async"),e.nI1(4,"translate"),e.k0s(),e.nVh(5,yi,1,1,"ds-curation-form",1),e.nI1(6,"async"),e.k0s()),2&i){let l;e.R7$(2),e.JRh(e.i5U(4,4,"item.edit.curate.title",e.eq3(9,_i,e.bMT(3,2,n.itemName$)))),e.R7$(3),e.vxM((l=e.bMT(6,7,n.dsoRD$))?5:-1,l)}},dependencies:[gi.X,b.h,_.Jj,b.D9],encapsulation:2}))}return s(),a})();
1var Ce=c(67685),me=c(87433),Ie=c(39901),Ye=c(19192),We=c(60696),He=c(41954),Ii=c(44280),we=c(8447),he=c(92767),Z=c(94549),Me=c(61594);const Mi=s=>({id:s}),Ti=s=>[s,"edit"];let ne=(()=>{var s;class a{constructor(t,i,n,l,r){this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r}ngOnInit(){this.itemRD$=this.route.data.pipe((0,u.T)(t=>t.dso),(0,m.yd)()),this.itemRD$.pipe((0,Me.$)()).subscribe(t=>{this.item=t.payload,this.itemPageRoute=(0,U._o)(this.item)}),this.confirmMessage="item.edit."+this.messageKey+".confirm",this.cancelMessage="item.edit."+this.messageKey+".cancel",this.headerMessage="item.edit."+this.messageKey+".header",this.descriptionMessage="item.edit."+this.messageKey+".description"}performAction(){}processRestResponse(t){t.hasSucceeded?this.itemDataService.findById(this.item.id).pipe((s=>a=>a.pipe((0,m.v7)(),(0,Me.$)(s)))(i=>this.predicate(i))).subscribe(()=>{this.notificationsService.success(this.translateService.get("item.edit."+this.messageKey+".success")),this.router.navigate([(0,he.$r)(this.item)])}):(this.notificationsService.error(this.translateService.get("item.edit."+this.messageKey+".error")),this.router.navigate([(0,he.$r)(this.item)]))}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-simple-action"]],decls:17,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",3),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return n.performAction()}),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",6),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(15,Mi,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(13,11,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(17,Ti,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(16,13,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,b.D9],encapsulation:2}))}return s(),a})();const ki=["deleteConfirmationModal"],xi=s=>({id:s}),$i=s=>[s,"edit"],Ri=(s,a)=>a.relationship.id;function Si(s,a){if(1&s&&e.nrm(0,"ds-listable-object-component-loader",17),2&s){const o=e.XpG().ngVar,t=e.XpG(5);e.Y8G("object",o)("viewMode",t.viewMode)}}function Bi(s,a){if(1&s&&e.nrm(0,"ds-listable-object-component-loader",17),2&s){const o=e.XpG(2).ngVar,t=e.XpG(5);e.Y8G("object",o)("viewMode",t.viewMode)}}function Pi(s,a){if(1&s&&(e.j41(0,"div")(1,"div")(2,"div",26),e.EFF(3),e.k0s(),e.j41(4,"div"),e.EFF(5),e.k0s()()()),2&s){const o=a.$implicit;e.R7$(3),e.SpI(" ",o.metadataField," "),e.R7$(2),e.SpI(" ",o.metadataValue.value," ")}}function Oi(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",22)(1,"div",23),e.EFF(2),e.nI1(3,"translate"),e.j41(4,"button",24),e.bIt("click",function(){d.eBV(o);const i=e.XpG(6);return d.Njj(i.closeVirtualMetadataModal())}),e.k0s()(),e.j41(5,"div",25),e.nVh(6,Bi,1,2,"ds-listable-object-component-loader",17),e.Z7z(7,Pi,6,2,"div",null,e.fX1),e.nI1(9,"async"),e.k0s()()}if(2&s){const o=e.XpG().ngVar,t=e.XpG().$implicit;e.R7$(2),e.SpI(" ",e.bMT(3,2,"virtual-metadata.delete-item.modal-head")," "),e.R7$(4),e.vxM(o?6:-1),e.R7$(),e.Dyx(e.bMT(9,4,t.virtualMetadata$))}}function ji(s,a){if(1&s){const o=e.RV6();e.qex(0),e.nVh(1,Si,1,2,"ds-listable-object-component-loader",17),e.j41(2,"div",18)(3,"div",19)(4,"button",20),e.bIt("click",function(){d.eBV(o);const i=e.sdS(7),n=e.XpG(5);return d.Njj(n.openVirtualMetadataModal(i))}),e.nrm(5,"i",21),e.k0s()()(),e.DNE(6,Oi,10,6,"ng-template",null,1,e.C5r),e.bVm()}if(2&s){const o=a.ngVar;e.R7$(),e.vxM(o?1:-1)}}function Di(s,a){if(1&s&&(e.j41(0,"div",11),e.DNE(1,ji,8,1,"ng-container",16),e.nI1(2,"async"),e.k0s()),2&s){const o=a.$implicit;e.R7$(),e.Y8G("ngVar",e.bMT(2,1,o.relatedItem$))}}function Fi(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",11)(1,"div",12),e.bIt("click",function(){const i=d.eBV(o).ngVar,n=e.XpG().$implicit,l=e.XpG(2);return d.Njj(l.setSelected(n.relationshipType,!i))}),e.j41(2,"label"),e.nrm(3,"input",13),e.nI1(4,"async"),e.k0s()(),e.j41(5,"div",14)(6,"h5",15),e.bIt("click",function(){const i=d.eBV(o).ngVar,n=e.XpG().$implicit,l=e.XpG(2);return d.Njj(l.setSelected(n.relationshipType,!i))}),e.EFF(7),e.nI1(8,"async"),e.nI1(9,"translate"),e.k0s(),e.Z7z(10,Di,3,3,"div",11,Ri),e.nI1(12,"async"),e.k0s()()}if(2&s){const o=a.ngVar,t=e.XpG().$implicit,i=e.XpG(2);e.R7$(3),e.Y8G("checked",o)("disabled",e.bMT(4,3,i.isDeleting$)),e.R7$(4),e.SpI(" ",e.bMT(9,7,i.getRelationshipMessageKey(e.bMT(8,5,t.label$)))," "),e.R7$(3),e.Dyx(e.bMT(12,9,t.relationshipDTOs$))}}function Ei(s,a){if(1&s&&(e.j41(0,"div",6),e.DNE(1,Fi,13,11,"div",10),e.nI1(2,"async"),e.k0s()),2&s){const o=a.$implicit;e.R7$(),e.Y8G("ngVar",e.bMT(2,1,o.isSelected$))}}function Vi(s,a){if(1&s&&(e.j41(0,"div",6),e.EFF(1),e.nI1(2,"translate"),e.Z7z(3,Ei,3,3,"div",6,e.fX1),e.nI1(5,"async"),e.k0s()),2&s){const o=e.XpG();e.R7$(),e.SpI(" ",e.bMT(2,1,"virtual-metadata.delete-item.info")," "),e.R7$(2),e.Dyx(e.bMT(5,3,o.typeDTOs$))}}function Ui(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",27)(1,"h5",28),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"button",24),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.modalRef.close())}),e.k0s()(),e.j41(5,"div",25)(6,"p",26),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"p"),e.EFF(10),e.nI1(11,"translate"),e.k0s()(),e.j41(12,"div",29)(13,"button",30),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.modalRef.close())}),e.EFF(14),e.nI1(15,"translate"),e.k0s(),e.j41(16,"button",31),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.confirmDeletion())}),e.EFF(17),e.nI1(18,"translate"),e.k0s()()}2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,5,"item.edit.delete.confirmation-title")," "),e.R7$(5),e.JRh(e.bMT(8,7,"item.edit.delete.confirmation-message")),e.R7$(3),e.JRh(e.bMT(11,9,"item.edit.delete.confirmation-detail")),e.R7$(4),e.SpI(" ",e.bMT(15,11,"item.edit.delete.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(18,13,"item.edit.delete.confirm")," "))}class Xi{}class Gi{}let Ai=(()=>{var s;class a extends ne{constructor(t,i,n,l,r,p,f,y,$,F,G){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.modalService=p,this.objectUpdatesService=f,this.relationshipService=y,this.entityTypeService=$,this.linkService=F,this.scriptDataService=G,this.messageKey="delete",this.viewMode=Ye.n.ListElement,this.typeDTOs$=new T.t([]),this.relationships$=new Map,this.relatedItems$=new Map,this.virtualMetadata$=new Map,this.subs=[],this.isDeleting$=new T.t(!1)}ngOnInit(){super.ngOnInit(),this.url=this.router.url;
1const t=this.item.firstMetadataValue("dspace.entity.type");(0,h.hj)(t)&&this.subs.push(this.entityTypeService.getEntityTypeByLabel(t).pipe((0,m.yd)(),(0,m.Bo)(),(0,g.n)(i=>this.entityTypeService.getEntityTypeRelationships(i.id)),(0,m.yd)(),(0,m.Bo)(),(0,u.T)(i=>i.page),(0,g.n)(i=>0===i.length?(0,x.of)(i):(0,I.z)(i.map(n=>this.getRelationships(n))).pipe((0,u.T)(n=>i.reduce((l,r,p)=>l.some(f=>f.id===r.id)||0===n[p].length?l:[...l,r],[]))))).subscribe(i=>this.typeDTOs$.next(i.map(n=>Object.assign(new Xi,{relationshipType:n,isSelected$:this.isSelected(n),label$:this.getLabel(n),relationshipDTOs$:this.getRelationships(n).pipe((0,u.T)(l=>l.map(r=>Object.assign(new Gi,{relationship:r,relatedItem$:this.getRelatedItem(r),virtualMetadata$:this.getVirtualMetadata(r)}))))}))))),this.subs.push(this.typeDTOs$.pipe((0,M.s)(1)).subscribe(i=>this.objectUpdatesService.initialize(this.url,i.map(n=>n.relationshipType),this.item.lastModified)))}openVirtualMetadataModal(t){this.modalRef=this.modalService.open(t)}openDeleteConfirmationModal(){this.modalRef=this.modalService.open(this.deleteConfirmationModal,{centered:!0})}confirmDeletion(){this.modalRef.close(),this.performAction()}closeVirtualMetadataModal(){this.modalRef.close()}getRelationshipMessageKey(t){return(0,h.a4)(t)&&t.indexOf("Of")>-1?`relationships.${t.substring(0,t.indexOf("Of")+2)}`:t}getLabel(t){return this.getRelationships(t).pipe((0,g.n)(i=>this.isLeftItem(i[0]).pipe((0,u.T)(n=>n?t.leftwardType:t.rightwardType))))}getRelationships(t){return this.relationships$.has(t)||this.relationships$.set(t,this.relationshipService.getItemRelationshipsArray(this.item).pipe((0,g.n)(i=>(0,I.z)(i.map(n=>this.getRelationshipType(n))).pipe((0,Ie.U)([]),(0,u.T)(n=>i.filter((l,r)=>t.id===n[r].id)))))),this.relationships$.get(t)}getRelationshipType(t){return this.linkService.resolveLinks(t,(0,X.s)("relationshipType"),(0,X.s)("leftItem",void 0,(0,X.s)("accessStatus")),(0,X.s)("rightItem",void 0,(0,X.s)("accessStatus"))),t.relationshipType.pipe((0,m.yd)(),(0,m.Bo)(),(0,Y.p)(i=>(0,h.a4)(i)&&(0,h.hj)(i.uuid)))}getRelatedItem(t){return this.relatedItems$.has(t)||this.relatedItems$.set(t,this.isLeftItem(t).pipe((0,g.n)(i=>i?t.rightItem:t.leftItem),(0,m.yd)(),(0,m.Bo)())),this.relatedItems$.get(t)}getVirtualMetadata(t){return this.virtualMetadata$.has(t)||this.virtualMetadata$.set(t,this.getRelatedItem(t).pipe((0,u.T)(i=>Object.entries(i.metadata).map(([n,l])=>l.filter(r=>r.authority&&r.authority.endsWith(t.id)).map(r=>({metadataField:n,metadataValue:r}))).reduce((n,l)=>n.concat(l))))),this.virtualMetadata$.get(t)}isLeftItem(t){return t.leftItem.pipe((0,m.yd)(),(0,m.Bo)(),(0,Y.p)(i=>(0,h.a4)(i)&&(0,h.hj)(i.uuid)),(0,u.T)(i=>i.uuid===this.item.uuid))}isSelected(t){return this.objectUpdatesService.isSelectedVirtualMetadata(this.url,this.item.uuid,t.uuid)}setSelected(t,i){!1===this.isDeleting$.value&&this.objectUpdatesService.setSelectedVirtualMetadata(this.url,this.item.uuid,t.uuid,i)}performAction(){this.isDeleting$.next(!0),this.subs.push(this.typeDTOs$.pipe((0,g.n)(t=>(0,I.z)(t.map(i=>i.isSelected$)).pipe((0,Ie.U)([]),(0,u.T)(i=>t.filter((n,l)=>i[l])),(0,u.T)(i=>i.map(n=>n.relationshipType.id)))),(0,g.n)(t=>{const i=[Object.assign(new He.p,{name:"-i",value:this.item.uuid})];return(0,h.hj)(t)&&i.push(Object.assign(new He.p,{name:"-c",value:t.join(",")})),this.scriptDataService.invoke(We.c0,i,[])}),(0,m.qD)()).subscribe(t=>{this.notify(t)}))}notify(t){t.hasSucceeded&&t.payload?(this.notificationsService.success(this.translateService.get("item.edit.delete.success")),this.router.navigateByUrl((0,Ii.yJ)(t.payload.processId))):(this.notificationsService.error(this.translateService.get("item.edit.delete.error")),this.router.navigate([(0,he.$r)(this.item)]))}ngOnDestroy(){this.subs.filter(t=>(0,h.a4)(t)).forEach(t=>t.unsubscribe())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$),e.rXU(w.Bq),e.rXU(z.F),e.rXU(me.RelationshipD
1ataService),e.rXU(Ce.f),e.rXU(ue._),e.rXU(We.ScriptDataService))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-delete"]],viewQuery:function(i,n){if(1&i&&e.GBs(ki,7),2&i){let l;e.mGM(l=e.lsd())&&(n.deleteConfirmationModal=l.first)}},inputs:{url:"url"},features:[e.Vt3],decls:25,vars:30,consts:[["deleteConfirmationModal",""],["virtualMetadataModal",""],[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"mb-4"],[1,"space-children-mr"],[1,"btn","btn-danger","perform-action",3,"click","dsBtnDisabled"],[1,"btn","btn-outline-secondary","cancel",3,"dsBtnDisabled","routerLink"],["class","d-flex flex-row",4,"ngVar"],[1,"d-flex","flex-row"],[1,"m-2",3,"click"],["type","checkbox",3,"checked","disabled"],[1,"flex-column","flex-grow-1"],[3,"click"],[4,"ngVar"],[3,"object","viewMode"],[1,"ms-auto"],[1,"btn-group"],[1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-info","fa-fw"],[1,"thumb-font-1"],[1,"modal-header"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"fw-bold"],[1,"modal-header","bg-light","text-dark"],[1,"modal-title"],[1,"modal-footer"],[1,"btn","btn-secondary",3,"click"],[1,"btn","btn-danger",3,"click"]],template:function(i,n){if(1&i){const l=e.RV6();e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",5),e.qex(10),e.nVh(11,Vi,6,5,"div",6),e.nI1(12,"async"),e.nI1(13,"async"),e.bVm(),e.DNE(14,Ui,19,15,"ng-template",null,0,e.C5r),e.j41(16,"div",7)(17,"button",8),e.nI1(18,"async"),e.bIt("click",function(){return d.eBV(l),d.Njj(n.openDeleteConfirmationModal())}),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"button",9),e.nI1(22,"async"),e.EFF(23),e.nI1(24,"translate"),e.k0s()()()()()}2&i&&(e.R7$(4),e.JRh(e.i5U(5,9,n.headerMessage,e.eq3(26,xi,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,12,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(2),e.vxM(e.bMT(12,14,n.typeDTOs$)&&e.bMT(13,16,n.typeDTOs$).length>0?11:-1),e.R7$(6),e.Y8G("dsBtnDisabled",e.bMT(18,18,n.isDeleting$)),e.R7$(2),e.SpI(" ",e.bMT(20,20,n.confirmMessage)," "),e.R7$(2),e.Y8G("dsBtnDisabled",e.bMT(22,22,n.isDeleting$))("routerLink",e.eq3(28,$i,n.itemPageRoute)),e.R7$(2),e.SpI(" ",e.bMT(24,24,n.cancelMessage)," "))},dependencies:[K.A,we.v,Z.W,R.Wk,b.h,ie.r,_.Jj,b.D9],encapsulation:2}))}return s(),a})();var Li=c(4348);const Ni=s=>({id:s}),zi=s=>({type:s}),Yi=s=>[s,"edit"];function Wi(s,a){1&s&&(e.EFF(0),e.nI1(1,"translate")),2&s&&e.SpI(" ",e.bMT(1,1,"item.edit.move.inheritpolicies.tooltip")," ")}function Hi(s,a){1&s&&(e.j41(0,"span"),e.nrm(1,"i",17),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"item.edit.move.save-button")," "))}function Ki(s,a){1&s&&(e.j41(0,"span"),e.nrm(1,"i",18),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"item.edit.move.processing")," "))}let Ji=(()=>{var s;class a{constructor(t,i,n,l,r,p,f,y){this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.searchService=r,this.translateService=p,this.requestService=f,this.dsoNameService=y,this.selectorType=ye.W.COLLECTION,this.inheritPolicies=!1,this.canSubmit=!1,this.processing=!1,this.COLLECTIONS=[ye.W.COLLECTION]}ngOnInit(){this.itemRD$=this.route.data.pipe((0,u.T)(t=>t.dso),(0,m.yd)()),this.itemPageRoute$=this.itemRD$.pipe((0,m.Hz)(),(0,u.T)(t=>(0,U._o)(t))),this.itemRD$.subscribe(t=>{this.item=t.payload}),this.itemRD$.pipe((0,m.yd)(),(0,m.Bo)(),(0,g.n)(t=>t.owningCollection),(0,m.yd)(),(0,m.Bo)()).subscribe(t=>{this.originalCollection=t})}selectDso(t){this.selectedCollection=t,this.selectedCollectionName=this.dsoNameService.getName(t),this.canSubmit=!0}getCurrentUrl(){return this.router.url}moveToCollection(){this.processing=!0;const t=this.itemDataService.moveToCollection(this.item.id,this.selectedCollection,this.inheritPolicies).pipe((0,m.qD)());t.subscribe(i=>{i.hasSucceeded?this.notificationsService.success(this.translateService.get("item.edit.move.success")):this.notificationsService.error(this.translateService.get("item.edit.move.error"))}),t.pipe((0,g.n)(()=>this.requestService.setStaleByHrefSubstring(this.item.id)),(0,g.n)(()=>this.itemDataService.findById(this.item.id,!1,!0,(0,X.s)("owningCollection"))),(0,m.qD)()).subscribe(()=>{this.processing=!1,this.router.navigate([(0,he.$r)(this.item)])})}discard(){this.selectedCollection=null,this.canSubmit=!1}get canMove(){return this.canSubmit&&this.selectedCollection?.id!==this.originalCollection.id}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(Ne.S),e.rXU(b.c$),e.rXU(se.B),e.rXU(te.f))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-move"]],decls:46,vars:44,consts:[["tooltipContent",""],[1,"container"],[1,"row"],[1,"col-12"],[1,"card","mb-3"],[1,"card-header"],[1,"card-body"],[3,"onSelect","types","currentDSOId"],["for","inheritPoliciesCheckbox",1,"form-label"],["type","checkbox","name","tc","id","inheritPoliciesCheckbox",3,"ngModelChange","ngModel","ngbTooltip"],[1,"button-row","bottom"],[1,"float-end","space-children-mr"],[1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-arrow-left"],[1,"btn","btn-primary",3,"click","dsBtnDisabled"],[1,"btn","btn-danger",3,"click","dsBtnDisabled"],[1,"fas","fa-times"],[1,"fas","fa-save"],[1,"fas","fa-circle-notch","fa-spin"]],template:function(i,n){if(1&i){const l=e.RV6();e.j41(0,"div",1)(1,"div",2)(2,"div",3)(3,"h1"),e.EFF(4),e.nI1(5,"async"),e.nI1(6,"translate"),e.k0s(),e.j41(7,"p"),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"div",2)(11,"div",3)(12,"div",4)(13,"div",5),e.EFF(14),e.nI1(15,"translate"),e.nI1(16,"translate"),e.k0s(),e.j41(17,"div",6)(18,"ds-authorized-collection-selector",7),e.bIt("onSelect",function(p){return d.eBV(l),d.Njj(n.selectDso(p))}),e.k0s()(),e.nrm(19,"div"),e.k0s()()(),e.j41(20,"div",2)(21,"div",3)(22,"p")(23,"label",8),e.DNE(24,Wi,2,3,"ng-template",null,0,e.C5r),e.j41(26,"input",9),e.mxI("ngModelChange",function(p){return d.eBV(l),e.DH7(n.inheritPolicies,p)||(n.inheritPolicies=p),d.Njj(p)}),e.k0s(),e.EFF(27),e.nI1(28,"translate"),e.k0s()(),e.j41(29,"p"),e.EFF(30),e.nI1(31,"translate"),e.k0s()()(),e.j41(32,"div",10)(33,"div",11)(34,"button",12),e.nI1(35,"async"),e.nrm(36,"i",13),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"button",14),e.bIt("click",function(){return d.eBV(l),d.Njj(n.moveToCollection())}),e.nVh(40,Hi,4,3,"span"),e.nVh(41,Ki,4,3,"span"),e.k0s(),e.j41(42,"button",15),e.bIt("click",function(){return d.eBV(l),d.Njj(n.discard())}),e.nrm(43,"i",16),e.EFF(44),e.nI1(45,"translate"),e.k0s()()()()()()}if(2&i){let l;const r=e.sdS(25);e.R7$(4),e.JRh(e.i5U(6,18,"item.edit.move.head",e.eq3(38,Ni,null==(l=e.bMT(5,16,n.itemRD$))||null==l.payload?null:l.payload.handle))),e.R7$(4),e.JRh(e.bMT(9,21,"item.edit.move.description")),e.R7$(6),e.JRh(e.i5U(16,25,"dso-selector.placeholder",e.eq3(40,zi,e.bMT(15,23,"dso-selector.placeholder.type.collection")))),e.R7$(4),e.Y8G("types",n.COLLECTIONS)("currentDSOId",n.selectedCollection?n.selectedCollection.id:n.originalCollection.id),e.R7$(8),e.R50("ngModel",n.inheritPolicies),e.Y8G("ngbTooltip",r),e.R7$(),e.SpI(" ",e.bMT(28,28,"item.edit.move.inheritpolicies.checkbox")," "),e.R7$(3),e.SpI(" ",e.bMT(31,30,"item.edit.move.inheritpolicies.description")," "),e.R7$(4),e.Y8G("routerLink",e.eq3(42,Yi,e.bMT(35,32,n.itemPageRoute$))),e.R7$(3),e.SpI(" ",e.bMT(38,34,"item.edit.move.cancel")," "),e.R7$(2),e.Y8G("dsBtnDisabled",!n.canMove),e.R7$(),e.vxM(n.processing?-1:40),e.R7$(),e.vxM(n.processing?41:-1),e.R7$(),e.Y8G("dsBtnDisabled",!n.canSubmit),e.R7$(2),e.SpI(" ",e.bMT(45,36,"item.edit.move.discard-button")," ")}},dependencies:[Li.e,K.A,J.YN,J.Zm,J.BC,J.vS,w.UN,w.md,R.Wk,b.h,_.Jj,b.D9],encapsulation:2}))}return s(),a})();var j=c(85360),B=c(55021);const Qi=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.AdministratorOf)),Zi=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanManageBitstreamBundles)),qi=(0,j.L)(()=>B.Z,()=>
1(0,x.of)(k._.CanManageMappings)),en=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.AdministratorOf)),tn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanDelete)),nn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanManagePolicies)),sn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanEditMetadata)),on=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanMove)),an=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanMakePrivate)),ln=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanRegisterDOI)),rn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.ReinstateItem)),cn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanManageRelationships)),pn=(0,c(69944).FO)(()=>B.Z,()=>(0,x.of)([k._.CanManageMappings,k._.WithdrawItem,k._.ReinstateItem,k._.CanManagePolicies,k._.CanMakePrivate,k._.CanDelete,k._.CanMove,k._.CanRegisterDOI])),mn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.CanManageVersions)),hn=(0,j.L)(()=>B.Z,()=>(0,x.of)(k._.WithdrawItem)),un=s=>({id:s}),bn=s=>[s,"edit"];let fn=(()=>{var s;class a extends ne{constructor(t,i,n,l,r){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.messageKey="private",this.predicate=p=>!p.payload.isDiscoverable}performAction(){this.itemDataService.setDiscoverable(this.item,!1).pipe((0,m.qD)()).subscribe(t=>{this.processRestResponse(t)})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-private"]],features:[e.Vt3],decls:17,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",3),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return n.performAction()}),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",6),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(15,un,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(13,11,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(17,bn,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(16,13,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,b.D9],encapsulation:2}))}return s(),a})();const vn=s=>({id:s}),gn=s=>[s,"edit"];let _n=(()=>{var s;class a extends ne{constructor(t,i,n,l,r){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.messageKey="public",this.predicate=p=>p.payload.isDiscoverable}performAction(){this.itemDataService.setDiscoverable(this.item,!0).pipe((0,m.qD)()).subscribe(t=>{this.processRestResponse(t)})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-public"]],features:[e.Vt3],decls:17,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",3),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return n.performAction()}),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",6),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(15,vn,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(13,11,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(17,gn,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(16,13,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,b.D9],encapsulation:2}))}return s(),a})();var yn=c(77714);const Cn=s=>({id:s}),In=s=>[s,"edit"];function wn(s,a){if(1&s&&(e.j41(0,"div")(1,"p",8),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"translate"),e.k0s()()),2&s){const o=e.XpG().$implicit,t=e.XpG();e.R7$(2),e.E5c("",e.bMT(3,3,t.doiToUpdateMessage),": ",o.value," (",e.bMT(4,5,"item.edit.identifiers.doi.status."+o.identifierStatus),") ")}}function Mn(s,a){if(1&s&&(e.j41(0,"div",3),e.nVh(1,wn,5,7,"div"),e.k0s()),2&s){const o=a.$implicit;e.R7$(),e.vxM("doi"===o.identifierType?1:-1)}}let Tn=(()=>{var s;class a extends ne{constructor(t,i,n,l,r,p){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.identifierDataService=p,this.messageKey="register-doi",this.doiToUpdateMessage="item.edit."+this.messageKey+".to-update",this.processing=!1}ngOnInit(){this.itemRD$=this.route.data.pipe((0,u.T)(t=>t.dso),(0,m.yd)()),this.itemRD$.pipe((0,Me.$)()).subscribe(t=>{this.item=t.payload,this.itemPageRoute=(0,U._o)(this.item),this.identifiers$=this.identifierDataService.getIdentifierDataFor(this.item).pipe((0,u.T)(i=>401!==i.statusCode&&(0,h.a4)(i.payload)?i.payload.identifiers:null))}),this.confirmMessage="item.edit."+this.messageKey+".confirm",this.cancelMessage="item.edit."+this.messageKey+".cancel",this.headerMessage="item.edit."+this.messageKey+".header",this.descriptionMessage="item.edit."+this.messageKey+".description"}performAction(){this.registerDoi()}registerDoi(){this.processing=!0,this.identifierDataService.registerIdentifier(this.item,"doi").subscribe(t=>{t.hasCompleted&&(this.processing=!1,this.processRestResponse(t))})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$),e.rXU(yn.IdentifierDataService))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-register-doi"]],features:[e.Vt3],decls:20,vars:21,consts:[[1,"container"],[1,"row"],[1,"col-12"],[1,"w-100","p"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"],[1,"float-start"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.Z7z(9,Mn,2,1,"div",3,e.fX1),e.nI1(11,"async"),e.nrm(12,"ds-modify-item-overview",4),e.j41(13,"div",5)(14,"button",6),e.bIt("click",function(){return n.performAction()}),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.j41(17,"button",7),e.EFF(18),e.nI1(19,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(17,Cn,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Dyx(e.bMT(11,11,n.identifiers$)),e.R7$(3),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(16,13,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(19,In,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(19,15,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,_.Jj,b.D9],encapsulation:2}))}return s(),a})();const kn=s=>({id:s}),xn=s=>[s,"edit"];let $n=(()=>{var s;class a extends ne{constructor(t,i,n,l,r){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.messageKey="reinstate",this.predicate=p=>!p.payload.isWithdrawn}performAction(){this.itemDataService.setWithDrawn(this.item,!1).pipe((0,m.qD)()).subscribe(t=>{this.processRestResponse(t)})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-reinstate"]],features:[e.Vt3],decls:17,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",3),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return n.performAction()}),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",6),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(15,kn,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(13,11,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(17,xn,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(16,13,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,b.D9],encapsulation:2}))}return s(),a})();var Rn=c(88392),Sn=c(76626),Bn=c(23294),Ke=c(983),Je=c(70274),Te=c(56594);let ke=(()=>{var s;class a{constructor(t,i,n,l,r,p,f){this.itemService=t,this.objectUpdatesService=i,this.notificationsService=n,this.modalService=l,this.relationshipService=r,this.entityTypeService=p,this.translateService=f,this.notificationsPrefix="item.edit.relationships.notifications.",this.isSaving$=new T.t(!1)}submit(t,i){this.isSaving$.next(!0),this.objectUpdatesService.getFieldUpdates(i,[],!0).pipe((0,u.T)(n=>Object.values(n).filter(l=>(0,h.a4)(l)).filter(l=>l.changeType===O.B.ADD||l.changeType===O.B.REMOVE)),(0,M.s)(1),(0,g.n)(n=>n),(0,Je.H)(n=>n.changeType===O.B.REMOVE?this.deleteRelationship(n.field).pipe((0,M.s)(1),(0,g.n)(l=>l.hasSucceeded?this.itemService.invalidateByHref(n.field.relatedItem._links.self.href).pipe((0,u.T)(()=>l)):[l])):n.changeType===O.B.ADD?this.addRelationship(n.field).pipe((0,M.s)(1),(0,g.n)(l=>{if(l.hasSucceeded){const{leftItem:r,rightItem:p}=l.payload._links;return r.href===t.self?this.itemService.invalidateByHref(p.href).pipe((0,u.T)(()=>l)):this.itemService.invalidateByHref(r.href).pipe((0,u.T)(()=>l))}return[l]})):Ke.w),(0,Te.$)(),(0,g.n)(n=>
1this.itemService.invalidateByHref(t.self).pipe((0,u.T)(()=>n)))).subscribe(n=>{n.length>0&&(this.initializeOriginalFields(t,i),this.displayNotifications(n),this.modalService.dismissAll(),this.isSaving$.next(!1))})}initializeOriginalFields(t,i){return this.relationshipService.getRelatedItems(t).pipe((0,M.s)(1)).subscribe(n=>{this.objectUpdatesService.initialize(i,n,t.lastModified)})}deleteRelationship(t){let i;return i=t.keepLeftVirtualMetadata&&t.keepRightVirtualMetadata?"all":t.keepLeftVirtualMetadata?"left":t.keepRightVirtualMetadata?"right":"none",this.relationshipService.deleteRelationship(t.uuid,i,!1)}addRelationship(t){let i,n,l,r;return t.originalIsLeft?(i=t.originalItem,n=t.relatedItem,l=null,r=t.nameVariant):(i=t.relatedItem,n=t.originalItem,l=t.nameVariant,r=null),this.relationshipService.addRelationship(t.type.id,i,n,l,r,!1)}displayNotifications(t){const i=t.filter(l=>l.hasFailed),n=t.filter(l=>l.hasSucceeded);i.forEach(l=>{this.notificationsService.error(this.getNotificationTitle("failed"),l.errorMessage)}),n.length>0&&this.notificationsService.success(this.getNotificationTitle("saved"),this.getNotificationContent("saved"))}isProvidedItemTypeLeftType(t,i,n){return this.getRelationshipLeftAndRightType(t).pipe((0,u.T)(([l,r])=>l.id===i.id||r.id!==i.id&&void console.warn(`The item ${n.uuid} is not on the right or the left side of relationship type ${t.uuid}`)))}shouldDisplayBothRelationshipSides(t,i){return this.getRelationshipLeftAndRightType(t).pipe((0,u.T)(([n,l])=>n.id===i.id&&l.id===i.id&&t.leftwardType!==t.rightwardType))}getRelationshipLeftAndRightType(t){const i=t.leftType.pipe((0,m.yd)(),(0,m.Bo)()),n=t.rightType.pipe((0,m.yd)(),(0,m.Bo)());return(0,I.z)([i,n])}getNotificationTitle(t){return this.translateService.instant(this.notificationsPrefix+t+".title")}getNotificationContent(t){return this.translateService.instant(this.notificationsPrefix+t+".content")}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(d.KVO(D.ItemDataService),d.KVO(z.F),d.KVO(P.I),d.KVO(w.Bq),d.KVO(me.RelationshipD
1ataService),d.KVO(Ce.f),d.KVO(b.c$))},this.\u0275prov=d.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}))}return s(),a})();c(89505),c(83174);var Qe=c(79096),Pn=c(10186),On=c(92972),jn=c(98101),Ze=c(22806),Dn=c(88503),Fn=c(55289),En=c(76089);function Vn(s,a){if(1&s&&(e.j41(0,"div")(1,"div",14),e.EFF(2),e.k0s(),e.j41(3,"div"),e.EFF(4),e.k0s()()),2&s){const o=a.$implicit;e.R7$(2),e.SpI(" ",o.metadataField," "),e.R7$(2),e.SpI(" ",o.metadataValue.value," ")}}function Un(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",9),e.bIt("click",function(){const i=d.eBV(o).ngVar,n=e.XpG().$implicit,l=e.XpG();return d.Njj(l.setSelectedVirtualMetadataItem(n.item,!i))}),e.j41(1,"div",10)(2,"label"),e.nrm(3,"input",11),e.k0s()(),e.j41(4,"div",12),e.nrm(5,"ds-listable-object-component-loader",13),e.Z7z(6,Vn,5,2,"div",null,e.fX1),e.k0s()()}if(2&s){const o=a.ngVar,t=e.XpG().$implicit,i=e.XpG();e.R7$(3),e.Y8G("checked",o),e.R7$(2),e.Y8G("object",t.item),e.R7$(),e.Dyx(i.virtualMetadata.get(t.item.uuid))}}function Xn(s,a){1&s&&(e.DNE(0,Un,8,2,"div",8),e.nI1(1,"async")),2&s&&e.Y8G("ngVar",e.bMT(1,1,a.$implicit.isSelectedVirtualMetadataItem$))}let Gn=(()=>{var s;class a{constructor(t,i){this.objectUpdatesService=t,this.appConfig=i,this.close=new e.bkB,this.save=new e.bkB,this.itemDTOs$=new T.t([]),this.subs=[],this.virtualMetadata=new Map,this.showThumbnails=this.appConfig.browseBy.showThumbnails}getVirtualMetadata(t){return Object.entries(t.metadata).map(([i,n])=>n.filter(l=>!i.startsWith("relation")&&l.authority&&l.authority.endsWith(this.relationshipId)).map(l=>({metadataField:i,metadataValue:l}))).reduce((i,n)=>i.concat(n),[])}setSelectedVirtualMetadataItem(t,i){this.objectUpdatesService.setSelectedVirtualMetadata(this.url,this.relationshipId,t.uuid,i)}isSelectedVirtualMetadataItem(t){return this.objectUpdatesService.isSelectedVirtualMetadata(this.url,this.relationshipId,t.uuid)}trackItemDTO(t,i){return i?.item?.uuid}ngOnInit(){this.subs.push(this.itemDTOs$.subscribe(t=>{t.forEach(i=>this.virtualMetadata.set(i.item.uuid,this.getVirtualMetadata(i.item)))}))}ngOnChanges(){(0,h.a4)(this.leftItem)&&(0,h.a4)(this.rightItem)&&this.itemDTOs$.next([{item:this.leftItem,isSelectedVirtualMetadataItem$:this.isSelectedVirtualMetadataItem(this.leftItem)},{item:this.rightItem,isSelectedVirtualMetadataItem$:this.isSelectedVirtualMetadataItem(this.rightItem)}])}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(z.F),e.rXU(Qe.vQ))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-virtual-metadata"]],inputs:{url:"url",relationshipId:"relationshipId",leftItem:"leftItem",rightItem:"rightItem"},outputs:{close:"close",save:"save"},features:[e.OA$],decls:14,vars:9,consts:[[3,"ngClass"],[1,"modal-header"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"item","d-flex","flex-row"],[1,"d-flex","flex-row-reverse","m-2"],[1,"btn","btn-primary","save",3,"click"],["aria-hidden","true",1,"fas","fa-save"],["class","item d-flex flex-row",3,"click",4,"ngVar"],[1,"item","d-flex","flex-row",3,"click"],[1,"m-2"],["type","checkbox",1,"select",3,"checked"],[1,"flex-column"],[3,"object"],[1,"fw-bold"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2),e.nI1(3,"translate"),e.j41(4,"button",2),e.bIt("click",function(){return n.close.emit()}),e.k0s()(),e.j41(5,"div",3),e.Z7z(6,Xn,2,3,"div",4,n.trackItemDTO,!0),e.nI1(8,"async"),e.j41(9,"div",5)(10,"button",6),e.bIt("click",function(){return n.save.emit()}),e.nrm(11,"i",7),e.EFF(12),e.nI1(13,"translate"),e.k0s()()()()),2&i&&(e.Y8G("ngClass",n.showThumbnails?"hide-modal-thumbnail-column":""),e.R7$(2),e.SpI("",e.bMT(3,3,"virtual-metadata.delete-relationship.modal-head")," "),e.R7$(4),e.Dyx(e.bMT(8,5,n.itemDTOs$)),e.R7$(6),e.SpI(" ",e.bMT(13,7,"item.edit.metadata.save-button")," "))},dependencies:[we.v,_.YU,b.h,ie.r,_.Jj,b.D9],encapsulation:2}))}return s(),a})();function An(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",1)(1,"div",2),e.nrm(2,"ds-listable-object-component-loader",3),e.nI1(3,"async"),e.k0s(),e.j41(4,"div",4)(5,"div",5)(6,"button",6),e.nI1(7,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(),n=e.sdS(3);return d.Njj(i.openVirtualMetadataModal(n))}),e.nrm(8,"i",7),e.k0s(),e.j41(9,"button",8),e.nI1(10,"translate"),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.undo())}),e.nrm(11,"i",9),e.k0s()()()()}if(2&s){const o=e.XpG();e.R7$(2),e.Y8G("object",e.bMT(3,9,o.relatedItem$))("viewMode",o.viewMode)("value",o.nameVariant),e.R7$(4),e.Y8G("title",e.mNQ(e.bMT(7,11,"item.edit.metadata.edit.buttons.remove")))("dsBtnDisabled",!o.canRemove()),e.R7$(3),e.Y8G("title",e.mNQ(e.bMT(10,13,"item.edit.metadata.edit.buttons.undo")))("dsBtnDisabled",!o.canUndo())}}function Ln(s,a){if(1&s){const o=e.RV6();e.j41(0,"ds-virtual-metadata",10),e.nI1(1,"async"),e.nI1(2,"async"),e.bIt("close",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.closeVirtualMetadataModal())})("save",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.remove())}),e.k0s()}if(2&s){const o=e.XpG();e.Y8G("relationshipId",o.relationship.id)("leftItem",e.bMT(1,4,o.leftItem$))("rightItem",e.bMT(2,6,o.rightItem$))("url",o.url)}}let Nn=(()=>{var s;class a{get relationship(){return this.update.relationship}get update(){return this.fieldUpdate.field}get nameVariant(){return this.update.nameVariant}constructor(t,i){this.objectUpdatesService=t,this.modalService=i,this.relatedItem$=new T.t(null),this.viewMode=Ye.n.ListElement}ngOnChanges(){this.relationship&&(this.relationship.leftItem||this.relationship.rightItem)?(this.leftItem$=this.relationship.leftItem.pipe((0,m.yd)(),(0,m.Bo)(),(0,Y.p)(t=>(0,h.a4)(t)&&(0,h.hj)(t.uuid))),this.rightItem$=this.relationship.rightItem.pipe((0,m.yd)(),(0,m.Bo)(),(0,Y.p)(t=>(0,h.a4)(t)&&(0,h.hj)(t.uuid))),(0,I.z)([this.leftItem$,this.rightItem$]).pipe((0,u.T)(([t,i])=>t.uuid===this.editItem.uuid?i:t),(0,M.s)(1)).subscribe(t=>{this.relatedItem$.next(t)})):this.relatedItem$.next(this.update.relatedItem)}remove(){this.closeVirtualMetadataModal(),(0,I.z)([this.leftItem$,this.rightItem$]).pipe((0,u.T)(t=>t.map(i=>this.objectUpdatesService.isSelectedVirtualMetadata(this.url,this.relationship.id,i.uuid))),(0,g.n)(t=>(0,I.z)(t)),(0,u.T)(t=>Object.assign({},this.fieldUpdate.field,{keepLeftVirtualMetadata:!0===t[0],keepRightVirtualMetadata:!0===t[1]})),(0,M.s)(1)).subscribe(t=>{this.objectUpdatesService.saveRemoveFieldUpdate(this.url,t)})}openVirtualMetadataModal(t){this.modalRef=this.modalService.open(t)}closeVirtualMetadataModal(){this.modalRef.close()}undo(){this.objectUpdatesService.removeSingleFieldUpdate(this.url,this.fieldUpdate.field.uuid)}canRemove(){return this.fieldUpdate.changeType!==O.B.REMOVE&&this.fieldUpdate.changeType!==O.B.ADD}canUndo(){return this.fieldUpdate.changeType?.valueOf()>=0}
1static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(z.F),e.rXU(w.Bq))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-edit-relationship"]],inputs:{fieldUpdate:"fieldUpdate",url:"url",editItem:"editItem"},features:[e.OA$],decls:4,vars:3,consts:[["virtualMetadataModal",""],[1,"row"],[1,"col-10","relationship"],[3,"object","viewMode","value"],[1,"col-2","position-relative"],[1,"btn-group","relationship-action-buttons"],[1,"btn","btn-outline-danger","btn-sm",3,"click","dsBtnDisabled","title"],[1,"fas","fa-trash-alt","fa-fw"],[1,"btn","btn-outline-warning","btn-sm",3,"click","dsBtnDisabled","title"],[1,"fas","fa-undo-alt","fa-fw"],[3,"close","save","relationshipId","leftItem","rightItem","url"]],template:function(i,n){1&i&&(e.nVh(0,An,12,15,"div",1),e.nI1(1,"async"),e.DNE(2,Ln,3,8,"ng-template",null,0,e.C5r)),2&i&&e.vxM(e.bMT(1,1,n.relatedItem$)?0:-1)},dependencies:[K.A,we.v,b.h,Gn,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.btn[disabled][_ngcontent-%COMP%]{color:var(--bs-gray-600);border-color:var(--bs-gray-600);z-index:0}.relationship-action-buttons[_ngcontent-%COMP%]{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"]}))}return s(),a})();const zn=()=>({}),Yn=(s,a,o)=>({"alert-success":s,"alert-warning":a,"alert-danger":o});function Wn(s,a){if(1&s&&e.nrm(0,"ds-edit-relationship",7),2&s){const o=a.$implicit,t=e.XpG(4);e.Y8G("fieldUpdate",o||e.lJ4(4,zn))("url",t.url)("editItem",t.item)("ngClass",e.sMw(5,Yn,1===o.changeType,0===o.changeType,2===o.changeType))}}function Hn(s,a){1&s&&(e.j41(0,"div"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"item.edit.relationships.no-relationships")))}function Kn(s,a){if(1&s&&(e.qex(0),e.j41(1,"ds-pagination",5),e.nI1(2,"async"),e.nI1(3,"async"),e.j41(4,"div",6),e.Z7z(5,Wn,1,9,"ds-edit-relationship",7,e.BUC().trackUpdate,!0),e.k0s()(),e.nVh(7,Hn,3,3,"div"),e.bVm()),2&s){let o;const t=a.ngVar,i=e.XpG(3);e.R7$(),e.Y8G("paginationOptions",i.paginationConfig)("collectionSize",(null==(o=e.bMT(2,5,i.relationshipsRd$))||null==o.payload?null:o.payload.totalElements)+e.bMT(3,7,i.nbAddedFields$))("hideGear",!0)("hidePagerWhenSinglePage",!0),e.R7$(4),e.Dyx(t),e.R7$(2),e.vxM(0===t.length?7:-1)}}function Jn(s,a){if(1&s&&(e.DNE(0,Kn,8,9,"ng-container",4),e.nI1(1,"dsObjectValues")),2&s){const o=e.XpG().ngVar;e.Y8G("ngVar",e.bMT(1,1,o))}}function Qn(s,a){1&s&&e.nrm(0,"ds-loading")}function Zn(s,a){if(1&s&&(e.qex(0),e.nVh(1,Jn,2,3,"ng-container"),e.nI1(2,"async"),e.nVh(3,Qn,1,0,"ds-loading"),e.nI1(4,"async"),e.bVm()),2&s){const o=a.ngVar,t=e.XpG();e.R7$(),e.vxM(o&&!0!==e.bMT(2,2,t.loading$)?1:-1),e.R7$(2),e.vxM(e.bMT(4,4,t.loading$)?3:-1)}}let qn=(()=>{var s;class a{constructor(t,i,n,l,r,p,f,y,$){this.objectUpdatesService=t,this.linkService=i,this.nameVariantService=n,this.relationshipService=l,this.modalService=r,this.paginationService=p,this.selectableListService=f,this.editItemRelationshipsService=y,this.appConfig=$,this.submitModal=new e.bkB,this.currentItemIsLeftItem$=new T.t(void 0),this.updates$=new T.t(void 0),this.relationshipsRd$=new T.t(void 0),this.isLastPage$=new T.t(!0),this.loading$=new T.t(!0),this.nbAddedFields$=new T.t(0),this.subs=[],this.fetchThumbnail=this.appConfig.browseBy.showThumbnails}getRelationshipMessageKey(){return(0,I.z)([this.currentEntityType$,this.getLabel(),this.relatedEntityType$]).pipe((0,u.T)(([t,i,n])=>`relationships.${t.label}.${i}.${n.label}`))}getLabel(){return this.currentItemIsLeftItem$.pipe((0,u.T)(t=>t?this.relationshipType.leftwardType:this.relationshipType.rightwardType))}trackUpdate(t,i){return i&&i.field?i.field.uuid:void 0}isRepeatable(){if(this.currentItemIsLeftItem$.getValue()){const i=this.relationshipType.leftMaxCardinality;return(0,h.Tn)(i)||i>1}{const i=this.relationshipType.rightMaxCardinality;return(0,h.Tn)(i)||i>1}}openLookup(){this.modalRef=this.modalService.open(Dn.d,{size:"lg"});const t=this.modalRef.componentInstance;t.repeatable=!0,t.isEditRelationship=!0,t.listId=this.listId,t.item=this.item,t.relationshipType=this.relationshipType,t.currentItemIsLeftItem$=this.currentItemIsLeftItem$,t.toAdd=[],t.toRemove=[],t.isPending=!1,t.repeatable=this.isRepeatable(),t.hiddenQuery="-search.resourceid:"+this.item.uuid,this.item.owningCollection.pipe((0,m.ak)()).subscribe(i=>{t.collection=i}),t.select=(...i)=>
1{i.forEach(n=>{const l=n.indexableObject,r=t.toRemove.findIndex(p=>p.indexableObject.uuid===l.uuid);-1!==r?t.toRemove.splice(r,1):this.getRelationFromId(l).subscribe(p=>{if(p){const f=t.toRemove.findIndex(y=>y.indexableObject.uuid===l.uuid);-1!==f&&t.toRemove.splice(f,1)}else t.toAdd.push(n);this.loading$.next((0,h.hj)(t.toAdd)||(0,h.hj)(t.toRemove)),this.relationshipsRd$.next(this.relationshipsRd$.getValue())})})},t.deselect=(...i)=>{i.forEach(n=>{const l=n.indexableObject,r=t.toAdd.findIndex(p=>p.indexableObject.uuid===l.uuid);-1!==r?t.toAdd.splice(r,1):t.toRemove.push(n),this.loading$.next((0,h.hj)(t.toAdd)||(0,h.hj)(t.toRemove))})},t.submitEv=()=>{t.isPending=!0;const i=this.currentItemIsLeftItem$.getValue(),n=t.toAdd.map(r=>({type:"add",searchResult:r})),l=t.toRemove.map(r=>({type:"remove",searchResult:r}));(0,Ze.H)([...n,...l]).pipe((0,Je.H)(({type:r,searchResult:p})=>{const f=p.indexableObject;return"add"===r?this.nameVariantService.getNameVariant(this.listId,f.uuid).pipe((0,g.n)(y=>this.objectUpdatesService.saveAddFieldUpdate(this.url,{uuid:`${this.relationshipType.id}-${f.uuid}`,nameVariant:y,type:this.relationshipType,originalIsLeft:i,originalItem:this.item,relatedItem:f})),(0,M.s)(1)):"remove"===r?this.nameVariantService.getNameVariant(this.listId,f.uuid).pipe((0,g.n)(y=>this.getRelationFromId(p.indexableObject).pipe((0,u.T)($=>this.objectUpdatesService.saveRemoveFieldUpdate(this.url,{uuid:$.id,nameVariant:y,type:this.relationshipType,originalIsLeft:i,originalItem:this.item,relatedItem:f,relationship:$})))),(0,M.s)(1)):Ke.w}),(0,Te.$)()).subscribe({complete:()=>{this.editItemRelationshipsService.submit(this.item,this.url),this.submitModal.emit()}})},t.discardEv=()=>{t.toAdd.forEach(i=>{this.selectableListService.deselectSingle(this.listId,i)}),t.toRemove.forEach(i=>{this.selectableListService.selectSingle(this.listId,i)}),t.toAdd=[],t.toRemove=[],this.loading$.next(!1)},t.closeEv=()=>{this.loading$.next(!1)},this.relatedEntityType$.pipe((0,M.s)(1)).subscribe(i=>{t.relationshipOptions=Object.assign(new On.j,{relationshipType:i.label,searchConfiguration:i.label.toLowerCase(),nameVariants:"true"})}),this.selectableListService.deselectAll(this.listId)}getRelationFromId(t){const i=this.currentItemIsLeftItem$.getValue()?this.relationshipType.leftwardType:this.relationshipType.rightwardType;return this.relationshipService.searchByItemsAndType(this.relationshipType.id,this.item.uuid,i,[t.id]).pipe((0,m.yd)(),(0,m.Bo)(),(0,u.T)(n=>n.page[0]))}ngOnInit(){this.relationshipLeftAndRightType$=(0,I.z)([this.relationshipType.leftType,this.relationshipType.rightType].map(n=>n.pipe((0,m.yd)(),(0,m.Bo)()))),this.relatedEntityType$=this.relationshipLeftAndRightType$.pipe((0,u.T)(([n,l])=>n.uuid!==this.itemType.uuid?n:l),(0,h.Az)()),this.currentEntityType$=this.relationshipLeftAndRightType$.pipe((0,u.T)(([n,l])=>n.uuid===this.itemType.uuid?n:l),(0,h.Az)()),this.relatedEntityType$.pipe((0,M.s)(1)).subscribe(n=>this.listId=`edit-relationship-${this.itemType.id}-${n.id}`),this.relationshipMessageKey$=this.getRelationshipMessageKey(),this.paginationConfig=new oe.W,this.paginationConfig.id=`er${this.relationshipType.id}`,this.paginationConfig.pageSize=5,this.paginationConfig.currentPage=1;const t=this.paginationService.getCurrentPagination(this.paginationConfig.id,this.paginationConfig).pipe((0,ae.M)(()=>this.loading$.next(!0))),i=(0,jn.nW)(this.fetchThumbnail,this.appConfig.item.showAccessStatuses);this.subs.push((0,I.z)([t,this.currentItemIsLeftItem$,this.relatedEntityType$]).pipe((0,g.n)(([n,l,r])=>this.relationshipService.getItemRelationshipsByLabel(this.item,l?this.relationshipType.leftwardType:this.relationshipType.rightwardType,{elementsPerPage:n.pageSize,currentPage:n.currentPage,searchParams:[new Pn.x("relatedEntityType",r.label)]},!0,!0,...i)),(0,ae.M)(n=>{this.relationshipsRd$.next(n)}),(0,m.v7)(),(0,m.Bo)()).subscribe(n=>{this.objectUpdatesService.initialize(this.url,n.page,new Date)})),this.subs.push(this.relationshipsRd$.pipe((0,h.Az)(),(0,m.v7)()).subscribe(n=>{this.isLastPage$.next((0,h.Tn)(n.payload._links.next))})),this.subs.push(this.relationshipsRd$.pipe((0,h.Az)(),(0,m.v7)(),(0,g.n)(n=>(0,Ze.H)(n.payload.page).pipe((0,be.Z)(l=>this.relationshipService.isLeftItem(l,this.item).pipe((0,g.n)(r=>r?l.rightItem.pipe((0,m.qD)(),(0,m.Bo)(),(0,u.T)(p=>[l,r,p])):l.leftItem.pipe((0,m.qD)(),(0,m.Bo)(),(0,u.T)(p=>[l,r,p]))))),(0,u.T)(([l,r,p])=>({uuid:l.id,type:this.relationshipType,relationship:l,originalIsLeft:r,originalItem:this.item,relatedItem:p,nameVariant:r?l.rightwardValue:l.leftwardValue})),(0,Te.$)(),(0,Ie.U)([]))),(0,g.n)(n=>this.objectUpdatesService.getFieldUpdates(this.url,n).pipe((0,u.T)(l=>{const r={};
1return this.nbAddedFields$.next(0),Object.keys(l).forEach(p=>{(0,h.a4)(l[p])&&l[p].field.type.id===this.relationshipType.id&&(l[p].changeType===O.B.ADD?(this.nbAddedFields$.next(this.nbAddedFields$.getValue()+1),!0===this.isLastPage$.getValue()&&(r[p]=l[p])):r[p]=l[p])}),r}))),(0,Le.Z)({})).subscribe(n=>{this.loading$.next(!1),this.updates$.next(n)}))}ngOnDestroy(){this.subs.filter(t=>(0,h.a4)(t)).forEach(t=>t.unsubscribe())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(z.F),e.rXU(ue._),e.rXU(Fn.M),e.rXU(me.RelationshipDataService),e.rXU(w.Bq),e.rXU(Ve.m),e.rXU(En.K),e.rXU(ke),e.rXU(Qe.vQ))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-edit-relationship-list"]],inputs:{item:"item",itemType:"itemType",url:"url",relationshipType:"relationshipType",hasChanges:"hasChanges",currentItemIsLeftItem$:"currentItemIsLeftItem$"},outputs:{submitModal:"submitModal"},decls:12,vars:14,consts:[[1,"h4"],[1,"ms-2","btn","btn-success",3,"click","dsBtnDisabled"],[1,"fas","fa-plus"],[1,"d-none","d-sm-inline"],[4,"ngVar"],[3,"paginationOptions","collectionSize","hideGear","hidePagerWhenSinglePage"],[1,"my-2"],[1,"relationship-row","d-block","alert",3,"fieldUpdate","url","editItem","ngClass"]],template:function(i,n){1&i&&(e.j41(0,"h2",0),e.EFF(1),e.nI1(2,"async"),e.nI1(3,"translate"),e.j41(4,"button",1),e.nI1(5,"async"),e.bIt("click",function(){return n.openLookup()}
1),e.nrm(6,"i",2),e.j41(7,"span",3),e.EFF(8),e.nI1(9,"translate"),e.k0s()()(),e.DNE(10,Zn,5,6,"ng-container",4),e.nI1(11,"async")),2&i&&(e.R7$(),e.SpI(" ",e.bMT(3,6,e.bMT(2,4,n.relationshipMessageKey$))," "),e.R7$(3),e.Y8G("dsBtnDisabled",e.bMT(5,8,n.hasChanges)),e.R7$(4),e.SpI("\xa0",e.bMT(9,10,"item.edit.relationships.edit.buttons.add")),e.R7$(2),e.Y8G("ngVar",e.bMT(11,12,n.updates$)))},dependencies:[K.A,Nn,_.YU,pe.e,de.v,b.h,ie.r,_.Jj,je,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.relationship-row[_ngcontent-%COMP%]:not(.alert){padding:var(--bs-alert-padding-y) 0}.relationship-row.alert[_ngcontent-%COMP%]{margin-left:calc(-1 * var(--bs-alert-padding-x));margin-right:calc(-1 * var(--bs-alert-padding-x));margin-top:-1px;margin-bottom:-1px}"]}))}return s(),a})();function es(s,a){if(1&s&&e.nrm(0,"ds-edit-relationship-list",1)(1,"ds-edit-relationship-list",0),2&s){const o=e.XpG();e.Y8G("url",o.url)("item",o.item)("itemType",o.itemType)("relationshipType",o.relationshipType)("hasChanges",o.hasChanges)("currentItemIsLeftItem$",o.isLeftItem$),e.R7$(),e.Y8G("url",o.url)("item",o.item)("itemType",o.itemType)("relationshipType",o.relationshipType)("hasChanges",o.hasChanges)("currentItemIsLeftItem$",o.isRightItem$)}}function ts(s,a){if(1&s&&e.nrm(0,"ds-edit-relationship-list",0),2&s){const o=e.XpG();e.Y8G("url",o.url)("item",o.item)("itemType",o.itemType)("relationshipType",o.relationshipType)("hasChanges",o.hasChanges)("currentItemIsLeftItem$",o.currentItemIsLeftItem$)}}let is=(()=>{var s;class a{constructor(t){this.editItemRelationshipsService=t,this.submitModal=new e.bkB,this.currentItemIsLeftItem$=new T.t(void 0),this.isLeftItem$=new T.t(!0),this.isRightItem$=new T.t(!1),this.subs=[]}ngOnInit(){this.subs.push(this.editItemRelationshipsService.isProvidedItemTypeLeftType(this.relationshipType,this.itemType,this.item).subscribe(t=>{this.currentItemIsLeftItem$.next(t)})),this.shouldDisplayBothRelationshipSides$=this.editItemRelationshipsService.shouldDisplayBothRelationshipSides(this.relationshipType,this.itemType)}ngOnDestroy(){this.subs.filter(t=>(0,h.a4)(t)).forEach(t=>t.unsubscribe())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(ke))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-edit-relationship-list-wrapper"]],inputs:{item:"item",itemType:"itemType",url:"url",relationshipType:"relationshipType",hasChanges:"hasChanges"},outputs:{submitModal:"submitModal"},decls:4,vars:6,consts:[[3,"url","item","itemType","relationshipType","hasChanges","currentItemIsLeftItem$"],[1,"d-block","mb-4",3,"url","item","itemType","relationshipType","hasChanges","currentItemIsLeftItem$"]],template:function(i,n){1&i&&(e.nVh(0,es,2,12),e.nI1(1,"async"),e.nVh(2,ts,1,6,"ds-edit-relationship-list",0),e.nI1(3,"async")),2&i&&(e.vxM(e.bMT(1,2,n.shouldDisplayBothRelationshipSides$)?0:-1),e.R7$(2),e.vxM(!1===e.bMT(3,4,n.shouldDisplayBothRelationshipSides$)?2:-1))},dependencies:[qn,_.Jj],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}"]}))}return s(),a})();function ns(s,a){1&s&&e.eu8(0)}function ss(s,a){if(1&s&&(e.j41(0,"div",5),e.nrm(1,"ds-edit-relationship-list-wrapper",8),e.k0s()),2&s){const o=a.$implicit,t=e.XpG(2),i=e.XpG();e.R7$(),e.Y8G("url",i.url)("item",i.item)("itemType",t)("relationshipType",o)("hasChanges",i.hasChanges$)}}function os(s,a){1&s&&(e.j41(0,"div",5),e.Z7z(1,ss,2,5,"div",5,e.BUC().trackById,!0),e.k0s()),2&s&&(e.R7$(),e.Dyx(a))}function as(s,a){1&s&&e.nrm(0,"ds-loading")}function ls(s,a){1&s&&e.eu8(0)}function rs(s,a){if(1&s&&(e.j41(0,"div",3),e.DNE(1,ns,1,0,"ng-container",4),e.k0s(),e.nVh(2,os,3,0,"div",5),e.nI1(3,"async"),e.vZN(4,as,1,0,"ds-loading"),e.j41(5,"div",6)(6,"div",7),e.DNE(7,ls,1,0,"ng-container",4),e.k0s()()),2&s){let o;const t=e.XpG(),i=e.sdS(5);e.R7$(),e.Y8G("ngTemplateOutlet",i),e.R7$(),e.vxM((o=e.bMT(3,3,t.relationshipTypes$))?2:4,o),e.R7$(5),e.Y8G("ngTemplateOutlet",i)}}function cs(s,a){if(1&s&&(e.j41(0,"ds-alert",2),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const o=e.XpG();e.Y8G("type",o.AlertType.Info),e.R7$(),e.SpI(" ",e.bMT(2,2,"item.edit.relationships.no-entity-type")," ")}}function ds(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",16),e.nI1(1,"async"),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.discard())}),e.nrm(2,"i",17),e.j41(3,"span",15),e.EFF(4),e.nI1(5,"translate"),e.k0s()()}if(2&s){const o=e.XpG(2);e.Y8G("dsBtnDisabled",!0!==e.bMT(1,2,o.hasChanges$)),e.R7$(4),e.SpI("\xa0",e.bMT(5,4,"item.edit.metadata.discard-button"))}}function ps(s,a){if(1&s){const o=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){d.eBV(o);const i=e.XpG(2);return d.Njj(i.reinstate())}),e.nrm(1,"i",19),e.j41(2,"span",15),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}2&s&&(e.R7$(3),e.SpI("\xa0",e.bMT(4,1,"item.edit.metadata.reinstate-button")))}function ms(s,a){1&s&&e.nrm(0,"span",13)}function hs(s,a){1&s&&e.nrm(0,"i",14)}function us(s,a){if(1&s){const o=e.RV6();e.j41(0,"div",9),e.nVh(1,ds,6,6,"button",10),e.nI1(2,"async"),e.nVh(3,ps,5,3,"button",11),e.nI1(4,"async"),e.j41(5,"button",12),e.nI1(6,"async"),e.nI1(7,"async"),e.bIt("click",function(){d.eBV(o);const i=e.XpG();return d.Njj(i.submit())}),e.nVh(8,ms,1,0,"span",13),e.nI1(9,"async"),e.nVh(10,hs,1,0,"i",14),e.nI1(11,"async"),e.j41(12,"span",15),e.EFF(13),e.nI1(14,"translate"),e.k0s()()()}if(2&s){const o=e.XpG();e.R7$(),e.vxM(!0!==e.bMT(2,6,o.isReinstatable$)?1:-1),e.R7$(2),e.vxM(e.bMT(4,8,o.isReinstatable$)?3:-1),e.R7$(2),e.Y8G("dsBtnDisabled",!0!==e.bMT(6,10,o.hasChanges$)||!0===e.bMT(7,12,o.isSaving$)),e.R7$(3),e.vxM(e.bMT(9,14,o.isSaving$)?8:-1),e.R7$(2),e.vxM(!0!==e.bMT(11,16,o.isSaving$)?10:-1),e.R7$(3),e.SpI("\xa0",e.bMT(14,18,"item.edit.metadata.save-button"))}}let bs=(()=>{var s;class a extends De{get isSaving$(){return this.editItemRelationshipsService.isSaving$}constructor(t,i,n,l,r,p,f,y,$,F,G,xe,$e,$s){super(t,i,n,l,r,p),this.itemService=t,this.objectUpdatesService=i,this.router=n,this.notificationsService=l,this.translateService=r,this.route=p,this.relationshipService=f,this.objectCache=y,this.requestService=$,this.entityTypeService=F,this.relationshipTypeService=G,this.cdr=xe,this.modalService=$e,this.editItemRelationshipsService=$s,this.entityType$=new T.t(void 0),this.AlertType=ce.v}initializeUpdates(){const t=this.item.firstMetadataValue("dspace.entity.type");void 0!==t?(this.relationshipTypes$=this.relationshipTypeService.searchByEntityType(t,!0,!0,...this.getRelationshipTypeFollowLinks()).pipe((0,u.T)(i=>i.page),(0,Bn.F)((0,Sn.W2)())),this.entityTypeService.getEntityTypeByLabel(t).pipe((0,m.yd)(),(0,m.Bo)()).subscribe(i=>this.entityType$.next(i))):this.entityType$.next(void 0)}initializeNotificationsPrefix(){this.notificationsPrefix="item.edit.relationships.notifications."}submit(){this.editItemRelationshipsService.submit(this.item,this.url)}initializeOriginalFields(){return this.editItemRelationshipsService.initializeOriginalFields(this.item,this.url)}trackById(t,i){return i.id}getRelationshipTypeFollowLinks(){return[(0,X.s)("leftType"),(0,X.s)("rightType")]}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(D.ItemDataService),e.rXU(z.F),e.rXU(v.Ix),e.rXU(P.I),e.rXU(b.c$),e.rXU(v.nX),e.rXU(me.RelationshipD
1ataService),e.rXU(Pe.$),e.rXU(se.B),e.rXU(Ce.f),e.rXU(Rn.RelationshipTypeDataService),e.rXU(Ae.gRc),e.rXU(w.Bq),e.rXU(ke))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-relationships"]],features:[e.Vt3],decls:6,vars:3,consts:[["buttons",""],[1,"item-relationships"],[1,"d-block","mt-2",3,"type"],[1,"button-row","top","d-flex","justify-content-end"],[4,"ngTemplateOutlet"],[1,"mb-4"],[1,"button-row","bottom"],[1,"float-end","ms-gap"],[3,"url","item","itemType","relationshipType","hasChanges"],[1,"d-flex","space-children-mr","justify-content-end"],[1,"btn","btn-danger",3,"dsBtnDisabled"],[1,"btn","btn-warning"],[1,"btn","btn-primary",3,"click","dsBtnDisabled"],["aria-hidden","true","role","status",1,"spinner-border","spinner-border-sm"],["aria-hidden","true",1,"fas","fa-save"],[1,"d-none","d-sm-inline"],[1,"btn","btn-danger",3,"click","dsBtnDisabled"],["aria-hidden","true",1,"fas","fa-times"],[1,"btn","btn-warning",3,"click"],["aria-hidden","true",1,"fas","fa-undo-alt"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,rs,8,5),e.nI1(2,"async"),e.vZN(3,cs,3,4,"ds-alert",2),e.k0s(),e.DNE(4,us,15,20,"ng-template",null,0,e.C5r)),2&i){let l;e.R7$(),e.vxM((l=e.bMT(2,1,n.entityType$))?1:3,l)}},dependencies:[fe.C,K.A,is,_.T3,de.v,b.h,_.Jj,b.D9],styles:[".ellipsis-y-1[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-2[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-3[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-4[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-5[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-6[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-7[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-8[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-9[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:9;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.ellipsis-y-10[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.button-row[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{margin-right:var(--ds-gap)}.button-row[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]:last-child{margin-right:0}@media screen and (min-width:576px){.button-row[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{min-width:var(--ds-edit-item-button-min-width)}}.button-row.top[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{margin-top:calc(var(--bs-spacer) / 2);margin-bottom:calc(var(--bs-spacer) / 2)}"]}))}return s(),a})();var fs=c(29710);const vs=["*"];function gs(s,a){}let _s=(()=>{var s;class a extends fs.J{getComponentName(){return"ItemStatusComponent"}importThemedComponent(t){return c(52529)(`./${t}/app/item-page/edit-item-page/item-status/item-status.component`)}importUnthemedComponent(){return c.e(2076).then(c.bind(c,74578))}static#e=s=()=>(this.\u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(a)))(n||a)}})(),this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-status"]],features:[e.Vt3],ngContentSelectors:vs,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(i,n){1&i&&(e.NAR(),e.PeT(0,gs,0,0,"ng-template",null,0,e.C5r),e.rj2(2,"div",null,1),e.SdG(4),e.eux())},encapsulation:2}))}return s(),a})();var ys=c(69838);function Cs(s,a){if(1&s&&e.nrm(0,"ds-item-versions",2),2&s){const o=e.XpG().ngVar;e.Y8G("item",o)("displayWhenEmpty",!0)("displayTitle",!1)("displayActions",!0)}}function Is(s,a){if(1&s&&(e.j41(0,"div",1),e.nVh(1,Cs,1,4,"ds-item-versions",2),e.k0s()),2&s){const o=a.ngVar;e.R7$(),e.vxM(o?1:-1)}}const Ms=s=>({id:s}),Ts=s=>[s,"edit"],xs=[{path:"",resolve:{breadcrumb:V.S},data:{breadcrumbKey:"item.edit"},children:[{path:"",component:it,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:_s,data:{title:"item.edit.tabs.status.title",showBreadcrumbs:!0},canActivate:[pn]},{path:"bitstreams",component:Kt,data:{title:"item.edit.tabs.bitstreams.title",showBreadcrumbs:!0},canActivate:[Zi]},{path:"metadata",component:A.Q,data:{title:"item.edit.tabs.metadata.title",showBreadcrumbs:!0},canActivate:[sn]},{path:"curate",component:Ci,data:{title:"item.edit.tabs.curate.title",showBreadcrumbs:!0},canActivate:[en]},{path:"relationships",component:bs,data:{title:"item.edit.tabs.relationships.title",showBreadcrumbs:!0},canActivate:[cn]},{path:"versionhistory",component:(()=>{var s;class a{constructor(t){this.route=t,this.AlertTypeEnum=ce.v}ngOnInit(){this.itemRD$=this.route.parent.parent.data.pipe((0,u.T)(t=>t.dso)).pipe((0,m.yd)())}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-version-history"]],decls:2,vars:3,consts:[["class","mt-2",4,"ngVar"],[1,"mt-2"],[3,"item","displayWhenEmpty","displayTitle","displayActions"]],template:function(i,n){if(1&i&&(e.DNE(0,Is,2,1,"div",0),e.nI1(1,"async")),2&i){let l;e.Y8G("ngVar",null==(l=e.bMT(1,1,n.itemRD$))?null:l.payload)}},dependencies:[ys.I,ie.r,_.Jj],encapsulation:2}))}return s(),a})(),data:{title:"item.edit.tabs.versionhistory.title",showBreadcrumbs:!0},canActivate:[mn]},{path:"access-control",component:ot,data:{title:"item.edit.tabs.access-control.title",showBreadcrumbs:!0},canActivate:[Qi]},{path:"mapper",component:ze,data:{title:"item.edit.tabs.item-mapper.title",showBreadcrumbs:!0},canActivate:[qi]}]},{path:"mapper",component:ze},{path:H.kH,component:(()=>{var s;class a extends ne{constructor(t,i,n,l,r){super(t,i,n,l,r),this.route=t,this.router=i,this.notificationsService=n,this.itemDataService=l,this.translateService=r,this.messageKey="withdraw",this.predicate=p=>p.payload.isWithdrawn}performAction(){this.itemDataService.setWithDrawn(this.item,!0).pipe((0,m.qD)()).subscribe(t=>{this.processRestResponse(t)})}static#e=s=()=>(this.\u0275fac=function(i){return new(i||a)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(P.I),e.rXU(D.ItemDataService),e.rXU(b.c$))},this.\u0275cmp=e.VBU({type:a,selectors:[["ds-item-withdraw"]],features:[e.Vt3],decls:17,vars:19,consts:[[1,"container"],[1,"row"],[1,"col-12"],[3,"item"],[1,"space-children-mr"],[1,"btn","btn-outline-secondary","perform-action",3,"click"],[1,"btn","btn-outline-secondary","cancel",3,"routerLink"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"p"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.nrm(9,"ds-modify-item-overview",3),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return n.performAction()}),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"button",6),e.EFF(15),e.nI1(16,"translate"),e.k0s()()()()()),2&i&&(e.R7$(4),e.JRh(e.i5U(5,6,n.headerMessage,e.eq3(15,Ms,n.item.handle))),e.R7$(3),e.JRh(e.bMT(8,9,n.descriptionMessage)),e.R7$(2),e.Y8G("item",n.item),e.R7$(3),e.SpI("",e.bMT(13,11,n.confirmMessage)," "),e.R7$(2),e.Y8G("routerLink",e.eq3(17,Ts,n.itemPageRoute)),e.R7$(),e.SpI(" ",e.bMT(16,13,n.cancelMessage)," "))},dependencies:[Z.W,R.Wk,b.h,b.D9],encapsulation:2}))}return s(),a})(),canActivate:[hn]}
1,{path:H.Pg,component:$n,canActivate:[rn]},{path:H.$2,component:fn,canActivate:[an]},{path:H.RS,component:_n},{path:H.Jr,component:Ai,canActivate:[tn]},{path:H.Bw,component:Ji,data:{title:"item.edit.move.title"},canActivate:[on]},{path:H.KY,component:Tn,canActivate:[ln],data:{title:"item.edit.register-doi.title"}},{path:H.K4,children:[{path:"create",resolve:{resourcePolicyTarget:N.Q},component:L.m,data:{title:"resource-policies.create.page.title"}},{path:"edit",resolve:{resourcePolicy:ee.n},component:W._,data:{title:"resource-policies.edit.page.title"}},{path:"",component:ht,data:{title:"item.edit.authorizations.title"}}],canActivate:[nn]}]}]},52529(re,q,c){var V={"./custom/app/item-page/edit-item-page/item-status/item-status.component":[38382,[2076,8382]],"./usco/app/item-page/edit-item-page/item-status/item-status.component":[46085,[2076,6085]]};function A(L){if(!c.o(V,L))return Promise.resolve().then(()=>{var N=new Error("Cannot find module '"+L+"'");throw N.code="MODULE_NOT_FOUND",N});var W=V[L],ee=W[0];return Promise.all(W[1].map(c.e)).then(()=>c(ee))}A.keys=()=>Object.keys(V),A.id=52529,re.exports=A}}]);

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.