PageSourceSearch

https://dspace.ceid.org.tr/4001.853b126acc3ba431.js

js ceid.org.tr collected 2026-10-02 14:35:07 UTC 63,705 bytes, 1 lines download raw bytes

1(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[4001],{82695:(x,j,r)=>{"use strict";r.d(j,{G:()=>b,o:()=>M});var d=r(47947),f=r(31829),e=r(72683),R=r(12007);const b=($,C,I,F,...u)=>M($,C,$.params.id,I,F,...u),M=($,C,I,F,u,...c)=>u.findById(I,!0,!1,...c).pipe((0,R.qD)(),(0,R.Bo)(),(0,d.T)(v=>{if((0,e.a4)(v))return{provider:F,key:v,url:(0,f.wN)(v)}}))},1762:(x,j,r)=>{"use strict";r.d(j,{L:()=>e});var d=r(47947),f=r(3550);const e=(R,b)=>(0,f.FO)(R,(M,$)=>b(M,$).pipe((0,d.T)(C=>[C])))},3550:(x,j,r)=>{"use strict";r.d(j,{FO:()=>$});var d=r(47947),f=r(72683),e=r(12007),R=r(90087);const M=C=>(I,F)=>{const u=(C=>{let I=C;for(;(0,f.Tn)(I.params.id)&&(0,f.a4)(I.parent);)I=I.parent;return I})(I);return C(u,F).pipe((0,e.Hz)(),(0,d.T)(c=>c.self))},$=(C,I,F=M,u)=>(0,R.h)((c,v)=>I(c,v),F(C()),u)},27685:(x,j,r)=>{"use strict";r.d(j,{r:()=>c});var d=r(76627),f=r(47947),e=r(22867),R=r(72683),b=r(84195),M=r(12792),$=r(66190),C=r(12007),I=r(87913),F=r(53107),u=r(95968);let c=(()=>{class v{constructor(m,_,T,G){this._window=m,this.configurationService=_,this.researcherProfileService=T,this.router=G}isLinkedToOrcid(m){return m.hasMetadata("dspace.orcid.authenticated")}onlyAdminCanDisconnectProfileFromOrcid(){return this.getOrcidDisconnectionAllowedUsersConfiguration().pipe((0,f.T)(m=>m.hasSucceeded&&m.payload.values.map(_=>_.toLowerCase()).includes("only_admin")))}ownerCanDisconnectProfileFromOrcid(){return this.getOrcidDisconnectionAllowedUsersConfiguration().pipe((0,f.T)(m=>m.hasSucceeded&&m.payload.values.map(_=>_.toLowerCase()).includes("admin_and_owner")))}linkOrcidByItem(m,_){const T=[{path:"/orcid",op:"add",value:_}];return this.researcherProfileService.findById(m.firstMetadata("dspace.object.owner").authority).pipe((0,C.qD)(),(0,e.n)(G=>this.researcherProfileService.patch(G.payload,T)))}unlinkOrcidByItem(m){const _=[{path:"/orcid",op:"remove"}];return this.researcherProfileService.findById(m.firstMetadata("dspace.object.owner").authority).pipe((0,C.qD)(),(0,e.n)(T=>this.researcherProfileService.patch(T.payload,_)))}getOrcidAuthorizeUrl(m){return(0,d.z)([this.configurationService.findByPropertyName("orcid.authorize-url").pipe((0,C.ak)()),this.configurationService.findByPropertyName("orcid.application-client-id").pipe((0,C.ak)()),this.configurationService.findByPropertyName("orcid.scope").pipe((0,C.ak)())]).pipe((0,f.T)(([_,T,G])=>{const P=new I.t(this._window.nativeWindow.origin,encodeURIComponent(this.router.url.split("?")[0]));return _.values[0]+"?client_id="+T.values[0]+"&redirect_uri="+P+"&response_type=code&scope="+G.values.join(" ")}))}getOrcidAuthorizationScopesByItem(m){return(0,R.hj)(m)?m.allMetadataValues("dspace.orcid.scope"):[]}getOrcidAuthorizationScopes(){return this.configurationService.findByPropertyName("orcid.scope").pipe((0,C.qD)(),(0,f.T)(m=>m.hasSucceeded?m.payload.values:[]))}getOrcidDisconnectionAllowedUsersConfiguration(){return this.configurationService.findByPropertyName("orcid.disconnection.allowed-users").pipe((0,C.qD)())}static#e=this.\u0275fac=function(_){return new(_||v)(F.KVO($.lc),F.KVO(b.ConfigurationDataService),F.KVO(M.ResearcherProfileDataService),F.KVO(u.Ix))};static#t=this.\u0275prov=F.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}return v})()},88663:(x,j,r)=>{"use strict";r.d(j,{j:()=>e});const f={RESOLVED:(0,r(83770).N)("dspace/resolver/RESOLVED")};class e{constructor(b,M){this.type=f.RESOLVED,this.payload={url:b,dso:M}}}},94001:(x,j,r)=>{"use strict";r.r(j),r.d(j,{ROUTES:()=>Bt});var d=r(31829),f=r(21709),e=r(53107),R=r(90131),b=r(17584),M=r(82695),$=r(73579),I=r(74733),F=r(43515),u=r(54460),c=r(10936),v=r(95968),h=r(69685),m=r(76627),_=r(63016),T=r(47947),G=r(41483),P=r(22867),D=r(37610),V=r(21706),X=r(83116),K=r(78052),J=r(77304),H=r(36556),ee=r(37988),te=r(84632),E=r(12007),A=r(72683),Y=r(79224),z=r(15497);function ie(s,l){if(1&s&&(e.j41(0,"div",27)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"a",3),e.EFF(5),e.nI1(6,"translate"),e.k0s()()),2&s){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,3,"bitstream-request-a-copy.alert.canDownload1")),e.R7$(2),e.Y8G("routerLink",t.getBitstreamLink()),e.R7$(),e.JRh(e.bMT(6,5,"bitstream-request-a-copy.alert.canDownload2"))}}function Q(s,l){if(1&s&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"bitstream-request-a-copy.intro.bitstream.one")," ",t.bitstreamName,"")}}function ne(s,l){1&s&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"bitstream-request-a-copy.intro.bitstream.all")))}function se(s,l){1&s&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"bitstream-request-a-copy.name.error")," "))}function re(s,l){if(1&s&&(e.j41(0,"div",28),e.DNE(1,se,3,3,"span",4),e.k0s()),2&s){const t=e.XpG();
1e.R7$(),e.Y8G("ngIf",t.name.errors&&t.name.errors.required)}}function N(s,l){1&s&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"bitstream-request-a-copy.email.error")," "))}function oe(s,l){if(1&s&&(e.j41(0,"div",28),e.DNE(1,N,3,3,"span",4),e.k0s()),2&s){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.email.errors)}}let a=(()=>{class s{constructor(t,i,n,o,y,O,Z,ue,pe,Pt,At){this.location=t,this.translateService=i,this.route=n,this.router=o,this.authorizationService=y,this.auth=O,this.formBuilder=Z,this.itemRequestDataService=ue,this.notificationsService=pe,this.dsoNameService=Pt,this.bitstreamService=At,this.subs=[]}ngOnInit(){this.requestCopyForm=this.formBuilder.group({name:new c.hs("",{validators:[c.k0.required]}),email:new c.hs("",{validators:[c.k0.required,c.k0.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$")]}),allfiles:new c.hs(""),message:new c.hs("")}),this.item$=this.route.data.pipe((0,T.T)(i=>i.dso),(0,E.ak)()),this.subs.push(this.item$.subscribe(i=>{this.item=i,this.itemName=this.dsoNameService.getName(i)})),this.bitstream$=this.route.queryParams.pipe((0,G.p)(i=>(0,A.a4)(i)&&(0,A.a4)(i.bitstream)),(0,P.n)(i=>this.bitstreamService.findById(i.bitstream)),(0,E.ak)()),this.subs.push(this.bitstream$.subscribe(i=>{this.bitstream=i,this.bitstreamName=this.dsoNameService.getName(i)})),this.canDownload$=this.bitstream$.pipe((0,P.n)(i=>this.authorizationService.isAuthorized(H._.CanDownload,(0,A.hj)(i)?i.self:void 0)));const t=this.bitstream$.pipe((0,P.n)(i=>this.authorizationService.isAuthorized(H._.CanRequestACopy,(0,A.hj)(i)?i.self:void 0)));this.subs.push((0,m.z)([this.canDownload$,t]).subscribe(([i,n])=>{!i&&!n&&this.router.navigateByUrl((0,d.bZ)(),{skipLocationChange:!0})})),this.initValues()}get name(){return this.requestCopyForm.get("name")}get email(){return this.requestCopyForm.get("email")}get message(){return this.requestCopyForm.get("message")}get allfiles(){return this.requestCopyForm.get("allfiles")}initValues(){this.getCurrentUser().pipe((0,D.s)(1)).subscribe(t=>{this.requestCopyForm.patchValue({allfiles:"true"}),(0,A.a4)(t)&&this.requestCopyForm.patchValue({name:t.name,email:t.email})}),this.bitstream$.pipe((0,D.s)(1)).subscribe(t=>{this.requestCopyForm.patchValue({allfiles:"false"})})}getCurrentUser(){return this.auth.isAuthenticated().pipe((0,P.n)(t=>t?this.auth.getAuthenticatedUserFromStore():(0,_.of)(void 0)))}onSubmit(){const t=new te.b;(0,A.a4)(this.bitstream)&&(t.bitstreamId=this.bitstream.uuid),t.itemId=this.item.uuid,t.allfiles=this.allfiles.value,t.requestEmail=this.email.value,t.requestName=this.name.value,t.requestMessage=this.message.value,this.itemRequestDataService.requestACopy(t).pipe((0,E.qD)()).subscribe(i=>{i.hasSucceeded?(this.notificationsService.success(this.translateService.get("bitstream-request-a-copy.submit.success")),this.navigateBack()):this.notificationsService.error(this.translateService.get("bitstream-request-a-copy.submit.error"))})}ngOnDestroy(){(0,A.a4)(this.subs)&&this.subs.forEach(t=>{(0,A.a4)(t)&&t.unsubscribe()})}navigateBack(){this.location.back()}getItemPath(){return[(0,z._o)(this.item)]}getBitstreamLink(){return[(0,d.hV)(this.bitstream)]}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(u.aZ),e.rXU(h.c$),e.rXU(v.nX),e.rXU(v.Ix),e.rXU(J.AuthorizationDataService),e.rXU(V.uR),e.rXU(c.ze),e.rXU(ee.W),e.rXU(Y.I),e.rXU(X.f),e.rXU(K.BitstreamDataService))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-bitstream-request-a-copy-page"]],standalone:!0,features:[e.aNF],decls:64,vars:52,consts:[[1,"container"],[1,"mb-4"],["class","alert alert-success",4,"ngIf"],[3,"routerLink"],[4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"form-group"],[1,"row","mb-4"],[1,"col-12"],["for","name"],["type","text","id","name","formControlName","name",3,"className"],["class","invalid-feedback show-feedback",4,"ngIf"],["for","email"],["id","email","formControlName","email",3,"className"],[1,"text-muted","ds-hint"],[1,"ml-4"],["type","radio","id","allfiles-true","formControlName","allfiles","value","true",3,"className"],["for","allfiles-true",1,"form-check-label"],["type","radio","id","allfiles-false","formControlName","allfiles","value","false",3,"className"],["for","allfiles-false",1,"form-check-label"],["for","message"],["rows","5","id","message","formControlName","message",3,"className"],[1,"row"],[1,"col-12","text-right"],["role","button",1,"btn","btn-outline-secondary","mr-1",3,"click"],[1,"fas","fa-arrow-left"],[1,"btn","btn-default","btn-primary",3,"click","disabled"],[1,"alert","alert-success"],[1,"invalid-feedback","show-feedback"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"h1",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,ie,7,7,"div",2),e.nI1(5,"async"),e.j41(6,"div")(7,"p"),e.EFF(8),e.nI1(9,"translate"),e.j41(10,"a",3),e.
1EFF(11),e.k0s()(),e.DNE(12,Q,3,4,"p",4)(13,ne,3,3,"p",4),e.k0s(),e.j41(14,"form",5),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(15,"div",6)(16,"div",7)(17,"div",8)(18,"label",9),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.nrm(21,"input",10),e.DNE(22,re,2,1,"div",11),e.k0s()(),e.j41(23,"div",7)(24,"div",8)(25,"label",12),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.nrm(28,"input",13),e.DNE(29,oe,2,1,"div",11),e.j41(30,"small",14),e.EFF(31),e.nI1(32,"translate"),e.k0s()()(),e.j41(33,"div",7)(34,"div",8)(35,"div"),e.EFF(36),e.nI1(37,"translate"),e.k0s(),e.j41(38,"div",15),e.nrm(39,"input",16),e.j41(40,"label",17),e.EFF(41),e.nI1(42,"translate"),e.k0s()(),e.j41(43,"div",15),e.nrm(44,"input",18),e.j41(45,"label",19),e.EFF(46),e.nI1(47,"translate"),e.k0s()()()(),e.j41(48,"div",7)(49,"div",8)(50,"label",20),e.EFF(51),e.nI1(52,"translate"),e.k0s(),e.nrm(53,"textarea",21),e.k0s()()()(),e.nrm(54,"hr"),e.j41(55,"div",22)(56,"div",23)(57,"a",24),e.bIt("click",function(){return n.navigateBack()}),e.nrm(58,"i",25),e.EFF(59),e.nI1(60,"translate"),e.k0s(),e.j41(61,"button",26),e.bIt("click",function(){return n.onSubmit()}),e.EFF(62),e.nI1(63,"translate"),e.k0s()()()()),2&i&&(e.R7$(2),e.JRh(e.bMT(3,28,"bitstream-request-a-copy.header")),e.R7$(2),e.Y8G("ngIf",e.bMT(5,30,n.canDownload$)),e.R7$(4),e.SpI("",e.bMT(9,32,"bitstream-request-a-copy.intro")," "),e.R7$(2),e.Y8G("routerLink",n.getItemPath()),e.R7$(),e.JRh(n.itemName),e.R7$(),e.Y8G("ngIf",void 0!==n.bitstream&&"false"===n.allfiles.value),e.R7$(),e.Y8G("ngIf","true"===n.allfiles.value),e.R7$(),e.HbH("ng-invalid"),e.Y8G("formGroup",n.requestCopyForm),e.R7$(5),e.JRh(e.bMT(20,34,"bitstream-request-a-copy.name.label")),e.R7$(2),e.Y8G("className",n.name.invalid&&(n.name.dirty||n.name.touched)?"form-control is-invalid":"form-control"),e.R7$(),e.Y8G("ngIf",n.name.invalid&&(n.name.dirty||n.name.touched)),e.R7$(4),e.JRh(e.bMT(27,36,"bitstream-request-a-copy.email.label")),e.R7$(2),e.Y8G("className",n.email.invalid&&(n.email.dirty||n.email.touched)?"form-control is-invalid":"form-control"),e.R7$(),e.Y8G("ngIf",n.email.invalid&&(n.email.dirty||n.email.touched)),e.R7$(2),e.JRh(e.bMT(32,38,"bitstream-request-a-copy.email.hint")),e.R7$(5),e.JRh(e.bMT(37,40,"bitstream-request-a-copy.allfiles.label")),e.R7$(3),e.Y8G("className","form-check-input"),e.R7$(2),e.JRh(e.bMT(42,42,"bitstream-request-a-copy.files-all-true.label")),e.R7$(3),e.Y8G("className","form-check-input"),e.BMQ("disabled",void 0===n.bitstream||null),e.R7$(2),e.JRh(e.bMT(47,44,"bitstream-request-a-copy.files-all-false.label")),e.R7$(5),e.JRh(e.bMT(52,46,"bitstream-request-a-copy.message.label")),e.R7$(2),e.Y8G("className","form-control"),e.R7$(6),e.SpI(" ",e.bMT(60,48,"bitstream-request-a-copy.return")," "),e.R7$(2),e.Y8G("disabled",n.requestCopyForm.invalid),e.R7$(),e.JRh(e.bMT(63,50,"bitstream-request-a-copy.submit")))},dependencies:[h.h,h.D9,v.Wk,u.Jj,c.X1,c.qT,c.me,c.Fm,c.BC,c.cb,c.j4,c.JD,u.bT],encapsulation:2})}return s})();var p=r(86722),g=r(61189),B=r(9843),S=r(28083),U=r(88842),L=r(79599),w=r(47637),W=r(47331),ae=r(54872),ye=r(75706);const be=s=>({"is-invalid":s}),Ie=()=>({standalone:!0}),_e=s=>({show:s});function Se(s,l){if(1&s){const t=e.RV6();e.j41(0,"div")(1,"button",9,2),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.onClickSuggestion(n))}),e.nrm(3,"ds-listable-object-component-loader",10),e.k0s()()}if(2&s){const t=l.$implicit,i=e.XpG();e.R7$(3),e.Y8G("object",t)("viewMode",i.viewMode)("linkType",i.linkTypes.None)}}let Oe=(()=>{class s extends ye.t{constructor(t){super(),this.dsoNameService=t,this.viewMode=U.n.ListElement,this.linkTypes=L.n,this.suggestions=[]}onSubmit(t){(0,A.a4)(t)&&(this.value=this.dsoNameService.getName(t),this.currentObject=t,this.submitSuggestion.emit(t))}onClickSuggestion(t){return this.value=this.dsoNameService.getName(t),this.currentObject=t,this.clickSuggestion.emit(t),this.close(),this.blockReopen=!0,this.queryInput.nativeElement.focus(),!1}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(X.f))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-dso-input-suggestions"]],inputs:{suggestions:"suggestions"},standalone:!0,features:[e.Jv_([{provide:c.kq,useExisting:(0,e.Rfq)(()=>s),multi:!0}]),e.Vt3,e.aNF],decls:11,vars:19,consts:[["form","ngForm"],["inputField",""],["suggestion",""],[3,"ngSubmit","keydown.arrowdown","keydown.arrowup","keydown.esc","dsClickOutside","action"],["type","text","autocomplete","off",1,"form-control","suggestion_input","mb-2",3,"ngModelChange","onDebounce","ngModel","name","ngClass","dsDebounce","placeholder","ngModelOptions"],["type","submit",1,"sr-only"],[1,"autocomplete","dropdown-menu",3,"ngClass"],[1,"dropdown-list"],[4,"ngFor","ngForOf"],[1,"d-block","dropdown-item",3,"click"],[3,"object","viewMode","linkType"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"form",3,0),e.bIt("ngSubmit",function(){return e.eBV(o),e.Njj(n.onSubmit(n.currentObject))})("keydown.arrowdown",function(O){return e.eBV(o),e.Njj(n.shiftFocusDown(O))})("keydown.arrowup",function(O){return e.eBV(o),e.Njj(n.shiftFocusUp(O))})("keydown.esc",function(){return e.eBV(o),e.Njj(n.close())})("dsClickOutside",function(){return e.eBV(o),e.Njj(n.close())}),e.j41(2,"input",4,1),e.mxI("ngModelChange",function(O){return e.eBV(o),e.DH7(n.value,O)||(n.value=O),e.Njj(O)}),e.bIt("onDebounce",function(O){return e.eBV(o),e.Njj(n.find(O))}),e.k0s(),e.j41(4,"button",5),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",6),e.nI1(8,"async"),e.j41(9,"div",7),e.DNE(10,Se,4,3,"div",8),e.k0s()()()}2&i&&(e.Y8G("action",n.action,e.B4B),e.R7$(2),e.R50("ngModel",n.value),e.Y8G("name",n.name)("ngClass",e.eq3(14,be,!n.valid))("dsDebounce",n.debounceTime)("placeholder",n.placeholder)("ngModelOptions",e.lJ4(16,Ie)),e.R7$(3),e.SpI(" ",e.bMT(6,10,"search.filters.search.submit")," "),e.R7$(2),e.Y8G("ngClass",e.eq3(17,_e,e.bMT(8,12,n.show)&&n.isNotEmpty(n.suggestions))),e.R7$(3),e.Y8G("ngForOf",n.suggestions))},dependencies:[c.YN,c.qT,c.me,c.BC,c.cb,c.vS,c.cV,W.z,ae.R,u.YU,u.pM,w.v,u.Jj,h.h,h.D9],styles:[".autocomplete[_ngcontent-%COMP%]{width:100%}.autocomplete[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]{white-space:normal;word-break:break-word;padding:var(--bs-input-padding-y) var(--bs-input-padding-x)}.autocomplete[_ngcontent-%COMP%]   .dropdown-item[_ngcontent-%COMP%]:focus{outline:none}form[_ngcontent-%COMP%]{position:relative}"]})}return s})();var me=r(44277),Ce=r(96013),Te=r(63524);function Re(s,l){if(1&s&&(e.j41(0,"div")(1,"span",7),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()()),2&s){const t=e.XpG().ngVar,i=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"item.bitstreams.upload.item")),e.R7$(3),e.JRh(i.dsoNameService.getName(t))}}function Me(s,l){if(1&s&&(e.qex(0),e.DNE(1,Re,6,4,"div",2),e.bVm()),2&s){const t=l.ngVar;e.R7$(),e.Y8G("ngIf",t)}}function De(s,l){if(1&s){const t=e.RV6();e.j41(0,"button",12),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.createBundle())}),e.nrm(1,"i",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()}2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"item.bitstreams.upload.bundle.new")," "))}function Ee(s,l){if(1&s){const t=e.RV6();e.j41(0,"ds-uploader",14),e.bIt("onCompleteItem",function(n){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onCompleteItem(n))})("onUploadError",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.onUploadError())}),e.k0s()}if(2&s){const t=e.XpG(2);e.Y8G("dropMsg","item.bitstreams.upload.drop-message")("dropOverDocumentMsg","item.bitstreams.upload.drop-message")("enableDragOverDocument",!0)("uploadFilesOptions",t.uploadFilesOptions)}}function Fe(s,l){if(1&s){const t=e.RV6();e.qex(0),e.j41(1,"div",3)(2,"div",4)(3,"h1"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.DNE(6,Me,2,1,"ng-container",5),e.nI1(7,"async"),e.k0s(),e.j41(8,"div",6)(9,"label",7),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"ds-dso-input-suggestions",8,0),e.nI1(14,"translate"),e.mxI("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.DH7(o.selectedBundleName,n)||(o.selectedBundleName=n),e.Njj(n)}),e.bIt("typeSuggestion",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.bundleNameChange())})("clickSuggestion",function(n){e.eBV(t);const o=e.XpG();return e.Njj(o.onClick(n))})("click",function(){e.eBV(t);const n=e.sdS(13);return e.Njj(n.open())}),e.k0s(),e.DNE(15,De,4,3,"button",9)(16,Ee,1,4,"ds-uploader",10),e.j41(17,"button",11),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.onCancel())}),e.EFF(18),e.nI1(19,"translate"),e.k0s()()(),e.bVm()}if(2&s){let t;const i=e.XpG();e.R7$(4),e.JRh(e.bMT(5,12,"item.bitstreams.upload.title")),e.R7$(2),e.Y8G("ngVar",null==(t=e.bMT(7,14,i.itemRD$))?null:t.payload),e.R7$(4),e.JRh(e.bMT(11,16,"item.bitstreams.upload.bundle")),e.R7$(2),e.Y8G("suggestions",i.bundles)("placeholder",e.bMT(14,18,"item.bitstreams.upload.bundle.placeholder"))("action",i.getCurrentUrl())("name","bundle-select")("debounceTime",50),e.R50("ngModel",i.selectedBundleName),e.R7$(3),e.Y8G("ngIf",!i.selectedBundleId&&(null==i.selectedBundleName?null:i.selectedBundleName.length)>0),e.R7$(),e.Y8G("ngIf",i.selectedBundleId),e.R7$(2),e.JRh(e.bMT(19,20,"item.bitstreams.upload.cancel"))}}let je=(()=>{class s{constructor(t,i,n,o,y,O,Z,ue,pe){this.route=t,this.router=i,this.itemService=n,this.bundleService=o,this.authService=y,this.notificationsService=O,this.translate=Z,this.requestService=ue,this.dsoNameService=pe,this.bundles=[],this.uploadFilesOptions=Object.assign(new Ce.H,{url:"placeholder",authToken:null,disableMultipart:!1,itemAlias:null}),this.NOTIFICATIONS_PREFIX="item.bitstreams.upload.notifications.",this.subs=[]}
1ngOnInit(){this.itemId=this.route.snapshot.params.id,this.entityType=this.route.snapshot.params["entity-type"],this.itemRD$=this.route.data.pipe((0,T.T)(i=>i.dso));const t=this.itemService.getBundles(this.itemId).pipe((0,E.qD)(),(0,P.n)(i=>{if(i.hasSucceeded){if(i.payload.page){this.bundles=i.payload.page;for(const n of p.c.bundle.standardBundles){let o=!0;i.payload.page.forEach(y=>{n===y.name&&(o=!1)}),o&&this.bundles.push(Object.assign(new S.N,{_name:n,type:"bundle"}))}}else this.bundles=p.c.bundle.standardBundles.map(n=>Object.assign(new S.N,{_name:n,type:"bundle"}));return(0,_.of)(i.payload.page)}}));this.selectedBundleId=this.route.snapshot.queryParams.bundle,(0,A.hj)(this.selectedBundleId)&&(this.subs.push(this.bundleService.findById(this.selectedBundleId).pipe((0,E.ak)()).subscribe(i=>{this.selectedBundleName=i.name})),this.setUploadUrl()),this.subs.push(t.subscribe())}createBundle(){this.itemService.createBundle(this.itemId,this.selectedBundleName).pipe((0,E.ak)()).subscribe(t=>{this.selectedBundleId=t.id,this.notificationsService.success(this.translate.instant(this.NOTIFICATIONS_PREFIX+"bundle.created.title"),this.translate.instant(this.NOTIFICATIONS_PREFIX+"bundle.created.content")),this.setUploadUrl()})}bundleNameChange(){this.selectedBundleId=void 0;for(const t of this.bundles)if(this.selectedBundleName===t.name){this.selectedBundleId=t.id;break}}setUploadUrl(){this.bundleService.getBitstreamsEndpoint(this.selectedBundleId).pipe((0,D.s)(1)).subscribe(t=>{this.uploadFilesOptions.url=t,(0,A.Im)(this.uploadFilesOptions.authToken)&&(this.uploadFilesOptions.authToken=this.authService.buildAuthHeader()),this.uploaderComponent&&(this.uploaderComponent.ngOnInit(),this.uploaderComponent.ngAfterViewInit())})}onCompleteItem(t){this.bundleService.getBitstreamsEndpoint(this.selectedBundleId).pipe((0,D.s)(1)).subscribe(n=>{this.requestService.removeByHrefSubstring(n)});const i={itemId:this.itemId,entityType:this.entityType};this.router.navigate([(0,d.dF)(),t.id,"edit"],{queryParams:i})}onUploadError(){this.notificationsService.error(null,this.translate.get(this.NOTIFICATIONS_PREFIX+"upload.failed"))}onClick(t){this.selectedBundleId=t.id,this.selectedBundleName=t.name,t.id&&this.setUploadUrl()}onCancel(){this.router.navigate([(0,z.DL)(this.entityType,this.itemId),"bitstreams"])}getCurrentUrl(){return this.router.url}ngOnDestroy(){this.subs.filter(t=>(0,A.a4)(t)).forEach(t=>t.unsubscribe())}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(b.ItemDataService),e.rXU(g.BundleDataService),e.rXU(V.uR),e.rXU(Y.I),e.rXU(h.c$),e.rXU(B.B),e.rXU(X.f))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-upload-bitstream"]],viewQuery:function(i,n){if(1&i&&e.GBs(me.y,5),2&i){let o;e.mGM(o=e.lsd())&&(n.uploaderComponent=o.first)}},standalone:!0,features:[e.aNF],decls:2,vars:1,consts:[["f",""],[1,"container"],[4,"ngIf"],[1,"row"],[1,"col-12","mb-2"],[4,"ngVar"],[1,"col-12"],[1,"font-weight-bold"],["id","search-form","ngDefaultControl","",3,"ngModelChange","typeSuggestion","clickSuggestion","click","suggestions","placeholder","action","name","debounceTime","ngModel"],["class","btn btn-success mr-2",3,"click",4,"ngIf"],["class","w-100",3,"dropMsg","dropOverDocumentMsg","enableDragOverDocument","uploadFilesOptions","onCompleteItem","onUploadError",4,"ngIf"],[1,"btn","btn-outline-secondary",3,"click"],[1,"btn","btn-success","mr-2",3,"click"],[1,"fa","fa-plus"],[1,"w-100",3,"onCompleteItem","onUploadError","dropMsg","dropOverDocumentMsg","enableDragOverDocument","uploadFilesOptions"]],template:function(i,n){1&i&&(e.j41(0,"div",1),e.DNE(1,Fe,20,22,"ng-container",2),e.k0s()),2&i&&(e.R7$(),e.Y8G("ngIf",n.bundles))},dependencies:[h.h,h.D9,u.Jj,Te.r,u.bT,Oe,c.YN,c.me,c.BC,c.vS,me.y],encapsulation:2})}return s})();var Be=r(98196),he=r(78759),k=r(71217),ce=r(27685),le=r(37330),q=r(96858),de=r(16700),ge=r(21548),Pe=r(66190);function Ae(s,l){1&s&&e.eu8(0)}function $e(s,l){if(1&s&&(e.j41(0,"li",19),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=l.$implicit,i=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(2,1,i.getAuthorizationDescription(t))," ")}}function Ne(s,l){if(1&s&&(e.j41(0,"div",16)(1,"div",8)(2,"div",9),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"div",10)(6,"div",17)(7,"ul"),e.DNE(8,$e,3,3,"li",18),e.nI1(9,"async"),e.k0s()()()()()),2&s){const t=e.XpG(2);e.R7$(3),e.JRh(e.bMT(4,2,"person.page.orcid.granted-authorizations")),e.R7$(5),e.Y8G("ngForOf",e.bMT(9,4,t.getOrcidAuthorizations()))}}function Ue(s,l){1&s&&(e.j41(0,"ds-alert",20),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.Y8G("type","alert-success"),e.R7$(),e.SpI(" ",e.bMT(2,2,"person.page.orcid.no-missing-authorizations-message")," "))}function ke(s,l){if(1&s&&(e.j41(0,"li",23),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=l.$implicit,i=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(2,1,i.getAuthorizationDescription(t))," ")}}function Ge(s,l){if(1&s&&(e.j41(0,"ds-alert",21),e.EFF(1),e.nI1(2,"translate"),e.j41(3,"ul"),e.DNE(4,ke,3,3,"li",22),e.nI1(5,"async"),e.k0s()()),2&s){const t=e.XpG(2);e.Y8G("type","alert-warning"),e.R7$(),e.SpI(" ",e.bMT(2,3,"person.page.orcid.missing-authorizations-message")," "),e.R7$(3),e.Y8G("ngForOf",e.bMT(5,5,t.getMissingOrcidAuthorizations()))}}function Ve(s,l){1&s&&(e.j41(0,"ds-alert",24),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s&&(e.Y8G("type","alert-warning"),e.R7$(),e.SpI(" ",e.bMT(2,2,"person.page.orcid.remove-orcid-message")," "))}function Le(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",30),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"person.page.orcid.unlink"),""))}function xe(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",31),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&s&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"person.page.orcid.unlink.processing"),""))}function ze(s,l){if(1&s){const t=e.RV6();e.j41(0,"button",32),e.bIt("click",function(){e.eBV(t);const n=e.XpG(3);return e.Njj(n.linkOrcid())}),e.j41(1,"span"),e.nrm(2,"i",33),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}2&s&&(e.R7$(3),e.SpI(" ",e.bMT(4,1,"person.page.orcid.grant-authorizations"),""))}function Xe(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",25)(1,"div",26)(2,"button",27),e.nI1(3,"async"),e.bIt("click",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.unlinkOrcid())}),e.DNE(4,Le,4,3,"span",28),e.nI1(5,"async"),e.DNE(6,xe,4,3,"span",28),e.nI1(7,"async"),e.k0s(),e.DNE(8,ze,5,3,"button",29),e.nI1(9,"async"),e.k0s()()}if(2&s){const t=e.XpG(2);e.R7$(2),e.Y8G("disabled",e.bMT(3,4,t.unlinkProcessing)),e.R7$(2),e.Y8G("ngIf",!0!==e.bMT(5,6,t.unlinkProcessing)),e.R7$(2),e.Y8G("ngIf",e.bMT(7,8,t.unlinkProcessing)),e.R7$(2),e.Y8G("ngIf",e.bMT(9,10,t.hasMissingOrcidAuthorizations()))}}function Ye(s,l){if(1&s&&(e.j41(0,"div",4)(1,"div",5),e.DNE(2,Ne,10,6,"div",6),e.nI1(3,"async"),e.j41(4,"div",7)(5,"div",8)(6,"div",9),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"div",10)(10,"div",11),e.DNE(11,Ue,3,4,"ds-alert",12),e.nI1(12,"async"),e.DNE(13,Ge,6,7,"ds-alert",13),e.nI1(14,"async"),e.k0s()()()()(),e.DNE(15,Ve,3,4,"ds-alert",14),e.nI1(16,"async"),e.nI1(17,"async"),e.DNE(18,Xe,10,12,"div",15),e.nI1(19,"async"),e.k0s()),2&s){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",e.bMT(3,6,t.hasOrcidAuthorizations())),e.R7$(5),e.JRh(e.bMT(8,8,"person.page.orcid.missing-authorizations")),e.R7$(4),e.Y8G("ngIf",!0!==e.bMT(12,10,t.hasMissingOrcidAuthorizations())),e.R7$(2),e.Y8G("ngIf",e.bMT(14,12,t.hasMissingOrcidAuthorizations())),e.R7$(2),e.Y8G("ngIf",e.bMT(16,14,t.onlyAdminCanDisconnectProfileFromOrcid())&&!0!==e.bMT(17,16,t.ownerCanDisconnectProfileFromOrcid())),e.R7$(3),e.Y8G("ngIf",e.bMT(19,18,t.ownerCanDisconnectProfileFromOrcid()))}}function Ke(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",34)(1,"div",5)(2,"div",35),e.nrm(3,"img",36),e.k0s(),e.j41(4,"div",26)(5,"ds-alert",37),e.EFF(6),e.nI1(7,"async"),e.k0s()()(),e.j41(8,"div",5)(9,"div",26)(10,"button",38),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.linkOrcid())}),e.nrm(11,"i",39),e.EFF(12),e.nI1(13,"translate"),e.k0s()()()()}if(2&s){const t=e.XpG();e.R7$(5),e.Y8G("type","alert-info"),e.R7$(),e.JRh(e.bMT(7,3,t.getOrcidNotLinkedMessage())),e.R7$(6),e.SpI(" ",e.bMT(13,5,"person.page.orcid.link")," ")}}r(47376);let We=(()=>{class s{constructor(t,i,n,o){this.orcidAuthService=t,this.translateService=i,this.notificationsService=n,this._window=o,this.profileAuthorizationScopes=new k.t([]),this.missingAuthorizationScopes=new k.t([]),this.orcidAuthorizationScopes=new k.t([]),this.unlinkProcessing=new k.t(!1),this.isOrcidLinked$=new k.t(!1),this.onlyAdminCanDisconnectProfileFromOrcid$=ne
1w k.t(!1),this.ownerCanDisconnectProfileFromOrcid$=new k.t(!1),this.unlink=new e.bkB}ngOnInit(){this.orcidAuthService.getOrcidAuthorizationScopes().subscribe(t=>{this.orcidAuthorizationScopes.next(t),this.initOrcidAuthSettings()})}ngOnChanges(t){!t.item.isFirstChange()&&t.item.currentValue!==t.item.previousValue&&this.initOrcidAuthSettings()}hasOrcidAuthorizations(){return this.profileAuthorizationScopes.asObservable().pipe((0,T.T)(t=>t.length>0))}getOrcidAuthorizations(){return this.profileAuthorizationScopes.asObservable()}hasMissingOrcidAuthorizations(){return this.missingAuthorizationScopes.asObservable().pipe((0,T.T)(t=>t.length>0))}getMissingOrcidAuthorizations(){return this.profileAuthorizationScopes.asObservable()}isLinkedToOrcid(){return this.isOrcidLinked$.asObservable()}getOrcidNotLinkedMessage(){const t=this.item.firstMetadataValue("person.identifier.orcid");return t?this.translateService.get("person.page.orcid.orcid-not-linked-message",{orcid:t}):this.translateService.get("person.page.orcid.no-orcid-message")}getAuthorizationDescription(t){return"person.page.orcid.scope."+t.substring(1).replace("/","-")}onlyAdminCanDisconnectProfileFromOrcid(){return this.onlyAdminCanDisconnectProfileFromOrcid$.asObservable()}ownerCanDisconnectProfileFromOrcid(){return this.ownerCanDisconnectProfileFromOrcid$.asObservable()}linkOrcid(){this.orcidAuthService.getOrcidAuthorizeUrl(this.item).subscribe(t=>{this._window.nativeWindow.location.href=t})}unlinkOrcid(){this.unlinkProcessing.next(!0),this.orcidAuthService.unlinkOrcidByItem(this.item).pipe((0,E.qD)()).subscribe(t=>{this.unlinkProcessing.next(!1),t.isSuccess?(this.notificationsService.success(this.translateService.get("person.page.orcid.unlink.success")),this.unlink.emit()):this.notificationsService.error(this.translateService.get("person.page.orcid.unlink.error"))})}initOrcidAuthSettings(){this.setOrcidAuthorizationsFromItem(),this.setMissingOrcidAuthorizations(),this.orcidAuthService.onlyAdminCanDisconnectProfileFromOrcid().subscribe(t=>{this.onlyAdminCanDisconnectProfileFromOrcid$.next(t)}),this.orcidAuthService.ownerCanDisconnectProfileFromOrcid().subscribe(t=>{this.ownerCanDisconnectProfileFromOrcid$.next(t)}),this.isOrcidLinked$.next(this.orcidAuthService.isLinkedToOrcid(this.item))}setMissingOrcidAuthorizations(){const t=this.orcidAuthService.getOrcidAuthorizationScopesByItem(this.item),n=this.orcidAuthorizationScopes.value.filter(o=>!t.includes(o));this.missingAuthorizationScopes.next(n)}setOrcidAuthorizationsFromItem(){this.profileAuthorizationScopes.next(this.orcidAuthService.getOrcidAuthorizationScopesByItem(this.item))}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(ce.r),e.rXU(h.c$),e.rXU(Y.I),e.rXU(Pe.lc))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-orcid-auth"]],inputs:{item:"item"},outputs:{unlink:"unlink"},standalone:!0,features:[e.OA$,e.aNF],decls:10,vars:8,consts:[["orcidLinked",""],["orcidNotLinked",""],[1,"container","mb-5"],[4,"ngIf","ngIfThen","ngIfElse"],["data-test","orcidLinked"],[1,"row"],["class","col-sm-6 mb-3","data-test","hasOrcidAuthorizations",4,"ngIf"],[1,"col-sm-6","mb-3"],[1,"card","h-100"],[1,"card-header"],[1,"card-body"],[1,"container"],["data-test","noMissingOrcidAuthorizations",3,"type",4,"ngIf"],["data-test","missingOrcidAuthorizations",3,"type",4,"ngIf"],["data-test","unlinkOnlyAdmin",3,"type",4,"ngIf"],["class","row","data-test","unlinkOwner",4,"ngIf"],["data-test","hasOrcidAuthorizations",1,"col-sm-6","mb-3"],[1,"container","p-0"],["data-test","orcidAuthorization",4,"ngFor","ngForOf"],["data-test","orcidAuthorization"],["data-test","noMissingOrcidAuthorizations",3,"type"],["data-test","missingOrcidAuthorizations",3,"type"],["data-test","missingOrcidAuthorization",4,"ngFor","ngForOf"],["data-test","missingOrcidAuthorization"],["data-test","unlinkOnlyAdmin",3,"type"],["data-test","unlinkOwner",1,"row"],[1,"col"],["type","submit",1,"btn","btn-danger","float-right",3,"click","disabled"],[4,"ngIf"],["type","submit","class","btn btn-primary float-right",3,"click",4,"ngIf"],[1,"fas","fa-unlink"],[1,"fas","fa-circle-notch","fa-spin"],["type","submit",1,"btn","btn-primary","float-right",3,"click"],[1,"fas","fa-check"],["data-test","orcidNotLinked"],[1,"col-2"],["alt","orcid-logo","src","../../../../assets/images/orcid.logo.icon.svg"],[3,"type"],[1,"btn","btn-primary","float-right",3,"click"],[1,"fas","fa-link"]],template:function(i,n){if(1&i&&(e.j41(0,"div",2)(1,"h1"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,Ae,1,0,"ng-container",3),e.nI1(5,"async"),e.k0s(),e.DNE(6,Ye,20,20,"ng-template",null,0,e.C5r)(8,Ke,14,7,"ng-template",null,1,e.C5r)),2&i){const o=e.sdS(7),y=e.sdS(9);e.R7$(2),e.JRh(e.bMT(3,4,"person.orcid.registry.auth")),e.R7$(2),e.Y8G("ngIf",e.bMT(5,6,n.isLinkedToOrcid()))("ngIfThen",o)("ngIfElse",y)}},dependencies:[h.h,h.D9,u.Jj,u.bT,u.Sq,q.C]})}return s})();var fe=r(2155),we=r(88627),Je=r(66645),He=r(82040),Qe=r(9716),Ze=r(41421),qe=r(95438),et=r(51661),tt=r(67899);function it(s,l){1&s&&e.nrm(0,"ds-loading")}function nt(s,l){if(1&s&&(e.j41(0,"ds-alert",4),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=e.XpG();e.Y8G("type",t.AlertTypeEnum.Info),e.R7$(),e.SpI(" ",e.bMT(2,2,"person.page.orcid.sync-queue.empty-message")," ")}}function st(s,l){if(1&s){const t=e.RV6();e.j41(0,"tr",10)(1,"td",11),e.nrm(2,"i",12),e.nI1(3,"translate"),e.k0s(),e.j41(4,"td",8),e.EFF(5),e.k0s(),e.j41(6,"td",13)(7,"div",14)(8,"button",15),e.nI1(9,"translate"),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG(2);return e.Njj(o.send(n))}),e.nrm(10,"span",16),e.j41(11,"span",17),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"button",18),e.nI1(15,"translate"),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG(2);return e.Njj(o.discardEntry(n))}),e.nrm(16,"span",19),e.j41(17,"span",17),e.EFF(18),e.nI1(19,"translate"),e.k0s()()()()()}if(2&s){const t=l.$implicit,i=e.XpG(2);e.R7$(2),e.Y8G("ngClass",i.getIconClass(t))("ngbTooltip",e.bMT(3,8,i.getIconTooltip(t))),e.R7$(3),e.SpI(" ",t.description," "),e.R7$(3),e.Y8G("ngbTooltip",e.bMT(9,10,i.getOperationTooltip(t))),e.R7$(2),e.Y8G("ngClass",i.getOperationClass(t)),e.R7$(2),e.JRh(e.bMT(13,12,i.getOperationTooltip(t))),e.R7$(2),e.Y8G("ngbTooltip",e.bMT(15,14,"person.page.orcid.sync-queue.discard")),e.R7$(4),e.JRh(e.bMT(19,16,"person.page.orcid.sync-queue.discard"))}}function rt(s,l){if(1&s){const t=e.RV6();e.j41(0,"ds-pagination",5),e.nI1(1,"async"),e.bIt("paginationChange",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.updateList())}),e.j41(2,"div",6)(3,"table",7)(4,"thead")(5,"tr",8)(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"th"),e.EFF(13),e.nI1(14,"translate"),e.k0s()()(),e.j41(15,"tbody"),e.DNE(16,st,20,18,"tr",9),e.nI1(17,"async"),e.k0s()()()()}if(2&s){let t,i;const n=e.XpG();e.Y8G("paginationOptions",n.paginationOptions)("collectionSize",null==(t=e.bMT(1,8,n.getList()))||null==t.payload?null:t.payload.totalElements)("retainScrollPosition",!1)("hideGear",!0),e.R7$(7),e.JRh(e.bMT(8,10,"person.page.orcid.sync-queue.table.header.type")),e.R7$(3),e.JRh(e.bMT(11,12,"person.page.orcid.sync-queue.table.header.description")),e.R7$(3),e.JRh(e.bMT(14,14,"person.page.orcid.sync-queue.table.header.action")),e.R7$(3),e.Y8G("ngForOf",null==(i=e.bMT(17,16,n.getList()))||null==i.payload?null:i.payload.page)}}let ot=(()=>{class s{constructor(t,i,n,o,y,O){this.orcidAuthService=t,this.orcidQueueService=i,this.translateService=n,this.paginationService=o,this.notificationsService=y,this.orcidHistoryService=O,this.paginationOptions=Object.assign(new tt.W,{id:"oqp",pageSize:5}),this.processing$=new k.t(!1),this.list$=new k.t({}),this.AlertTypeEnum=de.v,this.subs=[]}ngOnInit(){this.updateList()}ngOnChanges(t){!t.item.isFirstChange()&&t.item.currentValue!==t.item.previousValue&&this.updateList()}updateList(){this.subs.push(this.paginationService.getCurrentPagination(this.paginationOptions.id,this.paginationOptions).pipe((0,we.B)(100),(0,Je.F)(),(0,He.M)(()=>this.processing$.next(!0)),(0,P.n)(t=>this.orcidQueueService.searchByProfileItemId(this.item.id,t,!1)),(0,E.qD)()).subscribe(t=>{this.processing$.next(!1),this.list$.next(t),this.orcidQueueService.clearFindByProfileItemRequests()}))}getList(){return this.list$.asObservable()}getIconClass(t){if(!t.recordType)return"fa fa-user";switch(t.recordType.toLowerCase()){case"publication":return"fas fa-book";case"project":return"fas fa-wallet";case"education":return"fas fa-school";case"affiliation":return"fas fa-university";case"country":return"fas fa-globe-europe";case"external_ids":case"researcher_urls":return"fas fa-external-link-alt";default:return"fa fa-user"}}getIconTooltip(t){return t.recordType?"person.page.orcid.sync-queue.tooltip."+t.recordType.toLowerCase():""}getOperationTooltip(t){return t.operation?"person.page.orcid.sync-queue.tooltip."+t.operation.toLowerCase():""}getOperationClass(t){if(!t.operation)return"";switch(t.operation.toLowerCase()){case"insert":return"fas fa-plus";case"update":return"fas fa-edit";
1case"delete":return"fas fa-trash-alt";default:return""}}discardEntry(t){this.processing$.next(!0),this.subs.push(this.orcidQueueService.deleteById(t.id).pipe((0,E.qD)()).subscribe(i=>{this.processing$.next(!1),i.isSuccess?(this.notificationsService.success(this.translateService.get("person.page.orcid.sync-queue.discard.success")),this.updateList()):this.notificationsService.error(this.translateService.get("person.page.orcid.sync-queue.discard.error"))}))}send(t){this.processing$.next(!0),this.subs.push(this.orcidHistoryService.sendToORCID(t).pipe((0,E.qD)()).subscribe(i=>{this.processing$.next(!1),i.isSuccess?this.handleOrcidHistoryRecordCreation(i.payload):422===i.statusCode?this.handleValidationErrors(i):this.notificationsService.error(this.translateService.get("person.page.orcid.sync-queue.send.error"))}))}getUnauthorizedErrorContent(){return this.orcidAuthService.getOrcidAuthorizeUrl(this.item).pipe((0,P.n)(t=>this.translateService.get("person.page.orcid.sync-queue.send.unauthorized-error.content",{orcid:t})))}handleOrcidHistoryRecordCreation(t){switch(t.status){case 200:case 201:case 204:this.notificationsService.success(this.translateService.get("person.page.orcid.sync-queue.send.success")),this.updateList();break;case 400:this.notificationsService.error(this.translateService.get("person.page.orcid.sync-queue.send.bad-request-error"),null,{timeOut:0});break;case 401:(0,m.z)([this.translateService.get("person.page.orcid.sync-queue.send.unauthorized-error.title"),this.getUnauthorizedErrorContent()]).subscribe(([i,n])=>{this.notificationsService.error(i,n,{timeOut:0},!0)});break;case 404:this.notificationsService.warning(this.translateService.get("person.page.orcid.sync-queue.send.not-found-warning"));break;case 409:this.notificationsService.error(this.translateService.get("person.page.orcid.sync-queue.send.conflict-error"),null,{timeOut:0});break;default:this.notificationsService.error(this.translateService.get("person.page.orcid.sync-queue.send.error"),null,{timeOut:0})}}handleValidationErrors(t){const i=[this.translateService.get("person.page.orcid.sync-queue.send.validation-error")],n=t.errorMessage;n&&n.indexOf("Error codes:")>0&&n.substring(n.indexOf(":")+1).trim().split(",").forEach(o=>i.push(this.translateService.get("person.page.orcid.sync-queue.send.validation-error."+o))),(0,m.z)(i).subscribe(o=>{const y=o.shift(),O="<ul>"+o.map(Z=>`<li>${Z}</li>`).join("")+"</ul>";this.notificationsService.error(y,O,{timeOut:0},!0)})}ngOnDestroy(){this.list$=null,this.subs.filter(t=>(0,A.a4)(t)).forEach(t=>t.unsubscribe())}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(ce.r),e.rXU(Ze.OrcidQueueDataService),e.rXU(h.c$),e.rXU(qe.m),e.rXU(Y.I),e.rXU(Qe.OrcidHistoryDataService))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-orcid-queue"]],inputs:{item:"item"},standalone:!0,features:[e.OA$,e.aNF],decls:13,vars:16,consts:[[4,"ngIf"],[1,"container"],[3,"type",4,"ngIf"],[3,"paginationOptions","collectionSize","retainScrollPosition","hideGear","paginationChange",4,"ngIf"],[3,"type"],[3,"paginationChange","paginationOptions","collectionSize","retainScrollPosition","hideGear"],[1,"table-responsive"],["id","groups",1,"table","table-sm","table-striped","table-hover","table-bordered"],[1,"text-center","align-middle"],["data-test","orcidQueueElementRow",4,"ngFor","ngForOf"],["data-test","orcidQueueElementRow"],[1,"text-center","align-middle",2,"width","15%"],["aria-hidden","true",1,"fa-2x",3,"ngClass","ngbTooltip"],[1,"text-center",2,"width","20%"],[1,"btn-group","edit-field"],["container","body",1,"btn","btn-outline-primary","my-1","col-md",3,"click","ngbTooltip"],[3,"ngClass"],[1,"sr-only"],["container","body",1,"btn","btn-outline-danger","my-1","col-md",3,"click","ngbTooltip"],[1,"fas","fa-unlink"]],template:function(i,n){if(1&i&&(e.j41(0,"div"),e.DNE(1,it,1,0,"ds-loading",0),e.nI1(2,"async"),e.j41(3,"div",1)(4,"h2"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.DNE(7,nt,3,4,"ds-alert",2),e.nI1(8,"async"),e.nI1(9,"async"),e.DNE(10,rt,18,18,"ds-pagination",3),e.nI1(11,"async"),e.nI1(12,"async"),e.k0s()()),2&i){let o,y;e.R7$(),e.Y8G("ngIf",e.bMT(2,4,n.processing$)),e.R7$(4),e.JRh(e.bMT(6,6,"person.orcid.registry.queue")),e.R7$(2),e.Y8G("ngIf",!0!==e.bMT(8,8,n.processing$)&&0===(null==(o=e.bMT(9,10,n.getList()))||null==o.payload?null:o.payload.totalElements)),e.R7$(3),e.Y8G("ngIf",!0!==e.bMT(11,12,n.processing$)&&(null==(y=e.bMT(12,14,n.getList()))||null==y.payload?null:y.payload.totalElements)>0)}},dependencies:[u.MD,u.YU,u.Sq,u.bT,u.Jj,fe.n8,fe.md,h.h,h.D9,ge.v,q.C,et.e]})}return s})();var at=r(12792);function ct(s,l){if(1&s&&(e.j41(0,"option",24),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&s){const t=l.$implicit;e.Y8G("value",t.value),e.R7$(),e.JRh(e.bMT(2,2,t.label))}}function lt(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",25)(1,"input",26),e.mxI("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.DH7(o.currentSyncPublications,n)||(o.currentSyncPublications=n),e.Njj(n)}),e.k0s(),e.j41(2,"label",27),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&s){const t=l.$implicit,i=e.XpG();e.R7$(),e.Mz_("id","publicationOption_",t.value,""),e.R50("ngModel",i.currentSyncPublications),e.Y8G("value",t.value),e.R7$(),e.Mz_("for","publicationOption_",t.value,""),e.R7$(),e.JRh(e.bMT(4,7,t.label))}}function dt(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",25)(1,"input",28),e.mxI("ngModelChange",function(n){e.eBV(t);const o=e.XpG();return e.DH7(o.currentSyncFunding,n)||(o.currentSyncFunding=n),e.Njj(n)}),e.k0s(),e.j41(2,"label",27),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&s){const t=l.$implicit,i=e.XpG();e.R7$(),e.Mz_("id","fundingOption_",t.value,""),e.R50("ngModel",i.currentSyncFunding),e.Y8G("value",t.value),e.R7$(),e.Mz_("for","fundingOption_",t.value,""),e.R7$(),e.JRh(e.bMT(4,7,t.label))}}function ut(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",25)(1,"input",29),e.mxI("ngModelChange",function(n){const o=e.eBV(t).$implicit;return e.DH7(o.checked,n)||(o.checked=n),e.Njj(n)}),e.k0s(),e.j41(2,"label",27),e.EFF(3),e.nI1(4,"translate"),e.k0s()()}if(2&s){const t=l.$implicit;e.R7$(),e.Mz_("name","syncProfile_",t.value,""),e.Mz_("id","profileOption_",t.value,""),e.R50("ngModel",t.checked),e.Y8G("value",t.value),e.R7$(),e.Mz_("for","profileOption_",t.value,""),e.R7$(),e.JRh(e.bMT(4,9,t.label))}}let pt=(()=>{class s{constructor(t,i,n){this.researcherProfileService=t,this.notificationsService=i,this.translateService=n,this.AlertType=de.v,this.messagePrefix="person.page.orcid",this.settingsUpdated=new e.bkB}ngOnInit(){this.syncModes=[{label:this.messagePrefix+".synchronization-mode.batch",value:"BATCH"},{label:this.messagePrefix+".synchronization-mode.manual",value:"MANUAL"}],this.syncPublicationOptions=["DISABLED","ALL"].map(i=>({label:this.messagePrefix+".sync-publications."+i.toLowerCase(),value:i})),this.syncFundingOptions=["DISABLED","ALL"].map(i=>({label:this.messagePrefix+".sync-fundings."+i.toLowerCase(),value:i}));const t=this.item.allMetadataValues("dspace.orcid.sync-profile");this.syncProfileOptions=["BIOGRAPHICAL","IDENTIFIERS"].map(i=>({label:this.messagePrefix+".sync-profile."+i.toLowerCase(),value:i,checked:t.includes(i)})),this.currentSyncMode=this.getCurrentPreference("dspace.orcid.sync-mode",["BATCH","MANUAL"],"MANUAL"),this.currentSyncPublications=this.getCurrentPreference("dspace.orcid.sync-publications",["DISABLED","ALL"],"DISABLED"),this.currentSyncFunding=this.getCurrentPreference("dspace.orcid.sync-fundings",["DISABLED","ALL"],"DISABLED")}onSubmit(t){const i=[];this.fillOperationsFor(i,"/orcid/mode",t.value.syncMode),this.fillOperationsFor(i,"/orcid/publications",t.value.syncPublications),this.fillOperationsFor(i,"/orcid/fundings",t.value.syncFundings);const n=this.syncProfileOptions.map(o=>o.value).filter(o=>t.value["syncProfile_"+o]).join(",");this.fillOperationsFor(i,"/orcid/profile",n),0!==i.length&&this.researcherProfileService.findByRelatedItem(this.item).pipe((0,E.qD)(),(0,P.n)(o=>o.hasSucceeded?this.researcherProfileService.patch(o.payload,i).pipe((0,E.qD)()):(0,_.of)(o))).subscribe(o=>{o.isSuccess?(this.notificationsService.success(this.translateService.get(this.messagePrefix+".synchronization-settings-update.success")),this.settingsUpdated.emit()):this.notificationsService.error(this.translateService.get(this.messagePrefix+".synchronization-settings-update.error"))})}getCurrentPreference(t,i,n){const o=this.item.firstMetadataValue(t);return o&&i.includes(o)?o:n}fillOperationsFor(t,i,n){t.push({path:i,op:"replace",value:n})}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(at.ResearcherProfileDataService),e.rXU(Y.I),e.rXU(h.c$))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-orcid-sync-setting"]],inputs:{item:"item"},outputs:{settingsUpdated:"settingsUpdated"},standalone:!0,features:[e.aNF],decls:70,vars:42,consts:[["f","ngForm"],[1,"container","mb-5"],[3,"ngSubmit"],[1,"row","mb-3"],[1,"col-md"],["data-test","sync-mode",1,"card"],[1,"card-header"],[1,"card-body"],[1,"container"],[1,"row"],[3,"type"],[1,"form-group","row"],["for","syncMode"],["name","syncMode","id","syncMode","required","",1,"form-control",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md","mb-3"],["data-test","sync-mode-publication",1,"card","h-100"],[1,"form-group"],["class","row form-check",4,"ngFor","ngForOf"],["data-test","sync-mode-funding",1,"card","h-100"],["data-test","profile-preferences",1,"card","h-100"],[1,"col"],["type","submit",1,"btn","btn-primary","float-right"],[1,"fas","fa-edit"],[3,"value"],[1,"row","form-check"],["type","radio","name","syncPublications","required","",3,"ngModelChange","ngModel","id","value"],[1,"ml-2",3,"for"],["type","radio","name","syncFundings","required","",3,"ngModelChange","ngModel","id","value"],["type","checkbox",3,"ngModelChange","ngModel","name","id","value"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"div",1)(1,"h2"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"form",2,0),e.bIt("ngSubmit",function(){e.eBV(o);const O=e.sdS(5);return e.Njj(n.onSubmit(O.form))}),e.j41(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"div",7)(13,"div",8)(14,"div",9)(15,"ds-alert",10),e.EFF(16),e.nI1(17,"translate"),e.k0s()(),e.j41(18,"div",11)(19,"label",12),e.
1EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"select",13),e.mxI("ngModelChange",function(O){return e.eBV(o),e.DH7(n.currentSyncMode,O)||(n.currentSyncMode=O),e.Njj(O)}),e.DNE(23,ct,3,4,"option",14),e.k0s()()()()()()(),e.j41(24,"div",9)(25,"div",15)(26,"div",16)(27,"div",6),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"div",7)(31,"div",8)(32,"div",9)(33,"ds-alert",10),e.EFF(34),e.nI1(35,"translate"),e.k0s()(),e.j41(36,"div",17),e.DNE(37,lt,5,9,"div",18),e.k0s()()()()(),e.j41(38,"div",15)(39,"div",19)(40,"div",6),e.EFF(41),e.nI1(42,"translate"),e.k0s(),e.j41(43,"div",7)(44,"div",8)(45,"div",9)(46,"ds-alert",10),e.EFF(47),e.nI1(48,"translate"),e.k0s()(),e.j41(49,"div",17),e.DNE(50,dt,5,9,"div",18),e.k0s()()()()(),e.j41(51,"div",15)(52,"div",20)(53,"div",6),e.EFF(54),e.nI1(55,"translate"),e.k0s(),e.j41(56,"div",7)(57,"div",8)(58,"div",9)(59,"ds-alert",10),e.EFF(60),e.nI1(61,"translate"),e.k0s()(),e.j41(62,"div",17),e.DNE(63,ut,5,11,"div",18),e.k0s()()()()()(),e.j41(64,"div",9)(65,"div",21)(66,"button",22),e.nrm(67,"i",23),e.EFF(68),e.nI1(69,"translate"),e.k0s()()()()()}2&i&&(e.R7$(2),e.JRh(e.bMT(3,20,"person.orcid.sync.setting")),e.R7$(8),e.JRh(e.bMT(11,22,"person.page.orcid.synchronization-mode")),e.R7$(5),e.Y8G("type",n.AlertType.Info),e.R7$(),e.SpI(" ",e.bMT(17,24,"person.page.orcid.synchronization-mode-message")," "),e.R7$(4),e.JRh(e.bMT(21,26,"person.page.orcid.synchronization-mode.label")),e.R7$(2),e.R50("ngModel",n.currentSyncMode),e.R7$(),e.Y8G("ngForOf",n.syncModes),e.R7$(5),e.JRh(e.bMT(29,28,"person.page.orcid.publications-preferences")),e.R7$(5),e.Y8G("type",n.AlertType.Info),e.R7$(),e.SpI(" ",e.bMT(35,30,"person.page.orcid.synchronization-mode-publication-message")," "),e.R7$(3),e.Y8G("ngForOf",n.syncPublicationOptions),e.R7$(4),e.JRh(e.bMT(42,32,"person.page.orcid.funding-preferences")),e.R7$(5),e.Y8G("type",n.AlertType.Info),e.R7$(),e.SpI(" ",e.bMT(48,34,"person.page.orcid.synchronization-mode-funding-message")," "),e.R7$(3),e.Y8G("ngForOf",n.syncFundingOptions),e.R7$(4),e.JRh(e.bMT(55,36,"person.page.orcid.profile-preferences")),e.R7$(5),e.Y8G("type",n.AlertType.Info),e.R7$(),e.SpI(" ",e.bMT(61,38,"person.page.orcid.synchronization-mode-profile-message")," "),e.R7$(3),e.Y8G("ngForOf",n.syncProfileOptions),e.R7$(5),e.SpI(" ",e.bMT(69,40,"person.page.orcid.save.preference.changes")," "))},dependencies:[q.C,c.YN,c.qT,c.xH,c.y7,c.me,c.Zm,c.wz,c.Fm,c.BC,c.cb,c.YS,c.vS,c.cV,h.h,h.D9,u.Sq]})}return s})();function mt(s,l){1&s&&(e.nrm(0,"ds-loading",4),e.nI1(1,"translate")),2&s&&e.Y8G("message",e.bMT(1,1,"person.page.orcid.link.processing"))}function ht(s,l){if(1&s&&(e.j41(0,"div",5)(1,"ds-alert",6),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&s){const t=e.XpG();e.R7$(),e.Y8G("type",t.AlertType.Error),e.R7$(),e.JRh(e.bMT(3,2,"person.page.orcid.link.error.message"))}}function gt(s,l){if(1&s){const t=e.RV6();e.j41(0,"ds-orcid-sync-setting",10),e.nI1(1,"async"),e.bIt("settingsUpdated",function(){e.eBV(t);const n=e.XpG(2);return e.Njj(n.updateItem())}),e.k0s()}if(2&s){const t=e.XpG(2);e.Y8G("item",e.bMT(1,1,t.item))}}function ft(s,l){if(1&s&&(e.nrm(0,"ds-orcid-queue",11),e.nI1(1,"async")),2&s){const t=e.XpG(2);e.Y8G("item",e.bMT(1,1,t.item))}}function vt(s,l){if(1&s){const t=e.RV6();e.qex(0),e.j41(1,"ds-orcid-auth",7),e.nI1(2,"async"),e.bIt("unlink",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.updateItem())}),e.k0s(),e.DNE(3,gt,2,3,"ds-orcid-sync-setting",8)(4,ft,2,3,"ds-orcid-queue",9),e.bVm()}if(2&s){const t=e.XpG();e.R7$(),e.Y8G("item",e.bMT(2,3,t.item)),e.R7$(2),e.Y8G("ngIf",t.isLinkedToOrcid()),e.R7$(),e.Y8G("ngIf",t.isLinkedToOrcid())}}function yt(s,l){if(1&s&&(e.j41(0,"div",12)(1,"div",13)(2,"div",14)(3,"a",15),e.nrm(4,"i",16),e.EFF(5),e.nI1(6,"translate"),e.k0s()()()()),2&s){const t=e.XpG();e.R7$(3),e.Y8G("routerLink",t.getItemPage()),e.R7$(2),e.SpI(" ",e.bMT(6,2,"item.orcid.return")," ")}}let bt=(()=>{class s{constructor(t,i,n,o,y,O){this.platformId=t,this.authService=i,this.itemService=n,this.orcidAuthService=o,this.route=y,this.router=O,this.AlertType=de.v,this.connectionStatus=new k.t(!1),this.item=new k.t(null),this.processingConnection=new k.t(!0)}ngOnInit(){if((0,u.UE)(this.platformId)){const t=this.route.queryParamMap.pipe((0,D.s)(1),(0,T.T)(n=>n.get("code"))),i=this.route.data.pipe((0,T.T)(n=>n.dso),(0,le.QD)(this.router,this.authService),(0,E.ak)());(0,m.z)([t,i]).subscribe(([n,o])=>{this.itemId=o.id,(0,A.hj)(n)?this.linkProfileToOrcid(o,n):(this.item.next(o),this.processingConnection.next(!1),this.connectionStatus.next(!0))})}}isLinkedToOrcid(){return this.orcidAuthService.isLinkedToOrcid(this.item.value)}getItemPage(){return(0,z._o)(this.item.value)}
1updateItem(){this.clearRouteParams(),this.itemService.findById(this.itemId,!1).pipe((0,E.qD)()).subscribe(t=>{t.hasSucceeded&&this.item.next(t.payload)})}linkProfileToOrcid(t,i){this.orcidAuthService.linkOrcidByItem(t,i).pipe((0,E.qD)()).subscribe(n=>{this.processingConnection.next(!1),n.hasSucceeded?(this.connectionStatus.next(!0),this.updateItem()):(this.item.next(t),this.connectionStatus.next(!1),this.clearRouteParams())})}clearRouteParams(){const t=this.router.url.split("?")[0];this.router.navigate([t])}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(e.Agw),e.rXU(V.uR),e.rXU(b.ItemDataService),e.rXU(ce.r),e.rXU(v.nX),e.rXU(v.Ix))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-orcid-page"]],standalone:!0,features:[e.aNF],decls:12,vars:20,consts:[[3,"message",4,"ngIf"],["class","container","data-test","error-box",4,"ngIf"],[4,"ngIf"],["class","container",4,"ngIf"],[3,"message"],["data-test","error-box",1,"container"],[3,"type"],["data-test","orcid-auth",3,"unlink","item"],["data-test","orcid-sync-setting",3,"item","settingsUpdated",4,"ngIf"],[3,"item",4,"ngIf"],["data-test","orcid-sync-setting",3,"settingsUpdated","item"],[3,"item"],[1,"container"],[1,"button-row","bottom","mb-3"],[1,"text-right"],["role","button","data-test","back-button",1,"btn","btn-outline-secondary",3,"routerLink"],[1,"fas","fa-arrow-left"]],template:function(i,n){1&i&&(e.DNE(0,mt,2,3,"ds-loading",0),e.nI1(1,"async"),e.DNE(2,ht,4,4,"div",1),e.nI1(3,"async"),e.nI1(4,"async"),e.DNE(5,vt,5,5,"ng-container",2),e.nI1(6,"async"),e.nI1(7,"async"),e.nI1(8,"async"),e.DNE(9,yt,7,4,"div",3),e.nI1(10,"async"),e.nI1(11,"async")),2&i&&(e.Y8G("ngIf",e.bMT(1,4,n.processingConnection)),e.R7$(2),e.Y8G("ngIf",!0!==e.bMT(3,6,n.processingConnection)&&!0!==e.bMT(4,8,n.connectionStatus)),e.R7$(3),e.Y8G("ngIf",!0!==e.bMT(6,10,n.processingConnection)&&e.bMT(7,12,n.item)&&e.bMT(8,14,n.connectionStatus)),e.R7$(4),e.Y8G("ngIf",!0!==e.bMT(10,16,n.processingConnection)&&e.bMT(11,18,n.item)))},dependencies:[u.MD,u.bT,u.Jj,ge.v,q.C,We,pt,ot,h.h,h.D9,v.Wk]})}return s})();const _t=(0,r(1762).L)(()=>he.Z,()=>(0,_.of)(H._.CanSynchronizeWithORCID));var St=r(21124);r(87277);const Ot=["*"];function Ct(s,l){}let Tt=(()=>{class s extends St.J{getComponentName(){return"ItemPageComponent"}importThemedComponent(t){return r(5729)(`./${t}/app/item-page/simple/item-page.component`)}importUnthemedComponent(){return Promise.resolve().then(r.bind(r,87277))}static#e=this.\u0275fac=(()=>{let t;return function(n){return(t||(t=e.xGo(s)))(n||s)}})();static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-item-page"]],standalone:!0,features:[e.Vt3,e.aNF],ngContentSelectors:Ot,decls:5,vars:0,consts:[["vcr",""],["content",""]],template:function(i,n){1&i&&(e.NAR(),e.DNE(0,Ct,0,0,"ng-template",null,0,e.C5r),e.j41(2,"div",null,1),e.SdG(4),e.k0s())},encapsulation:2})}return s})();var Rt=r(73958),ve=r(26041),Mt=r(88663);const Et=[(0,r(24106).s)("item")],Bt=[{path:":id",resolve:{dso:he.Z,breadcrumb:(s,l,t=(0,e.WQX)($.U),i=(0,e.WQX)(b.ItemDataService))=>(0,M.G)(s,l,t,i,...R.e),menu:I.c},runGuardsAndResolvers:"always",children:[{path:"",component:Tt,pathMatch:"full"},{path:"full",component:Be.i},{path:z.jU,loadChildren:()=>Promise.all([r.e(9563),r.e(3068),r.e(4940),r.e(3725),r.e(6382),r.e(2076),r.e(6761)]).then(r.bind(r,96761)).then(s=>s.ROUTES)},{path:z.aX,component:je,canActivate:[f.t]},{path:d.RZ,component:a},{path:z._z,component:bt,canActivate:[f.t,_t]}],data:{menu:{public:[{id:"statistics_item_:id",active:!0,visible:!0,index:2,model:{type:F.x.LINK,text:"menu.section.statistics",link:"statistics/items/:id/"}}]}}},{path:"version",children:[{path:":id",component:(()=>{class s{constructor(t,i,n,o){this.route=t,this.router=i,this.versionService=n,this.authService=o}ngOnInit(){this.versionRD$=this.route.data.pipe((0,T.T)(t=>t.dso),(0,le.QD)(this.router,this.authService)),this.versionRD$.pipe((0,E.ak)(),(0,P.n)(t=>t.item),(0,le.QD)(this.router,this.authService),(0,E.qD)()).subscribe(t=>{if(t.hasNoContent)this.router.navigateByUrl((0,d.EX)(),{skipLocationChange:!0});else{const i=(0,z._o)(t.payload);this.router.navigateByUrl(i)}})}static#e=this.\u0275fac=function(i){return new(i||s)(e.rXU(v.nX),e.rXU(v.Ix),e.rXU(ve.VersionDataService),e.rXU(V.uR))};static#t=this.\u0275cmp=e.VBU({type:s,selectors:[["ds-version-page"]],standalone:!0,features:[e.aNF],decls:0,vars:0,template:function(i,n){}})}return s})(),resolve:{dso:(s,l,t=(0,e.WQX)(ve.VersionDataService),i=(0,e.WQX)(Rt.il))=>{const n=t.findById(s.params.id,!0,!1,...Et).pipe((0,E.qD)());return n.subscribe(o=>{i.dispatch(new Mt.j(l.url,o.payload))}),n}}}]}]},78759:(x,j,r)=>{"use strict";r.d(j,{Z:()=>v});var d=r(53107),f=r(95968),e=r(73958),R=r(47947),b=r(21706),M=r(17584),$=r(88663),C=r(37330),I=r(1200
17),F=r(72683),u=r(90131),c=r(15497);const v=(h,m,_=(0,d.WQX)(f.Ix),T=(0,d.WQX)(M.ItemDataService),G=(0,d.WQX)(e.il),P=(0,d.WQX)(b.uR))=>T.findById(h.params.id,!0,!1,...u.e).pipe((0,I.qD)(),(0,C.QD)(_,P),(0,R.T)(D=>{if(G.dispatch(new $.j(m.url,D.payload)),D.hasSucceeded&&(0,F.a4)(D.payload)){const V=m.url,X=_.parseUrl((0,c._o)(D.payload)).toString();if(!V.startsWith(X)){const K=D.payload.uuid,J=V.substring(V.indexOf(K)+K.length,V.length);_.navigateByUrl(X+J)}}return D}))},74733:(x,j,r)=>{"use strict";r.d(j,{c:()=>re});var d=r(53107),f=r(63016),e=r(76627),R=r(22867),b=r(47947),M=r(31829),$=r(60875),C=r(77304),I=r(36556),F=r(12792),u=r(58751),c=r(82376),v=r(47376),h=r(12007),m=r(59517),_=r(87913),T=r(72683),G=r(62990),P=r(78198),D=r(43515),V=r(79224),X=r(49559),K=r(82040),J=r(17584),H=r(26041),ee=r(35130),te=r(71779),E=r(45830),A=r(89788),Y=r(2155),z=r(95968);let ie=(()=>{class N{constructor(a,p,g,B,S,U,L){this.modalService=a,this.versionService=p,this.versionHistoryService=g,this.itemVersionShared=B,this.router=S,this.workspaceItemDataService=U,this.itemService=L}openCreateVersionModal(a){const p=a,g=p._links.version.href,B=this.modalService.open(A.L);this.versionService.findByHref(g).pipe((0,h.qD)()).subscribe(S=>{B.componentInstance.firstVersion=S.hasNoContent,B.componentInstance.versionNumber=S.hasNoContent?void 0:S.payload.version}),B.componentInstance.createVersionEvent.pipe((0,R.n)(S=>this.versionHistoryService.createVersion(p._links.self.href,S)),(0,h.qD)(),(0,K.M)(()=>B.close()),(0,K.M)(S=>{this.itemVersionShared.notifyCreateNewVersion(S)}),(0,h.ak)(),(0,R.n)(S=>this.itemService.findByHref(S._links.item.href)),(0,h.ak)(),(0,R.n)(S=>this.workspaceItemDataService.findByItem(S.uuid,!0,!1)),(0,h.ak)()).subscribe(S=>{this.router.navigateByUrl("workspaceitems/"+S.id+"/edit")})}isNewVersionButtonDisabled(a){return this.versionHistoryService.hasDraftVersion$(a._links.version.href).pipe((0,b.T)(p=>!!p))}getVersioningTooltipMessage(a,p,g){return this.isNewVersionButtonDisabled(a).pipe((0,R.n)(B=>(0,f.of)(B?p:g)))}static#e=this.\u0275fac=function(p){return new(p||N)(d.KVO(Y.Bq),d.KVO(H.VersionDataService),d.KVO(ee.VersionHistoryDataService),d.KVO(E.h),d.KVO(z.Ix),d.KVO(te.WorkspaceitemDataService),d.KVO(J.ItemDataService))};static#t=this.\u0275prov=d.jDH({token:N,factory:N.\u0275fac,providedIn:"root"})}return N})();var Q=r(21362),ne=r(69685);let se=(()=>{class N{constructor(a,p,g,B,S,U,L,w,W,ae){this.dSpaceObjectDataService=a,this.menuService=p,this.authorizationService=g,this.modalService=B,this.dsoVersioningModalService=S,this.researcherProfileService=U,this.notificationsService=L,this.translate=w,this.dsoWithdrawnReinstateModalService=W,this.correctionTypeDataService=ae}resolve(a,p){let g=a.params.id;return(0,T.Tn)(g)&&(0,T.a4)(a.queryParams.scope)&&(g=a.queryParams.scope),(0,T.Tn)(g)?(0,f.of)({...a.data?.menu}):this.dSpaceObjectDataService.findById(g,!0,!1).pipe((0,h.qD)(),(0,R.n)(B=>{if(B.hasSucceeded){const S=B.payload;return(0,e.z)(this.getDsoMenus(S,a,p)).pipe((0,b.T)(U=>[].concat.apply([],U)),(0,b.T)(U=>this.addDsoUuidToMenuIDs(U,S)),(0,b.T)(U=>({...a.data?.menu,[P.D.DSO_EDIT]:U})))}return(0,f.of)({...a.data?.menu})}))}getDsoMenus(a,p,g){return[this.getItemMenu(a),this.getComColMenu(a),this.getCommonMenu(a,g)]}getCommonMenu(a,p){return(0,e.z)([this.authorizationService.isAuthorized(I._.CanEditMetadata,a.self)]).pipe((0,b.T)(([g])=>[{id:"edit-dso",active:!1,visible:g,model:{type:D.x.LINK,text:this.getDsoType(a)+".page.edit",link:new _.t((0,M.wN)(a),"edit","metadata").toString()},icon:"pencil-alt",index:2}]))}getItemMenu(a){return a instanceof v.q?(0,e.z)([this.authorizationService.isAuthorized(I._.CanCreateVersion,a.self),this.dsoVersioningModalService.isNewVersionButtonDisabled(a),this.dsoVersioningModalService.getVersioningTooltipMessage(a,"item.page.version.hasDraft","item.page.version.create"),this.authorizationService.isAuthorized(I._.CanSynchronizeWithORCID,a.self),this.authorizationService.isAuthorized(I._.CanClaimItem,a.self),this.correctionTypeDataService.findByItem(a.uuid,!1).pipe((0,h.qD)(),(0,h.Bo)())]).pipe((0,b.T)(([p,g,B,S,U,L])=>{const w="person"===this.getDsoType(a);return[{id:"orcid-dso",active:!1,visible:w&&S,model:{type:D.x.LINK,text:"item.page.orcid.tooltip",link:new _.t((0,M.wN)(a),"orcid").toString()},icon:"orcid fab fa-lg",index:0},{id:"version-dso",active:!1,visible:p,model:{type:D.x.ONCLICK,text:B,disabled:g,function:()=>{this.dsoVersioningModalService.openCreateVersionModal(a)}},icon:"code-branch",index:1},{id:"claim-dso",active:!1,visible:w&&U,model:{type:D.x.ONCLICK,text:"item.page.claim.button",function:()=>{this.claimResearcher(a)}},icon:"hand-paper",index:3},{id:"withdrawn-item",active:!1,visible:a.isArchived&&L?.page.some(W=>W.topic===Q.pc),model:{type:D.x.ONCLICK,text:"item.page.withdrawn",function:()=>{this.dsoWithdrawnReinstateModalService.openCreateWithdrawnReinstateModal(a,"request-withdrawn",a.isArchived)}},icon:"eye-slash",index:4},{id:"reinstate-item",active:!1,visible:a.isWithdrawn&&L?.page.some(W=>W.topic===Q.el),model:{type:D.x.ONCLICK,text:"item.page.reinstate",function:()=>{this.dsoWithdrawnReinstateModalService.openCreateWithdrawnReinstateModal(a,"request-reinstate",a.isArchived)}},icon:"eye",index:5}]})):(0,f.of)([])}getComColMenu(a){return a instanceof c.E||a instanceof u.p?(0,e.z)([this.authorizationService.isAuthorized(I._.CanSubscribe,a.self)]).pipe((0,b.T)(([p])=>[{id:"subscribe",active:!1,visible:p,model:{type:D.x.ONCLICK,text:"subscriptions.tooltip",function:()=>{this.modalService.open(X.w).componentInstance.dso=a}},icon:"bell",index:4}])):(0,f.of)([])}claimResearcher(a){this.researcherProfileService.createFromExternalSourceAndReturnRelatedItemId(a.self).subscribe(p=>{(0,T.hj)(p)?(this.notificationsService.success(this.translate.get("researcherprofile.success.claim.title"),this.translate.get("researcherprofile.success.claim.body")),this.authorizationService.invalidateAuthorizationsRequestCache(),this.menuService.hideMenuSection(P.D.DSO_EDIT,"claim-dso-"+a.uuid)):this.notificationsService.error(this.translate.get("researcherprofile.error.claim.title"),this.translate.get("researcherprofile.error.claim.body"))})}getDsoType(a){const p=a.getRenderTypes()[0];return"string"==typeof p||p instanceof String?p.toLowerCase():a.type.toString().toLowerCase()}addDsoUuidToMenuIDs(a,p){return a.map(g=>(Object.assign(g,{id:g.id+"-"+p.uuid}),(0,T.a4)(g.parentID)&&Object.assign(g,{parentID:g.parentID+"-"+p.uuid}),g))}static#e=this.\u0275fac=function(p){return new(p||N)(d.KVO($.DSpaceObjectDataService),d.KVO(G.$),d.KVO(C.AuthorizationDataService),d.KVO(Y.Bq),d.KVO(ie),d.KVO(F.ResearcherProfileDataService),d.KVO(V.I),d.KVO(ne.c$),d.KVO(Q.Ee),d.KVO(m.CorrectionTypeDataService))};static#t=this.\u0275prov=d.jDH({token:N,factory:N.\u0275fac,providedIn:"root"})}return N})();const re=(N,oe,a=(0,d.WQX)(se))=>a.resolve(N,oe)},5729:(x,j,r)=>{var d={"./custom/app/item-page/simple/item-page.component":[95792,5792]}
1;function f(e){if(!r.o(d,e))return Promise.resolve().then(()=>{var M=new Error("Cannot find module '"+e+"'");throw M.code="MODULE_NOT_FOUND",M});var R=d[e],b=R[0];return r.e(R[1]).then(()=>r(b))}f.keys=()=>Object.keys(d),f.id=5729,x.exports=f}}]);

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.